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

:root {
  /* Dark "gradient dashboard" theme — deep-navy panels, light text, neon accents.
     (Was the "Bold Editorial" light theme; flipped to dark 2026-07-10 across all
     dashboards + admin. Restore the light theme from shared/style.css.bak-lighttheme.) */
  --bg: #0e1524;                /* deep navy page */
  --surface: #1a2132;           /* panel */
  --surface-2: #141b29;
  --border: rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.15);
  --border-light: rgba(255,255,255,0.06);
  --text: #e8ecf5;              /* many client inline styles reference --text/--text-muted/--primary */
  --text-primary: #e8ecf5;
  --text-secondary: #9aa4ba;
  --text-tertiary: #6b7488;
  --text-muted: #7c869c;
  --primary: #f5a623;
  --accent: #f5a623;            /* amber accent */
  --accent-dark: #b45309;
  --accent-light: rgba(245,166,35,0.14);
  --green: #34d399;             /* mint success */
  --green-light: rgba(52,211,153,0.14);
  --red: #f87171;
  --red-light: rgba(248,113,113,0.14);
  --amber: #fbbf24;
  --amber-light: rgba(251,191,36,0.16);
  --sidebar-w: 160px;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 2px 10px rgba(0,0,0,0.35);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.45);
  --font: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}
/* Boot loader — covers the viewport while we check auth, so the login form
   never flashes before the dashboard (or login) is ready to show. */
.boot-loader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.boot-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--border-light); border-top-color: var(--accent);
  animation: boot-spin 0.7s linear infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }
.auth-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 380px;
  box-shadow: var(--shadow-md);
}
.auth-logo {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.auth-field {
  margin-bottom: 16px;
}
.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
}
.auth-field input:focus { border-color: var(--accent); }
.auth-btn {
  width: 100%;
  padding: 11px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.15s;
}
.auth-btn:hover { opacity: 0.9; }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-error {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--red-light);
  color: var(--red);
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: none;
}

#app {
  display: none;
  height: 100vh;
  overflow: hidden;
}

.layout {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0;
  flex-shrink: 0;
}
.sidebar-header {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border-light);
}
.sidebar-brand {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}
.sidebar-brand-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 1px;
}
.sidebar-section {
  padding: 16px 12px 8px;
}
.sidebar-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  padding: 0 4px;
  margin-bottom: 6px;
}
.client-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--surface);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.sidebar-nav {
  padding: 8px 12px;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg); color: var(--text-primary); }
.nav-item.active { background: var(--accent-light); color: var(--accent); }
.nav-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
}
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.user-name { font-size: 12px; font-weight: 500; }
.user-role { font-size: 11px; color: var(--text-tertiary); }
.sign-out-btn {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-tertiary);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
  padding: 0;
}
.sign-out-btn:hover { color: var(--red); }

.main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-title { font-size: 14px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.topbar-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 10px; position: relative; }
.topbar-actions { display: flex; align-items: center; gap: 8px; position: relative; }
.topbar-actions .fetched-bar { padding: 0; margin-right: 4px; }

.date-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.12s;
}
.date-btn:hover { border-color: var(--accent); }
.date-btn svg { width: 14px; height: 14px; color: var(--text-secondary); }

