/* Batch73: interactive intelligence, scenario simulation, and global quick actions. */
body.erp-mode .intel-trend { overflow: visible; }
body.erp-mode .intel-trend > header { align-items: center; flex-wrap: wrap; }
body.erp-mode .b73-legacy-legend { display: none; }
body.erp-mode .b73-trend-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 1 1 520px; }
body.erp-mode .b73-trend-tools label { display: flex; align-items: center; gap: 6px; color: #6d7d92; font-size: 10px; white-space: nowrap; }
body.erp-mode .b73-trend-tools select { min-height: 32px; height: 32px; padding: 0 28px 0 9px; font-size: 10px; }
body.erp-mode .b73-segment { display: flex; align-items: center; padding: 3px; border: 1px solid #dfe7f0; border-radius: 9px; background: #f5f8fc; }
body.erp-mode .b73-segment button { flex: 0 0 auto; min-height: 28px; padding: 4px 9px; border: 0; border-radius: 7px; background: transparent; color: #65768c; font-size: 9px; white-space: nowrap; box-shadow: none; }
body.erp-mode .b73-segment button.active { background: #fff; color: #1d55cd; box-shadow: 0 3px 9px rgba(27,49,79,.11); }
body.erp-mode .b73-window-tools { display: flex; align-items: center; gap: 3px; }
body.erp-mode .b73-window-tools button { min-width: 30px; min-height: 32px; padding: 0; border: 1px solid #dbe5f0; background: #fff; color: #45617f; }
body.erp-mode .b73-window-tools button:disabled { opacity: .35; }
body.erp-mode .b73-play { flex: 0 0 auto; min-height: 32px; border: 1px solid #cfe0f5; background: #eef5ff; color: #245da5; white-space: nowrap; }
body.erp-mode #intelTrendChart.intel-chart { height: auto !important; min-height: 360px; }
body.erp-mode .b73-chart-stage { position: relative; height: 314px; overflow: hidden; border: 1px solid #e1e9f2; border-radius: 11px; background: linear-gradient(180deg,#fbfdff,#f7faff); outline: none; }
body.erp-mode .b73-chart-stage:focus-visible { border-color: #76a6ea; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
body.erp-mode .b73-chart-svg { width: 100%; height: 100%; overflow: visible; }
body.erp-mode .b73-grid line { stroke: #e6edf5; stroke-width: 1; vector-effect: non-scaling-stroke; }
body.erp-mode .b73-grid text, body.erp-mode .b73-axis text, body.erp-mode .b73-threshold text { fill: #76879b; font-size: 10px; }
body.erp-mode .b73-series .b73-line { fill: none; stroke: var(--series); stroke-width: 2.6; vector-effect: non-scaling-stroke; filter: drop-shadow(0 3px 4px rgba(25,58,104,.08)); }
body.erp-mode .b73-series .b73-area { fill: var(--series); opacity: .075; }
body.erp-mode .b73-series .b73-point { fill: #fff; stroke: var(--series); stroke-width: 2.2; vector-effect: non-scaling-stroke; cursor: pointer; transition: r .15s ease, stroke-width .15s ease, filter .15s ease; }
body.erp-mode .b73-series .b73-point:hover, body.erp-mode .b73-series .b73-point.selected { r: 7; stroke-width: 3; filter: drop-shadow(0 3px 5px rgba(37,99,235,.28)); }
body.erp-mode .b73-series .b73-point.anomaly { fill: #fff1d6; stroke: #d97706; }
body.erp-mode .b73-series .b73-point.alert:not(.anomaly) { stroke-width: 3.2; }
body.erp-mode .b73-salesRevenue .b73-area { opacity: .12; }
body.erp-mode .b73-threshold line { stroke: var(--series); stroke-width: 1.2; stroke-dasharray: 5 5; opacity: .6; vector-effect: non-scaling-stroke; }
body.erp-mode .b73-crosshair { stroke: #5e718a; stroke-width: 1; stroke-dasharray: 3 4; opacity: .48; pointer-events: none; vector-effect: non-scaling-stroke; }
body.erp-mode .b73-hit-area { fill: transparent; cursor: crosshair; }
body.erp-mode .b73-chart-tooltip { position: absolute; top: 13px; z-index: 4; width: 184px; padding: 10px 11px; border: 1px solid rgba(25,58,104,.18); border-radius: 9px; background: rgba(255,255,255,.96); box-shadow: 0 10px 28px rgba(20,45,78,.14); opacity: 0; pointer-events: none; transform: translate(-50%,-5px); transition: opacity .15s ease, transform .15s ease; }
body.erp-mode .b73-chart-tooltip.visible { opacity: 1; transform: translate(-50%,0); }
body.erp-mode .b73-chart-tooltip b { display: block; margin-bottom: 5px; color: #1d334f; font-size: 10px; }
body.erp-mode .b73-chart-tooltip span { display: flex; justify-content: space-between; gap: 7px; color: #66788e; font-size: 9px; line-height: 1.8; }
body.erp-mode .b73-chart-tooltip strong { color: #1d334f; font-size: 9px; }
body.erp-mode .b73-chart-tooltip em { color: #0f8f7f; font-style: normal; }
body.erp-mode .b73-trend-insights { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 10px; }
body.erp-mode .b73-trend-insights button { display: block; min-width: 0; padding: 10px 11px; border: 1px solid #e0e8f1; border-radius: 9px; background: #fff; text-align: left; box-shadow: none; }
body.erp-mode .b73-trend-insights button:hover { border-color: #a9c6ec; background: #f6f9ff; transform: translateY(-1px); }
body.erp-mode .b73-trend-insights span, body.erp-mode .b73-trend-insights small { display: block; color: #75859a; font-size: 8px; }
body.erp-mode .b73-trend-insights b { display: block; margin: 4px 0; overflow: hidden; color: #203852; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
body.erp-mode .b73-trend-insights b.up { color: #c05a36; } body.erp-mode .b73-trend-insights b.down { color: #0f8f7f; }
body.erp-mode .b73-trend-detail { margin-top: 10px; padding: 12px; border: 1px solid #dce7f3; border-radius: 10px; background: #f8fbff; }
body.erp-mode .b73-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
body.erp-mode .b73-detail-head span { display: block; color: #77879b; font-size: 8px; }
body.erp-mode .b73-detail-head strong { display: block; margin-top: 2px; color: #1b3657; font-size: 13px; }
body.erp-mode .b73-detail-actions { display: flex; gap: 5px; }
body.erp-mode .b73-detail-actions button { min-height: 28px; padding: 4px 8px; border: 1px solid #d3e1f1; background: #fff; color: #38628f; font-size: 9px; }
body.erp-mode .b73-detail-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 9px; }
body.erp-mode .b73-detail-kpis > span { padding: 9px; border-radius: 8px; background: #fff; }
body.erp-mode .b73-detail-kpis small, body.erp-mode .b73-detail-kpis em { display: block; color: #7b899c; font-size: 8px; font-style: normal; }
body.erp-mode .b73-detail-kpis b { display: block; margin: 4px 0; color: #1f3651; font-size: 15px; }
body.erp-mode .b73-detail-kpis em.up { color: #bf5b39; } body.erp-mode .b73-detail-kpis em.down { color: #0b8e7e; }
body.erp-mode .b73-detail-context { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed #d9e4f0; color: #546a84; font-size: 9px; }
body.erp-mode .b73-detail-context > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
body.erp-mode .b73-detail-context span { padding: 3px 6px; border-radius: 99px; background: #eaf2fc; }
body.erp-mode .b73-detail-context strong { color: #255994; }

body.erp-mode .b73-scenario-lab { border-color: #d7e4f2 !important; background: linear-gradient(135deg,#fff,#f6faff) !important; }
body.erp-mode .b73-scenario-lab > header { align-items: center; }
body.erp-mode .b73-kicker { display: block; margin-bottom: 4px; color: #2774c8; font-size: 8px; font-weight: 800; }
body.erp-mode .b73-safe-badge { padding: 5px 8px; border: 1px solid #bfe7dd; border-radius: 99px; background: #edf9f6; color: #0c806f; font-size: 9px; }
body.erp-mode .b73-scenario-grid { display: grid; grid-template-columns: minmax(280px,.72fr) minmax(0,1.28fr); gap: 15px; }
body.erp-mode .b73-scenario-controls { padding: 13px; border: 1px solid #dfe8f2; border-radius: 10px; background: rgba(255,255,255,.86); }
body.erp-mode .b73-scenario-controls > label { display: block; margin-bottom: 12px; }
body.erp-mode .b73-scenario-controls label > span { display: flex; justify-content: space-between; color: #5f7188; font-size: 9px; }
body.erp-mode .b73-scenario-controls label b { color: #244d7b; }
body.erp-mode .b73-scenario-controls input[type="range"] { width: 100%; min-height: 22px; margin-top: 5px; accent-color: #2563eb; box-shadow: none; }
body.erp-mode .b73-budget > div { display: flex; align-items: center; gap: 7px; margin-top: 5px; }
body.erp-mode .b73-budget input { width: 150px; }
body.erp-mode .b73-budget i { color: #7b899b; font-size: 8px; font-style: normal; }
body.erp-mode .b73-scenario-presets { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
body.erp-mode .b73-scenario-presets button { min-height: 30px; padding: 4px; border: 1px solid #dce5ef; background: #fff; color: #5f7188; font-size: 9px; }
body.erp-mode .b73-scenario-presets button.active { border-color: #9ebfeb; background: #edf5ff; color: #1d5fa9; }
body.erp-mode .b73-scenario-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
body.erp-mode .b73-scenario-kpis span { padding: 11px; border: 1px solid #e0e8f1; border-radius: 9px; background: #fff; }
body.erp-mode .b73-scenario-kpis small { display: block; color: #758499; font-size: 8px; }
body.erp-mode .b73-scenario-kpis b { display: block; margin-top: 5px; color: #203852; font-size: 16px; }
body.erp-mode .b73-scenario-kpis span.risk { border-color: #f2d6bd; background: #fffaf4; } body.erp-mode .b73-scenario-kpis span.risk b { color: #b85634; }
body.erp-mode .b73-scenario-list { margin-top: 9px; overflow: hidden; border: 1px solid #e0e8f1; border-radius: 9px; background: #fff; }
body.erp-mode .b73-scenario-list-head { display: flex; justify-content: space-between; padding: 9px 11px; border-bottom: 1px solid #e8eef5; background: #f7faff; font-size: 9px; }
body.erp-mode .b73-scenario-list-head span { color: #77869a; }
body.erp-mode .b73-scenario-list button { display: grid; grid-template-columns: minmax(0,1fr) auto 82px; align-items: center; width: 100%; min-height: 0; padding: 8px 11px; border: 0; border-bottom: 1px solid #edf2f7; border-radius: 0; background: #fff; text-align: left; box-shadow: none; }
body.erp-mode .b73-scenario-list button:hover { background: #f6f9fd; }
body.erp-mode .b73-scenario-list button div { min-width: 0; }
body.erp-mode .b73-scenario-list button b, body.erp-mode .b73-scenario-list button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.erp-mode .b73-scenario-list button b { color: #2a405b; font-size: 9px; } body.erp-mode .b73-scenario-list button small { margin-top: 2px; color: #8995a6; font-size: 8px; }
body.erp-mode .b73-scenario-list button strong { padding: 0 12px; color: #245b99; font-size: 10px; }
body.erp-mode .b73-scenario-list button > span { color: #65758a; font-size: 8px; text-align: right; } body.erp-mode .b73-scenario-list button > span.risk { color: #c05836; }
body.erp-mode .b73-empty { padding: 20px; color: #77879b; font-size: 10px; text-align: center; }

body.erp-mode .b73-quick-button { display: flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 9px; border: 1px solid #dfe7f0; background: #fff; color: #4f6680; }
body.erp-mode .b73-quick-button span { color: #2563eb; font-size: 15px; } body.erp-mode .b73-quick-button b { font-size: 9px; }
body.erp-mode .b73-quick-modal { position: fixed; inset: 0; z-index: 520; display: grid; place-items: start center; padding: 10vh 18px; background: rgba(11,26,47,.52); backdrop-filter: blur(5px); }
body.erp-mode .b73-quick-modal.hidden { display: none; }
body.erp-mode .b73-quick-panel { width: min(660px,96vw); overflow: hidden; border: 1px solid rgba(255,255,255,.5); border-radius: 14px; background: #fff; box-shadow: 0 28px 90px rgba(5,17,37,.3); animation: b73QuickIn .22s ease both; }
@keyframes b73QuickIn { from { opacity: 0; transform: translateY(-8px) scale(.985); } to { opacity: 1; transform: none; } }
body.erp-mode .b73-quick-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
body.erp-mode .b73-quick-panel header span { color: #3976ba; font-size: 8px; font-weight: 800; } body.erp-mode .b73-quick-panel h2 { margin: 3px 0 0; color: #18324f; font-size: 20px; }
body.erp-mode .b73-quick-panel header button { width: 32px; min-height: 32px; padding: 0; border: 0; background: #f1f5f9; color: #5f7188; font-size: 17px; }
body.erp-mode .b73-quick-search { padding: 0 18px 10px; } body.erp-mode .b73-quick-search input { width: 100%; height: 42px; font-size: 12px; }
body.erp-mode .b73-quick-routes { max-height: 48vh; overflow: auto; padding: 0 10px 10px; }
body.erp-mode .b73-quick-routes button { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: #fff; text-align: left; box-shadow: none; }
body.erp-mode .b73-quick-routes button:hover, body.erp-mode .b73-quick-routes button.active { background: #f0f6ff; transform: none; }
body.erp-mode .b73-quick-routes i { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: #edf4fd; color: #3474bd; font-size: 9px; font-style: normal; }
body.erp-mode .b73-quick-routes b, body.erp-mode .b73-quick-routes span { display: block; } body.erp-mode .b73-quick-routes b { color: #263e5a; font-size: 11px; } body.erp-mode .b73-quick-routes span { margin-top: 2px; color: #7d8a9c; font-size: 8px; }
body.erp-mode .b73-quick-routes em { color: #66809d; font-size: 8px; font-style: normal; }
body.erp-mode .b73-quick-panel footer { display: flex; gap: 16px; padding: 9px 18px; border-top: 1px solid #e7edf4; background: #f8fafc; color: #8290a2; font-size: 8px; }

@media (max-width: 1400px) {
  body.erp-mode .b73-trend-tools { display: grid; grid-template-columns: minmax(0,1fr) auto auto; justify-content: stretch; flex-basis: 100%; }
  body.erp-mode .b73-segment { grid-column: 1/-1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
  body.erp-mode .b73-segment button { width: 100%; }
  body.erp-mode .b73-scenario-grid { grid-template-columns: 1fr; }
  body.erp-mode .b73-quick-button b { display: none; }
}
@media (max-width: 780px) {
  body.erp-mode .b73-trend-tools { display: flex; overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; padding-bottom: 3px; }
  body.erp-mode .b73-segment { display: flex; flex: 0 0 auto; }
  body.erp-mode .b73-segment button { width: auto; }
  body.erp-mode .b73-trend-tools > label { flex: 0 0 auto; }
  body.erp-mode .b73-play { flex: 0 0 auto; }
  body.erp-mode .b73-chart-stage { height: 270px; overflow-x: auto; }
  body.erp-mode .b73-chart-svg { width: 760px; min-width: 760px; }
  body.erp-mode .b73-chart-tooltip { position: sticky; left: 92px !important; }
  body.erp-mode .b73-trend-insights { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.erp-mode .b73-detail-head, body.erp-mode .b73-detail-context { align-items: flex-start; flex-direction: column; }
  body.erp-mode .b73-detail-context > div { justify-content: flex-start; }
  body.erp-mode .b73-detail-kpis { grid-template-columns: 1fr; }
  body.erp-mode .b73-scenario-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.erp-mode .b73-scenario-list button { grid-template-columns: minmax(0,1fr) auto; }
  body.erp-mode .b73-scenario-list button > span { grid-column: 1/-1; text-align: left; }
  body.erp-mode .b73-quick-button { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body.erp-mode .b73-quick-panel, body.erp-mode .b73-chart-tooltip, body.erp-mode .b73-point { animation: none !important; transition: none !important; }
}
