:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-raised: #ffffff;
  --line: #cbd5e1;
  --line-soft: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --subtle: #64748b;
  --cyan: #0b63d1;
  --cyan-soft: rgba(20, 124, 255, 0.1);
  --blue: #0b63d1;
  --blue-soft: rgba(20, 124, 255, 0.1);
  --amber: #9a4b00;
  --amber-soft: rgba(234, 124, 18, 0.12);
  --rose: #c62828;
  --rose-soft: rgba(198, 40, 40, 0.1);
  --green: #15803d;
  --green-soft: rgba(21, 128, 61, 0.1);
  --radius: 18px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.detail-open {
  overflow: hidden;
}

.topbar,
main,
footer {
  width: min(1800px, 100%);
  margin-inline: auto;
  padding-inline: 18px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding-block: 26px 22px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(20, 124, 255, 0.3);
  border-radius: 12px;
  color: var(--cyan);
  background: linear-gradient(145deg, rgba(20, 124, 255, 0.15), rgba(20, 124, 255, 0.03));
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.18rem, 4.5vw, 1.55rem);
  font-weight: 720;
  letter-spacing: -0.035em;
}

.connection {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  margin-top: 4px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 0.72rem;
  font-weight: 650;
}

#connection-label {
  overflow-wrap: anywhere;
}

.connection-dot,
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
}

.connection.is-live .connection-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.connection.is-degraded .connection-dot {
  background: var(--rose);
  box-shadow: 0 0 0 4px var(--rose-soft);
}

.error-banner {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(198, 40, 40, 0.28);
  border-radius: 14px;
  color: #991b1b;
  background: var(--rose-soft);
}

.source-strip {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface);
}

.source-strip > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.source-strip strong,
.source-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.source-mode {
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--muted);
  background: rgba(139, 151, 168, 0.1);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.source-mode.is-demo {
  color: var(--amber);
  background: var(--amber-soft);
}

.source-mode.is-live {
  color: var(--green);
  background: var(--green-soft);
}

.demo-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(234, 124, 18, 0.3);
  border-radius: 14px;
  color: #7c3d00;
  background:
    linear-gradient(90deg, rgba(234, 124, 18, 0.13), rgba(234, 124, 18, 0.05));
}

.demo-banner[hidden] {
  display: none;
}

.demo-banner > span {
  padding: 7px 9px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--amber);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.demo-banner p {
  margin: 3px 0 0;
  color: #8a4b0f;
  font-size: 0.72rem;
}

.error-banner[hidden] {
  display: none;
}

.error-banner p {
  margin: 3px 0 0;
  color: #991b1b;
  font-size: 0.78rem;
}

.error-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 7px;
  color: var(--rose);
  background: var(--rose-soft);
  font-size: 0.75rem;
  font-weight: 900;
}

.fleet-health {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(20, 124, 255, 0.18);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.fleet-health-header {
  display: grid;
  gap: 8px;
  margin-bottom: 13px;
}

.fleet-health-header h2 {
  margin: 0;
  font-size: 1.04rem;
  letter-spacing: -0.02em;
}

.fleet-health-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
}

.fleet-health-summary time {
  color: var(--subtle);
}

.fleet-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fleet-health-card {
  display: grid;
  min-width: 0;
  min-height: 110px;
  align-content: space-between;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  color: inherit;
  background: var(--surface-raised);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.fleet-health-card:hover {
  border-color: rgba(20, 124, 255, 0.34);
  background: rgba(20, 124, 255, 0.055);
}

.fleet-health-card:focus-visible {
  border-color: var(--cyan);
  outline: 3px solid rgba(20, 124, 255, 0.2);
  outline-offset: 2px;
}

.fleet-health-card[aria-pressed="true"] {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  box-shadow: inset 0 0 0 1px rgba(20, 124, 255, 0.16);
}

.fleet-health-card-heading,
.fleet-health-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fleet-health-card-heading {
  justify-content: flex-start;
}

.fleet-health-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-size: 0.63rem;
  font-weight: 900;
}

.metric-offline .fleet-health-icon {
  color: var(--rose);
  background: var(--rose-soft);
}

