/* Routing-first QA polish. Loaded by the routing module so production remains untouched. */
#profile-editor{padding-bottom:8px}
#save-profile{position:sticky;bottom:8px;z-index:12;width:100%;margin-top:10px;border-color:#2d7bad;background:linear-gradient(180deg,#2f83bb,#1e628f);box-shadow:0 10px 26px rgba(0,0,0,.34)}
#save-profile:hover:not(:disabled),#save-profile:focus-visible:not(:disabled){background:linear-gradient(180deg,#4396ca,#2673a5)}
.primary-action.permit-action{border-color:#6c8fff;background:linear-gradient(180deg,#4388f7,#245dc5);color:#fff;box-shadow:0 8px 22px rgba(44,125,246,.25)}
.primary-action.permit-action:hover:not(:disabled),.primary-action.permit-action:focus-visible:not(:disabled){background:linear-gradient(180deg,#5b9aff,#316ed5)}
.permit-check:has(input:checked){border-color:#bf6a2b;background:rgba(244,151,43,.13)}

#route-review.guidance-blocked{border-color:#8f3b49;box-shadow:0 0 0 2px rgba(215,25,63,.12),0 14px 36px rgba(0,0,0,.24)}
#route-review.guidance-blocked .review-check{border-color:#8f3b49;background:rgba(215,25,63,.11);color:#ffc4ca}
#route-review.guidance-blocked .review-check::after{content:'Critical route notices must be resolved before live guidance.';display:block;grid-column:2;margin-top:4px;color:#ffadb6;font-size:10px;font-weight:900}
#route-review.guidance-blocked #start-guidance,#route-review:has(.route-notice.critical) #start-guidance{pointer-events:none;opacity:.42;filter:saturate(.35)}
#route-review.guidance-blocked #route-confirmed,#route-review:has(.route-notice.critical) #route-confirmed{pointer-events:none}
.route-interlock-banner{margin:12px 0;padding:11px 13px;border:2px solid #e85a68;border-radius:10px;background:#4c1520;color:#fff0f1;font-size:11px;font-weight:950;line-height:1.45;letter-spacing:.02em}
.route-interlock-banner[hidden]{display:none}

.route-cross-check{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:12px 0;padding:12px;border:1px solid #476174;border-radius:12px;background:#091c29}
.route-cross-check>div{display:grid;gap:3px;min-width:0}.route-cross-check small{color:#8fb7d2;font-size:9px;font-weight:950;letter-spacing:.13em}.route-cross-check strong{font-size:13px}.route-cross-check p{margin:2px 0 0;color:#afc3d0;font-size:10px;line-height:1.45}.route-cross-check.good{border-color:#267d59;background:rgba(32,198,122,.08)}.route-cross-check.warning{border-color:#806a2c;background:rgba(244,189,43,.07)}.route-cross-check.bad{border-color:#9a3d4b;background:rgba(215,25,63,.11)}.route-cross-check.bad p{color:#ffc1c7}

.route-card label{position:relative}
.stop-suggestions{position:absolute;z-index:780;left:0;right:0;top:calc(100% - 7px);display:grid;max-height:310px;overflow:auto;padding:6px;border:1px solid #41677f;border-radius:12px;background:rgba(5,19,29,.99);box-shadow:0 18px 42px rgba(0,0,0,.48)}
.stop-suggestion{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:54px;padding:9px 10px;border:0;border-bottom:1px solid #213f52;border-radius:7px;background:transparent;text-align:left}
.stop-suggestion:last-child{border-bottom:0}.stop-suggestion:hover,.stop-suggestion:focus-visible,.stop-suggestion.active{background:#173b54;outline:none}.stop-suggestion span{display:grid;min-width:0}.stop-suggestion strong{overflow:hidden;text-overflow:ellipsis;color:#f5fbff;font-size:12px;white-space:nowrap}.stop-suggestion small{margin-top:3px;color:#91a9b8;font-size:10px}.stop-suggestion b{min-width:max-content;padding:4px 7px;border:1px solid #247a56;border-radius:999px;color:#aaf0cb;font-size:9px;text-transform:uppercase}.stop-suggestion.broad b{border-color:#806b2c;color:#ffe18b}.stop-suggestion-note{padding:13px;color:#aec2cf;font-size:11px;line-height:1.45}

.drive-stats{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.provider-limit-stat{border-color:#d8dde4!important;background:#f7f8fa!important;color:#111!important}
.provider-limit-stat small,.provider-limit-stat span{color:#333!important}.provider-limit-stat strong{color:#111!important}
.provider-lane-guidance{display:block;margin-top:5px;color:#9dd4ff;font-size:11px;font-weight:800;line-height:1.35}
.route-progress-held .drive-hud{box-shadow:inset 0 0 0 3px #f4bd2b,0 14px 42px rgba(0,0,0,.45)}
.route-progress-held #drive-warning{border:2px solid #f4bd2b;background:#4b3910;color:#fff2b0;font-weight:950}

@media(max-width:820px){
 .routing-layout{display:flex;flex-direction:column;min-height:0}
 .planner{order:1;width:100%;max-height:none;overflow:visible;padding-bottom:28px}
 .map-stage{order:2;width:100%;height:62vh;min-height:520px;max-height:720px}
 .planner-card,.focus-banner,.sponsor-card{max-width:720px;margin-left:auto;margin-right:auto}
}
@media(max-width:520px){
 .two-column,.profile-grid{grid-template-columns:1fr}
 .profile-grid label{font-size:12px}
 .input-row{grid-template-columns:1fr}
 .input-row button{width:100%;min-height:46px}
 .card-heading,.readiness-title{align-items:stretch;flex-direction:column}
 .card-heading .icon-button{align-self:flex-end;margin-top:-48px}
 .button-row{display:grid;grid-template-columns:1fr}
 .route-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
 .drive-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .route-cross-check{display:grid}.route-cross-check .status-chip{justify-self:start}
 #save-profile{bottom:max(8px,env(safe-area-inset-bottom))}
 .stop-suggestions{position:relative;top:auto;margin-top:4px;max-height:280px}
}
@media(max-width:380px){
 .route-metrics{grid-template-columns:1fr}
 .mode-switch{grid-template-columns:1fr}
 .mode-switch button,.mode-switch a{min-height:42px}
}
