/* Maps use the ADS surface/overlay model and explicit non-overlapping control zones. */
.map-card{min-width:0;border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-200);background:var(--ds-surface);overflow:hidden;font:var(--ds-font-body)}
.map-card button,.map-card input,.map-card select,.map-card textarea,.maplibregl-map,.maplibregl-ctrl,.maplibregl-popup,.maplibregl-marker{font-family:var(--ds-font-family-body)}
.map-frame{position:relative;height:470px;isolation:isolate;overflow:hidden;border-radius:var(--ds-border-radius-200) var(--ds-border-radius-200) 0 0;background:var(--ds-background-neutral)}
.map-large .map-frame{height:clamp(460px,62vh,760px)}
#district-map{position:absolute;inset:0}
.map-preview{position:absolute;inset:0;z-index:2;display:grid;place-items:center;background:var(--ds-background-neutral);pointer-events:none}
.map-preview img{display:block;width:100%;height:100%;object-fit:contain}
.map-no-script{position:absolute;left:var(--ds-space-150);right:var(--ds-space-150);bottom:var(--ds-space-150);z-index:8;margin:0;padding:var(--ds-space-150);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-100);background:var(--ds-surface-overlay);box-shadow:var(--ds-shadow-overlay);font:var(--ds-font-body)}

.map-toolbar{position:absolute;left:var(--ds-space-150);right:var(--ds-space-150);top:var(--ds-space-150);z-index:12;display:flex;justify-content:space-between;align-items:flex-start;gap:var(--ds-space-100);pointer-events:none}
.map-context{max-width:min(360px,48%);padding:var(--ds-space-100) var(--ds-space-150);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-100);background:var(--ds-surface-overlay);box-shadow:var(--ds-shadow-raised);pointer-events:auto;font:var(--ds-font-body)}
.map-context strong,.map-context span{display:block}
.map-context strong{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.map-context span{margin-top:var(--ds-space-025);font:var(--ds-font-body-small);color:var(--ds-text-subtle)}
.map-actions{display:flex;align-items:flex-start;gap:var(--ds-space-050);pointer-events:auto}
.layer-menu{position:relative;font:var(--ds-font-body)}
.layer-menu summary{display:flex;align-items:center;gap:var(--ds-space-075);cursor:pointer;list-style:none}
.layer-menu summary:hover{text-decoration:none}
.layer-menu summary::-webkit-details-marker{display:none}
.layer-options{position:absolute;right:0;top:40px;z-index:40;width:320px;max-height:min(72vh,368px);padding:var(--ds-space-200);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-200);background:var(--ds-surface-overlay);box-shadow:var(--ds-shadow-overlay);overflow:auto;overscroll-behavior:contain}
.layer-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--ds-space-100);margin-bottom:var(--ds-space-075)}
.layer-options label{display:flex;align-items:center;gap:var(--ds-space-100);min-height:36px;padding:var(--ds-space-050) 0;font:var(--ds-font-body);color:var(--ds-text)}
.layer-options fieldset{padding-bottom:var(--ds-space-100);border-bottom:1px solid var(--ds-border)}
.layer-options small{display:block;margin-top:var(--ds-space-100)}
.map-performance-label{display:grid!important;gap:var(--ds-space-050)!important;margin:var(--ds-space-100) 0}
.map-performance-label select{min-height:36px}

.map-message{position:absolute;left:var(--ds-space-150);bottom:var(--ds-space-500);z-index:14;max-width:min(440px,calc(100% - 96px));margin:0;padding:var(--ds-space-100) var(--ds-space-150);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-100);background:var(--ds-surface-overlay);box-shadow:var(--ds-shadow-raised);color:var(--ds-text-subtle);font:var(--ds-font-body);pointer-events:none}
.map-fallback{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;background:var(--ds-background-neutral)}
.map-fallback img{width:100%;height:100%;object-fit:contain}
.map-fallback p{position:absolute;left:var(--ds-space-200);right:var(--ds-space-200);top:var(--ds-space-1000);padding:var(--ds-space-150);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-100);background:var(--ds-surface-overlay);box-shadow:var(--ds-shadow-raised)}
.map-footnote{display:flex;justify-content:space-between;gap:var(--ds-space-100);flex-wrap:wrap;padding:var(--ds-space-100) var(--ds-space-150);border-top:1px solid var(--ds-border);color:var(--ds-text-subtle);font:var(--ds-font-body-small)}

/* A single project-owned attribution line avoids MapLibre compact-control glyph
   duplication while keeping map providers visibly credited on every map. */
.map-attribution{position:absolute;right:var(--ds-space-100);bottom:var(--ds-space-075);z-index:9;max-width:calc(100% - 120px);padding:2px var(--ds-space-050);border-radius:var(--ds-border-radius-050);background:color-mix(in srgb,var(--ds-surface) 92%,transparent);color:var(--ds-text-subtle);font:var(--ds-font-body-small);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:var(--ds-shadow-raised)}
.map-attribution a{color:inherit;text-decoration:none}
.map-attribution a:hover,.map-attribution a:focus-visible{text-decoration:underline}
.map-picker .map-toolbar{left:var(--ds-space-100);right:auto;top:var(--ds-space-100);width:auto}
.map-picker .map-actions{gap:var(--ds-space-050)}
.map-picker .layer-options{left:0;right:auto;width:min(300px,calc(100vw - 48px))}
.map-picker .map-message{left:50%;bottom:var(--ds-space-500);transform:translateX(-50%);max-width:calc(100% - 180px)}
.map-picker .map-attribution{right:var(--ds-space-075);bottom:var(--ds-space-075);max-width:calc(100% - 110px)}

