/* ===== Atlas design tokens ===== */
:root {
    --navy-900: #0f1d33;
    --navy-800: #142744;
    --navy-700: #1c3358;
    --navy-text: #c9d4e5;
    --primary: #1f5fd6;
    --primary-600: #1a51b8;
    --primary-50: #eaf1fd;
    --bg: #f4f6fa;
    --surface: #ffffff;
    --border: #e2e7ef;
    --border-strong: #cfd7e3;
    --text: #172033;
    --text-2: #4a5568;
    --muted: #6b778c;
    --success: #1f9d63;
    --success-50: #e7f6ee;
    --warning: #d98a0b;
    --warning-50: #fdf3e1;
    --danger: #d93a3f;
    --danger-50: #fdeced;
    --info: #3b7ddd;
    --info-50: #e8f0fc;
    --neutral-50: #eef1f5;
    --radius: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-lg: 0 8px 24px rgba(16, 24, 40, .12);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 24px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 8px; }
.e-control, .e-css, .e-grid, .e-grid .e-headercell, .e-grid .e-rowcell { font-family: var(--font) !important; }

/* ===== Utilities ===== */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.upper { text-transform: uppercase; letter-spacing: .04em; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.min0 { min-width: 0; }
.nowrap { white-space: nowrap; }
.wrap { white-space: normal; }
.pre { white-space: pre-wrap; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.text-danger { color: var(--danger) !important; }
.num { text-align: right; }
.loading { padding: 32px; color: var(--muted); }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.req { color: var(--danger); }
.icon { flex-shrink: 0; vertical-align: middle; }

/* ===== Shell ===== */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 232px; flex-shrink: 0;
    background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
    color: var(--navy-text);
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column;
    z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 22px; font-weight: 700; padding: 20px 22px 18px; }
.brand:hover { text-decoration: none; }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 12px; border-radius: 6px;
    color: var(--navy-text); font-size: 14px; font-weight: 500;
    background: none; border: 0; cursor: pointer; text-align: left; width: 100%;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-divider { height: 1px; background: rgba(255,255,255,.08); margin: 10px 4px; }
.nav-caret { margin-left: auto; }
.nav-sub { display: flex; flex-direction: column; gap: 1px; padding-left: 30px; }
.nav-sub .nav-item { padding: 7px 12px; font-size: 13px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 60px; background: var(--surface); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 16px; padding: 0 28px;
    position: sticky; top: 0; z-index: 20;
}
.search {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
    padding: 0 12px; height: 36px; width: min(420px, 100%); color: var(--muted);
}
.search input { border: 0; background: transparent; outline: none; flex: 1; font: inherit; color: var(--text); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-menu { position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.user-menu:hover { background: var(--bg); }
.user-name { font-weight: 500; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--navy-700); color: #fff; font-size: 12px; font-weight: 600;
    display: inline-grid; place-items: center; flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.menu {
    position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 6px; z-index: 50;
}
.menu-backdrop { position: fixed; inset: 0; z-index: 40; background: transparent; }
.menu-header { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu-header span { color: var(--muted); font-size: 12px; }
.menu-item {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 8px 10px; border-radius: 5px; color: var(--text);
    background: none; border: 0; font: inherit; cursor: pointer; text-align: left;
}
.menu-item:hover { background: var(--bg); text-decoration: none; }
.menu form { margin: 0; }
.content { padding: 24px 28px 48px; width: 100%; min-width: 0; }
.topbar .nav-toggle, .scrim { display: none; }

/* ===== Page header ===== */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.subtitle { color: var(--muted); margin-top: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.breadcrumb span { margin: 0 6px; }
.header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.code-chip {
    display: inline-block; vertical-align: middle; margin-left: 8px;
    font-size: 12px; font-weight: 600; color: var(--text-2);
    background: var(--neutral-50); border: 1px solid var(--border); border-radius: 5px; padding: 2px 8px;
}
.project-header { align-items: flex-start; }
.project-header .subtitle { max-width: none; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 14px; border-radius: 6px;
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
    font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--bg); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #bf2f34; }
.btn-danger-outline { color: var(--danger); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }
.w-100 { width: 100%; }
.icon-btn {
    display: inline-grid; place-items: center; width: 32px; height: 32px;
    border-radius: 6px; border: 1px solid transparent; background: none; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--bg); border-color: var(--border); text-decoration: none; }
.icon-btn.danger:hover { color: var(--danger); }
.link-btn { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font: inherit; }
.link-btn:hover { text-decoration: underline; }
.dropdown { position: relative; }
.menu.right { right: 0; left: auto; }

/* ===== Cards ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.card.no-pad { padding: 0; }
.card-title { font-size: 15px; margin-bottom: 14px; }
.card-title .count { color: var(--muted); font-weight: 500; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.card-head .card-title { margin: 0; }
.form-card { width: 100%; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.panel { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); }
.panel h3 { font-size: 14px; margin-bottom: 10px; }

/* ===== KPI ===== */
.kpis { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px 12px; color: var(--text); box-shadow: var(--shadow); min-width: 0;
    transition: border-color .12s, box-shadow .12s;
}
.kpi:hover { text-decoration: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.kpi-body { display: flex; flex-direction: column; }
.kpi-body strong { font-size: 24px; line-height: 1.1; font-weight: 700; }
.kpi-body { min-width: 0; }
.kpi-body span { color: var(--text-2); font-size: 12px; line-height: 1.25; }
.tone-fg-primary { color: var(--primary); }
.tone-fg-success { color: var(--success); }
.tone-fg-warning { color: var(--warning); }
.tone-fg-danger { color: var(--danger); }
.tone-fg-info { color: var(--info); }

/* ===== Dashboard ===== */
.dash-grid { display: grid; grid-template-columns: 1.05fr 1fr 1.25fr; gap: 16px; }
.health-chart { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut-wrap { position: relative; width: 190px; height: 190px; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center strong { font-size: 30px; line-height: 1; }
.donut-center span { color: var(--muted); font-size: 12px; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 160px; }
.legend a { display: flex; align-items: center; gap: 8px; color: var(--text); }
.legend a:hover { text-decoration: none; color: var(--primary); }
.legend-label { flex: 1; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.hbars { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.hbar-row { display: grid; grid-template-columns: 80px 1fr 36px; align-items: center; gap: 10px; color: var(--text-2); }
.hbar-row:hover { text-decoration: none; color: var(--primary); }
.hbar-track { height: 18px; background: var(--neutral-50); border-radius: 3px; overflow: hidden; }
.hbar { display: block; height: 100%; border-radius: 3px; min-width: 2px; }
.hbar-value { text-align: right; color: var(--text); }
.lifecycle-bg-Proposed { background: #b7c1d0; }
.lifecycle-bg-Planned { background: #7eb0f5; }
.lifecycle-bg-Active { background: var(--primary); }
.lifecycle-bg-Complete { background: var(--success); }
.lifecycle-bg-Cancelled { background: #9aa4b2; }

.attention { list-style: none; margin: 0; padding: 0; }
.attention li + li { border-top: 1px solid var(--border); }
.attention a { display: flex; align-items: center; gap: 12px; padding: 10px 2px; color: var(--text); }
.attention a:hover { text-decoration: none; background: var(--bg); }
.att-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.att-icon.sev-Critical { background: var(--danger-50); color: var(--danger); }
.att-icon.sev-Warning { background: var(--warning-50); color: var(--warning); }
.att-icon.sev-Info { background: var(--info-50); color: var(--info); }
.att-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.att-body strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-body span { font-size: 12.5px; }
.sev-text-Critical { color: var(--danger); }
.sev-text-Warning { color: #b06f00; }
.sev-text-Info { color: var(--muted); }

/* ===== Badges ===== */
.badge {
    display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
    border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.health-OnTrack { background: var(--success-50); color: #137a4b; }
.health-AtRisk { background: var(--warning-50); color: #a96700; }
.health-Blocked { background: var(--danger-50); color: #c02a2f; }
.health-Waiting { background: var(--info-50); color: #2a64bd; }
.health-Completed { background: var(--neutral-50); color: var(--text-2); }
.lifecycle-Proposed { background: var(--neutral-50); color: var(--text-2); }
.lifecycle-Planned { background: #eef3ff; color: #3d5fa8; }
.lifecycle-Active { background: var(--primary-50); color: var(--primary); }
.lifecycle-Complete { background: var(--success-50); color: #137a4b; }
.lifecycle-Cancelled { background: var(--neutral-50); color: var(--muted); text-decoration: line-through; }
.tone-danger { background: var(--danger-50); color: #c02a2f; }
.tone-warning { background: var(--warning-50); color: #a96700; }
.tone-info { background: var(--info-50); color: #2a64bd; }
.tone-neutral { background: var(--neutral-50); color: var(--text-2); }

.party { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.party-icon { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; }
.party-User { background: var(--neutral-50); color: var(--text-2); }
.party-Team { background: var(--primary-50); color: var(--primary); }
.party-External { background: #f3ecfd; color: #7a46c9; }
.dd-party { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-50); color: var(--primary); border-radius: 999px; padding: 2px 4px 2px 10px; font-weight: 500; }
.chip-x { border: 0; background: none; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--primary-50); color: var(--primary); border-radius: 4px; padding: 2px 9px; font-size: 12px; font-weight: 500; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
    text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2);
    background: #f8fafc; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table.compact td, .table.compact th { padding: 7px 10px; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #f8fafc; }
.table tr.sub-row td { background: #fafbfd; font-size: 13px; }
.row-muted td { color: var(--muted); }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > * { margin-left: 4px; }
.cell-title { font-weight: 600; color: var(--text); }
a.cell-title:hover { color: var(--primary); }
.days { display: inline-block; min-width: 30px; text-align: center; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.days-warn { background: var(--warning-50); color: #a96700; }
.days-bad { background: var(--danger-50); color: var(--danger); }
.file-cell { display: flex; gap: 10px; align-items: flex-start; }

/* ===== Tabs ===== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tab {
    background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
    padding: 13px 12px; font: inherit; font-weight: 500; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-body { padding: 18px 20px; }

/* ===== Project detail ===== */
.strip {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 16px; box-shadow: var(--shadow);
}
.strip-item { padding: 12px 16px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; min-width: 0; }
.strip-item + .strip-item { border-left: 1px solid var(--border); }
.strip-item label { font-size: 12px; color: var(--muted); }
.strip-item.clickable { cursor: pointer; }
.strip-item.clickable:hover { background: var(--bg); }
.strip-ball { background: #f7faff; }
.overview { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.next-action { display: flex; gap: 14px; align-items: flex-start; }
.na-icon { width: 44px; height: 44px; border-radius: 8px; background: var(--warning-50); color: var(--warning); display: grid; place-items: center; flex-shrink: 0; }
.next-action > div > strong { font-size: 15px; display: block; margin-bottom: 2px; }
.health-steps { display: flex; justify-content: space-between; position: relative; padding: 4px 6px 0; }
.health-steps::before { content: ""; position: absolute; left: 20px; right: 20px; top: 11px; height: 2px; background: var(--border); }
.hstep { display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; z-index: 1; min-width: 60px; }
.hdot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--border); }
.hlabel { font-size: 12px; font-weight: 600; }
.health-dot-OnTrack { background: var(--success); } .health-text-OnTrack { color: var(--success); }
.health-dot-AtRisk { background: var(--warning); } .health-text-AtRisk { color: var(--warning); }
.health-dot-Blocked { background: var(--danger); } .health-text-Blocked { color: var(--danger); }
.health-dot-Waiting { background: var(--info); } .health-text-Waiting { color: var(--info); }
.health-dot-Completed { background: var(--muted); } .health-text-Completed { color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.kv dd { margin: 0; text-align: right; font-weight: 500; }
.health-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.health-choice { border: 2px solid transparent; border-radius: 6px; background: none; padding: 3px; cursor: pointer; }
.health-choice.selected { border-color: var(--primary); }

.acct-timeline { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.acct-row { display: grid; grid-template-columns: minmax(110px, 160px) 1fr 90px; align-items: center; gap: 10px; }
.acct-name { overflow: hidden; }
.acct-bar-wrap { height: 14px; }
.acct-bar { height: 100%; border-radius: 3px; }
.party-bg-User { background: #8fa3bf; }
.party-bg-Team { background: var(--primary); }
.party-bg-External { background: #9b6ae0; }
.acct-days { font-size: 12px; color: var(--text-2); text-align: right; white-space: nowrap; }

.updates { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.updates li { display: flex; gap: 10px; }
.update-body { flex: 1; min-width: 0; }
.update-meta { margin-bottom: 2px; }
.update-changes { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
.composer-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }

.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.activity li:last-child { border-bottom: 0; }
.act-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; background: var(--border-strong); }
.act-BallTransferred { background: var(--primary); }
.act-HealthChanged { background: var(--warning); }
.act-Created, .act-LifecycleChanged { background: var(--success); }
.act-FileUploaded, .act-FileVersionAdded { background: #9b6ae0; }
.act-FileDeleted, .act-Archived { background: var(--danger); }

/* ===== Files ===== */
.upload-row { display: grid; grid-template-columns: 1fr 320px; gap: 16px; margin-bottom: 16px; }
.dropzone {
    position: relative; border: 2px dashed var(--border-strong); border-radius: var(--radius);
    padding: 22px; text-align: center; color: var(--text-2); background: #fafbfd;
    display: flex; flex-direction: column; align-items: center; gap: 4px; transition: all .12s;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-meta { display: flex; flex-direction: column; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ===== Forms ===== */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.field label { font-size: 13px; font-weight: 500; color: var(--text); }
.field-error, .validation-message { color: var(--danger); font-size: 12px; }
.hint { color: var(--muted); font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
.input, .form-control {
    height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 6px;
    font: inherit; color: var(--text); background: #fff; width: 100%;
}
textarea.input { height: auto; padding: 8px 12px; }
.input:focus, .form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 18px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; margin-bottom: 14px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--border); }
.inline-form .e-input-group { flex: 1 1 140px; }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }

/* Template identity pages (bootstrap-like classes) */
.form-floating { display: flex; flex-direction: column-reverse; gap: 5px; margin-bottom: 14px; }
.form-floating label { font-size: 13px; font-weight: 500; }
.mb-3 { margin-bottom: 14px; }
.text-danger, .alert-danger { color: var(--danger); }
.alert-success { background: var(--success-50); color: #137a4b; padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.alert-error, .alert-danger { background: var(--danger-50); color: #c02a2f; padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.btn-lg { height: 42px; }
.row { display: block; }

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-state.compact { padding: 22px 12px; }
.empty-state strong, .empty-state h2 { color: var(--text); font-size: 15px; }
.empty-state p { color: var(--muted); max-width: 420px; }

/* ===== Dialogs (Syncfusion overrides) ===== */
.atlas-dialog .e-dlg-header-content { border-bottom: 1px solid var(--border); padding: 16px 20px !important; }
.atlas-dialog .e-dlg-header { font-family: var(--font); font-weight: 600; font-size: 17px; }
.atlas-dialog .e-dlg-content { padding: 18px 20px !important; font-family: var(--font); }
.atlas-dialog .e-footer-content { border-top: 1px solid var(--border); padding: 12px 20px !important; display: flex; justify-content: flex-end; gap: 8px; }
.dialog-title { display: inline-flex; align-items: center; gap: 10px; }
.atlas-grid.e-grid { border: 0; }
.atlas-grid .e-gridheader { border-top: 0; }
.atlas-grid .e-row { cursor: pointer; }

/* ===== Roadmap ===== */
.roadmap { overflow-x: auto; }
.rm-head, .rm-row, .rm-foot { display: grid; grid-template-columns: 260px 100px minmax(560px, 1fr); align-items: center; }
.rm-head { background: #f8fafc; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-2); }
.rm-head .rm-label { padding: 10px 16px; }
.rm-row { border-bottom: 1px solid var(--border); color: var(--text); min-height: 46px; }
.rm-row:hover { background: #f8fafc; text-decoration: none; }
.rm-label { padding: 8px 16px; display: flex; flex-direction: column; min-width: 0; }
.rm-label .cell-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-track { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); height: 100%; min-height: 36px; }
.rm-quarter { padding: 10px 12px; border-left: 1px solid var(--border); }
.rm-cell { border-left: 1px solid var(--border); }
.rm-bar { position: absolute; top: 50%; height: 14px; margin-top: -7px; border-radius: 4px; }
.health-bar-OnTrack { background: #5b93ee; }
.health-bar-AtRisk { background: #f0b041; }
.health-bar-Blocked { background: #e5686c; }
.health-bar-Waiting { background: #9cbcf4; }
.health-bar-Completed { background: #9fd3b6; }
.rm-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); margin-left: -1px; }
.rm-foot .rm-track { min-height: 30px; }
.rm-today-label { position: absolute; top: 4px; transform: translateX(-50%); background: var(--danger); color: #fff; font-size: 11px; font-weight: 600; border-radius: 4px; padding: 2px 8px; }

/* ===== Reports ===== */
.reports-layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.report-nav { display: flex; flex-direction: column; overflow: hidden; }
.report-link { text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 12px 16px; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px; }
.report-link:last-child { border-bottom: 0; }
.report-link span { color: var(--muted); font-size: 12px; }
.report-link:hover { background: var(--bg); }
.report-link.active { background: var(--primary-50); box-shadow: inset 3px 0 0 var(--primary); }
.report-link.active strong { color: var(--primary); }
.report-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.method { color: var(--text-2); font-size: 12.5px; background: #f8fafc; border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; margin-bottom: 14px; }

/* ===== Court (ball in your court) ===== */
.clock-fg-OnTime { color: var(--success); }
.clock-fg-DueSoon { color: var(--warning); }
.clock-fg-Overdue { color: var(--danger); }
.clock-fg-warn { color: #b06f00; }
.clock-bg-OnTime { background: var(--success); }
.clock-bg-DueSoon { background: #f0b041; }
.clock-bg-Overdue { background: var(--danger); }

.ballclock {
    display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px;
    font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.clock-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.ballclock.clock-OnTime { background: var(--success-50); color: #137a4b; }
.ballclock.clock-DueSoon { background: var(--warning-50); color: #a96700; }
.ballclock.clock-Overdue { background: var(--danger-50); color: #c02a2f; border-color: #f5c2c4; }
.ack-pending {
    display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; margin-left: 4px;
    font-size: 11px; font-weight: 600; color: #8a5a00; background: #fff4d6; border: 1px dashed #e8b84a; white-space: nowrap;
}
.nudge-count { color: #b06f00; font-weight: 600; font-size: 12px; margin-left: 4px; }

.court-actions { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.btn-gotit { background: var(--success); border-color: var(--success); color: #fff; }
.btn-gotit:hover { background: #188353; }
.btn-nudge-hot { border-color: var(--danger); color: var(--danger); }
.btn-nudge-hot:hover { background: var(--danger-50); }

.subject-icon { width: 24px; height: 24px; border-radius: 6px; display: inline-grid; place-items: center; flex-shrink: 0; }
.subject-Project { background: var(--primary-50); color: var(--primary); }
.subject-ActionItem { background: var(--success-50); color: #137a4b; }
.subject-Milestone { background: #f3ecfd; color: #7a46c9; }
.what { display: flex; gap: 10px; align-items: flex-start; }
.court-table tr.clock-row-Overdue td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.court-table tr.clock-row-DueSoon td:first-child { box-shadow: inset 3px 0 0 #f0b041; }
.table tr.clock-row-Overdue td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.tab-body.no-pad-x { padding: 0; }
.pad { padding: 16px 20px; }

/* Top bar court pill + bell */
.court-pill {
    display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px;
    background: var(--primary-50); color: var(--primary); font-size: 13px; white-space: nowrap; border: 1px solid #cfe0fb;
}
.court-pill:hover { text-decoration: none; background: #dde9fc; }
.court-pill.warn { background: #fff4d6; color: #8a5a00; border-color: #f0d08a; }
.court-pill.hot { background: var(--danger-50); color: #c02a2f; border-color: #f5c2c4; }
.pill-flag { background: currentColor; color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.court-pill .pill-flag { color: inherit; background: rgba(255,255,255,.7); }
.bell-wrap { position: relative; }
.bell { position: relative; width: 38px; height: 38px; }
.bell-count {
    position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
    background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff;
}
.bell-menu { width: 380px; padding: 0; max-height: 70vh; overflow-y: auto; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.bell-foot { display: block; text-align: center; padding: 10px; border-top: 1px solid var(--border); font-size: 13px; }
.notif {
    display: flex; gap: 10px; width: 100%; text-align: left; padding: 10px 14px; border: 0; background: none; cursor: pointer;
    font: inherit; color: var(--text); border-bottom: 1px solid var(--border);
}
.notif:hover { background: var(--bg); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: transparent; }
.notif.unread { background: #f7faff; }
.notif.unread .notif-dot { background: var(--primary); }
.notif.unread .notif-title { font-weight: 600; }
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-list .notif:last-child { border-bottom: 0; }
.notif-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
@media (max-width: 960px) { .notif-layout { grid-template-columns: 1fr; } }
.prefs .pref-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; }
.prefs input { accent-color: var(--primary); width: 16px; height: 16px; }

.nav-badge {
    margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 700;
    background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center;
}
.nav-badge.hot { background: var(--danger); }
.nav-item.active .nav-badge { background: rgba(255,255,255,.25); }

/* My Court summary */
.court-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.court-stat {
    display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; font: inherit; color: var(--text);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
}
.court-stat > span:last-child { display: flex; flex-direction: column; }
.court-stat strong { font-size: 24px; line-height: 1.1; }
.court-stat span span { color: var(--text-2); font-size: 12.5px; }
.court-stat.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.court-stat.hot { border-color: #f5c2c4; background: #fff8f8; }
.court-stat.warn { border-color: #f0d08a; background: #fffbf0; }

/* Court board */
.filter-bar .sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.board-legend { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.board, .status-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.board-col { flex: 1 0 280px; background: #eef1f6; border-radius: var(--radius); padding: 10px; max-height: calc(100vh - 260px); display: flex; flex-direction: column; }
.status-board .board-col { flex: 1 0 280px; }
.board-col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-weight: 600; }
.board-count { background: var(--surface); border-radius: 999px; padding: 0 8px; font-size: 12px; color: var(--text-2); }
.board-late { background: var(--danger); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 11px; font-weight: 700; }
.board-cards { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.ball-card {
    background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--success); border-radius: 6px;
    padding: 10px 12px; cursor: pointer; color: var(--text); display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow);
}
.ball-card:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(16, 24, 40, .1); }
.clock-card-DueSoon { border-left-color: #f0b041; }
.clock-card-Overdue { border-left-color: var(--danger); background: #fffafa; }
.ball-card-top, .ball-card-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ball-card-title { font-weight: 600; line-height: 1.3; }
.ball-card-next { font-size: 12.5px; color: var(--text-2); }
.spacer { flex: 1; }

/* Dashboard court health */
.court-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-top: 16px; }
.court-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--neutral-50); margin: 4px 0 14px; }
.cb-seg { display: block; height: 100%; }
.court-figures { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.court-figures a { display: flex; flex-direction: column; color: var(--text-2); font-size: 12.5px; }
.court-figures a:hover { text-decoration: none; color: var(--primary); }
.court-figures strong { font-size: 22px; color: var(--text); }
.hot-courts { list-style: none; margin: 0; padding: 0; }
.hot-courts li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.hot-courts li:last-child { border-bottom: 0; }

/* Project page court bits */
.strip-ball { gap: 6px !important; }
.strip-ball .court-actions { justify-content: flex-start; }
.clock-strip-Overdue { background: #fff6f6 !important; }
.clock-strip-DueSoon { background: #fffbf0 !important; }
.strip-ball-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.na-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.mini-balls { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mini-balls li { display: flex; align-items: center; gap: 8px; }
.mb-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; color: var(--text); }

.panel-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.add-row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; padding: 12px 14px; background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; }
.add-row .field { margin-bottom: 0; }
.add-row .grow { flex: 1 1 240px; }
.add-holder { flex: 0 1 240px; }
.add-holder .field { margin-bottom: 0; }
.big-check { width: 18px; height: 18px; accent-color: var(--success); cursor: pointer; }
.tag-mini { display: inline-flex; align-items: center; gap: 3px; background: #f3ecfd; color: #7a46c9; border-radius: 4px; padding: 0 6px; margin-right: 6px; font-size: 11px; }
.done-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.done-list li { display: flex; gap: 10px; align-items: center; }
.done-title { text-decoration: line-through; color: var(--muted); }

.milestones { list-style: none; margin: 0; padding: 0 0 0 10px; position: relative; }
.milestones::before { content: ""; position: absolute; left: 16px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.ms { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 14px; align-items: center; padding: 12px 0; position: relative; }
.ms + .ms { border-top: 1px solid var(--border); }
.ms-marker { width: 14px; height: 14px; transform: rotate(45deg); background: #fff; border: 3px solid #9aa4b2; z-index: 1; border-radius: 2px; }
.ms-InProgress .ms-marker { border-color: var(--primary); }
.ms-Complete .ms-marker { border-color: var(--success); background: var(--success); }
.ms-Blocked .ms-marker, .ms-late .ms-marker { border-color: var(--danger); }
.ms-Cancelled { opacity: .55; }
.ms-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ms-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 4px; align-items: center; }
.ms-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ms-ball { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.ms-progress { gap: 6px !important; }
.ms-bar { width: 70px; height: 6px; background: var(--neutral-50); border-radius: 3px; overflow: hidden; display: inline-block; }
.ms-bar span { display: block; height: 100%; background: var(--success); }
.ms-badge-NotStarted { background: var(--neutral-50); color: var(--text-2); }
.ms-badge-InProgress { background: var(--primary-50); color: var(--primary); }
.ms-badge-Complete { background: var(--success-50); color: #137a4b; }
.ms-badge-Blocked { background: var(--danger-50); color: #c02a2f; }
.ms-badge-Cancelled { background: var(--neutral-50); color: var(--muted); }

.deps { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dep-title { margin-bottom: 10px; }
.dep { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; }
.dep-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.dep-open .dep-icon { background: var(--info-50); color: var(--info); }
.dep-blocking .dep-icon { background: var(--warning-50); color: var(--warning); }
.dep-done { opacity: .7; }
.dep-done .dep-icon { background: var(--success-50); color: var(--success); }
.dep-body { flex: 1; min-width: 0; }
.dep-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.dep-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 10px; }

.ball-timeline { margin-bottom: 4px; }
.bt-track { display: flex; height: 30px; border-radius: 6px; overflow: hidden; background: var(--neutral-50); }
.bt-seg { height: 100%; display: flex; align-items: center; padding: 0 6px; color: #fff; font-size: 11.5px; font-weight: 600; overflow: hidden; white-space: nowrap; border-right: 2px solid #fff; }
.bt-seg.current { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px) !important; }
.bt-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.bt-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.bt-legend > span { display: inline-flex; align-items: center; gap: 5px; }

/* Roadmap extras */
.seg-toggle { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden; }
.seg-toggle button { border: 0; background: var(--surface); padding: 0 12px; height: 32px; font: inherit; font-weight: 500; cursor: pointer; color: var(--text-2); }
.seg-toggle button + button { border-left: 1px solid var(--border-strong); }
.seg-toggle button.active { background: var(--primary); color: #fff; }
.rm-ms { position: absolute; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; transform: rotate(45deg); background: #fff; border: 2px solid var(--navy-700); z-index: 2; border-radius: 1px; }
.rm-ms.ms-dot-Complete { background: var(--success); border-color: var(--success); }
.rm-ms.late { border-color: var(--danger); background: var(--danger-50); }

/* Reports extras */
.report-group { padding: 10px 16px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #f8fafc; border-bottom: 1px solid var(--border); }
.share-bars { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.share-row { display: grid; grid-template-columns: 170px 1fr 120px; gap: 10px; align-items: center; font-size: 13px; }
.share-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-track { height: 12px; background: var(--neutral-50); border-radius: 3px; overflow: hidden; }
.share-fill { display: block; height: 100%; border-radius: 3px; }
.share-pct { text-align: right; color: var(--text-2); font-size: 12px; }
.atlas-dialog .e-footer-content .spacer { flex: 1; }

@media (max-width: 1200px) {
    .court-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .court-grid, .deps { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    .court-pill span { display: none; }
    .court-pill .pill-flag { display: inline; }
    .bell-menu { width: min(380px, calc(100vw - 32px)); right: -60px; }
    .ms { grid-template-columns: 14px 1fr; }
    .ms-ball, .ms .row-actions { grid-column: 2; align-items: flex-start; }
}
@media (max-width: 640px) {
    .court-summary { grid-template-columns: 1fr 1fr; }
    .court-figures { grid-template-columns: repeat(3, 1fr); }
    .board-col { flex-basis: 85vw; }
}

/* ===== Auth ===== */
/* Full-bleed photo behind the whole page; brand on the left, card floating on the right. */
.auth-shell {
    display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(10, 22, 48, .35) 0%, rgba(10, 22, 48, .08) 55%, rgba(10, 22, 48, .2) 100%),
        url("mountain.jpg") center 75% / cover no-repeat,
        #1b3157;
}
.auth-hero { display: flex; justify-content: center; align-items: center; padding: 32px 20px 12vh; color: #fff; }
.auth-brand { text-align: center; text-shadow: 0 2px 14px rgba(5, 12, 30, .5); }
.auth-brand svg { filter: drop-shadow(0 2px 10px rgba(5, 12, 30, .4)); }
.auth-title { font-size: 64px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; margin-top: 6px; }
.auth-sub { font-size: 22px; font-weight: 500; opacity: .92; line-height: 1.3; margin-top: 6px; }
.auth-panel { display: flex; align-items: center; justify-content: flex-start; padding: 32px 20px 12vh 4vw; }
.auth-card {
    width: min(400px, 100%); background: var(--surface); border-radius: 10px;
    box-shadow: 0 20px 50px rgba(5, 12, 30, .35); padding: 30px 30px 32px;
}
.auth-card .check input { accent-color: var(--primary); width: 16px; height: 16px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 40px; }
.pw-toggle {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; border: 0; background: none; color: var(--muted);
    display: grid; place-items: center; cursor: pointer; border-radius: 5px;
}
.pw-toggle:hover { color: var(--text); }
.auth-heading { font-size: 24px; margin-bottom: 20px; }
.auth-card h2 { font-size: 15px; font-weight: 500; color: var(--muted); margin-bottom: 14px; }
.auth-card hr { display: none; }
.auth-card .col-md-4, .auth-card .col-lg-6, .auth-card .col-xl-6 { width: 100%; }

#blazor-error-ui {
    background: #fff3cd; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none;
    left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .dash-grid { grid-template-columns: 1fr 1fr; }
    .dash-grid > :last-child { grid-column: 1 / -1; }
    .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .strip-item:nth-child(4) { border-left: 0; }
    .strip-item:nth-child(n+4) { border-top: 1px solid var(--border); }
}
@media (max-width: 960px) {
    .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .18s; box-shadow: var(--shadow-lg); }
    .shell.nav-open .sidebar { transform: none; }
    .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15,29,51,.35); z-index: 25; }
    .topbar .nav-toggle { display: inline-grid; }
    .content { padding: 18px 16px 40px; }
    .topbar { padding: 0 16px; }
    .user-name { display: none; }
    .overview, .reports-layout, .upload-row { grid-template-columns: 1fr; }
    .dash-grid { grid-template-columns: 1fr; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-hero { padding: 40px 20px 8px; }
    .auth-panel { justify-content: center; align-items: flex-start; padding: 16px 16px 40px; }
    .auth-title { font-size: 40px; }
    .auth-sub { font-size: 17px; }
}
@media (max-width: 640px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .strip { grid-template-columns: 1fr 1fr; }
    .strip-item { border-left: 0 !important; border-top: 1px solid var(--border); }
    .header-actions { width: 100%; }
    .kpis { grid-template-columns: 1fr 1fr; }
}
