.hidden{display:none!important}
.auth-shell{display:grid;place-items:center;min-height:calc(100svh - 80px);padding:48px 20px}
.auth-panel{width:min(100%,440px);padding:36px;border:1px solid var(--line);border-radius:24px;background:var(--surface);box-shadow:var(--shadow)}
.auth-panel .eyebrow{margin:0 0 14px;font-size:.75rem}
.auth-panel h1{font-size:clamp(1.8rem,5vw,2.3rem);letter-spacing:-.045em;margin:0 0 16px;line-height:1.2}
.auth-text{color:var(--muted);margin:0 0 18px}
.auth-home-link{font-size:.875rem;text-decoration:none}
.auth-legal-links{display:flex;gap:12px;align-items:center;margin:14px 0 28px;color:var(--muted);font-size:.8125rem}
.auth-legal-links a{color:var(--muted);text-decoration:none}
.auth-panel label{display:grid;gap:8px;font-size:.875rem;font-weight:550;margin:18px 0}
.auth-panel input{display:block;width:100%;min-width:0;padding:13px 14px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--text);font:inherit;font-size:1rem}
.auth-panel input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.auth-panel button[type=submit]{width:100%;padding:13px 18px;margin-top:6px;background:var(--accent);color:#0c2113;border:0;border-radius:12px;font-weight:650;cursor:pointer}
[data-theme=light] .auth-panel button[type=submit]{color:#fff}
button:disabled{opacity:.55;cursor:wait}
.form-error,.inline-error{color:#ef9e98;font-size:.875rem;overflow-wrap:anywhere}
[data-theme=light] .form-error,[data-theme=light] .inline-error{color:#ac332b}
.form-error:not(:empty){margin-top:18px}
.inline-error:not(:empty){padding-top:18px}
#appView .page{padding-top:48px}
.appbar{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px}
.dashboard-title .eyebrow{margin:0 0 12px;font-size:.75rem}
.dashboard-title h1{font-size:clamp(2rem,4.5vw,3rem);letter-spacing:-.05em;margin:0;line-height:1.15}
.appbar-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px 14px}
.home-link{display:none}
.refresh-button,.ghost,.range-button{border:1px solid var(--line);border-radius:11px;background:var(--surface);color:var(--text);padding:10px 14px;cursor:pointer;font-size:.875rem}
.refresh-button:hover,.ghost:hover,.range-button:hover{background:var(--surface-hover)}
.refresh-button{display:flex;align-items:center;gap:8px}
.refresh-icon{display:inline-block;font-size:1.25rem;line-height:1}
.statusline{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:.8125rem}
.dot{width:7px;height:7px;border-radius:50%;background:var(--muted);flex-shrink:0}
.dot.live,.dot.ok{background:var(--accent);box-shadow:0 0 0 4px var(--icon-bg)}
.dot.warn{background:#d7a94c}
.dot.error{background:#e57e75}
.meta-line{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:28px;color:var(--muted);font-size:.8125rem;flex-wrap:wrap}
.quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}
.quick-item{display:flex;flex-direction:column;min-width:0;padding:24px;border:1px solid var(--line);border-radius:20px;background:var(--surface)}
.quick-item>span{font-size:.875rem;color:var(--muted)}
.quick-item strong{display:block;margin:14px 0 8px;font-size:clamp(1.6rem,3vw,2.4rem);font-weight:650;letter-spacing:-.045em;line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.quick-item:first-child strong{color:var(--accent)}
.quick-item small{font-size:.75rem;color:var(--muted)}
.section{padding:28px;margin:0 0 20px;border:1px solid var(--line);border-radius:20px;background:var(--surface);min-width:0}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}
.section-head h2{font-size:1.2rem;letter-spacing:-.025em}
.section-head p{margin:6px 0 0;color:var(--muted);font-size:.8125rem}
.subtle{color:var(--muted);font-size:.8125rem}
.stat-table{display:grid}
.row,.flow-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;border-bottom:1px solid var(--line);font-size:.875rem}
.row:last-child,.flow-row:last-child{border-bottom:0}
.row span,.flow-row span{color:var(--muted)}
.row strong,.flow-row strong{font-size:.9375rem;font-weight:600;text-align:right;font-variant-numeric:tabular-nums}
.flow-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.flow-row{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:10px;padding:18px;border:1px solid var(--line);border-radius:12px;background:var(--bg);min-width:0}
.flow-row:last-child{border-bottom:1px solid var(--line)}
.flow-row strong{text-align:left;overflow-wrap:anywhere}
.range-switch{display:flex;gap:4px;flex-wrap:wrap;padding:4px;border:1px solid var(--line);background:var(--bg);border-radius:13px}
.range-button{background:transparent;border:0;padding:8px 12px;font-size:.8125rem;border-radius:9px;color:var(--muted)}
.range-button.active{background:var(--icon-bg);color:var(--accent);font-weight:650}
.chart-wrap{position:relative;height:300px;min-width:0;width:100%}
.chart-wrap canvas{display:block;max-width:100%}
.small-chart{height:250px}
.two-col{display:grid;grid-template-columns:1.35fr 1fr;gap:32px}
.two-col>div{min-width:0}
.footer-home-link{color:var(--muted);text-decoration:none}
.spinning{animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:1000px){.appbar{align-items:flex-start}.appbar-actions{max-width:320px}.quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.two-col{grid-template-columns:1fr;gap:32px}}
@media(max-width:600px){.auth-shell{padding:28px 20px;min-height:calc(100svh - 69px)}.auth-panel{padding:26px 24px;border-radius:20px}#appView .page{padding-top:32px}.appbar{flex-direction:column;gap:20px}.appbar-actions{max-width:none;justify-content:flex-start;gap:10px}.statusline{order:3}.quick-grid{gap:10px}.quick-item{padding:18px 14px;border-radius:16px}.quick-item strong{font-size:1.65rem}.section{padding:20px 16px;border-radius:16px;margin-bottom:14px}.section-head{gap:14px}.section-stack{align-items:flex-start;flex-direction:column}.flow-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.flow-row{padding:14px}.chart-wrap{height:260px}.small-chart{height:230px}.row strong{max-width:58%;overflow-wrap:anywhere}.footer{gap:14px 20px}.footer>span:last-child{width:100%;font-size:.75rem}.meta-line{gap:8px}}
@media(prefers-reduced-motion:reduce){.spinning{animation:none}}