.maplibregl-popup-content{border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-100);background:var(--ds-surface-overlay);color:var(--ds-text);box-shadow:var(--ds-shadow-overlay)}
.maplibregl-popup-close-button{color:var(--ds-text-subtle);font:var(--ds-font-heading-small);padding:var(--ds-space-050) var(--ds-space-100)}
.place-popup{display:grid;gap:var(--ds-space-050);min-width:180px;color:var(--ds-text);font:var(--ds-font-body)}
.place-popup strong{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.place-popup span,.place-popup small{color:var(--ds-text-subtle)}
.place-popup small{font:var(--ds-font-body-small)}
.place-popup a{margin-top:var(--ds-space-050);color:var(--ds-text-brand);font-weight:var(--ds-font-weight-semibold)}
.taluk-name{padding:var(--ds-space-025) var(--ds-space-075);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-050);background:var(--ds-surface-overlay);color:var(--ds-text);font:var(--ds-font-body-small);font-weight:var(--ds-font-weight-medium);pointer-events:none}

.vehicle-marker{display:flex;align-items:center;justify-content:center;width:34px;height:34px;padding:var(--ds-space-025);border:2px solid var(--ds-border-success);border-radius:var(--ds-border-radius-circle);background:var(--map-marker-surface);box-shadow:var(--ds-shadow-raised);z-index:30;color:var(--map-marker-text)}
.vehicle-heading{display:flex;align-items:center;justify-content:center;transform-origin:center}
.vehicle-heading img{width:23px;height:25px;display:block;object-fit:contain}
.vehicle-state{position:absolute;left:50%;top:100%;transform:translateX(-50%);padding:0 var(--ds-space-050);border:1px solid var(--ds-border-bold);border-radius:var(--ds-border-radius-050);background:var(--map-marker-surface);color:var(--map-marker-text);font:var(--ds-font-body-small);font-weight:var(--ds-font-weight-medium);white-space:nowrap;pointer-events:none}
.vehicle-marker[data-status="RESPONDING"]{border-color:var(--ds-border-selected);border-radius:var(--ds-border-radius-200)}
.vehicle-marker[data-status="RETURNING"]{border-style:dashed;border-color:var(--ds-border-bold);border-radius:var(--ds-border-radius-100)}

