/* ===========================
   THE COLLECTIF Analytics SAAS — Styles
   =========================== */

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

:root {
  --violet: #8b5cf6;
  --violet-dim: rgba(139,92,246,.15);
  --violet-glow: rgba(139,92,246,.25);
  --cyan: #06b6d4;
  --cyan-dim: rgba(6,182,212,.12);
  --green: #10b981;
  --amber: #f59e0b;
  --red: #e11d48;
  --bg: #0a0e1a;
  --bg-2: #0f1629;
  --surface: #131929;
  --surface-2: #1a2235;
  --border: rgba(255,255,255,.08);
  --border-hover: rgba(255,255,255,.14);
  --text: #f1f5f9;
  --text-2: #94a3b8;
  --text-3: #475569;
  --sidebar-w: 240px;
  --header-h: 60px;
  --banner-h: 40px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,.4);
  --shadow-glow: 0 0 30px rgba(139,92,246,.12);
}

html, body { height: 100%; overflow: hidden; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px; color: var(--text);
  background: var(--bg);
}

/* ======== DEMO BANNER ======== */
.demo-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  height: var(--banner-h);
  background: linear-gradient(90deg, #0a0e1a 0%, #16103a 50%, #0a0e1a 100%);
  border-bottom: 1px solid rgba(139,92,246,.3);
  display: flex; align-items: center; justify-content: center; gap: 20px;
  font-size: 13px; color: #94a3b8; font-weight: 500;
}
.demo-back {
  color: var(--violet); text-decoration: none; font-weight: 600;
  padding: 4px 12px; border: 1px solid rgba(139,92,246,.35); border-radius: 20px;
  transition: all .2s;
}
.demo-back:hover { background: var(--violet-dim); }

/* ======== APP SHELL ======== */
.app-shell {
  display: flex;
  height: calc(100vh - var(--banner-h));
  margin-top: var(--banner-h);
  overflow: hidden;
}

/* ======== SIDEBAR ======== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  flex-shrink: 0; overflow-y: auto;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--bg-2), rgba(139,92,246,.3));
  border: 1px solid rgba(139,92,246,.4);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-text strong {
  display: block; font-size: 14px; font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.plan-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  background: var(--violet-dim); color: var(--violet);
  border: 1px solid rgba(139,92,246,.3);
  padding: 1px 8px; border-radius: 999px;
}

.sidebar-nav {
  flex: 1; padding: 12px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500; color: var(--text-2);
  background: none; border: none; cursor: pointer;
  text-align: left; width: 100%; transition: all .15s;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.05); color: var(--text); }
.nav-item.active { background: var(--violet-dim); color: var(--violet); font-weight: 600; }
.nav-item.active svg { stroke: var(--violet); }
.nav-badge {
  margin-left: auto; font-size: 11px; font-weight: 700;
  color: var(--cyan); background: var(--cyan-dim);
  padding: 1px 7px; border-radius: 999px;
}
.nav-divider { height: 1px; background: var(--border); margin: 8px 2px; }

.sidebar-workspace {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
}
.workspace-select {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .15s;
}
.workspace-select:hover { background: rgba(255,255,255,.05); }
.ws-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: white; flex-shrink: 0;
}
.ws-info strong { display: block; font-size: 13px; font-weight: 600; }
.ws-info span { font-size: 11px; color: var(--text-3); }
.workspace-select svg { margin-left: auto; color: var(--text-3); }

/* ======== MAIN CONTENT ======== */
.main-content {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
}

/* ======== HEADER ======== */
.app-header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px; flex-shrink: 0;
}
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text-2); padding: 6px; border-radius: 8px;
}
.hamburger:hover { background: rgba(255,255,255,.06); }
.hamburger svg { width: 20px; height: 20px; }

.period-selector {
  display: flex; gap: 4px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px;
}
.period-btn {
  padding: 6px 14px; border-radius: 7px;
  background: none; border: none; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  font-family: inherit; transition: all .15s;
}
.period-btn.active { background: var(--violet); color: white; font-weight: 600; }
.period-btn:not(.active):hover { background: rgba(255,255,255,.06); color: var(--text); }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-date { font-size: 12.5px; color: var(--text-3); }
.header-btn-icon {
  position: relative; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
}
.header-btn-icon:hover { background: rgba(255,255,255,.06); }
.header-btn-icon svg { width: 18px; height: 18px; }
.notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; background: var(--red);
  border-radius: 50%; border: 2px solid var(--surface);
}
.user-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 12px 4px 4px;
  cursor: pointer;
}
.user-av {
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: white;
}
.user-chip span { font-size: 13px; font-weight: 500; }

