:root {
  --bg: #090d16; --panel: #111827; --panel2: #0c1220; --line: #1f2a3d; --text: #e5e9f2; --muted: #8592a8;
  --accent: #7c5cff; --ok: #22c55e; --bad: #ef4444; --warn: #f59e0b;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
body.center { min-height: 100vh; display: grid; place-items: center; }
h1 { font-size: 20px; margin: 0; } h1 span { color: var(--accent); font-weight: 500; }
h2 { font-size: 15px; margin: 0 0 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.login { width: 320px; display: grid; gap: 14px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
input, select, textarea { background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 8px;
  padding: 8px 10px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.btn { background: #1b2436; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px;
  cursor: pointer; font: inherit; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: #fca5a5; } .btn.danger:hover { border-color: var(--bad); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.err { color: #fca5a5; min-height: 1em; margin: 0; }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; }
main { max-width: 1100px; margin: 0 auto; padding: 20px 24px 60px; display: grid; gap: 22px; }
.stats { display: flex; gap: 18px; color: var(--muted); font-size: 13px; } .stats b { color: var(--text); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > label { flex: 1 1 160px; }
.user { display: grid; gap: 12px; }
.user + .user { margin-top: 14px; }
.user-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.user-head .name { font-size: 16px; font-weight: 600; }
.user-head .notes { color: var(--muted); flex: 1; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.pill.ok { color: var(--ok); border-color: #14532d; } .pill.bad { color: #fca5a5; border-color: #7f1d1d; }
.pill.warn { color: var(--warn); border-color: #78350f; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 12px; border-top: 0; }
td.mono, .mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
td.muted, .muted { color: var(--muted); font-size: 12px; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.switch { position: relative; width: 38px; height: 22px; display: inline-block; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #374151; border-radius: 99px; cursor: pointer; transition: .15s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff;
  border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(16px); }
.empty { color: var(--muted); padding: 10px 0; }
.inline-form { display: none; gap: 8px; flex-wrap: wrap; align-items: end; padding: 12px; background: var(--panel2);
  border-radius: 8px; border: 1px dashed var(--line); }
.inline-form.open { display: flex; }
.inline-form label { flex: 1 1 150px; }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 14px; opacity: 0; transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; } .toast.bad { border-color: var(--bad); }
details summary { cursor: pointer; color: var(--muted); }
code.key { word-break: break-all; display: block; margin-top: 8px; padding: 8px; background: var(--panel2); border-radius: 6px; }
@media (max-width: 700px) { .hide-sm { display: none; } header, main { padding-left: 12px; padding-right: 12px; } }
