/* Phase 4: executive dashboard presentation; no module-wide layout overrides. */
/* Phase 5: financial evolution shares the existing campaign data and filters. */
.dashboard-page .finance-evolution { min-width: 0; margin: 0 0 36px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.finance-evolution .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.finance-series { display: flex; flex-wrap: wrap; gap: 4px 24px; border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.finance-series label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); font-size: 13px; cursor: pointer; }
.finance-series input { width: 16px; height: 16px; accent-color: var(--volt); }
.finance-swatch { width: 20px; border-top: 2px solid #C9FF39; }
.finance-swatch.cost { border-color: #A6B0A8; border-top-style: dashed; }
.finance-swatch.profit { border-color: #F7F8F7; border-top-style: dotted; }
.finance-chart-plot { position: relative; height: 300px; min-width: 0; background: var(--bg); }
.finance-chart-plot canvas { max-width: 100%; }
.finance-chart-plot canvas:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; }
.finance-chart-message { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 48px; color: var(--muted); font-size: 13px; }
.finance-evolution [hidden] { display: none; }
.finance-chart-readout, .finance-chart-note { font-size: 12px; color: var(--muted); line-height: 1.6; }
.finance-chart-readout:empty { display: none; }
.finance-chart-data { margin-top: 16px; }
.finance-chart-data summary { display: list-item; cursor: pointer; min-height: 44px; padding: 12px 0; font-size: 13px; color: var(--ink); }
.finance-table-wrap { overflow: auto; max-height: 360px; border: 1px solid var(--line); border-radius: 8px; }
.finance-chart-data .data-table { min-width: 540px; }
.dashboard-page .finance-chart-data tbody th { text-align: left; font-weight: 500; white-space: nowrap; text-transform: none; }
.finance-chart-data .data-table :is(td, th) { font-variant-numeric: tabular-nums; }
.finance-evolution[data-state="loading"] .finance-chart-plot { opacity: .55; }
@media (max-width: 760px) {
  .finance-chart-plot { height: 240px; }
  .finance-series { gap: 0 16px; }
}
.dashboard-filters > summary { display: none; }
.dashboard-page .filter-bar {
  grid-template-columns: minmax(140px, 1.2fr) repeat(2, minmax(132px, 0.9fr)) minmax(140px, 1.2fr) minmax(120px, 0.8fr) auto auto;
  padding: 0 0 24px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.dashboard-page .quick-periods { padding: 0; border: 0; gap: 6px; flex-wrap: wrap; }
.dashboard-page .quick-periods .period-button { min-width: 52px; }
.dashboard-page .hour-toggle { min-height: 44px; white-space: nowrap; }
.dashboard-page .financial-summary { padding: 24px 0; border-top: 1px solid var(--line); }
.dashboard-section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
.dashboard-section-heading h2 { margin: 0; font-size: 16px; font-weight: 650; }
.dashboard-section-heading > span { color: var(--muted); font-size: 12px; }
.dashboard-page .financial-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.dashboard-page .financial-kpis .kpi { min-height: 148px; padding: 20px; gap: 12px; }
.dashboard-page .financial-kpis strong { font-size: 30px; line-height: 1.25; }
.dashboard-page #profit-kpi-card.profit-positive, .dashboard-page #profit-kpi-card.profit-negative { background: var(--surface); }
.dashboard-page #profit-kpi-card.profit-positive { border-color: rgba(89, 214, 160, 0.4); }
.dashboard-page #profit-kpi-card.profit-positive strong,
.dashboard-page #roi-kpi-card[data-trend="positive"] strong { color: var(--success); }
.dashboard-page #profit-kpi-card.profit-negative strong,
.dashboard-page #roi-kpi-card[data-trend="negative"] strong { color: var(--danger); }
.dashboard-page .delivery-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 0 24px; margin: 0 0 28px; border-bottom: 1px solid var(--line); }
.dashboard-page .delivery-summary .kpi { min-height: 108px; gap: 8px; padding: 12px 20px; border: 0; border-radius: 0; border-right: 1px solid var(--line); background: transparent; }
.dashboard-page .delivery-summary .kpi:first-child { padding-left: 0; }
.dashboard-page .delivery-summary .kpi:last-child { border-right: 0; }
.dashboard-page .delivery-summary strong { font-size: 24px; line-height: 1.25; }
.dashboard-page.analytics-body .data-panel { border: 0; border-radius: 0; background: transparent; }
.dashboard-page .data-panel-header { padding: 0 0 16px; border: 0; }
.dashboard-page .data-panel-header h2 { font-size: 17px; }
.dashboard-page .data-panel-header p { margin: 4px 0 0; }
.dashboard-page .table-wrap { max-height: min(68dvh, 720px); border: 1px solid var(--line); border-radius: 8px; }
.dashboard-page .data-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); }
.dashboard-page .data-table .total-row td { position: sticky; bottom: 0; z-index: 1; background: var(--surface-2); }
.dashboard-page .data-table :is(th, td) { min-height: 44px; padding: 14px 16px; }
.dashboard-page .ui-table-hint { padding: 12px 0; border-top: 0; }
.dashboard-update-message { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 0; border-top: 1px solid var(--danger); color: var(--danger); font-size: 13px; }
.dashboard-update-message[hidden] { display: none; }
.dashboard-page[data-dashboard-state="loading"] :is(.financial-summary, .delivery-summary) strong { opacity: 0.55; }
.dashboard-page .dashboard-footer { padding-top: 8px; }

@media (max-width: 1279px) {
  .dashboard-page .filter-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dashboard-page .financial-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .dashboard-page .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dashboard-filters { margin-bottom: 20px; border-bottom: 1px solid var(--line); }
  .dashboard-filters > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; margin-bottom: 12px; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
  .dashboard-filters > summary::-webkit-details-marker { display: none; }
  .dashboard-filters > summary span { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 400; min-width: 0; overflow-wrap: anywhere; }
  .dashboard-filters > summary::after { content: "+"; display: grid; place-items: center; flex: 0 0 24px; font-size: 20px; }
  .dashboard-filters[open] > summary::after { content: "-"; }
  .dashboard-page .filter-bar { padding-bottom: 20px; }
  .dashboard-page .financial-summary { padding: 0 0 20px; border-top: 0; }
  .dashboard-page .financial-kpis { gap: 10px; }
  .dashboard-page .financial-kpis .kpi { min-height: 140px; padding: 16px; }
  .dashboard-page .financial-kpis strong { font-size: 24px; }
  .dashboard-page .delivery-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; margin-bottom: 24px; }
  .dashboard-page .delivery-summary .kpi { min-height: 104px; padding: 8px 16px; }
  .dashboard-page .delivery-summary .kpi:nth-child(odd) { padding-left: 0; }
  .dashboard-page .delivery-summary .kpi:nth-child(even) { border-right: 0; }
  .dashboard-page .data-panel-header { padding: 0 0 16px; }
  .dashboard-page .data-table :is(th, td) { padding: 12px; }
}
@media (max-width: 360px) {
  .dashboard-page .financial-kpis .kpi { padding: 14px; }
  .dashboard-page .financial-kpis strong { font-size: 21px; }
}
