:root {
  color-scheme: dark;
  --bg: #07111f;
  --sidebar: #091523;
  --surface: #0d1b2b;
  --surface-2: #112235;
  --surface-3: #162a40;
  --border: rgba(142, 174, 207, .13);
  --border-strong: rgba(142, 174, 207, .22);
  --text: #edf6ff;
  --text-soft: #b9cbe0;
  --text-muted: #7990aa;
  --primary: #5eead4;
  --primary-strong: #7cf6e3;
  --primary-ink: #05211e;
  --blue: #55a8ff;
  --violet: #a78bfa;
  --amber: #f6c35b;
  --danger: #fb7185;
  --shadow: 0 24px 70px rgba(0, 0, 0, .24);
  --sidebar-width: 252px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf3f8;
  --sidebar: #f7fafc;
  --surface: #ffffff;
  --surface-2: #f4f8fb;
  --surface-3: #e9f0f6;
  --border: rgba(41, 67, 91, .11);
  --border-strong: rgba(41, 67, 91, .2);
  --text: #13283a;
  --text-soft: #465f77;
  --text-muted: #71869a;
  --primary: #0da996;
  --primary-strong: #0b927f;
  --primary-ink: #ffffff;
  --blue: #277bd0;
  --violet: #7358d1;
  --amber: #b9780d;
  --danger: #d6425a;
  --shadow: 0 24px 55px rgba(37, 63, 86, .12);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body.app-loading { overflow: hidden; }
body.app-loading .app-shell { visibility: hidden; }
button, input, select { font: inherit; }
button, svg { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100vh; }
.app-gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 38%, rgba(94,234,212,.08), transparent 30%), var(--bg); transition: opacity 160ms ease, visibility 160ms ease; }
body:not(.app-loading) .app-gate { visibility: hidden; opacity: 0; pointer-events: none; }
.app-gate-card { width: min(410px,100%); display: grid; justify-items: center; padding: 34px; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.app-gate-card > span { margin-top: 16px; color: var(--text-muted); font-size: .6rem; font-weight: 760; letter-spacing: .14em; }
.app-gate-card > strong { margin-top: 12px; font-size: 1.05rem; }
.app-gate-card > p { max-width: 300px; margin: 7px 0 0; color: var(--text-muted); font-size: .72rem; line-height: 1.65; }
.app-gate-spinner { width: 24px; height: 24px; margin-top: 20px; border: 2px solid var(--surface-3); border-top-color: var(--primary); border-radius: 50%; animation: gate-spin 700ms linear infinite; }
.app-gate-card > button { margin-top: 20px; }
.app-gate-card > button[hidden], .app-gate-spinner[hidden] { display: none; }
@keyframes gate-spin { to { transform: rotate(360deg); } }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 22px 16px 18px; border-right: 1px solid var(--border); background: var(--sidebar); }
.brand { min-height: 62px; display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 11px; padding: 0 8px 18px; border-bottom: 1px solid var(--border); }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(94,234,212,.2); border-radius: 12px; background: rgba(94,234,212,.08); }
.brand-mark svg { width: 25px; }
.brand-mark path { fill: var(--primary); stroke: none; }
.brand-mark circle { fill: var(--sidebar); stroke: none; }
.brand-copy { min-width: 0; }
.brand-copy strong, .brand-copy span { display: block; white-space: nowrap; }
.brand-copy strong { overflow: hidden; color: var(--text); font-size: .88rem; text-overflow: ellipsis; }
.brand-copy span { margin-top: 2px; color: var(--text-muted); font-size: .54rem; font-weight: 750; letter-spacing: .09em; }
.nav-list { display: grid; gap: 6px; margin-top: 22px; }
.nav-item { width: 100%; height: 46px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 11px; padding: 0 12px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--text-muted); text-align: left; font-size: .86rem; font-weight: 650; cursor: pointer; transition: 150ms ease; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { background: var(--surface-2); color: var(--text-soft); }
.nav-item.active { border-color: rgba(94,234,212,.17); background: rgba(94,234,212,.09); color: var(--primary); }
.nav-count, .nav-alert { min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px; border-radius: 7px; background: var(--surface-3); color: var(--text-muted); font-size: .65rem; }
.nav-alert { background: rgba(246,195,91,.1); color: var(--amber); }
.sidebar-footer { margin-top: auto; }
.platform-state { display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.platform-state > i { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 5px rgba(94,234,212,.08), 0 0 12px rgba(94,234,212,.45); }
.platform-state strong, .platform-state span { display: block; }
.platform-state strong { font-size: .72rem; }
.platform-state span { margin-top: 2px; color: var(--text-muted); font-size: .64rem; }
.version-row { display: flex; justify-content: space-between; margin-top: 12px; padding: 0 4px; color: var(--text-muted); font-size: .64rem; }
.version-row b { color: var(--amber); }
.version-row b.live { color: var(--primary); }

.main-area { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px clamp(20px, 3.2vw, 44px); border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); }
.topbar-left, .topbar-actions, .toolbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-actions { position: relative; }
.eyebrow, .section-kicker { margin: 0; color: var(--text-muted); font-size: .64rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.topbar h1 { margin: 2px 0 0; font-size: clamp(1.12rem, 2vw, 1.45rem); letter-spacing: -.025em; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--text-soft); cursor: pointer; }
.icon-button svg { width: 19px; height: 19px; }
.mobile-menu { display: none; }
.sun-icon { display: none; }
:root[data-theme="light"] .moon-icon { display: none; }
:root[data-theme="light"] .sun-icon { display: block; }
.live-chip { min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-muted); font-size: .7rem; }
.live-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 8px rgba(94,234,212,.5); }
.account-button { display: flex; align-items: center; gap: 9px; padding: 3px 9px 3px 3px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); text-align: left; cursor: pointer; }
.account-button > span:first-child { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: rgba(94,234,212,.12); color: var(--primary); font-weight: 850; }
.account-button b, .account-button small { display: block; }
.account-button b { font-size: .7rem; }
.account-button small { color: var(--text-muted); font-size: .59rem; }
.account-menu { position: absolute; top: calc(100% + 10px); right: 0; width: 210px; padding: 9px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.account-menu[hidden], .admin-only[hidden] { display: none !important; }
.account-menu > div { padding: 8px 9px 11px; border-bottom: 1px solid var(--border); }.account-menu strong, .account-menu span { display: block; }.account-menu strong { font-size: .72rem; }.account-menu span { margin-top: 2px; color: var(--text-muted); font-size: .61rem; }
.account-menu button { width: 100%; min-height: 35px; margin-top: 7px; border: 0; border-radius: 8px; background: transparent; color: var(--danger); font-size: .68rem; text-align: left; cursor: pointer; }.account-menu button:hover { background: rgba(251,113,133,.07); }
.primary-button, .secondary-button, .text-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border-radius: 10px; font-size: .75rem; font-weight: 760; cursor: pointer; transition: 150ms ease; }
.primary-button { border: 1px solid var(--primary); background: var(--primary); color: var(--primary-ink); box-shadow: 0 8px 22px rgba(45,212,191,.12); }
.primary-button:hover { transform: translateY(-1px); background: var(--primary-strong); }
.primary-button svg { width: 17px; height: 17px; }
.secondary-button { border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-soft); }
.secondary-button:hover { border-color: rgba(94,234,212,.28); color: var(--text); }
.secondary-button.danger-button { border-color: rgba(251,113,133,.2); color: var(--danger); }
.text-button { padding: 0; border: 0; background: transparent; color: var(--primary); }
.wide { width: 100%; }

