.map-shell {
  position: relative;
  background: #ece7e1;
}

#fleet-map {
  height: 410px;
  width: 100%;
  background: #ece7e1;
}

#fleet-map::after { content: none; }

.leaflet-container {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
}

.leaflet-tile-pane {
  filter: saturate(.72) sepia(.08) brightness(1.02);
}

.leaflet-control-zoom a {
  color: var(--ink);
  border-color: var(--line);
}

.leaflet-tooltip {
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  color: var(--ink);
  padding: 8px 10px;
}

.leaflet-control-attribution {
  font-size: 9px;
}

.map-card {
  z-index: 500;
  max-width: min(330px, calc(100% - 40px));
}

.map-card small {
  display: block;
  line-height: 1.45;
}

.map-card small + small {
  margin-top: 2px;
  color: #a65a2c;
}

.map-fallback {
  height: 100%;
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  color: var(--muted);
  padding: 24px;
}

.map-fallback b { color: var(--ink); }

.work-summary {
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
  background: #fffaf6;
}

.work-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.work-summary-head > div {
  display: grid;
  gap: 3px;
}

.work-summary-head small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.work-summary-head b {
  font: 700 17px Manrope, sans-serif;
}

.session-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #efefec;
  color: #68716c;
}

.session-state::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
}

.session-state.online { background: #fff0e4; color: var(--forest); }
.session-state.offline { background: #efefec; color: #68716c; }
.session-state.neutral::before { display: none; }

.session-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.session-metrics > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.session-metrics small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 7px;
}

.session-metrics strong {
  display: block;
  color: var(--ink);
  font: 700 17px Manrope, sans-serif;
  white-space: nowrap;
}

.session-foot,
.session-empty {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.courier-list { padding: 8px 14px; }

button.courier {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.courier-copy { min-width: 0; }

.courier.selected {
  background: #fff0e4;
  border-radius: 12px;
  padding-left: 9px;
  padding-right: 9px;
  box-shadow: inset 3px 0 var(--forest);
}

.courier:focus-visible {
  outline: 3px solid rgba(216, 100, 31, .28);
  outline-offset: 2px;
  border-radius: 12px;
}

.work-paused {
  margin: 12px 16px 0;
  padding: 12px 14px;
  border: 1px solid #f0c5a7;
  border-radius: 12px;
  background: #fff0e4;
  color: #8f4217;
  display: grid;
  gap: 2px;
  font-size: 12px;
}

.work-paused span { color: var(--muted); font-size: 11px; }
.work-disabled { opacity: 0.42; pointer-events: none; user-select: none; }
button:disabled { cursor: not-allowed; opacity: 0.48; }

@media (max-width: 720px) {
  #fleet-map { height: 340px; }
  .session-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-summary { padding: 16px; }
}
