:root {
  --bg: #f2f5f1;
  --surface: #ffffff;
  --surface-2: #f7f9f6;
  --line: #e2e8e1;
  --line-strong: #d3dcd2;
  --text: #1b2a22;
  --muted: #6a7a70;
  --accent: #3d6b55;
  --accent-strong: #2c5241;
  --accent-soft: #e2eee6;
  --top: #17231d;
  --top-2: #22332a;

  --ok: #23824e;      --ok-soft: #e0f3e7;
  --warn: #a8690f;    --warn-soft: #fcf0d9;
  --info: #2a6a9c;    --info-soft: #e1edf7;
  --bad: #c03a30;     --bad-soft: #fbe3df;
  --rose: #b0485a;    --rose-soft: #f8e5e9;
  --violet: #7347a8;  --violet-soft: #efe6f8;
  --grey: #6f7a74;    --grey-soft: #eceeec;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 35, 27, .05), 0 6px 20px rgba(20, 35, 27, .06);
  --font: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  font-feature-settings: "tnum" 1;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }
[hidden] { display: none !important; }

/* ---------- верхняя панель ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  height: 58px;
  background: linear-gradient(180deg, var(--top-2), var(--top));
  color: #eef4ef;
  box-shadow: 0 2px 12px rgba(10, 20, 15, .18);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { color: #fff; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #6fae8b, #3d6b55);
  font-weight: 800; font-size: 15px;
}
.brand-name { font-weight: 700; letter-spacing: .06em; }
.brand-sub { color: #9db5a6; font-size: 13px; }
.tabs { display: flex; gap: 4px; height: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tab {
  display: flex; align-items: center;
  padding: 0 14px;
  color: #b9cbbf;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}
.tab:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .04); }
.tab.is-active { color: #fff; border-bottom-color: #7cc49b; }
.topbar-note {
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  color: #9db5a6;
  font-size: 12px;
}

/* ---------- каркас ---------- */
.content { flex: 1; width: 100%; max-width: 1560px; margin: 0 auto; padding: 26px 28px 40px; }
.foot { padding: 14px 28px; color: var(--muted); font-size: 12px; text-align: center; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 20px;
}
.page-head h1 { font-size: 28px; font-weight: 750; }
.page-sub { margin-top: 4px; color: var(--muted); }
.page-count { color: var(--muted); white-space: nowrap; }
.page-count b { color: var(--text); font-size: 22px; font-weight: 700; margin-right: 4px; }
.page-actions { display: flex; align-items: center; gap: 12px; }
.stamp { color: var(--muted); font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font: 600 14px var(--font);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-strong); }

