:root {
  color-scheme: dark;
  --display: "Instrument Serif", "Apple Garamond", Georgia, serif;
  --mono-font: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --titlebar: #050505;
  --activity: #050505;
  --editor: #030303;
  --editor-deep: #060606;
  --panel: #080808;
  --panel-soft: #0c0c0c;
  --panel-alt: #111111;
  --hover: #151515;
  --active: #1b1b1b;
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #d8d8d8;
  --text-bright: #f4f4f4;
  --muted: rgba(244, 244, 244, 0.54);
  --faint: rgba(244, 244, 244, 0.28);
  --accent: #24d17e;
  --focus: #24d17e;
  --warning: #ffb000;
  --green: #24d17e;
  --red: #ff3b30;
  font-family: var(--sans-font);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: #030303;
  color: var(--text);
  font-size: 12px;
  font-feature-settings: "ss01", "cv01", "tnum";
  font-family: var(--sans-font);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.intro-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #030303;
  color: #f4f4f4;
  transition:
    opacity 760ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0ms linear 760ms;
}

.intro-splash[hidden] {
  display: none;
}

.intro-globe-stage,
.intro-globe-fallback,
.intro-vignette {
  position: absolute;
  inset: 0;
}

.intro-globe-stage {
  z-index: 1;
  background: #030303;
}

.intro-globe-stage .cesium-widget,
.intro-globe-stage .cesium-widget canvas {
  width: 100%;
  height: 100%;
}

.intro-globe-stage .cesium-viewer-bottom,
.intro-globe-stage .cesium-credit-logoContainer,
.intro-globe-stage .cesium-credit-textContainer {
  display: none !important;
}

.intro-globe-fallback {
  z-index: 2;
  display: grid;
  place-items: center;
  opacity: 1;
  transition: opacity 520ms ease;
}

body.is-intro-globe-ready .intro-globe-fallback {
  opacity: 0;
}

.intro-globe-orbit {
  position: relative;
  width: min(68vmin, 720px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(244, 244, 244, 0.32), transparent 7%),
    radial-gradient(circle at 62% 46%, rgba(36, 209, 126, 0.18), transparent 12%),
    radial-gradient(circle at 50% 50%, rgba(40, 90, 64, 0.22), rgba(5, 18, 12, 0.42) 44%, rgba(0, 0, 0, 0.84) 68%);
  box-shadow:
    inset -42px -34px 80px rgba(0, 0, 0, 0.74),
    inset 18px 12px 46px rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: rotate(-8deg);
}

.intro-globe-orbit::before,
.intro-globe-orbit::after,
.intro-globe-orbit span,
.intro-globe-orbit i {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(244, 244, 244, 0.12);
  border-radius: 50%;
  content: "";
}

.intro-globe-orbit::before {
  transform: rotateX(68deg);
}

.intro-globe-orbit::after {
  transform: rotateY(62deg);
}

.intro-globe-orbit span {
  inset: 22%;
  border-color: rgba(36, 209, 126, 0.15);
  transform: rotateX(72deg) rotateZ(34deg);
}

.intro-globe-orbit i {
  inset: 4%;
  border-color: rgba(255, 255, 255, 0.05);
  transform: rotateY(76deg) rotateZ(-28deg);
}

.intro-vignette {
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 50%, transparent, rgba(3, 3, 3, 0.78) 95%),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.012) 0,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: normal;
}

