:root {
  --bg: #ffffff;
  --surface: #f5f7fa;
  --fg: #14181f;
  --muted: #5b6472;
  --brand: #004AAD;
  --brand-dark: #003a87;
  --brand-tint: #e7eefb;
  --line: #e2e6ec;
}
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--fg);
  font:14px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
header { padding:16px 20px 8px; }
.brand { display:flex; align-items:center; gap:12px; }
.logo { border-radius:8px; display:block; }
.brand-text { display:flex; flex-direction:column; }
.wordmark { font-family:"Nunito",system-ui,sans-serif; font-weight:800;
  font-size:22px; letter-spacing:-0.01em; color:var(--brand); line-height:1.1; }
.meta { color:var(--muted); font-size:13px; margin-top:2px; }
.controls { display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end;
  padding:10px 20px 12px; }
.controls label { display:flex; flex-direction:column; gap:3px;
  font-size:12px; color:var(--muted); font-weight:600; }
.controls select, .controls input {
  background:#fff; color:var(--fg); border:1px solid var(--line);
  border-radius:8px; padding:7px 10px; font-size:14px; }
.controls select:focus, .controls input:focus {
  outline:none; border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-tint); }
#search { min-width:220px; }
.count { margin-left:auto; color:var(--muted); font-size:13px; font-weight:600; }
.status { margin:0 20px 12px; padding:10px 14px; background:#fdecec;
  border:1px solid #f5b5b5; border-radius:8px; color:#8a1f1f; }
#rankings { margin:0 12px 20px; }

/* Tabulator — light + brand */
.tabulator { border:1px solid var(--line); border-radius:10px; overflow:hidden;
  background:#fff; font-size:13px; }
.tabulator .tabulator-header { background:var(--brand); border-bottom:1px solid var(--brand-dark); color:#fff; }
.tabulator .tabulator-header .tabulator-col { background:var(--brand);
  border-right:1px solid rgba(255,255,255,.15); }
.tabulator .tabulator-header .tabulator-col .tabulator-col-title { color:#fff; font-weight:700; }
.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input { background:#fff; color:var(--fg); }
.tabulator .tabulator-row { background:#fff; color:var(--fg); border-bottom:1px solid var(--line); }
.tabulator .tabulator-row.tabulator-row-even { background:var(--surface); }
.tabulator .tabulator-row:hover { background:var(--brand-tint) !important; }
.tabulator .tabulator-cell { border-right:1px solid var(--line); }
.tabulator .tabulator-row .tabulator-cell.tabulator-frozen { background:inherit; }
.tabulator .tabulator-col.tabulator-frozen { background:var(--brand); }
.tabulator .tabulator-frozen.tabulator-frozen-left { box-shadow:2px 0 4px rgba(0,0,0,.06); }
@media (max-width:640px) {
  .count { margin-left:0; width:100%; }
  #search { min-width:0; flex:1; }
}
