/* ═══════════════════════════════════════════════════════════
   ALUCARD ALPHA OS — Design System v2.0
   Command Wall · Glassmorphism · Dark Mode · Spatial UI
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ── */
:root {
  --bg-deep: #0a0a0f;
  --bg-surface: rgba(14, 14, 18, 0.88);
  --bg-elevated: rgba(24, 24, 30, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --bg-card-hover: rgba(255, 255, 255, 0.10);

  --accent-primary: #dc2626;
  --accent-secondary: #f87171;
  --accent-tertiary: #fbbf24;
  --accent-success: #22c55e;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --accent-info: #3b82f6;

  --text-primary: #f0f0f5;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  /* Liquid Glass */
  --glass-blur: 20px;
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-border-hover: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  --specular-top: rgba(255, 255, 255, 0.10);
  --specular-angle: 135deg;
  --accent-rgb: 168, 0, 0;
  --accent-glow: rgba(168, 0, 0, 0.35);
  --accent-glow-subtle: rgba(168, 0, 0, 0.12);

  --status-healthy: #22c55e;
  --status-degraded: #f59e0b;
  --status-critical: #ef4444;
  --status-flatline: #6b7280;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-normal: 0.3s var(--ease-out);
  --transition-slow: 0.5s var(--ease-out);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
}

/* Ambient crimson glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 700px 700px at 8% 15%, rgba(var(--accent-rgb), 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 550px 550px at 92% 75%, rgba(100, 0, 40, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 450px 450px at 50% 50%, rgba(80, 0, 0, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Liquid Glass Card ── */
.glass-card {
  position: relative;
  background: var(--bg-glass);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
  will-change: transform;
}

/* Specular highlight layer */
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(var(--specular-angle),
    rgba(255, 255, 255, 0.05) 0%,
    transparent 40%,
    transparent 60%,
    rgba(255, 255, 255, 0.015) 100%);
  pointer-events: none;
  z-index: 1;
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 0 24px var(--accent-glow-subtle),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}
.glass-card--surface { background: var(--bg-surface); }

/* ══════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════ */
.alpha-layout {
  display: grid;
  grid-template-columns: 60px 1fr;
  grid-template-rows: 1fr 32px;
  height: 100vh;
  overflow: hidden;
}

.alpha-layout__sidebar {
  grid-row: 1 / -1;
  background: rgba(32, 32, 36, 0.65);
  backdrop-filter: blur(60px) saturate(1.8);
  -webkit-backdrop-filter: blur(60px) saturate(1.8);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 1px 0 0 rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 2px;
  z-index: 100;
}

.alpha-layout__main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px 16px 8px;
  gap: 8px;
}

.alpha-layout__ticker {
  grid-column: 2;
  background: rgba(80, 10, 10, 0.92);
  border-top: 1px solid var(--glass-border);
  padding: 6px 16px;
  overflow: hidden;
}

/* ── Sidebar ── */
.nav-item {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  text-decoration: none;
}
.nav-item:hover, .nav-item--active {
  background: rgba(220, 38, 38, 0.15);
  color: var(--accent-primary);
}
.nav-item--active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--accent-primary);
  border-radius: 0 3px 3px 0;
}
.nav-item__icon { width: 20px; height: 20px; }

/* ══════════════════════════════════════
   COMMAND WALL HEADER
   ══════════════════════════════════════ */
.cw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  padding: 10px 16px;
  background: rgba(32, 32, 36, 0.55);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-lg);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}
.cw-header::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 40%, transparent 60%, rgba(255,255,255,0.01) 100%);
  pointer-events: none;
}
.cw-header__left { display: flex; align-items: center; gap: 12px; }
.cw-header__title { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.cw-header__badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
}
.cw-header__badge--healthy { background: rgba(34, 197, 94, 0.15); color: var(--status-healthy); }
.cw-header__badge--degraded { background: rgba(245, 158, 11, 0.15); color: var(--status-degraded); }
.cw-header__badge--critical { background: rgba(239, 68, 68, 0.15); color: var(--status-critical); }
.cw-header__right { display: flex; align-items: center; gap: 8px; }
.cw-header__user { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.cw-header__dot { color: var(--accent-success); font-size: 10px; }

/* ══════════════════════════════════════
   TAB SYSTEM
   ══════════════════════════════════════ */
.cw-tabs {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  padding: 0;
  background: rgba(32, 32, 36, 0.45);
  backdrop-filter: blur(30px) saturate(1.5);
  -webkit-backdrop-filter: blur(30px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}
.cw-tabs::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.cw-tab {
  flex: 1;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.cw-tab__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.cw-tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}
.cw-tab--active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  background: rgba(var(--accent-rgb), 0.08);
  font-weight: 600;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

/* ══════════════════════════════════════
   PANELS (Tab content)
   ══════════════════════════════════════ */
.cw-panel {
  display: none;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow: hidden;
  animation: fade-in-up 0.3s var(--ease-out);
}
.cw-panel--active { display: flex; }

/* ══════════════════════════════════════
   KPI CARDS ROW
   ══════════════════════════════════════ */
.cw-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  flex-shrink: 0;
}
.cw-kpi-row--5 { grid-template-columns: repeat(5, 1fr); }
.cw-kpi-row--4 { grid-template-columns: repeat(4, 1fr); }

.cw-kpi {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  overflow: visible;
}
.cw-kpi:hover { transform: translateY(-1px); }

.cw-kpi__header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}
.cw-kpi__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cw-kpi__dot--healthy { background: var(--status-healthy); }
.cw-kpi__dot--degraded { background: var(--status-degraded); }
.cw-kpi__dot--critical { background: var(--status-critical); }