.date-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 12px;
  min-width: 360px;
  z-index: 100;
  display: none;
}
.date-dropdown.open { display: flex; gap: 12px; }
.date-presets { display: flex; flex-direction: column; gap: 4px; }
.preset-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: all 0.1s;
  color: var(--text-primary);
}
.preset-btn:hover { background: var(--bg); }
.preset-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.date-custom { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.date-custom-row { display: flex; align-items: center; gap: 8px; }
.date-custom-row input[type="date"] {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-primary);
  outline: none;
}
.date-custom-row span { font-size: 12px; color: var(--text-secondary); }
.apply-btn {
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
}

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.12s;
}
.refresh-btn:hover { border-color: var(--accent); color: var(--accent); }
.refresh-btn svg { width: 14px; height: 14px; }
.refresh-btn.spinning svg { animation: spin 0.8s linear infinite; }
.refresh-btn.spinning .ti { display: inline-block; animation: spin 0.8s linear infinite; }
.refresh-btn .ti, .date-btn .ti { font-size: 14px; }
.tab-btn .ti { font-size: 14px; vertical-align: -2px; margin-right: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.page {
  padding: 28px;
  flex: 1;
  display: none;
}
.page.active { display: block; }

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14,21,36,0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 50;
}
.loading-overlay.visible { display: flex; }
/* Indeterminate progress bar (repurposes the .loading-spinner element — no HTML change). */
.loading-spinner {
  position: relative;
  width: 220px;
  height: 6px;
  border: none;
  border-radius: 999px;
  background: var(--border-light);
  overflow: hidden;
  animation: none;
}
.loading-spinner::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: loading-slide 1.15s ease-in-out infinite;
}
@keyframes loading-slide {
  0%   { left: -40%; }
  100% { left: 100%; }
}
/* Quirky caption beneath the bar. */
.loading-overlay::after {
  content: "Cooking to serve you hot!";
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  animation: loading-pulse 1.6s ease-in-out infinite;
}
@keyframes loading-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

.section-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.section-header .ti { font-size: 15px; color: var(--accent); line-height: 1; }

/* ── Bold Editorial: icon affordances ─────────────────────────────── */
.metric-label, .health-card-label { display: flex; align-items: center; gap: 6px; }
.metric-label .ti, .health-card-label .ti { font-size: 13px; color: var(--text-tertiary); line-height: 1; }
.chart-card-title, .table-card-title { display: inline-flex; align-items: center; gap: 7px; }
.chart-card-title .ti, .table-card-title .ti { font-size: 14px; color: var(--accent); line-height: 1; }
/* card top-right accent icon (optional, for key KPIs) */
.metric-card { position: relative; }
.metric-card .ti-corner {
  position: absolute; top: 16px; right: 16px;
  font-size: 16px; color: var(--text-tertiary); opacity: 0.55; line-height: 1;
}

.health-section { margin-bottom: 28px; }
.health-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.health-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
  box-shadow: var(--shadow);
}
.health-card-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}
.health-value {
  font-size: 22px;
  font-weight: 600;
  font-family: var(--mono);
  line-height: 1.2;
}
.health-value.green { color: var(--green); }
.health-value.red { color: var(--red); }
.health-value.neutral { color: var(--text-primary); }
.health-value.na { color: var(--text-tertiary); font-size: 18px; }
.health-check { font-size: 14px; margin-left: 4px; }
.health-sub { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
.health-blended-row { margin-top: 8px; }
.health-blended-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-light);
}
.health-blended-item:last-child { border-bottom: none; }
.health-blended-label { font-size: 11px; color: var(--text-secondary); }
.health-blended-val { font-size: 13px; font-weight: 600; font-family: var(--mono); }

.metrics-section { margin-bottom: 28px; }
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.metric-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-tertiary);
  margin-bottom: 5px;
}
.metric-value {
  font-size: 20px;
  font-weight: 500;              /* DM Mono ships only 300/400/500 — 600 faux-bolds and haloes on dark */
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.metric-value.highlight { color: var(--green); }
.metric-sub { font-size: 11px; color: var(--text-secondary); margin-top: 3px; }
.metric-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 20px;
  margin-top: 5px;
}
.metric-badge.green { background: var(--green-light); color: var(--green); }
.metric-badge.red { background: var(--red-light); color: var(--red); }

.charts-row {
  display: grid;
  grid-template-columns: 1fr 260px 260px;
  gap: 12px;
  margin-bottom: 28px;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow);
}
.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.chart-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.chart-card-sub {
  font-size: 11px;
  color: var(--text-tertiary);
}
.chart-wrapper { position: relative; }

.tables-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.table-card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.table-card-sub { font-size: 11px; color: var(--text-tertiary); }

table { width: 100%; border-collapse: collapse; }
thead th {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-tertiary);
  padding: 0 0 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
