:root { --bg:#0f1115; --card:#181b22; --line:#272b34; --fg:#e6e8ec; --muted:#8b909a; --accent:#5b8cff; --warn:#e0a458; }
* { box-sizing: border-box; }
body { margin:0; font:14px/1.5 -apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif; background:var(--bg); color:var(--fg); }
.hidden { display:none !important; }
.muted { color:var(--muted); }
.error { color:#ff6b6b; min-height:1.2em; margin-top:8px; }

/* login */
.login-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; }
.login-card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:32px; width:320px; display:flex; flex-direction:column; gap:12px; }
.login-card h1 { margin:0; font-size:20px; }
input { background:#0c0e12; border:1px solid var(--line); color:var(--fg); border-radius:8px; padding:10px 12px; font-size:14px; }
button { background:var(--accent); color:#fff; border:0; border-radius:8px; padding:9px 14px; cursor:pointer; font-size:13px; }
button.ghost { background:transparent; border:1px solid var(--line); color:var(--muted); }
button.active { background:var(--accent); }

/* dashboard */
#dashboard { max-width:1100px; margin:0 auto; padding:24px 20px 80px; }
header { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
header h1 { font-size:20px; margin:0; }
.controls { display:flex; gap:8px; align-items:center; }
.toggle { display:flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.toggle button { background:transparent; color:var(--muted); border-radius:0; }
.toggle button.active { background:var(--accent); color:#fff; }
.freshness { color:var(--warn); font-size:12px; background:rgba(224,164,88,.08); border:1px solid rgba(224,164,88,.25); border-radius:8px; padding:8px 12px; }
.block { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:18px; margin-top:18px; }
.block h2 { margin:0 0 12px; font-size:16px; }
.chart { width:100%; height:300px; }
.table-wrap { overflow-x:auto; }
table { border-collapse:collapse; width:100%; font-size:12px; white-space:nowrap; }
th, td { text-align:right; padding:6px 10px; border-bottom:1px solid var(--line); }
th:first-child, td:first-child { text-align:left; position:sticky; left:0; background:var(--card); }
th { color:var(--muted); font-weight:600; }
tr.partial td { color:var(--warn); }
.partial-tag { font-size:10px; color:var(--warn); margin-left:6px; }
.loading { color:var(--muted); padding:12px 0; }
