.team-management { width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 28px; border-radius: 24px; overflow-y: auto; }
.team-management::backdrop { background: rgba(30, 38, 54, .32); backdrop-filter: blur(5px); }
.team-management .team-dialog-header { padding: 0 0 24px; }
.team-management .team-dialog-header h2 { font-size: 26px; overflow-wrap: anywhere; }
.tm-subtitle { margin: 5px 0 0; color: var(--muted); }
.tm-tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 5px; border-radius: 16px; background: var(--surface); gap: 4px; }
.tm-tabs button { border: 0; padding: 12px 6px; border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.tm-tabs button[aria-selected="true"] { background: var(--surface-raised); color: var(--ink); box-shadow: 0 2px 8px #00000012; }
.tm-notice { margin: 16px 0; color: var(--muted); font-size: 13px; }
.tm-notice:empty { margin: 12px 0; }
.tm-notice.is-error { color: #e4483d; }
.tm-panel { min-height: 130px; }
.tm-panel form { gap: 20px; }
.tm-panel label { display: flex; flex-direction: column; gap: 8px; font-weight: 600; }
.tm-panel input, .tm-panel textarea, .tm-panel select { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 400; }
.tm-panel textarea { resize: vertical; }
.tm-panel small, .tm-panel label span { color: var(--muted); font-weight: 400; font-size: 12px; }
.tm-footer, .tm-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.tm-footer { margin-top: 4px; }
.tm-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.tm-row:last-child { border-bottom: 0; }
.tm-person { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.tm-person strong, .tm-person small { display: block; }
.tm-person small { margin-top: 5px; }
.tm-person p { font-size: 13px; margin-bottom: 0; white-space: pre-wrap; }
.tm-row-actions select { width: auto; padding: 9px; }
.tm-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.tm-invite { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.tm-invite button { align-self: flex-end; }
.tm-empty { color: var(--muted); padding: 24px 0; text-align: center; }
.team-management .tm-danger { background: rgba(239, 68, 68, .08); border: 1px solid rgba(239, 68, 68, .25); color: #e4483d; }
.team-management button:disabled { opacity: .5; cursor: wait; }
.team-management :focus-visible { outline: 2px solid #2478ed; outline-offset: 3px; }
.tm-menu-label { padding: 10px 12px 4px; text-transform: uppercase; font-size: 11px; font-weight: 600; color: var(--muted); }
#teams-menu { max-height: calc(100dvh - 16px); overflow-y: auto; }
#teams-menu .team-check { font-size: 10px; text-transform: uppercase; }
@media (max-width: 600px) {
  .team-management { padding: 20px; }
  .tm-row { align-items: flex-start; flex-direction: column; }
  .tm-row-actions { justify-content: flex-start; }
  .tm-footer > button { flex: 1; }
}

.team-management .icon-button { width: 32px; height: 32px; flex-shrink: 0; font-size: 26px; color: var(--muted); }

.tm-invitation-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; margin-left: 8px; padding: 2px 6px; border-radius: 12px; background: #2478ed; color: white; font-size: 12px; font-weight: 600; }
