:root {
  --bg: #07080f;
  --bg-2: #0c0e1a;
  --panel: rgba(20, 23, 40, .62);
  --panel-solid: #121528;
  --panel-hi: rgba(32, 36, 62, .7);
  --line: rgba(148, 163, 255, .10);
  --line-hi: rgba(148, 163, 255, .22);
  --text: #e8eaf6;
  --muted: #8b90b0;
  --dim: #5b6082;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #22d3ee 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, .6);
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(139, 92, 246, .45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 255, .15); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

/* ---------- background ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .32; animation: drift 26s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { width: 640px; height: 640px; background: #6d28d9; top: -220px; left: -140px; }
.aurora span:nth-child(2) { width: 560px; height: 560px; background: #0e7490; bottom: -220px; right: -120px; animation-delay: -8s; }
.aurora span:nth-child(3) { width: 420px; height: 420px; background: #be185d; top: 40%; left: 45%; opacity: .14; animation-delay: -16s; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
@keyframes drift { to { transform: translate(80px, 60px) scale(1.15); } }
#app { position: relative; z-index: 1; }

/* ---------- primitives ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-hi); background: rgba(255,255,255,.04);
  cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap;
  transition: .18s ease; user-select: none;
}
.btn:hover { background: rgba(255,255,255,.08); border-color: rgba(148,163,255,.35); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--grad); border-color: transparent; color: white; box-shadow: 0 6px 24px -6px rgba(124, 58, 237, .7); }
.btn.primary:hover { filter: brightness(1.12); box-shadow: 0 8px 30px -6px rgba(124, 58, 237, .9); }
.btn.danger { color: var(--red); border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.06); }
.btn.danger:hover { background: rgba(248,113,113,.14); }
.btn.success { color: var(--green); border-color: rgba(52,211,153,.3); background: rgba(52,211,153,.07); }
.btn.success:hover { background: rgba(52,211,153,.15); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(255,255,255,.06); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 30px; }
.btn.block { width: 100%; height: 44px; font-size: 14px; }

.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 14px; border-radius: var(--radius-sm);
  background: rgba(8, 10, 22, .6); border: 1px solid var(--line-hi); outline: none; transition: .15s;
}
textarea.input { height: auto; min-height: 80px; padding: 10px 14px; resize: vertical; }
.input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139,92,246,.18); }
.input::placeholder { color: var(--dim); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: .02em; }
.hint { font-size: 12px; color: var(--dim); margin-top: 6px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.card h3 { margin: 0 0 14px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card h3 .sub { margin-left: auto; font-weight: 500; color: var(--muted); font-size: 12px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  background: rgba(148,163,255,.1); color: #c7cbf3; border: 1px solid var(--line);
}
.badge.green { background: rgba(52,211,153,.1); color: var(--green); border-color: rgba(52,211,153,.25); }
.badge.red { background: rgba(248,113,113,.1); color: var(--red); border-color: rgba(248,113,113,.25); }
.badge.amber { background: rgba(251,191,36,.1); color: var(--amber); border-color: rgba(251,191,36,.25); }
.badge.violet { background: rgba(139,92,246,.14); color: #c4b5fd; border-color: rgba(139,92,246,.3); }
.badge.cyan { background: rgba(34,211,238,.1); color: var(--cyan); border-color: rgba(34,211,238,.25); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; position: relative; }
.dot.running { background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot.running::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--green); opacity: 0; animation: ping 2s infinite; }
.dot.stopped { background: #6b7280; }
.dot.paused, .dot.pending { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.dot.error { background: var(--red); box-shadow: 0 0 8px var(--red); }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.bar { height: 6px; border-radius: 6px; background: rgba(148,163,255,.1); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bar.warn > i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.bar.crit > i { background: linear-gradient(90deg, #ef4444, #f472b6); }

.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hidden { display: none !important; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; position: relative; }
.auth-hero h1 { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -.035em; margin: 0 0 20px; font-weight: 800; }
.auth-hero p.lead { font-size: 17px; color: var(--muted); max-width: 480px; margin: 0 0 36px; }
.features { display: grid; gap: 14px; max-width: 460px; }
.feature { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.025); border: 1px solid var(--line); }
.feature .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(139,92,246,.15); color: #c4b5fd; flex: none; }
.feature .ic svg { width: 18px; height: 18px; }
.feature b { display: block; font-size: 14px; margin-bottom: 2px; }
.feature span { color: var(--muted); font-size: 13px; }
.auth-side { display: grid; place-items: center; padding: 32px 24px; }
.auth-card { width: 100%; max-width: 420px; padding: 32px; }
.auth-card h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.02em; }
.auth-card .sub { color: var(--muted); margin: 0 0 24px; }
.tabs { display: flex; padding: 4px; gap: 4px; background: rgba(8,10,22,.6); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 24px; }
.tabs button { flex: 1; height: 36px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--muted); transition: .2s; }
.tabs button.active { background: var(--panel-hi); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.logo-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 24px -4px rgba(124,58,237,.7); }
.logo-mark svg { width: 20px; height: 20px; }
.notice { padding: 12px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 16px; border: 1px solid; }
.notice.ok { background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.25); color: #a7f3d0; }
.notice.err { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.25); color: #fecaca; }
.notice.info { background: rgba(34,211,238,.07); border-color: rgba(34,211,238,.22); color: #a5f3fc; }
.pw-meter { display: flex; gap: 4px; margin-top: 8px; }
.pw-meter i { flex: 1; height: 4px; border-radius: 4px; background: rgba(148,163,255,.12); transition: .3s; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--line); background: rgba(7, 8, 15, .55); backdrop-filter: blur(20px);
}
.sidebar .logo { padding: 4px 10px 22px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); font-weight: 700; padding: 16px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 10px;
  color: var(--muted); font-weight: 500; transition: .15s; position: relative;
}
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav a.active { color: var(--text); background: linear-gradient(90deg, rgba(139,92,246,.18), rgba(34,211,238,.04)); }
.nav a.active::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav a .count { margin-left: auto; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: var(--amber); color: #1a1300; }
.side-foot { margin-top: auto; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: white; flex: none; background: var(--grad); text-transform: uppercase; }
.user-chip .who { min-width: 0; flex: 1; }
.user-chip .who b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .who span { font-size: 11px; color: var(--muted); }
.demo-pill { margin: 0 10px 12px; font-size: 11px; padding: 6px 10px; border-radius: 8px; background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.22); color: var(--amber); }

.main { min-width: 0; padding: 28px 36px 60px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 28px; letter-spacing: -.03em; font-weight: 800; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.crumbs a:hover { color: var(--text); }
.mobile-top { display: none; }

/* ---------- stat tiles ---------- */
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat .k svg { width: 15px; height: 15px; opacity: .8; }
.stat .v { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.stat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,.18), transparent 70%); }