.cw-kpi__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.cw-kpi__value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.cw-kpi__value--lg { font-size: 26px; }
.cw-kpi__value--healthy { color: var(--status-healthy); }
.cw-kpi__value--degraded { color: var(--status-degraded); }
.cw-kpi__value--critical { color: var(--status-critical); }

.cw-kpi__label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.cw-kpi__sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}
.cw-kpi__sub--positive { color: var(--accent-success); }
.cw-kpi__sub--negative { color: var(--accent-danger); }

.cw-kpi__spark {
  position: absolute;
  bottom: 4px;
  right: 8px;
  width: 100px;
  height: 36px;
  opacity: 0.7;
  z-index: 0;
}

.cw-kpi--agent .cw-kpi__value { font-size: 24px; }
.cw-kpi--inactive { opacity: 0.4; }

/* ══════════════════════════════════════
   CHART & CONTENT CARDS
   ══════════════════════════════════════ */
.cw-row-2col {
  display: flex;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.cw-chart-card {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  position: relative;
}
.cw-chart {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.cw-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.cw-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(220, 38, 38, 0.15);
  color: var(--accent-primary);
}
.cw-badge--positive { background: rgba(34, 197, 94, 0.15); color: var(--accent-success); }
.cw-badge--danger { background: rgba(239, 68, 68, 0.15); color: var(--accent-danger); }
.cw-badge--warning { background: rgba(245, 158, 11, 0.15); color: var(--accent-warning); }

.cw-legend {
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: var(--text-muted);
}
.cw-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 3px;
}
.cw-dot--healthy { background: var(--status-healthy); }
.cw-dot--degraded { background: var(--status-degraded); }
.cw-dot--critical { background: var(--status-critical); }

/* ══════════════════════════════════════
   ALERT FEED
   ══════════════════════════════════════ */
