:root { --bg: #0f1115; --panel: #171a21; --line: #2a2f3a; --text: #e7e9ee; --muted: #8a91a0; --accent: #e5484d;
  --ok: #30a46c; --warn: #f5a524; --err: #e5484d; --blue: #3e8bff; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
.hidden { display: none !important; }
h1 { font-size: 18px; margin: 0; letter-spacing: .3px; }
h2 { font-size: 16px; margin: 0 0 12px; }
header { display: flex; gap: 16px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line);
  background: var(--panel); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
nav { display: flex; gap: 4px; }
nav button { background: transparent; color: var(--muted); border: 0; padding: 6px 12px; border-radius: 6px; }
nav button.active { background: #242936; color: var(--text); }
.status { margin-left: auto; color: var(--muted); font-size: 12px; }
main { padding: 20px; max-width: 1500px; margin: 0 auto; }
button { background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 7px 14px; cursor: pointer; font: inherit; }
button.secondary { background: #2a3040; }
button.link { background: none; color: var(--muted); padding: 4px 6px; }
button.small { padding: 3px 9px; font-size: 12px; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { background: #0c0e12; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; font: inherit; width: 100%; }
textarea { min-height: 120px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
label { display: block; margin: 8px 0; color: var(--muted); font-size: 12px; }
label input, label select, label textarea { margin-top: 4px; color: var(--text); font-size: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.narrow { max-width: 360px; margin: 12vh auto; }
.error { color: var(--err); }
.muted { color: var(--muted); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #262b36; color: var(--muted); }
.pill.ok { background: rgba(48,164,108,.15); color: var(--ok); }
.pill.warn { background: rgba(245,165,36,.15); color: var(--warn); }
.pill.err { background: rgba(229,72,77,.15); color: var(--err); }
.pill.blue { background: rgba(62,139,255,.15); color: var(--blue); }
.switch { position: relative; display: inline-block; width: 38px; height: 21px; vertical-align: middle; }
.switch input { display: none; }
.switch span { position: absolute; inset: 0; background: #333a48; border-radius: 21px; transition: .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 15px; height: 15px; 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(17px); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 20px; width: min(640px, 94vw); }
dialog.wide { width: 96vw; max-width: 1400px; }
dialog::backdrop { background: rgba(0,0,0,.6); }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.vnc { width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: 8px; background: #000; }
.account-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.account-head .grow { flex: 1; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.ev-error td { color: #ff9ea1; }
.ev-warning td { color: #ffd38a; }
a { color: var(--blue); }