.content-wrap { max-width: 1580px; margin: 0 auto; padding: clamp(22px, 3vw, 40px) clamp(20px, 3.2vw, 44px) 60px; }
.view { display: none; }
.view.active { display: block; animation: view-in 180ms ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.overview-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.overview-heading h2, .view-heading h2 { margin: 5px 0 0; font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.045em; }
.overview-heading p, .view-heading p, .lead { margin: 6px 0 0; color: var(--text-muted); font-size: .78rem; }
.network-status { min-width: 210px; display: grid; grid-template-columns: 1fr auto; align-items: end; padding: 14px 17px; border: 1px solid rgba(94,234,212,.16); border-radius: 13px; background: linear-gradient(135deg, rgba(94,234,212,.07), var(--surface)); }
.network-status > span { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; color: var(--primary); font-size: .67rem; }
.network-status > span i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.network-status > strong { margin-top: 7px; font-size: 1.45rem; }
.network-status > strong b { font-size: inherit; }
.network-status > small { padding-bottom: 3px; color: var(--text-muted); font-size: .64rem; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.summary-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 880px; margin-bottom: 18px; }
.summary-card { position: relative; min-height: 136px; overflow: hidden; padding: 20px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.summary-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--text-muted); opacity: .7; }
.summary-card.accent-cyan::before { background: var(--primary); }.summary-card.accent-blue::before { background: var(--blue); }.summary-card.accent-violet::before { background: var(--violet); }.summary-card.accent-amber::before { background: var(--amber); }
.summary-card > span { color: var(--text-muted); font-size: .77rem; }
.summary-card > strong { display: block; margin-top: 8px; font-size: 2rem; letter-spacing: -.04em; }
.summary-card > strong small { margin-left: 5px; color: var(--text-muted); font-size: .72rem; font-weight: 600; letter-spacing: 0; }
.summary-card > p { margin: 7px 0 0; color: var(--text-muted); font-size: .66rem; }
.summary-card > p i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--primary); }
.summary-card > p b { color: var(--primary); }
.panel { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,.01); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .72fr); gap: 16px; margin-top: 16px; }
.node-panel, .pulse-panel, .activity-panel, .data-panel, .deploy-card, .instruction-card, .settings-card { padding: 22px; }
.panel-header, .view-toolbar, .info-strip, .view-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.panel-header h2, .deploy-card h2, .settings-heading h2 { margin: 0; font-size: .96rem; }
.panel-header p, .settings-heading p { margin: 3px 0 0; color: var(--text-muted); font-size: .66rem; }
.node-list { display: grid; gap: 9px; margin-top: 17px; }
.node-row { display: grid; grid-template-columns: minmax(165px,1.3fr) minmax(130px,.8fr) minmax(160px,1fr) minmax(95px,.55fr) auto; align-items: center; gap: 14px; min-height: 70px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); cursor: pointer; transition: 140ms ease; }
.node-list .node-row { grid-template-columns: minmax(190px,1fr) minmax(145px,.9fr) auto; }
.node-list .node-row > .owner-cell, .node-list .node-row > .last-seen { display: none; }
.node-row:hover { border-color: rgba(94,234,212,.23); transform: translateY(-1px); }
.node-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.node-icon { position: relative; width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: rgba(85,168,255,.08); color: var(--blue); }
.node-icon::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; border: 2px solid var(--surface-2); border-radius: 50%; background: var(--primary); }
.node-icon.offline::after { background: var(--text-muted); }
.node-icon svg { width: 19px; }
.node-identity strong, .node-identity small, .resource-cell span, .resource-cell small { display: block; }
.node-identity strong { overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.node-identity small, .muted { margin-top: 3px; color: var(--text-muted); font-size: .62rem; }
.owner-cell { font-size: .7rem; }
.owner-cell span { display: inline-flex; align-items: center; gap: 7px; }
.owner-cell i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: rgba(167,139,250,.09); color: var(--violet); font-style: normal; font-size: .58rem; }
.mini-meters { display: grid; gap: 6px; }
.mini-meter { display: grid; grid-template-columns: 28px 1fr 28px; align-items: center; gap: 7px; color: var(--text-muted); font-size: .56rem; }
.mini-meter > i { height: 4px; overflow: hidden; border-radius: 4px; background: var(--surface-3); }
.mini-meter > i::after { content: ""; display: block; width: var(--value); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--primary)); }
.mini-meter b { color: var(--text-soft); font-size: .56rem; text-align: right; }
.status-pill { min-height: 28px; display: inline-flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--border); border-radius: 9px; color: var(--text-muted); font-size: .63rem; font-weight: 720; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.success { border-color: rgba(94,234,212,.16); background: rgba(94,234,212,.06); color: var(--primary); }
.status-pill.warning { border-color: rgba(246,195,91,.17); background: rgba(246,195,91,.06); color: var(--amber); }
.status-pill.offline { color: var(--text-muted); }
.right-stack { display: grid; align-content: start; gap: 16px; }
.gauge-wrap { display: flex; align-items: center; gap: 17px; margin: 18px 0; }
.gauge { width: 98px; height: 98px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--primary) calc(var(--gauge) * 1%), var(--surface-3) 0); position: relative; }
.gauge::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }
.gauge span { position: relative; }
.gauge b { font-size: 1.45rem; }.gauge small { color: var(--text-muted); font-size: .65rem; }
.gauge-copy strong, .gauge-copy span { display: block; }.gauge-copy strong { font-size: .78rem; }.gauge-copy span { margin-top: 5px; color: var(--text-muted); font-size: .64rem; }
.load-bars { display: grid; gap: 10px; }
.load-bars > div { display: grid; grid-template-columns: 38px 1fr 34px; align-items: center; gap: 8px; color: var(--text-muted); font-size: .61rem; }
.load-bars > div > div { height: 5px; overflow: hidden; border-radius: 5px; background: var(--surface-3); }
.load-bars > div > div i { display: block; width: var(--value); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--primary)); }
.load-bars b { color: var(--text-soft); font-size: .6rem; text-align: right; }
.activity-list { display: grid; gap: 13px; margin-top: 17px; }
.activity-item { display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: start; }
.activity-item > i { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(94,234,212,.06); }
.activity-item.warning > i { background: var(--amber); box-shadow: 0 0 0 4px rgba(246,195,91,.06); }
.activity-item strong, .activity-item span { display: block; }.activity-item strong { font-size: .68rem; }.activity-item span, .activity-item time { margin-top: 2px; color: var(--text-muted); font-size: .59rem; }

