/* ============================================================
   TTX layout — theme-agnostic chrome
   Loaded before the active theme palette. Uses semantic tokens
   so every theme (light or dark) shares one facilitator-desk IA.
   No neon glow, no scanlines, no military HUD chrome.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Explicitly no scanline / HUD overlay */
body::after { display: none !important; content: none !important; }

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-2); }

/* ── LAYOUT ────────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ── SIDEBAR (slim enterprise rail) ────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--color-sidebar);
    border-right: 1px solid var(--color-border);
    position: fixed; top: 0; bottom: 0; left: 0;
    display: flex; flex-direction: column;
    z-index: 100;
    transition: transform 0.28s var(--ease-out);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px 16px;
    border-bottom: 1px solid var(--color-border);
}

.brand-mark {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--color-brand);
    color: var(--color-text-on-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-1);
}
.brand-mark i { font-size: 15px; }

.brand-copy { min-width: 0; }
.sidebar-brand h1 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
    line-height: 1.2;
    text-transform: none;
}
.sidebar-brand .tagline {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 2px;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-section { margin-bottom: 10px; }

.nav-section-label {
    font-size: 11px;
    font-weight: 650;
    color: var(--color-text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 10px 6px;
}

button.nav-section-label {
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    background: transparent;
    background-image: none;
    border: 0 none transparent;
    box-shadow: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    min-height: 36px;
    border-radius: var(--radius-md);
}
button.nav-section-label:hover {
    color: var(--color-text);
    background: var(--color-surface-sunken);
}
.nav-section-body { display: block; }

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    min-height: 38px;
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-weight: 550;
    font-size: 13.5px;
    margin: 2px 0;
    border-left: none;
}
.nav-item:hover {
    background: var(--color-surface-sunken);
    color: var(--color-text);
}
.nav-item.active {
    background: var(--color-nav-active);
    color: var(--color-accent);
    font-weight: 650;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; }
.nav-item.nav-item-child {
    padding-left: 28px;
    font-size: 13px;
}

.nav-badge {
    margin-left: auto;
    background: var(--color-status-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
}

.sidebar-footer {
    padding: 12px 10px 14px;
    border-top: 1px solid var(--color-border);
}

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.desk-switcher {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: var(--radius-md);
    background: var(--color-surface-sunken);
    border: 1px solid var(--color-border);
}
.desk-switcher-label {
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 4px;
    font-weight: 650;
}
.desk-switcher-row { display: flex; gap: 6px; align-items: center; }
.desk-switcher-select {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background: var(--color-surface-card);
    color: var(--color-text);
}
.desk-switcher-compact {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.desk-switcher-compact .desk-switcher-select {
    max-width: 200px;
    font-size: 12px;
}

.user-card {
    display: flex; align-items: center; gap: 10px;
    padding: 8px;
    border-radius: var(--radius-md);
    background: var(--color-surface-sunken);
}

.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--color-brand);
    color: var(--color-text-on-accent);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 12px; font-weight: 700;
}

.user-info { flex: 1; min-width: 0; }
.user-name { font-weight: 650; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--color-text-muted); text-transform: capitalize; }

.sidebar-credit {
    text-align: center;
    padding: 8px 4px 2px;
    font-size: 10px;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}
.sidebar-credit a { color: inherit; }
.app-version-line {
    margin: 4px 0 0;
    font-size: 10px;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
    text-align: center;
}

/* ── MAIN ──────────────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex; flex-direction: column;
    min-height: 100vh;
    background: var(--color-surface);
}

/* ── HEADER ────────────────────────────────────────────────── */
.top-header {
    height: var(--header-height);
    background: var(--color-surface-raised);
    border-bottom: 1px solid var(--color-border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 50;
}
.header-left { display: flex; align-items: center; gap: 14px; }
.breadcrumb { font-size: 13px; color: var(--color-text-muted); }
.breadcrumb a { color: var(--color-text-secondary); }
.breadcrumb span { color: var(--color-text); font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 10px; }

.header-search { position: relative; }
.header-search input {
    background: var(--color-surface-sunken);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 8px 14px 8px 36px;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 13px;
    width: 220px;
}
.header-search input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 16%, transparent);
    width: 280px;
}
.header-search i {
    position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted); font-size: 13px;
}

