/* ═══════════════════════════════════════════════════════════════════════════
 * team.css — Vakio Team Management + Accept Invite Styles
 * Follows the Vakio design system (CSS variables from design-system.css)
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ── Page shell ─────────────────────────────────────────────────────────── */

.team-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-primary);
}

.team-main {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}

/* ── Tab bar ─────────────────────────────────────────────────────────────── */

.team-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--surface-border);
    margin-bottom: var(--space-6);
}

.team-tab {
    padding: 10px 20px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast);
    margin-bottom: -1px;
    letter-spacing: 0.02em;
}

.team-tab:hover   { color: var(--text-primary); }
.team-tab.active  {
    color: var(--color-gold);
    border-bottom-color: var(--color-gold);
}

/* ── Section ─────────────────────────────────────────────────────────────── */

.team-section {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: var(--space-6);
}

.team-section-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.team-section-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-5);
    line-height: 1.6;
}

.team-section-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.team-count {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Table ───────────────────────────────────────────────────────────────── */

.team-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--surface-border);
}

.team-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.team-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface-elevated);
    border-bottom: 1px solid var(--surface-border);
    white-space: nowrap;
}

.team-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--surface-border);
    color: var(--text-primary);
    vertical-align: middle;
}

.team-table tr:last-child td { border-bottom: none; }

.team-table tr:hover td { background: rgba(255,255,255,0.02); }

.team-table--sm td,
.team-table--sm th { padding: 9px 12px; font-size: var(--text-xs); }

.team-table .team-row-error   td { background: rgba(239,68,68,0.04); }
.team-table .team-row-pending td { background: rgba(245,158,11,0.06); }

.team-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 32px !important;
    font-style: italic;
}

/* ── Member cell ─────────────────────────────────────────────────────────── */

.team-member-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-gold-dim), rgba(167,139,250,0.3));
    border: 1px solid var(--color-gold-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-gold);
    flex-shrink: 0;
}

.team-email  { color: var(--text-muted); font-size: var(--text-xs); }
.team-date   { color: var(--text-muted); font-size: var(--text-xs); }