.view-toolbar { margin-bottom: 16px; }
.search-box { position: relative; width: min(420px,100%); }
.search-box svg { position: absolute; left: 13px; top: 50%; width: 17px; transform: translateY(-50%); color: var(--text-muted); }
.search-box input, form input, form select { width: 100%; height: 44px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.search-box input { padding: 0 13px 0 40px; }
input::placeholder { color: var(--text-muted); }
input:focus, select:focus { border-color: rgba(94,234,212,.45); outline: 3px solid rgba(94,234,212,.07); }
.filter-pills { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.filter-pills button { min-height: 31px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); font-size: .68rem; cursor: pointer; }
.filter-pills button.active { background: var(--surface-3); color: var(--text); }
.data-panel { padding: 7px 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 13px 12px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: .68rem; letter-spacing: .03em; white-space: nowrap; }
td { padding: 15px 12px; border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: .75rem; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 140ms ease; } tbody tr:hover { background: rgba(142,174,207,.025); }
.table-title { color: var(--text); font-weight: 720; }.table-sub { display: block; margin-top: 3px; color: var(--text-muted); font-size: .6rem; }
.resource-cell { min-width: 145px; }.resource-cell span { color: var(--text-soft); font-size: .65rem; }.resource-cell small { margin-top: 3px; color: var(--text-muted); font-size: .58rem; }
.action-row { display: flex; gap: 5px; }
.small-action { min-height: 30px; padding: 0 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text-soft); font-size: .62rem; cursor: pointer; }.small-action:hover { border-color: var(--border-strong); color: var(--text); }
.small-action:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .42; }
.small-action.danger { color: var(--danger); }
.info-strip { margin-bottom: 18px; padding: 16px 18px; border: 1px solid rgba(85,168,255,.16); border-radius: 14px; background: rgba(85,168,255,.05); }
.info-strip strong, .info-strip span { display: block; }.info-strip strong { font-size: .82rem; }.info-strip span { margin-top: 3px; color: var(--text-muted); font-size: .68rem; }

