:root { color-scheme:light; --bg:#f6f7f8; --card:#fff; --fg:#1b2329; --muted:#5f6b75; --line:#e2e6ea; --soft:#eef2f4;
  --dl:#2f8f6b; --bo:#d0583f; --rm:#9aa5ad; --warn:#a86b00; --bad:#c0392b; --accent:#0f6e78; --sel:#e3f1f2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme:dark; --bg:#12171b; --card:#1a2126; --fg:#e4e9ed;
  --muted:#97a3ad; --line:#2a333a; --soft:#222b31; --dl:#3fb68a; --bo:#e8735a; --rm:#6f7b84; --warn:#e0a63a; --bad:#ff7b6b;
  --accent:#5cc3cc; --sel:#1f3438; } }
:root[data-theme="dark"] { color-scheme:dark; --bg:#12171b; --card:#1a2126; --fg:#e4e9ed; --muted:#97a3ad; --line:#2a333a; --soft:#222b31;
  --dl:#3fb68a; --bo:#e8735a; --rm:#6f7b84; --warn:#e0a63a; --bad:#ff7b6b; --accent:#5cc3cc; --sel:#1f3438; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--fg); font:15px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
main { max-width:1240px; margin:0 auto; padding:24px 16px 48px; }
header h1 { font-size:22px; margin:0 0 4px; }
header p { margin:0; color:var(--muted); }
.banner { display:none; margin:12px 0 0; padding:10px 14px; border-radius:8px;
  background:color-mix(in srgb, var(--bad) 14%, var(--card)); border:1px solid var(--bad); }
section { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:16px 18px; margin-top:16px; }
h2 { font-size:15px; margin:0 0 12px; color:var(--muted); font-weight:600; }
h2 small { font-weight:400; }
.filters { position:sticky; top:0; z-index:5; box-shadow:0 2px 8px rgba(0,0,0,.06); }
.frow { display:flex; flex-wrap:wrap; gap:10px 14px; align-items:center; margin-bottom:10px; }
.frow:last-child { margin-bottom:0; }
.frow label, .fl { display:flex; gap:6px; align-items:center; font-size:13px; color:var(--muted); }
input, select, button { font:inherit; font-size:14px; color:var(--fg); background:var(--card); border:1px solid var(--line);
  border-radius:6px; padding:0 8px; height:32px; }
input[type=search] { min-width:280px; flex:1; }
button { cursor:pointer; }
button:hover { border-color:var(--accent); }
.presets button { padding:0 9px; height:28px; font-size:13px; }
.presets button.on, .seg button.on { background:var(--accent); color:var(--card); border-color:var(--accent); }
.seg button { height:28px; font-size:13px; padding:0 9px; }
/* own comboboxes for all filters (native select/datalist popups can't be styled); the date fields stay native */
.combo { position:relative; display:inline-block; }
.combo input { width:220px; padding-right:28px; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a96a0' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 10px center; }
.combo.wide input { width:290px; }
.combo input:focus { cursor:text; }
.combo-list { position:absolute; left:0; top:calc(100% + 2px); min-width:100%; max-width:min(600px, 92vw); max-height:340px;
  overflow:auto; background:var(--card); border:1px solid var(--line); border-radius:6px; box-shadow:0 6px 18px rgba(0,0,0,.14);
  z-index:20; padding:4px 0; }
.combo-list div { display:flex; justify-content:space-between; gap:16px; padding:5px 10px; font-size:14px; color:var(--fg);
  cursor:pointer; white-space:nowrap; }
.combo-list div b { font-weight:400; overflow:hidden; text-overflow:ellipsis; }
.combo-list div em { font-style:normal; color:var(--muted); font-size:12.5px; margin-left:6px; }
.combo-list div span { color:var(--muted); font-size:12.5px; font-variant-numeric:tabular-nums; flex:none; }
.combo-list div.hi { background:var(--sel); }
.combo-list div.none { color:var(--muted); cursor:default; }
.combo-list, .tw { scrollbar-width:thin; scrollbar-color:var(--muted) transparent; }
.combo-list::-webkit-scrollbar, .tw::-webkit-scrollbar { width:10px; height:10px; }
.combo-list::-webkit-scrollbar-track, .tw::-webkit-scrollbar-track { background:transparent; }
.combo-list::-webkit-scrollbar-thumb, .tw::-webkit-scrollbar-thumb { background:var(--muted); border-radius:6px; border:3px solid var(--card); }
.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip { background:var(--sel); border:1px solid var(--accent); border-radius:14px; padding:2px 6px 2px 10px; font-size:13px; }
.chip button { border:0; background:none; padding:0 4px; height:auto; font-size:14px; color:var(--muted); }
.tiles { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; }
.tile span { display:block; color:var(--muted); font-size:12.5px; }
.tile b { font-size:22px; font-variant-numeric:tabular-nums; }
.tile.warn b, td.warn { color:var(--warn); } .tile.bad b, td.bad { color:var(--bad); }
.legend { display:flex; flex-wrap:wrap; gap:6px 16px; font-size:13px; color:var(--muted); margin:-4px 0 6px; }
.legend i { display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:6px; }
.chart { width:100%; height:auto; display:block; }
.chart .grid { stroke:var(--line); stroke-width:1; }
.chart .ax { fill:var(--muted); font-size:11px; }
.chart .tot { fill:var(--fg); font-size:11px; font-variant-numeric:tabular-nums; }
.chart .hit { fill:transparent; } .chart g:hover rect:not(.hit) { opacity:.8; }
.tw { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:14px; font-variant-numeric:tabular-nums; }
th, td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
th { color:var(--muted); font-weight:600; font-size:12.5px; white-space:nowrap; }
.r { text-align:right; white-space:nowrap; }
tr.zero td { color:var(--muted); }
tr.cur td { background:var(--sel); }
td.reason { font-size:13px; color:var(--muted); word-break:break-word; }
td.addr { word-break:break-all; }
td.up { color:var(--bad); font-weight:600; }
.fbtn { border:0; background:none; padding:2px 3px; height:auto; color:var(--muted); line-height:0; }
.fbtn:hover { color:var(--accent); }
.fbtn svg { width:15px; height:15px; }
.dot { display:inline-block; width:9px; height:9px; border-radius:2px; margin-right:6px; vertical-align:baseline; }
.muted, footer { color:var(--muted); font-size:13px; }
.more { margin-top:8px; }
footer { margin-top:20px; }
.two { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:16px; }
.two section { margin-top:0; }
#loading { display:none; color:var(--accent); font-size:13px; }
@media (max-width:860px) { .tiles { grid-template-columns:repeat(2,1fr); } .two { grid-template-columns:1fr; }
  .filters { position:static; } input[type=search] { min-width:0; width:100%; } .fl { width:100%; } .combo, .combo input, .combo.wide input { width:100%; } }

/* ---- v2 additions: auth pages, header, tabs, admin, unblock summary, lookup ---- */
body.auth { display:flex; min-height:100vh; align-items:center; justify-content:center; }
.auth-box { width:min(400px, calc(100vw - 32px)); background:var(--card); border:1px solid var(--line); border-radius:10px; padding:24px; }
.auth-box h1 { font-size:20px; margin:0 0 6px; }
.auth-box form { display:flex; flex-direction:column; gap:12px; margin:16px 0; }
.auth-box label { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--muted); }
.auth-box input { height:36px; }
button.primary { background:var(--accent); color:var(--card); border-color:var(--accent); height:36px; font-weight:600; }
button.link { border:0; background:none; padding:0; height:auto; color:var(--accent); font-size:inherit; }
form.inline { display:inline; }
a { color:var(--accent); }
.err { color:var(--bad); background:color-mix(in srgb, var(--bad) 10%, var(--card)); border:1px solid var(--bad); border-radius:6px; padding:8px 10px; }
.small { font-size:13px; }
header.top { display:flex; flex-wrap:wrap; gap:8px 20px; align-items:center; margin-bottom:6px; }
header.top h1 { margin:0; }
.tabs { display:flex; gap:4px; flex:1; }
.tabs button { height:32px; padding:0 12px; }
.tabs button.on { background:var(--accent); color:var(--card); border-color:var(--accent); }
.user { font-size:13px; color:var(--muted); }
.ub { background:var(--soft); border:1px solid var(--line); border-radius:8px; padding:12px 14px; white-space:pre-wrap;
  font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; overflow-x:auto; }
.row-btn { cursor:pointer; }
tr.row-btn:hover td { background:var(--soft); }
.form-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:10px; align-items:end; }
.form-grid label { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--muted); }
textarea { font:13px/1.4 ui-monospace,monospace; width:100%; min-height:120px; color:var(--fg); background:var(--card);
  border:1px solid var(--line); border-radius:6px; padding:6px 8px; }
.ok { color:var(--dl); } .pill { display:inline-block; padding:0 8px; border-radius:10px; font-size:12px; border:1px solid var(--line); }