.team-role-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.team-status {
    font-size: var(--text-xs);
    font-weight: 600;
}
.team-status.active   { color: var(--color-emerald, #34D399); }
.team-status.inactive { color: var(--text-muted); }

.team-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.team-role-select {
    background: var(--surface-elevated);
    border: 1px solid var(--surface-border);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: var(--text-xs);
    font-family: inherit;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}
.team-role-select:focus { outline: none; border-color: var(--color-gold); }

.team-you-badge {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Form ────────────────────────────────────────────────────────────────── */

.team-form-section { max-width: 540px; }

.team-form { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-6); }

.team-field { display: flex; flex-direction: column; gap: 6px; }

.team-label {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.req { color: var(--color-red, #ef4444); margin-left: 2px; }

.team-input {
    background: var(--surface-elevated);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.team-input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 2px var(--color-gold-dim);
}
.team-input::placeholder { color: var(--text-muted); }

.team-field-err {
    font-size: var(--text-xs);
    color: var(--color-red, #ef4444);
    min-height: 16px;
}

.team-field-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}
.team-field-hint code {
    font-family: var(--font-mono);
    font-size: 11px;
    background: rgba(237,232,219,0.06);
    border: 1px solid var(--surface-border);
    border-radius: 4px;
    padding: 0 4px;
    color: var(--text-secondary);
}

.team-form-msg {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}
.team-form-msg--success {
    background: rgba(52,211,153,0.08);
    border: 1px solid rgba(52,211,153,0.25);
    color: #34D399;
}
.team-form-msg--error {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.25);
    color: #f87171;
}

/* ── Invite result box ───────────────────────────────────────────────────── */

.team-result-box {
    background: rgba(52,211,153,0.04);
    border: 1px solid rgba(52,211,153,0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: var(--space-4);
}

.team-result-box__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(52,211,153,0.08);
    border-bottom: 1px solid rgba(52,211,153,0.15);
    font-size: var(--text-sm);
    color: #34D399;
    font-weight: 600;
}

.team-result-icon { font-size: 16px; }

.team-result-box__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }

.team-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.team-result-label {
    min-width: 130px;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.team-result-val { font-size: var(--text-sm); color: var(--text-primary); }

.team-result-row--token { align-items: flex-start; }

.team-token-code {
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    color: var(--color-gold);
    background: rgba(196,154,60,0.08);
    border: 1px solid var(--color-gold-border);
    border-radius: 5px;
    padding: 3px 8px;
    word-break: break-all;
    flex: 1;
}

.team-token-code--sm {
    font-size: 10px;
    padding: 2px 6px;
    word-break: break-all;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.team-result-note {
    font-size: var(--text-xs);
    color: var(--text-muted);
    padding: 10px 16px;
    border-top: 1px solid rgba(52,211,153,0.12);
    background: rgba(0,0,0,0.1);
    margin: 0;
}

/* ── DEV badge ───────────────────────────────────────────────────────────── */

.team-dev-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(251,146,60,0.12);
    border: 1px solid rgba(251,146,60,0.3);
    color: #fb923c;
    vertical-align: middle;
    cursor: help;
}

/* ── DEV notice banner ───────────────────────────────────────────────────── */

.team-dev-notice {
    padding: 12px 16px;
    background: rgba(251,146,60,0.06);
    border: 1px solid rgba(251,146,60,0.2);
    border-radius: 8px;
    font-size: var(--text-xs);
    color: #fdba74;
    line-height: 1.5;
    margin-bottom: var(--space-4);
}

/* ── Validation chips ────────────────────────────────────────────────────── */

.team-valid   { color: #34D399; font-weight: 600; font-size: var(--text-xs); }
.team-invalid { color: #f87171; font-weight: 600; font-size: var(--text-xs); }
.team-skip    { color: #94A3B8; font-weight: 600; font-size: var(--text-xs); }
.team-muted   { color: var(--text-muted); font-size: var(--text-xs); }

/* ── MLOC-5: Work Location — inline capability note + informational
   (non-error) bulk-import notes list ────────────────────────────────────── */

/* "Not available for this country yet" — architecture §4 capability-honesty
   note. Reuses the same amber accent already used by .team-dev-notice for
   an "attention, not blocking" tone, kept visually distinct from
   .team-field-err (red, blocking). */
.team-inline-note {
    font-size: var(--text-xs);
    color: #fb923c;
    line-height: 1.4;
    margin: 2px 0 0 0;
}

/* location_notes from a bulk-invite/HRIS-sync response — informational,
   never an error. Deliberately distinct from .team-invalid/.team-row-error
   (red) and .team-valid (green): a soft blue accent, sibling in spirit to
   .team-skip. See MLOC-5.T3 / architecture §6.4. */
.team-location-notes {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.25);
}
.team-location-notes__title {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #60A5FA;
    margin: 0 0 6px 0;
}
.team-location-notes ul {
    margin: 0;
    padding-inline-start: 18px;
    list-style: disc;
}
.team-location-notes li {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Bulk template row ───────────────────────────────────────────────────── */

.team-template-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.team-template-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.team-template-hint code {
    background: var(--surface-elevated);
    border: 1px solid var(--surface-border);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    color: var(--color-gold);
}

/* ── Drop zone ───────────────────────────────────────────────────────────── */

.team-dropzone {
    border: 2px dashed var(--surface-border);
    border-radius: 10px;
    padding: 36px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    position: relative;
    margin-bottom: var(--space-5);
}
.team-dropzone:hover,
.team-dropzone:focus,
.team-dropzone.dragover {
    border-color: var(--color-gold);
    background: rgba(196,154,60,0.04);
    outline: none;
}

.team-dropzone__icon { font-size: 32px; margin-bottom: 10px; }
.team-dropzone__text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.team-dropzone__link {
    color: var(--color-gold);
    text-decoration: underline;
    cursor: pointer;
}
.team-dropzone__hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.team-file-chip {
    margin-top: 12px;
    display: inline-block;
    background: var(--surface-elevated);
    border: 1px solid var(--surface-border);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

/* ── Toast ───────────────────────────────────────────────────────────────── */

.team-toast {
    position: fixed;
    bottom: 28px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: var(--text-sm);
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    animation: team-toast-in 0.2s ease;
    max-width: 380px;
}
@keyframes team-toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.team-toast--success {
    background: rgba(52,211,153,0.12);
    border: 1px solid rgba(52,211,153,0.3);
    color: #34D399;
}
.team-toast--error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: #f87171;
}

/* ══════════════════════════════════════════════════════════════════════════
 * Accept Invite Page
 * ══════════════════════════════════════════════════════════════════════════ */

.ai-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-primary);
}

.ai-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
}

.ai-card {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: var(--space-8);
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.ai-card__icon {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
}

.ai-card__title {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.ai-card__desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.ai-success-box {
    background: rgba(52,211,153,0.06);
    border: 1px solid rgba(52,211,153,0.2);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.ai-success-icon {
    font-size: 28px;
    color: #34D399;
    display: block;
    margin-bottom: 10px;
}

.ai-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 12px;
}

.ai-link, .ai-link-btn {
    color: var(--color-gold);
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    font: inherit;
    padding: 0;
}

.ai-auth-notice {
    background: var(--surface-elevated);
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .team-main { padding: var(--space-4); }
    .team-section { padding: var(--space-4); }
    .team-tabs { overflow-x: auto; }
    .team-tab  { white-space: nowrap; padding: 9px 14px; }
    .team-template-row { flex-direction: column; align-items: flex-start; }
    .team-result-label { min-width: 90px; }
    .team-section-toolbar { flex-direction: column; align-items: flex-start; }
    .team-form-section { max-width: 100%; }
}

@media (max-width: 768px) {
    .team-toast { left: 16px; right: 16px; bottom: 16px; }
    .ai-card    { padding: var(--space-5); }
}

/* ── Edit Member Modal ───────────────────────────────────────────────────── */

.team-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.team-modal {
    background: var(--surface-1, #1a1a2e);
    border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: modalFadeIn 0.18s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.team-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
}

.team-modal__title {
    font-size: var(--text-base, 15px);
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
    margin: 0;
}

.team-modal__body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.team-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px 18px;
    border-top: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
}

/* ── Modal sub-sections ─────────────────────────────────────────────────── */

.team-modal__divider {
    height: 1px;
    background: var(--border-subtle, rgba(255,255,255,0.07));
    margin: 4px 0 12px;
}

.team-modal__section-label {
    font-size: var(--text-xs, 11px);
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.team-modal__section-hint {
    font-size: var(--text-xs, 11px);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted, #64748b);
}

/* ── Tenant checklist inside the edit modal ─────────────────────────────── */

.team-modal__tenant-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 2px;
}

.team-modal__tenant-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted, #64748b);
    font-size: var(--text-sm, 13px);
    padding: 8px 0;
}

.team-modal__tenant-empty {
    color: var(--text-muted, #64748b);
    font-size: var(--text-sm, 13px);
    margin: 4px 0;
}

.team-tenant-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle, rgba(255,255,255,0.07));
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.team-tenant-row:hover { background: var(--surface-hover, rgba(255,255,255,0.04)); }
.team-tenant-row--new  { border-style: dashed; }

.team-tenant-row input[type="checkbox"] {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    accent-color: var(--primary, #00B4A2);
    cursor: pointer;
}

.team-tenant-row__name {
    flex: 1;
    font-size: var(--text-sm, 13px);
    color: var(--text-primary, #e2e8f0);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-tenant-row__status {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
}

.team-tenant-row__status.active   { color: #34D399; background: rgba(52,211,153,0.12); }
.team-tenant-row__status.inactive { color: #94A3B8; background: rgba(148,163,184,0.12); }
.team-tenant-row__status.new      { color: #60A5FA; background: rgba(96,165,250,0.12); }

.team-tenant-row__role {
    font-size: 11px;
    color: var(--text-muted, #64748b);
    text-transform: capitalize;
}

/* Spinner for loading state */
.team-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-subtle, rgba(255,255,255,0.15));
    border-top-color: var(--primary, #00B4A2);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Pending Invitations ─────────────────────────────────────────────────── */

.team-pending-section { margin-top: 8px; }

/* ── UX-GAP-1 Sprint additions ─────────────────────── */
.team-filter-row       { display: flex; gap: 8px; flex-wrap: wrap; }
.team-status--pending  { color: var(--color-gold); }
.team-token-info       { background: var(--surface-elevated); padding: 12px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; color: var(--text-secondary); }
.team-token-field      { margin-bottom: 16px; }
.team-token-label      { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; }
.team-token-value      { font-size: 14px; color: var(--text-primary); }
.team-token-box        { background: var(--surface-border); padding: 12px; border-radius: 6px; border: 1px solid var(--surface-border-mid); font-family: var(--font-mono); font-size: 12px; word-break: break-all; margin-bottom: 8px; }
.team-token-desc       { font-size: 12px; color: var(--text-muted); margin: 0; }
.team-modal-inner      { background: var(--surface-elevated); color: var(--text-primary); border-radius: var(--radius-md); padding: 0; width: 90%; max-width: 580px; max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.team-modal-header     { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--surface-border-mid); }
.team-modal-title      { font-weight: 700; font-size: 15px; color: var(--text-primary); }
.team-modal-body       { padding: 20px; }
.team-modal-footer     { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--surface-border-mid); }
.team-dept-header      { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.team-dept-code-badge  { display: inline-block; background: var(--surface-border); color: var(--color-gold); border: 1px solid var(--surface-border-mid); padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; font-family: var(--font-mono); letter-spacing: 0.06em; }
.team-dept-actions     { display: flex; gap: 6px; }
.team-desc-cell        { font-size: 12px; color: var(--text-muted); }
.team-bulk-divider     { border-top: 1px solid var(--surface-border); margin: 20px 0 16px; }
.team-assign-toolbar   { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.team-assign-btns      { display: flex; gap: 8px; align-items: center; }
.team-select-label     { font-size: 11px; color: var(--text-muted); cursor: pointer; }
.team-group-boxes      { gap: 8px; }
.team-assign-footer    { margin-top: 16px; display: flex; gap: 12px; justify-content: flex-end; }
.team-check-label      { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 12px; }

/* TPAG: Paginator strip */
.team-pager {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0 4px;
    font-size: 13px;
    color: var(--text-secondary);
}
.team-pager-info { flex: 1; text-align: center; white-space: nowrap; }
.team-pager-size-label { font-size: 12px; color: var(--text-muted); }
.team-pager-size-select { width: auto; min-width: 70px; }
.team-search-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}
.team-search-input {
    padding: 4px 8px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--surface-border-mid);
    border-radius: var(--radius-sm, 4px);
    color: var(--text-primary);
    min-width: 160px;
}
.team-search-input:focus {
    outline: none;
    border-color: var(--color-gold);
}

/* MR-5: Team page mobile fixes */
@media (max-width: 768px) {
    /* Prevent iOS auto-zoom — role select font must be ≥16px */
    .team-role-select {
        font-size: 16px;
        min-height: 44px;
    }
    /* Prevent iOS auto-zoom — form inputs (incident report, dept form, etc.) */
    .team-input {
        font-size: 16px;
    }
    /* Data table horizontal scroll — contains off-screen role-selects at ~1410px */
    .team-member-table,
    .team-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
    }
    /* MR-5: P8 minimum readable font — team table labels, badges, status text at 10-11px */
    .team-table th,
    .team-role-badge,
    .team-status,
    .team-you-badge,
    .team-email,
    .team-date,
    .team-token-code--sm,
    .team-dept-code-badge,
    .team-select-label {
        font-size: 12px;
    }
}