.header-btn {
    width: var(--hit); height: var(--hit);
    border-radius: var(--radius-md);
    background: var(--color-surface-sunken);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    position: relative;
}
.header-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-surface-card);
}
.header-btn .badge {
    position: absolute; top: -3px; right: -3px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--color-status-danger);
    color: #fff;
    border-radius: 999px;
    font-size: 9px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.header-btn .badge[hidden],
.nav-badge[hidden],
[data-inbox-badge][hidden],
.header-btn .badge:empty,
.nav-badge:empty,
[data-inbox-badge]:empty {
    display: none !important;
}

/* ── PAGE ──────────────────────────────────────────────────── */
.page-content { flex: 1; padding: 28px 28px 40px; }

.page-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.page-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    text-transform: none;
    color: var(--color-text);
}
.page-lede {
    margin-top: 6px;
    font-size: 14px;
    color: var(--color-text-secondary);
    max-width: 640px;
}

.desk-greeting { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.desk-sub { font-size: 15px; color: var(--color-text-secondary); margin-top: 4px; }

/* ── CARDS ─────────────────────────────────────────────────── */
.card {
    background: var(--color-surface-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-1);
}
.card:hover { box-shadow: var(--shadow-2); }
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    background: transparent;
}
.card-header h3 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--color-text);
}
.card-body { padding: 18px 20px; }

/* ── GRID ──────────────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── STATS ─────────────────────────────────────────────────── */
.stat-card {
    background: var(--color-surface-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}
.stat-card::before { display: none; }
.stat-label {
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 650;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}
.stat-value {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-text);
    text-shadow: none;
}
.stat-detail { font-size: 12px; color: var(--color-text-secondary); margin-top: 4px; }

.desk-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.desk-stat-cell {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px 12px 10px;
    background: var(--color-surface);
}
.desk-stat-cell i {
    color: var(--color-accent);
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0 16px;
    min-height: var(--hit);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
}
.btn-primary {
    background: var(--color-accent);
    color: var(--color-text-on-accent);
    border-color: var(--color-accent);
}
.btn-primary:hover {
    filter: brightness(1.05);
    box-shadow: var(--shadow-1);
    color: var(--color-text-on-accent);
}
.btn-secondary {
    background: var(--color-surface-card);
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-danger {
    background: transparent;
    color: var(--color-status-danger);
    border-color: color-mix(in srgb, var(--color-status-danger) 40%, var(--color-border));
}
.btn-danger:hover { background: color-mix(in srgb, var(--color-status-danger) 10%, transparent); }
.btn-sm { padding: 0 12px; font-size: 13px; min-height: 32px; }
.btn-lg { padding: 0 22px; font-size: 16px; }

/* ── FORMS ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 650;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 14px;
}
.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 16%, transparent);
}
select.form-control { cursor: pointer; }
textarea.form-control { min-height: 100px; resize: vertical; }

/* ── TABLES ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: transparent; }
th {
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 650;
    color: var(--color-text-muted);
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
}
td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}
tr:hover td { background: var(--color-surface-hover); }

/* ── BADGES ────────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}
.badge-green  { background: color-mix(in srgb, var(--color-status-ok) 14%, transparent); color: var(--color-status-ok); }
.badge-cyan   { background: color-mix(in srgb, var(--color-status-info) 14%, transparent); color: var(--color-status-info); }
.badge-blue   { background: color-mix(in srgb, var(--color-accent-3) 14%, transparent); color: var(--color-accent-3); }
.badge-purple { background: color-mix(in srgb, var(--accent-purple) 14%, transparent); color: var(--accent-purple); }
.badge-red    { background: color-mix(in srgb, var(--color-status-danger) 14%, transparent); color: var(--color-status-danger); }
.badge-orange { background: color-mix(in srgb, var(--accent-orange) 14%, transparent); color: var(--accent-orange); }
.badge-yellow { background: color-mix(in srgb, var(--color-status-warn) 16%, transparent); color: var(--color-status-warn); }

.tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--color-surface-sunken);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 11px;
    color: var(--color-text-secondary);
    margin: 2px;
}

/* ── ALERTS ────────────────────────────────────────────────── */
.flash-messages { padding: 0 28px; }
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    font-size: 14px;
    display: flex; align-items: center; gap: 10px;
    border: 1px solid var(--color-border);
}
.alert-success { background: color-mix(in srgb, var(--color-status-ok) 10%, transparent); border-color: color-mix(in srgb, var(--color-status-ok) 28%, var(--color-border)); color: var(--color-status-ok); }
.alert-error   { background: color-mix(in srgb, var(--color-status-danger) 10%, transparent); border-color: color-mix(in srgb, var(--color-status-danger) 28%, var(--color-border)); color: var(--color-status-danger); }
.alert-warning { background: color-mix(in srgb, var(--color-status-warn) 12%, transparent); border-color: color-mix(in srgb, var(--color-status-warn) 30%, var(--color-border)); color: var(--color-status-warn); }
.alert-info    { background: color-mix(in srgb, var(--color-status-info) 10%, transparent); border-color: color-mix(in srgb, var(--color-status-info) 28%, var(--color-border)); color: var(--color-status-info); }

