:root { --bg:#f6f7f9; --fg:#1d2330; --muted:#6b7385; --line:#e2e5ea; --card:#fff; --acc:#2f6fdf;
  --red:#c8333a; --orange:#d9822b; --green:#2f8f4e; }
@media (prefers-color-scheme: dark) {
  :root { --bg:#14171c; --fg:#e4e7ec; --muted:#8a93a5; --line:#2a2f38; --card:#1b1f26; --acc:#6b9cf5; }
}
* { 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(--fg); }
header { display:flex; align-items:center; gap:24px; padding:10px 20px; background:var(--card); border-bottom:1px solid var(--line); flex-wrap:wrap; }
.brand { font-weight:600; }
nav a { margin-right:16px; color:var(--muted); text-decoration:none; padding:4px 0; }
nav a.on, nav a:hover { color:var(--fg); border-bottom:2px solid var(--acc); }
.logout { margin-left:auto; display:flex; gap:10px; align-items:center; }
main { padding:16px 20px 40px; max-width:1500px; }
h1 { font-size:20px; margin:4px 0 6px; } h2 { font-size:15px; margin:22px 0 8px; }
a { color:var(--acc); }
.muted { color:var(--muted); } .small { font-size:12px; } .errtext { color:var(--red); }
.tiles { display:flex; gap:12px; flex-wrap:wrap; margin-top:12px; }
.tile { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:10px 16px; min-width:160px; display:flex; flex-direction:column; }
.tile b { font-size:26px; font-weight:600; } .tile small { color:var(--muted); }
.chart { width:100%; max-width:1100px; height:150px; background:var(--card); border:1px solid var(--line); border-radius:8px; padding:6px; }
.chart .bar { fill:var(--acc); } .chart .hit { fill:transparent; } .chart g:hover .bar { fill:var(--orange); }
.chart text { font-size:10px; fill:var(--muted); } .chart .axis { stroke:var(--line); }
table { border-collapse:collapse; width:100%; background:var(--card); border:1px solid var(--line); border-radius:8px; }
th, td { text-align:left; padding:5px 8px; border-bottom:1px solid var(--line); vertical-align:middle; white-space:nowrap; }
th { font-weight:500; color:var(--muted); font-size:12px; }
td.n, th.n { text-align:right; font-variant-numeric:tabular-nums; }
.cols { display:flex; gap:20px; flex-wrap:wrap; align-items:flex-start; }
.cols > section { flex:3 1 640px; min-width:0; overflow-x:auto; } .cols > section.narrow { flex:1 1 300px; }
.badge { display:inline-block; padding:1px 7px; border-radius:10px; font-size:11px; color:#fff; }
.badge.perm { background:var(--red); } .badge.ban { background:var(--orange); } .badge.white { background:var(--green); }
.acts { display:flex; gap:4px; } .acts form { margin:0; }
button { font:inherit; padding:3px 10px; border:1px solid var(--line); border-radius:5px; background:var(--card); color:var(--fg); cursor:pointer; }
button:hover { border-color:var(--acc); }
button.ban { color:var(--red); } button.unban { color:var(--orange); } button.allow { color:var(--green); }
.acts button { font-size:12px; padding:1px 7px; }
input, select { font:inherit; padding:4px 8px; border:1px solid var(--line); border-radius:5px; background:var(--card); color:var(--fg); }
.filters { display:flex; gap:12px; align-items:end; flex-wrap:wrap; margin:20px 0 4px; }
.filters label { display:flex; flex-direction:column; font-size:12px; color:var(--muted); gap:2px; }
.inline { display:flex; gap:8px; margin:8px 0; }
.flash { padding:8px 12px; border-radius:6px; margin:8px 0; }
.flash.ok { background:#e5f4ea; color:#1d5e33; } .flash.err { background:#fbe7e8; color:#8a1f25; }
.login { max-width:320px; margin:12vh auto; background:var(--card); border:1px solid var(--line); border-radius:10px; padding:24px; display:flex; flex-direction:column; gap:12px; }
.login label { display:flex; flex-direction:column; gap:4px; color:var(--muted); font-size:12px; }
.login button { padding:8px; background:var(--acc); color:#fff; border:0; }
pre.log { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:10px; max-height:360px; overflow:auto; font-size:12px; }
code { font-size:12px; }