.metric-online .fleet-health-icon,
.metric-moving .fleet-health-icon {
  color: var(--green);
  background: var(--green-soft);
}

.metric-idle .fleet-health-icon,
.metric-staleGps .fleet-health-icon,
.metric-activeAlerts .fleet-health-icon,
.metric-lowVoltage .fleet-health-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.metric-demo .fleet-health-icon,
.metric-synthetic .fleet-health-icon,
.metric-withoutTelemetry .fleet-health-icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.fleet-health-label {
  min-width: 0;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 750;
  line-height: 1.25;
}

.fleet-health-count {
  font-size: 1.65rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  line-height: 1;
}

.fleet-health-percentage {
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--muted);
  background: rgba(139, 151, 168, 0.1);
  font-size: 0.63rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.fleet-health-card-time {
  overflow: hidden;
  color: var(--subtle);
  font-size: 0.58rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-health-unavailable {
  grid-column: 1 / -1;
}

.fleet-activity-panel {
  margin-bottom: 12px;
}

.fleet-activity-header {
  align-items: flex-start;
}

.fleet-activity-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--subtle);
  font-size: 0.64rem;
  font-weight: 650;
}

.fleet-activity-controls {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}

.fleet-activity-filters,
.fleet-activity-quick-filters {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.fleet-activity-filter,
.fleet-activity-quick-filter {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-raised);
  font: inherit;
  font-size: 0.64rem;
  font-weight: 760;
  cursor: pointer;
}

.fleet-activity-quick-filter {
  border-style: dashed;
}

.fleet-activity-filter:hover,
.fleet-activity-quick-filter:hover {
  color: var(--text);
  border-color: rgba(20, 124, 255, 0.32);
}

.fleet-activity-filter:focus-visible,
.fleet-activity-quick-filter:focus-visible {
  border-color: var(--cyan);
  outline: 3px solid rgba(20, 124, 255, 0.18);
  outline-offset: 2px;
}

.fleet-activity-filter[aria-pressed="true"],
.fleet-activity-quick-filter[aria-pressed="true"] {
  color: var(--cyan);
  border-color: rgba(20, 124, 255, 0.4);
  background: var(--cyan-soft);
}

