:root {
  --bg: #0f1116; --panel: #171a21; --panel2: #1e222b; --line: #2a2f3a; --text: #eef0f4; --muted: #9aa1ae; --subtle: #6b7280;
  --brand: #237fff; --ok: #12b886; --warn: #f2b01e; --down: #f75555; --nd: #7c8595;
  --radius: 12px; font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
button, input, select { font: inherit; }
.wrap { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
nav.side { background: var(--panel); border-right: 1px solid var(--line); padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -.3px; padding: 4px 10px 18px; }
.logo span { color: var(--brand); } .logo small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
nav.side a { color: var(--muted); text-decoration: none; padding: 9px 10px; border-radius: 8px; font-weight: 600; display: flex; justify-content: space-between; }
nav.side a:hover { background: var(--panel2); color: var(--text); }
nav.side a.active { background: rgba(35,127,255,.14); color: var(--brand); }
nav.side .grow { flex: 1; }
nav.side .me { color: var(--muted); font-size: 12px; padding: 10px; border-top: 1px solid var(--line); }
main { padding: 28px 32px 60px; max-width: 1280px; width: 100%; }
h1 { font-size: 24px; margin: 0 0 4px; } h2 { font-size: 16px; margin: 28px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--panel2); color: var(--muted); white-space: nowrap; }
.pill.ok { background: rgba(18,184,134,.14); color: var(--ok); } .pill.warn { background: rgba(242,176,30,.14); color: var(--warn); }
.pill.down { background: rgba(247,85,85,.16); color: var(--down); } .pill.not_deployed { background: rgba(124,133,149,.16); color: var(--nd); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.down { background: var(--down); box-shadow: 0 0 0 3px rgba(247,85,85,.25); } .dot.not_deployed { background: var(--nd); }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tile .n { font-size: 26px; font-weight: 800; } .tile .l { color: var(--muted); font-size: 12px; font-weight: 600; }
.tile.down .n { color: var(--down); } .tile.warn .n { color: var(--warn); } .tile.ok .n { color: var(--ok); }
.group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.group h3 { margin: 0; padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.check { display: grid; grid-template-columns: 16px minmax(180px, 1.1fr) 2fr auto; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.check:first-of-type { border-top: 0; } .check .d { color: var(--muted); overflow-wrap: anywhere; } .check .name { font-weight: 600; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; font-weight: 700; border-top: 0; background: var(--panel2); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; }
.empty { color: var(--muted); padding: 18px; background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }
button.btn { background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 9px 14px; font-weight: 700; cursor: pointer; }
button.btn.ghost { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
button.btn.danger { background: rgba(247,85,85,.16); color: var(--down); }
button.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; }
label { display: grid; gap: 6px; font-weight: 600; color: var(--muted); font-size: 12px; }
.form { display: grid; gap: 12px; max-width: 460px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.err { color: var(--down); font-weight: 600; } .okmsg { color: var(--ok); font-weight: 600; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: 100%; max-width: 400px; display: grid; gap: 14px; }
.qr { background: #fff; padding: 12px; border-radius: 10px; justify-self: center; } .qr img { display: block; width: 200px; height: 200px; image-rendering: pixelated; }
code { background: var(--panel2); padding: 2px 6px; border-radius: 6px; font-size: 12px; overflow-wrap: anywhere; }
.muted { color: var(--muted); } .row { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; } .tabs button { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; font-weight: 700; cursor: pointer; }
.tabs button.active { color: var(--brand); border-color: var(--brand); }
@media (max-width: 860px) {
  .wrap { grid-template-columns: 1fr; } nav.side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  nav.side .logo { width: 100%; padding-bottom: 6px; } nav.side .grow { display: none; } nav.side .me { width: 100%; border: 0; }
  main { padding: 18px 16px 40px; } .summary { grid-template-columns: repeat(2, 1fr); }
  .check { grid-template-columns: 16px 1fr; } .check .d, .check .t { grid-column: 2; }
}