.deploy-layout { display: grid; grid-template-columns: minmax(320px,.75fr) minmax(410px,1.25fr); gap: 18px; align-items: start; }
.deploy-card h2 { margin-top: 6px; font-size: 1.35rem; }
.deploy-card .lead { line-height: 1.7; }
form label { display: block; margin-top: 16px; color: var(--text-soft); font-size: .75rem; font-weight: 680; }
form input, form select { margin-top: 7px; padding: 0 13px; }
form label small { display: block; margin-top: 6px; color: var(--text-muted); font-size: .6rem; font-weight: 500; }
form .wide { margin-top: 21px; }
.steps { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.steps > div { display: flex; align-items: center; gap: 8px; }.steps > div > b { width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: rgba(94,234,212,.1); color: var(--primary); font-size: .68rem; }.steps strong, .steps small { display: block; }.steps strong { font-size: .67rem; }.steps small { margin-top: 2px; color: var(--text-muted); font-size: .56rem; }.steps > i { flex: 1; height: 1px; background: var(--border); }
.command-empty { min-height: 260px; display: grid; place-items: center; align-content: center; color: var(--text-muted); text-align: center; }.command-empty .command-icon { width: 55px; height: 55px; display: grid; place-items: center; margin-bottom: 13px; border: 1px dashed var(--border-strong); border-radius: 16px; color: var(--primary); font-size: 1.5rem; }.command-empty strong { color: var(--text-soft); font-size: .77rem; }.command-empty span { margin-top: 5px; font-size: .64rem; }
.command-meta { display: flex; justify-content: space-between; margin: 20px 0 10px; color: var(--text-muted); font-size: .63rem; }.command-meta span { display: flex; align-items: center; gap: 6px; color: var(--amber); }.command-meta i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }.command-meta b { color: var(--text-soft); }
.command-result pre { min-height: 145px; margin: 0 0 11px; padding: 16px; overflow: auto; border: 1px solid var(--border); border-radius: 11px; background: #06101d; color: #b9f8ed; white-space: pre-wrap; word-break: break-all; font: .7rem/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }.command-result > p { margin: 10px 0 0; color: var(--text-muted); font-size: .62rem; text-align: center; }
.view-heading { margin-bottom: 18px; }.view-heading h2 { font-size: 1.6rem; }

.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }.settings-card.full { grid-column: 1 / -1; }
.settings-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }.settings-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; background: rgba(85,168,255,.08); color: var(--blue); font-weight: 800; }.settings-icon.shield { color: var(--primary); background: rgba(94,234,212,.08); }.settings-icon.violet { color: var(--violet); background: rgba(167,139,250,.08); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--border); }.setting-row:last-child { border-bottom: 0; }.setting-row b, .setting-row small { display: block; }.setting-row b { font-size: .7rem; }.setting-row small { margin-top: 2px; color: var(--text-muted); font-size: .61rem; }.setting-row > strong { color: var(--text-soft); font-size: .7rem; }
.security-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }.security-list li { display: flex; align-items: center; gap: 9px; color: var(--text-soft); font-size: .68rem; }.security-list i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: rgba(94,234,212,.08); }.security-list i::before { content: "✓"; color: var(--primary); font-size: .56rem; }
.version-policy { display: grid; grid-template-columns: repeat(3,1fr) auto; align-items: center; gap: 14px; }.version-policy > div { padding: 13px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); }.version-policy span, .version-policy strong { display: block; }.version-policy span { color: var(--text-muted); font-size: .61rem; }.version-policy strong { margin-top: 5px; font-size: .72rem; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 80; visibility: hidden; background: rgba(2,7,14,.58); opacity: 0; transition: 180ms ease; }.drawer-backdrop.open { visibility: visible; opacity: 1; }
.node-drawer { position: fixed; inset: 0 0 0 auto; z-index: 90; width: min(460px,100%); padding: 25px; overflow-y: auto; border-left: 1px solid var(--border-strong); background: var(--surface); box-shadow: -30px 0 80px rgba(0,0,0,.3); transform: translateX(102%); transition: 220ms ease; }.node-drawer.open { transform: none; }
.drawer-header, .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }.drawer-header h2, .modal-header h2 { margin: 4px 0 0; font-size: 1.15rem; }.drawer-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin: 18px 0; }.drawer-metric { padding: 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); }.drawer-metric span, .drawer-metric strong { display: block; }.drawer-metric span { color: var(--text-muted); font-size: .59rem; }.drawer-metric strong { margin-top: 4px; font-size: 1rem; }.detail-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: var(--border); }.detail-list > div { display: flex; justify-content: space-between; gap: 15px; padding: 12px; background: var(--surface-2); font-size: .67rem; }.detail-list span { color: var(--text-muted); }.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; background: rgba(2,7,14,.7); backdrop-filter: blur(8px); }.modal-backdrop.open { display: grid; }.modal { width: min(500px,100%); padding: 24px; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }.form-note { margin-top: 17px; padding: 11px; border-left: 2px solid rgba(94,234,212,.35); background: rgba(94,234,212,.04); color: var(--text-muted); font-size: .65rem; }.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: grid; gap: 8px; }.toast { min-width: 260px; display: flex; align-items: center; gap: 9px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); color: var(--text-soft); font-size: .7rem; animation: toast-in 180ms ease both; }.toast i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }.toast.error i { background: var(--danger); } @keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.mobile-backdrop { display: none; }
.empty-state { padding: 48px 20px; color: var(--text-muted); text-align: center; font-size: .72rem; }

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 16%, rgba(94,234,212,.11), transparent 28%),
    radial-gradient(circle at 82% 84%, rgba(85,168,255,.09), transparent 30%),
    var(--bg);
}
.login-shell { width: min(460px,100%); }
.login-card { padding: clamp(27px,6vw,40px); border: 1px solid var(--border-strong); border-radius: 22px; background: color-mix(in srgb,var(--surface) 96%,transparent); box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.login-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.login-brand .brand-mark { flex: 0 0 auto; }
.login-brand strong, .login-brand span { display: block; }
.login-brand strong { font-size: .92rem; }
.login-brand span { margin-top: 2px; color: var(--text-muted); font-size: .56rem; font-weight: 750; letter-spacing: .11em; }
.login-heading { margin: 27px 0 20px; }
.login-heading h1 { margin: 6px 0 0; font-size: 1.7rem; letter-spacing: -.04em; }
.login-heading p { margin: 8px 0 0; color: var(--text-muted); font-size: .72rem; line-height: 1.65; }
.login-card form label { margin-top: 14px; }
.login-submit { width: 100%; min-height: 48px; margin-top: 21px !important; }
.login-submit:disabled { cursor: wait; opacity: .7; transform: none; }
.login-error { display: none; margin: 12px 0 0; padding: 10px 12px; border: 1px solid rgba(251,113,133,.2); border-radius: 9px; background: rgba(251,113,133,.06); color: var(--danger); font-size: .68rem; }
.login-foot { display: flex; align-items: center; gap: 8px; margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .62rem; }
.login-foot i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--primary); box-shadow: 0 0 8px rgba(94,234,212,.45); }