/* ---------- server cards ---------- */
.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.srv { padding: 18px; display: flex; flex-direction: column; gap: 14px; transition: .2s; cursor: pointer; position: relative; overflow: hidden; }
.srv:hover { border-color: var(--line-hi); transform: translateY(-2px); box-shadow: 0 20px 50px -20px rgba(91, 33, 182, .5); }
.srv-head { display: flex; align-items: center; gap: 12px; }
.os-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(148,163,255,.08); border: 1px solid var(--line); flex: none; }
.os-ic svg { width: 22px; height: 22px; }
.srv-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-sub { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.metrics { display: grid; gap: 10px; }
.metric .lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.metric .lbl b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.srv-foot { display: flex; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.srv-foot .up { font-size: 12px; color: var(--muted); margin-right: auto; }
.srv.prov { cursor: default; }
.srv.prov .shimmer { height: 6px; border-radius: 6px; background: linear-gradient(90deg, rgba(139,92,246,.1), rgba(34,211,238,.6), rgba(139,92,246,.1)); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { padding: 56px 24px; text-align: center; }
.empty .art { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 24px; display: grid; place-items: center; background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.25); }
.empty .art svg { width: 38px; height: 38px; color: #c4b5fd; }
.empty h3 { justify-content: center; font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 20px; }

/* ---------- detail ---------- */
.detail-head { padding: 22px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.detail-head .os-ic { width: 56px; height: 56px; border-radius: 16px; }
.detail-head .os-ic svg { width: 28px; height: 28px; }
.detail-head h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.detail-head .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 4px; align-items: center; }
.power { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.subtabs a { padding: 10px 16px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.subtabs a svg { width: 16px; height: 16px; }
.subtabs a:hover { color: var(--text); }
.subtabs a.active { color: var(--text); border-image: var(--grad) 1; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: rgba(8,10,22,.6); border: 1px solid var(--line); }
.seg button { height: 28px; padding: 0 12px; border: 0; background: transparent; border-radius: 7px; color: var(--muted); font-weight: 600; font-size: 12px; cursor: pointer; }
.seg button.active { background: var(--panel-hi); color: var(--text); }

.chart { position: relative; height: 180px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; padding: 8px 10px; border-radius: 10px; font-size: 12px; background: rgba(12,14,28,.95); border: 1px solid var(--line-hi); white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .1s; z-index: 2; }
.chart .tip b { display: block; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 0; }
.kv > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv > div:nth-child(odd) { color: var(--muted); }
.kv > div:nth-child(even) { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }

.console-wrap { background: #000; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; min-height: 480px; display: grid; position: relative; }
.console-wrap .screen { width: 100%; height: 70vh; min-height: 480px; }
.console-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tbody tr { transition: background .15s; }
table.t tbody tr:hover { background: rgba(255,255,255,.025); }
table.t tr:last-child td { border-bottom: 0; }
table.t .actions-cell { text-align: right; white-space: nowrap; }
.toolbar { display: flex; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.toolbar .input { height: 36px; max-width: 280px; }
.search { position: relative; flex: 1; max-width: 300px; }
.search svg { position: absolute; left: 12px; top: 10px; width: 16px; height: 16px; color: var(--dim); }
.search .input { padding-left: 36px; max-width: none; }
.mini-bar { width: 80px; display: inline-block; vertical-align: middle; }

/* ---------- node gauges ---------- */
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gauge { text-align: center; }
.gauge svg { width: 100%; max-width: 130px; height: auto; }
.gauge .gv { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.gauge .gl { font-size: 12px; color: var(--muted); }
.feed { display: grid; gap: 2px; }
.feed-item { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: center; font-size: 13px; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(148,163,255,.08); flex: none; }
.feed-item .ic svg { width: 14px; height: 14px; }
.feed-item time { margin-left: auto; color: var(--dim); font-size: 12px; white-space: nowrap; }

/* ---------- create ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tpl { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.02); cursor: pointer; transition: .18s; position: relative; }
.tpl:hover { border-color: var(--line-hi); background: rgba(255,255,255,.04); }
.tpl.sel { border-color: var(--violet); background: rgba(139,92,246,.1); box-shadow: 0 0 0 3px rgba(139,92,246,.2); }
.tpl.sel::after { content: "✓"; position: absolute; top: 12px; right: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.tpl b { display: block; margin: 10px 0 4px; }
.tpl p { margin: 0; color: var(--muted); font-size: 12px; }
.range-row { display: flex; align-items: center; gap: 16px; }
.range-row .val { min-width: 90px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; height: 6px; border-radius: 6px; background: rgba(148,163,255,.12); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: white; border: 4px solid var(--violet); cursor: pointer; box-shadow: 0 0 0 4px rgba(139,92,246,.2); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: white; border: 4px solid var(--violet); cursor: pointer; }
.summary { position: sticky; top: 28px; }
.summary .line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary .line span { color: var(--muted); }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(3,4,10,.7); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .18s ease; }
.modal { width: 100%; max-width: 480px; background: var(--panel-solid); border: 1px solid var(--line-hi); border-radius: 18px; box-shadow: 0 30px 80px -10px rgba(0,0,0,.8); animation: pop .22s cubic-bezier(.2,.9,.3,1.2); max-height: calc(100vh - 32px); overflow: auto; }
.modal-h { padding: 20px 22px 0; display: flex; align-items: center; gap: 10px; }
.modal-h h3 { margin: 0; font-size: 17px; }
.modal-b { padding: 18px 22px; }
.modal-f { padding: 0 22px 20px; display: flex; gap: 10px; justify-content: flex-end; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.95) translateY(8px); } }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--line-hi); box-shadow: var(--shadow); display: flex; gap: 10px; align-items: flex-start; animation: slide .25s ease; font-size: 13px; }
.toast .ti { width: 20px; height: 20px; flex: none; }
.toast.ok .ti { color: var(--green); } .toast.err .ti { color: var(--red); } .toast.info .ti { color: var(--cyan); }
.toast.out { opacity: 0; transform: translateX(20px); transition: .3s; }
@keyframes slide { from { opacity: 0; transform: translateX(30px); } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: white; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 80px; }
.loading .spinner { width: 32px; height: 32px; border-width: 3px; border-top-color: var(--violet); }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.07), rgba(255,255,255,.03)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--radius); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 32px 20px 0; }
  .auth-hero .features, .auth-hero .foot { display: none; }
  .auth-hero p.lead { margin-bottom: 0; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .25s ease; background: rgba(7,8,15,.96); }
  .sidebar.open { transform: none; box-shadow: 30px 0 80px rgba(0,0,0,.6); }
  .mobile-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; background: rgba(7,8,15,.8); backdrop-filter: blur(16px); }
  .main { padding: 20px 16px 48px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .create-layout { grid-template-columns: 1fr !important; }
  .power { margin-left: 0; width: 100%; }
  .kv { grid-template-columns: 120px 1fr; }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .stat .v { font-size: 22px; }
  .servers { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 23px; }
  .gauges { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}

/* inline icons in text */
.srv-foot .up svg, .crumbs svg, .detail-head .meta svg, .notice > svg { width: 14px; height: 14px; vertical-align: -2px; flex: none; }
.srv-foot .up { display: inline-flex; align-items: center; gap: 6px; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; }
.detail-head .meta > span { display: inline-flex; align-items: center; gap: 6px; }
.card h3 > svg, .card h3 .badge + svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.feed-item .ic svg { color: var(--muted); }
.row > svg, td .row > svg { width: 15px; height: 15px; flex: none; }
.notice svg { width: 16px; height: 16px; flex: none; }
.btn.block svg { width: 16px; height: 16px; }
.empty .art svg { color: inherit; }

.tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.os-ic svg path { vector-effect: none; }
.tpl .os-ic { width: 44px; height: 44px; }
