:root {
  --bg: #f6f7f9; --panel: #fff; --text: #1d2330; --muted: #6b7385; --line: #e2e5ea; --accent: #2457d6;
  --ok: #1b7f3b; --warn: #a86400; --bad: #b42318;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171c; --panel: #1c2027; --text: #e6e8ec; --muted: #9aa2b1; --line: #2c323c; --accent: #7aa2ff;
          --ok: #5fd08a; --warn: #f0b04a; --bad: #ff7b72; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); }
header { display: flex; gap: 20px; align-items: center; padding: 10px 16px; background: var(--panel);
         border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; flex-wrap: wrap; }
header nav { display: flex; gap: 14px; flex-wrap: wrap; }
header nav a { text-decoration: none; color: var(--text); }
header nav a.active { color: var(--accent); font-weight: 600; }
.who { margin-left: auto; color: var(--muted); }
main { padding: 16px; max-width: 1280px; margin: 0 auto; }
#login { max-width: 420px; margin: 12vh auto; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
h1 { font-size: 20px; margin: 0 0 12px; } h2 { font-size: 16px; margin: 20px 0 8px; }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.stat { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.stat:last-child { border: 0; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tr.click { cursor: pointer; } tr.click:hover td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
button { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
button.secondary { background: transparent; color: var(--accent); }
button.danger { background: var(--bad); border-color: var(--bad); }
button.link { border: 0; background: none; color: var(--accent); padding: 0; }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.row > * { width: auto; }
.form { display: grid; grid-template-columns: 140px 1fr; gap: 6px 10px; align-items: center; }
.form label { color: var(--muted); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; background: var(--line); white-space: nowrap; }
.s-verified { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.s-needs_review, .s-needs_contact { background: color-mix(in srgb, var(--warn) 25%, transparent); }
.s-venue_closed, .s-trivia_ended, .s-duplicate { background: color-mix(in srgb, var(--bad) 20%, transparent); }
.evidence { font-size: 13px; background: var(--bg); border-left: 3px solid var(--line); padding: 6px 8px; margin: 4px 0; white-space: pre-wrap; }
.toast { position: fixed; bottom: 16px; right: 16px; padding: 10px 14px; border-radius: 8px; background: var(--panel);
         border: 1px solid var(--line); opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 420px; }
.toast.ok, .toast.err { opacity: 1; } .toast.err { border-color: var(--bad); color: var(--bad); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin: 8px 0; }
@media (max-width: 700px) { .form { grid-template-columns: 1fr; } th:nth-child(n+5), td:nth-child(n+5) { display: none; } }
#login-form input { margin-bottom: 8px; }
