:root {
  color-scheme: dark;
  --bg: #0c111d;
  --panel: #111827;
  --panel-2: #151f31;
  --line: #273449;
  --text: #eef2f7;
  --muted: #9ca8bb;
  --good: #3ddc97;
  --warn: #f7c948;
  --bad: #ff6b6b;
  --blue: #7cc7ff;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--blue); text-decoration: none; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--line); background: rgba(12, 17, 29, .94); backdrop-filter: blur(12px); }
h1, h2 { margin: 0; letter-spacing: 0; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
.eyebrow, .muted, .hero span, .metrics span { color: var(--muted); font-size: 13px; }
.topbar nav { display: flex; gap: 14px; }
.layout { width: min(1240px, calc(100% - 32px)); margin: 24px auto 48px; display: grid; gap: 18px; }
.hero, .grid { display: grid; gap: 14px; }
.hero { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero > div, .metrics article, .panel { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; }
.hero > div, .metrics article { padding: 16px; display: grid; gap: 7px; }
.hero strong, .metrics strong { font-size: 24px; }
.panel { overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; padding: 15px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.service-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; background: var(--panel); min-width: 0; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #263244; color: var(--text); }
.badge.good { color: #062115; background: var(--good); }
.badge.warn { color: #2a1d00; background: var(--warn); }
.badge.bad { color: #2b0505; background: var(--bad); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: #0f1726; }
.truncate { max-width: 520px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
pre { margin: 0; padding: 16px; max-height: 420px; overflow: auto; color: #d7dee9; line-height: 1.45; white-space: pre-wrap; }
.links { display: grid; gap: 10px; padding: 16px; }
.links a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #0f1726; font-weight: 700; }
.panel p { padding: 0 16px 16px; margin: 0; line-height: 1.5; }
.login-page { min-height: 100vh; display: grid; place-items: center; }
.login-shell { width: min(420px, calc(100% - 32px)); }
.login-card { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.brand { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: #0f1726; font: inherit; }
select { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: #0f1726; font: inherit; }
button { min-height: 42px; border: 0; border-radius: 8px; background: var(--blue); color: #05111d; font-weight: 800; cursor: pointer; }
.error { color: var(--bad); margin: 0; }
.notice { padding: 13px 16px; border: 1px solid var(--line); border-radius: 8px; background: #102238; color: var(--text); }
.inline-form { display: grid; grid-template-columns: 1fr 1fr 1.2fr auto; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.small-button { min-height: 34px; padding: 0 12px; }
.mini-list { padding: 0 16px 12px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; background: var(--panel); }
.manual-bans { display: flex; justify-content: space-between; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line); background: var(--panel-2); }

@media (max-width: 820px) {
  .hero, .grid.metrics, .grid.two, .service-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .inline-form { grid-template-columns: 1fr; }
}