/* ======== VIEW CONTAINER ======== */
.view-container {
  flex: 1; overflow-y: auto; padding: 28px 32px;
}
.view { display: none; }
.view.active { display: block; }

.view-title-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 28px;
}
.view-title-row h1 {
  font-size: 22px; font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(90deg, var(--text), #cbd5e1);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.view-sub { font-size: 13.5px; color: var(--text-2); margin-top: 4px; }
.header-actions { display: flex; gap: 10px; }

.btn-primary {
  background: var(--violet); color: white;
  border: none; border-radius: 8px; cursor: pointer;
  padding: 9px 16px; font-size: 13.5px; font-weight: 600;
  font-family: inherit; transition: all .15s;
}
.btn-primary:hover { background: #7c3aed; box-shadow: 0 0 16px var(--violet-glow); }
.btn-ghost {
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
  padding: 8px 14px; font-size: 13.5px; font-weight: 500;
  font-family: inherit; display: flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text); }
.btn-link { background: none; border: none; cursor: pointer; color: var(--violet); font-size: 13px; font-weight: 600; font-family: inherit; }

/* ======== METRIC CARDS ======== */
.metric-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.metric-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); transition: border-color .2s;
}
.metric-card:hover { border-color: rgba(139,92,246,.3); }
.metric-card-mrr { border-top: 2px solid var(--amber); }