.intro-stack {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 26px;
  width: min(640px, 86vw);
  justify-items: center;
  text-align: center;
  animation: intro-rise 620ms ease both;
  transition:
    opacity 520ms ease,
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.intro-eyebrow {
  color: rgba(244, 244, 244, 0.28);
  font-family: var(--mono-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.intro-tagline {
  margin: 0;
  color: #f4f4f4;
  font-family: var(--display);
  font-size: clamp(48px, 7.4vw, 84px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.02;
}

.intro-tagline em {
  color: #24d17e;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
}

.intro-subtagline {
  max-width: 540px;
  margin: 0;
  color: rgba(244, 244, 244, 0.55);
  font-size: 15px;
  line-height: 1.55;
}

.intro-start-button {
  min-width: 158px;
  height: 48px;
  margin-top: 12px;
  padding: 0 28px;
  border: 1px solid rgba(36, 209, 126, 0.78);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(157, 247, 184, 0.96), rgba(36, 209, 126, 0.92));
  box-shadow:
    0 18px 46px rgba(36, 209, 126, 0.22),
    0 0 0 6px rgba(36, 209, 126, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  color: #04120a;
  cursor: pointer;
  font-family: var(--mono-font);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease,
    transform 180ms ease;
}

.intro-start-button:hover,
.intro-start-button:focus-visible {
  border-color: #c9ffd7;
  outline: 0;
  filter: brightness(1.04);
  box-shadow:
    0 22px 60px rgba(36, 209, 126, 0.32),
    0 0 0 7px rgba(36, 209, 126, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.intro-start-button:disabled {
  cursor: progress;
  opacity: 0.76;
  transform: none;
}

body.is-intro-active:not(.has-entered-demo) .cursor-window {
  opacity: 0;
  pointer-events: none;
}

body.has-entered-demo .cursor-window {
  opacity: 1;
  transition: opacity 640ms ease 180ms;
}

body.is-tms-gate-active .cursor-window {
  filter: blur(8px) saturate(0.72);
  opacity: 0.34;
  pointer-events: none;
}

body.is-intro-starting .intro-splash {
  opacity: 0;
  transform: scale(1.035);
  visibility: hidden;
}

body.is-intro-starting .intro-stack {
  opacity: 0;
  filter: blur(7px);
  transform: translateY(-14px) scale(0.98);
}

body.is-intro-starting .intro-globe-stage,
body.is-intro-starting .intro-globe-fallback {
  transform: scale(1.08);
  transition: transform 780ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes intro-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cursor-window {
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr) 22px;
  width: 100vw;
  height: 100vh;
  min-width: 920px;
  min-height: 640px;
  background:
    radial-gradient(circle at 28% 12%, rgba(36, 209, 126, 0.08), transparent 30%),
    #030303;
}

.titlebar {
  display: grid;
  grid-template-columns: 156px minmax(230px, 1fr) minmax(260px, 520px) minmax(180px, 1fr);
  align-items: center;
  height: 34px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(18, 18, 18, 0.96), rgba(5, 5, 5, 0.98));
  color: var(--muted);
  -webkit-app-region: drag;
}

.traffic-lights {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-left: 13px;
}

.traffic-lights span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.traffic-lights .close {
  background: #ff5f57;
}

.traffic-lights .minimize {
  background: #febc2e;
}

.traffic-lights .maximize {
  background: #28c840;
}

.menu-strip,
.title-actions {
  display: flex;
  align-items: center;
  gap: 1px;
  min-width: 0;
  -webkit-app-region: no-drag;
}

.menu-strip button {
  height: 26px;
  padding: 0 9px;
  border-radius: 5px;
  color: rgba(244, 244, 244, 0.58);
  font-size: 11px;
  font-weight: 600;
}

.menu-strip button:hover,
.title-actions button:hover,
.command-center:hover {
  background: var(--hover);
  color: var(--text-bright);
}

.command-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 24px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #090909;
  color: rgba(244, 244, 244, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-app-region: no-drag;
}

.command-center svg {
  width: 15px;
  height: 15px;
  color: #d7d7d7;
  fill: currentColor;
  stroke: none;
}

.command-center span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-actions {
  justify-content: flex-end;
  padding-right: 8px;
}

.title-actions button {
  display: grid;
  width: 30px;
  height: 26px;
  place-items: center;
  border-radius: 5px;
  color: #b8b8b8;
}

.title-actions svg {
  width: 16px;
  height: 16px;
}

.workspace {
  display: grid;
  grid-template-columns: 48px minmax(310px, 22vw) minmax(0, 1fr) minmax(340px, 25vw);
  min-height: 0;
}

.activity-bar {
  grid-column: 1;
}

.assistant-panel {
  grid-column: 2;
  grid-row: 1;
}

.editor {
  grid-column: 3;
  grid-row: 1;
}

.activity-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 0 9px;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, #070707, #030303);
}

.activity-button {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: rgba(244, 244, 244, 0.42);
}

.activity-button svg {
  width: 24px;
  height: 24px;
}

.activity-button:hover,
.activity-button.active {
  color: #ffffff;
}

.activity-button.active::before {
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--accent);
  content: "";
}

.activity-spacer {
  flex: 1;
}

.editor {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: #030303;
}

.editor-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: #030303;
}

.map-editor {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #020202;
}

.map-surface,
.earth-surface,
.earth-surface gmp-map-3d {
  width: 100%;
  height: 100%;
}

.earth-surface gmp-map-3d {
  display: block;
}

.map-surface .gm-style {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.inline-toolbar,
.map-search,
.map-toast {
  position: absolute;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(13, 13, 13, 0.94), rgba(7, 7, 7, 0.9)),
    rgba(8, 8, 8, 0.88);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px) saturate(1.05);
}

.inline-toolbar {
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 6px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.control-group.compact {
  padding-left: 5px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.control-button,
.icon-control {
  height: 26px;
  border-radius: 4px;
  color: rgba(244, 244, 244, 0.72);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.control-button {
  padding: 0 8px;
}

.control-button:hover,
.icon-control:hover,
.control-button.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.control-button.active {
  background: #24d17e;
  color: #031006;
  outline: 0;
  box-shadow:
    0 8px 18px rgba(36, 209, 126, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.icon-control {
  display: grid;
  width: 28px;
  place-items: center;
  font-size: 16px;
}

.icon-control svg {
  width: 15px;
  height: 15px;
}

.map-search {
  top: 12px;
  left: 12px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: clamp(230px, 28vw, 380px);
  min-width: 230px;
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
}

.map-search svg {
  width: 16px;
  height: 16px;
  color: rgba(244, 244, 244, 0.5);
}

.map-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
}

.map-search:focus-within {
  border-color: var(--focus);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.38),
    0 0 0 2px rgba(36, 209, 126, 0.12);
}

.map-toast {
  left: 12px;
  bottom: 12px;
  max-width: min(560px, calc(100% - 24px));
  padding: 7px 9px;
  border-radius: 5px;
  color: rgba(244, 244, 244, 0.78);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px;
}

.map-toast.error {
  border-color: rgba(241, 76, 76, 0.7);
  color: #ffd0d0;
}

.accident-legend {
  position: absolute;
  z-index: 5;
  left: 12px;
  bottom: 46px;
  width: min(380px, calc(100% - 24px));
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(13, 13, 13, 0.94), rgba(7, 7, 7, 0.88)),
    rgba(8, 8, 8, 0.88);
  color: #cfcfcf;
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

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

.legend-row span {
  color: #ffffff;
  font-weight: 600;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px;
}

.legend-row strong {
  color: rgba(244, 244, 244, 0.54);
  font-weight: 500;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.heat-ramp {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(73, 169, 255, 0.15), #49a9ff, #63dca0, #ffda5e, #ff8438, #ff3e3e);
}

.accident-legend p {
  margin: 7px 0 0;
  color: #a9a9a9;
  line-height: 1.35;
}

.bridge-point-layer {
  position: absolute;
  pointer-events: none;
}

.bridge-point-canvas {
  display: block;
}

.bridge-legend {
  position: absolute;
  z-index: 6;
  left: 12px;
  bottom: 205px;
  width: min(390px, calc(100% - 24px));
  max-height: min(460px, calc(100% - 240px));
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(13, 13, 13, 0.94), rgba(7, 7, 7, 0.88)),
    rgba(8, 8, 8, 0.88);
  color: #cfcfcf;
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

.bridge-severity-key {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
  height: 8px;
  margin-bottom: 8px;
}

.bridge-severity-key span {
  border-radius: 999px;
}

.bridge-red {
  background: #ff4d4f;
}

.bridge-orange {
  background: #ffb84d;
}

.bridge-yellow {
  background: #f3df59;
}

.bridge-detail {
  display: grid;
  gap: 6px;
}

.bridge-detail strong {
  color: #ffffff;
  font-size: 12px;
}

.bridge-detail span,
.bridge-detail p {
  color: #a9a9a9;
  line-height: 1.35;
}

.bridge-detail p {
  margin: 0;
}

.bridge-detail dl {
  display: grid;
  gap: 5px;
  margin: 2px 0 0;
}

.bridge-detail dl div {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 8px;
}

.bridge-detail dt {
  color: #8f8f8f;
}

.bridge-detail dd {
  min-width: 0;
  margin: 0;
  color: #d8d8d8;
}

.tracking-timeline {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 7;
  display: grid;
  gap: 8px;
  width: clamp(360px, 42vw, 620px);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.94), rgba(17, 17, 17, 0.9)),
    rgba(8, 8, 8, 0.92);
  color: #d8d8d8;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px) saturate(1.04);
}

.tracking-timeline[hidden] {
  display: none;
}

body.is-tracking-scene .accident-legend,
body.is-tracking-scene .bridge-legend {
  display: none;
}

body.is-demo-mode .accident-legend,
body.is-demo-mode .bridge-legend {
  display: none;
}

.tracking-timeline-top {
  display: grid;
  grid-template-columns: 28px auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.tracking-play-button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: #0c0c0c;
  color: #ffffff;
}

.tracking-play-button:hover {
  border-color: rgba(36, 209, 126, 0.58);
  background: #101711;
  color: #24d17e;
}

.tracking-play-button svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0;
}

.tracking-time-field {
  display: grid;
  grid-template-columns: auto 86px;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: rgba(244, 244, 244, 0.52);
  font-size: 11px;
  font-weight: 700;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.tracking-time-field input {
  width: 86px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  outline: 0;
  background: #050505;
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  color-scheme: dark;
}

.tracking-time-field input:focus {
  border-color: #24d17e;
  box-shadow: 0 0 0 2px rgba(36, 209, 126, 0.12);
}

.tracking-source {
  min-width: 0;
  overflow: hidden;
  justify-self: end;
  color: rgba(244, 244, 244, 0.44);
  font-size: 11px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracking-range {
  width: 100%;
  height: 18px;
  margin: 0;
  accent-color: #24d17e;
}

.tracking-status-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tracking-status-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(5, 5, 5, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tracking-status-dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color, #ffffff);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.tracking-status-body {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.tracking-status-body strong,
.tracking-status-body span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracking-status-body strong {
  color: #ffffff;
  font-size: 11px;
  font-weight: 750;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.tracking-status-body span {
  color: #a9a9a9;
  font-size: 10px;
}

@media (max-width: 860px) {
  .tracking-timeline {
    right: 12px;
    bottom: 48px;
    left: 12px;
    width: auto;
  }

  .tracking-timeline-top {
    grid-template-columns: 28px auto;
  }

  .tracking-source {
    display: none;
  }

  .tracking-status-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.route-insight-card {
  position: absolute;
  z-index: 8;
  display: grid;
  gap: 6px;
  width: 196px;
  padding: 8px;
  border: 1px solid rgba(73, 73, 73, 0.94);
  border-radius: 7px;
  background: rgba(28, 28, 28, 0.9);
  color: #dcdcdc;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
}

.route-insight-card:hover,
.route-insight-card.active {
  border-color: rgba(77, 170, 252, 0.9);
  background: rgba(33, 39, 48, 0.94);
}

.route-insight-card.suggested {
  border-color: rgba(137, 209, 133, 0.88);
}

.route-insight-card.pending,
.route-insight-card.confirmed {
  width: 238px;
  border-color: rgba(77, 170, 252, 0.95);
}

.route-insight-card.confirmed {
  border-color: rgba(137, 209, 133, 0.96);
}

.route-insight-card.active {
  z-index: 10;
}

.route-insight-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.route-insight-top strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-insight-label {
  padding: 2px 5px;
  border-radius: 4px;
  background: #303030;
  color: #bfbfbf;
  font-size: 10px;
  font-weight: 700;
}

.route-insight-card.suggested .route-insight-label {
  background: rgba(137, 209, 133, 0.16);
  color: #b7f3ad;
}

.route-insight-score {
  display: grid;
  min-width: 28px;
  height: 22px;
  place-items: center;
  border-radius: 5px;
  background: #0e639c;
  color: #ffffff;
  font-weight: 800;
}

.route-insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
}

.route-insight-grid span {
  min-width: 0;
  overflow: hidden;
  color: #9c9c9c;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-insight-grid b {
  justify-self: end;
  color: #ececec;
  font-size: 10px;
  font-weight: 700;
}

.route-insight-math {
  color: #9fa8b0;
  font-size: 10px;
  line-height: 1.25;
}

.route-insight-expanded {
  display: grid;
  gap: 5px;
  padding-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.route-insight-expanded p {
  margin: 0;
  color: #b8c2cc;
  font-size: 10px;
  line-height: 1.3;
}

.route-fuel-legs {
  display: grid;
  gap: 2px;
}

.route-fuel-legs div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 6px;
  color: #aeb7c0;
  font-size: 10px;
}

.route-fuel-legs div:first-child {
  color: #808b96;
  font-weight: 700;
}

.route-fuel-legs b,
.route-fuel-legs strong {
  justify-self: end;
  color: #f1f1f1;
}

.route-confirm-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
}

.route-confirm-panel span {
  min-width: 0;
  color: #d9e5ef;
  font-size: 10px;
  font-weight: 700;
}

.route-confirm-panel button,
.route-send-driver {
  height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  background: #2f3b45;
  color: #eaf4ff;
  font-size: 10px;
  font-weight: 800;
}

.route-confirm-panel button:hover,
.route-send-driver:hover {
  background: #3c4f5d;
}

.route-confirm-panel button:first-of-type,
.route-send-driver {
  background: #0e639c;
  color: #ffffff;
}

.route-confirm-panel button:first-of-type:hover,
.route-send-driver:hover {
  background: #1177bb;
}

.route-insight-card.sent .route-send-driver {
  background: #16825d;
}

.assistant-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--border);
  background: #171717;
}

.assistant-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 36px;
  border-bottom: 1px solid #2b2b2b;
  background: #181818;
}

.assistant-mode-tab {
  position: relative;
  color: #9f9f9f;
  font-weight: 700;
}

.assistant-mode-tab:hover,
.assistant-mode-tab.active {
  background: #222222;
  color: #ffffff;
}

.assistant-mode-tab.active::after {
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 2px;
  border-radius: 999px 999px 0 0;
  background: #4daafc;
  content: "";
}

.assistant-scroll {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow-y: scroll;
  padding: 12px 10px;
  border-bottom: 1px solid #2a2a2a;
  background: #171717;
  scrollbar-color: #565656 #202020;
  scrollbar-gutter: stable both-edges;
  scrollbar-width: thin;
}

.assistant-scroll[hidden] {
  display: none;
}

.assistant-scroll::-webkit-scrollbar {
  width: 10px;
}

.assistant-scroll::-webkit-scrollbar-track {
  background: #202020;
}

.assistant-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #202020;
  border-radius: 999px;
  background: #565656;
}

.assistant-scroll::-webkit-scrollbar-thumb:hover {
  background: #707070;
}

.chat-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid var(--border);
  background: #1f1f1f;
}

.chat-header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chat-header strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

.chat-header span {
  min-width: 0;
  overflow: hidden;
  color: #8f8f8f;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-header button {
  display: grid;
  width: 28px;
  height: 28px;
  min-width: 28px;
  place-items: center;
  border-radius: 5px;
  color: #bdbdbd;
}

