:root {
  color-scheme: dark;
  --bg: #11171e;
  --panel: #1a2028;
  --raised: #242c36;
  --border: #353e49;
  --text: #f2f5f8;
  --muted: #a9b4c1;
  --accent: #72d6b5;
  --yellow: #e6f505;
  --danger: #bb3333;
  --rail: 58px;
  --drawer: 400px;
  font-family: Arial, Helvetica, system-ui, sans-serif;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button,
select {
  cursor: pointer;
}
button {
  border: 0;
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.65;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h2 {
  font-size: 14px;
}
h3 {
  font-size: 13px;
}
.muted {
  color: var(--muted);
  line-height: 1.5;
}
.small {
  font-size: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.eyebrow {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 1.2px;
}
/* A thin status header leaves most of the screen to the map. */
.topbar {
  height: 52px;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: #111820;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.brand img {
  width: 30px;
  height: 30px;
}
.brand-light {
  font-weight: 400;
}
.header-resource {
  border-left: 1px solid var(--border);
  padding-left: 14px;
  min-width: 0;
}
.own-vehicle {
  display: flex;
  gap: 16px;
  align-items: center;
}
.vehicle-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vehicle-top svg {
  width: 22px;
  color: var(--accent);
}
.vehicle-id {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.vehicle-subtitle {
  display: none;
}
.vehicle-state {
  display: flex;
  align-items: center;
  gap: 8px;
}
.own-vehicle > p {
  display: none;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--status-color, var(--accent));
  font-weight: 600;
  white-space: nowrap;
}
.status-pill:before {
  content: "";
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #0008;
}
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 8px;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
}
.topbar-end {
  margin-left: auto;
}
.clock {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}
.connection {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 240px;
  color: var(--muted);
  font-size: 11px;
}
.connection span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a0a9b4;
}
.connection[data-state="ready"] .status-dot,
.status-dot.ready {
  background: #72d6b5;
}
.connection[data-state="demo"] .status-dot {
  background: #e6d172;
}
.connection[data-state="error"] .status-dot,
.connection[data-state="disconnected"] .status-dot,
.connection[data-state="denied"] .status-dot {
  background: #f36d6d;
}
.demo-badge,
.mock-badge,
.mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 4px 6px;
  border: 1px solid #606d7a;
  border-radius: 4px;
  color: #c2cbd5;
  background: #26313c;
}
.demo-badge,
.mock-badge {
  border-color: #9b813b;
  color: #f5d986;
  background: #3a3220;
}
.notice {
  padding: 7px 15px;
  background: #3a3020;
  border-bottom: 1px solid #77613d;
  color: #f4d287;
  font-size: 12px;
  z-index: 5;
}
/* One right drawer, with its tab rail always reachable. */
.workspace {
  position: relative;
  flex: 1;
  min-height: 0;
  --occupied: var(--rail);
}
.workspace[data-drawer-open="true"] {
  --occupied: calc(var(--rail) + var(--drawer));
}
.map-panel {
  position: absolute;
  inset: 0;
  right: var(--occupied);
  overflow: hidden;
  background: #151e27;
}
.map {
  position: absolute;
  inset: 0;
}
.right-drawer {
  position: absolute;
  top: 0;
  bottom: 0;
  right: var(--rail);
  width: var(--drawer);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: -3px 0 14px #0004;
  z-index: 4;
}
.workspace[data-drawer-open="false"] .right-drawer {
  visibility: hidden;
  pointer-events: none;
}
.drawer-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px 7px 14px;
  min-height: 56px;
  border-bottom: 1px solid var(--border);
  background: #202731;
  flex-shrink: 0;
}
.drawer-heading > div {
  flex: 1;
  min-width: 0;
}
.drawer-heading h1 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}
.drawer-heading > div > span {
  color: var(--muted);
  font-size: 11px;
  display: block;
  margin-top: 3px;
}
.icon-button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
}
.icon-button:hover {
  background: var(--raised);
}
#drawer-close {
  font-size: 31px;
  border: 0;
  width: 36px;
  min-width: 36px;
}
.drawer-pane {
  flex: 1;
  min-height: 0;
}
.live-pane {
  display: flex;
  flex-direction: column;
}
.missions-pane,
.mock-pane {
  overflow: auto;
  padding: 12px;
}
.drawer-rail {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #111820;
  border-left: 1px solid #414c58;
  z-index: 6;
}
.drawer-rail > button {
  position: relative;
  min-height: 53px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  color: #b9c5d1;
  border-left: 3px solid transparent;
  padding: 4px 3px 4px 0;
  font-size: 10px;
  flex-shrink: 0;
}
.drawer-rail > button svg {
  width: 23px;
  height: 23px;
}
.drawer-rail > button[aria-selected="true"] {
  background: #283440;
  border-left-color: var(--accent);
  color: #fff;
}
.drawer-rail > button:hover {
  background: #25313d;
}
.drawer-rail > .rail-toggle {
  min-height: 44px;
  border-bottom: 1px solid var(--border);
}
.drawer-rail > .rail-settings {
  margin-top: auto;
  min-height: 50px;
  border-top: 1px solid var(--border);
}
.rail-count {
  position: absolute;
  top: 4px;
  right: 3px;
  min-width: 14px;
  padding: 1px 3px;
  border-radius: 3px;
  background: #34424f;
  font-size: 9px;
  font-weight: 400;
}
.mock-indicator {
  position: absolute;
  right: 7px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c9aa5b;
}
.mission-context {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--border);
}
#mission-resource-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mission-heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 12px 0 9px;
}
.mission-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mission-card {
  display: block;
  width: 100%;
  min-height: 87px;
  text-align: left;
  border: 1px solid var(--border);
  border-left: 3px solid #526270;
  background: #202833;
  border-radius: 5px;
  padding: 9px 10px;
}
.mission-card.selected {
  border-color: #72d6b5;
  background: #25352f;
}
.mission-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}
.mission-card .row-title {
  font-size: 15px;
  margin-top: 5px;
}
.mission-card .row-description {
  font-size: 13px;
}
.mission-card .row-bottom {
  margin-top: 3px;
}
.mission-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
  margin-top: 7px;
}
.mock-status-box {
  border-top: 1px solid var(--border);
  margin-top: 14px;
}
.quick-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.quick-status-grid button {
  min-height: 44px;
  border: 1px solid #59636c;
  border-radius: 5px;
  background: #252d35;
  font-size: 12px;
  font-weight: 600;
}
.quick-status-grid button:hover {
  background: #3b382b;
  border-color: #c4a95e;
}
.mock-footnote {
  font-size: 11px;
  color: #c6b98d;
  line-height: 1.5;
  margin-top: 8px;
}
.priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  height: 25px;
  border-radius: 4px;
  background: var(--priority-color, #515050);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-shadow: 0 1px 1px #0008;
  box-shadow: inset 0 0 0 1px #ffffff24;
}
.priority[data-code="H"],
.priority[data-code="V"],
.priority[data-code="V1"] {
  color: #142010;
  text-shadow: none;
}
/* Small translucent cockpit floats over the lower-left map, like legacy. */
.floating-cockpit {
  position: absolute;
  left: 12px;
  bottom: 31px;
  width: 286px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 3;
  pointer-events: none;
}
.floating-cockpit > * {
  pointer-events: auto;
}
.glass-card {
  border: 1px solid #75818e65;
  border-radius: 5px;
  background: #0b111bf2;
  color: #fff;
  box-shadow: 0 3px 13px #0005;
}
.incident-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  min-height: 65px;
  text-align: left;
  width: 100%;
  overflow: hidden;
}
.incident-summary .priority,
.summary-priority {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  font-size: 18px;
  border-radius: 5px;
}
.summary-priority {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.summary-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.summary-text strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.1px;
}
.summary-text small {
  font-size: 12px;
  color: #d3dce6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.direction-instructions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 55px;
  padding: 5px 8px;
}
.direction-arrow {
  font-family: Arial, sans-serif;
  font-size: 40px;
  line-height: 1;
  width: 38px;
  text-align: center;
}
.direction-instructions > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.direction-instructions strong {
  display: block;
  font-size: 21px;
  line-height: 1.1;
}
.direction-instructions small {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 3px;
}
.direction-instructions .mock-badge {
  font-size: 9px;
  padding: 3px 4px;
  align-self: flex-start;
}
.direction-map-card {
  height: 172px;
  position: relative;
  overflow: hidden;
}
.direction-map-card > div {
  position: absolute;
  inset: 0;
}
.mini-map-label {
  position: absolute;
  top: 7px;
  left: 8px;
  padding: 4px 6px;
  background: #111820de;
  border: 1px solid #526070;
  font-size: 10px;
  letter-spacing: 1px;
  border-radius: 4px;
}
.mini-map-label b {
  margin-left: 5px;
  color: #fff;
}
.mini-heading {
  position: absolute;
  right: 7px;
  top: 7px;
  min-width: 44px;
  height: 44px;
  border: 1px solid #657382;
  background: #101923ed;
  font-size: 25px;
  border-radius: 5px;
}
.mini-map-state {
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-size: 10px;
  padding: 4px 6px;
  background: #0a111cdb;
  color: #dce4ed;
  border-radius: 3px;
}
.eta-toggle {
  position: relative;
  min-height: 58px;
  padding: 7px 11px;
  text-align: left;
}
.route-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 13px;
  padding-right: 17px;
}
.route-card > span {
  min-width: 0;
  display: flex;
  gap: 7px;
  align-items: baseline;
}
.route-card small {
  font-size: 9px;
  letter-spacing: 0.6px;
  color: #c1ccda;
}
.route-card strong {
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
  white-space: nowrap;
}
.route-card > .route-distance {
  grid-column: 1/-1;
  font-size: 11px;
  color: #c2cfdb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.collapse-caret {
  position: absolute;
  right: 10px;
  top: 16px;
  font-size: 23px;
}
.floating-cockpit.collapsed #direction-instructions,
.floating-cockpit.collapsed #direction-map-card {
  display: none;
}
.floating-cockpit.collapsed .collapse-caret {
  transform: rotate(180deg);
}
/* Map tools stay compact; their hit targets remain at least 44px. */
.map-tools {
  position: absolute;
  top: 10px;
  left: 11px;
  right: 11px;
  display: flex;
  gap: 5px;
  align-items: center;
  pointer-events: none;
}
.map-tools > * {
  pointer-events: auto;
}
.map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid #63717f8a;
  border-radius: 5px;
  background: #15202be8;
  font-size: 12px;
  color: #edf2f6;
  box-shadow: 0 2px 9px #0003;
}
.map-button svg {
  width: 19px;
}
.map-button[aria-pressed="true"] {
  border-color: #83e8c3;
  color: #a6f2d7;
  background: #203d34e8;
}
.map-tools select {
  margin-left: auto;
  max-width: 136px;
}
.map-caption {
  position: absolute;
  right: 12px;
  bottom: 29px;
  display: flex;
  gap: 10px;
  background: #121c27db;
  border: 1px solid #6b788666;
  border-radius: 4px;
  padding: 7px;
  font-size: 10px;
  color: #d5dce5;
  pointer-events: none;
}
.legend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 4px;
  box-shadow: 0 0 0 1px #0008;
}
.legend-dot.acute {
  background: #bb3333;
}
.legend-dot.urgent {
  background: #e6f505;
}
.legend-dot.normal {
  background: #47e01d;
}
.coverage-legend {
  position: absolute;
  top: 65px;
  left: 12px;
  padding: 8px 10px;
  border: 1px solid #657382;
  background: #111c28e8;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 300px;
  font-size: 11px;
  z-index: 3;
}
.coverage-legend strong {
  font-size: 12px;
}
.coverage-legend i {
  height: 6px;
  width: 90px;
  background: linear-gradient(
    90deg,
    #ff5930,
    #ffca30,
    #f3fe09,
    #74ff7e,
    #00e611
  );
  border-radius: 2px;
}
.coverage-legend small {
  width: 100%;
  color: #c2cddb;
}
.ol-control {
  padding: 0;
  background: none;
}
.ol-control button {
  background: #15202bf2 !important;
  color: #eef4f8 !important;
  border: 1px solid #657382 !important;
  border-radius: 5px !important;
  width: 44px;
  height: 44px;
  font-size: 22px;
  margin: 4px;
}
.ol-zoom {
  left: auto;
  top: auto;
  right: 9px;
  bottom: 62px;
}
.ol-rotate {
  right: 12px;
  top: 65px;
}
.ol-attribution {
  max-width: 70%;
  background: #111c28cc !important;
  color: #b7c5d3;
  font-size: 9px;
  padding: 2px 4px;
}
.ol-attribution a {
  color: #c8d5e0;
}
.ol-scale-line {
  left: 12px;
  bottom: 4px;
  background: #182331ad;
}
.ol-scale-line-inner {
  font-size: 9px;
}
.direction-map-card .ol-attribution {
  font-size: 7px;
  max-width: 100%;
  bottom: 0;
  left: 0;
  right: auto;
  padding: 1px 2px;
}
.direction-map-card .ol-attribution ul {
  padding: 0;
}
.basemap-night .basemap-layer canvas {
  filter: invert(1) hue-rotate(180deg) brightness(0.62) saturate(0.5);
}
/* Dense, virtualized incident rows and two-column resource cards. */
.search-toolbar {
  display: flex;
  gap: 6px;
  padding: 9px 10px 5px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
  padding: 0 9px;
  background: #111a23;
  border: 1px solid var(--border);
  border-radius: 5px;
}
.search-box svg {
  width: 17px;
  color: var(--muted);
}
input[type="search"] {
  min-width: 0;
  width: 100%;
  height: 42px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 13px;
}
.filter-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 9px;
  border: 1px solid var(--border);
  background: #27323d;
  border-radius: 5px;
  font-size: 12px;
}
.filter-button svg {
  width: 16px;
}
.filter-button[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 4px 10px 8px;
}
.filters select {
  width: 100%;
  min-height: 40px;
  font-size: 12px;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-size: 12px;
}
.checkbox input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.list-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 12px 8px;
  border-bottom: 1px solid #303b46;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.7px;
}
.virtual-list {
  min-height: 0;
  flex: 1;
  overflow: auto;
  position: relative;
  overscroll-behavior: contain;
}
.virtual-spacer {
  position: relative;
  min-height: 100%;
}
.virtual-row {
  position: absolute;
  left: 0;
  right: 0;
  padding: 0 7px;
}
.list-item {
  display: block;
  width: 100%;
  height: calc(100% - 3px);
  text-align: left;
  padding: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 4px;
}
.list-item:hover,
.list-item:focus-visible {
  background: #2a3440;
  border-color: #5a6c7c;
}
.list-item.selected {
  border-color: #75bd9c;
  background: #263c33;
}
.incident-row {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 7px;
  border-bottom: 1px solid #323c47;
  border-radius: 0;
}
.incident-row > .priority {
  align-self: start;
  margin-top: 1px;
}
.row-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-description {
  display: block;
  font-size: 12px;
  color: #c1cbd6;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}
.row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  font-size: 10px;
  color: #aabac9;
  line-height: 1.3;
  margin-top: 3px;
}
.incident-row .row-bottom:last-child {
  font-size: 10px;
  margin-top: 1px;
}
.resource-grid-row {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding-top: 3px;
}
.resource-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 54px;
  padding: 7px;
  border: 1px solid #394754;
  border-left: 3px solid var(--status-color);
  background: #232d38;
  border-radius: 5px;
}
.resource-symbol {
  display: flex;
  align-items: center;
  color: var(--status-color);
}
.resource-symbol svg {
  width: 20px;
  height: 20px;
}
.row-content {
  min-width: 0;
  flex: 1;
}
.resource-row .row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
}
.resource-row .row-description {
  font-size: 11px;
}
.resource-state-dot {
  width: 6px;
  height: 6px;
  background: var(--status-color);
  border-radius: 50%;
  box-shadow: 0 0 0 1px #0008;
}
.group-heading {
  height: 100%;
  padding: 9px 7px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  color: #b6c2ce;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.empty-state {
  text-align: center;
  padding: 24px 12px;
  line-height: 1.6;
  color: var(--muted);
  font-size: 12px;
}
.empty-state strong {
  display: block;
  color: #e1e7ed;
  font-size: 13px;
  font-weight: 500;
}
.empty-state svg {
  display: block;
  margin: 0 auto 10px;
  opacity: 0.6;
}
.count {
  font-size: 10px;
  padding: 2px 5px;
  background: #354451;
  border-radius: 3px;
  min-width: 18px;
  text-align: center;
}
/* Details use compact sections rather than large cards. */
.details {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 0 12px 14px;
}
.back-button {
  display: block;
  min-height: 44px;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
}
.details-header {
  display: flex;
  align-items: center;
  gap: 9px;
}
.details h1 {
  font-size: 20px;
  line-height: 1.3;
  margin: 9px 0;
  font-weight: 600;
}
.detail-description {
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  color: #dfe5ed;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}
.detail-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 3px;
}
.detail-grid span {
  font-size: 13px;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.detail-section {
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.detail-section h3 {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.7px;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.detail-section p {
  font-size: 13px;
  line-height: 1.45;
  margin-top: 7px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.nearest-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 9px 0;
  background: transparent;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.nearest-row small {
  color: var(--muted);
  font-size: 11px;
}
/* Prototype components are labeled and never publish operational actions. */
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
}
.primary-button {
  background: var(--accent);
  color: #112d24;
  border: 1px solid #9ce5c9;
}
.secondary-button {
  background: #2a3541;
  border: 1px solid #53616f;
  color: #e7edf2;
}
.secondary-button:hover {
  background: #3b4856;
}
.prototype-notice {
  padding: 8px 9px;
  margin-bottom: 12px;
  border: 1px solid #786435;
  background: #352e21;
  color: #f0dca3;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.45;
}
.prototype-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.prototype-toolbar strong {
  font-size: 14px;
}
.prototype-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}
.prototype-tabs button {
  flex: 1;
  min-height: 44px;
  background: #26313d;
  border: 1px solid #46535f;
  border-radius: 5px;
  font-size: 13px;
}
.prototype-tabs button.active {
  border-color: #ceb775;
  background: #383323;
  color: #f2dda2;
}
.mock-pane h2 {
  margin: 10px 0;
}
.mock-pane input:not([type="checkbox"]),
.mock-pane select,
.mock-pane textarea {
  margin-top: 5px;
}
.field-label {
  display: block;
  font-size: 12px;
  color: #c6d1dd;
  margin: 9px 0;
}
.field-label > input,
.field-label > textarea,
.field-label > select {
  display: block;
  width: 100%;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 9px;
}
.prototype-section {
  margin-top: 15px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.preview-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid #333e48;
}
.chat-preview {
  min-height: 180px;
  max-height: 310px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}
.chat-message {
  max-width: 88%;
  background: #2a3643;
  border: 1px solid #52616d;
  border-radius: 8px 8px 8px 2px;
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.45;
}
.chat-message small {
  font-size: 10px;
  color: #c7d2df;
}
.chat-message p {
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.chat-message time {
  font-size: 10px;
  color: #a5b5c5;
}
.chat-message.outgoing {
  align-self: flex-end;
  background: #293d37;
  border-color: #506d63;
  border-radius: 8px 8px 2px 8px;
}
.quick-replies {
  display: flex;
  gap: 5px;
  margin: 10px 0;
}
.quick-replies button {
  flex: 1;
  font-size: 12px;
  padding: 0 7px;
}
.chat-compose {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.chat-compose textarea {
  flex: 1;
  min-width: 0;
  resize: vertical;
}
.chat-compose button {
  padding: 0 9px;
  max-width: 85px;
}
.destination-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.destination-option {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: #25313d;
  border: 1px solid #425363;
  border-radius: 5px;
  min-height: 58px;
  padding: 8px;
}
.destination-option > span:nth-child(2) {
  flex: 1;
}
.destination-option strong {
  display: block;
  font-size: 14px;
}
.destination-option small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #afbdcb;
}
.destination-option.selected {
  border-color: #d0b56d;
  background: #363225;
}
.age-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}
.clinical-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 14px 0;
}
.clinical-preview > div {
  padding: 11px;
  background: #111d27;
  border: 1px solid #44515d;
  border-radius: 5px;
}
.clinical-preview small,
.clinical-preview span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.clinical-preview strong {
  display: block;
  font-size: 25px;
  margin: 9px 0;
}
.layer-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 59px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.layer-preview small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.layer-preview input {
  width: 20px;
  height: 20px;
  accent-color: #cbb46d;
}
.traffic-key {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 11px;
  color: var(--muted);
}
.traffic-key i {
  display: block;
  height: 7px;
  border-radius: 3px;
  background: linear-gradient(90deg, #4ba74a, #dac641, #c2534e);
}
.planner-scale {
  display: flex;
  justify-content: space-between;
  margin: 15px 0 8px;
  padding-left: 50px;
  color: var(--muted);
  font-size: 11px;
}
.planner-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 59px;
  border-top: 1px solid #44515f;
  font-size: 12px;
}
.planner-row > b {
  min-width: 40px;
}
.planner-row > div {
  display: flex;
  gap: 8px;
  flex: 1;
}
.plan-block,
.plan-break {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 8px;
  background: #354e64;
  border: 1px solid #67849a;
  border-radius: 4px;
  font-size: 11px;
}
.plan-block.secondary {
  margin-left: 30px;
  background: #3e5346;
  border-color: #758b6e;
}
.plan-break {
  background: #594e35;
  border-color: #9a865b;
}
/* Modal settings and login retain normal readable text sizing. */
input,
textarea,
select {
  background: #111c27;
  border: 1px solid #53616f;
  border-radius: 5px;
  color: var(--text);
  min-height: 44px;
  padding: 8px;
  font-size: 13px;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
input[type="checkbox"] {
  min-height: 0;
  padding: 0;
}
input::placeholder,
textarea::placeholder {
  color: #8799ab;
}
dialog {
  color: var(--text);
  background: var(--panel);
  border: 1px solid #60707f;
  border-radius: 10px;
  padding: 0;
  width: min(470px, 94vw);
  max-height: 90dvh;
  box-shadow: 0 15px 65px #0008;
}
dialog::backdrop {
  background: #080e16bb;
  backdrop-filter: blur(4px);
}
.dialog-content {
  padding: 23px;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}
.dialog-heading h2 {
  font-size: 23px;
  margin-top: 7px;
}
.dialog-content > label:not(.checkbox) {
  display: block;
  font-size: 13px;
}
.dialog-content input:not([type="checkbox"]) {
  display: block;
  margin-top: 7px;
  width: 100%;
}
.dialog-content > p {
  font-size: 12px;
  line-height: 1.6;
  margin: 10px 0;
}
.dialog-content > .checkbox {
  margin-top: 6px;
  min-height: 37px;
}
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}
.login-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.login-content h1 {
  font-size: 29px;
  line-height: 1.25;
  font-weight: 600;
}
.login-content p {
  margin: 0;
}
.login-content .primary-button {
  justify-content: space-between;
}
.login-content .secondary-button {
  width: 100%;
}
.diagnostics {
  margin-top: 19px;
  color: var(--muted);
  font-size: 11px;
}
.diagnostics pre {
  font-size: 10px;
  white-space: pre-wrap;
}
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}
#demo-settings .secondary-button {
  margin: 5px 4px 5px 0;
}
.auth-error {
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 24px;
}
.auth-error-card {
  width: min(480px, 100%);
  padding: 32px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-error-card h1 {
  font-size: 24px;
  line-height: 1.4;
}
.statusbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 12px;
  height: 23px;
  min-height: 23px;
  background: #111820;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: #b0becd;
  z-index: 7;
}
.statusbar > span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-end {
  margin-left: auto;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(90vw, 520px);
  z-index: 30;
  padding: 13px 18px;
  background: #263a32;
  border: 1px solid #93ceb4;
  border-radius: 7px;
  box-shadow: 0 5px 25px #0006;
  font-size: 13px;
  line-height: 1.5;
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-thumb {
  background: #526170;
  border-radius: 3px;
}
@media (min-width: 1600px) {
  :root {
    --drawer: 430px;
  }
  .floating-cockpit {
    width: 304px;
  }
  .direction-map-card {
    height: 190px;
  }
}
@media (max-width: 1150px) {
  :root {
    --drawer: 355px;
    --rail: 56px;
  }
  .topbar {
    gap: 9px;
    padding: 0 10px;
  }
  .brand {
    font-size: 17px;
  }
  .header-resource {
    padding-left: 9px;
  }
  .own-vehicle {
    gap: 9px;
  }
  .connection {
    max-width: 160px;
  }
  .demo-badge {
    font-size: 9px;
    padding: 4px;
  }
  .floating-cockpit {
    width: 260px;
  }
  .direction-map-card {
    height: 155px;
  }
  .summary-text strong {
    font-size: 15px;
  }
  .route-card strong {
    font-size: 20px;
  }
  .route-card small {
    font-size: 8px;
  }
  .map-button {
    padding: 0 9px;
  }
  .map-tools .map-button span {
    display: none;
  }
  .map-tools select {
    max-width: 110px;
  }
  .map-tools .map-button {
    min-width: 44px;
  }
  .map-caption {
    right: 10px;
    bottom: 26px;
    font-size: 9px;
  }
  .clock {
    font-size: 23px;
  }
}
@media (max-height: 660px) and (min-width: 701px) {
  .topbar {
    height: 46px;
    min-height: 46px;
  }
  .drawer-rail > button {
    min-height: 47px;
    gap: 2px;
  }
  .drawer-rail > button svg {
    width: 21px;
    height: 21px;
  }
  .drawer-rail > .rail-toggle {
    min-height: 42px;
  }
  .drawer-rail > .rail-settings {
    min-height: 45px;
  }
  .floating-cockpit {
    bottom: 27px;
    width: 250px;
    gap: 4px;
  }
  .direction-map-card {
    height: 125px;
  }
  .incident-summary {
    min-height: 55px;
  }
  .direction-instructions {
    min-height: 48px;
  }
  .eta-toggle {
    min-height: 53px;
  }
  .summary-text strong {
    font-size: 15px;
  }
  .drawer-heading {
    min-height: 50px;
  }
  .quick-status-grid button {
    min-height: 44px;
  }
  .chat-preview {
    max-height: 190px;
  }
}
@media (max-width: 850px) {
  .brand-light {
    display: none;
  }
  .connection {
    max-width: 120px;
  }
  .vehicle-state [data-elapsed] {
    display: none;
  }
  .own-vehicle {
    gap: 7px;
  }
  .header-resource {
    padding-left: 8px;
  }
  .vehicle-top svg {
    display: none;
  }
  .vehicle-id {
    font-size: 20px;
  }
  .topbar #change-resource {
    padding: 0 4px;
  }
  .map-caption {
    display: none;
  }
  .floating-cockpit {
    width: 230px;
    left: 9px;
  }
  .route-card {
    gap: 2px 7px;
  }
  .route-card > span {
    gap: 4px;
  }
  .route-card small {
    font-size: 8px;
    letter-spacing: 0;
  }
  .route-card strong {
    font-size: 19px;
  }
}
@media (max-width: 700px) {
  :root {
    --rail: 54px;
    --drawer: calc(100vw - 54px);
  }
  .workspace[data-drawer-open="true"] {
    --occupied: var(--rail);
  }
  .map-panel {
    right: var(--rail);
  }
  .right-drawer {
    width: var(--drawer);
    z-index: 5;
  }
  .workspace[data-drawer-open="true"] .floating-cockpit {
    visibility: hidden;
    pointer-events: none;
  }
  .topbar {
    height: 48px;
    min-height: 48px;
    gap: 8px;
    padding: 0 8px;
  }
  .brand {
    font-size: 15px;
    gap: 5px;
  }
  .brand img {
    width: 27px;
    height: 27px;
  }
  .brand-light,
  .connection,
  .topbar #change-resource {
    display: none;
  }
  .header-resource {
    border: 0;
    padding: 0;
  }
  .vehicle-id {
    font-size: 18px;
  }
  .vehicle-state .status-pill {
    font-size: 10px;
  }
  .own-vehicle {
    gap: 6px;
  }
  .demo-badge {
    max-width: 80px;
    font-size: 8px;
    white-space: normal;
    line-height: 1.25;
    padding: 3px 4px;
  }
  .clock {
    font-size: 20px;
  }
  .topbar #design-badge {
    display: none;
  }
  .floating-cockpit {
    width: min(260px, calc(100% - 62px));
    bottom: 27px;
  }
  .direction-map-card {
    height: 150px;
  }
  .map-tools {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 4px;
  }
  .map-tools .map-button {
    padding: 0;
    width: 44px;
    min-width: 44px;
  }
  .map-tools select {
    flex: 1;
    min-width: 70px;
    max-width: 110px;
    width: auto;
    padding: 0 5px;
    font-size: 11px;
  }
  .ol-zoom {
    right: 5px;
    bottom: 28px;
  }
  .ol-control button {
    width: 44px;
    height: 44px;
  }
  .ol-attribution {
    font-size: 8px;
    max-width: 100%;
  }
  .statusbar {
    height: 22px;
    min-height: 22px;
    font-size: 9px;
    padding: 0 8px;
    gap: 8px;
  }
  .statusbar #last-update {
    display: none;
  }
  .drawer-heading {
    min-height: 54px;
  }
  .drawer-rail > button {
    min-height: 52px;
  }
  .drawer-rail > .rail-toggle {
    min-height: 44px;
  }
  .drawer-rail > .rail-settings {
    min-height: 48px;
  }
  .dialog-content {
    padding: 20px;
  }
  .toast {
    bottom: 32px;
    font-size: 12px;
  }
  .coverage-legend {
    top: 60px;
    left: 8px;
    right: 8px;
    max-width: 280px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

.vehicle-state .status-pill {
  color: #f4f6f9;
  background: color-mix(in srgb, var(--status-color) 18%, #18232e);
  border: 1px solid var(--status-color);
  padding: 4px 6px;
  border-radius: 4px;
}
.vehicle-state .status-pill:before {
  background: var(--status-color);
}
