:root {
  color-scheme: light dark;
  --bg:#0b0d12; --card:#151922; --line:#252b38; --fg:#e6e9ef;
  --mut:#8b93a7; --acc:#5b8cff; --good:#3fb950; --bad:#f85149; --warn:#d29922;
  --sunk:#0e1219;
}
* { box-sizing: border-box; }
body {
  margin:0; background:var(--bg); color:var(--fg);
  font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
}
header {
  padding:20px 24px; border-bottom:1px solid var(--line);
  display:flex; align-items:center; gap:12px;
}
header h1 { font-size:17px; margin:0; font-weight:650; letter-spacing:.2px; flex:1; }
header .dot { width:10px; height:10px; border-radius:50%; background:var(--good); box-shadow:0 0 8px var(--good); }
main { max-width:900px; margin:0 auto; padding:24px; }

.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:18px 20px; margin:16px 0; }
.card h2 { font-size:13px; text-transform:uppercase; letter-spacing:.8px; color:var(--mut); margin:0 0 12px; }
.card.warn { border-color:var(--warn); }

input, select, button { font:inherit; }
input, select {
  width:100%; padding:9px 11px; background:var(--sunk);
  border:1px solid var(--line); border-radius:8px; color:var(--fg);
}
button {
  padding:9px 16px; background:var(--acc); color:#fff; border:0;
  border-radius:8px; cursor:pointer; font-weight:600; margin-right:8px;
}
button.secondary { background:transparent; border:1px solid var(--line); color:var(--fg); }
button.danger { background:var(--bad); }
button:disabled { opacity:.5; cursor:default; }

.row { display:flex; gap:10px; align-items:end; flex-wrap:wrap; margin-top:12px; }
.row > input, .row > select { flex:1; min-width:120px; }
.row > button { flex:0 0 auto; }

/* A labelled input. Money amounts are entered in MAJOR units, so the caption
   saying so has to travel with the box rather than sit somewhere else. */
.field { display:flex; flex-direction:column; gap:4px; }
.field > span { font-size:12px; }
.row > .field { flex:1; min-width:170px; }

.tabs { display:flex; gap:6px; border-bottom:1px solid var(--line); margin-top:8px; }
.tab { background:transparent; color:var(--mut); border-radius:8px 8px 0 0; margin:0; font-weight:600; }
.tab.active { color:var(--fg); background:var(--card); border:1px solid var(--line); border-bottom-color:var(--card); }

table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:8px 6px; border-bottom:1px solid var(--line); font-variant-numeric:tabular-nums; }
th { font-size:12px; color:var(--mut); font-weight:600; }

.bar { height:10px; background:var(--sunk); border:1px solid var(--line); border-radius:999px; overflow:hidden; }
.bar-fill { height:100%; width:0; background:var(--acc); transition:width .3s; }
.bar-fill.hot { background:var(--bad); }

.mono { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:13px; }
.secret {
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  word-break:break-all; color:var(--acc); background:var(--sunk);
  border:1px solid var(--line); border-radius:8px; padding:12px; margin:10px 0;
}
pre { background:var(--sunk); border:1px solid var(--line); border-radius:8px; padding:12px; overflow-x:auto; font-size:13px; }
a { color:var(--acc); }

.muted { color:var(--mut); }
.err { color:var(--bad); font-size:13px; }
.ok  { color:var(--good); font-size:13px; }
.hide { display:none; }

.toast {
  position:fixed; bottom:20px; left:50%; transform:translateX(-50%);
  background:var(--card); border:1px solid var(--line); border-radius:8px;
  padding:10px 16px; box-shadow:0 6px 24px rgba(0,0,0,.4); max-width:90vw;
}

@media (max-width:640px) {
  .row > input, .row > select, .row > button { flex:1 1 100%; }
  main { padding:16px; }
}