.chat-header button:hover,
.composer-actions button:hover {
  background: var(--hover);
  color: #ffffff;
}

.chat-header svg,
.composer-actions svg {
  width: 16px;
  height: 16px;
}

.panel-section-title,
.chat-dock-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid #303030;
}

.panel-section-title span,
.chat-dock-title span {
  color: #f0f0f0;
  font-weight: 700;
}

.section-status,
.chat-dock-title small {
  min-width: 0;
  overflow: hidden;
  color: #969696;
  font-size: 11px;
  font-weight: 500;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-status.error {
  color: #ffb4b4;
}

.route-planner {
  min-height: 0;
  overflow: visible;
  border: 1px solid #303030;
  border-radius: 8px;
  background: #202020;
}

.route-form {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
}

.route-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #333333;
  border-radius: 6px;
  background: #232323;
  color: #d6d6d6;
  font-weight: 650;
}

.route-toggle:hover {
  border-color: #4b78b8;
  background: #26303a;
  color: #ffffff;
}

.route-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.14s ease;
}

.route-planner.file-mode .route-toggle {
  display: flex;
}

.route-planner.file-mode.manual-expanded .route-toggle svg {
  transform: rotate(180deg);
}

.route-planner.file-mode:not(.manual-expanded) .route-inputs,
.route-planner.file-mode:not(.manual-expanded) .route-actions {
  display: none;
}

.route-inputs {
  position: relative;
  display: grid;
  gap: 7px;
}

.route-field {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid #343434;
  border-radius: 6px;
  background: #242424;
}

.route-field:focus-within {
  border-color: var(--focus);
}

.route-field span {
  color: #999999;
  font-size: 11px;
  font-weight: 600;
}

.route-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
}

.route-field input::placeholder {
  color: #777777;
}

.route-swap {
  position: absolute;
  top: 31px;
  right: 7px;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #3b3b3b;
  border-radius: 6px;
  background: #2d2d2d;
  color: #cfcfcf;
}

.route-swap:hover {
  background: #383838;
  color: #ffffff;
}

.route-swap svg,
.route-actions svg {
  width: 15px;
  height: 15px;
}

.route-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 8px;
}

.route-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 30px;
  min-width: 0;
  border-radius: 6px;
  font-weight: 600;
}

.route-secondary {
  border: 1px solid #363636;
  background: #242424;
  color: #cfcfcf;
}

.route-secondary:hover {
  background: #303030;
  color: #ffffff;
}

.route-primary {
  background: #0e639c;
  color: #ffffff;
}

.route-primary:hover {
  background: #1177bb;
}

.route-primary:disabled {
  cursor: progress;
  opacity: 0.7;
}

.route-list {
  display: grid;
  gap: 6px;
}

.route-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  width: 100%;
  padding: 8px;
  border: 1px solid #333333;
  border-radius: 6px;
  background: #242424;
  color: #d4d4d4;
  text-align: left;
}

.route-choice:hover,
.route-choice.active {
  border-color: #4b78b8;
  background: #2b313b;
}

.route-choice.suggested {
  border-color: rgba(137, 209, 133, 0.68);
}

.route-choice.active {
  outline: 1px solid rgba(77, 170, 252, 0.45);
}

.route-choice-title,
.route-choice-time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-choice-title {
  color: #ffffff;
  font-weight: 650;
}

.route-choice-time {
  justify-self: end;
  color: #9cc9ff;
  font-weight: 650;
}

.route-choice-meta {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  color: #9a9a9a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-choice-insights {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  color: #b8c2cc;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-detail {
  display: grid;
  gap: 8px;
}

.route-detail:empty {
  display: none;
}

.delivery-panel {
  display: grid;
  gap: 0;
  min-height: 0;
  overflow: visible;
  border: 1px solid #303030;
  border-radius: 8px;
  background: #202020;
}

.delivery-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid #2c2c2c;
  overflow: hidden;
}

.delivery-tab {
  height: 29px;
  border-right: 1px solid #2c2c2c;
  color: #a8a8a8;
  font-weight: 600;
}

.delivery-tab:last-child {
  border-right: 0;
}

.delivery-tab:hover,
.delivery-tab.active {
  background: #25272b;
  color: #ffffff;
}

.delivery-tab.active {
  box-shadow: inset 0 -2px 0 #4daafc;
}

.delivery-pane {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  background: #202020;
  border-radius: 0 0 8px 8px;
}

.delivery-pane[hidden] {
  display: none;
}

.delivery-dropzone {
  display: grid;
  gap: 3px;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px dashed #4b4b4b;
  border-radius: 7px;
  background: #222222;
  color: #d8d8d8;
  cursor: pointer;
}

.delivery-dropzone.dragging,
.delivery-dropzone:hover {
  border-color: #4daafc;
  background: #232a32;
}

.delivery-dropzone span {
  color: #9f9f9f;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.delivery-dropzone strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-ai-progress {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #2c2c2c;
}

.delivery-ai-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4daafc, #89d185);
  animation: delivery-progress 1.15s ease-in-out infinite;
}

@keyframes delivery-progress {
  0% {
    transform: translateX(-110%);
  }
  55% {
    transform: translateX(90%);
  }
  100% {
    transform: translateX(245%);
  }
}

.fuel-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid #333333;
  border-radius: 7px;
  background: #242424;
}

.fuel-search-button,
.fuel-approve-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  border-radius: 6px;
  font-weight: 700;
}

.fuel-search-button {
  height: 30px;
  background: #225d45;
  color: #ffffff;
}

.fuel-search-button:hover {
  background: #2b7658;
}

.fuel-search-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.fuel-search-button svg,
.fuel-approve-button svg {
  width: 15px;
  height: 15px;
}

.fuel-tools small {
  min-width: 0;
  overflow: hidden;
  color: #9e9e9e;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fuel-tools small.error {
  color: #ffb4b4;
}

.fuel-station-list {
  display: grid;
  gap: 7px;
}

.fuel-station-list:empty {
  display: none;
}

.fuel-card {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid #343434;
  border-radius: 7px;
  background: #232323;
}

.fuel-card.best {
  border-color: rgba(137, 209, 133, 0.65);
  background: #202820;
}

.fuel-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.fuel-card-title,
.fuel-card-price {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fuel-card-title {
  color: #ffffff;
  font-weight: 750;
}

.fuel-card-price {
  color: #a7e3b6;
  font-weight: 750;
}

.fuel-card-meta,
.fuel-card-plan {
  color: #a8a8a8;
  line-height: 1.35;
}

.fuel-card-plan {
  color: #d3d3d3;
}

.fuel-approve-button {
  height: 28px;
  border: 1px solid #35694d;
  background: #1f4c39;
  color: #ffffff;
}

.fuel-approve-button:hover {
  background: #29674d;
}

.fuel-approve-button.approved {
  border-color: #3e6fba;
  background: #23456f;
}

.delivery-stop-list {
  display: grid;
  gap: 6px;
}

.delivery-stop-list:empty {
  display: none;
}

.delivery-stop {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  padding: 8px;
  border: 1px solid #323232;
  border-radius: 7px;
  background: #242424;
}

.delivery-stop.dragging {
  opacity: 0.55;
}

.delivery-stop-handle {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #393939;
  border-radius: 6px;
  background: #1c1c1c;
  color: #a9a9a9;
  cursor: grab;
}

.delivery-stop-handle svg {
  width: 15px;
  height: 15px;
}

.delivery-stop-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.delivery-stop-title,
.delivery-stop-address,
.delivery-stop-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-stop-title {
  color: #ffffff;
  font-weight: 650;
}

.delivery-stop-address {
  color: #bdbdbd;
}

.delivery-stop-meta {
  color: #919191;
}

.delivery-plan-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 31px;
  border-radius: 6px;
  background: #0e639c;
  color: #ffffff;
  font-weight: 650;
}

.delivery-plan-button:hover {
  background: #1177bb;
}

.delivery-plan-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.delivery-plan-button svg {
  width: 15px;
  height: 15px;
}

.delivery-pane textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid #343434;
  border-radius: 7px;
  outline: 0;
  background: #242424;
  color: #eeeeee;
  line-height: 1.45;
  padding: 8px;
}

.delivery-pane textarea:focus {
  border-color: var(--focus);
}

.delivery-pane textarea::placeholder {
  color: #777777;
}

.guideline-list {
  display: grid;
  gap: 7px;
}

.guideline-card {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #333333;
  border-radius: 7px;
  background: #242424;
}

.guideline-card:hover {
  border-color: #3e3e3e;
  background: #262626;
}

.guideline-meta {
  color: #8f8f8f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.guideline-text {
  color: #e4e4e4;
  line-height: 1.35;
}

.guideline-edit-input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--focus);
  border-radius: 6px;
  outline: 0;
  background: #1f1f1f;
  color: #ffffff;
}

.guideline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.guideline-actions button {
  height: 24px;
  padding: 0 8px;
  border: 1px solid #3b3b3b;
  border-radius: 5px;
  background: #1f1f1f;
  color: #cfcfcf;
  font-weight: 650;
}

.guideline-actions button:hover {
  border-color: #4b78b8;
  background: #26303a;
  color: #ffffff;
}

.guideline-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 6px;
  padding-top: 2px;
}

.guideline-editor input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #343434;
  border-radius: 6px;
  outline: 0;
  background: #242424;
  color: #ffffff;
}

.guideline-editor input:focus {
  border-color: var(--focus);
}

.guideline-editor input::placeholder {
  color: #777777;
}

.guideline-editor button {
  height: 30px;
  border-radius: 6px;
  background: #0e639c;
  color: #ffffff;
  font-weight: 650;
}

.guideline-editor button:hover {
  background: #1177bb;
}

.route-detail-header {
  display: grid;
  gap: 2px;
  padding-top: 2px;
}

.route-detail-title {
  overflow: hidden;
  color: #ffffff;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-detail-copy {
  color: #9a9a9a;
  line-height: 1.35;
}

