/* Executive dashboard — scoped styles so the operational detail pages keep
   their existing visual language.  The layout uses dense, tabular numerals
   and clear source/period labels to distinguish live data from its KPI
   evaluation period. */
.executive-shell { max-width: none; padding: 20px 28px 34px; }
.executive-shell, .executive-shell * { box-sizing: border-box; }
.executive-shell { --exec-navy: #082d60; --exec-blue: #0865c7; --exec-ink: #172842; --exec-muted: #667891; --exec-line: #dbe4ef; --exec-paper: #f3f6fb; --exec-safe: #159d71; --exec-safe-bg: #e6f6ef; --exec-warn: #b66e04; --exec-warn-bg: #fff3d9; --exec-risk: #c62243; --exec-risk-bg: #fdebf0; --exec-shadow: 0 8px 28px rgba(22, 48, 83, .055); color: var(--exec-ink); }
.executive-shell .masthead { margin-bottom: 15px; }
.exec-hero { display: flex; align-items: center; justify-content: space-between; gap: 26px; min-height: 124px; padding: 23px 27px; border-radius: 17px; color: #fff; background: radial-gradient(circle at 78% -30%, #1d5da4 0, #103e7a 26%, transparent 54%), linear-gradient(115deg, #063673, #061f48); box-shadow: 0 12px 32px rgba(6,42,90,.16); }
.exec-eyebrow { margin: 0 0 7px; color: #82b9fc; font: 800 10px 'DM Mono', monospace; letter-spacing: .16em; text-transform: uppercase; }
.exec-hero h1 { margin: 0; color: #fff; font: 800 clamp(25px, 2vw, 31px)/1.08 Manrope, sans-serif; letter-spacing: -.045em; }
.exec-hero-copy { max-width: 680px; margin: 8px 0 0; color: #c4d8f3; font-size: 12px; line-height: 1.45; }
.exec-hero-controls { display: flex; gap: 8px; align-self: stretch; align-items: center; }
.exec-filter { display: block; min-width: 190px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; background: rgba(255,255,255,.1); }
.exec-filter > span { display: block; margin-bottom: 4px; color: #a7c5e9; font: 800 9px 'DM Mono', monospace; letter-spacing: .08em; }
.exec-filter select { width: 100%; appearance: none; padding: 0 18px 0 0; border: 0; outline: 0; color: #fff; background: transparent; font: 700 12px Manrope, sans-serif; cursor: pointer; }
.exec-filter select option { color: var(--exec-ink); background: #fff; }
.exec-filter strong { display: block; color: #fff; font-size: 12px; white-space: nowrap; }
.exec-decision { display: flex; align-items: center; gap: 16px; min-height: 72px; margin-top: 14px; padding: 13px 19px; border: 1px solid var(--exec-line); border-left: 4px solid #f48e30; border-radius: 12px; background: #fff; box-shadow: var(--exec-shadow); }
.exec-decision-icon { display: grid; width: 37px; height: 37px; flex: none; place-items: center; border-radius: 11px; color: #be6710; background: #fff1d9; font: 900 19px 'DM Mono', monospace; }
.exec-decision h2 { margin: 0 0 3px; color: #0c396f; font-size: 12px; }
.exec-decision p { margin: 0; color: var(--exec-muted); font-size: 11px; line-height: 1.5; }
.exec-decision p strong { color: var(--exec-ink); }
.exec-decision a { flex: none; margin-left: auto; padding: 9px 12px; border-radius: 9px; color: #0557ae; background: #edf5ff; text-decoration: none; font-size: 11px; font-weight: 800; }

.exec-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; margin: 14px 0; }
.exec-kpi { min-width: 0; min-height: 123px; padding: 13px 14px 11px; border: 1px solid var(--exec-line); border-radius: 13px; background: #fff; box-shadow: var(--exec-shadow); }
.exec-kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 5px; }
.exec-kpi-label { color: #526880; font-size: 10px; font-weight: 800; letter-spacing: .025em; line-height: 1.25; text-transform: uppercase; }
.exec-kpi-icon { display: grid; width: 24px; height: 24px; flex: none; place-items: center; border-radius: 7px; color: var(--exec-blue); background: #eef5fc; font-size: 15px; }
.exec-kpi.risk .exec-kpi-icon { color: var(--exec-risk); background: var(--exec-risk-bg); }
.exec-kpi.warn .exec-kpi-icon { color: var(--exec-warn); background: var(--exec-warn-bg); }
.exec-kpi.safe .exec-kpi-icon { color: var(--exec-safe); background: var(--exec-safe-bg); }
.exec-kpi-value { display: flex; align-items: baseline; gap: 5px; margin: 8px 0 5px; color: #144b8e; font: 800 28px/1 'DM Mono', monospace; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.exec-kpi.risk .exec-kpi-value { color: var(--exec-risk); }
.exec-kpi.warn .exec-kpi-value { color: var(--exec-warn); }
.exec-kpi.safe .exec-kpi-value { color: var(--exec-safe); }
.exec-kpi-value small { font: 800 13px Manrope, sans-serif; letter-spacing: 0; }
.exec-kpi-foot { min-height: 26px; color: var(--exec-muted); font-size: 10px; line-height: 1.28; }
.exec-kpi-foot b { color: #244668; }
.exec-kpi-period { margin-top: 8px; padding-top: 7px; border-top: 1px solid #edf1f6; color: #596f8a; font: 750 9px 'DM Mono', monospace; letter-spacing: .025em; text-transform: uppercase; }

.exec-grid { display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(340px, .86fr); gap: 14px; margin-top: 14px; }
.exec-panel { min-width: 0; border: 1px solid var(--exec-line); border-radius: 14px; background: #fff; box-shadow: var(--exec-shadow); }
.exec-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 17px 18px 0; }
.exec-panel h2 { margin: 0; color: var(--exec-ink); font-size: 15px; letter-spacing: -.02em; }
.exec-panel-head p { margin: 4px 0 0; color: var(--exec-muted); font-size: 10px; line-height: 1.38; }
.exec-panel-link { flex: none; padding: 0; border: 0; color: #075dbb; background: transparent; text-decoration: none; font: 800 10px Manrope, sans-serif; white-space: nowrap; cursor: pointer; }
.exec-matrix { padding: 11px 14px 13px; }
.exec-matrix table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.exec-matrix th, .exec-matrix td { padding: 10px 5px; border-bottom: 1px solid #ecf0f5; text-align: center; font-variant-numeric: tabular-nums; vertical-align: middle; }
.exec-matrix th { color: #62758e; font: 800 9px/1.28 'DM Mono', monospace; letter-spacing: .015em; text-transform: uppercase; }
.exec-matrix th:first-child, .exec-matrix td:first-child { width: 23%; text-align: left; }
.exec-matrix tbody tr:last-child td { border-bottom: 0; }
.exec-matrix td { font-size: 12px; font-weight: 750; }
.exec-matrix td small { display: block; margin-top: 3px; color: var(--exec-muted); font-size: 9px; font-weight: 500; }
.exec-unit-name { color: #0e4b8f; font-weight: 800; font-size: 11px; }
.exec-pill { display: inline-block; min-width: 58px; padding: 5px 8px; border-radius: 7px; }
.exec-pill.risk { color: #b71739; background: var(--exec-risk-bg); }
.exec-pill.warn { color: #a56300; background: var(--exec-warn-bg); }
.exec-pill.safe { color: #0b875c; background: var(--exec-safe-bg); }
.exec-pill.neutral { color: #205486; background: #edf3fa; }
.exec-matrix-note { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 9px 5px 0; color: var(--exec-muted); font-size: 9px; }
.exec-matrix-note strong { color: #435a75; }
.exec-unit-cards { display: none; }

.exec-trend { padding: 11px 18px 14px; }
.exec-trend-controls { display: flex; gap: 8px; align-items: center; }
.exec-trend-controls label { display: flex; align-items: center; gap: 6px; }
.exec-duration-label { color: #62758e; font: 800 9px 'DM Mono', monospace; letter-spacing: .03em; text-transform: uppercase; }
.exec-duration { min-width: 105px; padding: 6px 8px; border: 1px solid var(--exec-line); border-radius: 7px; color: #264967; background: #fbfcfe; font: 700 10px 'DM Mono', monospace; cursor: pointer; }
.exec-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--exec-muted); font-size: 10px; }
.exec-legend span { display: inline-flex; align-items: center; gap: 5px; }
.exec-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.exec-trend svg { display: block; width: 100%; height: 178px; margin-top: 7px; overflow: visible; }
.exec-trend-callout { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border-radius: 8px; color: #526b87; background: #f0f6fd; font-size: 10px; line-height: 1.4; }
.exec-trend-callout b { color: #074b95; }
.exec-trend-empty { display: grid; min-height: 178px; place-items: center; padding: 12px; color: var(--exec-muted); text-align: center; font-size: 11px; line-height: 1.45; }

.exec-actions { padding: 8px 15px 11px; }
.exec-action { display: grid; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 3px; border-bottom: 1px solid #eef1f5; }
.exec-action:last-child { border-bottom: 0; }
.exec-rank { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 7px; color: #55718f; background: #edf3fa; font: 900 10px 'DM Mono', monospace; }
.exec-action:first-child .exec-rank { color: var(--exec-risk); background: var(--exec-risk-bg); }
.exec-action strong { display: block; color: var(--exec-ink); font-size: 11px; line-height: 1.25; }
.exec-action small { display: block; margin-top: 3px; color: var(--exec-muted); font-size: 9px; line-height: 1.35; }
.exec-flag { padding: 5px 7px; border-radius: 6px; color: #965b00; background: var(--exec-warn-bg); font: 800 9px 'DM Mono', monospace; white-space: nowrap; }
.exec-action:first-child .exec-flag { color: var(--exec-risk); background: var(--exec-risk-bg); }
.exec-source-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; padding: 13px 17px 16px; }
.exec-source-item { display: flex; align-items: center; gap: 8px; min-width: 0; color: #29415f; font-size: 10px; font-weight: 700; }
.exec-source-item i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #12a873; }
.exec-source-item.snapshot i, .exec-source-item.fallback i { background: #e69c18; }
.exec-source-item.unavailable i { background: #9aa9bb; }
.exec-source-item small { display: block; overflow: hidden; color: var(--exec-muted); font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.exec-source-foot { grid-column: 1 / -1; padding: 9px 10px; border-radius: 8px; color: #687c94; background: #f5f8fc; font-size: 9px; line-height: 1.4; }
.exec-content .empty-note { padding: 30px; }

@media (max-width: 1240px) {
  .exec-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .exec-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  /* A fixed global footer would otherwise cover KPI and matrix cards while
     scrolling this dense executive screen. Keep its branded information,
     but let it complete the mobile document after the analysis. */
  body:has(.executive-shell) { padding-bottom: 0; }
  body:has(.executive-shell) .global-bottom-bar { position: static; margin-top: 16px; }
  .executive-shell { padding: 12px 14px 26px; }
  .executive-shell .masthead { margin-bottom: 12px; }
  .executive-shell .masthead .brand-wrap { display: none; }
  .executive-shell .masthead { justify-content: flex-end; }
  .executive-shell .utility-right { gap: 8px; }
  .executive-shell .pln-logo { height: 26px; }
  .executive-shell .source-status { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .executive-shell #header-time { display: none; }
  .exec-hero { display: block; min-height: 0; padding: 19px 18px; border-radius: 14px; }
  .exec-eyebrow { font-size: 9px; }
  .exec-hero h1 { max-width: 310px; font-size: 25px; line-height: 1.1; }
  .exec-hero-copy { font-size: 11px; line-height: 1.42; }
  .exec-hero-controls { margin-top: 15px; align-items: stretch; }
  .exec-filter { min-width: 0; flex: 1; padding: 8px 9px; }
  .exec-filter strong, .exec-filter select { font-size: 11px; }
  .exec-freshness-filter { display: none; }
  .exec-decision { align-items: flex-start; gap: 10px; margin-top: 12px; padding: 12px; }
  .exec-decision-icon { width: 31px; height: 31px; font-size: 17px; }
  .exec-decision h2 { font-size: 12px; }
  .exec-decision p { font-size: 10px; }
  .exec-decision a { display: none; }
  .exec-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 12px 0; }
  .exec-kpi { min-height: 112px; padding: 11px; }
  .exec-kpi-label { font-size: 9px; }
  .exec-kpi-icon { width: 21px; height: 21px; font-size: 13px; }
  .exec-kpi-value { font-size: 25px; }
  .exec-kpi-foot { font-size: 9.5px; }
  .exec-kpi-period { font-size: 8px; }
  .exec-grid { display: block; margin-top: 12px; }
  .exec-grid + .exec-grid { margin-top: 12px; }
  .exec-grid .exec-panel + .exec-panel { margin-top: 12px; }
  .exec-panel-head { padding: 15px 14px 0; }
  .exec-panel h2 { font-size: 14px; }
  .exec-panel-head p { font-size: 10px; }
  .exec-matrix { display: none; }
  .exec-unit-cards { display: grid; gap: 9px; padding: 12px; }
  .exec-unit-card { padding: 11px; border: 1px solid #e6edf6; border-radius: 10px; background: #f7fafd; }
  .exec-unit-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: #0d4c94; font-size: 11px; font-weight: 800; }
  .exec-unit-card-head span { color: var(--exec-muted); font-size: 9px; }
  .exec-unit-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .exec-unit-card-grid div { min-width: 0; padding: 7px 5px; border: 1px solid #e8edf4; border-radius: 7px; background: #fff; text-align: center; }
  .exec-unit-card-grid small { display: block; height: 22px; color: #60758e; font-size: 8.5px; line-height: 1.2; }
  .exec-unit-card-grid strong { display: block; margin-top: 4px; font: 800 12px 'DM Mono', monospace; font-variant-numeric: tabular-nums; }
  .exec-unit-card-grid .risk { color: var(--exec-risk); }
  .exec-unit-card-grid .warn { color: var(--exec-warn); }
  .exec-unit-card-grid .safe { color: var(--exec-safe); }
  .exec-unit-card-grid .neutral { color: #205486; }
  .exec-trend { padding: 12px 14px 14px; }
  .exec-trend-controls { display: block; }
  .exec-trend-controls label { display: block; }
  .exec-duration-label { display: block; margin-bottom: 4px; }
  .exec-duration { width: 100%; margin-top: 8px; }
  .exec-trend svg { height: 155px; }
  .exec-trend-callout { font-size: 10px; }
  .exec-source-list { gap: 11px 10px; }
  .exec-source-foot { font-size: 9px; }
}
@media (max-width: 480px) {
  .exec-source-list { grid-template-columns: 1fr; gap: 8px; }
  .exec-source-item small { overflow: visible; text-overflow: clip; white-space: normal; line-height: 1.3; }
}