.telemetry{padding:var(--ds-space-150) var(--ds-space-200) var(--ds-space-050);border-top:1px solid var(--ds-border);background:var(--ds-surface)}
.telemetry-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--ds-space-100);margin-bottom:var(--ds-space-050)}
.telemetry-heading h2{margin:0;font:var(--ds-font-heading-xsmall)}
.telemetry-heading span{font:var(--ds-font-body-small);color:var(--ds-text-subtle)}
.telemetry-list{max-height:190px;overflow:auto}
.telemetry-row{width:100%;display:grid;grid-template-columns:30px minmax(150px,.75fr) minmax(190px,1.2fr);gap:var(--ds-space-100);align-items:center;padding:var(--ds-space-100) 0;border:0;border-bottom:1px solid var(--ds-border);background:transparent;color:var(--ds-text);text-align:left}
.telemetry-row:last-child{border:0}
.telemetry-row:hover{background:var(--ds-background-neutral)}
.telemetry-identity strong,.telemetry-identity>span{display:block}
.telemetry-identity strong{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.telemetry-identity>span{margin-top:var(--ds-space-025);font:var(--ds-font-body-small);color:var(--ds-text-subtle)}
.telemetry-journey{display:flex;flex-direction:column;gap:var(--ds-space-025);font:var(--ds-font-body-small);color:var(--ds-text-subtle)}
.telemetry-eta{font:var(--ds-font-body-small);font-weight:var(--ds-font-weight-medium);color:var(--ds-text-brand)}
#telemetry-empty{padding:var(--ds-space-100) 0;margin:0;font:var(--ds-font-body)}

/* Native MapLibre controls follow ADS button and surface sizing. */
.maplibregl-ctrl-group{border-radius:var(--ds-border-radius-100)!important;background:var(--ds-surface-overlay)!important;box-shadow:var(--ds-shadow-raised)!important;overflow:hidden}
.maplibregl-ctrl-group button{width:32px;height:32px;background-color:var(--ds-surface-overlay)}
.maplibregl-ctrl-group button:hover{background-color:var(--ds-background-neutral-hovered)}
.maplibregl-ctrl-group button+button{border-top:1px solid var(--ds-border)}
.maplibregl-ctrl-scale{font:var(--ds-font-body-small)!important}
.maplibregl-ctrl-bottom-right{max-width:70%}
.maplibregl-ctrl-bottom-left{max-width:30%}

/* --------------------------------------------------------------------------
   Live operations map
   The application shell remains persistent. Map UI owns four safe regions:
   left rail, top search, top-right map controls, and bottom response tray.
   Context/list panels are mutually exclusive in JS and sit below the top row.
   -------------------------------------------------------------------------- */
body.live-page{height:100dvh;overflow:hidden;background:var(--ds-background-neutral)}
body.live-page .education-bar{position:fixed;inset:0 0 auto;z-index:300;height:var(--app-banner-height)}
body.live-page .staff-topbar{position:fixed;left:0;right:0;top:var(--app-banner-height);z-index:290}
body.live-page .sidebar{top:calc(var(--app-banner-height) + var(--app-topnav-height))}
body.live-page .workspace{position:fixed;left:var(--app-sidenav-width);right:0;top:calc(var(--app-banner-height) + var(--app-topnav-height));bottom:0;max-width:none!important;margin:0!important;overflow:hidden;transition:left .16s ease}
body.live-page #main-content{position:absolute;inset:0;max-width:none!important;margin:0!important;padding:0!important;overflow:hidden}
body.live-page .page-footer{display:none!important}
.live-map-shell{position:absolute;inset:0;overflow:hidden;background:var(--ds-background-neutral)}
.live-map-shell>.map-card{position:absolute;inset:0;border:0;border-radius:0;background:var(--ds-background-neutral);overflow:hidden}
.live-map-shell .map-frame,.live-map-shell .map-large .map-frame{position:absolute;inset:0;height:auto;border-radius:0}
.live-map-shell .map-footnote{display:none}

/* Reserved top-right map-control slot. */
.live-map-shell .map-toolbar{top:var(--ds-space-150);left:auto;right:var(--ds-space-150);width:auto;display:block;z-index:42}
.live-map-shell .map-context,.live-map-shell .map-actions>.button{display:none}
.live-map-shell .layer-menu summary{width:40px;height:40px;min-height:40px;padding:0;justify-content:center;border-radius:var(--ds-border-radius-100)}
.live-map-shell .layer-menu summary .icon{width:16px;height:16px}
.live-map-shell .layer-menu summary .layer-label{display:none}
.live-map-shell .layer-options{top:48px;max-height:calc(100dvh - var(--app-banner-height) - var(--app-topnav-height) - 80px)}

/* MapLibre controls are deliberately moved to bottom-right, never under Layers. */
.live-map-shell .maplibregl-ctrl-top-right{top:auto!important;right:var(--ds-space-150)!important;bottom:88px!important}
.live-map-shell .maplibregl-ctrl-bottom-left{left:var(--ds-space-150);bottom:var(--ds-space-100)}
.live-map-shell .maplibregl-ctrl-bottom-right{right:var(--ds-space-100);bottom:var(--ds-space-100)}
.live-map-shell .map-message{left:50%;bottom:96px;transform:translateX(-50%);max-width:min(460px,calc(100% - 180px));z-index:32}

.floating-island{position:absolute;z-index:36;border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-200);background:var(--ds-surface-overlay);box-shadow:var(--ds-shadow-overlay);color:var(--ds-text)}
.eoc-map-dock{left:var(--ds-space-150);top:var(--ds-space-150);display:flex;flex-direction:column;width:136px;padding:var(--ds-space-050)}
.eoc-map-dock>button{position:relative;min-height:40px;display:flex;align-items:center;gap:var(--ds-space-075);padding:0 var(--ds-space-100);border:0;border-radius:var(--ds-border-radius-050);background:transparent;color:var(--ds-icon);font:var(--ds-font-body);text-align:left;white-space:nowrap}
.eoc-map-dock>button:hover,.eoc-map-dock>button:focus-visible{background:var(--ds-background-neutral);color:var(--ds-text)}
.eoc-map-dock>button[aria-pressed="true"]{background:var(--ds-background-selected);color:var(--ds-text-brand)}
.eoc-map-dock .icon{width:16px;height:16px;flex:none}
.dock-count{margin-left:auto;min-width:20px;min-height:20px;padding:0 var(--ds-space-050);display:flex;align-items:center;justify-content:center;border-radius:var(--ds-border-radius-circle);background:var(--ds-background-brand-bold);color:var(--ds-text-inverse-static);font:var(--ds-font-body-small);font-weight:var(--ds-font-weight-bold)}
.ops-status-bar{position:absolute;z-index:35;top:64px;left:160px;display:flex;flex-wrap:wrap;gap:var(--ds-space-050) var(--ds-space-150);max-width:calc(100% - 176px);padding:var(--ds-space-100) var(--ds-space-150);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-100);background:var(--ds-surface-overlay);box-shadow:var(--ds-shadow-raised);font:var(--ds-font-body)}
.ops-status-bar span{white-space:nowrap}.ops-status-bar strong{color:var(--ds-text-brand)}