.severity-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.severity-info     { background: var(--color-status-info); }
.severity-low      { background: var(--color-status-ok); }
.severity-medium   { background: var(--color-status-warn); }
.severity-high     { background: var(--accent-orange); }
.severity-critical { background: var(--color-status-danger); }

.progress-bar { height: 6px; background: var(--color-surface-sunken); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--color-accent); }

.diff-beginner     { color: var(--color-status-ok); }
.diff-intermediate { color: var(--color-status-info); }
.diff-advanced     { color: var(--accent-orange); }
.diff-expert       { color: var(--color-status-danger); }

.empty-state { text-align: center; padding: 48px 20px; color: var(--color-text-muted); }
.empty-state i { font-size: 40px; margin-bottom: 12px; opacity: 0.28; display: block; }
.empty-state h3 { font-size: 16px; margin-bottom: 6px; color: var(--color-text); font-weight: 650; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--color-border); margin-bottom: 20px; }
.tab {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 650;
    color: var(--color-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    text-transform: none;
    letter-spacing: 0;
}
.tab:hover { color: var(--color-text-secondary); }
.tab.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }

/* ── DESK / ROLE CHIPS / LISTS ─────────────────────────────── */
.desk-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.desk-active {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.desk-active-meta {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-size: 13px; color: var(--color-text-muted);
}
.desk-active p { color: var(--color-text-secondary); font-size: 14px; line-height: 1.55; }
.desk-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

.desk-actions-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.desk-action-card { padding: 18px 20px; }
.desk-action-card h3 { font-size: 15px; margin-bottom: 6px; }
.desk-action-card p { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 14px; }

.role-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.role-chip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 180px;
    flex: 1 1 180px;
    max-width: 280px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface-card);
    color: inherit;
    text-decoration: none;
}
.role-chip:hover { border-color: var(--color-accent); box-shadow: var(--shadow-1); color: inherit; }
.role-chip-icon,
.role-chip .role-chip-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 0;
    background: var(--role-tint, color-mix(in srgb, var(--color-accent) 14%, transparent));
    color: var(--role-ink, var(--color-accent));
}
.role-chip-icon i {
    display: block;
    line-height: 1;
    width: 1em;
    text-align: center;
}
.role-chip strong { display: block; font-size: 13px; }
.role-chip > div span { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

.date-block {
    width: 48px; min-height: 48px;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--color-accent) 12%, var(--color-surface));
    color: var(--color-accent);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex-shrink: 0;
    line-height: 1.1;
}
.date-block .mo { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.date-block .dy { font-size: 16px; font-weight: 750; }

.feed-row, .list-row {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--color-border);
    color: inherit;
    text-decoration: none;
}
.feed-row:last-child, .list-row:last-child { border-bottom: none; }
.feed-row:hover, .list-row:hover { background: var(--color-surface-hover); color: inherit; }