.route-detail-group {
  display: grid;
  gap: 5px;
}

.route-detail-label {
  color: #9b9b9b;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.route-local-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid #303030;
  border-radius: 6px;
  background: #222222;
  color: #d6d6d6;
  text-align: left;
}

.route-local-choice:hover,
.route-local-choice.active {
  border-color: #d78b38;
  background: #302820;
}

.route-local-choice-title,
.route-local-choice-time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-local-choice-title {
  font-weight: 650;
}

.route-local-choice-time {
  justify-self: end;
  color: #ffc98f;
  font-weight: 650;
}

.route-local-choice-meta {
  grid-column: 1 / -1;
  color: #959595;
}

.chat-dock {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  background: #1d1d1d;
}

.chat-dock[hidden] {
  display: none;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px;
  scrollbar-color: #565656 #1d1d1d;
  scrollbar-width: thin;
}

.chat-thread::-webkit-scrollbar {
  width: 10px;
}

.chat-thread::-webkit-scrollbar-track {
  background: #1d1d1d;
}

.chat-thread::-webkit-scrollbar-thumb {
  border: 2px solid #1d1d1d;
  border-radius: 999px;
  background: #565656;
}

.chat-message {
  display: grid;
  gap: 8px;
  max-width: 100%;
}

.assistant-message {
  grid-template-columns: 24px minmax(0, 1fr);
}

.user-message {
  justify-items: end;
}

.message-avatar {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #3a3a3a;
  border-radius: 5px;
  background: #252526;
  color: #dedede;
  font-size: 10px;
  font-weight: 650;
}

.message-body {
  max-width: 100%;
  padding: 9px 10px;
  border: 1px solid #303030;
  border-radius: 6px;
  background: #252526;
  color: #d4d4d4;
  line-height: 1.45;
}

.user-message .message-body {
  max-width: 86%;
  border-color: #3a3d41;
  background: #2b2d30;
}

.message-body p {
  margin: 0;
}

.chat-composer {
  display: grid;
  gap: 8px;
  z-index: 20;
  margin: 0;
  padding: 10px;
  border: 0;
  border-top: 1px solid #333333;
  border-radius: 0;
  background: #1d1d1d;
  box-shadow: none;
}

.chat-composer textarea {
  width: 100%;
  min-height: 58px;
  max-height: 96px;
  resize: vertical;
  border: 1px solid #3b3b3b;
  border-radius: 7px;
  outline: 0;
  background: #252526;
  color: #eeeeee;
  line-height: 1.45;
  padding: 8px;
}

.chat-composer textarea::placeholder {
  color: #858585;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.composer-actions button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 5px;
  color: #bdbdbd;
}

.composer-actions .send-button {
  background: #3d3d3d;
  color: #ffffff;
}

.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
}

.status-left,
.status-right {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  height: 100%;
}

.status-left {
  padding-left: 0;
}

.status-right {
  padding-right: 10px;
}

.status-left span,
.status-right span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-remote {
  display: grid;
  width: 34px;
  height: 22px;
  place-items: center;
  background: #16825d;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .cursor-window {
    min-width: 1024px;
  }

  .workspace {
    grid-template-columns: 48px minmax(260px, 27vw) minmax(0, 1fr) 310px;
  }
}

@media (max-width: 860px) {
  .cursor-window {
    min-width: 0;
  }

  .titlebar {
    grid-template-columns: 78px minmax(0, 1fr) 38px;
  }

  .menu-strip,
  .title-actions {
    display: none;
  }

  .workspace {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .assistant-panel {
    display: none;
  }

  .editor {
    grid-template-rows: minmax(0, 1fr);
  }

  .editor-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .map-search {
    width: calc(100% - 24px);
    min-width: 0;
    top: 56px;
  }

  .inline-toolbar {
    left: 12px;
    right: auto;
  }
}

/* Multi-truck (Lane B1) */

.panel-fleet {
  display: grid;
  gap: 0;
  min-height: 0;
  overflow: visible;
  border: 1px solid #303030;
  border-radius: 8px;
  background: #202020;
}

.panel-fleet[hidden] {
  display: none;
}

.panel-fleet .panel-header {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid #303030;
}

.panel-fleet .panel-title {
  color: #f0f0f0;
  font-weight: 700;
}

.panel-fleet .panel-count {
  color: #969696;
  font-size: 11px;
  font-weight: 500;
  text-align: right;
}

.demo-reset-button {
  height: 22px;
  padding: 0 9px;
  border: 1px solid #353535;
  border-radius: 5px;
  background: transparent;
  color: #b4b4b4;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  justify-self: start;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.demo-reset-button:hover {
  border-color: #4b78b8;
  color: #eaf4ff;
  background: #1e2a38;
}

.demo-reset-button:active {
  background: #1a2330;
}

.scene-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.scene-badge[hidden] {
  display: none;
}

.panel-fleet .panel-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px 12px 12px;
  list-style: none;
}

.fleet-operator-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(255, 122, 24, 0.3);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 122, 24, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(17, 12, 8, 0.98), rgba(7, 7, 7, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.22);
  animation: fleetOperatorReveal 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.fleet-operator-header {
  display: grid;
  gap: 3px;
}

.fleet-operator-header span,
.fleet-operator-diff-title,
.fleet-operator-metrics em {
  color: rgba(244, 244, 244, 0.5);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fleet-operator-header strong {
  color: #fff4e7;
  font-size: 13px;
  line-height: 1.2;
}

.fleet-operator-prompt {
  width: 100%;
  min-height: 48px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  outline: 0;
  background: rgba(0, 0, 0, 0.42);
  color: #f6f1eb;
  font: inherit;
  font-size: 11px;
  line-height: 1.35;
  resize: vertical;
}

.fleet-operator-prompt:focus {
  border-color: rgba(255, 122, 24, 0.52);
  box-shadow: 0 0 0 2px rgba(255, 122, 24, 0.12);
}

.fleet-operator-primary,
.fleet-operator-secondary {
  height: 30px;
  border-radius: 7px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fleet-operator-primary {
  border: 1px solid rgba(36, 209, 126, 0.36);
  background: #24d17e;
  color: #031006;
}

.fleet-operator-secondary {
  border: 1px solid rgba(255, 122, 24, 0.26);
  background: rgba(255, 255, 255, 0.05);
  color: #ffe2c4;
}

.fleet-operator-primary:disabled,
.fleet-operator-secondary:disabled,
.fleet-operator-prompt:disabled {
  opacity: 0.6;
  cursor: default;
}

.fleet-operator-diff {
  display: grid;
  gap: 5px;
}

.fleet-operator-diff-row {
  display: grid;
  gap: 2px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.26);
}

.fleet-operator-diff-row strong,
.fleet-operator-diff-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-operator-diff-row strong {
  color: #f4f4f4;
  font-size: 11px;
}

.fleet-operator-diff-row span {
  color: #9df7b8;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
}

.fleet-operator-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.fleet-operator-metrics span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(36, 209, 126, 0.2);
  border-radius: 6px;
  background: rgba(36, 209, 126, 0.08);
}

.fleet-operator-metrics strong {
  min-width: 0;
  overflow: hidden;
  color: #9df7b8;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes fleetOperatorReveal {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fleet-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #323232;
  border-radius: 7px;
  background: #242424;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.fleet-row:hover {
  border-color: #4b78b8;
  background: #26303a;
}

.fleet-row.is-selected {
  border-color: #4b78b8;
  background: #1e2a38;
  box-shadow: inset 0 0 0 1px #4b78b8;
}

.fleet-row-swatch {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color, #888888);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.fleet-row-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.fleet-row-driver {
  color: #ffffff;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-row-driver-alert {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
  vertical-align: 1px;
}

