:root {
  --bg: #0e1330; --panel: #131a3a; --panel2: #18204a; --line: #262f63; --text: #eef0fa; --muted: #9aa0c3;
  --brand: #3b82f6; --brand2: #8b5cf6; --ok: #22c55e; --warn: #f59e0b; --bad: #ef4444; --info: #38bdf8;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", system-ui, sans-serif; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
nav.side { background: #0d1330; border-right: 1px solid var(--line); padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand img { width: 30px; height: 30px; }
.brand b { font-size: 15px; letter-spacing: 1.5px; } .brand small { display: block; color: var(--muted); font-size: 10px; letter-spacing: 2px; }
.navgroup { color: var(--muted); font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 14px 10px 6px; }
nav.side a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13.5px; }
nav.side a:hover { background: var(--panel); } nav.side a.on { background: linear-gradient(90deg, rgba(59,130,246,.25), rgba(139,92,246,.15)); color: #fff; }
main { padding: 22px 28px 60px; min-width: 0; }
header.top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
header.top h1 { font-size: 22px; margin: 0; flex: 1; }
.who { color: var(--muted); font-size: 12.5px; text-align: right; } .who b { color: var(--text); }
.lead { color: var(--muted); margin: -8px 0 18px; max-width: 900px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; min-width: 0; overflow: hidden; }
td { overflow-wrap: anywhere; }
td.nowrap, .nowrap { overflow-wrap: normal; }
.card h2 { font-size: 15px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card h2 .sp { flex: 1; }
.kpi .v { font-size: 28px; font-weight: 700; } .kpi .l { color: var(--muted); font-size: 12.5px; } .kpi .s { color: var(--muted); font-size: 12px; margin-top: 4px; }
.kpi.accent { background: linear-gradient(135deg, rgba(59,130,246,.35), rgba(139,92,246,.25)); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 7px 8px; border-bottom: 1px solid var(--line); }
td { padding: 8px; border-bottom: 1px solid rgba(38,47,99,.6); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.pill { white-space: nowrap; overflow-wrap: normal; display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; background: var(--panel2); border: 1px solid var(--line); }
.pill.ok { color: var(--ok); border-color: rgba(34,197,94,.4); } .pill.warn { color: var(--warn); border-color: rgba(245,158,11,.4); }
.pill.bad { color: var(--bad); border-color: rgba(239,68,68,.45); } .pill.info { color: var(--info); border-color: rgba(56,189,248,.4); }
.btn { border: 1px solid var(--line); background: var(--panel2); padding: 7px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { border-color: var(--brand); } .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn.danger { color: var(--bad); border-color: rgba(239,68,68,.45); } .btn.small { padding: 3px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
label.f { display: block; margin-bottom: 12px; } label.f > span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
input[type=text], input[type=url], input[type=email], input[type=number], select, textarea {
  width: 100%; background: #0e1430; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; outline: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { min-height: 110px; font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; }
textarea.json { min-height: 420px; }
.toggle { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--brand); }
.toggle small { display: block; color: var(--muted); }
.note { background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.35); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.note.warn { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.4); } .note.bad { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.45); }
.msg { position: fixed; right: 18px; bottom: 18px; background: #1f2a5c; border: 1px solid var(--brand); padding: 10px 14px; border-radius: 10px; max-width: 420px; z-index: 9; }
.msg.err { border-color: var(--bad); }
.list .item { display: grid; gap: 8px; grid-template-columns: repeat(var(--cols, 2), 1fr) auto; margin-bottom: 8px; align-items: center; }
.bar { height: 8px; background: var(--panel2); border-radius: 4px; overflow: hidden; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand2)); }
.muted { color: var(--muted); } .mono { font-family: Consolas, monospace; font-size: 12px; } .nowrap { white-space: nowrap; }
.scope { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; } .scope select { width: auto; min-width: 220px; }
.token { font-family: Consolas, monospace; background: #0e1430; border: 1px dashed var(--brand); border-radius: 8px; padding: 10px; word-break: break-all; }
.signin { max-width: 460px; margin: 12vh auto; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.signin img { width: 56px; } .signin h1 { margin: 12px 0 6px; letter-spacing: 2px; } .signin p { color: var(--muted); }
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } nav.side { position: static; height: auto; } main { padding: 16px; } }
