/* ========== tokens ========== */
:root, [data-theme="dark"] {
  --bg: #0a0b0f;
  --bg-2: #0f1117;
  --surface: #13151c;
  --surface-2: #191c25;
  --surface-3: #20242f;
  --border: #252a36;
  --border-2: #313748;
  --text: #e7e9ee;
  --text-2: #a4abbb;
  --muted: #6f7789;
  --accent: #34d399;
  --accent-2: #10b981;
  --accent-ink: #022c1e;
  --accent-soft: rgba(52, 211, 153, .12);
  --blue: #60a5fa; --violet: #a78bfa; --amber: #fbbf24; --danger: #f87171; --danger-2: #ef4444; --warn: #fbbf24;
  --danger-soft: rgba(248, 113, 113, .12); --warn-soft: rgba(251, 191, 36, .12);
  --console-bg: #07080b;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -8px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 64px -12px rgba(0,0,0,.7);
  --glow: radial-gradient(1200px 600px at 10% -10%, rgba(52,211,153,.07), transparent 60%), radial-gradient(900px 500px at 110% 10%, rgba(96,165,250,.06), transparent 60%);
}
[data-theme="light"] {
  --bg: #f6f7f9;
  --bg-2: #eef0f4;
  --surface: #ffffff;
  --surface-2: #f6f7fa;
  --surface-3: #eceff4;
  --border: #e3e6ec;
  --border-2: #d3d8e1;
  --text: #11141b;
  --text-2: #4a5263;
  --muted: #7a8293;
  --accent: #059669;
  --accent-2: #047857;
  --accent-ink: #ffffff;
  --accent-soft: rgba(5, 150, 105, .1);
  --blue: #2563eb; --violet: #7c3aed; --amber: #d97706; --danger: #dc2626; --danger-2: #dc2626; --warn: #d97706;
  --danger-soft: rgba(220, 38, 38, .08); --warn-soft: rgba(217, 119, 6, .1);
  --console-bg: #0d1016;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px -4px rgba(16,24,40,.08);
  --shadow-lg: 0 24px 64px -12px rgba(16,24,40,.25);
  --glow: radial-gradient(1200px 600px at 10% -10%, rgba(5,150,105,.06), transparent 60%);
}
:root { --r: 12px; --r-sm: 8px; --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ========== base ========== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 650; }
h2 { font-size: 18px; font-weight: 620; }
h3 { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
kbd { font: 11px var(--mono); padding: 1px 5px; border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 4px; color: var(--muted); background: var(--surface-2); }
.ic { flex-shrink: 0; vertical-align: -3px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.text-danger { color: var(--danger); }
.link { color: var(--accent); display: inline-flex; align-items: center; gap: 2px; }
.link:hover { text-decoration: underline; }
.nowrap { white-space: nowrap; }
.ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ========== forms ========== */
input, select, textarea {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 9px 12px; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--border-2); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
input.sm, select.sm { padding: 6px 10px; font-size: 13px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236f7789' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.field > span small, .field small.hint { color: var(--muted); font-weight: 400; }
.hint { font-size: 12px; color: var(--muted); }
.form-error { color: var(--danger); font-size: 13px; min-height: 1em; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }

/* switch */
.switch { position: relative; display: inline-flex; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { width: 36px; height: 20px; border-radius: 20px; background: var(--surface-3); border: 1px solid var(--border-2); position: relative; transition: .2s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: .2s; }
.switch input:checked + i { background: var(--accent); border-color: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--accent-soft); }
.switch input:disabled + i { opacity: .45; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; }
.toggle-row b { display: flex; align-items: center; gap: 6px; font-weight: 550; }
.toggle-row small { display: block; color: var(--muted); font-size: 12.5px; }
.toggle-row.disabled { opacity: .6; cursor: not-allowed; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }

/* segmented */
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 6px; cursor: pointer; color: var(--text-2); font-size: 13px; font-weight: 500; transition: .15s; }
.seg input:checked + span { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }

/* ========== buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border-2); border-radius: var(--r-sm);
  padding: 8px 14px; font: inherit; font-weight: 550; font-size: 13.5px; cursor: pointer; transition: .15s; user-select: none;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: linear-gradient(180deg, var(--accent), var(--accent-2)); border-color: var(--accent-2); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 4px 14px -4px rgba(16,185,129,.5); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); }
.btn.danger-solid { background: var(--danger-2); border-color: var(--danger-2); color: #fff; }
.btn.danger-solid:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; }
.btn.xs { padding: 4px 9px; font-size: 12px; }
.btn.lg { padding: 11px 18px; font-size: 14.5px; }
.btn.block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid currentColor; border-color: var(--text) transparent var(--text) transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.primary.loading::after { border-color: var(--accent-ink) transparent var(--accent-ink) transparent; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; transition: .15s; flex-shrink: 0; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font: 12.5px var(--mono); cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); color: var(--text); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.lg { width: 28px; height: 28px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== auth ========== */
.boot { height: 100vh; display: grid; place-items: center; }
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; position: relative; overflow: hidden; }
.auth-bg { position: absolute; inset: 0; background: var(--glow); pointer-events: none; }
.auth-bg::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%); opacity: .35; }
.auth-card { position: relative; width: 100%; max-width: 460px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 18px; padding: 32px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 18px; }
.auth-card h1 { font-size: 22px; }
.auth-card.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.auth-foot { position: relative; margin-top: 20px; color: var(--muted); font-size: 12.5px; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feature-list li { display: flex; gap: 10px; align-items: center; color: var(--text-2); padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); }
.feature-list .ic { color: var(--accent); }
.pw-meter { height: 4px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.pw-meter div { height: 100%; width: 0; transition: .3s; background: var(--danger); }
.pw-meter div[data-s="3"] { background: var(--amber); }
.pw-meter div[data-s="4"], .pw-meter div[data-s="5"] { background: var(--accent); }

/* stepper */
.stepper { display: flex; gap: 6px; }
.step { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.step::before { content: ""; height: 3px; border-radius: 3px; background: var(--surface-3); transition: .3s; }
.step.done::before, .step.active::before { background: var(--accent); }
.step span { display: none; }
.step em { font-style: normal; font-size: 11.5px; color: var(--muted); font-weight: 550; }
.step.active em { color: var(--text); }

/* brand */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand.lg { font-size: 20px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.brand.lg .brand-mark { width: 40px; height: 40px; border-radius: 11px; }

/* ========== layout ========== */
.layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 260px; flex-shrink: 0; background: var(--bg-2); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; overflow-y: auto; }
.sidebar .brand { padding: 4px 8px 12px; }
.search-btn { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 8px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border); color: var(--muted); font: inherit; cursor: pointer; }
.search-btn span { flex: 1; text-align: left; }
.search-btn:hover { border-color: var(--border-2); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; position: relative; transition: background .12s, color .12s; }
.nav a span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a small { color: var(--muted); display: inline-flex; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav a.subtle { color: var(--muted); }
.nav-title { display: flex; align-items: center; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 16px 10px 6px; }
.nav-empty { padding: 6px 10px; color: var(--muted); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.dot.st-running { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dot.st-starting, .dot.st-restarting { background: var(--amber); animation: pulse 1.4s infinite; }
.dot.st-crashed { background: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 4px; padding-top: 12px; border-top: 1px solid var(--border); }
.me { flex: 1; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--r-sm); min-width: 0; }
.me:hover, .me.active { background: var(--surface-2); }
.me b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.me small { display: block; color: var(--muted); font-size: 11.5px; text-transform: capitalize; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; font-weight: 700; font-size: 13px; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--blue)); }
.avatar.xl { width: 56px; height: 56px; font-size: 22px; border-radius: 14px; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); background-image: var(--glow); }
.topbar { height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(10px); }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; min-width: 0; }
.crumbs a:hover { color: var(--text); }
.crumbs span:last-child { color: var(--text); font-weight: 550; }
.crumbs .sep { opacity: .5; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.docker-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); }
.docker-state.ok { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.docker-state.bad { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.main { flex: 1; overflow-y: auto; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.main > * { width: 100%; max-width: 1400px; margin-left: auto; margin-right: auto; }
.fade-in > * { animation: fadeUp .25s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
.mobile-only { display: none; }
.backdrop { display: none; }

/* ========== panels ========== */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.panel > h3 { margin-bottom: 4px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head.pad { padding: 16px 18px; margin: 0; border-bottom: 1px solid var(--border); }
.pad { padding: 16px 18px; }
.pad-b { padding-bottom: 12px; }
.pad-t { padding-top: 12px; }
.count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-3); padding: 1px 8px; border-radius: 99px; }
.page-head, .hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p, .hero p { margin-top: 4px; }
.hero h1 { font-size: 26px; }
.hero-actions { display: flex; gap: 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: -8px; }
.section-head h2 { font-size: 15px; color: var(--text-2); font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.grid-2-wide { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-3-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 9px 14px; font-size: 13.5px; }
.kv > div:nth-child(odd) { color: var(--muted); }
.kv > div:nth-child(even) { min-width: 0; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty > .ic { color: var(--border-2); margin-bottom: 4px; }
.empty h3 { color: var(--text); font-size: 15.5px; }
.empty p { max-width: 420px; }
.empty .btn { margin-top: 10px; }
.skeleton { height: 18px; margin: 10px 0; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.tile { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); }
.tile span { color: var(--muted); font-size: 12.5px; display: block; }
.tile b { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.tile b small { font-size: 13px; color: var(--muted); font-weight: 500; }
.tile-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.tile-ic.green { color: var(--accent); background: var(--accent-soft); }
.tile-ic.blue { color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); }
.tile-ic.violet { color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); }
.tile-ic.amber { color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); }

/* server cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.srv-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 14px; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; box-shadow: var(--shadow); }
.srv-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.srv-card header { display: flex; align-items: center; gap: 12px; }
.srv-ic, .inst-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); flex-shrink: 0; }
.srv-title { flex: 1; min-width: 0; }
.srv-title b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-title small { color: var(--muted); font-size: 12px; }
.srv-addr { display: flex; align-items: center; gap: 6px; font: 12.5px var(--mono); color: var(--text-2); padding: 6px 10px; background: var(--bg-2); border-radius: 7px; border: 1px solid var(--border); }
.srv-addr span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-addr:hover { border-color: var(--accent); }
.srv-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.srv-meters span { font-size: 11.5px; color: var(--muted); }
.srv-meters b { float: right; font-size: 12.5px; font-weight: 600; }
.meter { height: 5px; background: var(--surface-3); border-radius: 5px; overflow: hidden; margin-top: 6px; clear: both; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 5px; transition: width .5s; }
.srv-card footer { display: flex; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: auto; }
.srv-card footer .btn { flex: 1; }

/* badge */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.st-running { color: var(--accent); background: var(--accent-soft); }
.badge.st-starting, .badge.st-restarting { color: var(--amber); background: var(--warn-soft); }
.badge.st-starting i, .badge.st-restarting i { animation: pulse 1.2s infinite; }
.badge.st-crashed { color: var(--danger); background: var(--danger-soft); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); }
.tag.accent { color: var(--accent); background: var(--accent-soft); }
.tag.bad { color: var(--danger); background: var(--danger-soft); }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.timeline li:last-child { border-bottom: 0; }
.timeline li div { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-dot.bad { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

/* ========== instance ========== */
.inst-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.inst-ic { width: 52px; height: 52px; border-radius: 14px; color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.inst-title { flex: 1; min-width: 240px; }
.inst-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.inst-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.power { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-color: var(--accent); }
.tab-body { display: flex; flex-direction: column; gap: 16px; }

/* stat cards with sparkline */
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.stat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.stat-top span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 550; }
.stat-top b { font-size: 20px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-top b small { font-size: 12px; color: var(--muted); font-weight: 500; }
.spark-wrap { position: relative; margin-top: auto; }
.spark { width: 100%; height: 56px; display: block; overflow: visible; cursor: crosshair; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: var(--accent-soft); }
.spark-cross { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.spark.hover .spark-cross { opacity: .7; }
.spark-tip { position: absolute; bottom: 100%; transform: translate(-50%, -6px); background: var(--surface-3); border: 1px solid var(--border-2); color: var(--text); font-size: 11.5px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .1s; font-variant-numeric: tabular-nums; box-shadow: var(--shadow); }
.spark-tip.show { opacity: 1; }

/* connect */
.connect { display: flex; flex-direction: column; gap: 10px; }
.connect-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-sm); }
.connect-row > div { flex: 1; min-width: 0; }
.connect-row small { display: block; color: var(--muted); font-size: 11.5px; }
.connect-row code { background: none; padding: 0; font-size: 14px; color: var(--text); }

/* console */
.console-wrap { background: var(--console-bg); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.console-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #1c2029; flex-wrap: wrap; }
.console-bar .icon-btn { color: #8b93a3; }
.console-bar .icon-btn:hover { background: #1a1e27; color: #e5e7eb; }
.console-bar .search-mini { background: #0f1218; border-color: #1c2029; }
.console-bar .search-mini input { color: #e5e7eb; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #6b7280; }
.live-dot.on { background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.2); animation: pulse 2s infinite; }
.console { height: calc(100vh - 380px); min-height: 360px; overflow: auto; padding: 12px 16px; font: 12.5px/1.6 var(--mono); color: #d1d5db; }
.console .ln { white-space: pre-wrap; word-break: break-word; }
.console.nowrap .ln { white-space: pre; }
.console .l-err { color: #fca5a5; background: rgba(239,68,68,.06); }
.console .l-warn { color: #fde68a; }
.console .l-cmd { color: #34d399; }
.console .l-sys { opacity: .8; }
.console-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid #1c2029; background: #0b0d12; }
.console-input .prompt { color: #34d399; display: flex; }
.console-input input { background: transparent; border: 0; box-shadow: none; padding: 6px 0; color: #e5e7eb; font: 13px var(--mono); }

/* search inputs */
.search-mini { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg-2); color: var(--muted); }
.search-mini input { border: 0; background: none; padding: 6px 0; width: 150px; box-shadow: none !important; font-size: 13px; }
.search-mini.lg input { width: 260px; padding: 8px 0; }
.search-lg { display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg-2); color: var(--muted); margin: 14px 0 10px; }
.search-lg:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-lg input { border: 0; background: none; box-shadow: none !important; padding: 10px 0; }

/* tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.table td { padding: 10px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * { margin-left: 4px; }
.table tr.dim td { opacity: .55; }
.clickable { cursor: pointer; }
.fname { display: inline-flex; align-items: center; gap: 9px; }
.fname .ic { color: var(--muted); }
.fname.dir .ic { color: var(--amber); }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell small { display: block; font-size: 12px; }
.user-cell small.tag { display: inline-flex; }
.ev-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); flex-shrink: 0; }
.ev-ic.bad { color: var(--danger); background: var(--danger-soft); }

/* files */
.crumbs-files { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-weight: 550; }
.crumbs-files a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 7px; border-radius: 6px; cursor: pointer; }
.crumbs-files a:hover { background: var(--surface-3); }
.crumbs-files .sep { color: var(--muted); }
#drop { position: relative; }
.drop-hint { display: none; position: absolute; inset: 0; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 2px dashed var(--accent); border-radius: var(--r); align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: var(--accent); z-index: 5; }
#drop.dragging .drop-hint { display: flex; }
.editor-wrap { display: flex; height: calc(100vh - 330px); min-height: 380px; background: var(--console-bg); }
.gutter { margin: 0; padding: 14px 10px; text-align: right; color: #4b5263; font: 12.5px/1.6 var(--mono); user-select: none; overflow: hidden; min-width: 48px; border-right: 1px solid #1c2029; }
.editor { flex: 1; border: 0; border-radius: 0; background: transparent; color: #e5e7eb; font: 12.5px/1.6 var(--mono); padding: 14px; resize: none; tab-size: 2; box-shadow: none !important; white-space: pre; overflow: auto; }

/* plugins */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2); border-radius: 99px; padding: 5px 12px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 500; transition: .15s; }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.on { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-soft); color: var(--accent); }
.plug-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plug-list li, .result { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.plug-list li.disabled { opacity: .55; }
.plug-ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex-shrink: 0; }
.result img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; flex-shrink: 0; background: var(--surface-3); }
.plug-info { flex: 1; min-width: 0; }
.plug-info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plug-info small { display: block; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plug-info small.muted { color: var(--muted); }
.results { display: flex; flex-direction: column; gap: 6px; max-height: 620px; overflow-y: auto; margin-bottom: 8px; }

/* players */
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.player { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.player > div:nth-child(2) { flex: 1; min-width: 0; }
.player b { display: block; }
.player-actions { display: flex; opacity: .6; transition: opacity .15s; }
.player:hover .player-actions { opacity: 1; }
.head { width: 32px; height: 32px; border-radius: 6px; image-rendering: pixelated; flex-shrink: 0; }
.head.ph { display: grid; place-items: center; background: var(--surface-3); font-weight: 700; color: var(--muted); }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.plist li:last-child { border-bottom: 0; }
.plist li > div { flex: 1; min-width: 0; }
.plist .head { width: 24px; height: 24px; }
.plist small { display: block; font-size: 12px; }

/* schedules */
.sched-list { display: flex; flex-direction: column; }
.sched { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.sched:last-child { border-bottom: 0; }
.sched.off { opacity: .55; }
.sched-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.sched-info { flex: 1; min-width: 0; }
.sched-info small { display: block; font-size: 12.5px; color: var(--text-2); }
.sched-info small.muted { color: var(--muted); }

/* settings */
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-layout #secBody { display: flex; flex-direction: column; gap: 16px; }
.subnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.subnav a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; }
.subnav a:hover { background: var(--surface-2); color: var(--text); }
.subnav a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.panel.stack > h3:not(:first-child) { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.props { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.prop { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 18px; border-bottom: 1px solid var(--border); }
.prop label { display: flex; flex-direction: column; min-width: 0; }
.prop label code { background: none; padding: 0; font-size: 12.5px; }
.prop label small { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--amber); }
.prop input:not([type=checkbox]) { max-width: 170px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.danger-zone h3 { color: var(--danger); margin-bottom: 12px; }
.danger-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.danger-row > div { flex: 1; min-width: 200px; }
.danger-row small { display: block; color: var(--muted); }

/* users */
.perm-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-sm); }
.perm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.perm-table th { font-weight: 600; color: var(--muted); padding: 8px 6px; background: var(--surface-2); text-align: center; white-space: nowrap; }
.perm-table th:first-child, .perm-table td:first-child { text-align: left; padding-left: 12px; }
.perm-table td { padding: 8px 6px; text-align: center; border-top: 1px solid var(--border); }
.perm-table td:last-child, .perm-table th:last-child { border-left: 1px solid var(--border); }

/* wizard */
.wiz-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.wiz-head h2 { display: flex; align-items: center; gap: 8px; }
.wiz-body { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; min-height: 260px; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.type-card, .pick { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; text-align: left; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; transition: .15s; }
.type-card .ic { color: var(--text-2); margin-bottom: 4px; }
.type-card small, .pick small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.type-card em { position: absolute; top: 10px; right: 10px; color: var(--muted); }
.type-card:hover, .pick:hover { border-color: var(--border-2); background: var(--surface-3); }
.type-card.on, .pick.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.type-card.on .ic { color: var(--accent); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.pick { padding: 12px 12px 12px 40px; }
.pick-check { position: absolute; left: 12px; top: 14px; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-2); display: grid; place-items: center; color: transparent; transition: .15s; }
.pick.on .pick-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.review { display: flex; flex-direction: column; gap: 16px; }
.review-head { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); }
.review-head b { display: block; color: var(--text); font-size: 16px; }
.review-head small { color: var(--text-2); }

/* network */
.net-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.net-flow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.net-node { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); min-width: 130px; }
.net-node > .ic { color: var(--text-2); margin-bottom: 4px; }
.net-node span { font-weight: 600; }
.net-node small, .net-node code { font-size: 11.5px; color: var(--muted); }
.net-node code { background: none; padding: 0; }
.net-node.accent { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.net-node.accent > .ic { color: var(--accent); }
.net-arrow { display: grid; place-items: center; color: var(--muted); }
.callout { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.callout > div { flex: 1; min-width: 200px; }
.callout b { display: block; }
.callout span { color: var(--text-2); font-size: 13px; }
.callout.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); background: var(--warn-soft); }
.callout.warn > .ic { color: var(--warn); }
.backend-list, .avail-list { list-style: none; margin: 0; padding: 0; }
.backend-list li, .avail-list li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.backend-list li:last-child, .avail-list li:last-child { border-bottom: 0; }
.avail-list li.disabled { opacity: .5; }
.pos { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); font-weight: 700; font-size: 12px; color: var(--text-2); flex-shrink: 0; }
.backend-list li:first-child .pos { background: var(--accent); color: var(--accent-ink); }
.be-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.be-name { font-weight: 600; }
.be-name:hover { color: var(--accent); }
.be-actions { display: flex; gap: 2px; }
.fh { display: flex; align-items: center; gap: 6px; color: var(--muted); margin-top: 4px; }
.fh input { max-width: 340px; }
.link-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.link-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; }
.link-row > div { flex: 1; min-width: 0; }
.link-row small { display: block; color: var(--muted); font-size: 12px; }
.link-row.disabled { opacity: .5; cursor: not-allowed; }
.link-row:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.nav a small { font-size: 11px; }

/* domains */
.domain-add { display: flex; align-items: center; gap: 10px; padding: 0 0 0 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg-2); color: var(--muted); margin-bottom: 14px; }
.domain-add:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.domain-add input { border: 0; background: none; box-shadow: none !important; padding: 11px 0; font-family: var(--mono); }
.domain-add .btn { border-radius: 0 var(--r-sm) var(--r-sm) 0; align-self: stretch; }
.small-kv { grid-template-columns: 100px 1fr; font-size: 13px; }
.domain-card { border-left: 3px solid var(--border-2); }
.domain-card.st-ok { border-left-color: var(--accent); }
.domain-card.st-warn { border-left-color: var(--warn); }
.domain-card.st-error { border-left-color: var(--danger); }
.domain-card h3 { font-size: 15px; }
.dom-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.dom-ic.st-ok { color: var(--accent); background: var(--accent-soft); }
.dom-ic.st-warn { color: var(--warn); background: var(--warn-soft); }
.dom-ic.st-error { color: var(--danger); background: var(--danger-soft); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checks li { display: grid; grid-template-columns: 18px 120px 1fr; gap: 8px; align-items: start; font-size: 13px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); }
.checks li .ic { margin-top: 2px; }
.checks li.st-ok .ic { color: var(--accent); }
.checks li.st-warn .ic { color: var(--warn); }
.checks li.st-error .ic { color: var(--danger); }
.checks li span { color: var(--text-2); overflow-wrap: anywhere; }
.records { margin-top: 12px; }
.records summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 550; color: var(--text-2); padding: 4px 0; }
.rec-table { margin-top: 8px; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.rec-table tr.note td { padding-top: 0; border-bottom: 1px solid var(--border); }
.rec-table tbody tr.note:hover td { background: none; }
@media (max-width: 860px) { .checks li { grid-template-columns: 18px 1fr; } .checks li span { grid-column: 2; } }

/* ========== modal ========== */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; background: rgba(5, 7, 10, .55); backdrop-filter: blur(4px); overflow-y: auto; opacity: 0; transition: opacity .18s; }
.modal.show { opacity: 1; }
.modal-card { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: var(--shadow-lg); transform: translateY(10px) scale(.98); transition: transform .2s; display: flex; flex-direction: column; gap: 12px; }
.modal-card.wide { max-width: 760px; }
.modal.show .modal-card { transform: none; }
.modal-head { display: flex; gap: 14px; align-items: flex-start; }
.modal-head p { margin-top: 4px; }
.modal-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.modal-icon.danger { background: var(--danger-soft); color: var(--danger); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* palette */
.palette-card { padding: 0 !important; max-width: 600px; overflow: hidden; gap: 0 !important; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.palette-input input { border: 0; background: none; box-shadow: none !important; padding: 4px 0; font-size: 15px; }
.palette-list { max-height: 380px; overflow-y: auto; padding: 6px; }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer; color: var(--text-2); }
.pal-item span { flex: 1; color: var(--text); }
.pal-item small { color: var(--muted); font-size: 12px; }
.pal-item.sel { background: var(--surface-3); }
.pal-item.sel .ic { color: var(--accent); }
.pal-empty { padding: 24px; text-align: center; color: var(--muted); }

/* toast */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; max-width: min(380px, calc(100vw - 32px)); overflow-wrap: anywhere; padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-2); box-shadow: var(--shadow-lg); font-size: 13.5px; transform: translateX(20px); opacity: 0; transition: .25s; pointer-events: auto; }
.toast.show { transform: none; opacity: 1; }
.toast .ic { margin-top: 1px; color: var(--accent); }
.toast.err .ic { color: var(--danger); }
.toast.err { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.toast.info .ic { color: var(--blue); }

/* ========== responsive ========== */
@media (max-width: 1100px) {
  .grid-2-wide, .grid-3-1 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.5); }
  .mobile-only { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .main { padding: 18px 16px; }
  .settings-layout { grid-template-columns: 1fr; }
  .subnav { flex-direction: row; overflow-x: auto; position: static; }
  .hide-sm { display: none; }
  .docker-state { display: none; }
  .power { width: 100%; }
  .power .btn { flex: 1; }
  .table th, .table td { padding: 10px 12px; }
  .search-mini input, .search-mini.lg input { width: 110px; }
  .console { height: calc(100vh - 420px); }
  .kv { grid-template-columns: 100px 1fr; }
  .toasts { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
  .net-flow { flex-direction: column; width: 100%; }
  .net-node { min-width: 0; }
  .net-arrow { transform: rotate(90deg); height: 14px; }
  .net-head > .row-gap { width: 100%; }
  .net-head > .row-gap .btn { flex: 1; }
  .inst-ic { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
