:root {
  --bg: #0f1419;
  --panel: #1a222c;
  --line: #2a3542;
  --text: #e7eef6;
  --muted: #8aa0b5;
  --ok: #3ecf8e;
  --warn: #f0b429;
  --crit: #ef5d5d;
  --info: #7ea2c4;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", "PingFang SC", sans-serif; }
a { color: #9ec3ff; text-decoration: none; }
.top {
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: #121820; position: sticky; top: 0;
}
.top nav { display: flex; gap: 14px; }
.top nav a.active { color: var(--ok); }
main { padding: 16px; }
.muted { color: var(--muted); }
.ghost, button, select, input, textarea {
  background: #10161d; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px;
}
button { cursor: pointer; }
button.primary { background: #1e3d32; border-color: #2e6b54; }
button:disabled, .disabled { opacity: 0.45; cursor: not-allowed; }
.err { color: var(--crit); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card, .stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px;
}
.stat b { display: block; font-size: 20px; margin-top: 4px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.ok { background: #163528; color: var(--ok); }
.warn { background: #3a2e10; color: var(--warn); }
.crit { background: #3a1515; color: var(--crit); }
.info { background: #1a2836; color: var(--info); }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
pre {
  background: #0b0f14; border: 1px solid var(--line); padding: 10px; overflow: auto; max-height: 420px;
  font-size: 12px; white-space: pre-wrap;
}
.login {
  position: fixed; inset: 0; background: rgba(0,0,0,.72); display: grid; place-items: center; z-index: 9;
}
.login.hidden { display: none; }
.login-card { width: 320px; background: var(--panel); padding: 24px; border-radius: 12px; display: grid; gap: 10px; }
h1, h2, h3 { margin: 0 0 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.note { font-size: 12px; color: var(--muted); }
canvas { width: 100%; height: 64px; }
.group-h { margin: 18px 0 8px; color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.actions button { margin-right: 6px; }