.live-search-island{left:160px;top:var(--ds-space-150);width:min(540px,calc(100% - 240px));overflow:visible}
.live-search-row{height:40px;display:flex;align-items:center;gap:var(--ds-space-075);padding:0 var(--ds-space-050) 0 var(--ds-space-150)}
.live-search-row>.icon{width:16px;height:16px;color:var(--ds-icon-subtle)}
.live-search-row input{height:38px;min-height:38px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;outline:0}
.live-search-row input:hover,.live-search-row input:focus{background:transparent;box-shadow:none}
.live-search-row .icon-button{width:32px;height:32px;border:0;background:transparent}
.live-search-results{position:absolute;left:0;right:0;top:46px;max-height:320px;padding:var(--ds-space-050);overflow:auto;border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-200);background:var(--ds-surface-overlay);box-shadow:var(--ds-shadow-overlay)}
.live-search-results button{width:100%;display:flex;flex-direction:column;padding:var(--ds-space-100);border:0;border-radius:var(--ds-border-radius-050);background:transparent;color:var(--ds-text);text-align:left}
.live-search-results button:hover{background:var(--ds-background-neutral)}
.live-search-results strong{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.live-search-results small{margin-top:var(--ds-space-025);font:var(--ds-font-body-small)}
.search-empty{margin:0;padding:var(--ds-space-100);font:var(--ds-font-body)}

.live-list-island{left:160px;top:112px;width:390px;max-height:calc(100% - 128px);overflow:hidden}
.live-list-island>header{min-height:48px;padding:0 var(--ds-space-100) 0 var(--ds-space-150);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--ds-border)}
.live-list-island>header strong{font:var(--ds-font-heading-small)}
.live-compact-list{max-height:calc(100dvh - var(--app-banner-height) - var(--app-topnav-height) - 136px);padding:var(--ds-space-050);overflow:auto;overscroll-behavior:contain}
.live-incident-item,.fleet-list-row,.compact-main{width:100%;border:0;background:transparent;color:var(--ds-text);text-align:left}
.live-incident-item{display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:var(--ds-space-100);padding:var(--ds-space-100);border-radius:var(--ds-border-radius-050)}
.live-incident-item:hover,.fleet-list-row:hover,.compact-main:hover{background:var(--ds-background-neutral)}
.live-incident-item strong,.live-incident-item small,.fleet-list-row strong,.fleet-list-row small,.compact-main strong,.compact-main small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-incident-item strong,.fleet-list-row strong,.compact-main strong{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.live-incident-item small,.fleet-list-row small,.compact-main small{margin-top:var(--ds-space-025);font:var(--ds-font-body-small);color:var(--ds-text-subtle)}
.severity-marker{width:22px;height:22px;display:grid;place-items:center;border:2px solid currentColor;border-radius:var(--ds-border-radius-circle);background:var(--ds-surface)}
.severity-marker .icon{width:16px;height:16px}
.severity-critical{color:var(--ds-text-danger)}
.severity-high{color:var(--ds-text-accent-orange)}
.severity-moderate{color:var(--ds-text-warning)}
.severity-low{color:var(--ds-text-brand)}

.compact-action-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--ds-space-050);align-items:center;padding:var(--ds-space-050);border-bottom:1px solid var(--ds-border)}
.compact-action-row:last-child{border-bottom:0}
.compact-main{padding:var(--ds-space-075);border-radius:var(--ds-border-radius-050)}
.mini-actions{display:flex;gap:var(--ds-space-050)}
.report-reject-form{grid-column:1/-1;padding:var(--ds-space-100);border-top:1px solid var(--ds-border);background:var(--ds-background-subtle);border-radius:var(--ds-border-radius-050)}
.report-reject-form label{display:grid;gap:var(--ds-space-050);font:var(--ds-font-body)}
.report-reject-form textarea{min-height:72px}
.fleet-list-row{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:var(--ds-space-100);padding:var(--ds-space-100);border-radius:var(--ds-border-radius-050)}
.fleet-list-row img{width:28px;height:30px;object-fit:contain}
.fleet-list-row>b{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium);color:var(--ds-text-brand)}
.compact-empty{margin:0;padding:var(--ds-space-150);font:var(--ds-font-body)}
.place-category-grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--ds-space-075);padding:var(--ds-space-100)}
.place-category-grid button{min-height:58px;padding:var(--ds-space-100);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-050);background:var(--ds-background-subtle);color:var(--ds-text);text-align:left}
.place-category-grid button:hover{background:var(--ds-background-neutral)}
.place-category-grid button.active,.place-category-grid button[aria-pressed="true"]{border-color:var(--ds-border-selected);background:var(--ds-background-selected)}
.place-category-grid span,.place-category-grid strong{display:block}
.place-category-grid span{font:var(--ds-font-body)}
.place-category-grid strong{margin-top:var(--ds-space-025);font:var(--ds-font-metric-small)}

