:root {
    --navy-950:#07111f; --navy-900:#0b1728; --blue-600:#2563eb; --blue-500:#3b82f6;
    --slate-950:#0f172a; --slate-700:#334155; --slate-500:#64748b; --slate-300:#cbd5e1;
    --slate-200:#e2e8f0; --slate-100:#f1f5f9; --slate-50:#f8fafc; --surface:#fff;
    --success:#10b981; --sidebar-width:232px; --topbar-height:60px; --radius:12px;
    --shadow-sm:0 1px 2px rgba(15,23,42,.04); --shadow-md:0 12px 30px rgba(15,23,42,.08);
}
* { box-sizing:border-box; }
html,body { min-height:100%; }
html { font-size:14px; }
body { margin:0; color:var(--slate-700); background:#f4f7fb; font-family:Inter,system-ui,sans-serif; }
button,input,select,textarea { font:inherit; }
.app-shell { min-height:100vh; }
.app-sidebar { position:fixed; inset:0 auto 0 0; z-index:60; width:var(--sidebar-width); display:flex; flex-direction:column; padding:18px 14px; color:#cbd5e1; background:linear-gradient(180deg,var(--navy-950),var(--navy-900)); border-right:1px solid rgba(255,255,255,.06); }
.app-brand { display:flex; align-items:center; gap:11px; padding:2px 8px 24px; color:white; text-decoration:none; }
.app-brand:hover { color:white; }
.app-brand>span:last-child { display:flex; flex-direction:column; line-height:1.1; }
.app-brand strong { font-size:14px; letter-spacing:-.01em; }
.app-brand small { margin-top:4px; color:#71839d; font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.12em; }
.brand-mark { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:linear-gradient(135deg,var(--blue-500),#4f46e5); box-shadow:0 8px 20px rgba(37,99,235,.32); }
.brand-mark svg { width:20px; fill:none; stroke:white; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.app-nav { display:flex; flex-direction:column; gap:4px; }
.nav-label { padding:18px 10px 6px; color:#536780; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.13em; }
.nav-link { display:flex; align-items:center; gap:11px; min-height:40px; padding:9px 11px; border-radius:9px; color:#8fa1b9; font-size:13px; font-weight:500; text-decoration:none; transition:all .16s ease; }
.nav-link svg { width:18px; height:18px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.nav-link:hover { color:#eef6ff; background:rgba(255,255,255,.055); }
.nav-link.active { color:white; background:linear-gradient(90deg,rgba(37,99,235,.28),rgba(37,99,235,.13)); box-shadow:inset 3px 0 var(--blue-500); }
.nav-link-sub { min-height:32px; padding:6px 12px 6px 40px; font-size:12px; }
.sidebar-footer { margin-top:auto; display:flex; align-items:center; gap:8px; padding:13px 9px 2px; border-top:1px solid rgba(255,255,255,.07); color:#71839d; font-size:11px; }
.status-dot { width:7px; height:7px; border-radius:50%; background:var(--success); box-shadow:0 0 0 3px rgba(16,185,129,.12); }
.app-main { min-height:100vh; margin-left:var(--sidebar-width); }
.app-topbar { position:sticky; top:0; z-index:45; height:var(--topbar-height); display:flex; align-items:center; padding:0 24px; background:rgba(255,255,255,.88); border-bottom:1px solid var(--slate-200); backdrop-filter:blur(14px); }
.topbar-title { color:var(--slate-950); font-weight:650; letter-spacing:-.015em; }
.topbar-meta { margin-left:auto; display:flex; align-items:center; gap:18px; color:var(--slate-500); font-size:11px; }
.live-indicator { display:flex; align-items:center; gap:6px; color:#047857; font-weight:600; }
.live-indicator i { width:6px; height:6px; border-radius:50%; background:var(--success); box-shadow:0 0 0 3px rgba(16,185,129,.12); }
.logout-form { margin:0; }
.logout-button { padding:5px 10px; color:var(--slate-600); font:inherit; font-weight:600; background:transparent; border:1px solid var(--slate-300); border-radius:6px; cursor:pointer; }
.logout-button:hover { color:var(--slate-900); background:var(--slate-100); }
.menu-toggle { display:none; width:36px; height:36px; place-items:center; margin-right:10px; padding:0; background:transparent; border:0; color:var(--slate-700); }
.menu-toggle svg { width:21px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.app-content { min-height:calc(100vh - var(--topbar-height)); }
.page-header { padding:24px 28px 0; margin-bottom:16px; }
.page-header h1 { margin:0; color:var(--slate-950); font-size:20px; font-weight:700; letter-spacing:-.025em; }
.page-header p { margin:5px 0 0; color:var(--slate-500); font-size:12px; }
.page-body { padding:16px 28px 28px; }
.surface-card { background:var(--surface); border:1px solid var(--slate-200); border-radius:var(--radius); box-shadow:var(--shadow-sm); }
.btn { border-radius:8px; font-weight:600; }
.btn-primary { border-color:var(--blue-600); background:var(--blue-600); box-shadow:0 1px 2px rgba(37,99,235,.2); }
.form-control,.form-select { border-color:var(--slate-300); border-radius:8px; box-shadow:none; }
.form-control:focus,.form-select:focus { border-color:var(--blue-500); box-shadow:0 0 0 3px rgba(59,130,246,.12); }
.modal-content { border:0; border-radius:14px; box-shadow:0 28px 60px rgba(15,23,42,.22); overflow:hidden; }
.ag-theme-alpine { --ag-font-family:Inter,system-ui,sans-serif; --ag-font-size:12px; --ag-border-color:#e2e8f0; --ag-header-background-color:#f8fafc; --ag-header-foreground-color:#475569; --ag-row-hover-color:#f1f5f9; --ag-selected-row-background-color:#eff6ff; --ag-range-selection-border-color:#2563eb; --ag-wrapper-border-radius:12px; }
.ag-root-wrapper { box-shadow:var(--shadow-sm); }
.nav-scrim { display:none; }
@media(max-width:860px){.app-sidebar{transform:translateX(-100%);transition:transform .2s ease}.app-main{margin-left:0}.menu-toggle{display:grid}body.nav-open .app-sidebar{transform:translateX(0)}body.nav-open .nav-scrim{display:block;position:fixed;inset:0;z-index:50;background:rgba(2,6,23,.52)}.topbar-meta>span:last-child{display:none}}
@media(max-width:560px){.app-topbar{padding:0 14px}.page-header{padding:20px 16px 0}.page-body{padding:12px 16px 24px}}

/* Authentication */
.auth-body { min-height:100vh; color:#cbd5e1; background:#07111f; }
.auth-shell { min-height:100vh; display:grid; grid-template-columns:minmax(360px,1.05fr) minmax(440px,.95fr); }
.auth-story { position:relative; overflow:hidden; display:flex; min-height:100vh; padding:44px clamp(42px,6vw,96px); background:radial-gradient(circle at 20% 82%,rgba(37,99,235,.24),transparent 35%),radial-gradient(circle at 82% 14%,rgba(79,70,229,.18),transparent 31%),linear-gradient(145deg,#07111f,#0b1728 64%,#0d1d33); }
.auth-story::before { content:""; position:absolute; inset:0; opacity:.26; background-image:linear-gradient(rgba(148,163,184,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(148,163,184,.08) 1px,transparent 1px); background-size:48px 48px; mask-image:linear-gradient(to bottom,black,transparent 92%); }
.auth-story::after { content:""; position:absolute; width:430px; height:430px; right:-260px; bottom:-235px; border:1px solid rgba(96,165,250,.28); border-radius:50%; box-shadow:0 0 0 70px rgba(59,130,246,.04),0 0 0 140px rgba(59,130,246,.025); }
.auth-story-inner { position:relative; z-index:1; width:min(100%,610px); display:flex; flex-direction:column; }
.auth-brand,.auth-mobile-brand { display:flex; align-items:center; gap:12px; color:white; text-decoration:none; }
.auth-brand:hover { color:white; }
.auth-brand>span:last-child,.auth-mobile-brand>span:last-child { display:flex; flex-direction:column; line-height:1.05; }
.auth-brand strong,.auth-mobile-brand strong { font-size:15px; letter-spacing:-.015em; }
.auth-brand small,.auth-mobile-brand small { margin-top:5px; color:#71839d; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.14em; }
.auth-brand-mark { display:grid; place-items:center; width:38px; height:38px; border-radius:11px; background:linear-gradient(135deg,#3b82f6,#4f46e5); box-shadow:0 10px 28px rgba(37,99,235,.36); }
.auth-brand-mark svg { width:22px; fill:none; stroke:white; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.auth-story-copy { margin:auto 0; padding:72px 0; }
.auth-eyebrow { display:flex; align-items:center; gap:9px; color:#93c5fd; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.16em; }
.auth-eyebrow i { width:7px; height:7px; border-radius:50%; background:#34d399; box-shadow:0 0 0 4px rgba(52,211,153,.12); }
.auth-story h1 { max-width:590px; margin:23px 0 20px; color:#fff; font-size:clamp(38px,4vw,58px); line-height:1.06; letter-spacing:-.048em; }
.auth-story-copy>p { max-width:525px; margin:0; color:#94a3b8; font-size:16px; line-height:1.75; }
.auth-trust { display:flex; align-items:center; gap:12px; padding-top:24px; border-top:1px solid rgba(148,163,184,.14); }
.auth-trust-icon { display:grid; place-items:center; width:36px; height:36px; flex:none; color:#60a5fa; background:rgba(59,130,246,.1); border:1px solid rgba(96,165,250,.18); border-radius:10px; }
.auth-trust-icon svg { width:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.auth-trust>span:last-child { display:flex; flex-direction:column; gap:3px; }
.auth-trust strong { color:#e2e8f0; font-size:12px; }
.auth-trust small { color:#64748b; font-size:11px; }
.auth-panel { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:100vh; padding:48px clamp(32px,6vw,90px); color:var(--slate-700); background:#f7f9fc; }
.auth-card { width:min(100%,420px); }
.auth-mobile-brand { display:none; margin-bottom:56px; color:var(--slate-950); }
.auth-kicker { color:var(--blue-600); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.16em; }
.auth-card h2 { margin:10px 0 12px; color:var(--slate-950); font-size:30px; line-height:1.2; letter-spacing:-.035em; }
.auth-intro { margin:0 0 32px; color:var(--slate-500); font-size:13px; line-height:1.65; }
.auth-alert { display:flex; align-items:flex-start; gap:11px; margin:-10px 0 22px; padding:12px 14px; color:#9f1239; font-size:11px; line-height:1.55; background:#fff1f2; border:1px solid #fecdd3; border-radius:9px; }
.auth-alert svg { width:18px; height:18px; flex:none; margin-top:1px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.auth-alert strong { display:block; color:#881337; font-size:12px; }
.auth-submit { width:100%; display:flex; align-items:center; justify-content:center; gap:12px; min-height:52px; padding:0 20px; color:white; font-weight:700; background:linear-gradient(135deg,#2563eb,#3157cf); border:0; border-radius:10px; box-shadow:0 8px 20px rgba(37,99,235,.22); cursor:pointer; transition:transform .16s ease,box-shadow .16s ease; }
.auth-submit:hover { transform:translateY(-1px); box-shadow:0 12px 26px rgba(37,99,235,.28); }
.auth-submit:focus-visible { outline:3px solid rgba(59,130,246,.28); outline-offset:3px; }
.auth-submit svg { width:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.auth-divider { display:flex; align-items:center; gap:14px; margin:27px 0 20px; color:#94a3b8; font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.1em; }
.auth-divider::before,.auth-divider::after { content:""; height:1px; flex:1; background:var(--slate-200); }
.auth-help { margin:0; color:var(--slate-500); font-size:11px; line-height:1.6; text-align:center; }
.auth-legal { margin:58px 0 0; color:#94a3b8; font-size:10px; }
@media(max-width:820px){.auth-shell{display:block}.auth-story{display:none}.auth-panel{padding:40px 24px}.auth-mobile-brand{display:flex}.auth-card h2{font-size:28px}}
@media(max-width:420px){.auth-panel{justify-content:flex-start;padding:32px 20px}.auth-mobile-brand{margin-bottom:72px}.auth-legal{margin-top:auto;padding-top:48px;text-align:center}}
