/* ==========================================================================
   Data & dashboards — Figma frame 204:3837. Section-by-section, pixel-matched.
   ========================================================================== */

/* ---- Section (204:3851) -------------------------------------------------- */
.dash-viz { padding: 56px 0 64px; }

/* ---- Toolbar (204:3852) -------------------------------------------------- */
.dash-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.dash-filters { display: flex; flex-wrap: wrap; gap: 12px; }
.dash-filter {
  display: inline-flex; align-items: center; gap: 8px;
  height: 49px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: var(--r-pill);
  background: #fff; color: var(--ink);
  font-size: var(--fs-body-sm); line-height: var(--lh-body-sm); font-weight: 400; white-space: nowrap;
}
.dash-filter__chev { color: var(--secondary); }
.dash-toolbar__sep { width: 10px; }
.dash-csv { font-size: var(--fs-body-sm); line-height: var(--lh-body-sm); color: var(--ink); text-decoration: none; white-space: pre; }
.dash-csv:hover { color: var(--blue-700); text-decoration: underline; }

/* ---- Dashboard card (204:3864) ------------------------------------------ */
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card-sm);
  padding: 24px 28px 28px;
  display: flex; flex-direction: column; gap: 20px;
}
.dash-card__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dash-card__title { margin: 0; font-size: var(--fs-h4); line-height: var(--lh-h4); color: var(--blue-700); }
.dash-card__label { color: var(--secondary); font-size: var(--fs-body-sm); white-space: nowrap; }
.dash-card__note { margin: 0; color: var(--secondary); font-size: var(--fs-body-sm); }

/* KPI tiles (204:3868) */
.dash-kpis { display: flex; gap: 16px; }
.dash-kpi { flex: 1 1 0; min-width: 0; background: #fff; border-radius: var(--r-input); box-shadow: var(--shadow-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.dash-kpi__num { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-stat); line-height: var(--lh-stat); letter-spacing: var(--ls-stat); color: var(--blue-700); }
.dash-kpi__label { color: var(--secondary); font-size: var(--fs-body-sm); }

/* Charts row (204:3881) */
.dash-charts { display: flex; gap: 16px; align-items: stretch; }
/* The chart and themes panels sit directly on the card in the design. */
.dash-chart { flex: 1 1 0; min-width: 0; margin: 0; background: transparent; border-radius: var(--r-input); padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.dash-plot { display: flex; align-items: flex-end; gap: 14px; height: 190px; }
.dash-bar { flex: 1 1 0; min-width: 0; min-height: 4px; background: var(--blue-700); border-radius: 8px 8px 2px 2px; }
.dash-bar--peak { background: var(--green-500); }
.dash-baseline { height: 1px; background: var(--border); }
.dash-xlabels { display: flex; gap: 14px; }
.dash-xlabels span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 12px; line-height: 16px; color: var(--secondary); }

/* Top themes (204:3897) */
.dash-themes { flex: 0 0 420px; background: transparent; border-radius: var(--r-input); padding: 20px 24px; display: flex; flex-direction: column; gap: 18px; }
.dash-themes__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.3; color: var(--ink); }
.dash-theme { display: flex; flex-direction: column; gap: 7px; }
.dash-theme__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: var(--fs-body-sm); font-weight: 600; }
.dash-theme__label { color: var(--ink); }
.dash-theme__pct { color: var(--blue-500); flex: 0 0 auto; }
.dash-theme__track { height: 10px; border-radius: var(--r-pill); background: var(--blue-100); overflow: hidden; }
.dash-theme__value { display: block; height: 100%; border-radius: var(--r-pill); background: var(--blue-700); }

/* Power BI embed (responsive 16:9) */
.dash-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-input); overflow: hidden; background: #fff; box-shadow: var(--shadow-card); }
.dash-embed__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 900px) {
  .dash-charts { flex-direction: column; }
  .dash-themes { flex-basis: auto; }
  .dash-kpis { flex-wrap: wrap; }
  .dash-kpi { flex: 1 1 40%; }
}
@media (max-width: 600px) {
  /* Eight bars don't fit a phone: let the chart scroll sideways at a readable width. */
  .dash-chart { flex: none; overflow-x: auto; padding-inline: 0; -webkit-overflow-scrolling: touch; }
  .dash-plot, .dash-baseline, .dash-xlabels { flex: none; min-width: 520px; }
  .dash-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .dash-kpi { padding: 14px 16px; }
}
@media (max-width: 560px) {
  .dash-kpi { flex-basis: 100%; }
  .dash-xlabels span { font-size: 10px; }
}

/* ---- About this data (204:3920) ----------------------------------------- */
.dash-about__inner { display: flex; gap: 64px; align-items: flex-start; }
.dash-about__copy { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.dash-about__copy > * { margin: 0; }
.dash-use { flex: 0 0 380px; background: #fff; border-radius: var(--r-card-sm); box-shadow: var(--shadow-card); padding: 24px 28px; display: flex; flex-direction: column; gap: 12px; }
.dash-about { padding-block: 80px; }
.dash-about__copy p { font-size: var(--fs-body-lg); line-height: var(--lh-body-lg); }
.dash-use__title { margin: 0; font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 400; color: var(--ink); }
.dash-use__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.dash-use__list li { display: flex; gap: 10px; align-items: flex-start; color: var(--secondary); font-size: var(--fs-body-sm); line-height: var(--lh-body-sm); }
.dash-use__chev { color: var(--secondary); font-size: 16px; line-height: 21px; flex: 0 0 auto; }
@media (max-width: 900px) {
  .dash-about__inner { flex-direction: column; gap: 32px; }
  .dash-use { flex-basis: auto; align-self: stretch; }
}