/* Context panel always starts below the shared 40px top control row. */
.context-sheet{right:var(--ds-space-150);top:60px;width:min(408px,calc(100% - 92px));max-height:calc(100% - 72px);overflow:hidden}
.context-sheet>header{min-height:56px;padding:var(--ds-space-100);padding-left:var(--ds-space-150);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--ds-border)}
.context-sheet>header>div{min-width:0;display:flex;flex-direction:column}
.context-sheet>header strong{font:var(--ds-font-heading-small);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.context-sheet-body{max-height:calc(100dvh - var(--app-banner-height) - var(--app-topnav-height) - 140px);padding:var(--ds-space-150);display:grid;gap:var(--ds-space-100);overflow:auto;overscroll-behavior:contain}
.context-sheet[aria-busy="true"]{cursor:progress}
.panel-loading{margin:var(--ds-space-050) 0}
.context-meta{display:flex;align-items:center;gap:var(--ds-space-050);flex-wrap:wrap;font:var(--ds-font-body-small)}
.context-meta>span,.context-meta>b{padding:var(--ds-space-050) var(--ds-space-075);border-radius:var(--ds-border-radius-050);background:var(--ds-background-neutral);font-weight:var(--ds-font-weight-semibold)}
.severity-text.severity-critical{color:var(--ds-text-danger)}
.severity-text.severity-high{color:var(--ds-text-accent-orange)}
.severity-text.severity-moderate{color:var(--ds-text-warning)}
.severity-text.severity-low{color:var(--ds-text-brand)}
.context-location{width:100%;min-height:32px;padding:0 var(--ds-space-100);border:0;border-radius:var(--ds-border-radius-050);background:var(--ds-background-neutral);color:var(--ds-text-subtle);font:var(--ds-font-body);text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.context-location:hover{background:var(--ds-background-neutral-hovered)}
.context-description{margin:0;font:var(--ds-font-body);color:var(--ds-text-subtle)}
.context-primary-actions{display:flex;gap:var(--ds-space-075)}
.context-primary-actions .button{flex:1}
.context-section-title{margin-top:var(--ds-space-050);padding-top:var(--ds-space-100);border-top:1px solid var(--ds-border);font:var(--ds-font-heading-xsmall);color:var(--ds-text)}
.assigned-compact,.nearest-list{display:grid;gap:var(--ds-space-050)}
.assigned-compact button,.nearest-list button{width:100%;display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:var(--ds-space-100);padding:var(--ds-space-100);border:0;border-radius:var(--ds-border-radius-050);background:transparent;color:var(--ds-text);text-align:left}
.assigned-compact button:hover,.nearest-list button:hover{background:var(--ds-background-neutral)}
.assigned-compact img,.nearest-list img{width:27px;height:29px;object-fit:contain}
.assigned-compact strong,.assigned-compact small,.nearest-list strong,.nearest-list small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.assigned-compact strong,.nearest-list strong{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.assigned-compact small,.nearest-list small{margin-top:var(--ds-space-025);font:var(--ds-font-body-small);color:var(--ds-text-subtle)}
.nearest-list b{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium);color:var(--ds-text-brand)}
.dispatch-nearest-button{width:100%;display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:var(--ds-space-100);padding:var(--ds-space-100);border:1px solid var(--ds-border-selected);border-radius:var(--ds-border-radius-050);background:var(--ds-background-selected);color:var(--ds-text);text-align:left}
.dispatch-nearest-button:hover{background:var(--ds-background-selected-hovered)}
.dispatch-nearest-button img{width:34px;height:36px;object-fit:contain}
.dispatch-nearest-button strong,.dispatch-nearest-button small{display:block}
.dispatch-nearest-button strong{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.dispatch-nearest-button small{margin-top:var(--ds-space-025);font:var(--ds-font-body-small);color:var(--ds-text-subtle)}
.dispatch-nearest-button>b{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium);color:var(--ds-text-brand)}
.dispatch-type-grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--ds-space-075)}
.dispatch-type-button{display:grid;grid-template-columns:28px minmax(0,1fr);align-items:center;gap:var(--ds-space-075);min-height:52px;padding:var(--ds-space-100);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-050);background:var(--ds-surface);color:var(--ds-text);text-align:left}
.dispatch-type-button:hover{background:var(--ds-background-neutral)}
.dispatch-type-button img{width:26px;height:28px;object-fit:contain}
.dispatch-type-button strong,.dispatch-type-button small{display:block}
.dispatch-type-button strong{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.dispatch-type-button small{font:var(--ds-font-body-small);color:var(--ds-text-subtle)}
.specific-dispatch{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:var(--ds-space-075)}
.specific-dispatch label{display:grid;gap:var(--ds-space-050);font:var(--ds-font-body);color:var(--ds-text-subtle)}
.specific-dispatch select{min-height:36px;font:var(--ds-font-body)}
.specific-dispatch .button{min-height:32px}
.context-recent{display:grid;grid-template-columns:92px 1fr;gap:var(--ds-space-100);padding-top:var(--ds-space-100);border-top:1px solid var(--ds-border);font:var(--ds-font-body)}
.context-recent small{color:var(--ds-text-subtle)}
.context-recent span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.unit-context-hero{display:grid;grid-template-columns:48px 1fr;gap:var(--ds-space-100);align-items:center}
.unit-context-hero img{width:43px;height:47px;object-fit:contain}
.unit-context-hero strong,.unit-context-hero small{display:block}
.unit-context-hero strong{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium);text-transform:capitalize}
.unit-context-hero small{margin-top:var(--ds-space-025);font:var(--ds-font-body-small)}
.current-assignment-card{width:100%;display:flex;flex-direction:column;padding:var(--ds-space-100);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-050);background:var(--ds-background-subtle);color:var(--ds-text);text-align:left}
.current-assignment-card small{font:var(--ds-font-body-small)}
.current-assignment-card strong{margin-top:var(--ds-space-025);font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.current-assignment-card span{margin-top:var(--ds-space-025);font:var(--ds-font-body-small);color:var(--ds-text-subtle)}
.context-route-note,.facility-context{padding:var(--ds-space-100);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-050);background:var(--ds-background-subtle);font:var(--ds-font-body)}
.facility-context p{margin:2px 0}
.quick-incident-form{display:grid;gap:var(--ds-space-100)}
.quick-incident-form label{display:grid;gap:var(--ds-space-050);font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.quick-incident-form input,.quick-incident-form select,.quick-incident-form textarea{min-height:36px;font:var(--ds-font-body);font-weight:var(--ds-font-weight-regular)}
.quick-incident-grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--ds-space-100)}

