/* Driver and vehicle apps share spacing, typography, controls and status semantics. */

html[data-mobile=true]{--family-blue:#17538b;--family-yellow:#f5be26;--family-radius:14px;--family-gap:16px}

html[data-mobile=true]:not([data-theme=dark]){--bg:#f1f5f9;--panel:#fff;--surface:#fff;--soft:#eaf1f8;--ink:#152f48;--muted:#586f84;--line:#d5e0ea;--accent:#17538b;--good:#176b4b;--goodbg:#e8f5ee;--bad:#b52d40;--badbg:#fbe9ec;--warn:#805900;--warnbg:#fff3d8}

html[data-mobile=true][data-theme=dark]{--bg:#102337;--panel:#193249;--surface:#193249;--soft:#233f57;--ink:#f3f7fb;--muted:#b3c5d6;--line:#3c556c;--accent:#7dc1ff;--good:#8ce0b0;--goodbg:#193f39;--bad:#ffafbb;--badbg:#482b3a;--warn:#ffda7c;--warnbg:#4b4027}

html[data-mobile=true] body{margin:0;background:var(--bg);color:var(--ink)}

html[data-mobile=true] button,html[data-mobile=true] .download-link{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:12px 18px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--ink);font-size:16px;font-weight:600;line-height:1.3;text-decoration:none;white-space:normal;box-sizing:border-box}

html[data-mobile=true] button svg{width:23px;height:23px;flex:0 0 auto}html[data-mobile=true] button:disabled{opacity:.5;cursor:not-allowed}html[data-mobile=true] button:focus-visible,html[data-mobile=true] a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}

html[data-mobile=true] button.primary,html[data-mobile=true] .download-link{background:var(--family-blue);border-color:var(--family-blue);color:#fff}html[data-mobile=true] button.success{background:#176b4b;color:#fff;border-color:#176b4b}html[data-mobile=true] button.danger{color:var(--bad)}

html[data-mobile=true] input:not([type=checkbox]):not([type=hidden]),html[data-mobile=true] select,html[data-mobile=true] textarea{background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:9px;padding:13px 14px;font-size:16px;min-height:52px;max-width:100%;box-sizing:border-box}html[data-mobile=true] label{font-size:14px;font-weight:600;line-height:1.5}

html[data-mobile=true] dialog{background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:18px;padding:24px;max-width:calc(100vw - 24px);max-height:92dvh;box-shadow:0 18px 70px #0005}html[data-mobile=true] dialog::backdrop{background:#081827b3}html[data-mobile=true] dialog h2{font-size:24px;line-height:1.2;margin:0 0 20px}html[data-mobile=true] dialog .form-actions,html[data-mobile=true] dialog form>.actions{position:sticky;bottom:-24px;background:var(--bg);padding:16px 0 8px;display:flex;gap:10px;border-top:1px solid var(--line);z-index:4}html[data-mobile=true] dialog [type=submit]{margin-left:auto}html[data-mobile=true] .focus-context{background:var(--panel);border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:12px;padding:16px;margin-bottom:18px}html[data-mobile=true] .focus-context strong{font-size:25px}html[data-mobile=true] .focus-context p{margin:5px 0}

html[data-mobile=true] .arrival-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;background:var(--soft);padding:5px;border-radius:12px;margin-bottom:14px}html[data-mobile=true] .arrival-choices button{padding:10px 4px;border-color:transparent;background:transparent}html[data-mobile=true] .arrival-choices button[aria-pressed=true]{background:var(--family-blue);color:white}

/* Phone: one dominant action, persistent navigation and consistent secondary pages. */

#root.mobile.app{max-width:540px;margin:0 auto;width:100%;padding-bottom:100px;background:var(--bg);min-height:100dvh;box-shadow:0 0 0 1px var(--line)}

#root.mobile.app>.top{background:#17538b;color:white;min-height:82px;padding:14px 18px;gap:10px;position:relative;border:0;border-radius:0}#root.mobile.app>.top .brand{font-size:18px;min-width:0}#root.mobile.app>.top .brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:8px;background:white;color:#17538b;font-size:25px}#root.mobile.app>.top .brand small{color:#dbeafa;font-size:11px}#root.mobile.app>.top .pill{display:none}#root.mobile.app>.top button{background:transparent;border-color:#ffffff55;color:white;min-width:44px;min-height:44px;padding:8px}

#root.mobile.app>#content{padding:18px 16px 24px;max-width:none;margin:0;width:100%;box-sizing:border-box}#root.mobile.app h1{font-size:27px;line-height:1.15;letter-spacing:-.4px}#root.mobile.app h2{font-size:20px}#root.mobile.app .dispatch-heading{margin-bottom:18px}#root.mobile.app .dispatch-heading p{font-size:13px;color:var(--muted)}

#root.mobile.app .dispatch-order{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:20px;margin:0 0 18px;box-shadow:0 3px 10px #102b4510}#root.mobile.app .dispatch-order.new{border-top:4px solid #ed8b22}#root.mobile.app .dispatch-order>header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:16px}#root.mobile.app .order-state{display:inline-flex;gap:7px;align-items:center;background:var(--goodbg);color:var(--good);padding:6px 10px;border-radius:18px;font-size:12px;font-weight:700}#root.mobile.app .new .order-state{background:#fff0dc;color:#9b5000}#root.mobile.app .order-time{font-size:12px;color:var(--muted)}#root.mobile.app .dispatch-order h2{font-size:34px;margin:8px 0;line-height:1.12;color:var(--ink)}#root.mobile.app .order-title{font-size:20px;font-weight:600;margin:0 0 16px}#root.mobile.app .reference-row{padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-bottom:12px}#root.mobile.app .reference-row small{display:block;font-size:13px;line-height:1.6;color:var(--muted)}#root.mobile.app .order-action{display:flex;flex-direction:column;gap:10px;margin-top:18px}#root.mobile.app .family-main-action{width:100%;min-height:62px;font-size:18px}#root.mobile.app .dispatch-order>footer{display:flex;align-items:center;justify-content:space-between;padding-top:12px;margin-top:12px;border-top:1px solid var(--line)}#root.mobile.app .text-button{background:transparent;color:var(--accent);border:0;padding:8px 0;min-height:44px}

#root.mobile.app .card,#root.mobile.app .standby-panel,#root.mobile.app .message-card,#root.mobile.app .duty-week-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:18px;margin-bottom:16px;box-shadow:none}#root.mobile.app .readiness-row{border-radius:10px;padding:13px;gap:10px;min-height:64px}#root.mobile.app .readiness-row button{min-height:44px;padding:8px;font-size:13px}#root.mobile.app .duty-item{padding:14px 0;border-bottom:1px solid var(--line)}#root.mobile.app .duty-item:last-child{border-bottom:0}#root.mobile.app .message-card{display:flex;gap:12px;align-items:flex-start}#root.mobile.app .message-card p{font-size:15px;line-height:1.5}#root.mobile.app .tablewrap{max-width:100%;overflow:auto}#root.mobile.app .utility-links{display:flex;gap:8px;flex-wrap:wrap}#root.mobile.app .utility-links button{font-size:13px;min-height:44px}

#root.mobile.app>.tabs{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,540px);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:var(--panel);border-top:1px solid var(--line);padding:7px 4px max(8px,env(safe-area-inset-bottom));z-index:1000;box-sizing:border-box}#root.mobile.app>.tabs button{display:flex;flex-direction:column;gap:5px;padding:7px 2px;min-width:0;min-height:60px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:11px}#root.mobile.app>.tabs button.selected{background:var(--soft);color:var(--accent)}#root.mobile.app>.tabs svg{width:24px;height:24px}#root.mobile.app .app-credit{display:flex;justify-content:flex-end;align-items:center;gap:8px;font-size:10px;padding:18px 0;color:var(--muted)}#root.mobile.app .app-credit img{width:90px!important;margin:0!important}#root.mobile.app>.context{padding:8px 16px;font-size:11px}#root.mobile.app .app-role-picker{display:flex;gap:6px;padding:10px 16px;background:var(--panel);overflow:auto}#root.mobile.app .app-role-picker button{min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;flex:1;min-width:90px;font-size:12px}#root.mobile.app .app-role-picker button.selected{background:var(--soft);border-color:currentColor}

/* Tablet: yellow identity, clear work panel and a stable status / map sidebar. */

html[data-mobile=true] .vehicle-shell{padding-bottom:90px;background:var(--bg)}html[data-mobile=true] .vehicle-shell>.app-header{background:#f5be26;color:#132d43;min-height:86px;padding:14px 28px;display:flex;gap:18px;align-items:center;flex-wrap:wrap;border:0}html[data-mobile=true] .vehicle-shell .app-brand{font-size:23px;font-weight:750;display:flex;align-items:center;gap:12px;flex:1}html[data-mobile=true] .vehicle-shell .app-brand:before{content:'❄';display:grid;place-items:center;width:44px;height:44px;background:#17538b;color:white;border-radius:8px;font-size:30px}html[data-mobile=true] .vehicle-shell .app-brand img{display:none}html[data-mobile=true] .vehicle-shell .app-brand small{display:block;color:#25465f;font-size:14px;margin:4px 0 0}html[data-mobile=true] .vehicle-shell>.app-header button{color:#132d43;background:transparent;border-color:#173b6066;min-width:48px;min-height:48px;padding:10px}html[data-mobile=true] .vehicle-shell .connection{color:#174b36;font-size:14px}html[data-mobile=true] .vehicle-shell .connection.offline{color:#8e2030;font-weight:700}html[data-mobile=true] .vehicle-shell>.app-header .installed-version{color:#25465f}

html[data-mobile=true] .vehicle-shell>main{width:100%;max-width:none;padding:24px 28px;box-sizing:border-box;margin:0}html[data-mobile=true] .vehicle-shell .vehicle-identity{display:flex;align-items:center;gap:16px;padding:0 0 18px;margin:0;background:transparent;border:0}html[data-mobile=true] .vehicle-shell .vehicle-identity h1{font-size:25px;margin:0 0 6px}html[data-mobile=true] .vehicle-shell .vehicle-identity p{margin:0;color:var(--muted)}html[data-mobile=true] .vehicle-shell .vehicle-identity>.toolbar{margin-left:auto;display:flex;gap:8px}html[data-mobile=true] .vehicle-shell .vehicle-identity>svg{width:32px;height:32px}

html[data-mobile=true] .vehicle-shell .vehicle-orders{display:block}html[data-mobile=true] .vehicle-shell .vehicle-order{padding:22px;border:1px solid var(--line);border-top:4px solid var(--accent);background:var(--panel);border-radius:16px;margin:0 0 22px;box-shadow:0 4px 16px #0001}html[data-mobile=true] .vehicle-shell .vehicle-order.active{border-top-color:#53c68b}html[data-mobile=true] .vehicle-shell .vehicle-order.new{border-top-color:#f5be26}.cab-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:24px}.cab-main{min-width:0}.cab-main>header{display:flex;justify-content:space-between;align-items:center;gap:12px;background:transparent;padding:0}.cab-main>h2{font-size:36px;line-height:1.15;margin:18px 0;color:var(--ink)}.cab-main .order-state{display:inline-flex;align-items:center;gap:8px;background:var(--goodbg);color:var(--good);border-radius:20px;padding:7px 13px;font-weight:700;font-size:14px}.cab-main .order-time{color:var(--muted);font-size:13px}.cab-main .order-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:18px 0}.cab-main .order-meta dt{color:var(--muted);font-size:13px;margin-bottom:7px}.cab-main .order-meta dd{margin:0;font-size:18px;font-weight:650;overflow-wrap:anywhere}.cab-main .vehicle-confirmations{display:grid;grid-template-columns:1fr 1fr;gap:12px}.cab-main .confirmation-state{padding:14px!important;border:1px solid var(--line)!important;border-radius:12px;background:var(--soft)!important}.cab-main .confirmation-state.confirmed{border-color:var(--good)!important}.cab-main .confirmation-state h3{font-size:14px!important;margin-bottom:8px!important}.cab-main .confirmation-state strong{font-size:18px!important;display:block;line-height:1.4}.cab-main .confirmation-state span{display:block;color:var(--muted);font-size:12px;margin-top:8px;line-height:1.5}

.cab-sidebar{min-width:0;display:flex;flex-direction:column;gap:16px}.cab-progress{padding:18px;background:var(--soft);border:1px solid var(--line);border-radius:12px}.cab-progress h3{font-size:16px;margin:0 0 12px}.cab-step{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line);font-size:15px}.cab-step svg{width:23px;height:23px;flex:0 0 auto}.cab-step span{flex:1}.cab-step.done{color:var(--good)}.cab-step.waiting{color:var(--muted)}.cab-location{border-radius:12px;border:1px solid var(--line);overflow:hidden}.cab-map{height:235px;width:100%;background:var(--soft)}.cab-location-note{margin:0;padding:11px 14px;font-size:12px;color:var(--muted);background:var(--soft)}

html[data-mobile=true] .vehicle-shell .vehicle-order>.actions{display:flex;align-items:center;gap:12px;margin:20px 0 0;padding:18px 0 0;border-top:1px solid var(--line)}html[data-mobile=true] .vehicle-shell .vehicle-order>.actions>button{flex:1;min-height:64px;font-size:18px;width:auto;margin:0}html[data-mobile=true] .vehicle-shell button.primary,html[data-mobile=true] .vehicle-shell [data-action=capture-services]{background:#f5be26;color:#132d43;border-color:#f5be26}html[data-mobile=true] .vehicle-shell .vehicle-order>.actions>.status-line{flex-basis:100%;font-size:13px;color:var(--muted);order:2}html[data-mobile=true] .vehicle-shell .warning{background:var(--warnbg);color:var(--warn);border:1px solid var(--line);border-radius:10px;padding:14px;font-size:14px;line-height:1.5}html[data-mobile=true] .vehicle-shell .panel,html[data-mobile=true] .vehicle-shell .empty-state,html[data-mobile=true] .vehicle-shell dialog .card{background:var(--panel);border:1px solid var(--line);padding:22px;border-radius:14px}html[data-mobile=true] .vehicle-shell dialog{width:min(940px,calc(100vw - 32px));padding:24px}html[data-mobile=true] .vehicle-shell dialog .formgrid{gap:18px}html[data-mobile=true] .vehicle-shell dialog .actions button{min-width:130px}html[data-mobile=true] .vehicle-shell dialog .readiness-row{min-height:68px;padding:14px;border:1px solid var(--line);border-radius:10px}html[data-mobile=true] .vehicle-shell dialog table{color:var(--ink);background:var(--panel)}html[data-mobile=true] .vehicle-shell dialog th{background:var(--soft);color:var(--ink)}html[data-mobile=true] .vehicle-shell dialog td{border-color:var(--line)}html[data-mobile=true] .vehicle-shell dialog button[type=submit]{background:#f5be26;color:#132d43;border-color:#f5be26}html[data-mobile=true] .vehicle-shell .app-credit{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:16px 0;color:var(--muted);font-size:10px}html[data-mobile=true] .vehicle-shell .app-credit img{width:90px!important;margin:0!important}

.cab-navigation{position:fixed;bottom:0;left:0;right:0;z-index:1000;display:flex;justify-content:center;gap:16px;background:var(--panel);border-top:1px solid var(--line);padding:8px 24px max(10px,env(safe-area-inset-bottom))}.cab-navigation button{flex:1;max-width:280px;display:flex;align-items:center;gap:10px;background:transparent!important;border:0!important;color:var(--muted)!important;min-height:56px!important}.cab-navigation button[aria-current=page]{background:var(--soft)!important;color:var(--accent)!important}.cab-navigation svg{width:25px;height:25px}

@media(max-width:900px){.cab-grid{grid-template-columns:1fr}.cab-sidebar{display:grid;grid-template-columns:1fr 1fr}.cab-main>h2{font-size:30px}.cab-map{height:230px}html[data-mobile=true] .vehicle-shell>.app-header{padding:12px 16px}html[data-mobile=true] .vehicle-shell>main{padding:18px 16px}.cab-main .order-meta dd{font-size:16px}}

@media(max-width:600px){html[data-mobile=true] dialog{padding:18px}html[data-mobile=true] dialog .form-actions,html[data-mobile=true] dialog form>.actions{bottom:-18px}html[data-mobile=true] dialog .form-actions button{padding:12px;flex:1}html[data-mobile=true] .vehicle-shell .vehicle-identity{flex-wrap:wrap}.cab-sidebar{display:flex}.cab-main .vehicle-confirmations{grid-template-columns:1fr}.cab-main .order-meta{grid-template-columns:1fr 1fr}.cab-main>h2{font-size:27px}html[data-mobile=true] .vehicle-shell .vehicle-order>.actions{flex-direction:column;align-items:stretch}html[data-mobile=true] .vehicle-shell .vehicle-order>.actions>button{width:100%;min-height:56px}.cab-navigation{padding:6px 8px}.cab-navigation button{flex-direction:column;font-size:12px;gap:4px}html[data-mobile=true] .vehicle-shell .app-brand{font-size:18px}.cab-location{max-width:100%}}

@media(prefers-reduced-motion:reduce){html[data-mobile=true] *,html[data-mobile=true] *:before{animation:none!important;transition:none!important}}



#root.mobile.app[data-service-role=picket]{--family-blue:#6c428f}#root.mobile.app[data-service-role=central]{--family-blue:#087b80}#root.mobile.app[data-service-role=picket]>.top{background:#6c428f}#root.mobile.app[data-service-role=central]>.top{background:#087b80}#root.mobile.app[data-service-role=picket] .app-role-picker button.selected{color:#9455be}#root.mobile.app[data-service-role=central] .app-role-picker button.selected{color:#0d8f95}



/* Override legacy percentage widths and old vehicle theme tokens. */

#root.mobile.app>.tabs button{width:100%!important;max-width:none!important;flex:none!important;overflow-wrap:normal!important;word-break:normal!important}#root.mobile.app>.tabs button svg,#root.mobile.app button>svg{display:inline-block!important}#root.mobile.app>.tabs button span{white-space:nowrap}

html[data-mobile=true][data-theme=dark] body.vehicle-shell{--bg:#102337;--panel:#193249;--surface:#193249;--soft:#233f57;--ink:#f3f7fb;--muted:#b3c5d6;--line:#3c556c;--accent:#7dc1ff;--good:#8ce0b0;--goodbg:#193f39;--warn:#ffda7c;--warnbg:#4b4027;--bad:#ffafbb;--badbg:#482b3a}

html[data-mobile=true]:not([data-theme=dark]) body.vehicle-shell{--bg:#f1f5f9;--panel:#fff;--surface:#fff;--soft:#eaf1f8;--ink:#152f48;--muted:#586f84;--line:#d5e0ea;--accent:#17538b;--good:#176b4b;--goodbg:#e8f5ee;--warn:#805900;--warnbg:#fff3d8}

.cab-progress{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px}.cab-progress h3{grid-column:1/-1;margin-bottom:0}.cab-step{border:0;padding:8px 0;font-size:13px;gap:8px}.cab-step svg{width:20px;height:20px}.cab-map{height:190px}



#root.mobile.app .family-fact{display:flex;align-items:center;gap:14px;background:var(--soft);padding:13px;border-radius:10px;margin-bottom:14px}#root.mobile.app .family-fact>svg{width:27px;height:27px;flex:none}#root.mobile.app .family-fact small{display:block;font-size:12px;color:var(--muted);margin:0 0 4px}#root.mobile.app .family-fact b{font-size:16px}



html[data-mobile=true] body:has(#login,#driveractivate) .login{max-width:440px;width:100%;margin:5vh auto;padding:20px;box-sizing:border-box}html[data-mobile=true] body:has(#login,#driveractivate) .login>.card{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:24px}html[data-mobile=true] body:has(#login,#driveractivate) .login>.brand{color:var(--family-blue);margin:0 0 20px}html[data-mobile=true] body:has(#login,#driveractivate) #login button.primary,html[data-mobile=true] #driveractivate button.primary{width:100%;min-height:56px}.vehicle-shell>main>.panel{max-width:680px;margin:28px auto!important}.vehicle-shell>main>.panel h1{font-size:28px}.vehicle-shell>main>.panel>.actions{display:flex;gap:12px;flex-wrap:wrap}



html[data-mobile=true] dialog .error:empty{display:none}html[data-mobile=true] .vehicle-shell dialog textarea{border:1px solid var(--line)!important;outline:none}html[data-mobile=true] .vehicle-shell dialog textarea:focus{border-color:var(--accent)!important;box-shadow:0 0 0 2px var(--accent)}html[data-mobile=true] .vehicle-shell .vehicle-order:only-child>.actions{position:sticky;bottom:82px;z-index:6;background:var(--panel);padding:12px;border:1px solid var(--line);border-radius:12px;box-shadow:0 -4px 12px #0001}



/* Bottom-right credits stay in the document flow above app navigation. */

@media screen {

 #root.mobile.app{display:flex;flex-direction:column;box-sizing:border-box}

 #root.mobile.app>#content{flex:1;display:flex;flex-direction:column}

 #root.mobile.app #content>.app-credit{margin-top:auto;flex-shrink:0;width:100%;box-sizing:border-box;align-self:flex-end;justify-content:flex-end;padding:20px 0 0;text-align:right}

 html[data-mobile=true] .vehicle-shell{display:flex;flex-direction:column;min-height:100dvh;box-sizing:border-box}

 html[data-mobile=true] .vehicle-shell>main#root{display:flex;flex-direction:column;flex:1}

 html[data-mobile=true] .vehicle-shell #root>.app-credit{margin-top:auto;flex-shrink:0;align-self:stretch;justify-content:flex-end;padding:20px 0 0;text-align:right}

 #root.mobile.app .app-credit>img.layer9-logo,html[data-mobile=true] .vehicle-shell .app-credit>img.layer9-logo{margin:0!important;flex-shrink:0}

}



/* Warning colours are a single pair: never mix a night foreground with a day surface.

   Both background spellings exist in the older mobile styles. */

html[data-mobile=true],html[data-mobile=true] body.vehicle-shell,

html[data-app=vehicle],html[data-app=vehicle] body.vehicle-shell{

 --warn:#503800!important;--warnbg:#fff1cc!important;--warn-bg:#fff1cc!important;

}

:is(html[data-mobile=true],html[data-app=vehicle]) :is(.warning,.note.warning,.status-line.warning,.cab-new-orders,.readiness-row.is-unknown strong,.alarm-progress-step.pending,.contract-sheet .net),

html[data-app=vehicle] .vehicle-order:is(.new,.acknowledged) .order-state,

html[data-mobile=true] .dispatch-order:is(.new,.acknowledged) .order-state{

 background:#fff1cc!important;color:#503800!important;border-color:#b89132;

}

:is(html[data-mobile=true],html[data-app=vehicle]) :is(.warning,.note.warning,.status-line.warning,.contract-sheet .net) :is(h3,strong,b,span,small,p,.muted){

 color:#503800!important;opacity:1;

}

/* Keep gold actions readable in both themes, including disabled actions. */

html[data-app=vehicle] body.vehicle-shell .toolbar a.button{color:var(--ink);background:var(--panel);border:1px solid var(--line);padding:10px 12px;border-radius:5px;text-decoration:none;display:inline-flex;align-items:center}

html[data-app=vehicle] body.vehicle-shell :is(button.primary,button[data-action=capture-services],.cab-navigation button[aria-current=page],.cab-navigation button.active){

 background:#f5be26!important;color:#203344!important;border-color:#b89132!important;

}



/* Hidden status icons must not shift readiness labels into the icon column. */

#root.mobile.app .readiness-row{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:start;gap:10px 12px}

#root.mobile.app .readiness-row>.state-icon{display:none}

#root.mobile.app .readiness-row>div,#root.mobile.app .readiness-row>b{grid-column:1;grid-row:1;min-width:0;width:auto}

#root.mobile.app .readiness-row b{word-break:normal;overflow-wrap:normal;hyphens:auto;line-height:1.4}

#root.mobile.app .readiness-row>strong{grid-column:2;grid-row:1;justify-self:end;align-self:start;width:auto;max-width:100%;white-space:nowrap}

#root.mobile.app .readiness-row>button,#root.mobile.app .readiness-row>a{grid-column:1/-1;grid-row:2;justify-self:stretch;width:100%;margin:0;min-height:44px}


/* Landscape follows the available WebView width instead of the portrait cap. */
@media (orientation:landscape) {
 html[data-mobile=true] #root.mobile.app{width:100%;max-width:none;margin:0;box-sizing:border-box}
 html[data-mobile=true] #root.mobile.app>main#content{width:100%;max-width:none;box-sizing:border-box;padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right))}
 html[data-mobile=true] #root.mobile.app>.tabs{width:100%;max-width:none;left:0;right:0;transform:none}
}

/* Dispatch: whole route + each vehicle alarm; color always accompanied by text. */
html body #root .dispatch-route-group{border:3px solid;border-radius:12px;padding:12px;margin:0 0 22px;min-width:0;}
html body #root .dispatch-route-group.organization-open,html body #root .dispatch-order.organization-open{border:3px solid #dc3545!important;}
html body #root .dispatch-route-group.organization-ready,html body #root .dispatch-order.organization-ready{border:3px solid #238451!important;}
html[data-theme=dark] body #root .dispatch-route-group.organization-open,html[data-theme=dark] body #root .dispatch-order.organization-open{border-color:#ff747e!important;}
html[data-theme=dark] body #root .dispatch-route-group.organization-ready,html[data-theme=dark] body #root .dispatch-order.organization-ready{border-color:#5bdb9c!important;}
html body #root .route-organization-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:0 0 12px;}
html body #root .route-organization-heading h2{margin:0;font-size:20px;}
html body #root .route-organization-heading strong{font-size:14px;}
html body #root .dispatch-route-group .dispatch-order{margin-bottom:12px;}
html body #root .dispatch-route-group .dispatch-order:last-child{margin-bottom:0;}
html body #root .next-duty.duty-paused{opacity:.65;}
html body #root .next-duty.duty-paused button{cursor:not-allowed;}
html body #root .next-duty .duty-paused-note{font-weight:600;}

html body #root .route-organization-count{font-size:15px;font-weight:700;}
html body #root .dispatch-role-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:16px 0;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);}
html body #root .dispatch-role-facts div{min-width:0;}
html body #root .dispatch-role-facts dt{font-size:12px;color:var(--muted);margin-bottom:5px;}
html body #root .dispatch-role-facts dd{font-size:15px;font-weight:600;margin:0;overflow-wrap:anywhere;}
html body #root .dispatch-next-action{padding:12px;margin:12px 0;border-left:4px solid currentColor;background:var(--soft);}
html body #root .dispatch-next-action small,html body #root .dispatch-next-action strong{display:block;}
html body #root .dispatch-next-action strong{margin-top:5px;font-size:16px;}