/* ── AUTH (login / register) ───────────────────────────────── */
.auth-shell {
    /* Login hero knobs — override per breakpoint or in a theme sheet. */
    --login-hero-max: 100%;
    --login-hero-min-h: 48vh;
    --login-hero-max-h: 68vh;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    background: var(--color-surface);
}
.auth-visual {
    position: relative;
    display: grid;
    grid-template-rows: minmax(var(--login-hero-min-h), 1fr) auto;
    align-items: stretch;
    justify-items: center;
    gap: clamp(10px, 1.6vh, 20px);
    padding: clamp(16px, 2.4vw, 36px);
    overflow: hidden;
    height: 100%;
    min-height: 0;
    background:
        radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--color-accent) 14%, transparent), transparent 48%),
        var(--color-brand-wash, var(--color-surface-raised));
    border-right: 1px solid var(--color-border);
}
.auth-visual-media {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    justify-self: stretch;
    width: 100%;
    min-height: 0;
    min-width: 0;
}
.auth-visual-video {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    height: var(--login-hero-max-h);
    max-width: var(--login-hero-max);
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2);
    background: var(--color-surface-card);
}
.auth-visual-copy {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(36rem, var(--login-hero-max));
}
.auth-card-logo {
    display: block;
    max-width: 280px;
    max-height: 72px;
    width: auto;
    height: auto;
    margin: 0 auto 16px;
}
.auth-visual h1 {
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -0.03em;
    font-weight: 750;
    max-width: min(36rem, var(--login-hero-max));
}
.auth-visual p {
    margin-top: 12px;
    font-size: 16px;
    color: var(--color-text-secondary);
    max-width: min(34rem, var(--login-hero-max));
}
.auth-form-pane {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    overflow: auto;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--color-surface-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-2);
}
.auth-card h2 { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 6px; }
.auth-card .lede { font-size: 14px; color: var(--color-text-secondary); margin-bottom: 22px; }

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-surface); }
::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

@keyframes slideDown {
    from { transform: translateY(-8px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.mobile-toggle,
.header-btn.mobile-toggle { display: none; }

@media (max-width: 1100px) {
    .desk-hero, .desk-actions-row { grid-template-columns: 1fr; }
    .desk-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1440px) {
    .auth-shell {
        --login-hero-min-h: 56vh;
        --login-hero-max-h: 74vh;
        --login-hero-max: 100%;
    }
}
@media (max-width: 1280px) {
    .auth-shell {
        --login-hero-min-h: 44vh;
        --login-hero-max-h: 62vh;
    }
}
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .auth-shell {
        grid-template-columns: 1fr;
        height: auto;
        --login-hero-min-h: 280px;
        --login-hero-max-h: 48vh;
        --login-hero-max: 90%;
    }
    .auth-visual {
        min-height: 0;
        height: auto;
        grid-template-rows: minmax(var(--login-hero-min-h), var(--login-hero-max-h)) auto;
        padding: 16px 16px 10px;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        gap: 10px;
    }
    .auth-visual-copy { text-align: center; margin-inline: auto; }
    .auth-visual h1, .auth-visual p { margin-inline: auto; }
}
@media (max-width: 640px) {
    .auth-shell {
        --login-hero-min-h: 200px;
        --login-hero-max-h: 40vh;
        --login-hero-max: 92%;
    }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-toggle,
    .header-btn.mobile-toggle { display: flex; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .page-content { padding: 20px 16px 32px; }
}