/* Operations is a proper edge drawer and owns the entire right edge while open. */
.operations-drawer{position:absolute;right:0;top:0;bottom:0;z-index:70;width:min(440px,calc(100% - 64px));display:flex;flex-direction:column;background:var(--ds-surface-overlay);border-left:1px solid var(--ds-border);box-shadow:var(--ds-shadow-overlay);transform:translateX(102%);visibility:hidden;transition:transform .16s ease,visibility .16s}
.operations-drawer.open{transform:translateX(0);visibility:visible}
.operations-drawer>header{min-height:56px;padding:var(--ds-space-100) var(--ds-space-150);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--ds-border)}
.operations-drawer>header>div{display:flex;flex-direction:column}
.operations-drawer>header strong{font:var(--ds-font-heading-small)}
.operations-tabs{display:grid;grid-template-columns:repeat(4,1fr);padding:0 var(--ds-space-100);border-bottom:1px solid var(--ds-border)}
.operations-tabs button{min-height:40px;padding:0 var(--ds-space-075);border:0;border-bottom:2px solid transparent;background:transparent;color:var(--ds-text-subtle);font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.operations-tabs button:hover{background:var(--ds-background-neutral)}
.operations-tabs button.active{border-bottom-color:var(--ds-border-selected);color:var(--ds-text-brand);font-weight:var(--ds-font-weight-semibold)}
.operations-filter{padding:var(--ds-space-150);border-bottom:1px solid var(--ds-border)}
.operations-list{flex:1;overflow:auto;padding:var(--ds-space-050);overscroll-behavior:contain}
.operations-row{width:100%;display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:var(--ds-space-100);padding:var(--ds-space-100);border:0;border-bottom:1px solid var(--ds-border);background:transparent;color:var(--ds-text);text-align:left}
.operations-row:hover{background:var(--ds-background-neutral)}
.operations-row strong,.operations-row small{display:block}
.operations-row strong{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.operations-row small{margin-top:var(--ds-space-025);font:var(--ds-font-body-small);color:var(--ds-text-subtle)}
.operations-row>b{font:var(--ds-font-body-small);color:var(--ds-text-subtle)}
.ops-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:var(--ds-border-radius-050);background:var(--ds-background-neutral)}
.ops-icon .icon{width:16px;height:16px}
.operations-empty{padding:var(--ds-space-200);margin:0}
.operations-footer{display:flex;gap:var(--ds-space-150);flex-wrap:wrap;padding:var(--ds-space-100) var(--ds-space-150) max(var(--ds-space-100),env(safe-area-inset-bottom));border-top:1px solid var(--ds-border)}

/* Response tray has a reserved bottom-center region. */
.live-map-shell .map-card>.telemetry{position:absolute;left:50%;bottom:var(--ds-space-100);z-index:30;width:min(900px,calc(100% - 220px));max-height:220px;padding:var(--ds-space-100);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-200);background:var(--ds-surface-overlay);box-shadow:var(--ds-shadow-overlay);transform:translateX(-50%);overflow:hidden}
.live-map-shell .telemetry-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:var(--ds-space-075);max-height:158px;padding:0;overflow:auto}
.live-map-shell .telemetry-row{min-width:0;min-height:58px;grid-template-columns:28px minmax(0,1fr) auto;gap:var(--ds-space-075);padding:var(--ds-space-075) var(--ds-space-100);border:0;border-radius:var(--ds-border-radius-050);background:var(--ds-background-subtle);overflow:hidden}
.live-map-shell .telemetry-row img{width:27px;height:31px;object-fit:contain}
.live-map-shell .telemetry-identity{min-width:0}
.live-map-shell .telemetry-identity strong,.live-map-shell .telemetry-identity>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-map-shell .telemetry-identity strong{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.live-map-shell .telemetry-identity>span{font:var(--ds-font-body-small)}
.live-map-shell .telemetry-journey{min-width:80px;text-align:right}
.live-map-shell .telemetry-eta{font:var(--ds-font-body-small);font-weight:var(--ds-font-weight-medium)}
.live-map-shell .telemetry:has(#telemetry-empty:not([hidden])){display:none}

/* When a modal-like map surface is open, hide nonessential floating telemetry/toasts behind it. */
/* Only one interactive overlay lane is exposed at a time. This avoids the
   common map failure where navigation, search, layers and record panels stack. */
.live-map-shell:has(.context-sheet:not([hidden])) .map-toolbar,
.live-map-shell:has(.live-list-island:not([hidden])) .map-toolbar,
.live-map-shell:has(.operations-drawer.open) .map-toolbar,
.live-map-shell:has(.context-sheet:not([hidden])) .maplibregl-ctrl-top-right,
.live-map-shell:has(.live-list-island:not([hidden])) .maplibregl-ctrl-top-right,
.live-map-shell:has(.operations-drawer.open) .maplibregl-ctrl-top-right{visibility:hidden}
.live-map-shell:has(.operations-drawer.open) .live-search-island{visibility:hidden;pointer-events:none}
.live-map-shell:has(.context-sheet:not([hidden])) .telemetry,
.live-map-shell:has(.live-list-island:not([hidden])) .telemetry,
.live-map-shell:has(.operations-drawer.open) .telemetry{opacity:0;pointer-events:none}
.live-map-shell:has(.context-sheet:not([hidden])) .map-message,
.live-map-shell:has(.live-list-island:not([hidden])) .map-message,
.live-map-shell:has(.operations-drawer.open) .map-message{opacity:0}
.map-loading-preview{background:var(--ds-surface);color:var(--ds-text-subtle);font:var(--ds-font-body)}
.map-loading-preview span{padding:var(--ds-space-100) var(--ds-space-150);border-radius:var(--ds-border-radius-100);background:var(--ds-background-neutral);box-shadow:var(--ds-shadow-raised)}

@media (min-width:901px){
  body.live-page .staff-topbar{left:var(--app-sidenav-width);margin-left:0}
  body.live-page .sidebar{top:var(--app-banner-height)}
}
.demo-shell .telemetry-row{pointer-events:none}

/* ADS-style incident marker: strong enough to scan, compact enough not to cover the map. */
.incident-map-marker{
  width:30px;height:30px;display:grid;place-items:center;border:2px solid var(--ds-surface);
  border-radius:var(--ds-border-radius-circle);background:var(--ds-background-danger-bold);
  color:var(--ds-icon-inverse);box-shadow:var(--ds-shadow-raised);cursor:pointer;position:relative;z-index:90
}
.maplibregl-marker.incident-map-marker{z-index:90!important}
.maplibregl-marker.vehicle-marker{z-index:30!important}
.selection-map-marker{position:relative;width:24px;height:24px;border:3px solid var(--ds-surface);border-radius:50% 50% 50% 0;background:var(--ds-background-brand-bold);box-shadow:var(--ds-shadow-overlay);transform:rotate(-45deg)}
.selection-map-marker::after{content:'';position:absolute;left:50%;top:50%;width:7px;height:7px;border-radius:var(--ds-border-radius-circle);background:var(--ds-surface);transform:translate(-50%,-50%)}

.incident-map-marker .icon{width:16px;height:16px;stroke-width:1.5}
.incident-map-marker.severity-high{background:var(--ds-background-accent-orange-bolder,var(--ds-background-warning-bold))}
.incident-map-marker.severity-moderate{background:var(--ds-background-warning-bold)}
.incident-map-marker.severity-low{background:var(--ds-background-brand-bold)}
.incident-map-marker:hover,.incident-map-marker:focus-visible{transform:translateY(-1px);box-shadow:var(--ds-shadow-overlay)}
.incident-map-marker[role="img"]{cursor:default}

/* Call intake lives in the map workspace instead of being a separate page. */
.live-intake-island{width:min(430px,calc(100% - 84px));max-height:calc(100% - 76px);overflow:auto}
.live-intake-form{display:grid;gap:var(--ds-space-150);padding:var(--ds-space-150);overflow:auto}
.compact-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--ds-space-100)}
.compact-form-grid .live-intake-location{grid-column:1/-1}
.live-intake-form .field{font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.live-intake-form input,.live-intake-form select,.live-intake-form textarea{font:var(--ds-font-body)}
.intake-location-row{display:flex;align-items:center;gap:var(--ds-space-100);flex-wrap:wrap}
.intake-location-row .muted{font:var(--ds-font-body-small)}
.intake-actions{margin-top:0}

/* Live map follows the sidebar hide/show state without leaving an empty strip. */
@media (min-width:901px){
  body.live-page.sidebar-hidden .workspace{left:0}
  body.live-page.sidebar-hidden .staff-topbar{left:0}
}
@media (max-width:560px){
  .live-intake-island{left:var(--ds-space-100);right:var(--ds-space-100);top:auto;bottom:var(--ds-space-100);width:auto;max-height:76vh;border-radius:var(--ds-border-radius-200)}
  .live-intake-form{max-height:calc(76vh - 48px)}
  .compact-form-grid{grid-template-columns:1fr}
  .compact-form-grid .live-intake-location{grid-column:auto}
}


/* Demo map controls: one ADS toolbar; Focus is optional, manual pan remains available. */
.demo-map-toolbar{position:absolute;left:var(--ds-space-150);top:var(--ds-space-150);z-index:44;display:flex;align-items:center;gap:var(--ds-space-075);max-width:calc(100% - 96px);pointer-events:none}
.demo-map-toolbar>*{pointer-events:auto}
.demo-layer-menu .layer-options{left:0;right:auto;top:40px}
.demo-focus-readout{display:inline-flex;align-items:center;gap:var(--ds-space-075);min-height:32px;max-width:min(480px,60vw);padding:0 var(--ds-space-100);border-radius:var(--ds-border-radius-050);background:var(--ds-background-neutral);color:var(--ds-text);font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.demo-focus-readout .icon{width:16px;height:16px;color:var(--ds-icon-brand);flex:0 0 auto}
.demo-focus-readout span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.demo-focus-readout[hidden]{display:none}
.map-mode-demo .vehicle-state{background:var(--ds-surface-overlay);border-color:var(--ds-border);box-shadow:var(--ds-shadow-raised)}
.map-mode-demo{border:1px solid var(--ds-border)}
.map-mode-demo .map-frame{border-radius:var(--ds-border-radius-200)}
.map-mode-demo .map-message{left:var(--ds-space-150);top:56px;bottom:auto;transform:none;max-width:min(420px,calc(100% - 96px))}
.map-mode-demo .maplibregl-ctrl-top-right{top:var(--ds-space-150);right:var(--ds-space-150)}
.map-mode-demo .maplibregl-ctrl-group button{width:32px;height:32px;background-color:var(--ds-surface-overlay)}
.maplibregl-ctrl-group button:hover{background-color:var(--ds-background-neutral-hovered)}
@media (max-width:767px){
  .demo-map-toolbar{left:var(--ds-space-100);top:var(--ds-space-100);right:56px;max-width:none;flex-wrap:wrap}
  .demo-focus-readout{order:3;flex-basis:100%;max-width:100%}
  .demo-layer-menu .layer-options{position:fixed;left:var(--ds-space-100);right:var(--ds-space-100);top:auto;bottom:var(--ds-space-100);width:auto;max-height:70dvh}
  .map-mode-demo .map-message{left:var(--ds-space-100);top:92px;max-width:calc(100% - 72px)}
  .map-mode-demo .maplibregl-ctrl-top-right{top:var(--ds-space-100);right:var(--ds-space-100)}
}

/* --------------------------------------------------------------------------
   Map control clarity pass: opaque controls, icon-first actions, compact ops rail
   -------------------------------------------------------------------------- */
.map-icon-control{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-height:40px;padding:0;border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-100);background:var(--ds-surface);color:var(--ds-icon);box-shadow:var(--ds-shadow-raised);cursor:pointer;list-style:none}
.map-icon-control:hover{background:var(--ds-background-neutral);color:var(--ds-text)}
.map-icon-control:active{background:var(--ds-background-neutral-hovered)}
.map-icon-control[aria-pressed="true"]{background:var(--ds-background-selected);border-color:var(--ds-border-selected);color:var(--ds-icon-brand)}
.map-icon-control .icon{width:17px;height:17px}
.layer-menu summary.map-icon-control::-webkit-details-marker{display:none}
.map-context,.layer-options,.map-message,.map-no-script,.map-fallback p,.maplibregl-popup-content,.maplibregl-ctrl-group{background:var(--ds-surface)!important}
.layer-options{border-color:var(--ds-border-bold);box-shadow:var(--ds-shadow-overlay)}
.map-context{border-color:var(--ds-border);box-shadow:var(--ds-shadow-raised)}

/* Operations map tool rail is a true icon rail, not another sidebar. */
.floating-island{background:var(--ds-surface);border-color:var(--ds-border);box-shadow:var(--ds-shadow-overlay)}
.eoc-map-dock{left:var(--ds-space-150);top:var(--ds-space-150);width:52px;padding:var(--ds-space-050);gap:var(--ds-space-025);overflow:visible}
.eoc-map-dock>button{position:relative;width:42px;height:42px;min-height:42px;padding:0;justify-content:center;border-radius:var(--ds-border-radius-100);color:var(--ds-icon)}
.eoc-map-dock>button:hover,.eoc-map-dock>button:focus-visible{background:var(--ds-background-neutral);color:var(--ds-text)}
.eoc-map-dock>button[aria-pressed="true"]{background:var(--ds-background-selected);color:var(--ds-icon-brand)}
.eoc-map-dock .icon{width:18px;height:18px}
.eoc-map-dock .dock-primary{background:var(--ds-background-brand-bold);color:var(--ds-text-inverse);box-shadow:var(--ds-shadow-raised)}
.eoc-map-dock .dock-primary:hover,.eoc-map-dock .dock-primary:focus-visible{background:var(--ds-background-brand-bold-hovered);color:var(--ds-text-inverse)}
.dock-divider{height:1px;margin:var(--ds-space-025) var(--ds-space-050);background:var(--ds-border)}
.dock-count{position:absolute;right:-5px;top:-5px;min-width:18px;height:18px;min-height:18px;padding:0 4px;border:2px solid var(--ds-surface);font:var(--ds-font-body-small);font-weight:var(--ds-font-weight-bold);box-shadow:none}
.eoc-map-dock>button[data-tooltip]::after{content:attr(data-tooltip);position:absolute;left:calc(100% + 10px);top:50%;z-index:90;transform:translateY(-50%) translateX(-4px);opacity:0;pointer-events:none;white-space:nowrap;padding:var(--ds-space-050) var(--ds-space-075);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-050);background:var(--ds-surface-overlay);color:var(--ds-text);box-shadow:var(--ds-shadow-raised);font:var(--ds-font-body-small);font-weight:var(--ds-font-weight-medium);transition:opacity .1s ease,transform .1s ease}
.eoc-map-dock>button[data-tooltip]:hover::after,.eoc-map-dock>button[data-tooltip]:focus-visible::after{opacity:1;transform:translateY(-50%) translateX(0)}