.fleet-row-meta {
  color: #969696;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* ============ Demo wizard (Scene 1 rebuild) ============ */

.panel-demo-wizard {
  display: grid;
  gap: 10px;
  padding: 14px 14px 14px;
  border: 1px solid #303030;
  border-radius: 8px;
  background: #202020;
}

.demo-wizard-header {
  display: grid;
  gap: 4px;
}

.demo-wizard-step {
  color: #9a9a9a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.demo-wizard-title {
  margin: 0;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.demo-wizard-body {
  margin: 0;
  color: #b4b4b4;
  font-size: 12px;
  line-height: 1.5;
}

.demo-wizard-policies {
  display: grid;
  gap: 6px;
}

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

.demo-wizard-policies-label {
  color: #9a9a9a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.demo-wizard-policies textarea {
  width: 100%;
  min-height: 96px;
  padding: 8px 10px;
  border: 1px solid #353535;
  border-radius: 6px;
  background: #181818;
  color: #ededed;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
}

.demo-wizard-policies textarea:focus {
  outline: none;
  border-color: #4b78b8;
  box-shadow: 0 0 0 1px #4b78b8;
}

.demo-wizard-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.demo-wizard-primary {
  height: 30px;
  padding: 0 14px;
  border: 1px solid #3a5d8c;
  border-radius: 6px;
  background: #2b4d80;
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.demo-wizard-primary:hover {
  background: #355c95;
  border-color: #4b78b8;
}

.demo-wizard-primary:active {
  background: #284670;
}

.demo-wizard-primary:disabled {
  background: #2a2a2a;
  border-color: #353535;
  color: #6c6c6c;
  cursor: default;
}

.demo-wizard-reset {
  height: 30px;
  padding: 0 12px;
  border: 1px solid #353535;
  border-radius: 6px;
  background: transparent;
  color: #b4b4b4;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}

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

.demo-wizard-reset:hover {
  border-color: #4b78b8;
  color: #eaf4ff;
  background: #1e2a38;
}

/* When demo is active, hide legacy single-route + delivery panels so they
   don't compete visually with the wizard-driven flow. */
body.is-demo-mode #routePlanner,
body.is-demo-mode .delivery-panel {
  display: none;
}

body.is-demo-mode .cursor-window {
  grid-template-rows: minmax(0, 1fr) 22px;
  min-width: 1080px;
}

body.is-demo-mode .titlebar,
body.is-demo-mode .activity-bar {
  display: none;
}

body.is-demo-mode .workspace {
  grid-row: 1;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 30vw);
  grid-template-rows: auto minmax(0, 1fr);
}

body.is-demo-mode .assistant-panel {
  grid-column: 2;
  grid-row: 2;
}

body.is-demo-mode .editor {
  grid-column: 1;
  grid-row: 1 / 3;
}

body.is-demo-mode .context-panel {
  grid-column: 2;
  grid-row: 1;
  max-height: 58vh;
}

body.is-demo-mode.is-scene-2 .workspace {
  grid-template-rows: minmax(0, 1fr) 82px;
}

body.is-demo-mode.is-scene-2 .context-panel {
  grid-row: 1;
  height: 100%;
  max-height: none;
}

body.is-demo-mode.is-scene-2 .assistant-panel {
  grid-row: 2;
  height: 82px;
  min-height: 0;
  overflow: hidden;
}

body.is-demo-mode.is-scene-2 .assistant-panel .chat-header {
  min-height: 38px;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.is-demo-mode.is-scene-2 .assistant-scroll {
  overflow: hidden;
  padding: 5px 10px 8px;
}

body.is-demo-mode.is-scene-2 .panel-fleet {
  min-height: 0;
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(8, 8, 8, 0.72);
}

body.is-demo-mode.is-scene-2 .panel-fleet .panel-header {
  min-height: 31px;
  border-bottom: 0;
}

body.is-demo-mode.is-scene-2 .panel-fleet .panel-list {
  display: none;
}

/* ============ End demo wizard ============ */

/* ============ Demo UI polish ============ */

.assistant-panel {
  border-left: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, #080808, #030303);
}

body.is-demo-mode .assistant-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-right: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(9, 9, 9, 0.98), rgba(3, 3, 3, 0.98));
}

body.is-demo-mode .assistant-panel .chat-header {
  min-height: 42px;
}

body.is-demo-mode .assistant-panel .chat-header button,
body.is-demo-mode .assistant-mode-tabs,
body.is-demo-mode .panel-demo-wizard,
body.is-demo-mode .route-planner,
body.is-demo-mode .delivery-panel,
body.is-demo-mode .chat-dock {
  display: none;
}

body.is-demo-mode .assistant-scroll {
  padding: 10px;
  border-bottom: 0;
}

.chat-header,
.assistant-mode-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(15, 15, 15, 0.98), rgba(7, 7, 7, 0.98));
}

.chat-header strong,
.panel-section-title span,
.chat-dock-title span,
.panel-fleet .panel-title,
.demo-wizard-title {
  color: #f4f4f4;
  letter-spacing: 0;
}

.chat-header span,
.section-status,
.chat-dock-title small,
.panel-fleet .panel-count,
.demo-wizard-body,
.fleet-row-meta {
  color: rgba(244, 244, 244, 0.52);
}

