/* =====================================================
   CLOUDGAINZ — DASHBOARD MOCKUPS
   Always render in the light palette — all theme vars
   are re-scoped to light values inside .dash so the
   mockups read as authentic screenshots in all themes.
   ===================================================== */

.dash {
  /* Re-scope all theme vars to light values */
  --azure: #0078D4;
  --azure-dark: #005A9E;
  --azure-tint: #E6F1FB;
  --ink: #1F2937;
  --ink-2: #374151;
  --muted: #6B7280;
  --line: #E5E9F0;
  --line-soft: #EEF1F5;
  --bg: #FFFFFF;
  --bg-section: #F7F9FC;
  --bg-card: #FFFFFF;

  width: 100%;
  background: #fff;
  border: 1px solid #E5E9F0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 48px -28px rgba(15, 23, 35, 0.18), 0 8px 16px -12px rgba(15, 23, 35, 0.06);
  font-family: "DM Sans", system-ui, sans-serif;
  color: #1F2937;
  display: flex;
  flex-direction: column;
}

/* ---- Browser chrome ---- */
.dash-chrome {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #FBFCFE;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.dash-chrome .dots { display: flex; gap: 6px; }
.dash-chrome .dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #E2E6EC;
}
.dash-chrome .tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.dash-chrome .tabs .active { color: var(--ink); position: relative; }
.dash-chrome .tabs .active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 2px;
  background: var(--azure);
}

.dash-mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-feature-settings: "tnum";
}

/* ---- Hero dashboard (4:3) ---- */
.dash-hero { aspect-ratio: 4 / 3; }
.dash-hero .body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
}

/* KPI row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.kpi {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpi .lbl {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.kpi .val {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.kpi .delta {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  color: #1A8754;
}
.kpi .delta.neg { color: var(--muted); }

/* Chart card */
.chart-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 12px 8px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.chart-card .chart-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.chart-card .chart-title .t {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}
.chart-card .chart-title .meta {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  color: var(--muted);
}
.chart-card svg {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: block;
}

/* ---- Wide dashboard (16:9) ---- */
.dash-wide { aspect-ratio: 16 / 9; }
.dash-wide .body {
  padding: 18px;
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 14px;
  flex: 1;
  min-height: 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.panel-head .t { font-size: 12px; font-weight: 600; color: var(--ink); }
.panel-head .legend {
  display: flex;
  gap: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.panel-head .legend .sw {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.panel-head .legend .sw::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: var(--ink);
}
.panel-head .legend .sw.pending::before {
  background: #fff;
  border: 1.5px dashed var(--ink);
}
.panel-head .legend .sw.realized::before { background: var(--azure); }

.panel svg.fill-flex {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: block;
}

/* Levers table */
.levers {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0;
  font-size: 11px;
  width: 100%;
}
.levers .lvr-h {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
}
.levers .lvr-h.r { text-align: right; }
.levers .lvr-c {
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-size: 11px;
}
.levers .lvr-c.r {
  text-align: right;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.levers .lvr-c.last { border-bottom: 0; }
.levers .pill {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--azure-tint);
  color: var(--azure-dark);
  letter-spacing: 0.03em;
}
.levers .pill.amber { background: #FFF3DC; color: #8A5A00; }

/* ---- Ask bar (hero mockup) ---- */
.ask-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--azure);
  border-radius: 5px;
  padding: 7px 10px;
  background: var(--azure-tint);
  flex-shrink: 0;
}
.ask-bar .ask-prompt {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--azure);
  flex-shrink: 0;
}
.ask-bar .ask-text {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--azure-dark);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- AI tab accent ---- */
.dash-chrome .tabs .tab-ai { color: var(--azure); }
