:root {
  --bg: #0e1116; --panel: #161b22; --panel2: #1c232d; --border: #2a333f;
  --text: #e6edf3; --muted: #8b98a5; --accent: #f5a623; --accent2: #2f81f7;
  --ok: #3fb950; --warn: #d29922; --crit: #f85149; --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; background: var(--panel); border-right: 1px solid var(--border);
  padding: 18px 14px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { font-size: 16px; font-weight: 700; color: var(--accent); letter-spacing: .5px; margin-bottom: 4px; }
.brand small { display:block; color: var(--muted); font-weight: 400; font-size: 11px; letter-spacing: 0; }
.nav { margin-top: 18px; display: flex; flex-direction: column; gap: 2px; }
.nav a { color: var(--text); padding: 8px 10px; border-radius: 7px; font-size: 13px; }
.nav a:hover { background: var(--panel2); text-decoration: none; }
.nav a.active { background: var(--accent2); color: #fff; }
.nav .sep { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; margin: 14px 0 4px 10px; }
.main { flex: 1; padding: 26px 32px; max-width: 1200px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 26px 0 10px; color: var(--text); }
.sub { color: var(--muted); margin: 0 0 22px; font-size: 13px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 3px; }
input, select, textarea {
  width: 100%; background: var(--panel2); border: 1px solid var(--border); color: var(--text);
  border-radius: 7px; padding: 7px 9px; font: inherit;
}
textarea { min-height: 70px; resize: vertical; font-family: ui-monospace, monospace; font-size: 12px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent2); }
button, .btn {
  background: var(--accent2); color: #fff; border: none; border-radius: 7px;
  padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer;
}
button:hover, .btn:hover { filter: brightness(1.1); text-decoration: none; }
button.ghost, .btn.ghost { background: var(--panel2); border: 1px solid var(--border); color: var(--text); }
button.danger { background: var(--crit); }
button.warn { background: var(--warn); color: #111; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge.ok { background: rgba(63,185,80,.15); color: var(--ok); }
.badge.warn { background: rgba(210,153,34,.15); color: var(--warn); }
.badge.crit { background: rgba(248,81,73,.15); color: var(--crit); }
.badge.muted { background: var(--panel2); color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.pill { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); background: var(--panel2); padding: 2px 7px; border-radius: 6px; }
.toast {
  position: fixed; bottom: 20px; right: 20px; background: var(--ok); color: #fff;
  padding: 12px 18px; border-radius: 9px; font-weight: 600; opacity: 0; transition: opacity .2s;
  z-index: 999; box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.toast.show { opacity: 1; }
.toast.err { background: var(--crit); }
.muted { color: var(--muted); }
.swatch { width: 20px; height: 20px; border-radius: 5px; border: 1px solid var(--border); display: inline-block; vertical-align: middle; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { background: var(--panel2); border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.chip button { background: none; padding: 0; color: var(--muted); font-weight: 700; }
canvas { background: #000; border: 1px solid var(--border); border-radius: 8px; max-width: 100%; cursor: crosshair; }
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { width: 320px; }
pre.json { background: #0a0d11; padding: 14px; border-radius: 8px; overflow: auto; font-size: 12px; max-height: 480px; border: 1px solid var(--border); }