thead th:not(:first-child) { text-align: right; }
tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg); }
tbody td {
  padding: 10px 0;
  font-size: 13px;
  color: var(--text-primary);
}
tbody td:not(:first-child) { text-align: right; }
.platform-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}
.platform-tag.meta { background: rgba(59,130,246,0.16); color: #93c5fd; }
.platform-tag.google { background: rgba(251,191,36,0.16); color: #fcd34d; }
.roas-value { font-family: var(--mono); font-size: 12px; }
.roas-value.good { color: var(--green); font-weight: 600; }
.roas-value.bad { color: var(--red); }
.roas-value.na { color: var(--text-tertiary); }

.share-bar-wrapper { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.share-bar-bg {
  width: 80px;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
}
.share-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}
.share-bar-fill.google { background: #facc15; }

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.15s;
}
.client-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.client-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  margin-right: 8px;
}
.client-card-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.client-card-tags { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }

.fetched-bar {
  font-size: 11px;
  color: var(--text-tertiary);
  padding: 0 28px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fetched-bar span { color: var(--text-secondary); }
.cached-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--amber-light);
  color: var(--amber);
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .sidebar { display: none; }
  .health-grid { grid-template-columns: 1fr; }
  .tables-row { grid-template-columns: 1fr; }
}

#page-hair-pantry {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
#page-hair-pantry .metrics-section:first-child {
  margin-top: 0 !important;
}

.mobile-client-bar { display: none; }
@media (max-width: 800px) {
  .layout {
    flex-direction: column !important;
  }
  .mobile-client-bar {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    width: 100%;
    box-sizing: border-box;
    order: -1;
  }
  .mobile-client-bar label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    font-weight: 600;
  }
  .mobile-client-bar select {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-width: 0;
  }
  .main {
    width: 100% !important;
    min-width: 0 !important;
  }
}


/* ── Phase 1 Mobile Fixes (≤480px) ──────────────────────────────────── */
@media (max-width: 480px) {

  /* Topbar: stack title above date controls */
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
  }
  .topbar-actions {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .fetched-bar {
    display: none !important;
  }
  .date-btn {
    flex: 1;
    justify-content: center;
    font-size: 12px;
    padding: 7px 10px;
  }
  .refresh-btn {
    flex-shrink: 0;
    padding: 7px 10px;
    font-size: 12px;
  }

  /* Date dropdown: full width, horizontal scroll for presets */
  .date-dropdown {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100% !important;
    min-width: unset !important;
    border-radius: 16px 16px 0 0;
    max-height: 70vh;
    overflow-y: auto;
    padding: 16px;
    box-sizing: border-box;
  }
  /* Preset buttons: horizontal scroll row */
  .date-dropdown .preset-btn {
    display: inline-block;
    white-space: nowrap;
    font-size: 11px;
    padding: 6px 10px;
  }
  /* Wrap preset buttons in a scroll container via JS not needed — use flex wrap */
  .date-dropdown {
    display: none;
  }
  .date-dropdown.open {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
  }
  /* Preset buttons row: wrap */
  .date-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 4px;
  }
  .date-custom input[type="date"] {
    flex: 1;
    min-width: 120px;
    font-size: 12px;
    padding: 6px 8px;
  }

  /* Metrics grids: always 2 columns on mobile (1 for 4-col grids) */
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }

  /* Metric cards: compact padding */
  .metric-card {
    padding: 14px 12px;
  }
  .metric-value {
    font-size: 18px;
  }
  .metric-label {
    font-size: 10px;
    margin-bottom: 6px;
  }
  .metric-sub {
    font-size: 10px;
  }

  /* Section headers */
  .section-header {
    font-size: 11px;
  }
  .metrics-section {
    margin-bottom: 20px;
  }

  /* Table cards */
  .table-card {
    border-radius: 10px;
  }
  .table-card-header {
    padding: 14px 16px 10px;
  }

  /* Charts: stack to single column */
  .charts-grid-2col,
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"] {
    display: block !important;
  }
  .charts-grid-2col > *,
  div[style*="grid-template-columns:1fr 1fr"] > *,
  div[style*="grid-template-columns: 1fr 1fr"] > * {
    margin-bottom: 12px;
    width: 100% !important;
  }

  /* Page padding */
  .page {
    padding: 16px 12px;
  }
  .main {
    padding: 0;
  }

  /* Sidebar hidden on mobile (already done at 800px) */
}
