/* Exempt from the Brand v2 colour sweep (V2-d): the map's colours are map data (regions, roads, water, markers) and
   the leaflet library under public/vendor/leaflet keeps its own. Nothing here is a screen role. */
@import url('/vendor/leaflet/leaflet.css');

/* The overview is the opening workspace. Existing attention queues follow it. */
body[data-app-view="dashboard"] .hero-shell { display: none; }
#dashboardView > .feature-hero { min-height: 0; padding: 10px 0 22px; background: none; border: 0; box-shadow: none; }
#dashboardView > .feature-hero h1 { font-size: clamp(26px, 2.8vw, 36px); }
.fleet-map-section { --fleet-map-height: clamp(480px, 56vh, 590px); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 15px; background: var(--panel); box-shadow: var(--shadow); margin-bottom: 28px; }
.fleet-map-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 18px 20px 12px; }
.fleet-map-head h2 { font-size: 20px; }
.fleet-map-head .feature-eyebrow { margin-bottom: 5px; }
.fleet-map-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.fleet-map-actions button { min-height: 36px; padding: 7px 10px; font-size: 12px; }
.map-connection { padding: 10px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ok); background: var(--panel-2); }
.map-connection::before { content: ''; display: inline-block; height: 7px; width: 7px; border-radius: 50%; background: currentColor; margin-right: 8px; }
.map-connection.is-delayed { color: var(--warn); }
.map-demo { background: var(--warn-soft); color: var(--warn); padding: 8px 20px; font-size: 12px; font-weight: 600; }
.map-gps-attention { margin: 12px 20px; padding: 12px 14px; border: 1px solid var(--warn); border-left-width: 4px; border-radius: 8px; background: var(--warn-soft); }
.map-gps-attention h3 { font-size: 14px; color: var(--warn); margin: 0; }
#dashboardView .map-gps-attention p { margin: 4px 0 8px; font-size: 11px; color: var(--muted); }
.map-gps-attention-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 7px 0; }
.map-gps-attention-row > span { min-width: 0; overflow-wrap: anywhere; }
.map-gps-attention-row strong { font-size: 13px; }
.map-gps-attention-row > span > span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.map-gps-attention-row button { flex-shrink: 0; min-height: 36px; padding: 7px 12px; font-size: 12px; }
.fleet-map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: var(--fleet-map-height); border-top: 1px solid var(--line); }
.fleet-map-canvas-wrap { position: relative; min-width: 0; min-height: var(--fleet-map-height); }
#fleetMapCanvas { height: 100%; min-height: var(--fleet-map-height); width: 100%; background: #c8dee8; font-family: var(--font-body); z-index: 0; }
.fleet-map-sidebar { display: flex; flex-direction: column; height: var(--fleet-map-height); min-height: 0; border-left: 1px solid var(--line); background: var(--panel); }
.map-search-wrap { padding: 14px 14px 9px; }
.map-search-wrap label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 6px; }
.map-search-wrap input { width: 100%; min-height: 39px; background: var(--panel-2); }
.map-filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 7px; }
.map-filter-row select { min-width: 0; width: 100%; font-size: 11px; padding: 7px 5px; }
.map-list-heading { display: flex; align-items: center; justify-content: space-between; padding: 7px 14px; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--line); }
.map-list-heading button { font-size: 11px; }
.map-asset-list { overflow: auto; min-height: 110px; flex: 1; overscroll-behavior: contain; }
button.map-asset-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; background: var(--panel); display: flex; align-items: center; gap: 8px; padding: 13px 14px; text-align: left; }
button.map-asset-row:hover, button.map-asset-row.selected { background: var(--accent-soft); }
button.map-asset-row.selected { box-shadow: inset 3px 0 var(--accent); }
.map-asset-row > span { min-width: 0; }
.map-asset-row strong { font-size: 12px; color: var(--heading); }
.map-asset-row small { display: block; color: var(--muted); font-weight: 400; font-size: 10px; margin-top: 3px; overflow-wrap: anywhere; }
.map-row-status { margin-left: auto; text-align: right; font-size: 10px; flex-shrink: 0; }
.map-dot { height: 8px; width: 8px; border-radius: 50%; background: #4c7796; flex-shrink: 0; display: inline-block; }
.map-dot.on { background: #20794f; }
.map-dot.stale { background: #b07915; }
.map-dot.missing { background: #818d98; }
.map-empty { padding: 28px 16px; text-align: center; font-size: 13px; color: var(--muted); }
.map-legend { display: flex; flex-wrap: wrap; gap: 12px; position: absolute; bottom: 26px; left: 10px; right: 10px; width: fit-content; max-width: calc(100% - 20px); z-index: 1; background: #fffffff0; color: #2a3441; border: 1px solid #c6d4dd; border-radius: 7px; padding: 7px 10px; font-size: 10px; pointer-events: none; }
.map-legend span { display: flex; align-items: center; gap: 5px; }
.map-foot { border-top: 1px solid var(--line); padding: 10px 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 16px; color: var(--muted); font-size: 11px; }
.map-coverage { flex-basis: 100%; white-space: pre-line; line-height: 1.65; }
.fleet-marker { background: transparent; border: 0; color: #fff; }
.fleet-marker > span { display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid white; border-radius: 50%; background: #4c7796; box-shadow: 0 1px 6px #263d5277; font-size: 14px; }
.fleet-marker.on > span { background: #20794f; }
.fleet-marker.stale > span { background: #b07915; }
.fleet-marker.selected > span { outline: 3px solid #142e45; outline-offset: 2px; }
.fleet-marker b { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); color: #1c3549; background: #ffffffed; padding: 2px 4px; border-radius: 3px; font-size: 9px; font-weight: 650; white-space: nowrap; box-shadow: 0 1px 3px #263d5220; }
.map-town-label { pointer-events: none; font-size: 10px; color: #435968; text-shadow: 0 1px #fff, 1px 0 #fff, -1px 0 #fff, 0 -1px #fff; }
.map-town-label span { display: block; text-align: center; }
.map-quick-facts { padding: 12px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-strong); background: var(--panel-2); max-height: calc(var(--fleet-map-height) - 215px); overflow: auto; flex-shrink: 0; }
.fleet-map-sidebar:has(.map-quick-facts:not(.hidden)) .map-asset-list { min-height: 60px; }
.map-facts-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.map-facts-head h3 { margin: 3px 0 7px; font-size: 18px; color: var(--heading); }
.map-facts-head .feature-eyebrow { font-size: 9px; }
.map-facts-head button { font-size: 20px; min-width: 32px; min-height: 32px; padding: 0; }
.map-state { border-radius: 5px; background: var(--accent-soft); padding: 3px 6px; font-size: 10px; font-weight: 650; }
.map-state.stale { background: var(--warn-soft); color: var(--warn); }
.map-state.on { background: var(--ok-soft); color: var(--ok); }
#dashboardView .map-report-time { color: var(--muted); font-size: 10px; margin: 7px 0 8px; }
.map-facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; margin: 0 0 9px; }
.map-facts-grid dt { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.map-facts-grid dd { margin: 1px 0 0; color: var(--text); font-size: 11px; overflow-wrap: anywhere; }
#dashboardView .map-location-text, #dashboardView .map-unmatched-note { font-size: 11px; margin-bottom: 9px; overflow-wrap: anywhere; }
.map-open-asset { width: 100%; min-height: 36px; }
.map-record-links { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; margin-bottom: 10px; }
.map-record-links button { padding: 5px 6px; font-size: 10px; flex: 1; }
.map-base-error { position: absolute; top: 10px; left: 50px; right: 50px; z-index: 1; background: #fff8e8; color: #715419; border: 1px solid #dfc28c; padding: 8px; border-radius: 6px; font-size: 11px; }
.dashboard-attention-heading { margin-bottom: 14px; }
.dashboard-attention-heading h2 { font-size: 21px; margin-bottom: 5px; }
.dashboard-attention-heading p { font-size: 13px; }
@media (max-width: 1350px) and (min-width: 1121px) { .fleet-map-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 780px) {
  /* The same actions remain in New / import; give the opening map room on phones. */
  #dashboardView > .feature-hero .feature-hero-actions { display: none; }
  .fleet-map-layout { grid-template-columns: 1fr; }
  .fleet-map-canvas-wrap, #fleetMapCanvas { height: 380px; min-height: 380px; }
  .fleet-map-sidebar { height: auto; max-height: 700px; border-left: 0; border-top: 1px solid var(--line); }
  .map-asset-list { max-height: 250px; min-height: 150px; }
  .map-quick-facts { max-height: none; }
  .map-legend { font-size: 9px; gap: 7px; }
  .map-foot { font-size: 10px; }
  .fleet-map-head { padding: 14px; }
  .fleet-map-actions button { min-height: 40px; }
  #dashboardView > .feature-hero { padding-bottom: 16px; }
  .map-asset-row { min-height: 52px; }
}
@media print { .fleet-map-section { break-inside: avoid; } .fleet-map-sidebar { height: auto; } .map-asset-list { max-height: none; } }
