/* Owner Dashboard refinements load last so the decision cockpit has one
   predictable responsive contract instead of inheriting legacy KPI sizing. */
@media (min-width: 1280px) and (min-height: 720px) {
  body.route-dashboard .owner-exec-investigation-panel {
    grid-template-rows: 22px minmax(0, 1fr) !important;
    gap: 7px !important;
  }

  body.route-dashboard .owner-investigate-compact-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 22px;
    padding: 0 2px;
  }

  body.route-dashboard .owner-investigate-compact-head > strong {
    color: #123342;
    font-size: 11px !important;
    font-weight: 850;
    letter-spacing: .09em;
    line-height: 22px !important;
    text-transform: uppercase;
  }

  body.route-dashboard .owner-investigate-compact-head > small {
    color: #6b7e89;
    font-size: 9px !important;
    font-weight: 700;
    line-height: 12px !important;
  }

  body.route-dashboard .owner-decision-panel {
    grid-template-rows: 18px 26px 5px 13px minmax(14px, 1fr) 18px !important;
    gap: 2px !important;
    padding: 6px 8px 5px !important;
  }

  body.route-dashboard .owner-decision-panel-head {
    grid-template-columns: 18px minmax(0, 1fr) auto !important;
    gap: 6px !important;
  }

  body.route-dashboard .owner-decision-panel-head > i {
    width: 18px !important;
    height: 18px !important;
    font-size: 9px !important;
  }

  body.route-dashboard .owner-decision-panel-head > b {
    font-size: 10px !important;
    letter-spacing: .025em !important;
    line-height: 13px !important;
  }

  body.route-dashboard .owner-decision-panel-head > em {
    padding-inline: 5px !important;
    font-size: 8px !important;
    letter-spacing: .02em !important;
    line-height: 13px !important;
  }

  body.route-dashboard .owner-decision-panel-reading > strong {
    font-size: 22px !important;
    line-height: 25px !important;
  }

  body.route-dashboard .owner-decision-panel-reading > small {
    font-size: 9px !important;
    line-height: 12px !important;
  }

  body.route-dashboard .owner-decision-panel-meter {
    height: 5px !important;
  }

  body.route-dashboard .owner-decision-panel-compare > b {
    font-size: 9px !important;
    line-height: 13px !important;
  }

  body.route-dashboard .owner-decision-panel-action > b {
    font-size: 10px !important;
    line-height: 13px !important;
  }

  body.route-dashboard .owner-decision-panel-action {
    min-height: 18px !important;
    padding-top: 3px !important;
  }

  body.route-dashboard .owner-decision-panel-detail {
    align-self: center;
    overflow: hidden;
    color: #60727d;
    font-size: 9px !important;
    font-weight: 700;
    line-height: 12px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Graph-led owner dashboard. */
@media (min-width: 1280px) and (min-height: 720px) {
  body.route-dashboard .owner-exec-dashboard.owner-exec-unified.owner-exec-live.owner-graph-led-dashboard {
    grid-template-rows: minmax(0, 1fr) 170px !important;
    gap: 10px !important;
  }

  body.route-dashboard .owner-full-width-graph.owner-exec-main-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.route-dashboard .owner-full-width-graph .owner-exec-main-left,
  body.route-dashboard .owner-full-width-graph .owner-target-cash-graph {
    width: 100% !important;
    height: 100% !important;
  }

  body.route-dashboard .owner-full-width-graph .owner-target-cash-graph {
    padding: 10px 14px 8px !important;
  }

  body.route-dashboard .owner-full-width-graph .owner-target-graph-head {
    min-height: 50px !important;
    padding-bottom: 4px !important;
  }

  body.route-dashboard .owner-full-width-graph .owner-target-graph-toolbar {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    min-height: 38px !important;
    padding: 4px 0 !important;
  }

  body.route-dashboard .owner-target-event-count { display: none !important; }

  body.route-dashboard .owner-graph-icon-instruction {
    color: #59717d;
    font-size: 10px !important;
    font-weight: 750;
    line-height: 14px !important;
    white-space: nowrap;
  }

  body.route-dashboard .owner-target-operating-svg .forecast-line {
    stroke-dasharray: none !important;
    stroke-width: 3.5px !important;
  }

  body.route-dashboard .owner-target-cash-graph .owner-exec-chart-canvas {
    width: 100% !important;
    height: 452px !important;
    min-height: 452px !important;
    max-height: 452px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    scrollbar-color: #72909d #e6edef;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }

  body.route-dashboard .owner-target-cash-graph .owner-exec-chart-canvas::-webkit-scrollbar {
    height: 10px;
  }

  body.route-dashboard .owner-target-cash-graph .owner-exec-chart-canvas::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #e6edef;
  }

  body.route-dashboard .owner-target-cash-graph .owner-exec-chart-canvas::-webkit-scrollbar-thumb {
    border: 2px solid #e6edef;
    border-radius: 999px;
    background: #72909d;
  }

  body.route-dashboard .owner-target-cash-graph .owner-exec-chart-track {
    position: relative;
    width: max(100%, var(--owner-chart-width));
    min-width: var(--owner-chart-width);
    height: 430px;
  }

  body.route-dashboard .owner-target-cash-graph .owner-exec-chart-track > .owner-target-operating-svg {
    display: block !important;
    width: var(--owner-chart-width) !important;
    min-width: var(--owner-chart-width) !important;
    max-width: none !important;
    height: 430px !important;
    min-height: 430px !important;
    max-height: 430px !important;
  }

  body.route-dashboard .owner-target-cash-graph .owner-exec-chart-track > .owner-exec-chart-hotspots {
    width: var(--owner-chart-width);
    height: 430px;
  }

  body.route-dashboard .owner-target-legend .cash-in-bar,
  body.route-dashboard .owner-target-legend .cash-out-bar {
    width: 8px !important;
    height: 13px !important;
    border-radius: 2px !important;
    background: #2e9b62 !important;
  }

  body.route-dashboard .owner-target-legend .cash-out-bar { background: #cc6d2e !important; }

  body.route-dashboard .owner-target-operating-svg .owner-month-band rect {
    fill: transparent;
    pointer-events: none;
  }

  body.route-dashboard .owner-target-operating-svg .owner-month-band.alternate rect { fill: rgba(24, 85, 105, .025); }

  body.route-dashboard .owner-target-operating-svg .owner-month-band line {
    stroke: #dce5e8;
    stroke-width: 1px;
  }

  body.route-dashboard .owner-target-operating-svg .owner-month-band text {
    fill: #415d69;
    font-size: 10px !important;
    font-weight: 850;
    letter-spacing: .06em;
    text-anchor: middle;
    text-transform: uppercase;
  }

  body.route-dashboard .owner-target-operating-svg .owner-week-flow-lane > text {
    fill: #405c68;
    font-size: 9px !important;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  body.route-dashboard .owner-target-operating-svg .owner-week-flow-lane > line {
    stroke: #9fb0b7;
    stroke-width: 1px;
  }

  body.route-dashboard .owner-target-operating-svg .owner-week-flow .cash-in { fill: #2e9b62; }
  body.route-dashboard .owner-target-operating-svg .owner-week-flow .cash-out { fill: #cc6d2e; }
  body.route-dashboard .owner-target-operating-svg .owner-week-flow.actual { opacity: .95; }
  body.route-dashboard .owner-target-operating-svg .owner-week-flow.forecast { opacity: .68; }

  body.route-dashboard .owner-target-operating-svg .now-label {
    font-size: 10px !important;
    font-weight: 900 !important;
    letter-spacing: .03em;
  }

  body.route-dashboard .owner-target-operating-svg .cash-callout,
  body.route-dashboard .owner-target-operating-svg .lowest-cash-inline {
    paint-order: stroke;
    stroke: #fffaf1;
    stroke-width: 4px;
    stroke-linejoin: round;
  }

  body.route-dashboard .owner-target-operating-svg .available-line { display: none !important; }

  body.route-dashboard .owner-graph-event-callout > line {
    stroke: #8ea4ad !important;
    stroke-dasharray: 2 2;
    stroke-width: 1px !important;
  }

  body.route-dashboard .owner-graph-event-callout .event-callout-icon {
    fill: #eaf3f5 !important;
    stroke: #1c6172 !important;
    stroke-width: 1.8px !important;
    filter: drop-shadow(0 2px 3px rgba(13, 38, 50, .14));
  }

  body.route-dashboard .owner-graph-event-callout.collection .event-callout-icon,
  body.route-dashboard .owner-graph-event-callout.sale .event-callout-icon {
    fill: #e7f6ed !important;
    stroke: #238e56 !important;
  }

  body.route-dashboard .owner-graph-event-callout.inventory .event-callout-icon {
    fill: #fff2e5 !important;
    stroke: #bd6a18 !important;
  }

  body.route-dashboard .owner-graph-event-callout path,
  body.route-dashboard .owner-graph-event-callout rect,
  body.route-dashboard .owner-graph-event-callout circle:not(.event-callout-icon) {
    fill: none !important;
    stroke: #1c6172 !important;
    stroke-width: 1.5px !important;
  }

  body.route-dashboard .owner-graph-event-callout.collection path,
  body.route-dashboard .owner-graph-event-callout.sale path { stroke: #238e56 !important; }
  body.route-dashboard .owner-graph-event-callout.inventory path { stroke: #bd6a18 !important; }

  body.route-dashboard .owner-graph-event-callout .event-count-badge {
    fill: #102f3d !important;
    stroke: #fff !important;
    stroke-width: 1.5px !important;
  }

  body.route-dashboard .owner-graph-event-callout .event-count-text {
    fill: #fff !important;
    font-size: 7px !important;
    font-weight: 900 !important;
    text-anchor: middle !important;
  }

  body.route-dashboard .owner-target-event-key {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
  }

  body.route-dashboard .owner-target-event-key > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #526a76;
    font-size: 9px !important;
    font-weight: 750;
    line-height: 16px !important;
    white-space: nowrap;
  }

  body.route-dashboard .owner-target-event-key > span > i {
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border: 1px solid #1c6172;
    border-radius: 50%;
    background: #eaf3f5;
    color: #1c6172;
  }

  body.route-dashboard .owner-target-event-key > span.collection > i,
  body.route-dashboard .owner-target-event-key > span.sale > i {
    border-color: #238e56;
    background: #e7f6ed;
    color: #238e56;
  }

  body.route-dashboard .owner-target-event-key > span.inventory > i {
    border-color: #bd6a18;
    background: #fff2e5;
    color: #bd6a18;
  }

  body.route-dashboard .owner-target-event-key svg { width: 11px; height: 11px; }

  body.route-dashboard .owner-next-decisions-deck {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  body.route-dashboard .owner-next-decisions-zone {
    box-sizing: border-box;
    display: grid;
    grid-template-rows: 22px minmax(0, 1fr);
    gap: 5px;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 7px 9px 8px;
    border: 1px solid #d5e0e4;
    border-radius: 11px;
    background: #f8fafb;
    overflow: hidden;
  }

  body.route-dashboard .owner-next-decisions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
  }

  body.route-dashboard .owner-next-decisions-head > strong {
    color: #123342;
    font-size: 13px !important;
    font-weight: 850;
    letter-spacing: .06em;
    line-height: 18px !important;
    text-transform: uppercase;
  }

  body.route-dashboard .owner-next-decisions-head > span {
    color: #647985;
    font-size: 10px !important;
    font-weight: 700;
    line-height: 14px !important;
  }

  body.route-dashboard .owner-next-decisions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 5px 7px;
    min-height: 0;
  }

  body.route-dashboard .owner-next-decision {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 24px minmax(150px, 1.15fr) minmax(90px, .55fr) minmax(145px, 1fr) 64px;
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "rank title value why open";
    align-items: center;
    gap: 5px 8px;
    min-width: 0;
    min-height: 0;
    padding: 5px 8px;
    border: 1px solid #d2dde1;
    border-top: 3px solid #168092;
    border-radius: 9px;
    background: #fff;
    color: #102634;
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
  }

  body.route-dashboard .owner-next-decision.risk { border-top-color: #bd4238; }
  body.route-dashboard .owner-next-decision.watch { border-top-color: #d1a82f; }
  body.route-dashboard .owner-next-decision.good { border-top-color: #238e56; }
  body.route-dashboard .owner-next-decision:hover,
  body.route-dashboard .owner-next-decision:focus-visible {
    border-color: #638591;
    box-shadow: 0 4px 12px rgba(13, 38, 50, .1);
    outline: none;
  }

  body.route-dashboard .owner-next-decision-rank {
    grid-area: rank;
    display: grid;
    place-items: center;
    align-self: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #173d4d;
    color: #fff;
    font-size: 11px !important;
    font-weight: 850;
    line-height: 24px !important;
  }

  body.route-dashboard .owner-next-decision.risk .owner-next-decision-rank { background: #b64036; }

  body.route-dashboard .owner-next-decision-title {
    grid-area: title;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
  }

  body.route-dashboard .owner-next-decision-title > small {
    color: #9c3c34;
    font-size: 8px !important;
    font-weight: 850;
    letter-spacing: .055em;
    line-height: 11px !important;
    text-transform: uppercase;
  }

  body.route-dashboard .owner-next-decision.good .owner-next-decision-title > small { color: #187948; }
  body.route-dashboard .owner-next-decision.watch .owner-next-decision-title > small { color: #876715; }

  body.route-dashboard .owner-next-decision-title > strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px !important;
    font-weight: 850;
    line-height: 15px !important;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.route-dashboard .owner-next-decision-value {
    grid-area: value;
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
  }

  body.route-dashboard .owner-next-decision-value > strong {
    color: #0b1722;
    font-size: 20px !important;
    font-weight: 850;
    line-height: 23px !important;
    white-space: nowrap;
  }

  body.route-dashboard .owner-next-decision-value > small {
    display: none;
  }

  body.route-dashboard .owner-next-decision-why {
    grid-area: why;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 0;
    min-width: 0;
    padding: 0 0 0 8px;
    border-top: 0;
    border-left: 1px solid #e1e8ea;
  }

  body.route-dashboard .owner-next-decision-why > b,
  body.route-dashboard .owner-next-decision-why > span {
    font-size: 10px !important;
    line-height: 13px !important;
  }

  body.route-dashboard .owner-next-decision-why > b {
    color: #425d6a;
    font-weight: 850;
    text-transform: uppercase;
    white-space: nowrap;
  }

  body.route-dashboard .owner-next-decision-why > span {
    display: -webkit-box;
    overflow: hidden;
    color: #647883;
    font-weight: 700;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.route-dashboard .owner-next-decision-open {
    grid-area: open;
    display: flex;
    align-items: center;
    align-self: center;
    justify-content: flex-end;
    gap: 5px;
    color: #174e62;
    font-size: 9px !important;
    font-weight: 850;
    line-height: 16px !important;
    text-transform: uppercase;
  }

  body.route-dashboard .owner-next-decision-open > i {
    font-size: 13px;
    font-style: normal;
  }
}

/* Popup audit overrides load after the shared application stylesheet. */
.owner-popup-modal.owner-executive-modal > h3,
.owner-popup-modal.owner-week-story-modal > h3,
.owner-popup-modal.owner-event-modal > h3,
.owner-popup-modal.owner-visual-modal > h3 {
  color: #fff !important;
  text-shadow: none !important;
}
.owner-popup-modal.owner-executive-modal > h3::before,
.owner-popup-modal.owner-week-story-modal > h3::before,
.owner-popup-modal.owner-event-modal > h3::before,
.owner-popup-modal.owner-visual-modal > h3::before { color: #cbd5da !important; }
.owner-popup-modal.owner-visual-modal:not(.owner-executive-modal) {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1180px, calc(100vw - 48px));
  height: auto;
  max-height: min(88vh, 860px);
}
.owner-popup-modal.owner-visual-modal:not(.owner-executive-modal) > h3 {
  min-height: 54px;
  margin: 0;
  padding: 12px 58px 11px 18px;
  font-size: 18px;
  line-height: 1.1;
}
.owner-popup-modal.owner-visual-modal:not(.owner-executive-modal) > h3::before {
  margin-bottom: 4px;
  font-size: 10px;
  line-height: 1;
}
.owner-popup-modal.owner-visual-modal:not(.owner-executive-modal) .modal-body {
  flex: 1;
  max-height: none;
  padding: 12px 16px 14px;
  overflow: auto;
}
.owner-popup-modal.owner-visual-modal:not(.owner-executive-modal) .modal-actions {
  display: flex !important;
  position: absolute;
  top: 12px !important;
  right: 14px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 3;
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px;
  background: transparent !important;
}
.owner-popup-modal.owner-visual-modal:not(.owner-executive-modal) .modal-actions .btn {
  display: grid;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 0;
}
.owner-popup-modal.owner-visual-modal:not(.owner-executive-modal) .modal-actions .btn::after {
  content: "×";
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
}
.owner-popup-modal.owner-executive-modal .modal-body { padding: 12px 16px 14px; }
.owner-popup-modal.owner-executive-modal {
  width: min(1280px, calc(100vw - 48px));
  height: min(88vh, 860px);
  max-height: min(88vh, 860px);
}
.owner-popup-modal.owner-executive-modal .modal-actions {
  display: flex !important;
  position: absolute !important;
  top: 12px !important;
  right: 14px !important;
  bottom: auto !important;
  left: auto !important;
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px;
  background: transparent !important;
}
.owner-popup-workspace.week-story-proof,
.owner-popup-workspace.event-detail,
.owner-popup-workspace.kpi-proof { align-content: start; gap: 10px; }
.owner-popup-workspace.week-story-proof .owner-popup-conclusion,
.owner-popup-workspace.event-detail .owner-popup-conclusion { min-height: 0; padding: 10px 12px; }
.owner-week-story-first {
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
  gap: 10px;
}
.owner-week-readout-v3 { display: grid; align-content: start; gap: 10px; }
.owner-week-cash-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.owner-week-cash-facts article {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dde2df;
  border-top: 3px solid #667783;
  border-radius: 8px;
  background: #fff;
}
.owner-week-cash-facts article.inflow,
.owner-week-cash-facts article.good { border-top-color: #238654; }
.owner-week-cash-facts article.outflow,
.owner-week-cash-facts article.risk { border-top-color: #bf4439; }
.owner-week-cash-facts span {
  color: #64727a;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.owner-week-cash-facts strong { color: #101820; font-size: 20px; font-weight: 900; line-height: 1.05; }
.owner-week-cash-facts em { color: #5d696f; font-size: 11px; font-style: normal; font-weight: 650; line-height: 1.3; }
.owner-event-specific > div { grid-template-columns: repeat(3, minmax(190px, 1fr)); }
.owner-event-specific span { min-height: 82px; align-content: start; }
.owner-event-specific strong {
  overflow: visible;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}
.owner-event-specific em { font-size: 11.5px; line-height: 1.35; }
.owner-kpi-proof-hero { padding: 10px 12px; }
.owner-kpi-proof-hero strong { font-size: clamp(30px, 3.2vw, 44px); }
.owner-kpi-proof-basis {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #ead9a9;
  border-radius: 7px;
  background: #fffaf0;
}
.owner-kpi-proof-basis b { color: #725700; font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.owner-kpi-proof-basis span { color: #4e5558; font-size: 12px; font-weight: 650; line-height: 1.35; }
.owner-model-controls-popup .scenario-control-shell { display: grid; gap: 10px; padding: 12px; }
.owner-model-controls-popup .owner-scenario-state { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.owner-model-controls-popup .owner-plan-picker.owner-scenario-builder {
  display: grid;
  grid-template-columns: repeat(6, minmax(125px, 1fr));
  gap: 9px;
  align-items: end;
}
.owner-model-controls-popup .owner-plan-picker label,
.owner-model-controls-popup .owner-plan-picker input,
.owner-model-controls-popup .owner-plan-picker select { width: 100%; min-width: 0; }
.owner-model-controls-popup .owner-scenario-delta-grid,
.owner-model-controls-popup .scenario-compare-table-wrap,
.owner-model-controls-popup .owner-scenario-feedback,
.owner-model-controls-popup .owner-plan-actions { grid-column: 1 / -1; }
.owner-model-controls-popup .owner-scenario-delta-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.owner-model-controls-popup .owner-plan-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; margin: 0; }
@media (max-width: 1100px) {
  .owner-week-story-first { grid-template-columns: 1fr; }
  .owner-model-controls-popup .owner-scenario-state,
  .owner-model-controls-popup .owner-scenario-delta-grid,
  .owner-model-controls-popup .owner-plan-picker.owner-scenario-builder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .owner-week-cash-facts,
  .owner-event-specific > div,
  .owner-model-controls-popup .owner-scenario-state,
  .owner-model-controls-popup .owner-scenario-delta-grid,
  .owner-model-controls-popup .owner-plan-picker.owner-scenario-builder { grid-template-columns: 1fr; }
  .owner-kpi-proof-basis { grid-template-columns: 1fr; }
}

/* Compact event readout: answer, impact bridge, action, then proof. */
.owner-popup-workspace.event-detail { gap: 10px; max-width: 100%; }
.owner-event-readout-v4 {
  overflow: hidden;
  border: 1px solid #d9dfdc;
  border-top: 4px solid #238654;
  border-radius: 10px;
  background: #fff;
}
.owner-event-readout-v4.outflow { border-top-color: #c64a3e; }
.owner-event-readout-v4 > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #e6e9e7;
}
.owner-event-readout-v4 > header > div { display: grid; gap: 3px; min-width: 0; }
.owner-event-readout-v4 > header > div > span,
.owner-event-readout-v4 > header aside span,
.owner-event-bridge-v4 span,
.owner-event-decision-v4 span,
.owner-event-decision-v4 dt {
  color: #62727a;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.owner-event-readout-v4 > header > div > strong { color: #101820; font-size: 21px; font-weight: 900; line-height: 1.1; }
.owner-event-readout-v4 > header p { margin: 1px 0 0; color: #56636a; font-size: 12.5px; font-weight: 650; line-height: 1.35; }
.owner-event-readout-v4 > header aside {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 10px;
  align-items: baseline;
  min-width: 150px;
  text-align: right;
}
.owner-event-readout-v4 > header aside span { grid-column: 1 / -1; }
.owner-event-readout-v4 > header aside strong { color: #16834b; font-size: 29px; font-weight: 920; line-height: 1; }
.owner-event-readout-v4.outflow > header aside strong { color: #b53e34; }
.owner-event-readout-v4 > header aside em { color: #66747b; font-size: 11px; font-style: normal; font-weight: 750; }
.owner-event-bridge-v4 {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 22px minmax(160px, .8fr) 22px minmax(180px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 12px 16px 14px;
  background: #f7f9f8;
}
.owner-event-bridge-v4 article { display: grid; gap: 3px; min-width: 0; }
.owner-event-bridge-v4 article + i { color: #829098; font-size: 21px; font-style: normal; font-weight: 800; text-align: center; }
.owner-event-bridge-v4 strong { color: #101820; font-size: 23px; font-weight: 900; line-height: 1.05; }
.owner-event-bridge-v4 .impact strong { color: #16834b; }
.owner-event-readout-v4.outflow .owner-event-bridge-v4 .impact strong { color: #b53e34; }
.owner-event-bridge-v4 em { color: #6a777d; font-size: 10.5px; font-style: normal; font-weight: 680; line-height: 1.25; }
.owner-event-bridge-v4 em.risk { color: #b53e34; font-weight: 820; }
.owner-event-bridge-v4 em.good { color: #16834b; font-weight: 820; }
.owner-event-decision-v4 {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.5fr);
  gap: 10px;
}
.owner-event-decision-v4 > article,
.owner-event-decision-v4 > dl { margin: 0; border: 1px solid #dde2df; border-radius: 9px; background: #fff; }
.owner-event-decision-v4 > article { display: grid; gap: 4px; padding: 12px 14px; border-left: 4px solid #1f6372; }
.owner-event-decision-v4 > article strong { color: #101820; font-size: 15px; font-weight: 880; line-height: 1.2; }
.owner-event-decision-v4 > article p { margin: 0; color: #5a686f; font-size: 11.5px; font-weight: 650; line-height: 1.35; }
.owner-event-decision-v4 > dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.owner-event-decision-v4 > dl > div { display: grid; gap: 4px; align-content: center; min-width: 0; padding: 10px 12px; border-left: 1px solid #e7eae8; }
.owner-event-decision-v4 > dl > div:first-child { border-left: 0; }
.owner-event-decision-v4 dd { overflow-wrap: anywhere; margin: 0; color: #172129; font-size: 12px; font-weight: 800; line-height: 1.25; }
.owner-event-cluster-v4 { display: grid; gap: 0; overflow: hidden; border: 1px solid #dde2df; border-radius: 9px; background: #fff; }
.owner-event-cluster-v4 header,
.owner-event-cluster-v4 article { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 12px; }
.owner-event-cluster-v4 header { grid-template-columns: auto minmax(0, 1fr); background: #f4f6f5; }
.owner-event-cluster-v4 header b { color: #172129; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.owner-event-cluster-v4 header span,
.owner-event-cluster-v4 article em { color: #66747b; font-size: 10.5px; font-style: normal; font-weight: 650; }
.owner-event-cluster-v4 article { border-top: 1px solid #edf0ee; }
.owner-event-cluster-v4 article > span { color: #172129; font-size: 11.5px; font-weight: 760; }
.owner-event-cluster-v4 article strong { color: #16834b; font-size: 12px; font-weight: 880; }
.owner-event-cluster-v4 article strong.outflow { color: #b53e34; }
.owner-event-method-v4 { overflow: hidden; border: 1px solid #dde2df; border-radius: 8px; background: #fafbf9; }
.owner-event-method-v4 summary { padding: 9px 12px; color: #34444c; font-size: 11px; font-weight: 820; cursor: pointer; }
.owner-event-method-v4 > div { display: grid; grid-template-columns: minmax(220px, .8fr) repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px 12px; border-top: 1px solid #e3e7e4; }
.owner-event-method-v4 code { color: #111b21; font-size: 12px; font-weight: 820; white-space: normal; }
.owner-event-method-v4 p { margin: 0; color: #5e6b71; font-size: 10.5px; line-height: 1.35; }

@media (max-width: 760px) {
  .owner-popup-modal.owner-visual-modal:not(.owner-executive-modal) { width: calc(100vw - 18px); max-height: calc(100vh - 18px); }
  .owner-popup-modal.owner-executive-modal { width: calc(100vw - 16px); height: calc(100vh - 68px); max-height: calc(100vh - 68px); }
  .owner-event-readout-v4 > header { grid-template-columns: 1fr; gap: 9px; }
  .owner-event-readout-v4 > header aside { grid-template-columns: auto 1fr; min-width: 0; text-align: left; }
  .owner-event-readout-v4 > header aside span { grid-column: auto; }
  .owner-event-bridge-v4 { grid-template-columns: 1fr; }
  .owner-event-bridge-v4 article + i { display: none; }
  .owner-event-decision-v4 { grid-template-columns: 1fr; }
  .owner-event-decision-v4 > dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-event-decision-v4 > dl > div:nth-child(3) { border-left: 0; border-top: 1px solid #e7eae8; }
  .owner-event-decision-v4 > dl > div:nth-child(4) { border-top: 1px solid #e7eae8; }
  .owner-event-method-v4 > div { grid-template-columns: 1fr; }
}

/* Owner cash story: neutral balance line with material operating events. */
body.route-dashboard .owner-material-cash-graph,
body.owner-dashboard-route .owner-material-cash-graph {
  height: auto !important;
  min-height: 0 !important;
  background: #fff;
}

@media (min-width: 1280px) and (min-height: 720px) {
  body.route-dashboard .owner-exec-dashboard.owner-exec-unified.owner-exec-live.owner-graph-led-dashboard {
    align-content: start !important;
    grid-template-rows: auto 170px !important;
  }

  body.route-dashboard .owner-full-width-graph .owner-material-cash-graph {
    height: auto !important;
  }
}

body.route-dashboard .owner-material-cash-graph .owner-target-graph-head,
body.owner-dashboard-route .owner-material-cash-graph .owner-target-graph-head {
  grid-template-columns: minmax(320px, .85fr) minmax(720px, 1.6fr);
  gap: 18px;
  align-items: center;
}

body.route-dashboard .owner-material-cash-graph .owner-cash-story-stats,
body.owner-dashboard-route .owner-material-cash-graph .owner-cash-story-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(116px, 1fr));
  min-width: 0;
}

body.route-dashboard .owner-material-cash-graph .owner-cash-story-stats span,
body.owner-dashboard-route .owner-material-cash-graph .owner-cash-story-stats span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 1px 12px;
  border-left: 1px solid #dde3e6;
  color: #60717b;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .055em;
  line-height: 1.15;
  text-transform: uppercase;
}

body.route-dashboard .owner-material-cash-graph .owner-cash-story-stats b,
body.owner-dashboard-route .owner-material-cash-graph .owner-cash-story-stats b {
  overflow: hidden;
  color: #111820;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

body.route-dashboard .owner-material-cash-graph .owner-cash-story-stats small,
body.owner-dashboard-route .owner-material-cash-graph .owner-cash-story-stats small {
  color: #73828a;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

body.route-dashboard .owner-material-graph-toolbar,
body.owner-dashboard-route .owner-material-graph-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 45px;
  padding: 6px 14px;
  border-top: 1px solid #edf0f1;
  border-bottom: 1px solid #e3e7e9;
  background: #fbfcfc;
}

body.route-dashboard .owner-material-event-key,
body.owner-dashboard-route .owner-material-event-key {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

body.route-dashboard .owner-material-event-key > span,
body.owner-dashboard-route .owner-material-event-key > span {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
  align-items: center;
  padding: 3px 8px 3px 4px;
  border: 1px solid #d8e0e3;
  border-radius: 999px;
  background: #fff;
  color: #49606c;
  font-size: 9.5px;
  font-weight: 780;
  white-space: nowrap;
}

body.route-dashboard .owner-material-event-key i,
body.owner-dashboard-route .owner-material-event-key i {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: #2b6978;
}

body.route-dashboard .owner-material-event-key svg,
body.owner-dashboard-route .owner-material-event-key svg {
  width: 13px;
  height: 13px;
  overflow: visible;
}

body.route-dashboard .owner-material-event-key svg path,
body.route-dashboard .owner-material-event-key svg rect,
body.owner-dashboard-route .owner-material-event-key svg path,
body.owner-dashboard-route .owner-material-event-key svg rect {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

body.route-dashboard .owner-material-event-key .collection i,
body.route-dashboard .owner-material-event-key .sale i,
body.owner-dashboard-route .owner-material-event-key .collection i,
body.owner-dashboard-route .owner-material-event-key .sale i { color: #16834b; }
body.route-dashboard .owner-material-event-key .inventory i,
body.route-dashboard .owner-material-event-key .payroll i,
body.route-dashboard .owner-material-event-key .debt-tax i,
body.owner-dashboard-route .owner-material-event-key .inventory i,
body.owner-dashboard-route .owner-material-event-key .payroll i,
body.owner-dashboard-route .owner-material-event-key .debt-tax i { color: #bf661f; }
body.route-dashboard .owner-material-event-key .funding i,
body.owner-dashboard-route .owner-material-event-key .funding i { color: #7652b5; }
body.route-dashboard .owner-material-event-key .build i,
body.owner-dashboard-route .owner-material-event-key .build i { color: #16818b; }

body.route-dashboard .owner-material-cash-graph .owner-exec-chart-canvas,
body.owner-dashboard-route .owner-material-cash-graph .owner-exec-chart-canvas,
body.route-dashboard .owner-material-cash-graph .owner-exec-chart-track,
body.owner-dashboard-route .owner-material-cash-graph .owner-exec-chart-track {
  background: #fff;
}

body.route-dashboard .owner-material-operating-svg .owner-month-divider line,
body.owner-dashboard-route .owner-material-operating-svg .owner-month-divider line {
  stroke: #e6eaec;
  stroke-width: 1;
}

body.route-dashboard .owner-material-operating-svg .owner-month-divider text,
body.owner-dashboard-route .owner-material-operating-svg .owner-month-divider text {
  fill: #566d78;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .09em;
  text-anchor: middle;
  text-transform: uppercase;
}

body.route-dashboard .owner-material-operating-svg .tick line,
body.owner-dashboard-route .owner-material-operating-svg .tick line {
  stroke: #dce2e5;
  stroke-dasharray: 2 4;
  stroke-width: 1;
}

body.route-dashboard .owner-material-operating-svg .zero,
body.owner-dashboard-route .owner-material-operating-svg .zero {
  stroke: #98a4aa;
  stroke-dasharray: 4 4;
  stroke-width: 1.1;
}

body.route-dashboard .owner-material-operating-svg .actual-line,
body.owner-dashboard-route .owner-material-operating-svg .actual-line {
  fill: none;
  stroke: #141a1e;
  stroke-width: 3;
}

body.route-dashboard .owner-material-operating-svg .forecast-line,
body.owner-dashboard-route .owner-material-operating-svg .forecast-line {
  fill: none;
  stroke: #2f6fba;
  stroke-dasharray: none;
  stroke-width: 3;
}

body.route-dashboard .owner-material-operating-svg .now,
body.owner-dashboard-route .owner-material-operating-svg .now {
  stroke: #59676e;
  stroke-dasharray: 2 3;
  stroke-width: 1.1;
}

body.route-dashboard .owner-material-operating-svg .owner-material-event,
body.owner-dashboard-route .owner-material-operating-svg .owner-material-event { color: #2b6978; }
body.route-dashboard .owner-material-operating-svg .owner-material-event.collection,
body.route-dashboard .owner-material-operating-svg .owner-material-event.sale,
body.owner-dashboard-route .owner-material-operating-svg .owner-material-event.collection,
body.owner-dashboard-route .owner-material-operating-svg .owner-material-event.sale { color: #16834b; }
body.route-dashboard .owner-material-operating-svg .owner-material-event.inventory,
body.route-dashboard .owner-material-operating-svg .owner-material-event.payroll,
body.route-dashboard .owner-material-operating-svg .owner-material-event.debt-tax,
body.owner-dashboard-route .owner-material-operating-svg .owner-material-event.inventory,
body.owner-dashboard-route .owner-material-operating-svg .owner-material-event.payroll,
body.owner-dashboard-route .owner-material-operating-svg .owner-material-event.debt-tax { color: #bf661f; }
body.route-dashboard .owner-material-operating-svg .owner-material-event.funding,
body.owner-dashboard-route .owner-material-operating-svg .owner-material-event.funding { color: #7652b5; }
body.route-dashboard .owner-material-operating-svg .owner-material-event.build,
body.owner-dashboard-route .owner-material-operating-svg .owner-material-event.build { color: #16818b; }

body.route-dashboard .owner-material-operating-svg .owner-material-event .event-leader,
body.owner-dashboard-route .owner-material-operating-svg .owner-material-event .event-leader {
  stroke: currentColor;
  stroke-opacity: .55;
  stroke-width: 1.1;
}

body.route-dashboard .owner-material-operating-svg .owner-material-event .event-pill,
body.owner-dashboard-route .owner-material-operating-svg .owner-material-event .event-pill {
  fill: #fff;
  stroke: currentColor;
  stroke-width: 1.25;
}

body.route-dashboard .owner-material-operating-svg .event-pill-icon path,
body.route-dashboard .owner-material-operating-svg .event-pill-icon rect,
body.owner-dashboard-route .owner-material-operating-svg .event-pill-icon path,
body.owner-dashboard-route .owner-material-operating-svg .event-pill-icon rect {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

body.route-dashboard .owner-material-operating-svg .event-pill-title,
body.owner-dashboard-route .owner-material-operating-svg .event-pill-title {
  fill: #26343b;
  font-size: 8px;
  font-weight: 820;
}

body.route-dashboard .owner-material-operating-svg .event-pill-amount,
body.owner-dashboard-route .owner-material-operating-svg .event-pill-amount {
  fill: currentColor;
  font-size: 8px;
  font-weight: 900;
}

body.route-dashboard .owner-material-operating-svg .forecast-low-marker circle,
body.owner-dashboard-route .owner-material-operating-svg .forecast-low-marker circle { fill: #b53e34; stroke: #fff; stroke-width: 1.5; }
body.route-dashboard .owner-material-operating-svg .forecast-low-marker text,
body.owner-dashboard-route .owner-material-operating-svg .forecast-low-marker text { fill: #fff; font-size: 7px; font-weight: 900; text-anchor: middle; }
body.route-dashboard .owner-material-operating-svg .forecast-low-label,
body.owner-dashboard-route .owner-material-operating-svg .forecast-low-label { fill: #a63a31; font-size: 9px; font-weight: 850; }

body.route-dashboard .owner-material-event-hit,
body.owner-dashboard-route .owner-material-event-hit {
  width: 108px !important;
  height: 34px !important;
  border-radius: 18px !important;
}

@media (max-width: 1180px) {
  body.route-dashboard .owner-material-cash-graph .owner-target-graph-head,
  body.owner-dashboard-route .owner-material-cash-graph .owner-target-graph-head { grid-template-columns: 1fr; }
  body.route-dashboard .owner-material-cash-graph .owner-cash-story-stats,
  body.owner-dashboard-route .owner-material-cash-graph .owner-cash-story-stats { grid-template-columns: repeat(5, minmax(105px, 1fr)); overflow-x: auto; }
  body.route-dashboard .owner-material-graph-toolbar,
  body.owner-dashboard-route .owner-material-graph-toolbar { grid-template-columns: 1fr; gap: 6px; }
}