/* ---------- метки ---------- */
.pill {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 9px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
  background: var(--grey-soft); color: var(--grey);
}
.pill::before {
  content: ""; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%;
  background: currentColor; opacity: .85;
}
.st-active, .st-works, .st-ok { background: var(--ok-soft); color: var(--ok); }
.st-pending, .st-in_progress { background: var(--warn-soft); color: var(--warn); }
.st-moderation, .st-new, .st-info { background: var(--info-soft); color: var(--info); }
.st-unclear, .st-paused { background: var(--grey-soft); color: var(--grey); }
.st-banned, .st-broken { background: var(--bad-soft); color: var(--bad); }
.st-email_taken { background: var(--violet-soft); color: var(--violet); }
.st-email_banned, .st-rejected { background: var(--rose-soft); color: var(--rose); }
.st-deleted, .st-hold, .st-wrong_password { background: #f3e9e1; color: #9a5a2e; }
.st-p-posted { background: var(--ok-soft); color: var(--ok); }
.st-p-moderation { background: var(--info-soft); color: var(--info); }
.st-p-deleted { background: #f3e9e1; color: #9a5a2e; }
.st-p-error { background: var(--warn-soft); color: var(--warn); }
.st-q-need_comment { background: var(--grey-soft); color: var(--grey); }
.st-q-commented { background: var(--info-soft); color: var(--info); }
.st-q-ready { background: var(--ok-soft); color: var(--ok); }
.st-q-posting { background: var(--warn-soft); color: var(--warn); }
.st-q-check { background: var(--violet-soft); color: var(--violet); }
.st-when { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; font-weight: 600; white-space: nowrap; }

/* ---------- свежесть данных ---------- */
.sync {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  color: #c9dccf; font-size: 12.5px; font-weight: 600;
  white-space: nowrap;
}
.sync:hover { color: #fff; text-decoration: none; border-color: rgba(255, 255, 255, .3); }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: #9aa9a0; }
.sync-ok i { background: #5fd08f; box-shadow: 0 0 0 3px rgba(95, 208, 143, .18); }
.sync-running i { background: #7fb6e8; animation: pulse 1.2s ease-in-out infinite; }
.sync-stale { color: #f1d29a; }
.sync-stale i { background: #e2a83c; }
.sync-bad { color: #ffb4ab; border-color: rgba(255, 140, 128, .45); }
.sync-bad i { background: #ef6a5d; }
@keyframes pulse { 50% { opacity: .35; } }
.sync-inline { margin-left: 0; border-color: var(--line-strong); color: var(--text); background: var(--surface-2); }
.sync-inline.sync-stale { color: var(--warn); }
.sync-inline.sync-bad { color: var(--bad); }

.engine {
  display: inline-flex; align-items: center;
  height: 20px; padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  color: var(--muted); background: var(--surface);
  white-space: nowrap;
}
.eng-crowd { color: #1f7a74; border-color: #b9dcd8; background: #eef8f7; }
.eng-xenforo { color: #b2561b; border-color: #efcfb6; background: #fdf3ec; }
.eng-discourse { color: #4a55a8; border-color: #cdd1ef; background: #f1f2fc; }
.eng-phpbb { color: #6c6f75; border-color: #dadcdf; background: #f4f5f6; }

.num { font-weight: 650; }
.num-ok { color: var(--ok); }
.num-warn { color: var(--warn); }
.num-bad { color: var(--bad); }
.num-zero { color: #b8c2bb; font-weight: 400; }
.num-rose { color: #9a5a2e; }
.num-accent { color: var(--accent); }
.note-bad { color: var(--warn); }
.note {
  display: inline-block; max-width: 360px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
  color: var(--muted); font-size: 12.5px;
}
.date { color: var(--muted); white-space: nowrap; }
.ext { white-space: nowrap; font-weight: 600; }
.domain-link { font-weight: 600; color: var(--text); }
.domain-link:hover { color: var(--accent); }

/* ---------- KPI ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.kpi {
  position: relative;
  padding: 16px 18px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--kpi, var(--accent)); }
.kpi-label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi-value { margin-top: 6px; font-size: 30px; font-weight: 750; line-height: 1.05; color: var(--kpi-text, var(--text)); }
.kpi-hint { margin-top: 4px; color: var(--muted); font-size: 12px; }
.tone-accent { --kpi: var(--accent); }
.tone-ok { --kpi: var(--ok); --kpi-text: var(--ok); }
.tone-warn { --kpi: #d89a2b; }
.tone-info { --kpi: var(--info); }
.tone-violet { --kpi: var(--violet); }
.tone-bad { --kpi: var(--bad); --kpi-text: var(--bad); }
.tone-rose { --kpi: #c07a45; }
.tone-muted { --kpi: #9aa9a0; }
a.kpi { color: inherit; transition: transform .12s, box-shadow .12s; }
a.kpi:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(20, 35, 27, .06), 0 10px 26px rgba(20, 35, 27, .1); }

/* ---------- LIVE ---------- */
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.live-main { overflow: hidden; }
.live-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 78px; }
.side-card { padding: 16px 18px; }
.side-card h3 { font-size: 14px; margin-bottom: 12px; }

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.search { flex: 1 1 220px; }
.search input, .filters input[type=text], .filters select {
  width: 100%; height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: 14px var(--font);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input { padding-left: 34px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236a7a70' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") 11px 50% no-repeat; }
.search input:focus, .filters input:focus, .filters select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61, 107, 85, .15); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: #e7ece6; border-radius: 10px; }
.seg button {
  height: 30px; padding: 0 12px;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  font: 600 13px var(--font);
  cursor: pointer;
}
.seg button:hover { color: var(--text); }
.seg button.is-on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(20, 35, 27, .14); }

.switch { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch-ui { position: relative; width: 34px; height: 20px; border-radius: 999px; background: #cfd8d1; transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(14px); }

.dhead, .drow > summary {
  display: grid;
  grid-template-columns: 18px minmax(240px, 2.3fr) minmax(150px, 1.3fr) repeat(6, 66px);
  align-items: center;
  gap: 12px;
  padding: 0 18px;
}
.dhead {
  height: 38px;
  color: var(--muted);
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--line);
}
.c-num { text-align: right; font-variant-numeric: tabular-nums; }
.drow { border-bottom: 1px solid var(--line); }
.drow > summary {
  min-height: 50px;
  cursor: pointer;
  list-style: none;
  transition: background .12s;
}
.drow > summary::-webkit-details-marker { display: none; }
.drow > summary:hover { background: #f6faf7; }
.drow[open] > summary { background: var(--accent-soft); }
.drow.is-flash > summary { animation: flash 1.8s ease-out; }
@keyframes flash { 0% { background: #c8e6d4; } 100% { background: var(--accent-soft); } }
.chev { width: 8px; height: 8px; border-right: 2px solid #93a39a; border-bottom: 2px solid #93a39a; transform: rotate(-45deg); transition: transform .15s; margin-left: 2px; }
.drow[open] .chev { transform: rotate(45deg); border-color: var(--accent); }
.d-main { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; padding: 8px 0; }
.d-name { font-weight: 650; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; }
.d-run { color: var(--muted); font-size: 12px; }
.d-bar { display: flex; align-items: center; gap: 10px; }
.bar { flex: 1; display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #edf1ec; }
.bar i { display: block; height: 100%; }
.seg-active { background: #3fa46c; }
.seg-waiting { background: #e2a83c; }
.seg-unclear { background: #b7c0bb; }
.seg-refused { background: #a57bd1; }
.seg-lost { background: #c9915f; }
.seg-banned { background: #d6574c; }
.bar-total { min-width: 34px; text-align: right; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.bar-none { color: #a9b4ad; font-size: 12.5px; }
.drow .c-num { font-weight: 650; font-size: 14px; }
.n-active { color: var(--ok); }
.n-waiting { color: var(--warn); }
.n-refused { color: var(--violet); }
.n-banned { color: var(--bad); }
.n-posts { color: var(--accent); }
.n-queue { color: var(--info); }
.n-lost { color: #9a5a2e; }
.n-err { color: var(--warn); }
.is-zero { color: #c1cbc4 !important; font-weight: 400 !important; }

.accs { padding: 6px 18px 18px 48px; background: #fbfcfb; border-top: 1px solid var(--line); }
.d-note { margin: 8px 0 10px; color: var(--muted); font-size: 12.5px; }
.accs-body > p { padding: 10px 0; }
.dfoot { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; color: var(--text); font-size: 13px; font-weight: 600; background: var(--surface-2); }
.dfoot .muted { font-weight: 400; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

.copy {
  max-width: 100%;
  padding: 2px 6px; margin: -2px -6px;
  border: 0; border-radius: 6px;
  background: transparent; color: var(--text);
  font: inherit; text-align: left;
  cursor: copy;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy:hover { background: var(--accent-soft); }

table.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
table.mini th { color: var(--muted); font-size: 11.5px; font-weight: 600; text-align: right; padding: 0 0 8px; }
table.mini td { padding: 7px 0; border-top: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
table.mini td:first-child, table.mini th:first-child { text-align: left; }
table.mini td.n-active { font-weight: 700; }

.runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.runs li { display: flex; gap: 10px; align-items: flex-start; }
.run-main { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.run-main .muted { font-size: 12px; }
.run-err { color: var(--bad); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  padding: 10px 16px; border-radius: 10px;
  background: var(--top); color: #fff; font-weight: 600; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  z-index: 50;
}

/* ---------- таблицы ---------- */
.table-card { overflow: hidden; }
.table-wrapper { overflow-x: auto; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.grid th {
  position: sticky; top: 0;
  padding: 11px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  text-align: left; white-space: nowrap;
}
table.grid th a { color: var(--muted); }
table.grid th a:hover, table.grid th a.is-sorted { color: var(--accent-strong); text-decoration: none; }
table.grid th .arrow { color: var(--accent); }
table.grid td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tbody tr:nth-child(even) td { background: #fbfcfb; }
table.grid tbody tr:hover td { background: #f1f7f3; }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid td.type-int, table.grid td.type-float { text-align: right; font-variant-numeric: tabular-nums; }
table.grid td.type-none { color: #c1cbc4; }
table.grid td.type-none::after { content: "—"; }
.grid-inner { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.grid-inner th { position: static; }

/* ---------- фильтры и быстрые кнопки ---------- */
.facets { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.facet { display: flex; align-items: flex-start; gap: 14px; }
.facet-name { flex: 0 0 90px; padding-top: 6px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600; font-size: 13px;
  transition: border-color .12s, box-shadow .12s;
}
.chip:hover { border-color: var(--accent); text-decoration: none; color: var(--text); box-shadow: 0 1px 4px rgba(20, 35, 27, .08); }
.chip-n { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.is-on .chip-n { color: rgba(255, 255, 255, .8); }
.chip[class*=" st-"]:not(.is-on) { border-color: transparent; }
.chip-x { font-size: 11px; opacity: .85; }

.filters { padding: 14px 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters select { width: auto; min-width: 170px; padding-right: 30px; appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236a7a70' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E") right 10px center no-repeat; cursor: pointer; }
.filters input[type=text] { flex: 1 1 220px; width: auto; }

.pager { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }

.error-card { max-width: 560px; margin: 40px auto; padding: 32px; text-align: center; }
.error-card h1 { font-size: 24px; margin-bottom: 10px; }
.error-card p { color: var(--muted); margin-bottom: 20px; }
.error-text { font-family: var(--mono); font-size: 12.5px; color: var(--bad) !important; }

/* ---------- вход ---------- */
.page-login { background: radial-gradient(1200px 600px at 50% -10%, #dfeee4, var(--bg)); }
.login-wrap { flex: 1; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; padding: 30px 30px 24px; display: flex; flex-direction: column; gap: 14px; }
.login-brand { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.login-brand .brand-mark { color: #fff; }
.login-brand b { color: var(--text); letter-spacing: .06em; }
.login-card h1 { font-size: 24px; font-weight: 750; }
.login-card label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.login-card input {
  height: 42px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: 15px var(--font); outline: none;
}
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61, 107, 85, .15); }
.login-btn { justify-content: center; height: 42px; margin-top: 4px; }
.login-error { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bad-soft); color: var(--bad); font-size: 13px; }
.login-error code { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.login-note { color: var(--muted); font-size: 12px; text-align: center; }
.user-chip { display: inline-flex; align-items: center; gap: 10px; color: #c9dccf; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.user-chip a { color: #9db5a6; }
.user-chip a:hover { color: #fff; }

/* ---------- статистика ---------- */
.pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 14px; }
.card-head h2, .toolbar-title { font-size: 16px; font-weight: 700; }
.toolbar-title { margin-right: 6px; }
.foot-note { margin-top: 12px; color: var(--muted); font-size: 12px; }
.stats-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); gap: 20px; margin-bottom: 20px; align-items: start; }
.stats-grid.even { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }

.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; }
.lg-posts, .b-posts { background: #3fa46c; }
.lg-errors, .b-errors { background: #e2b45c; }
.lg-bans, .b-bans { background: #d6574c; }
.lg-lost, .b-lost { background: #c9915f; }
.chart { display: flex; align-items: stretch; gap: 6px; height: 230px; padding-top: 6px; border-bottom: 1px solid var(--line); }
.wk { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.wk-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding: 0 2px; border-radius: 6px 6px 0 0; transition: background .12s; }
.wk:hover .wk-bars { background: #f1f6f2; }
.wk-bars i { flex: 1; max-width: 11px; min-height: 0; border-radius: 3px 3px 0 0; }
.wk-n { height: 18px; text-align: center; font-size: 11.5px; color: var(--bad); }
.wk-n span { color: #c8d0ca; }
.wk-label { padding: 4px 0 6px; text-align: center; color: var(--muted); font-size: 11px; white-space: nowrap; }

.rate { display: inline-block; min-width: 52px; padding: 1px 7px; border-radius: 6px; background: var(--grey-soft); color: var(--grey); font-weight: 650; font-size: 12.5px; text-align: right; }
.rate-mid { background: var(--warn-soft); color: var(--warn); }
.rate-hi { background: var(--bad-soft); color: var(--bad); }
.hbar { display: inline-block; vertical-align: middle; width: 70px; height: 6px; margin-right: 10px; border-radius: 999px; background: #f1ecea; overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 999px; background: #d6574c; }
.hbar i.warn { background: #e2b45c; }
.hbar.wide { width: 100%; margin: 4px 0 0; grid-column: 1 / -1; }

.bans-card { overflow: hidden; }
.bans-card .table-wrapper { max-height: 620px; overflow: auto; }
#btable th[data-sort] { cursor: pointer; user-select: none; }
#btable th[data-sort]:hover, #btable th.is-sorted { color: var(--accent-strong); }
#btable th.is-sorted::after { content: " ↕"; color: var(--accent); }
#btable td.c-num, #btable th.c-num { text-align: right; }

.reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.reasons li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; font-size: 13px; }
.r-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-n { font-weight: 700; font-variant-numeric: tabular-nums; }

.source-card { margin-top: 20px; }
.source-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 26px; }
.source-grid h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.source-grid p { font-size: 13.5px; margin-bottom: 8px; }
.src-list { margin: 0 0 10px; padding-left: 18px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.facts dd.bad { color: var(--bad); font-weight: 500; }
.summary-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.summary-chips .chip { height: 26px; font-size: 12px; cursor: default; }

@media (max-width: 1180px) {
  .stats-grid, .stats-grid.even, .source-grid { grid-template-columns: 1fr; }
  .live-grid { grid-template-columns: 1fr; }
  .live-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { gap: 12px; padding: 0 14px; }
  .brand-sub, .sync span { display: none; }
  .content { padding: 18px 14px 30px; }
  .dhead { display: none; }
  .drow > summary { grid-template-columns: 18px 1fr repeat(3, 44px); }
  .drow .d-bar, .drow .n-refused, .drow .n-posts, .drow .n-queue { display: none; }
  .accs { padding-left: 18px; }
}