.cw-alert-feed {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 0.5;
  min-height: 0;
}
.cw-feed {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cw-feed::-webkit-scrollbar { width: 4px; }
.cw-feed::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Alert Card (reused) */
.alert-card {
  padding: 8px 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}
.alert-card:hover { background: var(--bg-card-hover); }

.alert-card__indicator {
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}
.alert-card__indicator--fatal,
.alert-card__indicator--critical { background: var(--accent-danger); }
.alert-card__indicator--warning { background: var(--accent-warning); }
.alert-card__indicator--info { background: var(--accent-info); }

.alert-card__content { flex: 1; min-width: 0; }
.alert-card__message {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.alert-card__meta { font-size: 9px; color: var(--text-muted); margin-top: 1px; }
.alert-card__action {
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.alert-card__action:hover {
  background: rgba(220, 38, 38, 0.15);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* ══════════════════════════════════════
   MORNING BRIEF
   ══════════════════════════════════════ */
.cw-brief-card {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.cw-brief-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}
.cw-brief-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  font-size: 11px;
  line-height: 1.4;
}
.cw-brief-item__icon { font-size: 14px; flex-shrink: 0; }
.cw-brief-item__text { flex: 1; }
.cw-brief-item__label { font-weight: 600; margin-bottom: 2px; display: block; }
.cw-brief-item__detail { color: var(--text-muted); font-size: 10px; }

/* ══════════════════════════════════════
   STAT GRID (Memory, Invoice, etc.)
   ══════════════════════════════════════ */
.cw-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cw-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cw-stat__val { font-size: 16px; font-weight: 700; }
.cw-stat__val--healthy { color: var(--status-healthy); }
.cw-stat__val--degraded { color: var(--status-degraded); }
.cw-stat__val--critical { color: var(--status-critical); }
.cw-stat__label { font-size: 10px; color: var(--text-muted); }

/* ══════════════════════════════════════
   TABLES
   ══════════════════════════════════════ */
.cw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.cw-table thead th {
  text-align: left;
  padding: 6px 10px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cw-table tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}
.cw-table tbody tr:hover td { background: var(--bg-card-hover); }
.cw-table--compact td, .cw-table--compact th { padding: 4px 8px; font-size: 10px; }

/* ══════════════════════════════════════
   TOPOLOGY MAP
   ══════════════════════════════════════ */
.topology-map {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 20px;
}
.topology-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.topology-node:hover { transform: scale(1.1); }
.topology-node__dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  position: relative;
}
.topology-node__dot::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.3;
  animation: pulse-ring 2s ease-out infinite;
}
.topology-node__dot--healthy { background: var(--status-healthy); }
.topology-node__dot--degraded { background: var(--status-degraded); }
.topology-node__dot--critical { background: var(--status-critical); }
.topology-node__dot--flatline { background: var(--status-flatline); }
.topology-node__label { font-size: 10px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }

/* ══════════════════════════════════════
   GAUGES
   ══════════════════════════════════════ */
.cw-gauge { margin: 0 auto; }

/* ══════════════════════════════════════
   INTEGRATION GRID
   ══════════════════════════════════════ */
.cw-integration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  overflow-y: auto;
  flex: 1;
}
.cw-int-card {
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cw-int-card__header { display: flex; justify-content: space-between; align-items: center; }
.cw-int-card__name { font-size: 11px; font-weight: 600; }
.cw-int-card__status { width: 8px; height: 8px; border-radius: 50%; }
.cw-int-card__meta { font-size: 9px; color: var(--text-muted); }

/* Circuit Breaker Grid */
.cw-cb-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex: 1;
}
.cw-cb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  font-size: 11px;
}
.cw-cb-item__state {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}
.cw-cb-item__state--closed { background: rgba(34, 197, 94, 0.15); color: var(--accent-success); }
.cw-cb-item__state--open { background: rgba(239, 68, 68, 0.15); color: var(--accent-danger); }
.cw-cb-item__state--half-open { background: rgba(245, 158, 11, 0.15); color: var(--accent-warning); }

/* ══════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════ */
.btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn--sm { padding: 4px 8px; font-size: 11px; }
.btn--primary { background: var(--accent-primary); color: white; }
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); }

/* ══════════════════════════════════════
   TICKER
   ══════════════════════════════════════ */
.alert-ticker { display: flex; gap: 32px; animation: ticker-scroll 40s linear infinite; }
.alert-ticker__item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 11px;
  color: #ffffff;
}
.alert-ticker__badge {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}
.alert-ticker__badge--critical { background: rgba(239, 68, 68, 0.2); color: var(--accent-danger); }
.alert-ticker__badge--warning { background: rgba(245, 158, 11, 0.2); color: var(--accent-warning); }
.alert-ticker__badge--info { background: rgba(59, 130, 246, 0.2); color: var(--accent-info); }

/* ══════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════ */
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.3; }
  100% { transform: scale(2); opacity: 0; }
}
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fade-in-up 0.3s var(--ease-out) both; }
.stagger > * { animation: fade-in-up 0.3s var(--ease-out) both; }
.stagger > *:nth-child(1) { animation-delay: 0s; }
.stagger > *:nth-child(2) { animation-delay: 0.05s; }
.stagger > *:nth-child(3) { animation-delay: 0.1s; }
.stagger > *:nth-child(4) { animation-delay: 0.15s; }
.stagger > *:nth-child(5) { animation-delay: 0.2s; }
.stagger > *:nth-child(6) { animation-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 1200px) {
  .cw-kpi-row { grid-template-columns: repeat(3, 1fr); }
  .cw-kpi-row--5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .alpha-layout { grid-template-columns: 1fr; }
  .alpha-layout__sidebar {
    flex-direction: row;
    grid-row: auto;
    order: -1;
    padding: 6px 8px;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    overflow-x: auto;
  }
  .cw-row-2col { flex-direction: column; }
  .cw-tabs { overflow-x: auto; }
}

/* ApexCharts dark theme overrides */
.apexcharts-canvas { background: transparent !important; }
.apexcharts-tooltip { background: var(--bg-elevated) !important; border: 1px solid var(--glass-border) !important; border-radius: var(--radius-sm) !important; }
.apexcharts-tooltip-title { background: var(--bg-surface) !important; border-bottom: 1px solid var(--glass-border) !important; }
.apexcharts-xaxistooltip, .apexcharts-yaxistooltip { background: var(--bg-elevated) !important; border: 1px solid var(--glass-border) !important; }
.apexcharts-gridline { stroke: rgba(255, 255, 255, 0.04) !important; }
