.fleet-map{height:490px;border:1px solid #dce5ed;border-radius:14px;z-index:0;background:#e6edf1}
.location-picker{height:280px;border:1px solid #dce5ed;border-radius:10px;z-index:0;margin-bottom:12px;background:#e6edf1}
.fleet-pagination{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:18px 0;color:#596b7d}
.fleet-toolbar{display:flex;gap:12px;flex-wrap:wrap;margin:24px 0}
.fleet-cluster-count{background:transparent;border:0;box-shadow:none;color:#fff;font-weight:700;font-size:13px}
.leaflet-container{font-family:inherit}.leaflet-popup-content .btn{margin-top:8px}.leaflet-control-attribution a{color:#133f70}
#clientDetail .summary-grid{margin-bottom:24px}#clientDetail .section-heading{margin-top:28px}
@media(max-width:700px){.fleet-map{height:380px}.location-picker{height:240px}.fleet-pagination{align-items:flex-start}.fleet-toolbar .btn{flex:1 1 40%}}

/* The map owns the viewport; navigation and installation management remain reachable. */
#page-map:not([hidden]){position:fixed;inset:0;z-index:1100;background:#e6edf1}
body:has(#workspace:not([hidden]) #page-map:not([hidden])){overflow:hidden}
#page-map .fleet-map{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:0}
.map-top-controls{position:absolute;z-index:500;top:16px;left:16px;right:16px;display:flex;gap:8px;align-items:center;pointer-events:none}
.map-top-controls>*{pointer-events:auto;box-shadow:0 3px 14px #142a4526}
.map-top-controls select{width:auto;max-width:260px;margin:0;background:#fff;color:#203750;padding:10px;border:1px solid #ccd8e4;border-radius:7px}
.map-overview,.map-locations{position:absolute;z-index:500;background:#fff;color:#203750;border:1px solid #dce5ed;border-radius:12px;box-shadow:0 5px 24px #142a4526}
.map-overview{top:76px;left:16px;width:300px;padding:18px}
.map-overview h2{font-size:17px;margin:0 0 5px}.map-overview #mapStatus{font-size:12px;margin:0 0 12px;color:#526b86}
.map-telemetry{display:flex;align-items:flex-start;gap:10px;padding:9px 0;border-top:1px solid #e1e8f0}
.map-telemetry i{width:9px;height:9px;flex:none;border-radius:50%;background:#8192a3;margin-top:4px}
.map-telemetry.good i{background:#258258}.map-telemetry.generating i,.map-telemetry.warning i{background:#da9c25}.map-telemetry.danger i{background:#d55252}
.map-telemetry b{display:block;font-size:10px;letter-spacing:1px}.map-telemetry span{display:block;font-size:13px;margin-top:3px}.map-telemetry small,.map-freshness{display:block;font-size:11px;line-height:1.5;color:#61778e;margin-top:4px}
.map-popup-telemetry{min-width:210px;margin-top:12px}.map-locations{left:16px;bottom:24px;max-width:min(850px,calc(100% - 80px))}
.map-locations summary{cursor:pointer;padding:13px 18px;font-weight:650;font-size:13px}.map-location-content{padding:0 18px 16px;max-height:45dvh;overflow:auto}.map-location-content .table-wrap{margin:0}
#page-map .leaflet-popup-content-wrapper,#page-map .leaflet-popup-tip{background:#fff;color:#203750}
[data-theme="dark"] .map-overview,[data-theme="dark"] .map-locations,[data-theme="dark"] #page-map .leaflet-popup-content-wrapper,[data-theme="dark"] #page-map .leaflet-popup-tip{background:#1d2a38;color:#e0eaf3;border-color:#42566d}
[data-theme="dark"] .map-telemetry{border-color:#42566d}[data-theme="dark"] .map-freshness,[data-theme="dark"] .map-telemetry small,[data-theme="dark"] .map-overview #mapStatus{color:#afc0d0}
[data-theme="dark"] .map-top-controls select{background:#1d2a38;color:#e0eaf3;border-color:#42566d}
@media(max-width:700px){.map-top-controls{top:10px;left:10px;right:10px;gap:5px;flex-wrap:wrap}.map-top-controls .btn{padding:9px;font-size:11px}.map-top-controls select{padding:8px;max-width:145px;font-size:11px}.map-overview{top:94px;left:10px;width:235px;padding:12px}.map-overview h2{font-size:15px}.map-telemetry{padding:6px 0}.map-telemetry span{font-size:12px}.map-locations{left:10px;bottom:24px}.map-freshness{font-size:10px}}
@media(max-width:700px){.map-overview{top:64px;width:calc(100% - 20px);padding:10px}.map-overview #mapStatus{font-size:10px;margin-bottom:6px}#mapTelemetry{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.map-overview .map-telemetry{gap:5px}.map-overview .map-telemetry b{font-size:8px;letter-spacing:.4px}.map-overview .map-telemetry span,.map-overview .map-telemetry small{font-size:10px}.map-freshness{display:none}}
@media(max-width:360px){.map-overview{top:94px}.map-top-controls select{max-width:130px}}

/* Recolor only the cartography; status colors, controls and attribution stay intact. */
[data-theme="dark"] :is(.fleet-map,.location-picker){background:#17232c}
[data-theme="dark"] :is(.fleet-map,.location-picker) .leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) saturate(.45) brightness(.85) contrast(.9)}
.industrial-map-marker{--marker-state:#8192a3;background:transparent;border:0;filter:drop-shadow(0 3px 4px #08111c66)}
.industrial-map-marker.good{--marker-state:#258258}.industrial-map-marker.generating{--marker-state:#da9c25}.industrial-map-marker.warning{--marker-state:#da9c25}.industrial-map-marker.fuel-alert{--marker-state:#d55252}
.industrial-marker-body{position:relative;display:grid;place-items:center;width:46px;height:40px;border:2px solid var(--marker-state);border-radius:6px;background:#f3f6f9;color:#243d54;box-shadow:inset 0 -4px 0 #243d5414}
.industrial-marker-body:after{content:'';position:absolute;bottom:-6px;left:17px;width:9px;height:9px;background:var(--marker-state);transform:rotate(45deg);z-index:-1}
.industrial-marker-body svg{width:37px;height:33px}.industrial-map-marker:focus-visible{outline:3px solid #248ee9;outline-offset:5px;border-radius:6px}
.industrial-marker-count{position:absolute;top:-8px;right:-8px;min-width:21px;height:21px;padding:0 4px;display:grid;place-items:center;border-radius:4px;background:var(--marker-state);color:#fff;font-size:11px;font-weight:800;border:1px solid #fff}
[data-theme="dark"] .industrial-marker-body{background:#243441;color:#d9e5ed;box-shadow:inset 0 -4px 0 #0003}
[data-theme="dark"] .industrial-map-marker.good{--marker-state:#6acb9d}[data-theme="dark"] .industrial-map-marker.generating,[data-theme="dark"] .industrial-map-marker.warning{--marker-state:#ecb64f}[data-theme="dark"] .industrial-map-marker.fuel-alert{--marker-state:#f07676}
[data-theme="dark"] .industrial-marker-count{background:#243441;color:#e0eaf3;border-color:var(--marker-state)}
.map-device-preview{padding:10px 0;border-bottom:1px solid #dce5ed}.map-device-preview:last-child{border-bottom:0}
.map-device-preview>strong{display:block;font-size:13px}.map-sample-age,.map-preview-note{display:block;font-size:10px;color:#61778e;line-height:1.5;margin:5px 0}
.map-device-preview dl{margin:10px 0}.map-device-preview dl>div{display:flex;justify-content:space-between;align-items:baseline;gap:14px;margin:7px 0;font-size:11px}.map-device-preview dt{color:#61778e}.map-device-preview dd{margin:0;text-align:right;font-weight:650}
.map-preview-pages{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px;margin-top:10px}.map-fuel-warning{padding:7px;border:1px solid #d55252;border-radius:5px;font-size:11px;color:#a32b36}
[data-theme="dark"] .map-device-preview{border-color:#42566d}[data-theme="dark"] :is(.map-sample-age,.map-preview-note,.map-device-preview dt){color:#afc0d0}[data-theme="dark"] .map-fuel-warning{color:#f699a2}
