:root {
  --ink: #151515;
  --ink-2: #1d1d1b;
  --surface: #232321;
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);
  --text: #f3f3ef;
  --soft: #a9a9a2;
  --faint: #6f6f68;
  --lime: #CBF63D;
  --pos: #7ee787;
  --warn: #f2b441;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; background: var(--ink); color: var(--text);
  font-family: 'Schibsted Grotesk', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
.num, .stat-v, .bar-val, td.n { font-family: 'Space Grotesk', system-ui, monospace; font-variant-numeric: tabular-nums; }
button { font-family: inherit; cursor: pointer; }

.brand { font-size: 18px; font-weight: 700; letter-spacing: -0.03em; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); display: inline-block; }
.brand-sub { color: var(--faint); font-weight: 600; }

.btn { border: 1px solid transparent; border-radius: 10px; padding: 9px 15px; font-size: 13px; font-weight: 600; color: var(--text); background: transparent; }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-ghost { border-color: var(--line-2); color: var(--soft); }
.btn-ghost:hover { color: var(--text); border-color: var(--soft); }

/* Gate */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; width: 100%; max-width: 380px; text-align: center; }
.gate-card .brand { justify-content: center; font-size: 24px; margin-bottom: 16px; }
.gate-msg { color: var(--soft); font-size: 14px; line-height: 1.5; margin: 0 0 20px; }
.gate-card .btn-lime { width: 100%; padding: 12px; font-size: 14px; }
.gate-err { color: var(--warn); font-size: 12.5px; margin: 14px 0 0; min-height: 16px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; background: rgba(21,21,21,0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.asof { color: var(--faint); font-size: 12px; }
.who { color: var(--soft); font-size: 12.5px; }

.content { max-width: 1200px; margin: 0 auto; padding: 24px 22px 64px; }
.loading { color: var(--soft); text-align: center; padding: 60px; font-size: 14px; }

.section-title { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin: 28px 0 12px; }
.section-title:first-child { margin-top: 4px; }

/* KPI grid */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.kpi .k { color: var(--soft); font-size: 12px; font-weight: 500; }
.kpi .v { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; }
.kpi .sub { color: var(--faint); font-size: 11.5px; margin-top: 4px; }
.kpi.accent { background: linear-gradient(160deg, rgba(203,246,61,0.14), rgba(203,246,61,0.03)); border-color: rgba(203,246,61,0.25); }
.kpi.accent .v { color: var(--lime); }

/* Charts */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 10px; }
.chart h3 { margin: 0 0 4px; font-size: 13.5px; font-weight: 600; }
.chart .chart-sub { color: var(--faint); font-size: 11.5px; margin-bottom: 12px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bar i { width: 100%; max-width: 26px; background: var(--lime); border-radius: 4px 4px 0 0; min-height: 2px; display: block; opacity: 0.85; transition: opacity .15s; }
.bar:hover i { opacity: 1; }
.bar b { font-size: 9px; color: var(--faint); margin-top: 5px; font-weight: 500; }
.bar .bar-val { font-size: 10px; color: var(--soft); margin-bottom: 3px; min-height: 12px; }

/* Tables */
.tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; }
.tbl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; overflow: hidden; }
.tbl-card h3 { margin: 0 0 12px; font-size: 13.5px; font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; color: var(--faint); font-weight: 600; font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 8px; border-bottom: 1px solid var(--line); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
td.n { text-align: right; color: var(--soft); }
tr:last-child td { border-bottom: none; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: 10.5px; font-weight: 600; }
.pill.settled { background: rgba(126,231,135,0.16); color: var(--pos); }
.pill.live { background: rgba(203,246,61,0.16); color: var(--lime); }
.pill.setup { background: rgba(255,255,255,0.08); color: var(--soft); }
.empty { color: var(--faint); font-size: 12.5px; padding: 14px 4px; }
.err-banner { background: rgba(242,180,65,0.12); border: 1px solid rgba(242,180,65,0.3); color: var(--warn); border-radius: 12px; padding: 14px 16px; font-size: 13px; }

@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; gap: 8px; }
  .who { display: none; }
}
