/* The admin dashboard (docs/plans/admin.md): plain, readable on a phone, light and dark. */
:root { --bg: #f7f7f5; --card: #fff; --text: #1d1d1f; --muted: #6e6e73; --line: #e2e2e0; --accent: #0f7c86; --bar: #6e6e73; --alert: #c0392b; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #111214; --card: #1b1c1f; --text: #ececec; --muted: #9a9aa0; --line: #2c2d31; --accent: #4fb8c2; --bar: #9a9aa0; --alert: #ff6b5e; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
header { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
nav a.on { color: var(--text); background: var(--bg); font-weight: 600; }
.env { margin-left: auto; }
header form { margin: 0; }
main { padding: 16px; max-width: 1000px; margin: 0 auto; }
main.narrow { max-width: 420px; margin-top: 15vh; text-align: center; }
h1 { font-size: 22px; margin: 4px 0 16px; }
h1 small { color: var(--muted); font-weight: 400; font-size: 15px; }
h2 { font-size: 16px; margin: 28px 0 8px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat .value { font-size: 24px; font-weight: 600; }
.stat .label, .note { color: var(--muted); }
.stat .note { font-size: 13px; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
.chart { width: 100%; height: 160px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.chart rect { fill: var(--bar); }
.chart .limit { stroke: var(--alert); stroke-dasharray: 4 4; }
button { font: inherit; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
#sign-in, #register { background: var(--accent); color: #fff; border: 0; }
pre { text-align: left; white-space: pre-wrap; word-break: break-all; background: var(--card); padding: 12px; border-radius: 8px; }
.chart.line polyline { fill: none; stroke-width: 2; }
.s0 { stroke: #0f7c86; background: #0f7c86; } .s1 { stroke: #c4682b; background: #c4682b; } .s2 { stroke: #6b5bd2; background: #6b5bd2; }
.s3 { stroke: #2e8b57; background: #2e8b57; } .s4 { stroke: #b03a6b; background: #b03a6b; } .s5 { stroke: #8a8a8f; background: #8a8a8f; }
.legend { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.axis { font-size: 12px; margin: 2px 0 0; }
.range a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.range a.on { color: var(--text); background: var(--card); font-weight: 600; }
