/* Light, readable route controls in both load drawer sizes. */
#detail .sr-route-column{background:#fff;color:#172b4d;padding-bottom:22px;container-type:inline-size}
#detail .sr-route-column svg,body .sr-dialog svg{width:18px;height:18px;flex:0 0 auto;vertical-align:middle}
#detail .sr-metrics{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;margin:16px 0 10px;align-items:stretch}
#detail .sr-metrics>div{background:#e6f1fc;border-radius:9px;padding:12px 14px;display:flex;flex-direction:column;gap:3px;min-width:0}
#detail .sr-metrics strong{font-size:23px;font-weight:750;color:#216fbc;line-height:1.2}
#detail .sr-metrics span{font-size:12px;color:#52687f}
#detail .sr-metrics>a,#detail .sr-map-button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:8px;color:#1d65b1;background:none;border:0;text-decoration:none;font-size:12px;white-space:nowrap;cursor:pointer}
#detail .sr-sheet{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;background:#f4f6f9;border-radius:7px;margin-bottom:18px;border:1px solid #e7edf3}
#detail .sr-sheet>span,#detail .sr-sheet>div{display:flex;align-items:center;gap:8px;color:#334155;font-size:13px}
#detail .sr-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:32px;height:32px;padding:6px;border:1px solid transparent;border-radius:6px;background:transparent;color:#236fbf;cursor:pointer}
#detail .sr-icon>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#detail .sr-icon:hover{background:#e2edfb;border-color:#b8d3f0}
#detail .sr-trip{background:#f6f8fa;border:1px solid #e1e7ef;border-radius:10px;overflow:hidden;margin:0 0 18px}
#detail .sr-trip>summary{display:flex;align-items:center;gap:8px;list-style:none;padding:12px;color:#213954;font-size:12px;cursor:pointer}
#detail .sr-trip>summary::-webkit-details-marker,#detail .sr-stop-details>summary::-webkit-details-marker{display:none}
#detail .sr-trip>summary>svg{color:#2875cd;transition:transform .15s;transform:rotate(-90deg)}
#detail .sr-trip[open]>summary>svg{transform:rotate(0)}
#detail .sr-trip>summary>span{margin-left:auto;color:#60758c;font-size:11px}
#detail .sr-assignment-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 10px;padding:4px 12px 16px;align-items:center}
#detail .sr-terminal,#detail .sr-driver,#detail .sr-resource,#detail .sr-response{min-width:0}
#detail .sr-terminal>span,#detail .sr-driver>span,#detail .sr-resource>span,#detail .sr-response>span{display:block;font-size:11px;line-height:1.4;color:#627489;margin-bottom:3px}
#detail .sr-terminal>strong,#detail .sr-resource>strong{display:block;font-size:13px;font-weight:550;overflow-wrap:anywhere;color:#172b4d}
#detail .sr-driver>div{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:32px}
#detail .sr-driver strong{font-size:13px;color:#172b4d;display:flex;align-items:center;gap:6px;overflow-wrap:anywhere;font-weight:550}
#detail .sr-driver strong>svg{color:#65778c}
#detail .sr-driver .sr-icon{border-color:#c4d6e9;background:white}
#detail .sr-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;width:100%;min-height:37px;padding:8px 10px;background:#2875cd;color:#fff;border:1px solid #2875cd;border-radius:7px;box-shadow:0 2px 4px #183e671c;font-size:12px;font-weight:600;line-height:1.3;cursor:pointer;text-align:center}
#detail .sr-button:hover{background:#1e63b0}
#detail .sr-button.sr-assigned{background:#fff;color:#205fa4;border-color:#b9cfe7;box-shadow:none}
#detail .sr-button.sr-assigned:hover{background:#e9f2fc}
#detail .sr-response>strong{display:inline-block;font-size:10px;letter-spacing:.035em;background:#e6edf5;color:#455a71;padding:4px 7px;border-radius:4px;font-weight:600}
#detail .sr-inline-editor{padding:12px;border-top:1px solid #d9e2ec;background:white}
#detail .sr-inline-editor[hidden]{display:none!important}
#detail .sr-inline-editor label{display:block;color:#334155;font-size:12px;margin:0 0 5px}
#detail .sr-inline-editor select{width:100%;margin:0 0 8px;padding:9px;border:1px solid #a8bfd9;border-radius:6px;color:#172b4d;background:#fff}
#detail .sr-inline-editor .sr-button{width:auto}
#detail .sr-route-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:0 0 3px}
#detail .sr-route-heading h3{margin:0;font-size:14px;color:#263e59}
#detail .sr-route-heading>div{display:flex;gap:4px}
#detail .sr-text-button{display:inline-flex;align-items:center;gap:4px;padding:7px 6px;color:#1e68b6;background:transparent;border:0;border-radius:5px;font-size:12px;font-weight:500;cursor:pointer}
#detail .sr-text-button:hover{background:#edf4fc}
#detail .sr-timezone{margin:0 0 14px;color:#667b91;font-size:10px}
#detail .sr-stops{list-style:none;padding:0;margin:0}
#detail .sr-stop{position:relative;padding:0 0 17px 29px;margin:0}
#detail .sr-stop:not(:last-child)::before{content:'';position:absolute;left:9px;top:29px;bottom:-8px;width:2px;background:#d5e0eb}
#detail .sr-marker{position:absolute;left:0;top:17px;border:2px solid #c3cfdb;background:#fff;color:#70859b;width:21px;height:21px;display:flex;align-items:center;justify-content:center;border-radius:50%;font-size:10px;font-weight:650}
#detail .sr-marker svg{width:13px;height:13px}
#detail .sr-stop.is-current .sr-marker{border-color:#2875cd;color:#1e65b6;box-shadow:0 0 0 3px #e9f2fc}
#detail .sr-stop.is-done .sr-marker{background:#2875cd;border-color:#2875cd;color:white}
#detail .sr-stop.is-done::before{background:#90b7e2}
#detail .sr-stop article{border:1px solid #cfdbe8;border-radius:9px;background:#fff;overflow:hidden}
#detail .sr-stop.is-current article{border-color:#94b9e4}
#detail .sr-stop-main{padding:12px}
#detail .sr-stop-label{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px;color:#5e7389;margin-bottom:9px}
#detail .sr-stop-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
#detail .sr-edit-location{min-height:32px;padding:6px 8px;border:1px solid #c4d6e9;background:#f7fbff;white-space:nowrap}
#detail .sr-edit-location svg{width:14px;height:14px}
#detail .sr-edit-location[hidden],#detail .sr-stop-columns[hidden]{display:none!important}
#detail .sr-location-editor fieldset{border:0;padding:0;margin:0;min-width:0}
#detail .sr-location-editor legend{font-size:13px;font-weight:650;color:#172b4d;margin-bottom:12px;padding:0}
#detail .sr-location-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#detail .sr-location-fields label{display:block;color:#40546c;font-size:12px;font-weight:500;margin:0;min-width:0}
#detail .sr-location-fields label:nth-child(-n+3){grid-column:1/-1}
#detail .sr-location-fields label:last-child{grid-column:1/-1}
#detail .sr-location-fields input{display:block;box-sizing:border-box;width:100%;min-width:0;margin:5px 0 0;padding:9px 10px;border:1px solid #a8bed8;border-radius:6px;background:white;color:#172b4d;font-size:14px;line-height:1.4}
#detail .sr-location-form-actions{display:flex;gap:10px;margin-top:16px;align-items:center}
#detail .sr-location-form-actions .sr-button{width:auto}
#detail .sr-location-editor fieldset:disabled{opacity:.65}
#detail .sr-location-editor .sr-message{margin:10px 0 0;overflow-wrap:anywhere}
#detail .sr-location-editor .sr-message:empty{display:none}
#detail .sr-location-success{color:#237447;font-size:12px;margin:10px 0 0}
@container(max-width:370px){#detail .sr-location-fields input{font-size:16px}}
#detail .sr-progress{font-size:10px;line-height:1.3;background:#f0f4f9;color:#5a6e82;padding:3px 6px;border-radius:4px}
#detail .sr-progress.is-done{background:#e6f5ed;color:#237447}
#detail .sr-stop.is-current .sr-progress{background:#e9f2fc;color:#2268b2}
#detail .sr-stop-columns{display:grid;grid-template-columns:minmax(0,1fr) 108px;gap:10px}
#detail .sr-stop h4{display:flex;align-items:flex-start;gap:2px;margin:0 0 4px;color:#172b4d;font-size:13px;line-height:1.45;overflow-wrap:anywhere}
#detail .sr-stop h4 .sr-icon{width:24px;height:24px;padding:4px;margin:-3px 0 0}
#detail .sr-stop h4 .sr-icon svg{width:14px;height:14px}
#detail .sr-address{font-size:11px;line-height:1.5;margin:0 0 5px;color:#40546c;overflow-wrap:anywhere}
#detail .sr-map-link{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:#1d68b7;text-decoration:none}
#detail .sr-map-link svg{width:13px;height:13px}
#detail .sr-arrival{text-align:right;display:flex;flex-direction:column;gap:5px}
#detail .sr-arrival>span:first-child{font-size:10px;color:#64768a}
#detail .sr-arrival>strong{font-size:11px;line-height:1.5;font-weight:500;color:#263e59}
#detail .sr-arrival .sr-late{font-size:10px;line-height:1.4;color:#bd3b29}
#detail .sr-stop-details{background:#f6f8fb;border-top:1px solid #e5ebf2}
#detail .sr-stop-details>summary{list-style:none;display:flex;align-items:center;gap:7px;padding:10px 12px;font-size:10px;color:#5c7086;line-height:1.5;cursor:pointer}
#detail .sr-stop-details>summary>svg{width:14px;height:14px}
#detail .sr-stop-details>summary>svg:last-child{margin-left:auto;transition:transform .15s}
#detail .sr-stop-details[open]>summary>svg:last-child{transform:rotate(180deg)}
#detail .sr-stop-details summary b{font-weight:600;color:#415871;display:block}
#detail .sr-stop-details dl{padding:0 12px 5px;margin:0;font-size:11px}
#detail .sr-stop-details dl>div{display:flex;justify-content:space-between;gap:12px;border-top:1px solid #e6ecf3;padding:7px 0}
#detail .sr-stop-details dt{color:#65788e}
#detail .sr-stop-details dd{text-align:right;margin:0;color:#253e59}
#detail .sr-instructions{font-size:11px;color:#40546c;white-space:pre-wrap;overflow-wrap:anywhere;padding:0 12px 12px;margin:0}
#detail .sr-add-stop{display:flex;align-items:center;justify-content:center;gap:6px;width:calc(100% - 29px);margin-left:29px;padding:10px;border:1px dashed #acc7e2;border-radius:7px;background:#f8fbff;color:#246fbe;font-size:12px;cursor:pointer}
#detail .sr-add-stop:hover{background:#e8f2fd}
#detail .sr-message,body .sr-dialog .sr-message{color:#ae3025;font-size:12px;line-height:1.5}
#detail .sr-empty{font-size:13px;color:#5c7188;padding:12px}
#detail .sr-route-column button:focus-visible,#detail .sr-route-column a:focus-visible,body .sr-dialog :focus-visible{outline:2px solid #1c63b2;outline-offset:3px}
body .sr-dialog,body.loads-mode .sr-dialog{width:min(560px,calc(100vw - 24px));max-width:none;max-height:90dvh;margin:auto;padding:0;border:1px solid #bed0e3;border-radius:12px;background:#fff;color:#172b4d;overflow:auto;box-shadow:0 20px 60px #172b4d33}
body .sr-dialog::backdrop{background:#18314e70}
body .sr-dialog header,body .sr-dialog footer{display:flex;align-items:center;gap:10px;padding:16px 20px;background:white;border-bottom:1px solid #e0e7ef}
body .sr-dialog h2{font-size:18px;color:#172b4d;margin:0;flex:1}
body .sr-dialog header button{font-size:22px;line-height:1}
body .sr-dialog footer{justify-content:flex-end;border-top:1px solid #e0e7ef;border-bottom:0;position:sticky;bottom:0}
body .sr-dialog-body{padding:6px 20px 18px}
body .sr-dialog p{font-size:13px;line-height:1.5;color:#52677f}
body .sr-dialog label{display:block;font-size:12px;font-weight:600;color:#263e59;margin:14px 0}
body .sr-dialog input,body .sr-dialog select,body .sr-dialog textarea{display:block;width:100%;padding:10px;margin-top:6px;background:#fff;color:#172b4d;border:1px solid #a8bed8;border-radius:6px;font:inherit}
body .sr-dialog textarea{min-height:80px;resize:vertical}
body .sr-dialog button{padding:9px 13px;border:1px solid #a9beda;background:#fff;color:#1d5a9d;border-radius:6px;font-size:13px;cursor:pointer}
body .sr-dialog .sr-primary{background:#2875cd;color:#fff;border-color:#2875cd;font-weight:600}
body .sr-dialog button:disabled{background:#eef2f7;color:#697d92;border-color:#d5dfeb;opacity:1;cursor:not-allowed}
body .sr-dialog .sr-message{margin:0 20px 12px}
body .sr-order-list{list-style:none;padding:0;margin:16px 0}
body .sr-order-list li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border:1px solid #d5e0ec;border-radius:7px;margin:8px 0;color:#263e59;font-size:13px}
body .sr-order-list li>div{display:flex;gap:6px;flex-shrink:0}
body .sr-map-stop{display:block;margin:12px 0;line-height:1.5;color:#1e67b5}
body .sr-pdf-dialog{width:min(900px,calc(100vw - 24px))}
body .sr-pdf-dialog iframe{display:block;width:100%;height:60vh;border:1px solid #d4e1ef;border-radius:5px;background:#eef2f6}
@container(max-width:370px){#detail .sr-stop-columns{grid-template-columns:1fr}#detail .sr-arrival{text-align:left;display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #e8edf3;padding-top:8px}#detail .sr-arrival .sr-late{grid-column:1/-1}#detail .sr-assignment-grid{padding:4px 10px 12px;gap:10px 8px}#detail .sr-button{font-size:11px;padding:8px 6px}#detail .sr-route-heading h3{font-size:13px}#detail .sr-metrics>div{padding:10px}#detail .sr-metrics strong{font-size:21px}}


#detail .sr-edit-appointment{min-height:32px;padding:6px 8px;border:1px solid #c4d6e9;background:#f7fbff;white-space:nowrap}
#detail .sr-edit-appointment svg{width:14px;height:14px}
#detail .sr-edit-appointment[hidden],#detail .sr-editing-appointment>dl{display:none!important}
#detail .sr-appointment-editor{padding:4px 12px 14px}
#detail .sr-appointment-editor fieldset{border:0;margin:0;padding:0;min-width:0}
#detail .sr-appointment-editor legend{font-size:13px;font-weight:650;color:#172b4d;padding:0}
#detail .sr-appointment-hint{font-size:11px;line-height:1.5;color:#5c7086;margin:7px 0 12px}
#detail .sr-appointment-fields{display:grid;grid-template-columns:1fr;gap:12px}
#detail .sr-appointment-fields label{display:block;font-size:12px;font-weight:500;color:#40546c;min-width:0}
#detail .sr-appointment-fields input{display:block;box-sizing:border-box;width:100%;min-width:0;margin:5px 0 0;padding:9px 10px;border:1px solid #a8bed8;border-radius:6px;background:white;color:#172b4d;font-size:14px;line-height:1.4}
#detail .sr-appointment-editor fieldset:disabled{opacity:.65}
#detail .sr-appointment-editor .sr-message:empty{display:none}
@container(max-width:370px){#detail .sr-appointment-fields input{font-size:16px}}