.metric-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.metric-label { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.metric-trend {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}
.trend-up { background: rgba(16,185,129,.15); color: var(--green); }
.trend-down { background: rgba(225,29,72,.12); color: var(--red); }

.metric-value {
  font-size: 28px; font-weight: 800; line-height: 1;
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(90deg, var(--text) 60%, #94a3b8);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.metric-spark { height: 40px; margin-bottom: 8px; }
.spark-svg { width: 100%; height: 100%; }
.metric-sub { font-size: 11.5px; color: var(--text-3); }

/* ======== MAIN CHART ======== */
.chart-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  margin-bottom: 20px; box-shadow: var(--shadow);
}
.chart-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px;
}
.chart-header h3 { font-size: 15px; font-weight: 700; }
.chart-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.chart-options { display: flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.chart-opt {
  padding: 5px 12px; border-radius: 6px; border: none; cursor: pointer;
  font-size: 12.5px; font-weight: 500; color: var(--text-2);
  background: none; font-family: inherit; transition: all .15s;
}
.chart-opt.active { background: var(--violet); color: white; }
.chart-opt:not(.active):hover { background: rgba(255,255,255,.06); }

.chart-wrap { display: flex; gap: 0; align-items: stretch; }
.chart-y-labels {
  display: flex; flex-direction: column; justify-content: space-between;
  padding-right: 12px; padding-bottom: 0;
  font-size: 11px; color: var(--text-3); text-align: right;
  flex-shrink: 0;
}
.chart-area { flex: 1; overflow: hidden; border-radius: 8px; }
.area-chart { width: 100%; height: 280px; display: block; }
.chart-x-labels {
  display: flex; justify-content: space-between;
  padding: 8px 0 0 42px;
  font-size: 11.5px; color: var(--text-3);
}

/* ======== BOTTOM GRID ======== */
.bottom-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-bottom: 20px;
}

/* EVENTS CARD */
.events-card, .funnel-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.card-header h3 { font-size: 15px; font-weight: 700; }

.events-list { display: flex; flex-direction: column; gap: 12px; }
.event-row { display: flex; align-items: center; gap: 10px; }
.event-rank {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--bg-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-2);
  flex-shrink: 0;
}
.event-name { flex-shrink: 0; width: 140px; }
.event-name strong { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.event-name span { font-size: 11px; color: var(--text-3); }
.event-bar-wrap { flex: 1; height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.event-bar { height: 100%; background: linear-gradient(90deg, var(--violet), var(--cyan)); border-radius: 999px; }
.event-count { font-size: 12.5px; font-weight: 700; color: var(--text-2); width: 60px; text-align: right; flex-shrink: 0; }

/* FUNNEL */
.funnel-period { font-size: 12px; color: var(--text-3); }
.funnel-steps { display: flex; flex-direction: column; gap: 0; }
.funnel-step { display: flex; align-items: center; gap: 12px; }
.funnel-bar-wrap { flex: 1; height: 40px; background: var(--bg-2); border-radius: 8px; overflow: hidden; }
.funnel-bar {
  height: 100%; border-radius: 8px;
  display: flex; align-items: center; padding: 0 14px;
  font-size: 13px; font-weight: 700; color: white;
  min-width: fit-content;
}
.fb-1 { background: linear-gradient(90deg, var(--violet), #7c3aed); }
.fb-2 { background: linear-gradient(90deg, #7c3aed, var(--cyan)); }
.fb-3 { background: linear-gradient(90deg, var(--cyan), var(--green)); }
.fb-4 { background: linear-gradient(90deg, var(--green), #059669); }
.fb-label { font-size: 12px; font-weight: 700; white-space: nowrap; }
.funnel-meta { text-align: right; flex-shrink: 0; width: 70px; }
.funnel-meta strong { display: block; font-size: 14px; font-weight: 800; }
.funnel-meta span { font-size: 11px; color: var(--text-3); }
.funnel-arrow {
  display: flex; align-items: center; gap: 8px;
  padding: 2px 0 2px 4px;
  color: var(--text-3);
}
.drop { font-size: 11.5px; font-weight: 600; color: var(--red); }

/* ======== PRICING CARD ======== */
.pricing-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  margin-bottom: 8px; box-shadow: var(--shadow);
}
.pricing-note { font-size: 13px; color: var(--text-2); }
.pricing-note strong { color: var(--violet); }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 4px; }
.plan-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative; transition: border-color .2s;
}
.plan-card:hover { border-color: var(--border-hover); }
.plan-card-featured {
  border: 1px solid rgba(139,92,246,.5);
  background: linear-gradient(160deg, rgba(139,92,246,.08), var(--bg-2));
  box-shadow: 0 0 30px rgba(139,92,246,.1);
}
.plan-badge-top {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  background: var(--violet); color: white;
  font-size: 11px; font-weight: 700;
  padding: 3px 12px; border-radius: 0 0 8px 8px;
}
.plan-name { font-size: 14px; font-weight: 700; margin-top: 8px; }
.plan-price {
  font-size: 28px; font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
}
.plan-price span { font-size: 14px; font-weight: 500; color: var(--text-2); }

.plan-feats { list-style: none; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.plan-feats li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.plan-feats li svg { flex-shrink: 0; color: var(--green); }
.plan-feats li.feat-no { color: var(--text-3); }
.plan-feats li.feat-no svg { color: var(--text-3); }

.plan-btn {
  width: 100%; padding: 10px; border-radius: 8px; font-size: 13.5px;
  font-weight: 600; cursor: pointer; font-family: inherit;
  border: none; transition: all .15s;
}
.plan-btn-ghost { background: rgba(255,255,255,.06); color: var(--text-2); }
.plan-btn-ghost:hover { background: rgba(255,255,255,.1); }
.plan-btn-primary { background: var(--violet); color: white; }
.plan-btn-upgrade { background: linear-gradient(90deg, var(--violet), var(--cyan)); color: white; }
.plan-btn-upgrade:hover { opacity: .9; box-shadow: 0 0 16px var(--violet-glow); }

/* ======== USERS TABLE ======== */
.users-table-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.u-table { width: 100%; border-collapse: collapse; }
.u-table thead tr { background: var(--bg-2); border-bottom: 1px solid var(--border); }
.u-table th {
  padding: 12px 16px; text-align: left;
  font-size: 11.5px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .06em;
}
.u-table td { padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
.u-table tbody tr:hover { background: rgba(255,255,255,.02); }
.u-table tbody tr:last-child td { border-bottom: none; }
.u-cell { display: flex; align-items: center; gap: 10px; }
.u-av {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: white; flex-shrink: 0;
}
.u-cell strong { display: block; font-size: 13.5px; font-weight: 600; }
.u-cell span { font-size: 12px; color: var(--text-3); }
.plan-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
}
.plan-free { background: rgba(255,255,255,.08); color: var(--text-2); }
.plan-pro { background: var(--violet-dim); color: var(--violet); }
.plan-biz { background: var(--cyan-dim); color: var(--cyan); }
.u-status {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
}
.u-status.active { background: rgba(16,185,129,.15); color: var(--green); }
.u-status.at-risk { background: rgba(245,158,11,.15); color: var(--amber); }
.u-status.churned { background: rgba(225,29,72,.12); color: var(--red); }

/* ======== RETENTION HEATMAP ======== */
.retention-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.retention-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 20px; }
.cohort-table-wrap { overflow-x: auto; }
.cohort-table { width: 100%; border-collapse: separate; border-spacing: 4px; }
.cohort-table th {
  padding: 8px 12px; font-size: 11.5px; font-weight: 600;
  color: var(--text-3); text-align: center; white-space: nowrap;
}
.cohort-table td { padding: 8px 10px; text-align: center; font-size: 13px; font-weight: 600; border-radius: 6px; }
.cohort-name { font-size: 12px; color: var(--text-2); font-weight: 500; text-align: left !important; white-space: nowrap; }
.cohort-users { font-size: 12.5px; color: var(--text-2); }

/* ======== SOURCES ======== */
.sources-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.source-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.source-list { display: flex; flex-direction: column; gap: 14px; }
.source-row { display: flex; align-items: center; gap: 10px; }
.source-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; width: 180px; flex-shrink: 0; }
.src-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.source-bar-w { flex: 1; height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.source-bar { height: 100%; border-radius: 999px; }
.source-pct { font-size: 12.5px; font-weight: 700; color: var(--text-2); width: 36px; text-align: right; }

.device-donut-wrap { display: flex; align-items: center; justify-content: center; gap: 32px; padding: 10px; }
.donut-chart { width: 120px; height: 120px; }
.device-legend { display: flex; flex-direction: column; gap: 10px; }
.dleg-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }

/* ======== SETTINGS ======== */
.settings-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.settings-panel h3 { font-size: 15px; font-weight: 700; }
.sf { display: flex; flex-direction: column; gap: 6px; }
.sf label { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.sf input {
  padding: 9px 12px; border-radius: 8px;
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; font-family: inherit; outline: none;
  transition: border .15s;
}
.sf input:focus { border-color: rgba(139,92,246,.5); }
.code-block {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px;
  font-size: 12px; font-family: 'Courier New', monospace; color: var(--cyan);
  line-height: 1.8;
}
.integration-list { display: flex; flex-direction: column; gap: 10px; }
.int-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.int-row:last-child { border-bottom: none; }
.int-row span { font-size: 14px; font-weight: 500; }
.int-btn {
  padding: 6px 14px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text-2); transition: all .15s;
}
.int-btn:hover { border-color: var(--border-hover); }
.int-connected { background: rgba(16,185,129,.12); color: var(--green); border-color: rgba(16,185,129,.3); }

/* ======== PLACEHOLDER ======== */
.placeholder-view {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 80px 40px; text-align: center;
}
.placeholder-view h3 { font-size: 18px; font-weight: 700; }
.placeholder-view p { font-size: 14px; color: var(--text-2); max-width: 420px; }

/* ======== RESPONSIVE ======== */
@media (max-width: 1200px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .bottom-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .view-container { padding: 20px 16px; }
  .sources-grid { grid-template-columns: 1fr; }
  .settings-panels { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed; top: var(--banner-h); left: 0; bottom: 0; z-index: 100;
    transform: translateX(-100%); transition: transform .25s;
    box-shadow: var(--shadow-md);
  }
  .sidebar.open { transform: translateX(0); }
  .hamburger { display: flex; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .period-selector { gap: 2px; }
  .period-btn { padding: 6px 10px; font-size: 12px; }
  .u-table th:nth-child(4), .u-table td:nth-child(4) { display: none; }
  .u-table th:nth-child(5), .u-table td:nth-child(5) { display: none; }
}
@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr; }
  .view-title-row { flex-direction: column; gap: 12px; }
  .view-container { padding: 16px 12px; }
  .demo-banner { font-size: 11px; gap: 8px; }
  .demo-banner span { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
}
