/* ===========================================================
   Analytics-specific styles — appended to base SER tokens
   =========================================================== */

/* Analytics login bg variant — purple instead of teal */
.login-visual.analytics-bg {
  background: var(--ser-navy);
  background-image:
    radial-gradient(at 20% 25%, rgba(124,92,255,0.45) 0%, transparent 45%),
    radial-gradient(at 85% 75%, rgba(0,180,160,0.22) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a2e 0%, var(--ser-navy) 100%);
}
.login-visual.analytics-bg .brand .logo-dot {
  background: linear-gradient(135deg, white 0%, rgba(255,255,255,0.7) 100%);
}
.login-visual.analytics-bg .brand .logo-dot::after { background: #7c5cff; border-color: var(--ser-navy); }

/* Login hero */
.login-hero h1 {
  font-size: 56px; line-height: 1.05; letter-spacing: -0.025em;
  font-weight: 700; margin: 0 0 20px; color: white;
}
.login-hero h1 em {
  font-style: italic;
  background: linear-gradient(135deg, #c4b5fd, #67e8d8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-hero p { font-size: 16px; line-height: 1.55; color: rgba(255,255,255,0.75); max-width: 480px; margin: 0 0 32px; }
.login-tools-preview { display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.login-tools-preview .mini {
  display: grid; grid-template-columns: 70px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; font-size: 13px; color: rgba(255,255,255,0.85);
}
.login-tools-preview .mini .tag {
  font-size: 10px; font-weight: 800; letter-spacing: 0.10em; text-transform: uppercase;
}

/* ============== APP SHELL ============== */
.app-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; background: var(--ink-25); }

/* Rail (left navigation) */
.rail {
  background: var(--ser-navy-900);
  background-image: linear-gradient(180deg, #0a0a2e 0%, var(--ser-navy) 100%);
  color: white;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.rail-brand {
  padding: 22px 22px 18px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.rail-brand .lg { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, white, rgba(255,255,255,0.7)); display: grid; place-items: center; color: var(--ser-navy); font-weight: 800; font-size: 12px; }
.rail-brand .nm { font-weight: 700; font-size: 14px; line-height: 1.2; }
.rail-brand .sub { font-size: 10px; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.10em; font-weight: 600; }
.rail-brand .badge { margin-left: auto; padding: 3px 7px; background: rgba(124,92,255,0.25); color: #c4b5fd; border-radius: 4px; font-size: 9px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }

.rail-section { padding: 14px 12px 6px; }
.rail-section .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em; color: rgba(255,255,255,0.4); font-weight: 700; padding: 0 10px 6px; }
.rail-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 7px;
  color: rgba(255,255,255,0.75);
  font-size: 13px; font-weight: 500;
  cursor: pointer; transition: 0.12s; text-decoration: none;
  border: none; background: transparent; width: 100%; text-align: left;
}
.rail-item:hover { background: rgba(255,255,255,0.05); color: white; }
.rail-item.active { background: rgba(124,92,255,0.18); color: white; }
.rail-item.active .ico { color: #c4b5fd; }
.rail-item .ico { color: rgba(255,255,255,0.55); flex-shrink: 0; display: flex; }
.rail-item .pill { margin-left: auto; font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 3px; letter-spacing: 0.04em; text-transform: uppercase; }
.rail-item .pill.beta { background: rgba(245,165,35,0.18); color: #fbbf24; }
.rail-item .pill.flag { background: linear-gradient(135deg, #c4b5fd, #67e8d8); color: var(--ser-navy); }

.rail-foot { margin-top: auto; padding: 14px; border-top: 1px solid rgba(255,255,255,0.08); }
.rail-foot .client {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; background: rgba(255,255,255,0.04); border-radius: 8px;
}
.rail-foot .client .av {
  width: 32px; height: 32px; border-radius: 7px;
  background: linear-gradient(135deg, #c2185b, #ec4899);
  color: white; font-weight: 800; font-size: 11px;
  display: grid; place-items: center; flex-shrink: 0;
}
.rail-foot .client .nm { font-size: 13px; font-weight: 700; line-height: 1.2; }
.rail-foot .client .sub { font-size: 10px; color: rgba(255,255,255,0.55); }

/* Topnav within main */
.main-col { min-width: 0; }
.topbar {
  height: 60px; padding: 0 28px;
  display: flex; align-items: center; gap: 16px;
  background: white; border-bottom: 1px solid var(--ink-100);
  position: sticky; top: 0; z-index: 10;
}
.topbar .crumbs { font-size: 13px; color: var(--ink-500); display: flex; align-items: center; gap: 6px; }
.topbar .crumbs .cur { color: var(--ink-900); font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .mod-switch {
  display: flex; align-items: center; gap: 4px;
  padding: 3px; background: var(--ink-50); border-radius: 999px;
}
.topbar .mod-switch a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--ink-500);
  text-decoration: none; cursor: pointer;
}
.topbar .mod-switch a.active { background: white; color: var(--ser-navy); box-shadow: var(--shadow-sm); }
.topbar .mod-switch a .d { width: 6px; height: 6px; border-radius: 50%; }
.topbar .mod-switch a .d.tools { background: var(--ser-gold); }
.topbar .mod-switch a .d.analytics { background: #7c5cff; }

.topbar .lens-tabs {
  display: flex; gap: 2px; padding: 3px;
  background: var(--ink-50); border-radius: 8px;
}
.topbar .lens-tabs button {
  padding: 5px 12px; border-radius: 6px; border: none; background: transparent;
  font-size: 12px; font-weight: 600; color: var(--ink-500); cursor: pointer;
}
.topbar .lens-tabs button.active { background: white; color: var(--ser-navy); box-shadow: var(--shadow-sm); }

.topbar .period {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border: 1px solid var(--ink-200); border-radius: 8px;
  font-size: 12px; font-weight: 600; color: var(--ink-700); background: white; cursor: pointer;
}

.topbar .av {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ser-navy), #7c5cff);
  color: white; display: grid; place-items: center; font-weight: 700; font-size: 11px;
}

/* Page header inside main */
.page-head {
  padding: 28px 32px 18px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  border-bottom: 1px solid var(--ink-100); background: white;
}
.page-head .left .eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em;
  color: #7c5cff; font-weight: 700; margin-bottom: 6px;
  display: inline-flex; align-items: center; gap: 8px;
}
.page-head .left h1 { font-size: 28px; font-weight: 700; color: var(--ink-900); margin: 0 0 6px; letter-spacing: -0.015em; }
.page-head .left .desc { font-size: 14px; color: var(--ink-500); max-width: 640px; line-height: 1.5; }
.page-head .right { display: flex; gap: 8px; flex-shrink: 0; }
.page-head .right button {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--ink-200); background: white;
  font-size: 13px; font-weight: 600; color: var(--ink-700); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.page-head .right button.primary { background: var(--ser-navy); color: white; border-color: var(--ser-navy); }

/* Main content area */
.dash-area { padding: 24px 32px 60px; max-width: 1480px; margin: 0 auto; width: 100%; }

/* Hero revenue card */
.hero-revenue {
  background: white; border-radius: 14px; border: 1px solid var(--ink-100);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.hero-revenue .top {
  padding: 24px 28px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; align-items: center;
}
.hero-revenue .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-500); font-weight: 700; margin-bottom: 6px; }
.hero-revenue .big { font-size: 48px; font-weight: 700; color: var(--ink-900); letter-spacing: -0.025em; line-height: 1; }
.hero-revenue .delta-row { margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-revenue .delta-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(229,57,53,0.10); color: var(--err);
  font-size: 13px; font-weight: 700;
}
.hero-revenue .vs { font-size: 12px; color: var(--ink-500); }
.hero-revenue .chart-area { height: 110px; margin-top: 0; }

/* Generic panel */
.panel { background: white; border-radius: 12px; border: 1px solid var(--ink-100); overflow: hidden; }
.panel-head {
  padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border-bottom: 1px solid var(--ink-100);
}
.panel-head h3 { font-size: 14px; font-weight: 700; color: var(--ink-900); margin: 0; }
.panel-body { padding: 16px 18px; }

.dash-section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 6px 4px;
}
.dash-section-head .left h2 { font-size: 18px; font-weight: 700; color: var(--ink-900); margin: 0 0 2px; letter-spacing: -0.01em; }
.dash-section-head .left .sub { font-size: 12px; color: var(--ink-500); }

/* AI insight inline */
.ai-insight {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 14px; background: rgba(124,92,255,0.06);
  border-left: 3px solid #7c5cff;
  border-radius: 4px;
  font-size: 13px; line-height: 1.55; color: var(--ink-700);
  margin-top: 12px;
}
.ai-insight .ai-icon {
  width: 22px; height: 22px; border-radius: 5px;
  background: linear-gradient(135deg, var(--ser-teal), #7c5cff);
  color: white; font-weight: 800; font-size: 9px; font-family: var(--font-mono);
  display: grid; place-items: center; flex-shrink: 0;
}

/* Waterfall chart */
.waterfall { width: 100%; height: 280px; }

/* Cause card grid */
.causes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cause-card { background: white; border: 1px solid var(--ink-100); border-radius: 12px; padding: 18px; transition: 0.15s; }
.cause-card:hover { box-shadow: var(--shadow-md); border-color: var(--ink-200); }
.cause-card .head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.cause-card .ico { width: 38px; height: 38px; border-radius: 9px; color: white; display: grid; place-items: center; flex-shrink: 0; }
.cause-card .lbl-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em; color: var(--ink-500); font-weight: 700; margin-bottom: 4px; }
.cause-card h4 { font-size: 14px; font-weight: 600; color: var(--ink-900); line-height: 1.4; margin: 0; }
.cause-card .score-col { text-align: right; flex-shrink: 0; }
.cause-card .score-col .num { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.cause-card .score-col .num.neg { color: var(--err); }
.cause-card .score-col .num.pos { color: var(--ok); }
.cause-card .score-col .num.neu { color: var(--ink-500); }
.cause-card .score-col .lbl { display: block; font-size: 10px; color: var(--ink-400); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.cause-card .findings { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.cause-card .findings .item { font-size: 12px; color: var(--ink-700); display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.cause-card .findings .pip { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-300); margin-top: 7px; flex-shrink: 0; }
.cause-card .footer { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--ink-100); }

.severity { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; display: inline-flex; align-items: center; gap: 5px; }
.severity.high { color: var(--err); }
.severity.med { color: #a87000; }
.severity.low { color: var(--ink-500); }
.severity .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* AI ribbon */
.ai-ribbon {
  background: linear-gradient(135deg, var(--ser-navy) 0%, #2a1a6e 100%);
  background-image:
    radial-gradient(at 20% 50%, rgba(124,92,255,0.4) 0%, transparent 50%),
    radial-gradient(at 80% 50%, rgba(0,180,160,0.25) 0%, transparent 50%),
    linear-gradient(135deg, var(--ser-navy) 0%, #2a1a6e 100%);
  color: white;
  border-radius: 14px;
  padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.ai-ribbon .eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em; color: #c4b5fd; font-weight: 700; margin-bottom: 6px; display: inline-flex; align-items: center; gap: 6px; }
.ai-ribbon h2 { font-size: 22px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.015em; }
.ai-ribbon p { font-size: 13px; color: rgba(255,255,255,0.75); margin: 0; max-width: 540px; line-height: 1.5; }
.btn-go {
  padding: 10px 18px; border-radius: 8px; border: none;
  background: white; color: var(--ser-navy); font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}

/* Action list */
.actions-list { display: flex; flex-direction: column; gap: 8px; }
.action-item {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 16px; align-items: center;
  padding: 14px 18px; background: white; border: 1px solid var(--ink-100); border-radius: 10px;
  transition: 0.15s; cursor: pointer;
}
.action-item:hover { border-color: #7c5cff; transform: translateX(2px); }
.action-item .num { width: 28px; height: 28px; border-radius: 7px; background: var(--ink-50); color: var(--ser-navy); font-weight: 800; display: grid; place-items: center; font-size: 13px; }
.action-item:hover .num { background: linear-gradient(135deg, var(--ser-teal), #7c5cff); color: white; }
.action-item .ttl { font-size: 14px; font-weight: 600; color: var(--ink-900); margin-bottom: 4px; }
.action-item .meta { font-size: 12px; color: var(--ink-500); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; line-height: 1.4; }
.impact-pill { padding: 6px 14px; border-radius: 8px; background: rgba(0,180,160,0.10); color: var(--ok); font-size: 14px; font-weight: 700; white-space: nowrap; }

/* Scenarios */
.scenarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.scen { background: white; border: 1px solid var(--ink-100); border-radius: 12px; padding: 20px; position: relative; }
.scen.recommended { border-color: var(--ok); border-width: 2px; box-shadow: 0 8px 24px rgba(0,180,160,0.15); }
.scen .badge-rec { position: absolute; top: -10px; left: 18px; padding: 4px 10px; background: var(--ok); color: white; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; border-radius: 999px; }
.scen h4 { font-size: 16px; font-weight: 700; color: var(--ink-900); margin: 0 0 6px; }
.scen .desc { font-size: 12px; color: var(--ink-500); line-height: 1.5; margin-bottom: 14px; min-height: 50px; }
.scen .outcome { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; margin-bottom: 14px; }
.scen .outcome.pos { color: var(--ok); }
.scen .outcome.neg { color: var(--err); }
.scen .outcome.neu { color: var(--ink-700); }
.scen .row-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--ink-100); border-bottom: 1px solid var(--ink-100); margin-bottom: 12px; }
.scen .row-meta > div { display: flex; flex-direction: column; gap: 2px; }
.scen .row-meta span:first-child { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-400); font-weight: 700; }
.scen .row-meta .vv { font-size: 13px; font-weight: 700; color: var(--ink-900); }

/* Comparator (channels list) */
.comparator { display: flex; flex-direction: column; }
.cmp-row { display: grid; grid-template-columns: 110px 1fr 130px; gap: 14px; align-items: center; }
.cmp-row .lbl { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.cmp-row .sev-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.cmp-row .bar { height: 8px; border-radius: 999px; background: var(--ink-50); position: relative; overflow: hidden; }
.cmp-row .bar > div { height: 100%; border-radius: 999px; }
.cmp-row .vv { font-size: 13px; font-weight: 700; color: var(--ink-900); text-align: right; }

/* Sparkline */
.sparkline { width: 100%; height: 36px; }

/* Donut wrapper */
.donut-wrap { display: flex; gap: 14px; align-items: center; }

/* Data table */
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; padding: 12px 16px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-500); font-weight: 700; background: var(--ink-25); border-bottom: 1px solid var(--ink-100); }
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--ink-100); color: var(--ink-700); }
table.data tr:last-child td { border-bottom: none; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

/* KPI tile */
.kpi-tile { padding: 18px; background: white; border-radius: 10px; }
.kpi-tile .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em; color: var(--ink-500); font-weight: 700; margin-bottom: 8px; }
.kpi-tile .big { font-size: 36px; font-weight: 700; color: var(--ink-900); letter-spacing: -0.025em; line-height: 1; }

/* Dashboard tile (overview) */
.dash-tile {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  padding: 18px; background: white; border: 1px solid var(--ink-100); border-radius: 12px;
  cursor: pointer; transition: 0.15s; text-align: left;
}
.dash-tile:hover { border-color: #7c5cff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.dash-tile .ico-w { width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(135deg, rgba(124,92,255,0.12), rgba(0,180,160,0.12)); color: var(--ser-navy); display: grid; place-items: center; }
.dash-tile .ttl { font-size: 14px; font-weight: 600; color: var(--ink-900); flex: 1; }
.dash-tile .row-bot { display: flex; gap: 6px; align-items: center; width: 100%; }
.status-dot { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.status-dot.live { background: rgba(0,180,160,0.10); color: var(--ok); }
.status-dot.beta { background: rgba(245,165,35,0.12); color: #a87000; }
.flag-pill { font-size: 9px; font-weight: 800; padding: 2px 7px; background: linear-gradient(135deg, #c4b5fd, #67e8d8); color: var(--ser-navy); border-radius: 999px; text-transform: uppercase; letter-spacing: 0.06em; margin-left: auto; }

/* =====================================================================
   RESPONSIVE LAYER — schaalbaar van 360px tot 1600px
   ===================================================================== */

/* Hamburger + close button — hidden by default, shown on mobile */
.topbar-menu {
  display: none;
  width: 38px; height: 38px; border-radius: 8px;
  background: transparent; border: 1px solid var(--ink-200);
  color: var(--ink-700); cursor: pointer;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topbar-menu:hover { background: var(--ink-50); }
.rail-close {
  display: none;
  margin-left: auto;
  width: 32px; height: 32px; border-radius: 6px;
  background: rgba(255,255,255,0.05); border: none; color: rgba(255,255,255,0.75);
  cursor: pointer; align-items: center; justify-content: center;
}
.rail-close:hover { background: rgba(255,255,255,0.12); color: white; }
.rail-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,10,46,0.55); backdrop-filter: blur(2px);
  z-index: 90; animation: fadeBackdrop 0.18s ease-out;
}
@keyframes fadeBackdrop { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideRailIn { from { transform: translateX(-100%) } to { transform: translateX(0) } }

/* ===== TABLET — < 1100px ===== */
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 200px 1fr; }
  .topbar { padding: 0 18px; gap: 12px; }
  .topbar .crumbs { font-size: 12px; }
  .topbar .lens-tabs button { padding: 5px 9px; font-size: 11px; }
  .topbar .mod-switch a { padding: 5px 10px; font-size: 11px; }
  .topbar .period { padding: 5px 9px; font-size: 11px; }
  .page-head { padding: 22px 22px 16px; }
  .page-head .left h1 { font-size: 24px; }
  .dash-area { padding: 20px 22px 60px; }

  /* Heavier grids reflow */
  .scenarios { grid-template-columns: 1fr; }
  .causes-grid { grid-template-columns: 1fr; }
  .hero-revenue .top { grid-template-columns: 1fr; gap: 18px; }
}

/* ===== MOBILE — < 768px ===== */
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }

  /* Rail becomes off-canvas drawer */
  .rail {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 280px; max-width: 85vw;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.22s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 0 40px rgba(0,0,0,0.4);
  }
  .app-shell.rail-open .rail {
    transform: translateX(0);
  }
  .app-shell.rail-open .rail-backdrop { display: block; }
  .rail-close { display: inline-flex; }
  .topbar-menu { display: inline-flex; }

  /* Topbar slimmer on mobile */
  .topbar {
    height: 56px; padding: 0 14px; gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topbar::-webkit-scrollbar { display: none; }
  .topbar .crumbs { display: none; }
  .topbar .spacer { display: none; }
  .topbar .mod-switch { display: none; }
  .topbar .lens-tabs {
    flex-shrink: 0;
    margin-left: auto;
  }
  .topbar .lens-tabs button { padding: 5px 8px; font-size: 11px; }
  .topbar .period { display: none; }
  .topbar .av { width: 30px; height: 30px; font-size: 10px; flex-shrink: 0; }

  /* Page head stacks */
  .page-head {
    padding: 18px 16px 14px;
    flex-direction: column; align-items: flex-start; gap: 12px;
  }
  .page-head .left h1 { font-size: 22px; }
  .page-head .left .desc { font-size: 13px; }
  .page-head .right { width: 100%; flex-wrap: wrap; }
  .page-head .right button { padding: 7px 11px; font-size: 12px; flex: 1; min-width: 0; justify-content: center; }
  .page-head .right button.primary { flex-basis: 100%; }

  /* Main content */
  .dash-area { padding: 16px 14px 60px; }

  /* Hero KPI tiles stack */
  .hero-revenue .top { padding: 18px; }
  .hero-revenue .big { font-size: 36px; }

  /* Generic panels: less padding on mobile */
  .panel-body { padding: 14px; }
  .panel-head { padding: 12px 14px; }

  /* Section heads stack */
  .dash-section-head { flex-direction: column; align-items: flex-start; gap: 6px; }

  /* AI ribbon stacks */
  .ai-ribbon {
    flex-direction: column; align-items: flex-start; gap: 14px;
    padding: 20px;
  }
  .ai-ribbon h2 { font-size: 18px; }
  .ai-ribbon p { font-size: 13px; }

  /* Action items become friendlier */
  .action-item { grid-template-columns: 32px 1fr; gap: 10px; padding: 12px 14px; }
  .action-item .impact-pill { grid-column: 1 / -1; align-self: flex-start; margin-top: 4px; }

  /* Cause cards */
  .cause-card { padding: 14px; }
  .cause-card .head { gap: 10px; }
  .cause-card .ico { width: 32px; height: 32px; }

  /* KPI tile */
  .kpi-tile { padding: 14px; }
  .kpi-tile .big { font-size: 28px; }

  /* Dashboard tiles 2-up on mobile */
  /* Note: this rule needs wider specificity since used inline grid */

  /* Tables: horizontal scroll wrapper */
  .panel .panel-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.data { min-width: 520px; }
  table.data th, table.data td { padding: 10px 12px; font-size: 12px; }

  /* Scenarios */
  .scen { padding: 16px; }
  .scen .outcome { font-size: 22px; }

  /* Comparator rows */
  .cmp-row { grid-template-columns: 90px 1fr 80px; gap: 10px; }
  .cmp-row .lbl { font-size: 12px; }
  .cmp-row .vv { font-size: 12px; }

  /* Tweaks panel: full-width drawer on mobile */
  .tweaks-panel,
  [data-tweaks-panel] {
    right: 12px !important; left: 12px !important; bottom: 12px !important;
    width: auto !important; max-width: none !important;
  }
}

/* ===== Revenue dashboard responsive ===== */
@media (max-width: 1100px) {
  .revenue-channels { grid-template-columns: 1fr !important; }
  .revenue-funnel-row { grid-template-columns: 1fr !important; }
}

/* ===== STRATEGY DASHBOARD specific responsive overrides ===== */
@media (max-width: 1100px) {
  .strategy-grid-2 { grid-template-columns: 1fr !important; }
  .strategy-bcg { grid-template-columns: 1fr !important; }
  .strategy-pillar-row { grid-template-columns: 1fr !important; gap: 8px !important; }
  .strategy-pillar-row .strategy-pillar-bar { order: 2; }
  .strategy-pillar-row .strategy-pillar-tag { order: 1; text-align: left !important; }
}
@media (max-width: 768px) {
  .strategy-moves-grid { grid-template-columns: 1fr !important; }
  .strategy-prop-table thead { display: none; }
  .strategy-prop-table tr {
    display: flex; flex-direction: column; gap: 6px;
    padding: 14px; border-bottom: 1px solid var(--ink-100);
  }
  .strategy-prop-table td { display: block; padding: 0 !important; border: none !important; }
  .strategy-prop-table td.arrow { display: none; }
}

/* ===== Overview dashboard tiles — adaptive grid ===== */
.dash-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

/* ===== Smooth viewport for very small ===== */
@media (max-width: 380px) {
  .topbar { padding: 0 10px; }
  .topbar .lens-tabs button { padding: 4px 6px; font-size: 10px; }
  .page-head .left h1 { font-size: 20px; }
  .hero-revenue .big { font-size: 30px; }
}

/* =====================================================================
   SOURCE CARDS (Databronnen pagina)
   ===================================================================== */

.src-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.src-card {
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: 0.15s;
}
.src-card:hover { border-color: var(--ink-200); box-shadow: var(--shadow-sm); }
.src-card.off { opacity: 0.6; }
.src-card.prop { border-left: 3px solid #7c5cff; }
.src-head { display: flex; align-items: flex-start; gap: 12px; }
.src-ico {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--ser-navy); color: white;
  display: grid; place-items: center;
  font-weight: 800; font-size: 11px; flex-shrink: 0;
}
.src-ico.prop { background: linear-gradient(135deg, #7c5cff, #1e1e5a); }
.src-name { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.src-cat { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-400); font-weight: 600; margin-bottom: 2px; }
.src-sub { font-size: 11px; color: var(--ink-500); margin-top: 2px; }
.src-status { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; flex-shrink: 0; }
.src-status.ok   { background: var(--ser-teal-50); color: #008873; }
.src-status.warn { background: var(--ser-gold-50); color: #b37800; }
.src-status.err  { background: #fdecea; color: #c62828; }
.src-status.off  { background: var(--ink-100); color: var(--ink-500); }
.src-desc { font-size: 12px; color: var(--ink-600); line-height: 1.5; margin: 0; }
.src-sample { font-size: 11px; color: var(--ink-500); background: var(--ink-25); padding: 8px 10px; border-radius: 6px; }
.src-foot { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--ink-500); margin-top: 4px; }
.src-foot.off { justify-content: space-between; align-items: center; }
.req-pill { background: #fdecea; color: #c62828; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; }

/* Proprietary SER banner */
.prop-banner {
  background: linear-gradient(135deg, #1e1e5a 0%, #7c5cff 100%);
  border-radius: 12px; padding: 24px 28px; color: white;
}
.prop-banner h2 { color: white; font-size: 18px; margin: 8px 0; }
.prop-banner p { color: rgba(255,255,255,0.8); font-size: 13px; margin: 0; }
.prop-banner .eyebrow {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em;
  color: rgba(255,255,255,0.6); font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.dot-ser { width: 6px; height: 6px; border-radius: 50%; background: #c4b5fd; }

/* =====================================================================
   BUSINESS CASES — bc-* classes
   ===================================================================== */

.bc-card {
  width: 100%; text-align: left; background: transparent;
  border: none; padding: 0; cursor: pointer;
  display: block; margin-bottom: 10px;
}
.bc-card > div { transition: border-color 0.15s, box-shadow 0.15s; }
.bc-card:hover > div { border-color: var(--ink-200) !important; box-shadow: var(--shadow-sm); }
.bc-card.active > div { border-color: #7c5cff !important; box-shadow: 0 0 0 3px rgba(124,92,255,0.10); }

.bc-status {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.bc-status.concept  { background: var(--ink-100);        color: var(--ink-600); }
.bc-status.approved { background: var(--ser-gold-50);    color: #b37800; }
.bc-status.running  { background: rgba(124,92,255,0.12); color: #5c35c5; }
.bc-status.done     { background: var(--ser-teal-50);    color: #008873; }

.bc-ai-mark {
  display: inline-block; padding: 2px 6px; border-radius: 4px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.06em;
  background: linear-gradient(135deg, #c4b5fd, #67e8d8); color: var(--ser-navy);
}
.bc-ai-mark.large { font-size: 11px; padding: 3px 8px; }

/* bc-list sidebar */
.bc-list-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 12px; margin-bottom: 4px;
  font-size: 13px; font-weight: 700; color: var(--ink-700);
  border-bottom: 1px solid var(--ink-100);
}
.bc-add {
  width: 28px; height: 28px; border-radius: 7px;
  border: 1px solid var(--ink-200); background: white; color: var(--ink-500);
  display: grid; place-items: center; cursor: pointer; transition: 0.12s;
}
.bc-add:hover { border-color: var(--ser-navy); color: var(--ser-navy); }

/* Layout: sidebar + detail */
.bc-layout { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: flex-start; }

@media (max-width: 1100px) {
  .bc-layout { grid-template-columns: 1fr; }
}

/* bc-detail */
.bc-detail {
  background: white; border: 1px solid var(--ink-100);
  border-radius: 14px; padding: 28px 28px 36px;
  display: flex; flex-direction: column; gap: 28px;
}
.bc-detail-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.bc-detail-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.bc-detail h2 { font-size: 22px; font-weight: 700; color: var(--ink-900); margin: 0 0 8px; letter-spacing: -0.015em; }
.bc-summary { font-size: 14px; color: var(--ink-600); line-height: 1.6; margin: 0; max-width: 600px; }
.bc-detail-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }

/* Buttons */
.btn-primary-bc {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 8px; border: none;
  background: var(--ser-navy); color: white;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: 0.12s;
}
.btn-primary-bc:hover { background: #2a2a6e; }
.btn-primary-bc:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-ghost-bc {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--ink-200); background: white;
  color: var(--ink-700); font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.12s;
}
.btn-ghost-bc:hover { border-color: var(--ink-300); background: var(--ink-25); }

/* bc-section */
.bc-section { display: flex; flex-direction: column; gap: 14px; }
.bc-section-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.bc-section-head h3 { font-size: 16px; font-weight: 700; color: var(--ink-900); margin: 0; }
.bc-edit-btn {
  margin-left: auto; padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--ink-200); background: transparent;
  font-size: 12px; font-weight: 600; color: var(--ink-500); cursor: pointer;
}
.bc-edit-btn:hover { background: var(--ink-25); color: var(--ink-700); }

.bc-hyp-text { font-size: 14px; color: var(--ink-700); line-height: 1.65; margin: 0; }
.bc-textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--ink-200); border-radius: 8px;
  font-size: 14px; font-family: var(--font-sans); resize: vertical; min-height: 90px;
}

.ai-pill-mini {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px;
  background: linear-gradient(135deg, rgba(196,181,253,0.25), rgba(103,232,216,0.25));
  color: #5c35c5; letter-spacing: 0.04em;
}

/* ROI grid */
.bc-roi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
@media (max-width: 900px) { .bc-roi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .bc-roi-grid { grid-template-columns: 1fr; } }

.bc-roi-cell {
  background: var(--ink-25); border-radius: 10px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.bc-roi-cell.highlight { background: rgba(124,92,255,0.06); border: 1px solid rgba(124,92,255,0.15); }
.bc-roi-cell .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-400); font-weight: 700; }
.bc-roi-cell .val { font-size: 20px; font-weight: 700; color: var(--ink-900); letter-spacing: -0.01em; }
.bc-roi-cell .val.ok { color: var(--ok); }
.bc-roi-cell .val.violet { color: #7c5cff; }
.bc-roi-cell .sub { font-size: 11px; color: var(--ink-500); }

/* Runtime bar */
.bc-runtime { margin-top: 4px; }
.bc-runtime-bar {
  height: 8px; border-radius: 999px; background: var(--ink-100);
  overflow: hidden; display: flex; margin-bottom: 6px;
}
.bc-runtime-bar .invest { background: var(--err); height: 100%; }
.bc-runtime-bar .gain   { background: var(--ok); height: 100%; }
.bc-runtime-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-500); }

/* Steps */
.bc-steps { display: flex; flex-direction: column; gap: 6px; }
.bc-step {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; background: var(--ink-25); border-radius: 8px;
  border: 1px solid transparent; transition: 0.12s;
}
.bc-step.done { background: var(--ser-teal-50); }
.bc-step .num {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  background: var(--ink-200); color: var(--ink-700);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.bc-step.done .num { background: var(--ok); color: white; }
.bc-step .body { flex: 1; min-width: 0; }
.bc-step .body .ttl { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.bc-step .body .meta { font-size: 11px; color: var(--ink-500); display: flex; gap: 6px; margin-top: 2px; }
.bc-step .body .meta .who {
  font-weight: 700; color: var(--ink-600);
  background: var(--ink-100); padding: 1px 6px; border-radius: 4px;
}
.bc-step-toggle {
  font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 6px;
  border: 1px solid var(--ink-200); background: white; color: var(--ink-600); cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
}
.bc-step-toggle:hover { border-color: var(--ink-300); color: var(--ink-800); }

/* Two-col risks + KPIs */
.bc-twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 768px) { .bc-twocol { grid-template-columns: 1fr; } }
.bc-half {}

.bc-risk-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.bc-risk-list li {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 13px; color: var(--ink-700); line-height: 1.5;
}
.bc-risk-list li svg { flex-shrink: 0; margin-top: 2px; color: #a87000; }

.bc-kpi-list { display: flex; flex-wrap: wrap; gap: 8px; }
.bc-kpi-tag {
  padding: 5px 12px; border-radius: 999px;
  background: rgba(124,92,255,0.08); color: #5c35c5;
  font-size: 12px; font-weight: 600;
}

/* AI notes */
.bc-ai-notes {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; background: rgba(124,92,255,0.05);
  border: 1px solid rgba(124,92,255,0.15); border-radius: 10px;
}
.bc-ai-notes .ai-icon {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
  background: linear-gradient(135deg, #7c5cff, var(--ser-teal));
  color: white; font-size: 9px; font-weight: 800; font-family: var(--font-mono);
  display: grid; place-items: center;
}
.bc-ai-notes .lbl { font-size: 11px; font-weight: 700; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.bc-ai-notes p { font-size: 13px; color: var(--ink-700); line-height: 1.6; margin: 0; }

/* KPI headline row */
.bc-headline {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
@media (max-width: 768px) { .bc-headline { grid-template-columns: 1fr; } }

.bc-stat {
  background: white; border: 1px solid var(--ink-100); border-radius: 12px;
  padding: 18px 20px;
}
.bc-stat .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-500); font-weight: 700; margin-bottom: 6px; }
.bc-stat .val { font-size: 26px; font-weight: 700; color: var(--ink-900); letter-spacing: -0.02em; line-height: 1.15; }
.bc-stat .val.ok { color: var(--ok); }
.bc-stat .val.violet { color: #7c5cff; }
.bc-stat .sub { font-size: 12px; color: var(--ink-500); margin-top: 4px; }

/* Proprietary strip */
.bc-prop-strip {
  background: linear-gradient(135deg, #1e1e5a 0%, #2a1a6e 60%, #7c5cff 100%);
  border-radius: 14px; padding: 24px 28px; color: white;
  display: flex; flex-direction: column; gap: 18px;
}
.bc-prop-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.bc-prop-head h3 { color: white; font-size: 18px; font-weight: 700; margin: 6px 0; }
.bc-prop-head p { color: rgba(255,255,255,0.75); font-size: 13px; margin: 0; max-width: 540px; line-height: 1.5; }
.bc-prop-head .eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em; color: rgba(255,255,255,0.55); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.bc-prop-link {
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.7); white-space: nowrap;
  cursor: pointer; text-decoration: none;
}
.bc-prop-link:hover { color: white; }
.bc-prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.bc-prop-card {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; padding: 14px 14px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.bc-prop-ico { font-size: 18px; }
.bc-prop-ttl { font-size: 13px; font-weight: 700; color: white; }
.bc-prop-sample { font-size: 11px; color: rgba(255,255,255,0.65); line-height: 1.4; }
.bc-prop-method { font-size: 10px; color: rgba(255,255,255,0.45); }

/* AI hero block */
.bc-ai-hero {
  background: white; border: 1px solid var(--ink-100); border-radius: 14px;
  padding: 28px 28px; display: grid; grid-template-columns: 1fr 340px; gap: 28px;
  align-items: center;
}
@media (max-width: 1100px) { .bc-ai-hero { grid-template-columns: 1fr; } }
.bc-ai-hero .left .eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em;
  color: #7c5cff; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.bc-ai-hero h2 { font-size: 20px; font-weight: 700; color: var(--ink-900); margin: 0 0 8px; letter-spacing: -0.015em; }
.bc-ai-hero p { font-size: 13px; color: var(--ink-500); line-height: 1.6; margin: 0 0 16px; }
.bc-ai-hero .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ai-prompt-card {
  background: var(--ink-25); border: 1px solid var(--ink-100); border-radius: 12px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
}
.ai-tag {
  font-size: 9px; font-weight: 800; letter-spacing: 0.10em;
  color: var(--ink-400); text-transform: uppercase;
}
.ai-prompt-text { font-size: 13px; color: var(--ink-700); line-height: 1.6; }
.ai-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-meta span {
  font-size: 11px; color: var(--ink-500); background: var(--ink-100);
  padding: 2px 8px; border-radius: 999px;
}
.ai-result {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--ok);
}
.ok-pip { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }

/* New case modal */
.bc-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(14,14,42,0.55); backdrop-filter: blur(4px);
  display: grid; place-items: center; z-index: 200;
}
.bc-modal {
  background: white; border-radius: 16px; padding: 28px;
  width: 520px; max-width: 94vw; max-height: 92vh; overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2); position: relative;
}
.bc-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px; border-radius: 6px;
  border: none; background: var(--ink-100); color: var(--ink-500);
  font-size: 18px; cursor: pointer; display: grid; place-items: center; line-height: 1;
}
.bc-modal-close:hover { background: var(--ink-200); color: var(--ink-700); }
.bc-modal-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em;
  color: #7c5cff; font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 8px;
}
.bc-modal h3 { font-size: 18px; font-weight: 700; color: var(--ink-900); margin: 0 0 6px; }
.bc-modal-textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--ink-200); border-radius: 10px;
  font-size: 14px; font-family: var(--font-sans); resize: vertical; min-height: 100px;
  line-height: 1.5;
}
.bc-modal-textarea:focus { outline: none; border-color: #7c5cff; box-shadow: 0 0 0 3px rgba(124,92,255,0.10); }
.bc-modal-exemplar {
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--ink-200); background: var(--ink-25); color: var(--ink-700);
  cursor: pointer; text-align: left; transition: 0.12s; line-height: 1.4;
}
.bc-modal-exemplar:hover { border-color: #7c5cff; color: #5c35c5; background: rgba(124,92,255,0.05); }

/* Thinking spinner */
.bc-thinking-orb {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto;
  background: linear-gradient(135deg, var(--ser-teal), #7c5cff);
  animation: pulse-orb 1.4s ease-in-out infinite;
}
@keyframes pulse-orb {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.12); opacity: 0.8; }
}

/* ── Responsive fixes analytics ── */
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .rail { display: none; position: fixed; top: 0; left: 0; bottom: 0; width: 260px; z-index: 100; }
  .app-shell.rail-open .rail { display: flex; }
  .topbar-menu { display: flex !important; }
  .lens-tabs { display: none; }
  .period { display: none; }
  .mod-switch { display: none; }
  .dash-area { padding: 16px; }
  .adm-layout { flex-direction: column; }
  .adm-list { max-height: none; }
  .adm-twocol { grid-template-columns: 1fr !important; }
  .page-head { flex-direction: column; gap: 12px; }
  .page-head .right { flex-wrap: wrap; }
}

@media (max-width: 1024px) {
  .adm-twocol { grid-template-columns: 1fr; }
  .src-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* ── Admin layout ── */
.adm-layout { display: flex; gap: 20px; align-items: flex-start; }
.adm-list { width: 240px; flex-shrink: 0; background: white; border: 1px solid var(--ink-100); border-radius: 12px; overflow: hidden; max-height: calc(100vh - 200px); overflow-y: auto; }
.adm-list-head { padding: 12px 14px; border-bottom: 1px solid var(--ink-100); display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-500); }
.adm-search { border: 1px solid var(--ink-200); border-radius: 6px; padding: 5px 10px; font-size: 12px; width: 120px; outline: none; }
.adm-client-row { width: 100%; padding: 12px 14px; border: none; border-bottom: 1px solid var(--ink-100); background: transparent; cursor: pointer; display: flex; align-items: center; gap: 10px; text-align: left; }
.adm-client-row.active { background: var(--ink-25); border-left: 3px solid var(--ser-teal); }
.adm-detail { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.adm-detail-head { background: white; border: 1px solid var(--ink-100); border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 16px; }
.adm-meta-row { display: flex; gap: 8px; font-size: 12px; color: var(--ink-400); flex-wrap: wrap; margin-top: 4px; }
.adm-twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.adm-section { background: white; border: 1px solid var(--ink-100); border-radius: 12px; padding: 18px 20px; }
.adm-section h3 { margin: 0 0 8px; font-size: 14px; }
.adm-section .hint { font-size: 12px; color: var(--ink-500); margin: 0 0 14px; }
.adm-users { display: flex; flex-direction: column; gap: 8px; }
.adm-user { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--ink-25); border-radius: 8px; }
.adm-conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.adm-conn-mini { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--ink-100); display: flex; flex-direction: column; gap: 3px; }
.adm-conn-mini.ok { background: var(--ser-teal-50); border-color: rgba(0,180,160,0.25); }
.adm-conn-mini.warn { background: var(--ser-gold-50); border-color: rgba(245,165,35,0.3); }
.adm-conn-mini.err { background: #fdecea; border-color: rgba(229,57,53,0.2); }
.adm-conn-mini .ic { font-weight: 800; font-size: 10px; color: var(--ink-600); }
.adm-conn-mini .nm { font-size: 11px; font-weight: 600; color: var(--ink-900); }
.adm-conn-mini .req { font-size: 9px; color: #c62828; font-weight: 700; text-transform: uppercase; }
.adm-tabs { display: flex; flex-direction: column; gap: 6px; }
.adm-tab-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--ink-100); background: var(--ink-25); }
.adm-tab-row.on { background: var(--ser-teal-50); border-color: rgba(0,180,160,0.25); }
.adm-tab-row .ico { color: var(--ink-500); display: flex; }
.adm-tab-row .lbl { flex: 1; font-size: 13px; font-weight: 500; color: var(--ink-900); }
.adm-tab-row .flag-mini { font-size: 10px; color: var(--ser-gold); }
.switch { position: relative; width: 34px; height: 20px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--ink-200); border-radius: 999px; transition: 0.2s; }
.slider:before { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: 0.2s; }
.adm-tab-row.on .slider { background: var(--ser-teal); }
.adm-tab-row.on .slider:before { transform: translateX(14px); }
.av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: white; flex-shrink: 0; }
.av.sm { width: 28px; height: 28px; font-size: 11px; }
.av.lg { width: 44px; height: 44px; font-size: 16px; border-radius: 10px; }
.role-pill { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--ink-100); color: var(--ink-700); }
.plan-pill { padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; background: var(--ser-teal-50); color: #008873; }
.cnt { font-size: 12px; color: var(--ink-400); font-weight: 400; margin-left: 6px; }
.wide { width: 100%; margin-top: 4px; }
.btn-primary-sm { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--ser-navy); color: white; border: none; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-ghost-sm { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; background: transparent; color: var(--ink-700); border: 1px solid var(--ink-200); border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-ghost-sm:hover { background: var(--ink-25); }
.dash-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
.dash-section-head .left { display: flex; flex-direction: column; gap: 2px; }
.dash-section-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.dash-section-head .sub { font-size: 12px; color: var(--ink-500); }
.ai-providers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ai-prov-card { background: white; border: 1px solid var(--ink-100); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.ai-prov-card.primary { border-color: #7c5cff; box-shadow: 0 0 0 1px rgba(124,92,255,0.2); }
.ai-prov-card.off { opacity: 0.7; }
.primary-badge { position: absolute; top: 12px; right: 12px; padding: 2px 8px; background: rgba(124,92,255,0.12); color: #7c5cff; border-radius: 999px; font-size: 10px; font-weight: 700; }
.ai-prov-head { display: flex; align-items: center; gap: 12px; }
.ai-prov-logo { width: 36px; height: 36px; border-radius: 8px; background: var(--ser-navy); color: white; display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.logo-claude { background: linear-gradient(135deg, #cc7832, #e8a05a); }
.logo-openai { background: #10a37f; }
.logo-gemini { background: linear-gradient(135deg, #4285f4, #34a853); }
.ai-prov-name { font-size: 14px; font-weight: 700; color: var(--ink-900); }
.ai-prov-sub { font-size: 11px; color: var(--ink-500); margin-top: 1px; }
.ai-prov-status { font-size: 11px; font-weight: 600; margin-left: auto; flex-shrink: 0; }
.ai-prov-status.on { color: var(--ok); }
.ai-prov-status.off { color: var(--ink-400); }
.ai-prov-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 8px 0; border-top: 1px solid var(--ink-100); }
.ai-prov-row .lbl { color: var(--ink-500); font-weight: 500; }
.ai-prov-row .val { display: flex; align-items: center; gap: 8px; }
.ai-model-select { border: 1px solid var(--ink-200); border-radius: 6px; padding: 4px 8px; font-size: 12px; background: white; }
.link-btn { background: none; border: none; color: var(--ser-teal); font-size: 11px; cursor: pointer; padding: 0; text-decoration: underline; }
.bc-modal-backdrop { position: fixed; inset: 0; background: rgba(14,14,42,0.5); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; }

/* ── PeriodPicker dropdown ── */
@media (max-width: 640px) {
  .period-picker-btn span:last-child { display: none; }
}

/* ── Topbar responsive ── */
@media (max-width: 768px) {
  .crumbs { display: none; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-menu { display: flex !important; }
}

/* ── Forecast chart ── */
.forecast-chart-wrap { overflow-x: auto; }

/* ── No data state ── */
.no-data-state {
  text-align: center; padding: 48px 24px;
  color: var(--ink-400); display: flex;
  flex-direction: column; align-items: center; gap: 12px;
}

/* ── Rail periode items ── */
.rail-item.active {
  background: rgba(255,255,255,0.12);
  color: white;
}

/* ── Login pagina responsive ── */
@media (max-width: 768px) {
  .login-wrap {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }
  .login-visual {
    padding: 28px 20px 24px;
    min-height: auto;
  }
  .login-visual.analytics-bg {
    padding: 28px 20px 24px;
  }
  .login-hero h1 {
    font-size: 30px !important;
    margin-bottom: 12px;
  }
  .login-hero p {
    font-size: 13px;
    margin-bottom: 20px;
  }
  .login-tools-preview {
    display: none;
  }
  .login-mod-tab {
    display: none;
  }
  .login-foot {
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
  }
  .login-form-wrap {
    padding: 28px 20px 32px;
  }
  .login-form {
    max-width: 100%;
  }
  /* Voorkom zoom op iOS bij focus */
  .login-form input {
    font-size: 16px !important;
  }
}

@media (max-width: 400px) {
  .login-hero h1 {
    font-size: 24px !important;
  }
  .login-visual {
    padding: 20px 16px;
  }
  .login-form-wrap {
    padding: 20px 16px;
  }
}
