[hidden] { display: none !important; }
:root {
  color-scheme: dark;
  --bg: #060a28;
  --surface: #15194a;
  --elevated: #20245c;
  --border: #3a4167;
  --text: #f1f5f9;
  --muted: #a7b0be;
  --green: #8cf461;
  --red: #f1523b;
  --yellow: #f7c450;
  --teal: #5ed3d9;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
button { font: inherit; cursor: pointer; border: 0; border-radius: 12px; padding: 9px 14px; color: var(--text); background: var(--elevated); }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--green); color: #061006; font-weight: 700; }
button.ghost { background: transparent; color: var(--muted); }
button.danger { background: rgba(241, 82, 59, .16); color: var(--red); }
input, textarea, select { font: inherit; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
h1, h2, h3 { margin: 0 0 8px; letter-spacing: -.01em; }
h1 { font-size: 28px; } h2 { font-size: 19px; } h3 { font-size: 15px; }
p { margin: 0 0 8px; line-height: 1.45; }
.muted { color: var(--muted); }
.error { color: var(--red); }
.topbar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: rgba(6, 10, 40, .92); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.06); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--green); color: #061006; font-weight: 900; font-size: 13px; }
.tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.tabs button { background: transparent; color: var(--muted); }
.tabs button.active { background: var(--surface); color: var(--text); }
main { max-width: 1180px; margin: 0 auto; padding: 20px; display: grid; gap: 16px; }
.card { background: var(--surface); border-radius: 18px; padding: 18px; }
.card.center { max-width: 420px; margin: 10vh auto; text-align: center; display: grid; gap: 12px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tile { background: var(--elevated); border-radius: 14px; padding: 14px; }
.tile .value { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile .label { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--elevated); color: var(--muted); }
.pill.green { background: rgba(140, 244, 97, .15); color: var(--green); }
.pill.red { background: rgba(241, 82, 59, .16); color: var(--red); }
.pill.yellow { background: rgba(247, 196, 80, .16); color: var(--yellow); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 8px; }
.chart .bar { flex: 1; background: var(--green); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.chart .bar.interactions { background: var(--teal); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.report { border-top: 1px solid rgba(255,255,255,.06); padding: 14px 0; display: grid; gap: 8px; }
.report:first-of-type { border-top: 0; }
.snapshot { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 10px; font-size: 14px; }
.code-input { font-size: 26px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
dialog { border: 0; border-radius: 18px; padding: 20px; background: var(--surface); color: var(--text); width: min(92vw, 480px); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog form { display: grid; gap: 12px; }
@media (max-width: 640px) { main { padding: 12px; } .topbar { padding: 10px 12px; } }
.login-code { font-size: 38px; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; margin: 6px 0; }
.small { font-size: 13px; }
