:root {
  --bg: #0b1120;
  --bg-elev: #0f172a;
  --bg-card: #141f36;
  --bg-subtle: #0f172a;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --emerald: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --purple: #a855f7;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
  --bg: #f1f5f9;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f8fafc;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.muted { color: var(--text-muted); font-size: 0.82rem; }
.subtle { color: var(--text-dim); font-size: 0.77rem; }
.right { text-align: right; }

/* Login Screen */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top, rgba(34, 211, 238, 0.12), transparent 50%), var(--bg);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.login-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; }
.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #041322;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-icon svg { width: 24px; height: 24px; }
.login-brand h1 { font-size: 1.15rem; font-weight: 700; }
.login-brand p { font-size: 0.8rem; color: var(--text-muted); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}
.field input:focus { border-color: var(--cyan); }
.login-error {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.84rem;
}

/* App Shell: Fixed Sidebar + Focused View Area */
.app-shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  overflow-y: auto;
  z-index: 45;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.22);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
.brand-dot.paused { background: var(--amber); animation: none; box-shadow: none; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22); }
  50% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0.05); }
}
.sidebar-brand-name { font-weight: 700; font-size: 0.96rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-brand-sub { font-size: 0.73rem; color: var(--text-muted); }

.nav-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 0 10px 6px;
}
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.nav-item:hover { background: rgba(148, 163, 184, 0.08); color: var(--text); }
.nav-item.active {
  background: rgba(34, 211, 238, 0.11);
  border-color: rgba(34, 211, 238, 0.26);
  color: var(--cyan);
}
[data-theme="light"] .nav-item.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
  color: var(--blue);
}
.nav-ic { width: 17px; height: 17px; display: inline-flex; flex-shrink: 0; }
.nav-ic svg { width: 17px; height: 17px; }
.nav-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-family: ui-monospace, monospace;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.nav-item.active .nav-badge {
  border-color: rgba(34, 211, 238, 0.32);
  color: inherit;
}

.sidebar-foot {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.sidebar-spec { padding: 0 4px; }
.sidebar-spec-os { font-size: 0.76rem; font-weight: 600; color: var(--text); }
.sidebar-spec-cpu { font-size: 0.7rem; color: var(--text-dim); margin-top: 2px; line-height: 1.35; }

/* Main Area */
.main-area { min-width: 0; display: flex; flex-direction: column; }

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 24px;
  background: rgba(11, 17, 32, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
[data-theme="light"] .topbar { background: rgba(255, 255, 255, 0.92); }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar-title-row h1 { font-size: 1.1rem; font-weight: 700; }
.topbar-meta { font-size: 0.77rem; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.server-clock {
  font-family: ui-monospace, monospace;
  font-size: 0.81rem;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

/* Buttons & Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #031525;
  border: none;
  font-weight: 700;
  padding: 11px 16px;
}
.btn-primary:hover { filter: brightness(1.08); color: #031525; }
.btn-full { width: 100%; }
.btn-ghost { background: transparent; }
.btn-danger-text:hover { border-color: var(--red); color: var(--red); }
.btn-xs { padding: 4px 9px; font-size: 0.76rem; border-radius: 7px; }
.btn-icon { width: 36px; height: 36px; padding: 0; font-size: 1.05rem; }
.mobile-only { display: none; }

.select-ctrl, .search-input {
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 0.82rem;
  outline: none;
}
.search-input { width: 220px; max-width: 100%; }
.search-input:focus, .select-ctrl:focus { border-color: var(--cyan); }

/* Content & View Panes */
.content {
  padding: 20px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1420px;
  width: 100%;
}
.view-pane { display: none; flex-direction: column; gap: 18px; }
.view-pane.active { display: flex; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 1rem; font-weight: 700; }

/* Pills & Badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
}
.pill-ok { background: rgba(16, 185, 129, 0.16); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.pill-warn { background: rgba(245, 158, 11, 0.16); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.pill-crit { background: rgba(239, 68, 68, 0.16); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.35); }
.pill-info { background: rgba(59, 130, 246, 0.16); color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.3); }
.pill-neutral { background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border); }

.kpi-badge {
  font-size: 0.73rem;
  font-family: ui-monospace, monospace;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Alerts Bar */
.alerts-bar { display: flex; flex-wrap: wrap; gap: 10px; }
.alert-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.83rem;
  flex: 1 1 280px;
}
.alert-critical { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35); }
.alert-warning { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.35); }
.alert-info { background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.3); }
.alert-ok { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.25); color: var(--emerald); }
.alert-title { font-weight: 700; display: block; }
.alert-detail { font-size: 0.77rem; color: var(--text-muted); }

