/* Milebs v0.5.5 — mapa operacional em primeiro plano */
.launch-warning{position:fixed;inset:14px 14px auto;z-index:10000;max-width:900px;margin:auto;padding:16px 20px;border:2px solid #a94b3c;border-radius:12px;background:#fff3ef;color:#73372d;box-shadow:0 12px 35px #182f3a35;font:600 14px/1.7 system-ui,sans-serif}.launch-warning code{padding:2px 6px;border-radius:5px;background:#f3dfd9;color:#632e25;font:600 12px/1.6 ui-monospace,monospace}
.map-route-planning{overflow:visible;border:1px solid #dce6e7;border-radius:18px;background:#f6f9fa;box-shadow:0 18px 54px #19394312}
.route-planning-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:26px 30px 22px;background:linear-gradient(112deg,#fff 0%,#f1f8f5 100%);border-bottom:1px solid #e1e9e9;border-radius:18px 18px 0 0}
.route-planning-heading h2{margin:0;color:#1e3944;font-size:27px;letter-spacing:-.045em;line-height:1.2}
.route-planning-heading>div>p:last-child{margin:7px 0 0;color:#62787d;font-size:13px}
.route-planning-heading .eyebrow{margin:0 0 7px;color:#387266;font-size:9px;font-weight:750;letter-spacing:.14em}
.route-engine-badge{flex:0 0 auto;display:inline-flex;align-items:center;gap:9px;min-height:38px;padding:0 13px;border:1px solid #dce7e3;border-radius:999px;background:#fff;color:#405d60;font-size:11px;font-weight:680;box-shadow:0 2px 8px #15353b09}
.route-engine-badge i{width:9px;height:9px;border-radius:50%;background:#a4aeae;box-shadow:0 0 0 3px #a4aeae20}
.route-engine-badge.is-available{border-color:#add2c0;color:#24624f}.route-engine-badge.is-available i{background:#35956f;box-shadow:0 0 0 3px #35956f20}
.route-engine-badge.is-unavailable{border-color:#e7d3a6;color:#765c2a}.route-engine-badge.is-unavailable i{background:#d29b3e;box-shadow:0 0 0 3px #d29b3e20}
.route-engine-badge.is-calculating i{background:#378a7c;animation:route-pulse 1s ease-in-out infinite alternate}
@keyframes route-pulse{to{box-shadow:0 0 0 7px #378a7c12}}
.route-workspace{display:grid;grid-template-columns:minmax(290px,350px) minmax(0,1fr);gap:20px;padding:20px 22px 22px;align-items:start}
.route-controls{display:grid;gap:12px;min-width:0}
.route-control-block{min-width:0;padding:16px;border:1px solid #dfe8e9;border-radius:13px;background:#fff;box-shadow:0 3px 12px #15353b08}
.route-step-label{display:flex;align-items:center;gap:9px;margin:0 0 15px;color:#243e46;font-size:13px;font-weight:730}
.route-step-label>span{display:grid;place-items:center;width:27px;height:27px;border-radius:9px;background:#e9f4ef;color:#317366;font-size:10px;letter-spacing:.04em}
.route-form-grid{grid-template-columns:1fr 1fr;gap:12px;margin:0}
.route-form-grid label{display:block;margin:0 0 6px;color:#4b646b;font-size:10px;font-weight:650}
.route-form-grid select,.route-form-grid input{min-height:41px;border-color:#d5e0e1;border-radius:8px;background:#fbfcfc;font-size:12px}
.route-form-grid small{display:block;color:#72858a;font-size:9px;line-height:1.55;margin-top:5px}
.route-origin-summary{margin:13px 0 0;padding:11px 12px;border:1px solid #d7ebe1;border-left:3px solid #58a58b;border-radius:8px;background:#f4faf6;color:#3d6659;font-size:10px;line-height:1.55;overflow-wrap:anywhere}
.route-provider-status{margin:10px 0 0;color:#64797d;font-size:10px;line-height:1.55}.route-provider-status.error{color:#8a6329}.route-provider-status.located{color:#286b52}.route-engine-retry{margin-top:7px;padding:5px 8px;border:1px solid #c9d9d9;border-radius:6px;background:#fff;color:#355d60;font-size:10px;cursor:pointer}.route-engine-retry:hover{background:#edf5f3}
.route-stops-block>.form-help{margin:-6px 0 11px;color:#708186;font-size:10px;line-height:1.6}
.route-company-groups{display:grid;gap:10px}.route-operator-group{padding:12px;border:1px solid #e2e9e9;border-radius:10px;background:#fbfcfc;box-shadow:none}
.route-operator-group>header{margin-bottom:12px}.route-operator-group>header h3{font-size:13px}.route-operator-group>header p{font-size:9px}
.route-select-all-control{margin:0 0 8px;padding:8px 9px;border:1px solid #e2e9e7;border-radius:8px;background:#fff;font-size:10px}
.route-company-search{max-width:none;margin:8px 0}.route-company-search input{min-height:39px;border-radius:8px;background:#fff;font-size:11px}
.route-selection-tools{justify-content:flex-start;margin:8px 0}.route-selection-tools>span{flex-basis:100%;margin:0 0 2px;font-size:9px}.route-selection-tools button{min-height:32px;border-radius:7px;font-size:9px}
.route-company{padding:10px;border-radius:8px;background:#fff}.route-company:hover{border-color:#a9c9bd;background:#f7fbf9}.route-company strong{font-size:10px}.route-company small{font-size:9px;line-height:1.5}
.route-operator-appointments{font-size:10px}.route-operator-appointments li{line-height:1.55}
.route-primary-action{position:sticky;bottom:12px;z-index:5;display:grid;gap:7px;padding:12px;border:1px solid #dce8e4;border-radius:12px;background:#ffffffef;box-shadow:0 8px 28px #17383e1a;backdrop-filter:blur(10px)}
.route-primary-action button{width:100%;min-height:48px;border-radius:9px;font-size:13px;font-weight:700;letter-spacing:.005em}.route-primary-action small{text-align:center;color:#718287;font-size:9px;line-height:1.45}
.route-map-panel{position:sticky;top:12px;min-width:0;overflow:hidden;border:1px solid #dbe5e6;border-radius:15px;background:#fff;box-shadow:0 8px 30px #17383e12}
.route-map-header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 19px;border:0;border-bottom:1px solid #e8eeee;background:#fff}
.route-map-header h3{margin:0;color:#203c45;font-size:16px;letter-spacing:-.02em}.route-map-header p:last-child{margin:4px 0 0;color:#718287;font-size:10px}.route-map-header .eyebrow{margin:0 0 5px;color:#478070;font-size:8px;font-weight:750;letter-spacing:.14em}
.route-map-header button{min-height:37px;border-radius:8px;font-size:10px}
.route-preview-operators{padding:11px 15px 8px}.route-preview-operators [role=tab]{min-height:34px;padding:8px 12px;font-size:10px}
#route-preview-map{height:clamp(500px,68vh,790px);min-height:430px;background:#e8efed;z-index:1}
.route-preview-status{min-height:40px;padding:11px 16px;background:#f7faf9;font-size:10px}.route-preview-legend{padding:11px 16px;border-bottom:1px solid #e9eeee;font-size:9px}
.route-results{display:grid;gap:12px;min-height:72px;margin:0;padding:16px;background:#f7f9f9;border:0}
.route-results:empty::before{content:"Selecione empresas no painel ao lado. O resumo e a sequência aparecem aqui após o cálculo.";display:block;padding:12px 14px;border:1px dashed #d4e0e0;border-radius:9px;color:#718186;font-size:10px;line-height:1.6}
.route-results-summary{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.route-results-summary article{min-height:69px;padding:11px;border-color:#e0e8e8;border-radius:9px;background:#fff;box-shadow:none}
.route-results-summary span{font-size:8px;line-height:1.45}.route-results-summary strong{font-size:18px;color:#264f55}
.route-result-card{padding:15px;border-color:#e1e8e8;border-radius:11px;box-shadow:none}.route-result-card>header{align-items:center}.route-visit-sequence li{padding:12px;border-radius:9px}.route-visit-sequence li:hover{border-color:#b0ccc1}
.route-stop-focus{min-height:34px;font-size:11px}.route-visit-sequence li>small{font-size:10px}.route-visit-sequence li>span{font-size:10px}
.route-instruction-field{font-size:9px}.route-instruction-field textarea{min-height:56px;border-radius:8px;font-size:10px}
.route-metrics,.route-comparison{border-radius:8px;font-size:10px;line-height:1.7}
.saved-route-section{margin:0 22px 22px;border-radius:13px;box-shadow:0 3px 14px #17383e08}
.saved-route-section>header{padding:15px 18px}.saved-route-section h3{font-size:14px}.saved-route-section .v04-result{padding:0 18px 14px}
.route-engine-badge:focus-visible,.route-map-panel button:focus-visible,.route-controls button:focus-visible,.route-controls input:focus-visible,.route-controls select:focus-visible{outline:3px solid #53a18b;outline-offset:2px}
.record-form-section{grid-column:1/-1;min-width:0;padding:16px;border:1px solid #e0e8e8;border-radius:11px;background:#fff}
.record-form-section>header{display:flex;align-items:center;gap:10px;margin:0 0 13px;padding:0 0 11px;border-bottom:1px solid #edf1f1}
.record-form-section>header>span{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#eaf4f0;color:#317366;font-size:9px;font-weight:750}
.record-form-section h3{margin:0;color:#29454c;font-size:13px}.record-form-section>header p{margin:3px 0 0;color:#738388;font-size:9px}.record-form-section .form-grid{gap:13px}
.record-form-section .field input,.record-form-section .field select,.record-form-section .field textarea{min-height:41px;border-radius:8px;background:#fcfdfd}
.record-form-section .form-section-note{border-radius:8px}
#record-dialog{width:min(790px,calc(100vw - 32px));max-height:min(92dvh,900px);padding:0;overflow:auto;overscroll-behavior:contain}
#record-dialog #record-form{padding:24px}
#record-dialog .dialog-heading{position:sticky;top:-24px;z-index:6;margin:-24px -24px 17px;padding:19px 24px 13px;background:#fff;border-bottom:1px solid #e7eded}
#record-dialog .dialog-actions{position:sticky;bottom:-24px;z-index:6;margin:18px -24px -24px;padding:13px 24px;background:#fffffff2;backdrop-filter:blur(10px)}
#location-picker-dialog #location-picker-map{height:min(58dvh,560px);min-height:300px;border:1px solid #d8e3e4;border-radius:12px}
@media(max-width:1120px){.route-workspace{grid-template-columns:minmax(270px,315px) minmax(0,1fr);gap:14px;padding:15px}.route-control-block{padding:13px}#route-preview-map{height:clamp(430px,62vh,650px)}}
@media(max-width:820px){.route-workspace{grid-template-columns:minmax(0,1fr);padding:13px;gap:12px}.route-map-panel{position:static;grid-row:1}.route-controls{grid-row:2}.route-planning-heading{padding:21px 18px}.route-planning-heading h2{font-size:23px}#route-preview-map{height:52vh;min-height:370px}.saved-route-section{margin:0 13px 14px}}
@media(max-width:560px){.route-planning-heading{align-items:flex-start;flex-direction:column;gap:13px;padding:17px 14px}.route-planning-heading h2{font-size:21px}.route-planning-heading>div>p:last-child{font-size:11px}.route-engine-badge{min-height:34px;font-size:10px}.route-workspace{padding:10px;gap:10px}.route-map-panel{border-radius:12px}.route-map-header{align-items:flex-start;padding:13px;gap:8px}.route-map-header h3{font-size:14px}.route-map-header button{min-height:40px;padding:8px;font-size:9px}#route-preview-map{height:50vh;min-height:340px;max-height:500px}.route-control-block{padding:12px}.route-form-grid{grid-template-columns:1fr 1fr;gap:9px}.route-form-grid select,.route-form-grid input{min-height:42px}.route-primary-action{bottom:6px;padding:9px}.route-primary-action button{min-height:48px}.route-results{padding:10px}.route-results-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.route-results-summary article{min-height:61px}.route-results-summary article:last-child{grid-column:auto}.route-result-card{padding:11px}.route-visit-sequence li{grid-template-columns:1fr}.saved-route-section{margin:0 10px 12px}.saved-route-section li{align-items:flex-start;flex-direction:column}.saved-route-section li button{align-self:flex-start}
#record-dialog #record-form{padding:17px}.record-form-section{padding:12px}.record-form-section .form-grid{grid-template-columns:1fr;gap:11px}.record-form-section .wide{grid-column:1}.record-form-section .form-section-note{grid-column:1}.record-form-section .check-label{grid-column:1}.record-form-section .field.wide{grid-column:1}.record-form-section .field input,.record-form-section .field select,.record-form-section .field textarea{font-size:16px}#record-dialog .dialog-heading{top:-17px;margin:-17px -17px 14px;padding:14px 17px 11px}#record-dialog .dialog-actions{bottom:-17px;margin:15px -17px -17px;padding:11px 17px}#record-dialog .dialog-actions button{min-height:44px}
}
@media(max-width:360px){.route-form-grid{grid-template-columns:1fr}.route-map-header button{max-width:125px;white-space:normal}.route-results-summary article{padding:9px}.route-results-summary strong{font-size:16px}}
@media(prefers-reduced-motion:reduce){.route-engine-badge.is-calculating i{animation:none}}