/* Reclaim the space removed from the old text dock. */
.live-search-island{left:76px;width:min(560px,calc(100% - 156px))}
.ops-status-bar{left:76px;max-width:calc(100% - 152px)}
.live-list-island{left:76px}
.live-intake-island{width:min(430px,calc(100% - 100px))}

/* Demo controls are fully legible on satellite imagery. */
.demo-map-toolbar{gap:var(--ds-space-075)}
.demo-focus-readout{min-height:40px;padding:0 var(--ds-space-150);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-100);background:var(--ds-surface);box-shadow:var(--ds-shadow-raised);color:var(--ds-text)}
.demo-focus-readout .icon{color:var(--ds-icon-brand)}
.demo-layer-menu .layer-options{top:48px}
.map-mode-demo .map-message{top:64px;background:var(--ds-surface)!important}
.map-mode-demo .maplibregl-ctrl-group button{background-color:var(--ds-surface)}

/* Report verification happens on the map because an incident needs an exact point. */
.map-point-required{color:var(--ds-text-warning);font:var(--ds-font-body-small);font-weight:var(--ds-font-weight-semibold)}
.report-review-form{display:grid;gap:var(--ds-space-150)}
.report-review-form label{display:grid;gap:var(--ds-space-050);font:var(--ds-font-body);font-weight:var(--ds-font-weight-medium)}
.report-review-summary{display:grid;gap:var(--ds-space-050);padding-bottom:var(--ds-space-125);border-bottom:1px solid var(--ds-border)}
.report-review-summary>strong{font:var(--ds-font-heading-xsmall)}
.report-review-summary>span{color:var(--ds-text-subtle)}
.report-review-summary>p{margin:var(--ds-space-050) 0 0;white-space:pre-wrap}
.report-map-confirmation{display:flex;align-items:center;justify-content:space-between;gap:var(--ds-space-150);padding:var(--ds-space-125);border:1px solid var(--ds-border);border-radius:var(--ds-border-radius-100);background:var(--ds-background-subtle)}
.report-map-confirmation>div{display:grid;gap:var(--ds-space-025);min-width:0}
.report-map-confirmation>div>span{font:var(--ds-font-body-small);color:var(--ds-text-subtle)}
.report-map-confirmation.needs-point{border-color:var(--ds-border-warning);background:var(--ds-background-warning)}
.report-map-confirmation.needs-point>div>span{color:var(--ds-text-warning)}
@media (max-width:560px){.report-map-confirmation{align-items:stretch;flex-direction:column}.report-map-confirmation .button{width:100%}}