@media (max-width: 1180px) {
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .overview-grid { grid-template-columns: 1fr; }.right-stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .node-row { grid-template-columns: minmax(165px,1.3fr) minmax(125px,.8fr) minmax(150px,1fr) auto; }.node-row > .last-seen { display: none; }
  .account-button > span:last-child, .live-chip { display: none; }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-102%); transition: 200ms ease; }.sidebar.open { transform: none; box-shadow: 25px 0 70px rgba(0,0,0,.35); }
  .main-area { margin-left: 0; }.mobile-menu { display: grid; }.mobile-backdrop.open { position: fixed; inset: 0; z-index: 25; display: block; background: rgba(2,7,14,.52); }
  .topbar { min-height: 76px; }.topbar-actions > .primary-button { display: none; }
  .overview-heading { align-items: start; }.network-status { display: none; }
  .node-row, .node-list .node-row { grid-template-columns: 1fr auto; }.node-row > .owner-cell, .node-row > .mini-meters, .node-row > .last-seen { display: none; }
  .deploy-layout, .settings-grid { grid-template-columns: 1fr; }.settings-card.full { grid-column: auto; }.version-policy { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .content-wrap { padding: 20px 14px 45px; }.topbar { padding: 12px 14px; }.topbar h1 { font-size: 1.05rem; }.eyebrow { font-size: .57rem; }
  .summary-grid, .summary-grid.compact, .right-stack { grid-template-columns: 1fr 1fr; }.summary-card { min-height: 118px; padding: 16px; }.summary-card > strong { font-size: 1.6rem; }
  .right-stack { grid-template-columns: 1fr; }.view-toolbar { align-items: stretch; flex-direction: column; }.toolbar-actions { justify-content: space-between; }.filter-pills { flex: 1; }.filter-pills button { flex: 1; }
  .steps { align-items: stretch; flex-direction: column; }.steps > i { width: 1px; height: 14px; margin-left: 13px; flex: none; }.instruction-card { padding: 18px; }
  .version-policy { grid-template-columns: 1fr; }.drawer-metrics { grid-template-columns: 1fr; }.drawer-actions { grid-template-columns: 1fr; }
  .info-strip { align-items: stretch; flex-direction: column; }.info-strip button { width: 100%; }
}
@media (max-width: 420px) { .summary-grid, .summary-grid.compact { grid-template-columns: 1fr; }.theme-toggle { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
