:root {
  --bg: #16181b;
  --panel: #1e2125;
  --panel2: #262a2f;
  --line: #33383e;
  --text: #e6e8ea;
  --muted: #9aa1a8;
  --accent: #1aa7db;
  --ok: #3fb950;
  --warn: #d29922;
  --bad: #f85149;
  --info: #58a6ff;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.top { display: flex; align-items: center; gap: 24px; padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { color: var(--text); font-weight: 600; font-size: 16px; }
.logo { background: var(--accent); color: #fff; padding: 2px 6px; border-radius: 4px; margin-right: 4px; }
nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
nav a { color: var(--muted); padding: 6px 10px; border-radius: 6px; }
nav a.active, nav a:hover { color: var(--text); background: var(--panel2); text-decoration: none; }
.who { color: var(--muted); display: flex; align-items: center; gap: 8px; }
main { padding: 20px; max-width: 1400px; margin: 0 auto; }
h1 { font-size: 20px; margin: 0 0 16px; font-weight: 600; }
h2 { font-size: 15px; margin: 24px 0 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.card .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.card .v { font-size: 24px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.card .s { color: var(--muted); font-size: 12px; margin-top: 4px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12px; background: var(--panel2); position: sticky; top: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--panel2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.wrap { white-space: normal; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); }
.b-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.b-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.b-bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.b-info { color: var(--info); border-color: color-mix(in srgb, var(--info) 50%, transparent); }
.b-accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
button, .btn { background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 6px 12px; font: inherit; cursor: pointer; }
button:hover { filter: brightness(1.1); }
button:disabled { opacity: .5; cursor: default; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.danger { background: var(--bad); }
button.small { padding: 2px 8px; font-size: 12px; }
form.fields { display: grid; grid-template-columns: 160px 1fr; gap: 8px 12px; align-items: center; }
form.fields label { color: var(--muted); }
form.fields .full { grid-column: 1 / -1; }
input, select, textarea { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: inherit; width: 100%; }
input[type=checkbox] { width: auto; height: 18px; width: 18px; }
textarea { min-height: 60px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
dl.kv { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-all; }
.actions li { margin-bottom: 6px; }
ul.actions { list-style: none; padding: 0; margin: 0; }
ul.actions li { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
ul.actions li .msg { flex: 1; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px; max-width: 90vw; z-index: 10; }
#toast.err { border-color: var(--bad); color: var(--bad); }
pre.details { margin: 0; font-size: 12px; white-space: pre-wrap; color: var(--muted); max-width: 600px; }
