/* GPS387 v0.9.7A — Guided Dispatcher wizard, palette inherited from main platform. */
#dispatchWizard{z-index:80;align-items:center;padding:22px;overflow-y:auto}
.dispatch-wizard-dialog{width:min(1280px,98vw);max-height:calc(100dvh - 44px);background:var(--paper);color:var(--ink);border:1px solid var(--border);border-radius:20px;box-shadow:0 32px 90px #06152a54;overflow-y:auto;scrollbar-width:thin;display:flex;flex-direction:column}
.dispatch-wizard-head{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;padding:27px 34px 22px;border-bottom:1px solid var(--border)}
.dispatch-wizard-head h2{font-size:27px;line-height:1.2;letter-spacing:-.6px;margin:7px 0 10px;color:var(--ink);font-weight:750}
.dispatch-wizard-head p{margin:0;color:var(--muted);line-height:1.65;font-size:14px;max-width:750px}
.dispatch-wizard-head .fleet-button{min-height:40px;padding:8px}
.dispatch-wizard-steps{padding:16px 32px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;border-bottom:1px solid var(--border)}
.dispatch-wizard-steps button{display:flex;gap:12px;align-items:center;text-align:left;border:1px solid var(--border);border-radius:12px;background:var(--paper-soft);padding:15px;color:var(--muted);font-size:14px;font-weight:650;line-height:1.4;min-width:0}
.dispatch-wizard-steps button span{height:35px;width:35px;border-radius:10px;background:var(--paper);border:1px solid var(--border);flex:none;display:grid;place-items:center;font-size:13px}
.dispatch-wizard-steps button[aria-current=step]{border-color:var(--primary);color:var(--primary);background:var(--primary-light)}
.dispatch-wizard-steps button[aria-current=step] span{background:var(--primary);color:white;border-color:var(--primary)}
.dispatch-wizard-steps button:disabled{opacity:.65}
#dispatchWizard #wizardForm{padding:0;min-width:0}
#dispatchWizard #wizardStage{min-height:330px}
.dispatch-wizard-location-layout{display:grid;grid-template-columns:minmax(350px,.91fr) minmax(0,1.25fr);gap:23px;padding:25px 32px;min-width:0}
.dispatch-wizard-entry,.dispatch-wizard-map-panel{min-width:0;background:var(--paper);border:1px solid var(--border);border-radius:14px;padding:23px}
.dispatch-wizard-entry h3,.dispatch-wizard-map-panel h3{font-size:18px;margin:0 0 19px;font-weight:750;color:var(--ink);display:flex;align-items:center;gap:10px}
.dispatch-wizard-map-panel h3 svg{height:21px;width:21px;color:var(--primary)}
.dispatch-wizard-map-panel>p{color:var(--muted);font-size:13px;line-height:1.75;margin:0 0 15px}
.dispatch-wizard-detail-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
#dispatchWizard .fleet-field{min-width:0;gap:8px}
#dispatchWizard .fleet-field span{font-size:13px;font-weight:650;line-height:1.4;color:var(--ink2)}
#dispatchWizard .fleet-field input,#dispatchWizard .fleet-field select,#dispatchWizard .fleet-field textarea{width:100%;min-width:0;min-height:44px;border:1px solid var(--border);border-radius:9px;padding:11px 13px;background:var(--paper-soft);color:var(--ink);font:inherit;font-size:14px;line-height:1.45}
#dispatchWizard .fleet-field textarea{min-height:70px;resize:vertical}
.dispatch-wizard-notes{margin:14px 0 22px}
.dispatch-wizard-stops-head{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:12px}
.dispatch-wizard-stops-head h3{margin:0}
#dispatchWizard .fleet-button{font-size:13px;min-height:40px;padding:9px 15px}
.dispatch-wizard-stop-list{display:grid;gap:9px;max-height:260px;overflow-y:auto}
.dispatch-wizard-stop-item{display:flex;border:1px solid var(--border);border-radius:10px;overflow:hidden;gap:4px;align-items:center}
.dispatch-wizard-stop-item.selected{border-color:var(--primary);background:var(--primary-light)}
.dispatch-wizard-stop-select{display:flex;align-items:center;gap:11px;text-align:left;flex:1;min-width:0;padding:13px;background:transparent;border:0;color:var(--ink);cursor:pointer}
.dispatch-wizard-stop-num{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:var(--primary-light);color:var(--primary);font-size:13px;font-weight:750;flex:none}
.dispatch-wizard-stop-select>span:nth-child(2){flex:1;min-width:0;display:grid;gap:5px}
.dispatch-wizard-stop-select strong{font-size:13px;font-weight:700}
.dispatch-wizard-stop-select small{font-size:12px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere}
.dispatch-wizard-stop-state{color:var(--primary)}.dispatch-wizard-stop-state svg{width:17px;height:17px}
.dispatch-wizard-stop-item>[data-remove]{margin-right:7px;padding:6px;min-height:30px}
.dispatch-wizard-selected{margin-top:17px;padding:18px;border-radius:11px;border:1px solid var(--border);background:var(--paper-soft);display:grid;gap:12px}
.dispatch-wizard-point-status{color:var(--ink2);display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:13px;line-height:1.5}
.dispatch-wizard-point-status svg{width:17px;height:17px;color:var(--primary)}
.dispatch-wizard-point-status small{width:100%;margin-left:25px;color:var(--muted);font-size:12px}
.dispatch-wizard-map{height:455px;min-height:290px;overflow:hidden;border:1px solid var(--border);background:var(--paper-soft);border-radius:12px}
.dispatch-wizard-search{min-height:46px;margin-bottom:12px}
.dispatch-wizard-search gmp-place-autocomplete{width:100%;font-size:14px}
.dispatch-wizard-map-message{font-size:12px;color:var(--muted);line-height:1.65;margin-top:13px}
#dispatchWizard .fleet-dialog-error{font-size:13px;line-height:1.55;padding:0 34px;margin:0;min-height:20px}
.dispatch-wizard-footer{position:sticky;bottom:0;background:var(--paper);border-top:1px solid var(--border);z-index:4;display:flex;justify-content:space-between;align-items:center;gap:14px;padding:20px 34px}
.dispatch-wizard-footer>div{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.dispatch-wizard-resources,.dispatch-wizard-review{padding:30px 36px 40px;max-width:1050px;margin:auto}
.dispatch-wizard-resources>header,.dispatch-wizard-review>header{display:flex;align-items:flex-start;gap:16px;margin-bottom:25px}
.dispatch-wizard-resources>header>svg,.dispatch-wizard-review>header>svg{width:37px;height:37px;color:var(--primary);flex:none}
.dispatch-wizard-resources h3,.dispatch-wizard-review h3{font-size:23px;letter-spacing:-.4px;margin:0 0 9px;font-weight:750;color:var(--ink)}
.dispatch-wizard-resources header p,.dispatch-wizard-review header p{font-size:14px;line-height:1.75;color:var(--muted);margin:0;max-width:820px}
.dispatch-wizard-resource-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin-bottom:14px}
.dispatch-wizard-resource-card{display:flex;align-items:center;gap:14px;border:1px solid var(--border);border-radius:12px;padding:19px;cursor:pointer;min-height:85px;color:var(--ink)}
.dispatch-wizard-resource-card:has(input:checked){border-color:var(--primary);background:var(--primary-light)}
.dispatch-wizard-resource-card input,.dispatch-wizard-confirm input{width:20px;height:20px;accent-color:var(--primary);flex:none}
.dispatch-wizard-resource-info{display:grid;gap:7px;flex:1;min-width:0}
.dispatch-wizard-resource-info strong{font-size:16px;font-weight:700}.dispatch-wizard-resource-info small{font-size:13px;color:var(--muted);line-height:1.5}
.dispatch-wizard-resource-card em{font-style:normal;font-size:12px;color:var(--primary);font-weight:650}
.dispatch-wizard-no-pairs{font-size:14px;color:var(--muted);background:var(--paper-soft);padding:25px;border-radius:12px}
.dispatch-wizard-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.dispatch-wizard-summary>div{padding:17px 19px;border:1px solid var(--border);background:var(--paper-soft);border-radius:10px;min-width:0;display:grid;gap:8px}
.dispatch-wizard-summary span{font-size:12px;color:var(--muted)}.dispatch-wizard-summary strong{font-size:15px;color:var(--ink);overflow-wrap:anywhere;line-height:1.55}
.dispatch-wizard-review-stops{margin-top:25px}
.dispatch-wizard-review-stops h4{font-size:17px;margin:0 0 13px}
.dispatch-wizard-review-stops article{display:flex;align-items:flex-start;gap:13px;border-bottom:1px solid var(--border);padding:13px 0}
.dispatch-wizard-review-stops article>span{border-radius:50%;width:30px;height:30px;display:grid;place-items:center;background:var(--primary-light);color:var(--primary);font-size:13px;font-weight:700;flex:none}
.dispatch-wizard-review-stops article div{display:grid;gap:5px}
.dispatch-wizard-review-stops article strong{font-size:14px;overflow-wrap:anywhere}.dispatch-wizard-review-stops article small{font-size:12px;color:var(--muted)}
.dispatch-wizard-warning{padding:17px;border:1px solid var(--border);border-radius:10px;background:var(--paper-soft);display:flex;gap:12px;font-size:13px;line-height:1.6}
.dispatch-wizard-warning svg{width:18px;height:18px;flex:none;color:var(--primary)}
.dispatch-wizard-confirm{display:flex;gap:12px;align-items:flex-start;font-size:14px;line-height:1.65;margin-top:25px;padding:20px;border:1px solid var(--border);border-radius:10px;cursor:pointer}
#dispatchWizard :is(button,input,select,textarea):focus-visible{outline:2px solid var(--primary);outline-offset:2px}
@media(max-width:1060px){.dispatch-wizard-location-layout{grid-template-columns:1fr;padding:19px}.dispatch-wizard-map{height:355px}.dispatch-wizard-resource-list{grid-template-columns:1fr}}
@media(max-width:620px){#dispatchWizard{padding:6px}.dispatch-wizard-dialog{width:100%;max-height:calc(100dvh - 12px);border-radius:14px}.dispatch-wizard-head{padding:19px}.dispatch-wizard-head h2{font-size:21px}.dispatch-wizard-head p{font-size:13px}.dispatch-wizard-steps{padding:10px;gap:4px}.dispatch-wizard-steps button{flex-direction:column;align-items:flex-start;font-size:11px;gap:5px;padding:10px 5px}.dispatch-wizard-steps button span{height:29px;width:29px;font-size:11px}.dispatch-wizard-location-layout{padding:10px;gap:10px}.dispatch-wizard-entry,.dispatch-wizard-map-panel{padding:14px}.dispatch-wizard-detail-fields{grid-template-columns:1fr}.dispatch-wizard-map{height:290px}.dispatch-wizard-resources,.dispatch-wizard-review{padding:20px 15px}.dispatch-wizard-summary{grid-template-columns:1fr}.dispatch-wizard-footer{padding:12px;flex-wrap:wrap}.dispatch-wizard-footer>div{flex:1}.dispatch-wizard-footer .fleet-button{font-size:12px;padding:8px}#dispatchWizard .fleet-dialog-error{padding:0 14px}}

/* GPS387 0.9.8A — explainable and readable resource recommendations */
.dispatch-suggestion-note{display:flex;align-items:flex-start;gap:10px;font-size:13px;line-height:1.7;padding:14px 17px;background:var(--paper-soft);border-left:3px solid var(--primary);border-radius:9px;color:var(--ink2);margin:0 0 17px}
.dispatch-suggestion-note svg{width:18px;height:18px;flex:none;color:var(--primary);margin-top:2px}
.dispatch-wizard-resource-list{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.dispatch-wizard-resource-card{align-items:flex-start;padding:20px;gap:12px}
.dispatch-wizard-resource-card>input{margin-top:5px}
.dispatch-wizard-resource-card em{font-size:11px;padding:5px 8px;background:var(--paper-soft);border-radius:6px;white-space:normal}
.dispatch-suggestion-facts{display:grid;gap:7px;padding-top:11px;border-top:1px solid var(--border);margin-top:7px}
.dispatch-suggestion-facts small{font-size:12px;line-height:1.55;color:var(--muted)}
.dispatch-suggestion-facts small:first-child{color:var(--ink);font-weight:700}
.dispatch-scenario{margin-top:21px;border:1px solid var(--border);background:var(--paper-soft);border-radius:12px;padding:19px}
.dispatch-scenario summary{cursor:pointer;font-size:15px;font-weight:700;display:flex;align-items:center;gap:9px;color:var(--ink)}
.dispatch-scenario summary svg{width:18px;height:18px;color:var(--primary)}
.dispatch-scenario-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:18px 0}
.dispatch-scenario-total{font-size:17px;font-weight:750;color:var(--ink);margin:12px 0}
.dispatch-scenario-disclaimer{font-size:12px;line-height:1.7;color:var(--muted);padding:10px 0}
@media(max-width:880px){.dispatch-wizard-resource-list{grid-template-columns:1fr}}
@media(max-width:600px){.dispatch-scenario-inputs{grid-template-columns:1fr}.dispatch-wizard-resource-card{padding:14px}}

/* v0.9.9A: Road ETA is a single opt-in analysis panel, never a route approval */
.dispatch-road-panel{margin-top:22px;padding:23px;border:1px solid var(--border);background:var(--paper);border-radius:14px;display:grid;gap:15px}
.dispatch-road-panel>header h4{font-size:19px;color:var(--ink);font-weight:750;display:flex;align-items:center;gap:10px;margin:0 0 8px}
.dispatch-road-panel>header h4 svg{width:21px;height:21px;color:var(--primary)}
.dispatch-road-panel>header p{color:var(--muted);font-size:13px;line-height:1.65;margin:0}
.dispatch-road-fields{display:grid;grid-template-columns:1fr;gap:10px}
.dispatch-road-consent{display:flex;align-items:flex-start;gap:12px;line-height:1.6;font-size:13px;cursor:pointer;padding:10px 0}
.dispatch-road-consent input{width:19px;height:19px;accent-color:var(--primary);flex:none;margin-top:2px}
.dispatch-road-panel [hidden]{display:none!important}
.dispatch-road-result{border:1px solid var(--border);background:var(--paper-soft);border-radius:11px;padding:17px 19px;color:var(--muted);font-size:13px;line-height:1.65;min-height:55px}
.dispatch-road-result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin-bottom:15px}
.dispatch-road-result-grid>div{display:grid;gap:7px;padding:14px 15px;border-radius:9px;background:var(--paper);border:1px solid var(--border)}
.dispatch-road-result-grid span{font-size:12px;color:var(--muted)}
.dispatch-road-result-grid strong{font-size:17px;color:var(--ink)}
.dispatch-road-result p{margin:8px 0;font-size:13px}
.dispatch-road-panel #roadCalculate{font-size:14px;min-height:44px}
@media(max-width:620px){.dispatch-road-panel{padding:16px}.dispatch-road-result-grid{grid-template-columns:1fr}.dispatch-road-result-grid>div{padding:10px}}

/* v0.9.15 — one coherent operational decision instead of two route calculators. */
.dispatch-unified-widget{margin-top:22px;padding:24px;border:1px solid var(--border);border-radius:15px;display:grid;gap:20px;background:var(--paper);min-width:0}
.dispatch-unified-widget>header h4{margin:0 0 8px;display:flex;align-items:center;gap:11px;font-size:21px;font-weight:760;color:var(--ink)}
.dispatch-unified-widget>header h4 svg{width:24px;height:24px;color:var(--primary)}
.dispatch-unified-widget>header p{font-size:14px;line-height:1.75;max-width:770px;color:var(--muted);margin:0}
.dispatch-unified-corridor{border:1px solid var(--border);padding:17px 20px;background:var(--paper-soft);border-radius:11px;display:grid;gap:7px}
.dispatch-unified-corridor>span{color:var(--muted);font-size:12px}
.dispatch-unified-corridor strong{color:var(--ink);font-size:15px;font-weight:750;line-height:1.55;overflow-wrap:anywhere}
.dispatch-unified-setup{display:grid;grid-template-columns:minmax(230px,.85fr) minmax(0,1.25fr);align-items:start;gap:20px}
.dispatch-unified-setup>.fleet-field{min-width:0}
.dispatch-unified-price{border:1px solid var(--border);padding:17px 20px;border-radius:11px;min-width:0}
.dispatch-unified-price h5{font-size:15px;font-weight:750;color:var(--ink);margin:0 0 14px}
.dispatch-unified-prices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.dispatch-unified-price p{font-size:12px;line-height:1.7;color:var(--muted);margin:12px 0 0}
.dispatch-unified-action{display:grid;gap:12px;padding:17px 20px;border:1px solid var(--border);border-radius:11px;background:var(--paper-soft)}
.dispatch-unified-action .dispatch-road-consent{padding:4px 0}
.dispatch-unified-action p{margin:0;line-height:1.7;font-size:12px;color:var(--muted)}
.dispatch-unified-action .fleet-button.primary{min-height:49px;font-size:15px;font-weight:750;justify-content:center}
.dispatch-unified-action [hidden]{display:none!important}
.dispatch-unified-result{background:var(--paper);border:1px solid var(--border);border-radius:11px;min-height:90px;padding:20px;display:grid;gap:12px;color:var(--ink)}
.dispatch-unified-message{font-size:14px;line-height:1.7;color:var(--muted);margin:auto 0}
.dispatch-unified-result-header{display:flex;align-items:center;justify-content:space-between;gap:15px}
.dispatch-unified-result-header strong{font-size:17px;font-weight:760}
.dispatch-unified-result-header span{font-size:12px;color:var(--muted)}
.dispatch-unified-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.dispatch-unified-result-row{border:1px solid var(--border);border-radius:11px;background:var(--paper-soft);padding:17px 18px;display:grid;gap:13px}
.dispatch-unified-result-row>div{display:grid;gap:6px}
.dispatch-unified-result-row>div+div{border-top:1px solid var(--border);padding-top:13px}
.dispatch-unified-result-row span,.dispatch-unified-totals span{color:var(--muted);font-size:12px}
.dispatch-unified-result-row strong{color:var(--ink);font-size:21px;font-weight:750;overflow-wrap:anywhere}
.dispatch-unified-result-row small{font-size:12px;color:var(--muted)}
.dispatch-unified-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;border-top:1px solid var(--border);padding-top:17px}
.dispatch-unified-totals>div{background:var(--paper-soft);border:1px solid var(--border);padding:17px 19px;border-radius:11px;display:grid;gap:9px}
.dispatch-unified-totals>div strong{font-size:23px;font-weight:800;color:var(--primary)}
.dispatch-unified-alert{border-left:3px solid var(--primary);background:var(--paper-soft);border-radius:8px;padding:11px 14px;font-size:13px;line-height:1.7;margin:0;display:flex;align-items:flex-start;gap:8px}
.dispatch-unified-alert svg{width:17px;height:17px;flex:none;margin-top:3px}
.dispatch-unified-note{font-size:12px;line-height:1.7;color:var(--muted);margin:0}
.dispatch-wizard-resources{max-width:1130px}
@media(max-width:770px){.dispatch-unified-setup{grid-template-columns:1fr}.dispatch-unified-results,.dispatch-unified-totals{grid-template-columns:1fr}}
@media(max-width:600px){.dispatch-unified-widget{padding:16px;gap:15px}.dispatch-unified-price,.dispatch-unified-action,.dispatch-unified-result{padding:14px}.dispatch-unified-prices{grid-template-columns:1fr}.dispatch-unified-result-row strong{font-size:19px}.dispatch-unified-totals strong{font-size:20px}}

