/* One reading order and one numeric scope across the director's overview. */
.overview-dashboard {
  max-width: 1520px;
  gap: 24px;
  font-variant-numeric: tabular-nums;
}

.overview-dashboard [hidden] { display: none !important; }
.next-main:has(#overviewSection:not(.d-none)) > .next-topbar { max-width: 1520px; }

.overview-dashboard .overview-analytics {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.overview-dashboard .overview-analytics:empty { display: none; }

.overview-dashboard .overview-period-toolbar,
.overview-dashboard .overview-analytics-card,
.overview-dashboard .overview-readiness-card,
.overview-dashboard .overview-actions-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}

.overview-dashboard .overview-period-toolbar {
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  padding: 18px 24px;
  border-bottom: 1px solid var(--next-line);
  align-items: center;
}

.overview-dashboard .overview-period-controls { min-width: 0; }
.overview-dashboard .overview-period-presets { justify-content: flex-start; }
.overview-dashboard .overview-period-option,
.overview-dashboard .overview-month-navigator,
.overview-dashboard .overview-compare-toolbar > summary,
.overview-dashboard .overview-compare-button,
.overview-dashboard .overview-chart-segmented,
.overview-dashboard .overview-chart-segmented-button { border-radius: 6px; box-shadow: none; }

.overview-dashboard .overview-period-option { min-height: 40px; font-size: 14px; }
.overview-dashboard .overview-period-filter-row { grid-template-columns: minmax(180px, 1fr) minmax(150px, 220px); }
.overview-dashboard .overview-month-label { font-size: 16px; }

.overview-dashboard .overview-analytics-card { padding: 24px; min-height: 0; gap: 20px; }
.overview-dashboard .overview-analytics-head h2 { font-size: 22px; line-height: 1.25; font-weight: 750; }
.overview-dashboard .overview-revenue-card-title h2 { font-size: 36px; line-height: 1.2; margin-top: 6px; }
.overview-dashboard .overview-revenue-card-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.overview-revenue-comparison { display: grid; gap: 12px; min-width: 0; }
.overview-comparable-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 13px; color: #475569; cursor: pointer; }
.overview-comparable-toggle input { width: 18px; height: 18px; accent-color: #167561; flex: 0 0 auto; }
.overview-dashboard .overview-comparison-summary { padding-left: 20px; }
.overview-dashboard .overview-comparison-summary strong { font-size: 26px; }
.overview-dashboard .overview-comparison-summary small,
.overview-dashboard .overview-comparison-summary span { font-size: 13px; line-height: 1.5; }

.overview-dashboard .overview-executive-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 16px 0; margin: 0; }
.overview-dashboard .overview-executive-metric { min-width: 0; padding: 0 20px; }
.overview-dashboard .overview-executive-metric:first-child { padding-left: 0; grid-column: auto; border-bottom: 0; }
.overview-dashboard .overview-executive-metric dt { font-size: 14px; font-weight: 500; }
.overview-dashboard .overview-executive-metric dd { font-size: 25px; margin: 4px 0; }
.overview-dashboard .overview-executive-metric small { font-size: 13px; line-height: 1.5; font-weight: 500; }
.overview-dashboard .overview-executive-insight { padding: 12px 16px; border-radius: 0; background: #f3f8f7; }
.overview-dashboard .overview-executive-insight strong { font-size: 14px; font-weight: 650; }
.overview-dashboard .overview-executive-insight span { font-size: 12px; }
.overview-dashboard .overview-chart-toolbar { padding: 0; }
.overview-dashboard .overview-chart-segmented-button { min-height: 40px; font-size: 14px; font-weight: 650; }
.overview-dashboard .overview-chart-segmented-button-active { background: #234c46; color: #fff; }
.overview-dashboard .overview-trend-chart { min-height: 0; }
.overview-dashboard .overview-company-delta-toolbar { justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.overview-dashboard .overview-store-chart-legend { font-size: 13px; }
.overview-dashboard .overview-donut-layout { grid-template-columns: 240px minmax(0, 1fr); align-items: center; }
.overview-dashboard .overview-store-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; }
.overview-dashboard .overview-store-benchmark { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }
.overview-dashboard .overview-store-benchmark-rank,
.overview-dashboard .overview-store-benchmark-metrics > div { padding: 0 12px; border: 0; border-left: 2px solid #dbe5e2; border-radius: 0; background: transparent; }
.overview-dashboard .overview-store-benchmark-rank strong { font-size: 25px; }
.overview-dashboard .overview-store-share-track { grid-column: 1 / -1; height: 5px; border-radius: 0; }

.overview-dashboard .overview-store-trend-row,
.overview-dashboard .overview-store-trend-table-head {
  grid-template-columns: minmax(145px, 1.3fr) minmax(180px, 1.25fr) minmax(145px, 1fr) minmax(75px, .65fr) minmax(120px, .8fr);
  gap: 18px;
}
.overview-dashboard .overview-store-trend-row { min-height: 80px; padding: 14px 10px; border-radius: 0; }
.overview-dashboard .overview-store-trend-row-name { font-size: 15px; font-weight: 650; }
.overview-dashboard .overview-store-trend-row-values { display: grid; gap: 3px; }
.overview-dashboard .overview-store-trend-row-values small { font-size: 13px; }
.overview-dashboard .overview-store-trend-row-unavailable { color: var(--next-text); }
.overview-store-table-receipts { display: grid; min-width: 0; gap: 3px; }
.overview-store-table-receipts small { color: var(--next-muted); font-size: 12px; }
.overview-store-table-receipts b { color: var(--next-text); font-weight: 600; }
.overview-store-table-share { display: grid; min-width: 0; gap: 8px; }
.overview-store-table-share small { color: #475569; font-size: 13px; }
.overview-store-table-share i { display: block; height: 5px; width: 100%; background: #e9efee; }
.overview-store-table-share i::before { content: ''; display: block; height: 100%; width: var(--store-share); background: #29877b; }

.overview-dashboard .overview-readiness-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; padding: 20px 24px; }
.overview-dashboard .overview-readiness-head h2 { font-size: 22px; font-weight: 750; }
.overview-dashboard .overview-readiness-row { padding: 20px 24px; border-left: 0; gap: 18px; }
.overview-dashboard .overview-readiness-row + .overview-readiness-row { border-top: 0; }
.overview-dashboard .overview-readiness-role h2 { font-size: 16px; }
.overview-dashboard .overview-readiness-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.overview-dashboard .overview-mini-metric { border: 0; border-left: 2px solid #dbe5e2; border-radius: 0; background: transparent; padding: 0 12px; }
.overview-dashboard .overview-mini-metric strong { font-size: 22px; line-height: 1.4; overflow-wrap: anywhere; }
.overview-dashboard .overview-mini-metric small { font-size: 12px; line-height: 1.5; }
.overview-dashboard .overview-status-chip { border-radius: 4px; white-space: normal; }
.overview-dashboard .overview-kpi-period { border-radius: 0; }
.overview-dashboard .overview-kpi-period summary { min-height: 66px; }
.overview-kpi-older > summary { cursor: pointer; padding: 14px; color: #166b5c; font-size: 14px; font-weight: 650; }
.overview-dashboard .overview-actions-panel .card-header { padding: 18px 24px; }

@media (min-width: 1700px) {
  .overview-dashboard .overview-period-toolbar { grid-template-columns: 300px minmax(0, 1fr); }
}

@media (max-width: 1050px) {
  .overview-dashboard .overview-readiness-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-dashboard .overview-store-trend-row,
  .overview-dashboard .overview-store-trend-table-head { grid-template-columns: minmax(130px, 1fr) minmax(155px, 1.15fr) minmax(130px, 1fr) minmax(100px, .7fr); gap: 12px; }
  .overview-store-table-share,
  .overview-dashboard .overview-store-trend-table-head > span:nth-child(4) { display: none; }
}

@media (max-width: 760px) {
  .overview-dashboard .overview-store-benchmark { grid-template-columns: minmax(0, 1fr); }
  .overview-dashboard .overview-store-benchmark-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-dashboard .overview-donut-layout { grid-template-columns: minmax(0, 1fr); }
  .overview-dashboard .overview-store-legend { grid-template-columns: minmax(0, 1fr); }
  .overview-dashboard { gap: 16px; }
  .overview-dashboard .overview-period-toolbar { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .overview-dashboard .overview-period-toolbar-text { min-width: 0; }
  .overview-dashboard .overview-month-navigator { width: 100%; max-width: none; }
  .overview-dashboard .overview-period-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .overview-dashboard .overview-period-option { width: 100%; padding: 8px 4px; font-size: 13px; }
  .overview-dashboard .overview-period-filter-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 10px; }
  .overview-dashboard .overview-analytics-card { padding: 18px 16px; gap: 16px; }
  .overview-dashboard .overview-revenue-card-head { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .overview-dashboard .overview-revenue-card-title h2 { font-size: 30px; }
  .overview-dashboard .overview-comparison-summary { padding-left: 12px; }
  .overview-dashboard .overview-executive-metric { padding: 0 10px; }
  .overview-dashboard .overview-executive-metric:nth-child(2) { border-left: 1px solid var(--next-line); padding-left: 10px; }
  .overview-dashboard .overview-executive-metric:nth-child(3) { padding-left: 10px; }
  .overview-dashboard .overview-executive-metric dt { font-size: 12px; }
  .overview-dashboard .overview-executive-metric dd { font-size: 20px; }
  .overview-dashboard .overview-executive-metric small { font-size: 12px; }
  .overview-dashboard .overview-store-trend-row { grid-template-columns: minmax(0, 1fr) minmax(95px, .6fr); gap: 8px 12px; }
  .overview-dashboard .overview-store-trend-table-head { display: none; }
  .overview-dashboard .overview-store-trend-row-title,
  .overview-dashboard .overview-store-trend-row > .overview-store-trend-row-name { grid-column: 1; grid-row: 1; }
  .overview-dashboard .overview-store-trend-row-values { grid-column: 1; grid-row: 2; }
  .overview-dashboard .overview-store-trend-row-change { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .overview-store-table-receipts { grid-column: 1 / -1; grid-row: 3; display: flex; gap: 12px; flex-wrap: wrap; }
  .overview-dashboard .overview-readiness-head,
  .overview-dashboard .overview-readiness-row { padding: 18px 16px; }
  .overview-dashboard .overview-readiness-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .overview-dashboard .overview-readiness-head > .overview-chart-segmented { width: 100%; }
  .overview-dashboard .overview-readiness-head .overview-chart-segmented-button { white-space: normal; line-height: 1.3; }
}

@media (max-width: 600px) {
  .overview-dashboard .overview-executive-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .overview-dashboard .overview-executive-metric:first-child { grid-column: 1 / -1; padding: 0 0 14px; border-bottom: 1px solid var(--next-line); }
  .overview-dashboard .overview-executive-metric:nth-child(2) { padding-left: 0; border-left: 0; }
  .overview-dashboard .overview-executive-metric dd { font-size: 25px; }
  .overview-dashboard .overview-readiness-metrics { grid-template-columns: minmax(0, 1fr); }
  .overview-dashboard .overview-mini-metric { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; border-left: 0; border-bottom: 1px solid var(--next-line); padding: 0 0 12px; align-items: baseline; }
  .overview-dashboard .overview-mini-metric strong { font-size: 20px; white-space: nowrap; }
  .overview-dashboard .overview-mini-metric > span { font-size: 13px; }
  .overview-dashboard .overview-mini-metric small { grid-column: 1 / -1; margin: 0; }
}

@media (max-width: 380px) {
  .overview-dashboard .overview-revenue-card-title h2 { font-size: 27px; }
}