.fleet-activity-cache-status {
  margin: 0;
  padding: 9px 16px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.fleet-activity-cache-status[hidden] {
  display: none;
}

.fleet-activity-feed {
  max-height: 620px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.fleet-activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fleet-activity-item {
  border-bottom: 1px solid var(--line-soft);
}

.fleet-activity-item:last-child {
  border-bottom: 0;
}

.fleet-activity-item.is-selected {
  background: rgba(20, 124, 255, 0.065);
  box-shadow: inset 3px 0 var(--cyan);
}

.fleet-activity-event {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 13px 16px;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.fleet-activity-event:hover {
  background: rgba(20, 124, 255, 0.04);
}

.fleet-activity-event:focus-visible {
  outline: 3px solid rgba(20, 124, 255, 0.24);
  outline-offset: -3px;
}

.fleet-activity-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-size: 0.59rem;
  font-weight: 900;
}

.fleet-activity-icon.category-alerts {
  color: var(--amber);
  background: var(--amber-soft);
}

.fleet-activity-icon.category-trips {
  color: var(--blue);
  background: var(--blue-soft);
}

.fleet-activity-icon.category-receipts {
  color: var(--blue);
  background: var(--blue-soft);
}

.fleet-activity-content {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.fleet-activity-headline {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 9px;
}

.fleet-activity-time {
  color: var(--muted);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
}

.fleet-activity-vehicle {
  color: var(--cyan);
  font-size: 0.68rem;
}

.fleet-activity-title {
  min-width: 0;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 730;
}

.fleet-activity-description {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-activity-badges {
  display: flex;
  min-width: 0;
  grid-column: 2;
  flex-wrap: wrap;
  gap: 5px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.kpi-card {
  position: relative;
  display: grid;
  min-height: 132px;
  grid-template-columns: auto 1fr;
  align-content: start;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.kpi-card::after {
  position: absolute;
  right: -28px;
  bottom: -48px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--cyan-soft);
  content: "";
  filter: blur(6px);
}

.kpi-card:nth-child(2)::after {
  background: var(--blue-soft);
}

.kpi-card:nth-child(3)::after {
  background: var(--amber-soft);
}

.kpi-card:nth-child(4)::after {
  background: var(--blue-soft);
}

.kpi-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-size: 0.68rem;
  font-weight: 850;
}

.kpi-icon-trips {
  color: var(--blue);
  background: var(--blue-soft);
}

.kpi-icon-alerts {
  color: var(--amber);
  background: var(--amber-soft);
}

.kpi-icon-receipts {
  color: var(--blue);
  background: var(--blue-soft);
}

.kpi-card p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.kpi-card strong {
  display: block;
  font-size: clamp(1.75rem, 8vw, 2.3rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  line-height: 1;
}

.kpi-note {
  align-self: end;
  grid-column: 1 / -1;
  color: var(--subtle);
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-grid {
  display: grid;
  gap: 12px;
}

.map-panel {
  isolation: isolate;
  margin-bottom: 12px;
}

.map-panel .panel-header {
  align-items: flex-start;
  flex-direction: column;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-symbol {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
}

.legend-symbol.is-moving {
  color: var(--green);
}

.legend-symbol.is-idle {
  color: var(--amber);
}

.legend-symbol.is-offline {
  color: var(--rose);
}

.map-stage {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  background: #eef2f7;
}

.fleet-map {
  width: 100%;
  height: 290px;
  background: #eef2f7;
}

.fleet-map:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
}

.fleet-map.leaflet-container {
  color: #18212b;
  font-family: inherit;
}

.fleet-map .leaflet-control-zoom a {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface-raised);
}

.fleet-map .leaflet-control-zoom a:hover,
.fleet-map .leaflet-control-zoom a:focus {
  color: var(--cyan);
  background: var(--surface);
}

.fleet-map .leaflet-control-attribution {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
}

.fleet-map .leaflet-control-attribution a {
  color: var(--cyan);
}

.vehicle-map-marker-shell {
  border: 0;
  background: transparent;
}

.vehicle-map-marker {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 3px solid #ffffff;
  border-radius: 50% 50% 50% 10px;
  color: #ffffff;
  background: var(--green);
  box-shadow:
    0 7px 20px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  font-size: 0.82rem;
  font-weight: 950;
  transform: rotate(-45deg);
}

.vehicle-map-marker > span {
  transform: rotate(45deg);
}

.vehicle-map-marker.is-idle {
  color: #ffffff;
  background: var(--amber);
}

.vehicle-map-marker.is-offline {
  color: #fff;
  background: var(--rose);
}

.vehicle-map-marker.is-selected {
  box-shadow:
    0 7px 20px rgba(0, 0, 0, 0.42),
    0 0 0 4px #fff,
    0 0 0 7px rgba(20, 124, 255, 0.7);
}

.fleet-map .vehicle-map-tooltip {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
  font-size: 0.7rem;
  font-weight: 750;
}

.fleet-map .vehicle-map-tooltip::before {
  border-top-color: var(--surface-raised);
}

.vehicle-map-tooltip-content,
.vehicle-map-popup-content {
  display: grid;
  gap: 3px;
  min-width: 180px;
  line-height: 1.35;
}

.vehicle-map-tooltip-content strong,
.vehicle-map-popup-content strong {
  color: var(--text);
  font-size: 0.78rem;
}

.vehicle-map-tooltip-content span,
.vehicle-map-tooltip-content time,
.vehicle-map-popup-content span,
.vehicle-map-popup-content time {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-style: normal;
}

.vehicle-map-tooltip-content .map-location-source,
.vehicle-map-popup-content .map-location-source {
  margin-top: 3px;
  color: var(--cyan);
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.fleet-map .vehicle-map-popup .leaflet-popup-content-wrapper,
.fleet-map .vehicle-map-popup .leaflet-popup-tip {
  color: var(--text);
  background: var(--surface-raised);
}

.fleet-map .vehicle-map-popup .leaflet-popup-content {
  margin: 12px 14px;
}

.map-fallback {
  position: absolute;
  z-index: 700;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 28px;
  color: var(--muted);
  background: rgba(248, 250, 252, 0.96);
  text-align: center;
  pointer-events: none;
}

.map-fallback[hidden] {
  display: none;
}

.map-fallback.is-tile-warning {
  inset: auto 12px 12px;
  display: block;
  max-width: min(420px, calc(100% - 24px));
  padding: 10px 12px;
  border: 1px solid rgba(234, 124, 18, 0.3);
  border-radius: 10px;
  color: #7c3d00;
  background: #fff7ed;
  text-align: left;
}

.map-fallback strong {
  display: block;
  color: var(--text);
  font-size: 0.8rem;
}

.map-fallback p {
  max-width: 44ch;
  margin: 5px auto 0;
  font-size: 0.7rem;
  line-height: 1.5;
}

.map-fallback.is-tile-warning strong,
.map-fallback.is-tile-warning p {
  display: inline;
  margin: 0;
  color: inherit;
}

.map-status {
  min-height: 38px;
  margin: 0;
  padding: 11px 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.demo-vehicle-toggle {
  padding: 7px 9px;
  border: 1px solid rgba(234, 124, 18, 0.3);
  border-radius: 9px;
  color: var(--amber);
  background: var(--amber-soft);
  font: inherit;
  font-size: 0.6rem;
  font-weight: 800;
  cursor: pointer;
}

.demo-vehicle-toggle:hover,
.demo-vehicle-toggle:focus-visible,
.demo-vehicle-toggle[aria-pressed="true"] {
  border-color: var(--amber);
  color: #7c3d00;
  outline: none;
}

.location-mode {
  display: inline-flex;
  margin-top: 8px;
  padding: 4px 7px;
  border: 1px solid rgba(234, 124, 18, 0.28);
  border-radius: 999px;
  color: var(--amber);
  background: rgba(234, 124, 18, 0.08);
  font-size: 0.57rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.location-mode.is-live {
  border-color: rgba(20, 124, 255, 0.3);
  color: var(--cyan);
  background: rgba(20, 124, 255, 0.08);
}

.location-mode.is-degraded {
  border-color: rgba(234, 124, 18, 0.42);
  color: #7c3d00;
  background: rgba(234, 124, 18, 0.13);
}

.count-badge {
  min-width: 29px;
  padding: 6px 9px;
  border-radius: 9px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.count-badge-alert {
  color: var(--amber);
  background: var(--amber-soft);
}

.panel-body {
  min-height: 178px;
}

.vehicle-row,
.alert-row,
.trip-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.interactive-row {
  width: 100%;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease;
}

.interactive-row:hover,
.interactive-row:focus-visible {
  background: rgba(20, 124, 255, 0.055);
  outline: none;
}

.interactive-row:focus-visible {
  box-shadow: inset 3px 0 var(--cyan);
}

.interactive-row.is-selected {
  background: rgba(20, 124, 255, 0.08);
  box-shadow: inset 3px 0 var(--cyan);
}

.vehicle-row:last-child,
.alert-row:last-child,
.trip-row:last-child {
  border-bottom: 0;
}

.vehicle-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.vehicle-primary,
.alert-primary,
.trip-primary {
  min-width: 0;
}

.vehicle-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.vehicle-title-line .row-title {
  margin-bottom: 0;
}

.synthetic-label {
  flex: 0 0 auto;
  padding: 3px 5px;
  border: 1px solid rgba(234, 124, 18, 0.28);
  border-radius: 5px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.row-title {
  overflow: hidden;
  margin: 0 0 5px;
  font-size: 0.85rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.row-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(21, 128, 61, 0.16);
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 0.65rem;
  font-weight: 750;
  white-space: nowrap;
}

.status-pill::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-pill.is-warning {
  border-color: rgba(234, 124, 18, 0.16);
  color: var(--amber);
  background: var(--amber-soft);
}

.status-pill.is-muted {
  border-color: var(--line);
  color: var(--muted);
  background: rgba(139, 151, 168, 0.08);
}

.alert-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.severity-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 0.75rem;
  font-weight: 900;
}

.severity-icon.is-critical {
  color: var(--rose);
  background: var(--rose-soft);
}

.trip-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.trip-duration {
  color: var(--blue);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.empty-state,
.unavailable-state {
  display: grid;
  min-height: 178px;
  place-content: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong,
.unavailable-state strong {
  margin-bottom: 5px;
  color: var(--text);
  font-size: 0.82rem;
}

.empty-state p,
.unavailable-state p {
  max-width: 32ch;
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.5;
}

.unavailable-state strong {
  color: var(--rose);
}

.loading-list {
  display: grid;
  gap: 1px;
}

.loading-list span {
  height: 61px;
  background:
    linear-gradient(90deg, transparent, rgba(20, 124, 255, 0.06), transparent),
    var(--surface);
  background-size: 200% 100%;
  animation: loading 1.4s ease-in-out infinite;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding-block: 18px 26px;
  color: var(--subtle);
  font-size: 0.68rem;
}

footer p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

footer .pulse {
  background: var(--cyan);
  box-shadow: 0 0 0 4px var(--cyan-soft);
}

.detail-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(5px);
}

.detail-backdrop[hidden] {
  display: none;
}

.detail-panel {
  width: 100%;
  max-height: min(82vh, 720px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  background: var(--surface);
  box-shadow: -24px 0 70px rgba(15, 23, 42, 0.18);
}

.detail-header {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.detail-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.detail-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-raised);
  font: inherit;
  font-size: 1.25rem;
  cursor: pointer;
}

.detail-close:hover,
.detail-close:focus-visible {
  border-color: var(--cyan);
  color: var(--text);
  outline: none;
}

.detail-content {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.detail-section {
  min-width: 0;
}

.operational-status-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
}

.operational-status-symbol {
  font-size: 1.25rem;
  line-height: 1;
}

.operational-status-label {
  font-size: 1.15rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.operational-status-hero.is-offline {
  border-color: rgba(198, 40, 40, 0.42);
  background: var(--rose-soft);
}

.operational-status-hero.is-alert,
.operational-status-hero.is-idle {
  border-color: rgba(234, 124, 18, 0.38);
  background: var(--amber-soft);
}

.operational-status-hero.is-moving {
  border-color: rgba(21, 128, 61, 0.34);
  background: var(--green-soft);
}

.operational-notices {
  display: grid;
  gap: 7px;
}

.operational-notice {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.45;
}

.operational-notice.is-warning {
  border-color: rgba(234, 124, 18, 0.34);
  color: #7c3d00;
  background: var(--amber-soft);
}

.operational-notice.is-info,
.operational-notice.is-ok {
  border-color: rgba(20, 124, 255, 0.25);
  color: var(--cyan);
  background: var(--cyan-soft);
}

.detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.detail-section-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

.detail-disclosure {
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(139, 151, 168, 0.035);
}

.detail-disclosure > summary {
  margin: 0;
  padding: 12px;
  cursor: pointer;
  list-style-position: inside;
}

.detail-disclosure > summary::marker {
  color: var(--cyan);
}

.detail-disclosure > summary:hover,
.detail-disclosure > summary:focus-visible {
  background: rgba(20, 124, 255, 0.045);
  outline: none;
}

.detail-disclosure-body {
  padding: 0 12px 12px;
}

.detail-disclosure-body > .detail-grid {
  margin: 0;
}

.telemetry-unavailable-message {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(83, 162, 255, 0.24);
  border-radius: 10px;
  color: var(--muted);
  background: var(--blue-soft);
  font-size: 0.72rem;
  line-height: 1.45;
}

.technical-diagnostics > .detail-disclosure-body,
.raw-telemetry > .detail-disclosure-body,
.identity-diagnostics > .detail-disclosure-body {
  padding: 0 12px 12px;
}

.detail-source-badge {
  max-width: 70%;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(139, 151, 168, 0.08);
  font-size: 0.52rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  line-height: 1.25;
  text-align: right;
}

.detail-source-badge.is-live {
  border-color: rgba(20, 124, 255, 0.32);
  color: var(--cyan);
  background: var(--cyan-soft);
}

.detail-source-badge.is-projection {
  border-color: rgba(83, 162, 255, 0.32);
  color: var(--blue);
  background: var(--blue-soft);
}

.detail-source-badge.is-degraded,
.detail-source-badge.is-synthetic {
  border-color: rgba(234, 124, 18, 0.32);
  color: var(--amber);
  background: var(--amber-soft);
}

.active-alert-count {
  display: inline-grid;
  min-width: 26px;
  min-height: 26px;
  place-items: center;
  padding-inline: 7px;
  border: 1px solid rgba(234, 124, 18, 0.28);
  border-radius: 999px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 0.65rem;
  font-weight: 850;
}

.vehicle-alert-list {
  display: grid;
  gap: 10px;
}

.vehicle-alert-card {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--subtle);
  border-radius: 13px;
  color: var(--text);
  background: var(--surface-raised);
  font: inherit;
  text-align: left;
}

.vehicle-alert-card > summary {
  cursor: pointer;
  list-style: none;
}

.vehicle-alert-card > summary::-webkit-details-marker {
  display: none;
}

.vehicle-alert-card > summary:hover,
.vehicle-alert-card > summary:focus-visible {
  border-color: var(--cyan);
  outline: none;
  box-shadow: 0 0 0 2px var(--cyan-soft);
}

.vehicle-alert-card-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 12px;
  padding: 12px;
}

.vehicle-alert-card-heading {
  grid-column: 1 / -1;
}

.vehicle-alert-age,
.vehicle-alert-more {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.vehicle-alert-more {
  color: var(--cyan);
}

.vehicle-alert-detail {
  display: grid;
  gap: 9px;
  padding: 0 12px 12px;
  border-top: 1px solid var(--line-soft);
}

.vehicle-alert-detail > .detail-grid {
  margin-top: 10px;
}

.vehicle-alert-card.severity-critical,
.vehicle-alert-card.severity-high {
  border-left-color: var(--rose);
}

.vehicle-alert-card.severity-warning {
  border-left-color: var(--amber);
}

.vehicle-alert-card.severity-info {
  border-left-color: var(--blue);
}

.vehicle-alert-card-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.vehicle-alert-card-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.vehicle-alert-severity,
.vehicle-alert-state {
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
}

.vehicle-alert-card.severity-critical .vehicle-alert-severity,
.vehicle-alert-card.severity-high .vehicle-alert-severity {
  color: var(--rose);
}

.vehicle-alert-card.severity-warning .vehicle-alert-severity {
  color: var(--amber);
}

.vehicle-alert-card.severity-info .vehicle-alert-severity {
  color: var(--blue);
}

.vehicle-alert-state {
  color: var(--muted);
}

.alert-source-badge {
  justify-self: start;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(139, 151, 168, 0.08);
  font-size: 0.52rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  line-height: 1.25;
}

.alert-source-badge.is-synthetic,
.alert-source-badge.is-degraded {
  border-color: rgba(234, 124, 18, 0.32);
  color: var(--amber);
  background: var(--amber-soft);
}

.alert-source-badge.is-live {
  border-color: rgba(20, 124, 255, 0.32);
  color: var(--cyan);
  background: var(--cyan-soft);
}

.alert-diagnostic,
.vehicle-alert-empty {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 0.72rem;
  line-height: 1.5;
}

.alert-diagnostic {
  margin-bottom: 10px;
  border-color: rgba(198, 40, 40, 0.32);
  color: #991b1b;
  background: var(--rose-soft);
  font-weight: 700;
}

.timeline-event-count {
  display: inline-grid;
  min-width: 26px;
  min-height: 26px;
  place-items: center;
  padding-inline: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 0.65rem;
  font-weight: 850;
}

.timeline-cached-state,
.timeline-empty-state {
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 0.72rem;
  line-height: 1.5;
}

.timeline-cached-state {
  border-color: rgba(234, 124, 18, 0.32);
  color: var(--amber);
  background: var(--amber-soft);
  font-weight: 700;
}

.timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.timeline-filter {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-raised);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 750;
  cursor: pointer;
}

.timeline-filter:hover,
.timeline-filter:focus-visible {
  border-color: var(--cyan);
  color: var(--text);
  outline: none;
}

.timeline-filter[aria-pressed="true"] {
  border-color: rgba(20, 124, 255, 0.42);
  color: var(--cyan);
  background: var(--cyan-soft);
}

.operations-timeline {
  display: grid;
  min-width: 0;
  max-height: 420px;
  gap: 10px;
  margin: 0;
  overflow-y: auto;
  padding: 0;
  list-style: none;
}

.timeline-event {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 13px;
  background: var(--surface-raised);
}

.timeline-event.severity-critical,
.timeline-event.severity-high {
  border-left-color: var(--rose);
}

.timeline-event.severity-warning {
  border-left-color: var(--amber);
}

.timeline-event.severity-info {
  border-left-color: var(--blue);
}

.timeline-event-button {
  display: grid;
  min-width: 0;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.timeline-event-button:hover,
.timeline-event-button:focus-visible,
.timeline-event-button[aria-expanded="true"] {
  background: rgba(20, 124, 255, 0.045);
  outline: none;
}

.timeline-event-button:focus-visible {
  box-shadow: inset 0 0 0 2px var(--cyan);
}

.timeline-event-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 0.58rem;
  font-weight: 900;
}

.timeline-event-icon.category-alerts,
.timeline-event.severity-warning .timeline-event-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.timeline-event.severity-critical .timeline-event-icon,
.timeline-event.severity-high .timeline-event-icon {
  color: var(--rose);
  background: var(--rose-soft);
}

.timeline-event-content {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.timeline-event-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 9px;
}

.timeline-event-time {
  color: var(--text);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.timeline-event-age,
.timeline-event-description {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.45;
}

.timeline-event-title {
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.timeline-event-badges {
  display: flex;
  grid-column: 2;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-source-badge,
.timeline-severity {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.5rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.timeline-source-badge.is-live {
  border-color: rgba(20, 124, 255, 0.32);
  color: var(--cyan);
  background: var(--cyan-soft);
}

.timeline-source-badge.is-synthetic,
.timeline-source-badge.is-degraded {
  border-color: rgba(234, 124, 18, 0.32);
  color: var(--amber);
  background: var(--amber-soft);
}

.timeline-source-badge.is-projection {
  color: var(--muted);
  background: rgba(139, 151, 168, 0.08);
}

.timeline-severity {
  color: var(--blue);
  background: var(--blue-soft);
}

.timeline-severity.is-critical,
.timeline-severity.is-high {
  color: var(--rose);
  background: var(--rose-soft);
}

.timeline-severity.is-warning {
  color: var(--amber);
  background: var(--amber-soft);
}

.timeline-event-detail {
  padding: 0 12px 12px 56px;
}

.timeline-event-detail .detail-grid {
  border-radius: 10px;
}

.detail-grid {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: var(--line-soft);
}

.detail-item {
  display: grid;
  grid-template-columns: minmax(105px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 12px;
  background: var(--surface-raised);
}

.detail-item dt,
.detail-item dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.74rem;
}

.detail-item dt {
  color: var(--muted);
}

.detail-item dd {
  color: var(--text);
  font-weight: 680;
  text-align: right;
}

@media (max-width: 419px) {
  .detail-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-source-badge {
    max-width: 100%;
    text-align: left;
  }

  .detail-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .detail-item dd {
    text-align: left;
  }

  .vehicle-alert-card-heading {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .vehicle-alert-state {
    grid-column: 1 / -1;
  }

  .timeline-event-badges {
    grid-column: 1 / -1;
  }

  .timeline-event-detail {
    padding-left: 12px;
  }
}

@keyframes loading {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@media (min-width: 720px) {
  .topbar,
  main,
  footer {
    padding-inline: 28px;
  }

  .topbar {
    align-items: center;
    padding-block: 30px 24px;
  }

  .source-strip {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .source-strip > p {
    text-align: right;
  }

  .fleet-health-header {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .fleet-health-summary {
    justify-content: flex-end;
    text-align: right;
  }

  .fleet-health-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .fleet-activity-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .fleet-activity-quick-filters {
    justify-content: flex-end;
  }

  .fleet-activity-event {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  .fleet-activity-badges {
    grid-column: auto;
    justify-content: flex-end;
  }

  .map-panel .panel-header {
    align-items: center;
    flex-direction: row;
  }

  .map-legend {
    justify-content: flex-end;
  }

  .map-stage,
  .fleet-map {
    min-height: 390px;
    height: 390px;
  }

  .kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .kpi-card {
    min-height: 142px;
    padding: 18px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vehicle-panel {
    grid-column: 1 / -1;
  }

  .detail-panel {
    width: min(520px, 92vw);
    height: 100%;
    max-height: none;
    border-radius: 20px 0 0 20px;
  }
}

@media (min-width: 1120px) {
  .map-stage,
  .fleet-map {
    min-height: 450px;
    height: 450px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.91fr) minmax(0, 0.91fr);
  }

  .vehicle-panel {
    grid-column: auto;
  }
}

@media (min-width: 1280px) {
  .topbar {
    padding-block: 18px 14px;
  }

  main {
    display: grid;
    grid-template-areas:
      "source source"
      "health health"
      "kpis kpis"
      "map vehicles"
      "activity activity"
      "alerts trips";
    grid-template-columns: minmax(0, 1.9fr) minmax(420px, 0.9fr);
    gap: 12px;
  }

  main:has(.demo-banner:not([hidden])) {
    grid-template-areas:
      "source source"
      "demo demo"
      "health health"
      "kpis kpis"
      "map vehicles"
      "activity activity"
      "alerts trips";
  }

  main:has(.error-banner:not([hidden])) {
    grid-template-areas:
      "source source"
      "error error"
      "health health"
      "kpis kpis"
      "map vehicles"
      "activity activity"
      "alerts trips";
  }

  main:has(.demo-banner:not([hidden])):has(.error-banner:not([hidden])) {
    grid-template-areas:
      "source source"
      "demo demo"
      "error error"
      "health health"
      "kpis kpis"
      "map vehicles"
      "activity activity"
      "alerts trips";
  }

  .source-strip {
    grid-area: source;
    margin-bottom: 0;
    padding-block: 9px;
  }

  .demo-banner {
    grid-area: demo;
    margin-bottom: 0;
  }

  .error-banner {
    grid-area: error;
    margin-bottom: 0;
  }

  .fleet-health {
    grid-area: health;
    margin-bottom: 0;
    padding: 13px;
  }

  .fleet-health-header {
    margin-bottom: 9px;
  }

  .fleet-health-grid {
    gap: 6px;
  }

  .fleet-health-card {
    min-height: 88px;
    gap: 7px;
    padding: 10px;
  }

  .fleet-health-count {
    font-size: 1.45rem;
  }

  .fleet-health-card-time {
    font-size: 0.55rem;
  }

  .kpi-grid {
    grid-area: kpis;
    margin-bottom: 0;
    gap: 10px;
  }

  .kpi-card {
    min-height: 112px;
    padding: 14px;
  }

  .panel-header {
    min-height: 64px;
    padding: 14px 16px;
  }

  .map-panel {
    grid-area: map;
    margin-bottom: 0;
  }

  .map-stage,
  .fleet-map {
    min-height: clamp(520px, 56vh, 760px);
    height: clamp(520px, 56vh, 760px);
  }

  .fleet-activity-panel {
    grid-area: activity;
    margin-bottom: 0;
  }

  .dashboard-grid {
    display: contents;
  }

  .vehicle-panel {
    display: flex;
    min-height: 0;
    max-height: calc(clamp(520px, 56vh, 760px) + 103px);
    flex-direction: column;
    grid-area: vehicles;
  }

  .vehicle-panel .panel-body {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .alert-panel {
    grid-area: alerts;
  }

  .trip-panel {
    grid-area: trips;
  }
}

@media (min-width: 1440px) {
  .topbar,
  main,
  footer {
    padding-inline: 32px;
  }

  .fleet-health-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-list span,
  .interactive-row,
  .fleet-health-card,
  .fleet-activity-filter,
  .fleet-activity-quick-filter,
  .fleet-activity-event,
  .timeline-filter,
  .timeline-event-button {
    animation: none;
    transition: none;
  }
}