/* v0.9.20B: map-first stop confirmation (also works without Places). */
.dispatch-wizard-drag-hint{display:flex;align-items:flex-start;gap:8px;color:var(--muted);margin:0;font-size:12px;line-height:1.65}
.dispatch-wizard-drag-hint svg{width:16px;height:16px;flex:none;margin-top:2px;color:var(--primary)}
#dispatchWizard #wizardConfirmPoint{justify-content:center;min-height:44px;font-weight:750}
.dispatch-wizard-map-panel .dispatch-wizard-map{cursor:crosshair}

/* GPS387 v0.9.21A: compact transport parties + cost history */
.dispatch-wizard-companies{margin:18px 0 12px;padding:15px;border:1px solid var(--border);border-radius:12px;background:var(--paper-soft)}
.dispatch-wizard-companies summary{display:flex;align-items:center;gap:9px;font-weight:730;cursor:pointer;font-size:14px}
.dispatch-wizard-companies summary svg{width:18px;height:18px;color:var(--primary)}
.dispatch-wizard-companies p{font-size:12px;color:var(--muted);line-height:1.65;margin:12px 0}
.dispatch-wizard-company-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.dispatch-wizard-company-grid .fleet-field select{width:100%;min-width:0}
.dispatch-wizard-company-new{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:center;margin-top:12px}
.dispatch-wizard-company-new input{min-width:0;width:100%;padding:10px;border:1px solid var(--border);border-radius:9px;background:var(--paper);color:var(--ink);font:inherit}
.dispatch-wizard-company-error{color:var(--danger,#b42318)!important;min-height:0}
.dispatch-calc-history{border:1px solid var(--border);border-radius:12px;padding:17px 20px;min-width:0}
.dispatch-calc-history h5{margin:0 0 12px;display:flex;align-items:center;gap:8px;font-size:16px;font-weight:750;color:var(--ink)}
.dispatch-calc-history h5 svg{width:17px;height:17px;color:var(--primary)}
.dispatch-calc-history>p{font-size:12px;color:var(--muted);line-height:1.55;margin:10px 0 0}
.dispatch-calc-entry{display:grid;grid-template-columns:1fr auto;gap:5px 15px;padding:12px 0;border-top:1px solid var(--border)}
.dispatch-calc-entry>span{font-size:12px;color:var(--ink2)}
.dispatch-calc-entry>strong{font-size:14px;font-weight:750;color:var(--ink)}
.dispatch-calc-entry small{grid-column:1/-1;color:var(--muted);font-size:12px;line-height:1.5}
.dispatch-calc-empty{font-size:13px;color:var(--muted)}
@media(max-width:680px){.dispatch-wizard-company-grid{grid-template-columns:1fr}.dispatch-wizard-company-new{grid-template-columns:1fr}}