/* KPI Grid */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi-card { display: flex; flex-direction: column; gap: 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-main { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.kpi-value { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.03em; }
.kpi-sub { font-size: 0.81rem; color: var(--text-muted); font-family: ui-monospace, monospace; }
.kpi-foot { font-size: 0.79rem; color: var(--text-muted); }

/* Quick Summary Strip on Overview */
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.summary-tile {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.summary-tile:hover { border-color: var(--cyan); transform: translateY(-2px); }
.summary-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.summary-lbl { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.summary-val { font-size: 1.15rem; font-weight: 700; font-family: ui-monospace, monospace; }
.summary-sub { font-size: 0.75rem; color: var(--text-dim); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-subtle);
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-sm { height: 6px; flex: 1; }
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transition: width 0.35s ease;
}
.progress-fill.warn { background: linear-gradient(90deg, #fbbf24, var(--amber)); }
.progress-fill.crit { background: linear-gradient(90deg, #f87171, var(--red)); }
.fill-purple { background: linear-gradient(90deg, #c084fc, var(--purple)); }

.cores-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(46px, 1fr)); gap: 6px; }
.core-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 4px 6px;
  font-size: 0.7rem;
  font-family: ui-monospace, monospace;
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}
.swap-row { display: flex; align-items: center; gap: 8px; font-size: 0.77rem; color: var(--text-muted); }

.net-speeds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.net-item { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; }
.net-dir { display: block; font-size: 0.72rem; font-weight: 700; margin-bottom: 2px; }
.net-dir.rx { color: var(--cyan); }
.net-dir.tx { color: var(--amber); }
.net-num { font-size: 1.02rem; font-weight: 700; font-family: ui-monospace, monospace; }

/* Charts */
.btn-group { display: flex; gap: 4px; background: var(--bg-subtle); padding: 3px; border-radius: 9px; border: 1px solid var(--border); }
.chip {
  padding: 4px 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.chip.active { background: var(--bg-card); color: var(--cyan); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }

.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-box { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.chart-header { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; font-weight: 600; margin-bottom: 8px; }
.legend { display: flex; gap: 12px; font-size: 0.75rem; color: var(--text-muted); }
.leg-item { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-cyan { background: var(--cyan); }
.dot-emerald { background: var(--emerald); }
.dot-blue { background: var(--blue); }
.dot-amber { background: var(--amber); }
.svg-chart { width: 100%; height: 185px; position: relative; }
.svg-chart svg { width: 100%; height: 100%; display: block; }

/* Tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.data-table th {
  text-align: left;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table.compact td, .data-table.compact th { padding: 7px 9px; font-size: 0.81rem; }
.data-table tbody tr:hover { background: rgba(148, 163, 184, 0.05); }
.empty-cell { text-align: center; color: var(--text-muted); padding: 24px !important; }

.c-name { font-weight: 700; display: block; }
.c-img { font-size: 0.74rem; color: var(--text-muted); font-family: ui-monospace, monospace; }
.c-link { color: var(--cyan); text-decoration: none; font-size: 0.76rem; font-family: ui-monospace, monospace; }
.c-link:hover { text-decoration: underline; }
.mem-cell { min-width: 150px; }
.mem-cell-top { display: flex; justify-content: space-between; font-size: 0.77rem; margin-bottom: 4px; font-family: ui-monospace, monospace; }
.port-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-family: ui-monospace, monospace;
  padding: 1px 6px;
  margin: 1px 2px;
  border-radius: 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Two Column */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* Monitors & WAHA */
.monitors-list { display: flex; flex-direction: column; gap: 9px; }
.mon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.mon-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mon-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.mon-dot.up { background: var(--emerald); box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); }
.mon-dot.down { background: var(--red); box-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }
.mon-name { font-weight: 600; font-size: 0.87rem; }
.mon-target { font-size: 0.74rem; color: var(--text-muted); font-family: ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; max-width: 240px; white-space: nowrap; }
.mon-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Storage, Google Drive, WA Alert & Security */
.storage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat-mini { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.stat-mini-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; }
.stat-mini-val { font-size: 1.05rem; font-weight: 700; margin-top: 2px; }
.stat-mini-sub { font-size: 0.74rem; color: var(--text-dim); }

.dir-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.dir-row:last-child { border-bottom: none; }

.gdrive-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.wa-alert-box { margin-top: 14px; padding: 12px 13px; border-radius: 10px; background: var(--bg-subtle); border: 1px solid var(--border); }
.wa-alert-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 0.82rem; }
.wa-recent-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.wa-recent-item { display: flex; align-items: center; gap: 8px; font-size: 0.77rem; flex-wrap: wrap; }
.wa-recent-title { flex: 1; min-width: 140px; }

.ufw-ports { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.security-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 18px; }

/* Quick Links & Ops Commands */
.links-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
}
.link-card:hover { border-color: var(--cyan); transform: translateY(-1px); }

.ops-title { font-size: 0.76rem; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.cmd-list { display: flex; flex-direction: column; gap: 7px; }
.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 9px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s;
}
.cmd-item:hover { border-color: var(--cyan); }
.cmd-code { font-family: ui-monospace, monospace; font-size: 0.78rem; color: var(--cyan); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-desc { font-size: 0.72rem; color: var(--text-dim); white-space: nowrap; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, 0.75); backdrop-filter: blur(4px); }
.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 86vh;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.modal-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.logs-pre {
  margin: 0;
  padding: 14px 18px;
  background: #070c17;
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.5;
  overflow: auto;
  flex: 1;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 120;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--cyan);
  color: var(--text);
  font-size: 0.84rem;
  box-shadow: var(--shadow);
}

.sidebar-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(2, 6, 23, 0.65); }

/* Responsive */
@media (max-width: 1180px) {
  .kpi-grid, .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts-grid, .two-col, .security-grid { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .app-shell { grid-template-columns: 1fr; }
  .mobile-only { display: inline-flex; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 256px;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }
  .sidebar.open { transform: translateX(0); }
}
@media (max-width: 640px) {
  .topbar, .content { padding-left: 14px; padding-right: 14px; }
  .kpi-grid, .summary-strip, .links-grid { grid-template-columns: 1fr; }
}
