/* goldbot dashboard. No JavaScript; everything served from this server. */
:root {
  --bg: #f5f6f8; --surface: #fff; --fg: #17191c; --muted: #646a73; --border: #e1e4e8;
  --accent: #2f5bd3; --pos: #18794e; --pos-bg: #e6f4ec; --neg: #b42318; --neg-bg: #fdecea;
  --warn-bg: #fff5d9; --warn: #7a4f00; --info-bg: #e8eefc; --gold: #a37b00;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111214; --surface: #1a1c1f; --fg: #eceef1; --muted: #9aa1ab; --border: #2c3036;
    --accent: #7ea2ff; --pos: #5fd394; --pos-bg: #13291d; --neg: #ff8c80; --neg-bg: #33191a;
    --warn-bg: #2e2510; --warn: #f3c35c; --info-bg: #18213a; --gold: #f3c35c; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-variant-numeric: tabular-nums; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px;
  background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { font-weight: 700; color: var(--gold); letter-spacing: .02em; }
main { max-width: 1100px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
h1 { font-size: 22px; margin: 0 0 12px; } h2 { font-size: 14px; margin: 0 0 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.narrow { max-width: 420px; margin: 40px auto; width: 100%; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.big { font-size: 34px; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
.big.on { color: var(--pos); } .big.off { color: var(--muted); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.demo { background: var(--warn-bg); color: var(--warn); } .badge.real { background: var(--neg); color: #fff; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; }
dt { color: var(--muted); } dd { margin: 0; }
.muted { color: var(--muted); } .small { font-size: 13px; } .mono { font-family: var(--mono); font-size: 13px; }
.nowrap { white-space: nowrap; } .pos { color: var(--pos); } .neg { color: var(--neg); }
.note { padding: 10px 12px; border-radius: 8px; margin: 0; }
.note.ok { background: var(--pos-bg); } .note.bad { background: var(--neg-bg); } .note.warn { background: var(--warn-bg); }
.note.info { background: var(--info-bg); } .note ul { margin: 4px 0 0; padding-left: 20px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
.journal td { padding: 4px 8px; font-size: 13px; }
.k-dry-run td:last-child, .k-signal td:last-child { color: var(--accent); }
.k-order td:last-child { color: var(--pos); font-weight: 600; }
.k-refused td:last-child, .k-order-failed td:last-child, .k-refuse td:last-child { color: var(--neg); }
.k-bar td, .k-status td { color: var(--muted); }
pre { font-family: var(--mono); font-size: 12px; white-space: pre-wrap; margin: 0; max-height: 420px; overflow: auto; }
.stack { display: flex; flex-direction: column; gap: 12px; } .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
input { font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--fg); }
button, .button { font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--fg); cursor: pointer; text-decoration: none; display: inline-block; }
button.primary, .button { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { background: var(--neg); border-color: var(--neg); color: #fff; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: none; color: var(--accent); padding: 0; }
