
:root { color-scheme: light dark; --fg: #1d1d1f; --bg: #fafafa; --card: #fff; --muted: #6e6e73; --line: #d9d9de;
  --accent: #b45309; --danger: #b91c1c; --ok: #15803d; }
@media (prefers-color-scheme: dark) {
  :root { --fg: #f2f2f2; --bg: #141416; --card: #1f1f22; --muted: #a1a1a6; --line: #3a3a3f; --accent: #f59e0b;
    --danger: #f87171; --ok: #4ade80; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--fg); background: var(--bg); }
main { max-width: 34rem; margin: 0 auto; padding: 2rem 1rem 4rem; }
body.wide main { max-width: 72rem; }
h1 { font-size: 1.6rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
a { color: var(--accent); }
p.muted, .muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; margin: 1rem 0; }
label { display: block; font-weight: 600; margin: .75rem 0 .25rem; }
input[type=email], input[type=text], select { width: 100%; padding: .6rem .7rem; font: inherit; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); color: var(--fg); }
input.code { letter-spacing: .2em; font-variant-numeric: tabular-nums; }
button { margin-top: 1rem; padding: .6rem 1rem; font: inherit; font-weight: 600; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: #fff; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.danger { background: var(--danger); }
form.inline { display: inline; }
form.inline button { margin-top: 0; }
.error { color: var(--danger); font-weight: 600; }
.notice { color: var(--ok); font-weight: 600; }
.topbar { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--line);
  background: var(--card); }
.topbar .spacer { flex: 1; }
.topbar a { text-decoration: none; font-weight: 600; }
/* Wide tables scroll inside themselves on a phone instead of widening the page. */
table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .95rem; }
table > * { width: 100%; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .75rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .9rem; }
.stat b { display: block; font-size: 1.6rem; }
.qr svg { width: 220px; height: 220px; display: block; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
ul.codes { columns: 2; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; }
.filters label { margin: 0; }
.filters select, .filters input { width: auto; }
