/* The admin page: one column on a phone, readable in sunlight and at night. No script anywhere. */
:root {
  --bg: #f5f6f8; --card: #ffffff; --text: #17191c; --muted: #5d6470; --line: #dde1e6;
  --accent: #1f5fbf; --accent-text: #ffffff; --ok-bg: #e7f5ec; --ok: #17663a; --bad-bg: #fdecec; --bad: #a32020;
  --warn-bg: #fff6e0; --warn: #7a5200; --live: #a32020; --paper: #1f5fbf; --on: #17663a; --off: #6b7280;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101215; --card: #1a1d22; --text: #e8eaed; --muted: #a1a8b3; --line: #2d3239;
    --accent: #5b9bff; --accent-text: #0b1220; --ok-bg: #12301f; --ok: #7fd6a0; --bad-bg: #3a1616; --bad: #ff9a9a;
    --warn-bg: #352a10; --warn: #f2c66d; --live: #ff8a8a; --paper: #8db8ff; --on: #7fd6a0; --off: #9aa3ae;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
main { max-width: 760px; margin: 0 auto; padding: 12px 16px 48px; }
h1 { font-size: 1.45rem; margin: 8px 0 12px; }
h2 { font-size: 1.1rem; margin: 0 0 10px; }
a { color: var(--accent); }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 14px; }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin: 12px 0; color: inherit; text-decoration: none; }
.card.narrow { max-width: 420px; margin: 32px auto; }
a.card.member:hover, a.card.member:focus { border-color: var(--accent); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
label small, .muted { color: var(--muted); font-weight: 400; font-size: .9rem; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
input { font: inherit; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); width: 100%; }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; }
input:focus, button:focus, a:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
button, .button { font: inherit; font-weight: 600; min-height: 44px; padding: 10px 16px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
button.primary, .button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button.danger { background: #b42318; color: #fff; border-color: #b42318; }
button.link { background: none; border: none; color: var(--accent); padding: 0; min-height: 0; font-weight: 500; }
form.inline { display: inline; }
.danger-zone { border-color: var(--bad); }
.flash { padding: 10px 14px; border-radius: 8px; margin: 10px 0; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.bad { background: var(--bad-bg); color: var(--bad); }
.warn { background: var(--warn-bg); color: var(--warn); padding: 8px 12px; border-radius: 8px; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .02em; padding: 2px 8px;
  border-radius: 999px; border: 1px solid currentColor; vertical-align: middle; }
.badge.on { color: var(--on); } .badge.off { color: var(--off); }
.badge.live { color: var(--live); } .badge.paper { color: var(--paper); }
.figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; margin: 10px 0 0; }
@media (min-width: 560px) { .figures { grid-template-columns: repeat(4, 1fr); } }
.figures dt { color: var(--muted); font-size: .85rem; }
.figures dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.pos { color: var(--ok); } .neg { color: var(--bad); }
.open { margin: 10px 0 0; font-weight: 600; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
ul { padding-left: 20px; }
ul.trades { list-style: none; padding: 0; margin: 0; }
ul.trades li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
ul.trades li:last-child { border-bottom: none; }
.big { font-weight: 700; font-variant-numeric: tabular-nums; }
.small { font-size: .82rem; }
label .badge { align-self: flex-start; margin-left: 0; }
