/* HedgeBot operator dashboard — same minimal system as the desktop
   app (hark.com principles: one clear statement, small supporting
   copy, whitespace, hairlines, not card boxes). Brand accent is
   violet (#7c3aed), sampled from the user's HB logo family. */ Notion principles
   layered on top (principles only — no Notion branding or content):
   generous whitespace, one strong page title with muted secondary
   labels, restrained colour (near-black text, one violet accent,
   status colours only where they mean something), content in a single
   readable column, subtle dividers instead of heavy card borders.
   Light, fluid, easy to read. No external fonts, CDN or images. */
:root {
  color-scheme: light;
  --bg: #faf9f7;
  --surface: #ffffff;
  --ink: #1b1d1f;
  --text: #1b1d1f;
  --muted: #6f7378;
  --faint: #9a9da2;
  --hairline: #e7e3dd;
  --hairline-strong: #d8d3cc;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-soft: #f1eafe;
  --amber-bright: #d97706;
  --positive: #177245;
  --negative: #b3261e;
  --radius: 10px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

header, main, footer {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

header { padding-top: 48px; }
/* One strong page title; the subtitle underneath is the only
   secondary voice in the header. */
h1 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 0; }
.subtitle { color: var(--muted); margin: 6px 0 0; font-size: 14px; }

.card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--hairline);
  border-radius: 0;
  padding: 32px 0 36px;
  margin-top: 32px;
}

h2 {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 12px;
}
.hint { color: var(--muted); font-size: 13px; }
.status { color: var(--muted); font-size: 13px; min-height: 1.2em; }
.error { color: var(--negative); font-size: 14px; }

label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }

input[type="url"], input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
}
input[type="url"]:focus, input[type="password"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

/* Operator secret block: same hairline divider as the cards, kept
   inside the data-source card so it reads as configuration, not
   content. */
.secret-block { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.secret-block .row { margin-top: 10px; }

/* Leaderboard rate controls: small, quiet, same pill buttons and
   selects as the rest of the page — no new visual language. */
.btn-small { padding: 4px 12px; font-size: 13px; }
.btn-small:disabled { opacity: .5; cursor: default; }
.btn-small:disabled:hover { border-color: var(--hairline-strong); }
.rate-select { padding: 6px 8px; font-size: 13px; margin-right: 6px; }
.rate-select:disabled { opacity: .5; }
.rate-cell { white-space: nowrap; }
.rate-status { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.rate-status.ok { color: var(--positive); }
.rate-status.error { color: var(--negative); }

.filter-row { align-items: center; margin-bottom: 12px; }
.filter-row label { margin-bottom: 0; margin-right: 8px; }
select {
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}
select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.row { display: flex; gap: 8px; margin-top: 12px; }

button {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
button:hover { border-color: var(--ink); }
#btn-load { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
#btn-load:hover { background: #000; border-color: #000; }

.totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px 32px;
  margin: 0;
}
.totals div {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--hairline);
  border-radius: 0;
  padding: 16px 0 0;
}
.totals dt { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.totals dd { margin: 4px 0 0; font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.positive { color: var(--positive); }
.negative { color: var(--negative); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--hairline); font-variant-numeric: tabular-nums; }
th { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
td.empty { color: var(--muted); }

code { font-size: 0.9em; }

footer {
  color: var(--muted);
  font-size: 13px;
  padding-top: 32px;
  padding-bottom: 40px;
  border-top: 1px solid var(--hairline);
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Logo: the user's chosen HB monogram, as-is, in the header. */
.brand-logo { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; background: #000; vertical-align: middle; margin-right: 10px; }