.assistant-mode-tab,
.panel-section-title,
.chat-dock-title,
.panel-fleet .panel-header,
.demo-wizard-step,
.demo-wizard-policies-label,
.route-field span,
.delivery-tab,
.delivery-dropzone span {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.assistant-mode-tabs {
  background: #050505;
}

.assistant-mode-tab {
  color: rgba(244, 244, 244, 0.48);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.assistant-mode-tab:hover,
.assistant-mode-tab.active {
  background: #0d0d0d;
  color: #f4f4f4;
}

.assistant-mode-tab.active::after {
  right: 22px;
  left: 22px;
  height: 2px;
  background: #24d17e;
}

.assistant-scroll {
  background:
    linear-gradient(180deg, rgba(8, 8, 8, 0.98), rgba(3, 3, 3, 0.98));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-color: rgba(255, 255, 255, 0.18) #050505;
}

.assistant-scroll::-webkit-scrollbar-track {
  background: #050505;
}

.assistant-scroll::-webkit-scrollbar-thumb {
  border-color: #050505;
  background: rgba(255, 255, 255, 0.18);
}

.panel-demo-wizard,
.panel-fleet,
.route-planner,
.delivery-panel,
.chat-dock {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(14, 14, 14, 0.98), rgba(7, 7, 7, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.panel-section-title,
.chat-dock-title,
.panel-fleet .panel-header,
.delivery-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.route-field,
.route-swap,
.route-secondary,
.route-choice,
.delivery-pane,
.delivery-dropzone,
.fuel-tools,
.fleet-row,
.demo-wizard-policies textarea {
  border-color: rgba(255, 255, 255, 0.1);
  background: #0b0b0b;
  color: #e8e8e8;
}

.route-field:focus-within,
.demo-wizard-policies textarea:focus {
  border-color: #24d17e;
  box-shadow: 0 0 0 2px rgba(36, 209, 126, 0.12);
}

.route-swap:hover,
.route-secondary:hover,
.route-choice:hover,
.route-choice.active,
.delivery-tab:hover,
.delivery-tab.active,
.fleet-row:hover,
.fleet-row.is-selected {
  border-color: rgba(36, 209, 126, 0.42);
  background: #101711;
  color: #f4f4f4;
}

.fleet-row.is-selected {
  box-shadow:
    inset 0 0 0 1px rgba(36, 209, 126, 0.38),
    0 8px 18px rgba(0, 0, 0, 0.18);
}

.route-primary,
.demo-wizard-primary,
.fuel-search-button {
  border: 1px solid rgba(36, 209, 126, 0.4);
  background: #24d17e;
  color: #031006;
  font-weight: 750;
  box-shadow:
    0 10px 22px rgba(36, 209, 126, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.route-primary:hover,
.demo-wizard-primary:hover,
.fuel-search-button:hover {
  border-color: rgba(157, 247, 184, 0.62);
  background: #32df8c;
  color: #031006;
}

.route-primary:disabled,
.demo-wizard-primary:disabled,
.fuel-search-button:disabled {
  border-color: rgba(255, 255, 255, 0.1);
  background: #141414;
  color: rgba(244, 244, 244, 0.34);
  box-shadow: none;
}

.demo-reset-button,
.demo-wizard-reset {
  border-color: rgba(255, 255, 255, 0.12);
  background: #080808;
  color: rgba(244, 244, 244, 0.62);
}

.demo-reset-button:hover,
.demo-wizard-reset:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: #131313;
  color: #f4f4f4;
}

.scene-badge {
  border: 1px solid rgba(36, 209, 126, 0.28);
  border-radius: 5px;
  background: rgba(36, 209, 126, 0.1);
  color: #9df7b8;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.delivery-tab {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(244, 244, 244, 0.46);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.delivery-tab.active {
  box-shadow: inset 0 -2px 0 #24d17e;
}

.delivery-ai-progress {
  background: rgba(255, 255, 255, 0.1);
}

.delivery-ai-progress span {
  background: linear-gradient(90deg, #24d17e, #9df7b8);
}

.statusbar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #050505;
  color: rgba(244, 244, 244, 0.68);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px;
}

.status-remote {
  background: #24d17e;
  color: #031006;
}

body.is-demo-mode .control-group.compact:has(#accidentToggle) {
  display: none;
}

.ops-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.ops-summary-grid:empty {
  display: none;
}

.ops-summary-card {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: rgba(5, 5, 5, 0.72);
}

.ops-summary-card strong {
  color: #f4f4f4;
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
}

.ops-summary-card span {
  overflow: hidden;
  color: rgba(244, 244, 244, 0.46);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.fleet-row-body {
  gap: 4px;
}

.fleet-row.is-live .fleet-row-driver::after {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 7px;
  border-radius: 50%;
  background: #24d17e;
  box-shadow: 0 0 0 3px rgba(36, 209, 126, 0.12);
  content: "";
  vertical-align: 1px;
}

.fleet-row-chips {
  display: flex;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}

.fleet-row-chips span {
  max-width: 100%;
  overflow: hidden;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px;
  color: rgba(244, 244, 244, 0.58);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-row.is-expanded {
  align-items: start;
  gap: 9px 10px;
  border-color: rgba(249, 115, 22, 0.52);
  background:
    linear-gradient(180deg, rgba(249, 115, 22, 0.08), rgba(8, 10, 8, 0.96)),
    #0b0b0b;
}

.fleet-field-explorer {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  margin-top: 2px;
  padding: 8px;
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 7px;
  background: rgba(5, 7, 5, 0.72);
  cursor: default;
}

.fleet-delay-danger-card {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 87, 87, 0.32);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(168, 34, 34, 0.18), rgba(9, 8, 8, 0.84)),
    rgba(12, 8, 8, 0.9);
}

.fleet-delay-danger-title {
  color: #ffb4ad;
  font-family: var(--display);
  font-size: 19px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.94;
}

.fleet-delay-inspect-button {
  height: 27px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 6px;
  background: #f8f8f4;
  color: #111111;
  cursor: pointer;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  transition: background 0.12s ease, transform 0.12s ease;
}

.fleet-delay-inspect-button:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.fleet-field-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.fleet-field-header span {
  color: rgba(244, 244, 244, 0.46);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.fleet-field-header strong {
  min-width: 0;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-field-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  overflow: visible;
}

.fleet-field-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 21px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(244, 244, 244, 0.68);
  cursor: pointer;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.fleet-field-button:hover {
  border-color: rgba(249, 115, 22, 0.48);
  background: rgba(249, 115, 22, 0.1);
  color: #ffffff;
}

.fleet-field-button.is-active {
  border-color: rgba(249, 115, 22, 0.78);
  background: rgba(249, 115, 22, 0.2);
  color: #ffe4c7;
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.22);
}

.fleet-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  max-height: none;
  overflow: visible;
}

.fleet-field-item {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 4px 5px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.028);
}

.fleet-field-key {
  color: rgba(244, 244, 244, 0.45);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

.fleet-field-value {
  color: rgba(255, 255, 255, 0.9);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 8px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.context-panel {
  grid-column: 4;
  grid-row: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(9, 9, 9, 0.98), rgba(3, 3, 3, 0.98));
  transform-origin: right center;
  transition: opacity 260ms ease, transform 260ms ease;
}

body.is-demo-mode.is-route-preview-closing .context-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px) scale(0.985);
}

body.is-demo-mode.is-route-preview-accepted .workspace {
  grid-template-rows: minmax(0, 1fr);
}

body.is-demo-mode.is-route-preview-accepted .context-panel {
  display: none;
}

body.is-demo-mode.is-route-preview-accepted .assistant-panel {
  grid-row: 1 / 3;
  min-height: 0;
}

.context-panel-header {
  display: grid;
  gap: 5px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 80% 0%, rgba(36, 209, 126, 0.12), transparent 34%),
    linear-gradient(180deg, #101010, #070707);
}

.context-eyebrow {
  color: rgba(244, 244, 244, 0.46);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.context-title {
  margin: 0;
  color: #f4f4f4;
  font-size: 18px;
  line-height: 1.12;
  font-weight: 800;
}

.context-subtitle {
  margin: 0;
  color: rgba(244, 244, 244, 0.54);
  line-height: 1.38;
}

.context-panel-body {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
}

.context-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15, 15, 15, 0.98), rgba(7, 7, 7, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.context-card p {
  margin: 0;
  color: rgba(244, 244, 244, 0.62);
  line-height: 1.46;
}

.context-card-heading {
  display: grid;
  gap: 3px;
}

.context-card-heading span {
  color: rgba(244, 244, 244, 0.42);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.context-card-heading strong {
  min-width: 0;
  overflow: hidden;
  color: #f4f4f4;
  font-size: 13px;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-yard-figure {
  position: relative;
  min-height: 186px;
  aspect-ratio: 64 / 42;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: #050505;
}

.context-yard-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) saturate(0.92);
}

.walmart-fixture-label {
  padding: 2px 5px;
  border: 1px solid rgba(245, 215, 110, 0.48);
  border-radius: 3px;
  background: rgba(5, 5, 5, 0.72);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.34);
  line-height: 1;
  text-shadow: none;
  white-space: nowrap;
}

.context-annotation-chips {
  display: flex;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}

.context-annotation-chips span {
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: #050505;
  color: rgba(244, 244, 244, 0.6);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.context-metric-grid,
.context-impact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

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

.context-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: #080808;
}

.context-metric strong {
  overflow: hidden;
  color: #f4f4f4;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-metric span {
  overflow: hidden;
  color: rgba(244, 244, 244, 0.4);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.context-metric.is-good {
  border-color: rgba(36, 209, 126, 0.22);
}

.context-metric.is-good strong {
  color: #9df7b8;
}

.context-metric.is-warn {
  border-color: rgba(255, 176, 0, 0.32);
}

.context-metric.is-warn strong {
  color: #ffcf62;
}

.context-metric.is-danger {
  border-color: rgba(255, 59, 48, 0.4);
}

.context-metric.is-danger strong {
  color: #ff8d86;
}

.context-sparkline {
  min-height: 92px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: #050505;
}

.context-sparkline svg {
  display: block;
  width: 100%;
  height: 110px;
}

.context-chart-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.context-chart-split > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.context-chart-split > div > span {
  color: rgba(244, 244, 244, 0.42);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.context-chart-split .context-sparkline {
  min-height: 76px;
}

.context-chart-split .context-sparkline svg {
  height: 82px;
}

.context-cctv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.context-cctv-grid figure {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: #050505;
}

.context-cctv-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  object-fit: cover;
  background: #000000;
}

.context-cctv-grid figcaption {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 2px 3px 3px;
}

.context-cctv-grid figcaption strong,
.context-cctv-grid figcaption em {
  overflow: hidden;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-cctv-grid figcaption strong {
  color: rgba(244, 244, 244, 0.78);
  font-size: 9px;
  font-weight: 850;
}

.context-cctv-grid figcaption em {
  color: rgba(244, 244, 244, 0.42);
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.context-optical-archive {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.context-optical-archive button {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  background: #050505;
}

.context-optical-archive button:hover {
  border-color: rgba(36, 209, 126, 0.38);
}

.context-optical-archive img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: contrast(1.08) saturate(0.94);
}

.context-sar-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.context-sar-strip img {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  object-fit: cover;
  filter: contrast(1.12);
}

.context-empty {
  display: grid;
  min-height: 70px;
  place-items: center;
  color: rgba(244, 244, 244, 0.42);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.context-recommendation {
  border-color: rgba(36, 209, 126, 0.24);
  background:
    radial-gradient(circle at 80% 12%, rgba(36, 209, 126, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(14, 18, 15, 0.98), rgba(6, 8, 6, 0.96));
}

.context-action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.context-primary-action,
.context-secondary-action {
  height: 32px;
  border-radius: 7px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.context-primary-action {
  background: #24d17e;
  color: #031006;
  box-shadow:
    0 10px 22px rgba(36, 209, 126, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.context-secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: #0b0b0b;
  color: rgba(244, 244, 244, 0.78);
}

.context-primary-action:disabled,
.context-secondary-action:disabled {
  opacity: 0.55;
  cursor: default;
}

.route-preview-card {
  border-color: rgba(255, 122, 24, 0.36);
  background:
    radial-gradient(circle at 82% 6%, rgba(255, 122, 24, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(20, 12, 5, 0.98), rgba(7, 7, 7, 0.97));
}

.route-preview-card.is-success {
  border-color: rgba(36, 209, 126, 0.38);
  background:
    radial-gradient(circle at 82% 6%, rgba(36, 209, 126, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(10, 18, 12, 0.98), rgba(5, 8, 5, 0.97));
}

.route-preview-card.is-success .context-card-heading strong {
  color: #9df7b8;
}

.route-preview-legend {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.24);
}

.route-preview-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: rgba(244, 244, 244, 0.66);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.route-preview-legend i {
  display: block;
  width: 34px;
  height: 4px;
  border-radius: 999px;
}

.route-preview-legend .old-route {
  background: rgba(249, 115, 22, 0.28);
}

.route-preview-legend .new-route {
  background: #ff7a18;
  box-shadow: 0 0 14px rgba(255, 122, 24, 0.42);
}

.route-preview-accept {
  margin-top: 2px;
  background: #ff7a18;
  color: #160802;
  box-shadow:
    0 10px 22px rgba(255, 122, 24, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.route-preview-card.is-success .route-preview-accept {
  background: #24d17e;
  color: #031006;
}

.context-driver-map {
  height: 214px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: #050505;
}

.context-driver-map .gm-style-cc,
.context-driver-map a[href^="https://maps.google.com/maps"] {
  transform: scale(0.72);
  transform-origin: left bottom;
}

.driver-live-card {
  border-color: rgba(36, 209, 126, 0.2);
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #24d17e;
  box-shadow: 0 0 0 4px rgba(36, 209, 126, 0.12);
  vertical-align: -1px;
}

.context-road-camera {
  display: block;
  width: 100%;
  height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  object-fit: cover;
  background: #050505;
  filter: contrast(1.04) saturate(0.94);
}

.context-replan-prompt {
  min-height: 76px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  outline: 0;
  background: #050505;
  color: #f4f4f4;
  font: inherit;
  line-height: 1.4;
  resize: vertical;
}

.context-replan-prompt:focus {
  border-color: #24d17e;
  box-shadow: 0 0 0 2px rgba(36, 209, 126, 0.12);
}

.replan-diff-list {
  display: grid;
  gap: 6px;
}

.replan-diff-row {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: #080808;
}

.replan-diff-row strong,
.replan-diff-row span,
.replan-diff-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.replan-diff-row strong {
  color: #f4f4f4;
  white-space: nowrap;
}

.replan-diff-row span {
  color: #9df7b8;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.replan-diff-row em {
  color: rgba(244, 244, 244, 0.5);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

body.is-replan-applying .fleet-row,
body.is-replan-applying .map-surface {
  transition: opacity 0.28s ease, filter 0.28s ease;
}

/* ============ End demo UI polish ============ */

/* ============ Dwell drawer (Lane B2) ============ */

.dwell-drawer {
  position: fixed;
  top: 34px;
  right: 0;
  bottom: 22px;
  width: 360px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #202020;
  border-left: 1px solid #303030;
  color: var(--text-bright);
  font-family: inherit;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.dwell-drawer.is-open {
  transform: translateX(0);
}

.dwell-drawer[hidden] {
  display: none;
}

.dwell-drawer-header {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #2a2a2a;
  background: #1c1c1c;
}

.dwell-drawer-eyebrow {
  color: #9a9a9a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dwell-drawer-title {
  margin: 0;
  color: var(--text-bright);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  padding-right: 28px;
}

.dwell-drawer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #b4b4b4;
  font-size: 18px;
  line-height: 1;
}

.dwell-drawer-close:hover {
  background: #2a2a2a;
  color: #ffffff;
}

.dwell-drawer-section {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-bottom: 1px solid #262626;
}

.dwell-drawer > .dwell-drawer-section:last-of-type {
  border-bottom: 0;
}

.dwell-section-label {
  color: #8c8c8c;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dwell-forecast {
  align-items: start;
}

.dwell-forecast-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.dwell-forecast-number {
  color: var(--text-bright);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dwell-forecast-unit {
  color: #b4b4b4;
  font-size: 13px;
  font-weight: 500;
}

.dwell-forecast-risk {
  justify-self: start;
  display: inline-block;
  padding: 2px 8px;
  margin-top: 4px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dwell-forecast-risk.risk-normal {
  background: #303030;
  color: #d6d6d6;
}

.dwell-forecast-risk.risk-elevated {
  background: #7a4e0a;
  color: #ffffff;
}

.dwell-forecast-risk.risk-high {
  background: #7a1f1f;
  color: #ffffff;
}

.dwell-sparkline-svg {
  width: 100%;
  height: 40px;
  display: block;
}

.dwell-sar-date {
  color: #b4b4b4;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.dwell-sar-frame {
  width: 100%;
  max-height: 240px;
  overflow: hidden;
  border-radius: 4px;
  background: #181818;
  border: 1px solid #2a2a2a;
}

.dwell-sar-frame.is-empty {
  height: 120px;
  display: grid;
  place-items: center;
  color: #6e7681;
  font-size: 11px;
}

.dwell-sar-frame.is-empty::before {
  content: "SAR scene unavailable";
}

.dwell-sar-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 240px;
  object-fit: cover;
}

.dwell-reasoning-text {
  margin: 0;
  color: #d4d4d4;
  font-size: 12px;
  line-height: 1.5;
}

.dwell-drawer-footer {
  margin-top: auto;
  padding: 12px 16px 14px;
  border-top: 1px solid #2a2a2a;
  background: #1c1c1c;
}

.dwell-action-button {
  width: 100%;
  height: 32px;
  border-radius: 5px;
  background: #0e639c;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.dwell-action-button:hover {
  background: #1177bb;
}

.dwell-recommendation {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-top: 1px solid #2a2a2a;
  background: #242424;
}

.dwell-recommendation-text {
  margin: 0;
  color: #e6e6e6;
  font-size: 12px;
  line-height: 1.5;
}

.dwell-recommendation-apply {
  justify-self: start;
  height: 26px;
  padding: 0 10px;
  border-radius: 5px;
  background: #2f3b45;
  color: #eaf4ff;
  font-size: 11px;
  font-weight: 700;
}

.dwell-recommendation-apply:hover {
  background: #3c4f5d;
}

.dwell-recommendation-apply:disabled,
.dwell-recommendation-apply.is-applied {
  cursor: default;
  background: #2a2a2a;
  color: #8c8c8c;
}

.walmart-monitoring-panel {
  gap: 10px;
  background: #1f1f1f;
}

.walmart-monitoring-copy,
.walmart-monitoring-empty {
  margin: 0;
  color: #c9d1d9;
  font-size: 12px;
  line-height: 1.45;
}

.walmart-monitoring-empty {
  padding: 10px;
  border: 1px dashed #3a3a3a;
  border-radius: 5px;
  color: #8f8f8f;
  text-align: center;
}

.walmart-monitoring-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.walmart-monitoring-stat {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #303030;
  border-radius: 5px;
  background: #252526;
}

.walmart-monitoring-stat strong {
  color: #ffffff;
  font-size: 16px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.walmart-monitoring-stat span {
  min-width: 0;
  overflow: hidden;
  color: #969696;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.walmart-monitoring-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.walmart-monitoring-actions button {
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #3a3a3a;
  border-radius: 5px;
  background: #252526;
  color: #d8d8d8;
  font-size: 10px;
  font-weight: 750;
}

.walmart-monitoring-actions button:hover {
  border-color: #4b78b8;
  background: #1e2a38;
  color: #ffffff;
}

.walmart-monitoring-actions button:disabled {
  cursor: default;
  color: #7d7d7d;
}

.walmart-satellite-archive {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid #303030;
  border-radius: 8px;
  background: #181818;
}

.walmart-archive-counts {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #303030;
  border-radius: 5px;
  background: #202020;
}

.walmart-archive-counts > div:not(.walmart-archive-bar) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.walmart-archive-counts strong {
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.walmart-archive-counts span {
  min-width: 0;
  overflow: hidden;
  color: #969696;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.walmart-archive-counts p {
  margin: 0;
  color: #9a9a9a;
  font-size: 10px;
  line-height: 1.35;
}

.walmart-archive-bar {
  display: flex;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #303030;
}

.walmart-archive-bar span {
  display: block;
  min-width: 6px;
}

.walmart-archive-bar .is-optical {
  background: #35c47b;
}

.walmart-archive-bar .is-sar {
  background: #b175e8;
}

.walmart-optical-block,
.walmart-sar-block {
  display: grid;
  gap: 7px;
}

.walmart-satellite-head,
.walmart-chart-head,
.walmart-chart-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.walmart-satellite-head strong,
.walmart-chart-head strong {
  min-width: 0;
  overflow: hidden;
  color: #f0f0f0;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.walmart-satellite-archive > .walmart-satellite-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.walmart-satellite-archive > .walmart-satellite-head strong,
.walmart-satellite-archive > .walmart-satellite-head em {
  white-space: nowrap;
}

.walmart-archive-spark {
  display: grid;
  gap: 6px;
}

.walmart-archive-spark-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.walmart-archive-spark-head span {
  min-width: 0;
  overflow: hidden;
  color: #969696;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.walmart-archive-spark-head em {
  color: #6f6f6f;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.walmart-archive-spark-svg {
  display: block;
  width: 100%;
  height: 110px;
}

.walmart-archive-spark-foot {
  display: flex;
  justify-content: space-between;
  color: #6f6f6f;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.walmart-archive-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}

.walmart-archive-grid button {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #111111;
}

.walmart-archive-grid button:hover {
  border-color: #4a4a4a;
}

.walmart-archive-grid button.active {
  border-color: #35c47b;
  box-shadow: 0 0 0 1px rgba(53, 196, 123, 0.45);
}

.walmart-archive-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #000000;
}

.walmart-archive-active {
  display: grid;
  gap: 6px;
  padding: 6px;
  border: 1px solid #303030;
  border-radius: 8px;
  background: #111111;
}

.walmart-archive-active img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  object-fit: cover;
  background: #000000;
}

.walmart-archive-active span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 2px 4px 4px;
}

.walmart-archive-active strong,
.walmart-archive-active em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.walmart-archive-active strong {
  color: #f0f0f0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.walmart-archive-active em {
  color: #6f6f6f;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.walmart-satellite-head em,
.walmart-chart-head em,
.walmart-chart-foot span {
  color: #8f8f8f;
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.walmart-satellite-hero {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #303030;
  border-radius: 5px;
  background: #101010;
}

.walmart-satellite-hero img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.walmart-satellite-hero figcaption {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: rgba(18, 18, 18, 0.78);
  backdrop-filter: blur(10px);
}

.walmart-satellite-hero figcaption strong,
.walmart-satellite-hero figcaption span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.walmart-satellite-hero figcaption strong {
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.walmart-satellite-hero figcaption span {
  color: #c9d1d9;
  font-size: 10px;
}

.walmart-satellite-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.walmart-optical-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.walmart-satellite-thumb,
.walmart-optical-thumb {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #2c2c2c;
  border-radius: 4px;
  background: #111111;
}

.walmart-satellite-thumb:hover,
.walmart-satellite-thumb.active,
.walmart-optical-thumb:hover,
.walmart-optical-thumb.active {
  border-color: #4b78b8;
}

.walmart-satellite-thumb img,
.walmart-optical-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.walmart-optical-thumb img {
  aspect-ratio: 4 / 3;
}

.walmart-satellite-thumb em,
.walmart-optical-thumb em {
  position: absolute;
  right: 2px;
  bottom: 2px;
  left: 2px;
  overflow: hidden;
  padding: 1px 2px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.66);
  color: #ffffff;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.walmart-chart-grid {
  display: grid;
  gap: 7px;
}

.walmart-chart-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #303030;
  border-radius: 5px;
  background: #202020;
}

.walmart-chart-svg {
  display: block;
  width: 100%;
  height: 72px;
}

.walmart-monitoring-subhead {
  color: #9a9a9a;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.walmart-camera-grid {
  display: grid;
  gap: 7px;
}

.walmart-camera-card {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #303030;
  border-radius: 5px;
  background: #151515;
}

.walmart-camera-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111111;
}

.walmart-camera-card figcaption {
  display: grid;
  gap: 1px;
  padding: 6px 7px;
  background: #1b1b1b;
}

.walmart-camera-card figcaption strong,
.walmart-camera-card figcaption span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.walmart-camera-card figcaption strong {
  color: #f2f2f2;
  font-size: 11px;
  font-weight: 750;
}

.walmart-camera-card figcaption span {
  color: #9a9a9a;
  font-size: 10px;
}

.walmart-camera-card:not(.is-primary) {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
}

.walmart-camera-card:not(.is-primary) img {
  height: 58px;
  aspect-ratio: auto;
}

.walmart-layer-list {
  display: grid;
  gap: 5px;
}

.walmart-layer-toggle {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #303030;
  border-radius: 5px;
  background: #242424;
  color: #d8d8d8;
  text-align: left;
}

.walmart-layer-toggle:hover {
  border-color: #4b78b8;
  background: #27313a;
}

.walmart-layer-toggle.is-off {
  opacity: 0.48;
}

.walmart-layer-swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--layer-color, #d8d8d8);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.walmart-layer-toggle span:not(.walmart-layer-swatch) {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.walmart-layer-toggle em {
  color: #8f8f8f;
  font-size: 10px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

/* ============ End dwell drawer (Lane B2) ============ */

/* ============ Dispatch chat (Lane D) ============ */

.scenario-diff-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 6px;
  padding: 0;
  list-style: none;
}

.scenario-diff-item {
  padding: 7px 9px;
  border: 1px solid #2d2d2d;
  border-radius: 5px;
  background: #1f1f1f;
}

.scenario-diff-header {
  color: #e6e6e6;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.scenario-diff-reason {
  margin-top: 3px;
  color: #9a9a9a;
  font-size: 11px;
  line-height: 1.45;
}

.scenario-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.scenario-apply-button {
  height: 26px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: #2f3b45;
  color: #eaf4ff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.scenario-apply-button:hover {
  background: #3c4f5d;
}

.scenario-apply-button:disabled,
.scenario-apply-button.is-applied {
  cursor: default;
  background: #2a2a2a;
  color: #8c8c8c;
}

/* ============ End dispatch chat (Lane D) ============ */

/* ============ TMS connect modal (Step 7) ============ */

.tms-connect-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tms-connect-button::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6c6c6c;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.tms-connect-button.is-connected::before {
  background: #5ad06f;
  box-shadow: 0 0 6px rgba(90, 208, 111, 0.7);
}

.tms-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  pointer-events: auto;
}

.tms-modal[hidden] {
  display: none;
}

.tms-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.65);
  backdrop-filter: blur(2px);
}

.tms-modal.is-import-gate .tms-modal-backdrop {
  background:
    radial-gradient(640px 420px at 50% 38%, rgba(36, 209, 126, 0.11), transparent 72%),
    rgba(3, 3, 3, 0.78);
  backdrop-filter: blur(8px);
}

.tms-modal-card {
  position: relative;
  width: 480px;
  max-width: calc(100vw - 32px);
  min-height: 320px;
  padding: 24px 28px 22px;
  border: 1px solid #353535;
  border-radius: 12px;
  background: #1f1f1f;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.02);
  color: #ededed;
}

.tms-modal.is-import-gate .tms-modal-card {
  width: 560px;
  min-height: 0;
  padding: 28px 30px 26px;
  border-color: rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(31, 31, 31, 0.98), rgba(12, 12, 12, 0.98)),
    #111111;
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.tms-modal-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: rgba(157, 247, 184, 0.76);
  font-family: var(--mono-font);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tms-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.005em;
}

.tms-modal.is-import-gate .tms-modal-title {
  font-size: 20px;
}

.tms-modal-subtitle {
  margin: 6px 0 18px;
  color: #9a9a9a;
  font-size: 12px;
  line-height: 1.45;
}

.tms-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #b4b4b4;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.tms-modal-close:hover {
  background: #2a2a2a;
  color: #ffffff;
}

.tms-logo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tms-logo {
  position: relative;
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 84px;
  padding: 12px 14px;
  border: 1px solid #2c2c2c;
  border-radius: 8px;
  background: var(--tms-color, #2a2a2a);
  color: #ffffff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.tms-modal.is-import-gate .tms-logo {
  min-height: 78px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.12)),
    var(--tms-color, #2a2a2a);
}

.tms-logo:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
  filter: brightness(1.08);
}

.tms-logo:active {
  transform: translateY(0);
}

.tms-logo.is-connecting {
  cursor: progress;
  filter: brightness(0.85);
}

.tms-logo.is-selected {
  border-color: rgba(157, 247, 184, 0.82);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.4),
    0 0 0 3px rgba(36, 209, 126, 0.12);
}

.tms-logo.is-selected::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9df7b8;
  box-shadow: 0 0 10px rgba(157, 247, 184, 0.82);
}

.tms-logo.is-disabled,
.tms-logo:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.tms-logo-mark {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.tms-logo-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tms-logo.is-connecting::after {
  content: "Connecting...";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  animation: tms-pulse 1.1s ease-in-out infinite;
}

@keyframes tms-pulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.45; }
}

.tms-modal-status {
  margin-top: 14px;
  min-height: 16px;
  color: #9bbfe6;
  font-size: 12px;
  font-weight: 500;
}

.tms-import-preview {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.tms-import-preview[hidden] {
  display: none;
}

.tms-import-preview span {
  color: rgba(244, 244, 244, 0.42);
  font-family: var(--mono-font);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tms-import-preview strong {
  color: #f4f4f4;
  font-size: 13px;
  font-weight: 780;
}

.tms-import-preview em {
  color: #9a9a9a;
  font-size: 11px;
  font-style: normal;
}

.tms-import-button {
  width: 100%;
  height: 40px;
  margin-top: 14px;
  border: 1px solid rgba(36, 209, 126, 0.72);
  border-radius: 7px;
  background: #24d17e;
  box-shadow: 0 14px 34px rgba(36, 209, 126, 0.18);
  color: #04120a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tms-import-button[hidden] {
  display: none;
}

.tms-import-button:hover {
  background: #9df7b8;
}

.tms-import-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.tms-import-progress {
  position: relative;
  height: 5px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.tms-import-progress[hidden] {
  display: none;
}

.tms-import-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, #24d17e, #9df7b8);
  box-shadow: 0 0 18px rgba(36, 209, 126, 0.32);
  animation: tms-progress 1s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes tms-progress {
  0% {
    transform: translateX(-105%);
  }
  100% {
    transform: translateX(265%);
  }
}

/* ============ End TMS connect modal (Step 7) ============ */

/* ============ Push-to-drivers button (Step 7) ============ */

.dwell-recommendation-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.dwell-recommendation-push {
  height: 26px;
  padding: 0 10px;
  border: 1px solid #2f4a6e;
  border-radius: 5px;
  background: #1e3050;
  color: #cfe1f5;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.dwell-recommendation-push:hover {
  border-color: #4b78b8;
  background: #25405f;
  color: #ffffff;
}

.dwell-recommendation-push:active {
  background: #1a2d4b;
}

/* ============ End push-to-drivers button (Step 7) ============ */

/* ============ Phone mirror (Step 7) ============ */

.phone-mirror {
  position: fixed;
  right: 18px;
  bottom: 52px;
  z-index: 150;
  display: grid;
  justify-items: center;
  gap: 6px;
  pointer-events: auto;
}

.phone-mirror[hidden] {
  display: none;
}

.phone-mirror-bezel {
  position: relative;
  width: 304px;
  height: 438px;
  padding: 38px 10px 52px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.97), rgba(5, 5, 5, 0.98)),
    #080808;
  box-shadow:
    0 20px 54px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.phone-mirror-bezel::before {
  content: "DriverNavPreview.swift";
  position: absolute;
  top: 10px;
  right: 12px;
  left: 44px;
  z-index: 5;
  height: 18px;
  overflow: hidden;
  color: rgba(244, 244, 244, 0.58);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 650;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-mirror-bezel::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 15px;
  z-index: 5;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow:
    11px 0 0 #febc2e,
    22px 0 0 #28c840;
}

.phone-mirror-notch {
  display: none;
}

.phone-mirror-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 30%, rgba(36, 209, 126, 0.11), transparent 30%),
    #050505;
  overflow: hidden;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.phone-mirror-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 14%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.32), transparent 22%),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.012) 0,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 3px
    );
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.phone-guidance {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px 14px 14px;
  color: #f8fafc;
  background:
    linear-gradient(180deg, rgba(4, 4, 4, 0.86) 0%, rgba(8, 8, 8, 0.68) 42%, rgba(5, 5, 5, 0.94) 100%),
    radial-gradient(circle at 50% 18%, rgba(36, 209, 126, 0.14), transparent 38%);
  backdrop-filter: blur(3px) saturate(1.02);
}

.phone-guidance[hidden] {
  display: none;
}

.phone-guidance-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 18px;
  color: rgba(244, 244, 244, 0.56);
  font-size: 10px;
  font-weight: 800;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.phone-guidance-primary {
  display: grid;
  gap: 2px;
  padding-top: 5px;
}

.phone-guidance-distance {
  font-size: 36px;
  line-height: 0.95;
  font-weight: 850;
  letter-spacing: 0;
}

.phone-guidance-maneuver {
  color: #24d17e;
  font-size: 13px;
  font-weight: 850;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.phone-guidance-instruction {
  min-height: 66px;
  margin: 0;
  color: #edf6ff;
  font-size: 17px;
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: 0;
}

.phone-guidance-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.phone-guidance-metrics div {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(8, 8, 8, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.phone-guidance-metrics dt,
.phone-guidance-next span {
  color: rgba(244, 244, 244, 0.45);
  font-size: 9px;
  font-weight: 850;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.phone-guidance-metrics dd {
  margin: 4px 0 0;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.phone-guidance-next {
  display: grid;
  gap: 4px;
  min-height: 42px;
  padding: 9px;
  border: 1px solid rgba(36, 209, 126, 0.22);
  border-radius: 6px;
  background: rgba(5, 5, 5, 0.72);
}

.phone-guidance-next strong {
  overflow: hidden;
  color: #e5edf8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-guidance-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.phone-guidance-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #24d17e, #9df7b8);
  transition: width 0.18s ease;
}

.phone-nav-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #e7ebef;
}

.phone-nav-map .gm-style-cc,
.phone-nav-map a[href^="https://maps.google.com/maps"] {
  transform: scale(0.74);
  transform-origin: left bottom;
}

.phone-mirror-image {
  display: none;
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 0;
}

.phone-mirror-screen.is-road-mode .phone-nav-map {
  display: none;
}

.phone-mirror-screen.is-road-mode .phone-mirror-image {
  display: block;
}

.phone-mirror-screen.is-guidance-mode .phone-nav-map {
  filter: saturate(0.78) brightness(0.72) contrast(1.05);
}

.phone-mode-control {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  width: calc(100% - 20px);
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(4, 4, 4, 0.86);
  backdrop-filter: blur(10px);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.phone-mirror-button {
  height: 28px;
  min-width: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(244, 244, 244, 0.68);
  font-size: 11px;
  font-weight: 700;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.phone-mirror-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.phone-mirror-button.active {
  background: #24d17e;
  color: #031006;
  box-shadow:
    0 8px 18px rgba(36, 209, 126, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.phone-mirror-button:active {
  transform: translateY(1px);
}

.phone-mirror-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(244, 244, 244, 0.62);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(5, 5, 5, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 8px;
  border-radius: 5px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

/* ============ End phone mirror (Step 7) ============ */
