:root {
  --bg: #0f1419;
  --panel: #1a222c;
  --line: #2a3542;
  --text: #e8eef4;
  --muted: #8b9aab;
  --accent: #3d9cf0;
  --ok: #3cb371;
  --err: #e35d6a;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, Segoe UI, sans-serif; }
a { color: var(--accent); text-decoration: none; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { font-weight: 700; letter-spacing: .04em; }
.nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--muted); }
.nav a.active { color: var(--text); }
#main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
h1, h2 { margin: 0 0 12px; font-size: 22px; }
h2 { font-size: 18px; }
.muted { color: var(--muted); }
label { display: block; margin: 10px 0 4px; color: var(--muted); font-size: 13px; }
input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: #0f1419; color: var(--text); }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn { appearance: none; border: 0; background: var(--accent); color: #081018; font-weight: 600; padding: 9px 14px; border-radius: 8px; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--err); color: #fff; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.metric { background: #121922; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.metric b { display: block; font-size: 20px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #223041; font-size: 12px; }
.badge.ok { background: #1d3a2a; color: #9ee2b8; }
.badge.warn { background: #3a3420; color: #f0d48a; }
.badge.off { background: #3a2228; color: #f0b4b8; }
#toastHost { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px; z-index: 20; }
#toastHost.err { border-color: var(--err); }
.hidden { display: none !important; }
select { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: #0f1419; color: var(--text); }
textarea { width: 100%; min-height: 120px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: #0f1419; color: var(--text); font: 13px/1.4 ui-monospace, Consolas, monospace; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: #121922; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }
