:root {
  color-scheme: light;
  --bg: #edf1f3;
  --surface: #ffffff;
  --surface-muted: #f2f5f6;
  --border: #d6dee3;
  --text: #152027;
  --muted: #61717d;
  --blue: #2563eb;
  --green: #0f8a5f;
  --amber: #c26a16;
  --red: #c24132;
  --navy: #182126;
  --cyan: #0b8f9c;
  --hud: rgba(255, 255, 255, 0.94);
  --hud-border: rgba(21, 32, 39, 0.12);
  --shadow: 0 1px 2px rgba(19, 30, 38, 0.08);
  --shadow-strong: 0 14px 38px rgba(14, 23, 29, 0.18);
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family:
    "Malgun Gothic",
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  border-color: #9aa9b8;
  background: #f9fbfc;
}

body.is-login-active {
  overflow: hidden;
}

body.is-login-active .app-shell {
  filter: blur(8px);
  pointer-events: none;
  transform: scale(0.985);
}

body.is-launch-active .app-shell {
  filter: blur(3px) saturate(0.92);
  pointer-events: none;
  transform: scale(0.995);
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  min-height: 100%;
  overflow: hidden;
  background: #101923;
  color: #ffffff;
}

body.is-login-active .login-screen {
  display: grid;
  place-items: center;
}

body.is-login-closing .login-screen {
  animation: login-screen-out 0.62s ease forwards;
}

.launch-screen {
  position: fixed;
  inset: 0;
  z-index: 1900;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(12, 20, 30, 0.28);
  color: var(--text);
  pointer-events: none;
}

body.is-launch-active .launch-screen {
  display: grid;
  animation: launch-screen-in 0.34s ease both;
}

body.is-launch-closing .launch-screen {
  animation: launch-screen-out 0.36s ease forwards;
}

.launch-panel {
  display: grid;
  gap: 12px;
  width: min(420px, calc(100% - 24px));
  padding: 22px;
  border: 1px solid rgba(203, 213, 223, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 48px rgba(5, 13, 22, 0.22);
  animation: launch-panel-in 0.44s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.launch-panel > strong {
  color: var(--navy);
  font-size: 22px;
  line-height: 1.2;
}

.launch-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  word-break: keep-all;
}

.launch-progress {
  display: block;
  height: 4px;
  margin-top: 4px;
  border-radius: 999px;
  background: #e2e8ef;
  overflow: hidden;
}

.launch-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #174ea6;
  transition: width 0.46s ease;
}

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

.launch-steps li {
  position: relative;
  min-width: 0;
  padding: 8px 8px 8px 24px;
  border: 1px solid #e1e6eb;
  border-radius: 5px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.launch-steps li::before {
  position: absolute;
  top: 50%;
  left: 8px;
  width: 8px;
  height: 8px;
  border: 2px solid #cbd5df;
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
}

.launch-steps li.is-active {
  border-color: rgba(23, 78, 166, 0.28);
  background: #eef5ff;
  color: #174ea6;
}

.launch-steps li.is-active::before {
  border-color: #174ea6;
  background: #174ea6;
  box-shadow: 0 0 0 4px rgba(23, 78, 166, 0.12);
}

.launch-steps li.is-complete {
  color: var(--green);
}

.launch-steps li.is-complete::before {
  border-color: var(--green);
  background: var(--green);
}

.login-visual,
.login-shade {
  position: absolute;
  inset: 0;
}

.login-visual {
  background:
    url("/assets/login-logistics-yard.png") center / cover no-repeat;
  transform: scale(1.035);
  animation: login-photo-settle 8s ease-out forwards;
}

.login-shade {
  background:
    linear-gradient(90deg, rgba(10, 18, 28, 0.78) 0%, rgba(10, 18, 28, 0.5) 46%, rgba(10, 18, 28, 0.42) 100%),
    linear-gradient(0deg, rgba(9, 16, 24, 0.42), rgba(9, 16, 24, 0.08));
}

.login-route-line {
  position: absolute;
  width: 36vw;
  height: 1px;
  background: rgba(255, 255, 255, 0.38);
  opacity: 0;
  transform-origin: left center;
  animation: login-line-pass 3.8s ease-in-out infinite;
}

.login-route-line::after {
  position: absolute;
  top: -3px;
  right: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  content: "";
}

.login-route-line-a {
  --line-angle: -11deg;
  top: 28%;
  left: 8%;
  transform: rotate(-11deg);
}

.login-route-line-b {
  --line-angle: 16deg;
  right: 9%;
  bottom: 22%;
  animation-delay: 1.4s;
  transform: rotate(16deg);
}

.login-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  align-items: end;
  gap: clamp(28px, 5vw, 72px);
  width: min(1120px, calc(100% - 56px));
}

.login-copy {
  display: grid;
  gap: 14px;
  max-width: 610px;
  padding-bottom: 8px;
  animation: login-copy-in 0.82s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.login-brand-mark {
  width: 46px;
  height: 46px;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(12, 23, 35, 0.78);
}

.login-eyebrow {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 600;
}

.login-copy h1 {
  max-width: 640px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 700;
  line-height: 1.12;
  word-break: keep-all;
}

.login-copy p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.65;
  word-break: keep-all;
}

.login-signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.login-signal-list span {
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  background: rgba(12, 23, 35, 0.42);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 500;
}

.login-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 54px rgba(5, 13, 22, 0.26);
  color: var(--text);
  animation: login-card-in 0.76s 0.14s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.login-card > strong {
  color: var(--navy);
  font-size: 22px;
  line-height: 1.2;
}

.login-card label {
  display: grid;
  gap: 6px;
}

.login-card label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.login-card input {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid #cbd5df;
  border-radius: 5px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.login-card input:focus {
  border-color: #174ea6;
  outline: 3px solid rgba(23, 78, 166, 0.16);
}

.login-card button {
  min-height: 44px;
  margin-top: 2px;
  border-color: #174ea6;
  border-radius: 5px;
  background: #174ea6;
  color: #ffffff;
  font-weight: 600;
}

.login-card button:hover {
  border-color: #123f86;
  background: #123f86;
}

.login-card small {
  color: var(--muted);
  font-size: 12px;
}

@keyframes login-photo-settle {
  from {
    transform: scale(1.07) translateX(-1.4%);
  }

  to {
    transform: scale(1.015) translateX(0);
  }
}

@keyframes login-copy-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes login-card-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes login-line-pass {
  0% {
    opacity: 0;
    transform: translateX(-28px) rotate(var(--line-angle, 0deg));
  }

  28%,
  68% {
    opacity: 0.7;
  }

  100% {
    opacity: 0;
    transform: translateX(44px) rotate(var(--line-angle, 0deg));
  }
}

@keyframes login-screen-out {
  to {
    opacity: 0;
    transform: scale(1.02);
  }
}

@keyframes launch-screen-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes launch-panel-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes launch-screen-out {
  to {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-visual,
  .login-route-line,
  .login-copy,
  .login-card,
  body.is-login-closing .login-screen,
  body.is-launch-active .launch-screen,
  body.is-launch-closing .launch-screen,
  .launch-panel {
    animation: none;
  }

  .launch-progress span,
  .app-shell {
    transition: none;
  }
}

.app-shell {
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  width: 100%;
  height: 100%;
  transition: filter 0.42s ease, transform 0.42s ease;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 0 rgba(23, 33, 43, 0.04);
  color: var(--text);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 232px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(11, 143, 156, 0.22);
  border-radius: 7px;
  background: #142033;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.brand {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.subtitle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.topbar-context {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.topbar-chip {
  padding: 5px 9px;
  border: 1px solid #cbd6db;
  border-radius: 4px;
  background: #f4f7f7;
  color: #33444c;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-color: #cbd6db;
  background: #ffffff;
  color: var(--text);
}

.toolbar-button:hover {
  border-color: rgba(11, 143, 156, 0.32);
  background: #f4fbfb;
}

.toolbar-button.secondary {
  color: var(--muted);
}

.button-icon,
.button-icon svg {
  display: block;
  width: 15px;
  height: 15px;
}

.button-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.status-pill.is-online {
  border-color: rgba(15, 138, 95, 0.24);
  background: rgba(15, 138, 95, 0.09);
  color: var(--green);
}

.status-pill.is-error {
  border-color: rgba(194, 65, 50, 0.24);
  background: rgba(194, 65, 50, 0.08);
  color: var(--red);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(372px, 436px) minmax(0, 1fr);
  min-height: 0;
}

.sidebar {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  padding: 12px;
  border-right: 1px solid var(--border);
  background: #eef3f2;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  color: #536476;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.ops-brief .section-eyebrow {
  color: #08717b;
}

.ops-brief {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(21, 32, 39, 0.1);
  border-left: 4px solid var(--cyan);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbfb);
  box-shadow: 0 8px 20px rgba(23, 34, 40, 0.08);
  color: var(--text);
}

.ops-brief > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 21px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-brief p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  word-break: keep-all;
}

.ops-brief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ops-brief-grid span {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dce6e8;
  border-radius: 6px;
  background: #f4f8f8;
}

.ops-brief-grid small,
.ops-brief-grid strong {
  display: block;
}

.ops-brief-grid small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-brief-grid strong {
  margin-top: 3px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.1;
}

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

.metric {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(21, 32, 39, 0.1);
  border-top: 3px solid #96a5ad;
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(23, 33, 43, 0.04);
}

.metric:nth-child(2) {
  border-top-color: var(--green);
}

.metric:nth-child(3) {
  border-top-color: var(--amber);
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.1;
}

.view-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(21, 32, 39, 0.1);
  border-radius: 7px;
  background: #dde6e6;
}

.tab-button {
  min-width: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.tab-button.is-active {
  border-color: rgba(15, 138, 95, 0.22);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(25, 37, 52, 0.1);
}

.vehicle-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  border: 1px solid rgba(21, 32, 39, 0.1);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(23, 34, 40, 0.08);
  overflow: hidden;
}

.vehicle-panel.is-hidden {
  display: none;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfc;
}

.panel-heading h1 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.panel-heading span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-controls {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #f5f8f8;
}

.search-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.search-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.search-field input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd6db;
  border-radius: 5px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.search-field input:focus {
  border-color: var(--cyan);
  outline: 2px solid rgba(11, 143, 156, 0.16);
}

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

.filter-button {
  min-width: 0;
  min-height: 32px;
  border-color: transparent;
  background: #e7eeee;
  color: var(--muted);
  font-size: 12px;
}

.filter-button.is-active {
  border-color: rgba(15, 138, 95, 0.24);
  background: rgba(15, 138, 95, 0.11);
  color: #09664a;
}

.vehicle-list {
  min-height: 0;
  overflow: auto;
  scrollbar-color: #b7c4c8 transparent;
  scrollbar-width: thin;
}

.driver-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: #f7fafa;
}

.driver-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.driver-form label:nth-child(n + 3),
.driver-form button {
  grid-column: 1 / -1;
}

.driver-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.driver-form input,
.driver-form select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd6db;
  border-radius: 5px;
  padding: 0 9px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.driver-form input:focus,
.driver-form select:focus {
  border-color: var(--cyan);
  outline: 2px solid rgba(11, 143, 156, 0.16);
}

.driver-list {
  min-height: 160px;
  overflow: auto;
}

.driver-item {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.driver-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.driver-title {
  min-width: 0;
}

.driver-title strong,
.driver-token code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-token {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #f4f7f7;
}

.driver-token code {
  color: #25313d;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
}

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

.empty-state {
  padding: 20px 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.vehicle-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(74px, auto);
  gap: 10px;
  padding: 13px 14px 12px 12px;
  border-bottom: 1px solid #e2e8eb;
  border-left: 4px solid transparent;
  background: #ffffff;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.vehicle-item:hover {
  background: #f6fafa;
}

.vehicle-item.is-selected {
  border-left-color: var(--cyan);
  background: #eef9f8;
  box-shadow: inset 0 0 0 1px rgba(11, 143, 156, 0.12);
}

.vehicle-main {
  min-width: 0;
}

.vehicle-title {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.vehicle-title strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #10191e;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.vehicle-route-line,
.vehicle-cargo-line {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-route-line {
  margin-top: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.vehicle-cargo-line {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.vehicle-progress {
  height: 5px;
  margin-top: 9px;
  border-radius: 999px;
  background: #dde7e7;
  overflow: hidden;
}

.vehicle-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f8a5f, #0b8f9c);
}

.badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  justify-content: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
}

.badge.active {
  background: rgba(15, 138, 95, 0.12);
  color: var(--green);
}

.badge.stale {
  background: rgba(194, 106, 22, 0.13);
  color: var(--amber);
}

.badge.offline {
  background: rgba(180, 35, 24, 0.1);
  color: var(--red);
}

.vehicle-type-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  justify-content: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 4px;
  background: #e8eeee;
  color: #30424a;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
}

.vehicle-type-chip.type-trailer,
.vehicle-type-chip.type-container {
  background: rgba(44, 62, 80, 0.1);
  color: #2c3e50;
}

.vehicle-type-chip.type-van {
  background: rgba(2, 132, 199, 0.12);
  color: #0369a1;
}

.vehicle-type-chip.type-cold {
  background: rgba(14, 116, 144, 0.12);
  color: #0e7490;
}

.speed {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 3px;
  color: var(--text);
  white-space: nowrap;
}

.speed strong {
  color: #11191f;
  font-size: 22px;
  line-height: 1;
}

.speed span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.speed small {
  max-width: 112px;
  overflow: hidden;
  color: #08717b;
  font-size: 11px;
  font-weight: 500;
  text-align: right;
  text-overflow: ellipsis;
}

.map-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  background: #cfdadd;
}

.map-panel::after {
  position: absolute;
  inset: 0;
  z-index: 650;
  background:
    linear-gradient(90deg, rgba(248, 252, 252, 0.6), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 28%, rgba(232, 241, 242, 0.2));
  content: "";
  pointer-events: none;
}

#map {
  width: 100%;
  height: 100%;
  background: #d4dee0;
  filter: saturate(0.92) contrast(1.02);
  overscroll-behavior: contain;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#map svg {
  pointer-events: none;
}

#map img[src*="mts.daumcdn.net/api/v1/tile"] {
  filter: invert(0.92) hue-rotate(178deg) saturate(0.62) brightness(0.72) contrast(0.96);
}

.leaflet-control-zoom a,
.leaflet-control-layers,
.leaflet-bar {
  border-color: rgba(17, 24, 27, 0.16) !important;
  border-radius: 6px !important;
  box-shadow: 0 10px 26px rgba(17, 24, 27, 0.16) !important;
}

.leaflet-control-zoom a {
  background: rgba(255, 255, 255, 0.94) !important;
  color: #172026 !important;
}

.leaflet-control-attribution {
  border-radius: 4px 0 0;
  background: rgba(255, 255, 255, 0.78) !important;
  color: #50616a;
  font-size: 10px;
}

.map-message {
  position: absolute;
  z-index: 760;
  top: 14px;
  left: 50%;
  max-width: min(420px, calc(100% - 28px));
  padding: 10px 12px;
  border: 1px solid var(--hud-border);
  border-radius: 7px;
  background: var(--hud);
  color: var(--muted);
  box-shadow: var(--shadow-strong);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
}

.map-message.is-hidden {
  display: none;
}

.map-control-deck {
  position: absolute;
  z-index: 755;
  top: 78px;
  right: 16px;
  display: grid;
  justify-items: end;
  gap: 8px;
  color: var(--text);
  pointer-events: auto;
}

.map-layer-toggle,
.map-zoom-stack {
  border: 1px solid var(--hud-border);
  border-radius: 7px;
  background: var(--hud);
  box-shadow: 0 14px 34px rgba(5, 10, 12, 0.24);
  backdrop-filter: blur(14px) saturate(1.18);
}

.map-layer-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  width: 132px;
  padding: 3px;
}

.map-layer-toggle button,
.map-zoom-stack button {
  border: 0;
  color: #c5d5d6;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
}

.map-layer-toggle button {
  min-height: 30px;
  border-radius: 5px;
  background: transparent;
}

.map-layer-toggle button:hover,
.map-zoom-stack button:hover {
  background: var(--control-hover);
  color: #f2fbfa;
}

.map-layer-toggle button.is-active {
  background: #35d3b0;
  color: #071316;
}

.map-zoom-stack {
  display: grid;
  width: 40px;
  overflow: hidden;
}

.map-zoom-stack button {
  min-width: 40px;
  min-height: 36px;
  background: transparent;
  color: #e3eeee;
  font-size: 19px;
  line-height: 1;
}

.map-zoom-stack button + button {
  border-top: 1px solid var(--hud-border);
}

.map-expand-button {
  display: none;
  width: 132px;
  min-height: 34px;
  border: 1px solid var(--hud-border);
  border-radius: 7px;
  background: var(--hud);
  box-shadow: 0 14px 34px rgba(5, 10, 12, 0.24);
  color: #dce9e9;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(1.18);
}

.map-expand-button:hover {
  background: var(--control-hover);
  color: #ffffff;
}

.map-status-panel,
.route-focus-panel,
.map-legend {
  position: absolute;
  z-index: 720;
  border: 1px solid var(--hud-border);
  border-radius: 7px;
  background: var(--hud);
  box-shadow: var(--shadow-strong);
  color: var(--text);
  pointer-events: none;
  backdrop-filter: blur(14px) saturate(1.2);
}

.map-status-panel {
  top: 16px;
  left: 72px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100% - 36px));
  padding: 12px 13px;
}

.map-status-panel .section-eyebrow,
.route-focus-panel .section-eyebrow,
.marker-action-panel .section-eyebrow {
  color: #08717b;
}

.map-status-panel > strong {
  color: var(--navy);
  font-size: 17px;
  line-height: 1.2;
}

.map-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid #dde7ea;
  border-radius: 4px;
  overflow: hidden;
}

.map-status-grid span {
  min-width: 0;
  padding: 7px 8px;
  border-right: 0;
  background: #f6f9f9;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
}

.map-status-grid span:last-child {
  border-right: 0;
}

.map-status-grid b {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-focus-panel {
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 7px;
  width: min(410px, calc(100% - 32px));
  padding: 12px 13px 13px;
  border-left: 3px solid rgba(11, 143, 156, 0.38);
}

.route-focus-panel:not(.is-active) {
  display: none;
}

.route-focus-panel.is-active {
  border-left-color: var(--cyan);
}

.route-focus-panel strong {
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-focus-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  word-break: keep-all;
}

.marker-action-panel {
  position: absolute;
  right: 16px;
  bottom: 102px;
  z-index: 750;
  display: grid;
  gap: 12px;
  width: min(390px, calc(100% - 32px));
  padding: 14px;
  border: 1px solid var(--hud-border);
  border-radius: 7px;
  background: var(--hud);
  box-shadow: var(--shadow-strong);
  color: var(--text);
  backdrop-filter: blur(14px) saturate(1.2);
}

.marker-action-panel.is-hidden {
  display: none;
}

.marker-action-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.marker-action-head strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 17px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marker-action-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  word-break: keep-all;
}

.marker-action-head button {
  min-width: 52px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #cbd6db;
  border-radius: 5px;
  background: #f5f8f8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.marker-action-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid #dde7ea;
  border-radius: 4px;
  overflow: hidden;
}

.marker-action-summary span {
  min-width: 0;
  padding: 8px;
  border: 0;
  background: #f6f9f9;
}

.marker-action-summary b,
.marker-action-summary em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marker-action-summary b {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}

.marker-action-summary em {
  margin-top: 3px;
  color: var(--text);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.marker-action-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.marker-action-buttons button {
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #cbd6db;
  border-radius: 5px;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.marker-action-buttons button:first-child {
  border-color: #0b8f9c;
  background: #0b8f9c;
  color: #ffffff;
}

.marker-action-buttons button:hover,
.marker-action-head button:hover {
  background: #f4fbfb;
}

.marker-action-buttons button:first-child:hover {
  background: #08717b;
}

.map-legend {
  top: 16px;
  right: 84px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 8px 10px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-dot.active {
  background: var(--green);
}

.legend-dot.stale {
  background: var(--amber);
}

.legend-line {
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: #0b8f9c;
}

.history-drawer {
  position: absolute;
  z-index: 740;
  right: min(424px, 48%);
  bottom: 14px;
  left: 14px;
  max-height: min(310px, calc(100% - 28px));
  border: 1px solid var(--hud-border);
  border-radius: 7px;
  background: var(--hud);
  box-shadow: var(--shadow-strong);
  color: var(--text);
  backdrop-filter: blur(14px) saturate(1.2);
  overflow: hidden;
}

.history-drawer.is-hidden {
  display: none;
}

.history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #dde7ea;
}

.history-heading strong,
.history-heading span {
  display: block;
}

.history-heading span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.history-heading button {
  border-color: #cbd6db;
  background: #f5f8f8;
  color: var(--muted);
}

.history-heading button:hover {
  background: #f4fbfb;
}

.history-list {
  display: grid;
  max-height: 248px;
  overflow: auto;
}

.history-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid #e2e8eb;
  font-size: 13px;
}

.history-row time,
.history-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-row time {
  color: var(--muted);
  font-weight: 500;
}

.truck-marker {
  --marker-fill: #0b8f9c;
  --marker-dark: #064f58;
  --marker-accent: #35d3b0;
  --marker-cabin: rgba(223, 251, 244, 0.86);
  --marker-panel: rgba(6, 79, 88, 0.36);
  --marker-window: rgba(6, 79, 88, 0.45);
  --marker-plate-bg: rgba(6, 79, 88, 0.78);
  --marker-status: var(--green);
  --truck-heading: 0deg;
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  min-width: 72px;
  height: 72px;
  min-height: 72px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  filter: drop-shadow(0 7px 10px rgba(5, 10, 12, 0.28));
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.truck-marker:hover,
.truck-marker.is-selected {
  z-index: 8;
  filter:
    drop-shadow(0 0 0 rgba(255, 255, 255, 1))
    drop-shadow(0 10px 15px rgba(5, 10, 12, 0.38));
  transform: translateY(-1px);
}

.truck-marker.stale {
  --marker-status: var(--amber);
}

.truck-marker.offline {
  --marker-status: var(--red);
  opacity: 0.9;
}

.truck-marker.type-cargo {
  --marker-fill: #0b8f9c;
  --marker-dark: #064f58;
  --marker-accent: #35d3b0;
  --marker-panel: rgba(6, 79, 88, 0.34);
  --marker-window: rgba(6, 79, 88, 0.46);
  --marker-plate-bg: rgba(6, 79, 88, 0.78);
}

.truck-marker.type-trailer {
  --marker-fill: #66727b;
  --marker-dark: #2f383e;
  --marker-accent: #b9c4ca;
  --marker-panel: rgba(47, 56, 62, 0.5);
  --marker-window: rgba(33, 40, 45, 0.56);
  --marker-plate-bg: rgba(47, 56, 62, 0.8);
}

.truck-marker.type-container {
  --marker-fill: #b7791f;
  --marker-dark: #70470d;
  --marker-accent: #ffd27a;
  --marker-panel: rgba(112, 71, 13, 0.42);
  --marker-window: rgba(75, 48, 12, 0.5);
  --marker-plate-bg: rgba(112, 71, 13, 0.8);
}

.truck-marker.type-box {
  --marker-fill: #0f8a5f;
  --marker-dark: #065f46;
  --marker-accent: #8cf0ca;
  --marker-panel: rgba(6, 95, 70, 0.38);
  --marker-window: rgba(5, 64, 52, 0.48);
  --marker-plate-bg: rgba(6, 95, 70, 0.8);
}

.truck-marker.type-van {
  --marker-fill: #2473bd;
  --marker-dark: #174a78;
  --marker-accent: #9fd1ff;
  --marker-panel: rgba(23, 74, 120, 0.34);
  --marker-window: rgba(16, 48, 78, 0.5);
  --marker-plate-bg: rgba(23, 74, 120, 0.8);
}

.truck-marker.type-cold {
  --marker-fill: #10a8c5;
  --marker-dark: #0b6f83;
  --marker-accent: #c8f7ff;
  --marker-cabin: rgba(232, 252, 255, 0.92);
  --marker-panel: rgba(232, 252, 255, 0.38);
  --marker-window: rgba(7, 81, 96, 0.5);
  --marker-plate-bg: rgba(11, 111, 131, 0.82);
}

.truck-marker.type-wing {
  --marker-fill: #119a6c;
  --marker-dark: #075f46;
  --marker-accent: #6ce2b9;
  --marker-panel: rgba(7, 95, 70, 0.34);
  --marker-window: rgba(5, 64, 52, 0.48);
  --marker-plate-bg: rgba(7, 95, 70, 0.8);
}

.truck-marker::after {
  display: none;
}

.truck-marker__vehicle {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 44px;
  height: 66px;
  transform: translate(-50%, -50%) rotate(var(--truck-heading));
  transform-origin: 50% 50%;
  transition: transform 0.35s ease;
  pointer-events: none;
}

.truck-marker__vehicle-top {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.truck-marker__vehicle-top .vehicle-shadow {
  fill: rgba(5, 10, 12, 0.26);
  stroke: none;
  transform: translate(2px, 2px);
}

.truck-marker__vehicle-top .vehicle-body {
  fill: var(--marker-fill);
  stroke: rgba(255, 255, 255, 0.88);
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.truck-marker__vehicle-top .vehicle-cabin {
  fill: var(--marker-cabin);
  stroke: rgba(255, 255, 255, 0.76);
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.truck-marker__vehicle-top .vehicle-window {
  fill: var(--marker-window);
}

.truck-marker__vehicle-top .vehicle-load {
  fill: var(--marker-panel);
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
}

.truck-marker__vehicle-top .vehicle-detail,
.truck-marker__vehicle-top .vehicle-rail,
.truck-marker__vehicle-top .vehicle-ribs {
  fill: none;
  stroke: rgba(255, 255, 255, 0.24);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
}

.truck-marker__vehicle-top .vehicle-ribs {
  stroke: rgba(255, 255, 255, 0.34);
}

.truck-marker__vehicle-top .vehicle-wing-panel {
  fill: var(--marker-accent);
  fill-opacity: 0.35;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-linejoin: round;
  stroke-width: 1;
}

.truck-marker__vehicle-top .vehicle-coupler {
  fill: var(--marker-dark);
  fill-opacity: 0.72;
}

.truck-marker__vehicle-top .vehicle-axle {
  fill: var(--marker-dark);
  stroke: rgba(255, 255, 255, 0.26);
  stroke-width: 0.8;
}

.truck-marker__vehicle-top .vehicle-snow {
  fill: none;
  stroke: var(--marker-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.truck-marker__vehicle-top .vehicle-headlight {
  fill: #eaffb9;
}

.truck-marker__vehicle-top .vehicle-taillight {
  fill: #ff9d92;
}

.truck-marker.is-selected .truck-marker__vehicle-top .vehicle-body {
  stroke: rgba(255, 255, 255, 0.98);
  stroke-width: 3.2;
  filter: drop-shadow(0 0 5px rgba(53, 211, 176, 0.4));
}

.truck-marker__status {
  position: absolute;
  right: 15px;
  bottom: 14px;
  z-index: 5;
  width: 7px;
  height: 7px;
  border: 1.5px solid rgba(18, 25, 28, 0.95);
  border-radius: 50%;
  background: var(--marker-status);
  box-shadow: 0 1px 4px rgba(5, 10, 12, 0.28);
  pointer-events: none;
}

.truck-marker__body-icon {
  display: none;
}

.truck-marker__identity {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 34px;
  min-height: 16px;
  padding: 0 4px 1px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  background: var(--marker-plate-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-shadow: 0 1px 2px rgba(5, 10, 12, 0.48);
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
}

.truck-marker__label-icon,
.truck-marker__body-icon,
.truck-marker__vehicle-icon,
.truck-marker__type {
  display: none;
}

.truck-marker__plate {
  display: inline-block;
  min-width: 0;
  max-width: 28px;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
}

.truck-marker {
  width: 78px;
  min-width: 78px;
  height: 52px;
  min-height: 52px;
  filter: drop-shadow(0 10px 18px rgba(5, 10, 12, 0.34));
}

.truck-marker:hover,
.truck-marker.is-selected {
  filter:
    drop-shadow(0 0 7px rgba(255, 255, 255, 0.16))
    drop-shadow(0 14px 20px rgba(5, 10, 12, 0.42));
}

.truck-marker__heading {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) rotate(var(--truck-heading));
  transform-origin: 50% 50%;
  transition: transform 0.35s ease;
  pointer-events: none;
}

.truck-marker__heading-icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.truck-marker__heading-icon .heading-glow {
  fill: var(--marker-fill);
  opacity: 0.24;
  filter: blur(1px);
}

.truck-marker__heading-icon .heading-tip {
  fill: var(--marker-fill);
  stroke: rgba(255, 255, 255, 0.66);
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.truck-marker__badge {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  grid-template-columns: 25px 34px;
  align-items: center;
  justify-content: center;
  column-gap: 4px;
  width: 70px;
  min-height: 30px;
  padding: 4px 7px 4px 5px;
  border: 1px solid rgba(224, 236, 238, 0.18);
  border-left: 3px solid var(--marker-fill);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
    rgba(16, 23, 26, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 9px 18px rgba(5, 10, 12, 0.34);
  color: #ffffff;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.truck-marker.is-selected .truck-marker__badge {
  border-color: rgba(224, 236, 238, 0.34);
  border-left-color: var(--marker-accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 2px rgba(53, 211, 176, 0.16),
    0 12px 22px rgba(5, 10, 12, 0.42);
}

.truck-marker__glyph {
  display: block;
  width: 25px;
  height: 16px;
  overflow: visible;
}

.truck-marker__glyph .glyph-load,
.truck-marker__glyph .glyph-cab,
.truck-marker__glyph .glyph-wing {
  fill: color-mix(in srgb, var(--marker-fill) 76%, #ffffff 24%);
  stroke: rgba(255, 255, 255, 0.72);
  stroke-linejoin: round;
  stroke-width: 1.15;
}

.truck-marker__glyph .glyph-cab {
  fill: color-mix(in srgb, var(--marker-dark) 70%, #ffffff 30%);
}

.truck-marker__glyph .glyph-window {
  fill: rgba(255, 255, 255, 0.72);
}

.truck-marker__glyph .glyph-detail,
.truck-marker__glyph .glyph-ribs,
.truck-marker__glyph .glyph-rail,
.truck-marker__glyph .glyph-link {
  fill: none;
  stroke: rgba(255, 255, 255, 0.78);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1;
}

.truck-marker__glyph .glyph-snow {
  fill: none;
  stroke: #e8fcff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.25;
}

.truck-marker__glyph .glyph-wheel {
  fill: rgba(5, 10, 12, 0.86);
  stroke: rgba(255, 255, 255, 0.68);
  stroke-width: 0.9;
}

.truck-marker__plate {
  display: inline-block;
  min-width: 31px;
  max-width: 34px;
  overflow: hidden;
  color: #ffffff;
  font-size: 10px;
  font-weight: 750;
  line-height: 14px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(5, 10, 12, 0.66);
}

.truck-marker__status {
  top: 9px;
  right: 7px;
  bottom: auto;
  left: auto;
  z-index: 5;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(16, 23, 26, 0.96);
}

.truck-marker {
  width: 98px;
  min-width: 98px;
  height: 58px;
  min-height: 58px;
}

.truck-marker__heading {
  width: 62px;
  height: 62px;
}

.truck-marker__badge {
  display: block;
  width: 90px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-left-width: 2px;
  border-radius: 8px;
  overflow: hidden;
}

.truck-marker__badge::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.16), transparent 31%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  content: "";
  pointer-events: none;
}

.truck-marker__photo {
  position: absolute;
  left: 5px;
  top: 5px;
  z-index: 1;
  display: block;
  width: 78px;
  height: 31px;
  overflow: visible;
}

.truck-marker__photo .photo-shadow {
  fill: rgba(5, 10, 12, 0.42);
}

.truck-marker__photo .photo-bed,
.truck-marker__photo .photo-box,
.truck-marker__photo .photo-trailer,
.truck-marker__photo .photo-container,
.truck-marker__photo .photo-wing {
  fill: color-mix(in srgb, var(--marker-fill) 70%, #ffffff 30%);
  stroke: rgba(255, 255, 255, 0.66);
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.truck-marker__photo .photo-cab {
  fill: color-mix(in srgb, var(--marker-dark) 72%, #ffffff 28%);
  stroke: rgba(255, 255, 255, 0.72);
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.truck-marker__photo .photo-window {
  fill: rgba(235, 250, 252, 0.82);
  stroke: rgba(255, 255, 255, 0.42);
  stroke-linejoin: round;
  stroke-width: 0.6;
}

.truck-marker__photo .photo-wheel {
  fill: #101417;
  stroke: rgba(255, 255, 255, 0.74);
  stroke-width: 1.1;
}

.truck-marker__photo .photo-light {
  fill: #fff2a3;
}

.truck-marker__photo .photo-bedline,
.truck-marker__photo .photo-rail,
.truck-marker__photo .photo-ribs,
.truck-marker__photo .photo-door,
.truck-marker__photo .photo-box-roof,
.truck-marker__photo .photo-wing-line,
.truck-marker__photo .photo-coupler {
  fill: none;
  stroke: rgba(255, 255, 255, 0.64);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.1;
}

.truck-marker__photo .photo-ribs {
  stroke: rgba(255, 255, 255, 0.78);
}

.truck-marker__photo .photo-reefer {
  fill: rgba(232, 252, 255, 0.86);
  stroke: rgba(255, 255, 255, 0.64);
  stroke-width: 0.8;
}

.truck-marker__photo .photo-snow {
  fill: none;
  stroke: #e8fcff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.truck-marker__photo--van {
  left: 7px;
  width: 72px;
}

.truck-marker__photo--trailer,
.truck-marker__photo--container {
  left: 3px;
  width: 84px;
}

.truck-marker__plate {
  position: absolute;
  right: 5px;
  bottom: 4px;
  z-index: 3;
  min-width: 35px;
  max-width: 38px;
  min-height: 15px;
  padding: 1px 4px 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  background: rgba(6, 10, 12, 0.62);
  font-size: 10px;
  line-height: 13px;
}

.truck-marker__status {
  top: 6px;
  right: 6px;
}

.map-panel.is-zoom-near .truck-marker {
  width: 98px;
  min-width: 98px;
  height: 58px;
  min-height: 58px;
}

.map-panel.is-zoom-mid .truck-marker {
  width: 76px;
  min-width: 76px;
  height: 46px;
  min-height: 46px;
  filter: drop-shadow(0 8px 14px rgba(5, 10, 12, 0.32));
}

.map-panel.is-zoom-mid .truck-marker__heading {
  width: 50px;
  height: 50px;
}

.map-panel.is-zoom-mid .truck-marker__badge {
  width: 70px;
  height: 34px;
  min-height: 34px;
  border-radius: 7px;
}

.map-panel.is-zoom-mid .truck-marker__badge::before {
  opacity: 0.78;
}

.map-panel.is-zoom-mid .truck-marker__photo {
  left: 4px;
  top: 5px;
  width: 58px;
  height: 23px;
}

.map-panel.is-zoom-mid .truck-marker__photo--trailer,
.map-panel.is-zoom-mid .truck-marker__photo--container {
  left: 3px;
  width: 64px;
}

.map-panel.is-zoom-mid .truck-marker__photo--van {
  left: 5px;
  width: 55px;
}

.map-panel.is-zoom-mid .truck-marker__photo .photo-bedline,
.map-panel.is-zoom-mid .truck-marker__photo .photo-rail,
.map-panel.is-zoom-mid .truck-marker__photo .photo-ribs,
.map-panel.is-zoom-mid .truck-marker__photo .photo-door,
.map-panel.is-zoom-mid .truck-marker__photo .photo-box-roof,
.map-panel.is-zoom-mid .truck-marker__photo .photo-wing-line {
  opacity: 0.56;
}

.map-panel.is-zoom-mid .truck-marker__plate {
  right: 4px;
  bottom: 4px;
  min-width: 31px;
  max-width: 34px;
  min-height: 14px;
  font-size: 9px;
  line-height: 12px;
}

.map-panel.is-zoom-mid .truck-marker__status {
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
}

.map-panel.is-zoom-far .truck-marker {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  filter: drop-shadow(0 4px 9px rgba(5, 10, 12, 0.34));
}

.map-panel.is-zoom-far .truck-marker:hover,
.map-panel.is-zoom-far .truck-marker.is-selected {
  filter:
    drop-shadow(0 0 5px rgba(255, 255, 255, 0.12))
    drop-shadow(0 8px 13px rgba(5, 10, 12, 0.4));
  transform: translateY(-1px);
}

.map-panel.is-zoom-far .truck-marker__heading {
  width: 30px;
  height: 30px;
}

.map-panel.is-zoom-far .truck-marker__heading-icon .heading-glow {
  opacity: 0;
}

.map-panel.is-zoom-far .truck-marker__heading-icon .heading-tip {
  fill: color-mix(in srgb, var(--marker-fill) 76%, #ffffff 24%);
  stroke: rgba(8, 14, 16, 0.88);
  stroke-width: 1.35;
  transform: translateY(5px) scale(0.82);
  transform-origin: 27px 27px;
}

.map-panel.is-zoom-far .truck-marker__badge {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border-left-width: 0;
  border-radius: 50%;
  overflow: visible;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.78) 0 1.6px, transparent 2px),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--marker-fill) 82%, #ffffff 18%),
      color-mix(in srgb, var(--marker-dark) 88%, #071012 12%)
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 0 2px rgba(7, 13, 15, 0.58),
    0 0 0 4px color-mix(in srgb, var(--marker-fill) 18%, transparent 82%),
    0 5px 10px rgba(5, 10, 12, 0.36);
}

.map-panel.is-zoom-far .truck-marker__badge::before {
  display: block;
  inset: -7px;
  border: 1px solid color-mix(in srgb, var(--marker-fill) 34%, transparent 66%);
  border-radius: 50%;
  background: transparent;
  opacity: 0.42;
}

.map-panel.is-zoom-far .truck-marker__photo {
  display: none;
}

.map-panel.is-zoom-far .truck-marker__plate {
  position: absolute;
  left: 21px;
  top: 50%;
  display: block;
  min-width: 0;
  max-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  opacity: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.map-panel.is-zoom-far .truck-marker:hover .truck-marker__plate,
.map-panel.is-zoom-far .truck-marker.is-selected .truck-marker__plate {
  min-width: 32px;
  max-width: 38px;
  min-height: 15px;
  padding: 1px 4px 0;
  border: 1px solid rgba(224, 236, 238, 0.2);
  border-radius: 4px;
  background: rgba(11, 16, 18, 0.9);
  box-shadow: 0 7px 13px rgba(5, 10, 12, 0.28);
  color: #ffffff;
  font-size: 9px;
  line-height: 13px;
  opacity: 1;
}

.map-panel.is-zoom-far .truck-marker__status {
  display: none;
}

.map-panel.is-zoom-far .truck-marker.stale .truck-marker__status,
.map-panel.is-zoom-far .truck-marker.offline .truck-marker__status {
  top: 5px;
  right: 5px;
  display: block;
  width: 5px;
  height: 5px;
  border-width: 1px;
  border-color: rgba(8, 14, 16, 0.9);
}

.map-panel.is-zoom-far .truck-marker.is-selected .truck-marker__badge {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 0 0 2px rgba(7, 13, 15, 0.58),
    0 0 0 5px rgba(53, 211, 176, 0.2),
    0 7px 13px rgba(5, 10, 12, 0.38);
}

.leaflet-truck-marker {
  border: 0;
  background: transparent;
}

.leaflet-truck-marker.is-selected {
  z-index: 1000 !important;
}

.map-info-panel {
  position: absolute;
  z-index: 730;
  width: min(330px, calc(100% - 36px));
  pointer-events: none;
}

.map-info-panel.is-top-right {
  top: 64px;
  right: 18px;
}

.map-info-panel.is-bottom-left {
  bottom: 18px;
  left: 18px;
}

.map-info-card {
  padding: 12px;
  border: 1px solid var(--hud-border);
  border-radius: 7px;
  background: var(--hud);
  box-shadow: var(--shadow-strong);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  backdrop-filter: blur(14px) saturate(1.2);
}

.popup-title {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
  font-weight: 700;
}

.popup-cargo {
  margin-top: 6px;
  color: var(--text);
  font-weight: 600;
}

.popup-route {
  display: grid;
  gap: 4px;
  margin: 8px 0;
  padding: 8px;
  border: 1px solid #dde7ea;
  border-radius: 4px;
  background: #f6f9f9;
}

.popup-route div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.popup-route span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.popup-route strong {
  color: #08717b;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.route-destination-marker,
.route-destination-leaflet {
  pointer-events: none;
}

.route-destination-marker,
.route-destination-leaflet,
.route-destination-leaflet > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 7px;
  min-width: 112px;
  padding: 7px 9px;
  border: 1px solid rgba(21, 32, 39, 0.14);
  border-radius: 7px;
  background: var(--hud);
  box-shadow: 0 12px 28px rgba(14, 23, 29, 0.16);
  color: var(--text);
  backdrop-filter: blur(12px) saturate(1.2);
}

.route-destination-pin {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 24px;
  border-radius: 999px;
  background: #0f8a5f;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
}

.route-destination-marker strong,
.route-destination-leaflet strong {
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-destination-marker small,
.route-destination-leaflet small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.app-shell {
  --bg: #101619;
  --surface: #171f22;
  --surface-muted: #202a2d;
  --border: rgba(213, 226, 227, 0.14);
  --text: #edf6f4;
  --muted: #9eb0b2;
  --navy: #f8fbfa;
  --hud: rgba(18, 25, 28, 0.9);
  --hud-border: rgba(226, 235, 238, 0.16);
  --shadow: 0 1px 2px rgba(5, 10, 12, 0.24);
  --shadow-strong: 0 16px 40px rgba(5, 10, 12, 0.32);
  background: var(--bg);
  color: var(--text);
}

.topbar {
  border-bottom-color: rgba(213, 226, 227, 0.12);
  background: #111719;
  box-shadow: 0 1px 0 rgba(5, 10, 12, 0.48);
  color: var(--text);
}

.brand-mark {
  border-color: rgba(53, 211, 176, 0.36);
  background: #0d332f;
}

.subtitle,
.topbar-context {
  color: var(--muted);
}

.topbar-chip,
.toolbar-button,
.status-pill {
  border-color: rgba(213, 226, 227, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #d8e6e6;
}

.toolbar-button:hover {
  border-color: rgba(53, 211, 176, 0.34);
  background: rgba(53, 211, 176, 0.12);
}

.toolbar-button.secondary {
  color: var(--muted);
}

.status-pill.is-online {
  border-color: rgba(53, 211, 176, 0.34);
  background: rgba(15, 138, 95, 0.2);
  color: #9cf3d7;
}

.status-pill.is-error {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(194, 65, 50, 0.2);
  color: #ffc6c1;
}

.sidebar {
  border-right-color: rgba(213, 226, 227, 0.12);
  background: #111719;
}

.section-eyebrow,
.ops-brief .section-eyebrow,
.map-status-panel .section-eyebrow,
.route-focus-panel .section-eyebrow,
.marker-action-panel .section-eyebrow {
  color: #8fe6d6;
}

.ops-brief {
  border-color: rgba(213, 226, 227, 0.12);
  border-left-color: #35d3b0;
  background:
    linear-gradient(135deg, rgba(32, 54, 51, 0.96), rgba(17, 24, 27, 0.98)),
    #111719;
  box-shadow: 0 12px 26px rgba(5, 10, 12, 0.22);
  color: var(--text);
}

.ops-brief > strong,
.ops-brief-grid strong,
.panel-heading h1,
.vehicle-title strong,
.marker-action-head strong,
.route-focus-panel strong,
.map-status-panel > strong,
.popup-title,
.route-destination-marker strong,
.route-destination-leaflet strong {
  color: var(--navy);
}

.ops-brief p,
.ops-brief-grid small,
.metric-label,
.panel-heading span,
.vehicle-meta,
.vehicle-cargo-line,
.speed span,
.marker-action-head p,
.route-focus-panel p,
.map-legend span,
.history-heading span,
.history-row time,
.popup-route span,
.route-destination-marker small,
.route-destination-leaflet small {
  color: var(--muted);
}

.ops-brief-grid span,
.metric,
.vehicle-panel,
.driver-item,
.vehicle-item,
.driver-token,
.map-status-panel,
.route-focus-panel,
.marker-action-panel,
.map-legend,
.history-drawer,
.map-info-card,
.route-destination-marker,
.route-destination-leaflet,
.route-destination-leaflet > div {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.ops-brief-grid span,
.marker-action-summary span,
.map-status-grid span,
.popup-route {
  background: rgba(255, 255, 255, 0.055);
}

.metric {
  border-top-color: #65777d;
}

.metric:nth-child(2) {
  border-top-color: #35d3b0;
}

.metric:nth-child(3) {
  border-top-color: var(--amber);
}

.view-tabs,
.vehicle-controls,
.panel-heading,
.driver-form {
  border-color: var(--border);
  background: var(--surface-muted);
}

.tab-button,
.filter-button {
  color: var(--muted);
}

.tab-button.is-active,
.filter-button.is-active {
  border-color: rgba(53, 211, 176, 0.28);
  background: rgba(53, 211, 176, 0.12);
  color: #dffbf4;
}

.search-field input,
.driver-form input,
.driver-form select {
  border-color: rgba(213, 226, 227, 0.16);
  background: #101619;
  color: var(--text);
}

.search-field input::placeholder {
  color: #74878b;
}

.search-field input:focus,
.driver-form input:focus,
.driver-form select:focus {
  border-color: #35d3b0;
  outline-color: rgba(53, 211, 176, 0.18);
}

.vehicle-item {
  border-bottom-color: rgba(213, 226, 227, 0.1);
}

.vehicle-item:hover {
  background: #1c272a;
}

.vehicle-item.is-selected {
  border-left-color: #35d3b0;
  background: rgba(53, 211, 176, 0.1);
  box-shadow: inset 0 0 0 1px rgba(53, 211, 176, 0.16);
}

.vehicle-route-line,
.speed strong,
.marker-action-summary em,
.popup-cargo {
  color: var(--text);
}

.vehicle-progress {
  background: rgba(213, 226, 227, 0.13);
}

.vehicle-type-chip {
  background: rgba(213, 226, 227, 0.11);
  color: #d8e6e6;
}

.driver-token code {
  color: #d8e6e6;
}

.marker-action-head button,
.marker-action-buttons button,
.history-heading button {
  border-color: rgba(213, 226, 227, 0.16);
  background: rgba(255, 255, 255, 0.065);
  color: #d8e6e6;
}

.marker-action-head button:hover,
.marker-action-buttons button:hover,
.history-heading button:hover {
  background: rgba(255, 255, 255, 0.11);
}

.marker-action-buttons button:first-child {
  border-color: #35d3b0;
  background: #0f8a5f;
}

.marker-action-buttons button:first-child:hover {
  background: #0a7550;
}

.map-panel {
  background: #182226;
}

.map-panel::after {
  background:
    linear-gradient(90deg, rgba(16, 23, 26, 0.28), transparent 30%),
    linear-gradient(180deg, rgba(16, 23, 26, 0.18), transparent 28%, rgba(16, 23, 26, 0.14));
}

.map-message {
  color: #d8e6e6;
}

#map button[title],
#map div[style*="background-color: rgb(255, 255, 255)"] {
  border-color: rgba(213, 226, 227, 0.16) !important;
  background-color: rgba(18, 25, 28, 0.92) !important;
  color: #edf6f4 !important;
  box-shadow: 0 10px 26px rgba(5, 10, 12, 0.22) !important;
}

#map button[title] {
  border-color: rgba(213, 226, 227, 0.14) !important;
}

#map button[title] img {
  filter: invert(1) brightness(1.8) grayscale(1);
}

.map-status-grid,
.marker-action-summary,
.popup-route {
  border-color: rgba(213, 226, 227, 0.12);
}

.history-heading,
.history-row {
  border-color: rgba(213, 226, 227, 0.1);
}

.truck-marker__identity {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(6, 79, 88, 0.78);
  color: #ffffff;
}

.truck-marker__plate {
  color: inherit;
}

.route-destination-pin {
  background: #0f8a5f;
}

.app-shell {
  font-family:
    "Pretendard Variable",
    Pretendard,
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    "Malgun Gothic",
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.app-shell button,
.app-shell input,
.app-shell select {
  font-family: inherit;
}

.app-shell button {
  min-height: 34px;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

.brand {
  font-size: 16px;
  font-weight: 700;
}

.subtitle,
.topbar-context,
.topbar-chip,
.status-pill,
.panel-heading span,
.vehicle-meta,
.vehicle-cargo-line,
.route-focus-panel p,
.marker-action-head p,
.map-status-grid span,
.map-legend span {
  font-size: 11px;
  line-height: 18px;
}

.brand-mark {
  font-size: 12px;
  font-weight: 700;
}

.section-eyebrow {
  min-height: 18px;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
}

.ops-brief {
  gap: 8px;
  padding: 13px 14px;
}

.ops-brief > strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}

.ops-brief p {
  font-size: 12px;
  line-height: 20px;
}

.ops-brief-grid {
  gap: 6px;
}

.ops-brief-grid span {
  padding: 8px 9px;
}

.ops-brief-grid small,
.metric-label,
.search-field span,
.driver-form span {
  font-size: 10px;
  font-weight: 500;
  line-height: 16px;
}

.ops-brief-grid strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

.metric {
  padding: 8px 10px;
}

.metric strong {
  margin-top: 2px;
  font-size: 20px;
  font-weight: 700;
  line-height: 24px;
}

.view-tabs {
  gap: 3px;
}

.tab-button,
.filter-button {
  font-size: 12px;
  font-weight: 500;
}

.panel-heading {
  padding: 10px 12px;
}

.panel-heading h1 {
  font-size: 14px;
  font-weight: 700;
  line-height: 22px;
}

.vehicle-controls {
  gap: 7px;
  padding: 9px 11px;
}

.search-field {
  gap: 4px;
}

.search-field input,
.driver-form input,
.driver-form select {
  min-height: 34px;
  font-size: 13px;
  line-height: 20px;
}

.vehicle-item {
  gap: 9px;
  padding: 11px 12px 11px 10px;
}

.vehicle-title {
  gap: 5px;
}

.vehicle-title strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
}

.vehicle-meta {
  margin-top: 4px;
}

.vehicle-route-line {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}

.vehicle-cargo-line {
  margin-top: 1px;
  font-weight: 400;
}

.vehicle-progress {
  height: 4px;
  margin-top: 7px;
}

.badge,
.vehicle-type-chip {
  min-height: 20px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 600;
}

.speed {
  gap: 1px;
}

.speed strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 22px;
}

.speed small {
  font-size: 10px;
  font-weight: 500;
  line-height: 16px;
}

.map-status-panel,
.route-focus-panel,
.marker-action-panel,
.map-info-card {
  padding: 11px 12px;
}

.map-status-panel > strong,
.route-focus-panel strong,
.marker-action-head strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
}

.map-status-grid span {
  padding: 6px 7px;
}

.map-status-grid b {
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.marker-action-summary b {
  font-size: 10px;
  font-weight: 500;
  line-height: 16px;
}

.marker-action-summary em {
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.marker-action-buttons button {
  min-height: 36px;
}

.truck-marker__identity {
  min-height: 16px;
  font-size: 10px;
  font-weight: 700;
}

.truck-marker__type {
  display: none;
  font-size: 9px;
  font-weight: 700;
}

/* Premium polish pass: keep the app calm, dense, and consistent. */
.app-shell {
  --surface: #151d20;
  --surface-muted: #1a2427;
  --surface-raised: #1d282b;
  --surface-soft: rgba(255, 255, 255, 0.045);
  --border: rgba(218, 231, 232, 0.11);
  --border-strong: rgba(218, 231, 232, 0.17);
  --text: #edf6f4;
  --muted: #9aaeb0;
  --muted-soft: #74888b;
  --navy: #f7fbfa;
  --hud: rgba(16, 23, 25, 0.9);
  --hud-border: rgba(225, 236, 238, 0.14);
  --control: rgba(255, 255, 255, 0.055);
  --control-hover: rgba(255, 255, 255, 0.09);
  --control-active: rgba(53, 211, 176, 0.13);
  --focus-ring: rgba(53, 211, 176, 0.2);
  --shadow: 0 1px 2px rgba(5, 10, 12, 0.22);
  --shadow-strong: 0 18px 44px rgba(5, 10, 12, 0.34);
  --radius: 7px;
  --radius-sm: 5px;
}

.topbar {
  min-height: 58px;
  padding: 0 20px;
  border-bottom-color: rgba(218, 231, 232, 0.09);
  background: #0f1517;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}

.brand-lockup {
  gap: 10px;
}

.brand-mark {
  border-color: rgba(53, 211, 176, 0.26);
  border-radius: var(--radius);
  background: #0c2c2a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand {
  letter-spacing: 0;
}

.subtitle {
  margin-top: 3px;
}

.topbar-chip,
.status-pill,
.toolbar-button {
  border-color: var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--control);
  box-shadow: none;
}

.status-pill {
  min-height: 32px;
  padding: 0 11px;
}

.status-pill.is-online {
  border-color: rgba(53, 211, 176, 0.26);
  background: rgba(15, 138, 95, 0.16);
}

.toolbar-button {
  min-height: 34px;
  padding: 0 12px;
  color: #d8e6e6;
}

.toolbar-button:hover {
  border-color: rgba(218, 231, 232, 0.24);
  background: var(--control-hover);
}

#demoButton.toolbar-button {
  border-color: rgba(53, 211, 176, 0.38);
  background: #0f8a5f;
  color: #ffffff;
}

#demoButton.toolbar-button:hover {
  border-color: rgba(140, 240, 202, 0.52);
  background: #0c7a54;
}

.toolbar-button.secondary {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.app-shell button:focus-visible,
.app-shell input:focus-visible,
.app-shell select:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.sidebar {
  gap: 9px;
  padding: 10px;
  border-right-color: rgba(218, 231, 232, 0.09);
  background: #101719;
}

.section-eyebrow,
.ops-brief .section-eyebrow,
.map-status-panel .section-eyebrow,
.route-focus-panel .section-eyebrow,
.marker-action-panel .section-eyebrow {
  color: #89ded0;
}

.ops-brief,
.metric,
.vehicle-panel,
.driver-item,
.vehicle-item,
.driver-token,
.map-status-panel,
.route-focus-panel,
.marker-action-panel,
.map-legend,
.history-drawer,
.map-info-card,
.route-destination-marker,
.route-destination-leaflet,
.route-destination-leaflet > div {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: none;
}

.ops-brief,
.vehicle-panel {
  border-radius: var(--radius);
}

.ops-brief {
  gap: 9px;
  padding: 14px;
  border-left-width: 1px;
  background: var(--surface-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.ops-brief > strong {
  font-size: 18px;
  line-height: 24px;
}

.ops-brief-grid {
  gap: 6px;
}

.ops-brief-grid span,
.marker-action-summary span,
.map-status-grid span,
.popup-route {
  border-color: transparent;
  background: var(--surface-soft);
}

.ops-brief-grid span,
.metric {
  border-radius: 6px;
}

.summary-grid {
  gap: 6px;
}

.metric {
  border-top-width: 1px;
  padding: 9px 10px;
  background: var(--surface);
}

.metric:nth-child(2),
.metric:nth-child(3) {
  border-top-color: var(--border);
}

.metric strong {
  color: var(--navy);
}

.view-tabs,
.vehicle-controls,
.panel-heading,
.driver-form {
  border-color: var(--border);
  background: var(--surface-muted);
}

.view-tabs {
  padding: 3px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.tab-button,
.filter-button {
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.tab-button:hover,
.filter-button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #d8e6e6;
}

.tab-button.is-active,
.filter-button.is-active {
  border-color: rgba(53, 211, 176, 0.22);
  background: var(--control-active);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: #e7fbf6;
}

.panel-heading {
  padding: 10px 12px;
}

.vehicle-controls {
  gap: 8px;
  padding: 10px 11px;
}

.search-field input,
.driver-form input,
.driver-form select {
  border-color: rgba(218, 231, 232, 0.13);
  border-radius: 6px;
  background: #0f1517;
  color: var(--text);
}

.search-field input:focus,
.driver-form input:focus,
.driver-form select:focus {
  border-color: rgba(53, 211, 176, 0.5);
  outline-color: var(--focus-ring);
}

.filter-button {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.045);
}

.vehicle-list,
.driver-list,
.history-list {
  scrollbar-color: rgba(154, 174, 176, 0.42) transparent;
}

.vehicle-item {
  grid-template-columns: minmax(0, 1fr) minmax(66px, auto);
  gap: 10px;
  padding: 12px 12px 12px 11px;
  border-bottom-color: rgba(218, 231, 232, 0.08);
  border-left-width: 2px;
  background: transparent;
}

.vehicle-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

.vehicle-item.is-selected {
  border-left-color: #35d3b0;
  background: rgba(53, 211, 176, 0.085);
  box-shadow: inset 0 0 0 1px rgba(53, 211, 176, 0.11);
}

.vehicle-title strong {
  color: var(--navy);
}

.badge,
.vehicle-type-chip {
  border-radius: 999px;
  background: rgba(218, 231, 232, 0.095);
}

.badge.active {
  background: rgba(53, 211, 176, 0.13);
  color: #9cf3d7;
}

.badge.stale {
  background: rgba(194, 106, 22, 0.14);
  color: #f0bd79;
}

.badge.offline {
  background: rgba(194, 65, 50, 0.14);
  color: #ffc6c1;
}

.vehicle-type-chip,
.vehicle-type-chip.type-trailer,
.vehicle-type-chip.type-container,
.vehicle-type-chip.type-van,
.vehicle-type-chip.type-cold {
  color: #c4d2d3;
}

.vehicle-progress {
  background: rgba(218, 231, 232, 0.1);
}

.vehicle-progress span {
  background: #35d3b0;
}

.speed strong {
  color: var(--navy);
}

.speed small {
  color: #7bd8c8;
}

.map-status-panel,
.route-focus-panel,
.marker-action-panel,
.map-legend,
.history-drawer,
.map-info-card {
  border-radius: var(--radius);
  background: var(--hud);
  box-shadow: 0 16px 38px rgba(5, 10, 12, 0.28);
}

.map-status-grid,
.marker-action-summary,
.popup-route {
  border-color: rgba(218, 231, 232, 0.1);
  border-radius: 6px;
}

.marker-action-head button,
.marker-action-buttons button,
.history-heading button {
  border-color: var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--control);
  color: #d8e6e6;
}

.marker-action-head button:hover,
.marker-action-buttons button:hover,
.history-heading button:hover {
  background: var(--control-hover);
}

.marker-action-buttons button:first-child {
  border-color: rgba(53, 211, 176, 0.48);
  background: #0f8a5f;
}

.marker-action-buttons button:first-child:hover {
  background: #0c7a54;
}

.history-heading,
.history-row {
  border-color: rgba(218, 231, 232, 0.08);
}

.history-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.018);
}

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

/* Expensive-detail pass: quieter rows, calmer map points, tighter numeric rhythm. */
.app-shell {
  font-variant-numeric: tabular-nums;
}

.ops-brief-grid strong,
.metric strong,
.speed strong,
.map-status-grid b,
.marker-action-summary em,
.history-row span:last-child {
  font-variant-numeric: tabular-nums;
}

.vehicle-item {
  margin: 0 8px;
  padding: 12px 10px;
  border: 1px solid transparent;
  border-bottom-color: rgba(218, 231, 232, 0.055);
  border-left-width: 1px;
  border-radius: 6px;
}

.vehicle-item:hover {
  border-color: rgba(218, 231, 232, 0.085);
  background: rgba(255, 255, 255, 0.028);
}

.vehicle-item.is-selected {
  border-color: rgba(53, 211, 176, 0.2);
  border-left-color: #35d3b0;
  background: rgba(53, 211, 176, 0.072);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 8px 18px rgba(5, 10, 12, 0.12);
}

.vehicle-list {
  padding: 7px 0;
}

.speed {
  min-width: 58px;
}

.speed strong {
  letter-spacing: 0;
}

.map-panel.is-zoom-far .truck-marker {
  filter: drop-shadow(0 3px 7px rgba(5, 10, 12, 0.28));
}

.map-panel.is-zoom-far .truck-marker__heading-icon .heading-tip {
  fill: color-mix(in srgb, var(--marker-fill) 58%, #d9f6ee 42%);
  stroke: rgba(8, 14, 16, 0.8);
}

.map-panel.is-zoom-far .truck-marker__badge {
  background:
    radial-gradient(circle at 37% 30%, rgba(255, 255, 255, 0.5) 0 1.2px, transparent 1.8px),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--marker-fill) 62%, #dffbf4 38%),
      color-mix(in srgb, var(--marker-dark) 82%, #101719 18%)
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 0 2px rgba(7, 13, 15, 0.52),
    0 0 0 3px color-mix(in srgb, var(--marker-fill) 12%, transparent 88%),
    0 4px 8px rgba(5, 10, 12, 0.28);
}

.map-panel.is-zoom-far .truck-marker__badge::before {
  inset: -6px;
  border-color: color-mix(in srgb, var(--marker-fill) 22%, transparent 78%);
  opacity: 0.28;
}

.map-panel.is-zoom-far .truck-marker.is-selected .truck-marker__badge {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 0 2px rgba(7, 13, 15, 0.52),
    0 0 0 5px rgba(53, 211, 176, 0.16),
    0 6px 12px rgba(5, 10, 12, 0.34);
}

/* Minimal marker pass: vehicle at close zoom, clean dot at far zoom. */
.truck-marker,
.truck-marker:hover,
.truck-marker.is-selected,
.map-panel.is-zoom-mid .truck-marker,
.map-panel.is-zoom-far .truck-marker,
.map-panel.is-zoom-far .truck-marker:hover,
.map-panel.is-zoom-far .truck-marker.is-selected {
  filter: none;
}

.truck-marker:hover,
.truck-marker.is-selected,
.map-panel.is-zoom-far .truck-marker:hover,
.map-panel.is-zoom-far .truck-marker.is-selected {
  transform: translateY(-1px);
}

.truck-marker__heading-icon .heading-glow {
  opacity: 0;
  filter: none;
}

.truck-marker__heading-icon .heading-tip,
.map-panel.is-zoom-far .truck-marker__heading-icon .heading-tip {
  fill: color-mix(in srgb, var(--marker-fill) 70%, #ffffff 30%);
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 0.8;
}

.truck-marker__badge,
.truck-marker.is-selected .truck-marker__badge,
.map-panel.is-zoom-far .truck-marker__badge,
.map-panel.is-zoom-far .truck-marker.is-selected .truck-marker__badge {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.truck-marker__badge::before,
.map-panel.is-zoom-far .truck-marker__badge::before {
  display: none;
}

.truck-marker__photo .photo-shadow {
  display: none;
}

.truck-marker__photo .photo-bed,
.truck-marker__photo .photo-box,
.truck-marker__photo .photo-trailer,
.truck-marker__photo .photo-container,
.truck-marker__photo .photo-wing,
.truck-marker__photo .photo-cab {
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 1;
}

.truck-marker__plate {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: transparent;
  text-shadow: none;
  opacity: 0;
}

.truck-marker__status {
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow: none;
}

.map-panel.is-zoom-far .truck-marker__heading {
  display: none;
}

.map-panel.is-zoom-far .truck-marker__badge {
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.55) 0 1.1px, transparent 1.8px),
    color-mix(in srgb, var(--marker-fill) 82%, #ffffff 18%);
}

.truck-marker:hover .truck-marker__plate,
.truck-marker.is-selected .truck-marker__plate,
.map-panel.is-zoom-far .truck-marker:hover .truck-marker__plate,
.map-panel.is-zoom-far .truck-marker.is-selected .truck-marker__plate {
  min-width: 0;
  max-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  line-height: 0;
  opacity: 0;
}

@media (max-width: 860px) {
  .launch-panel {
    width: min(390px, calc(100% - 20px));
    padding: 20px;
  }

  .launch-steps {
    grid-template-columns: 1fr;
  }

  .login-content {
    align-content: center;
    grid-template-columns: 1fr;
    gap: 24px;
    width: min(520px, calc(100% - 32px));
  }

  .login-copy {
    gap: 10px;
    padding-bottom: 0;
  }

  .login-copy h1 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .login-copy p {
    font-size: 15px;
  }

  .login-card {
    padding: 20px;
  }

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

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .brand-lockup {
    min-width: 0;
  }

  .topbar-context {
    justify-content: flex-start;
  }

  .toolbar {
    width: 100%;
    flex-wrap: wrap;
  }

  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(360px, 50vh) minmax(0, 1fr);
  }

  body.is-map-expanded .workspace {
    grid-template-rows: minmax(0, 1fr);
  }

  .sidebar {
    order: 2;
    grid-template-rows: auto auto auto auto;
    border-top: 1px solid var(--border);
    border-right: 0;
    overflow: auto;
  }

  body.is-map-expanded .sidebar {
    display: none;
  }

  .vehicle-panel {
    min-height: 420px;
  }

  #driversPanel.vehicle-panel {
    min-height: 560px;
  }

  .map-panel {
    order: 1;
  }

  .map-control-deck {
    top: 12px;
    right: 12px;
    gap: 8px;
  }

  .map-panel.has-route-focus .map-control-deck {
    top: 12px;
    transform: none;
  }

  .map-panel.has-marker-actions .map-control-deck {
    display: none;
  }

  .map-layer-toggle {
    width: 144px;
  }

  .map-layer-toggle button {
    min-height: 42px;
    font-size: 12px;
  }

  .map-zoom-stack {
    width: 48px;
  }

  .map-zoom-stack button {
    min-width: 48px;
    min-height: 48px;
    font-size: 22px;
  }

  .app-shell .map-expand-button {
    display: block;
    width: 144px;
    min-height: 44px;
    font-size: 12px;
  }

  .map-status-panel {
    top: 10px;
    left: 10px;
    width: min(300px, calc(100% - 20px));
    padding: 10px;
  }

  .map-legend {
    right: 10px;
    top: auto;
    bottom: 10px;
  }

  .route-focus-panel {
    right: 10px;
    bottom: 56px;
    width: calc(100% - 20px);
  }

  .marker-action-panel {
    right: 10px;
    bottom: 118px;
    width: calc(100% - 20px);
  }

  .driver-actions {
    grid-template-columns: 1fr;
  }

  .history-drawer {
    right: 8px;
    bottom: 8px;
    left: 8px;
  }

  .history-row {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .history-row span:last-child {
    display: none;
  }
}

@media (max-width: 560px) {
  .login-screen {
    overflow: auto;
  }

  .login-content {
    min-height: 100%;
    padding: 26px 0;
  }

  .login-brand-mark {
    width: 40px;
    height: 40px;
  }

  .login-copy h1 {
    font-size: 30px;
  }

  .login-signal-list {
    gap: 6px;
  }

  .login-signal-list span {
    min-height: 28px;
    font-size: 12px;
  }

  .workspace {
    grid-template-rows: minmax(430px, 56vh) minmax(0, 1fr);
  }

  body.is-map-expanded .workspace {
    grid-template-rows: minmax(0, 1fr);
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
    padding: 10px 12px;
  }

  .brand-lockup {
    min-width: 0;
  }

  .topbar-context {
    justify-content: flex-end;
    min-width: 0;
  }

  .topbar-chip {
    padding: 5px 7px;
  }

  .toolbar {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .toolbar-button {
    flex: initial;
    justify-content: center;
  }

  .status-pill {
    flex: initial;
    justify-content: center;
  }

  #logoutButton.toolbar-button {
    border-color: var(--border-strong);
    background: var(--control);
  }

  .sidebar {
    padding: 10px;
  }

  .ops-brief > strong {
    white-space: normal;
  }

  .map-status-panel {
    display: none;
  }

  .map-legend {
    left: 10px;
    right: auto;
    max-width: calc(100% - 20px);
    overflow: auto;
  }

  .marker-action-panel {
    top: 10px;
    bottom: auto;
    gap: 10px;
    padding: 12px;
  }

  .marker-action-head strong {
    font-size: 15px;
  }

  .marker-action-summary,
  .marker-action-buttons {
    grid-template-columns: 1fr;
  }

  .history-drawer {
    right: 8px;
    bottom: 8px;
    left: 8px;
    max-height: min(178px, calc(100% - 86px));
  }

  .history-heading {
    gap: 8px;
    padding: 8px 10px;
  }

  .history-heading strong {
    font-size: 14px;
  }

  .history-heading span {
    font-size: 11px;
  }

  .history-list {
    max-height: 122px;
  }

  .history-row {
    padding: 7px 10px;
    font-size: 12px;
  }

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

  .speed {
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: baseline;
    justify-items: start;
  }

  .speed small {
    max-width: none;
    text-align: left;
  }
}

/* Marker edge cleanup: keep only the vehicle/dot, without dark borders. */
.truck-marker,
.truck-marker:hover,
.truck-marker.is-selected,
.map-panel.is-zoom-mid .truck-marker,
.map-panel.is-zoom-far .truck-marker,
.map-panel.is-zoom-far .truck-marker:hover,
.map-panel.is-zoom-far .truck-marker.is-selected,
.leaflet-truck-marker {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

.truck-marker__badge,
.truck-marker.is-selected .truck-marker__badge,
.map-panel.is-zoom-far .truck-marker__badge,
.map-panel.is-zoom-far .truck-marker.is-selected .truck-marker__badge {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.truck-marker__badge::before,
.truck-marker__badge::after,
.map-panel.is-zoom-far .truck-marker__badge::before,
.map-panel.is-zoom-far .truck-marker__badge::after {
  display: none !important;
}

.truck-marker__heading-icon .heading-glow,
.truck-marker__photo .photo-shadow,
.truck-marker__vehicle-top .vehicle-shadow {
  display: none !important;
  opacity: 0 !important;
  filter: none !important;
}

.truck-marker__heading-icon .heading-tip,
.map-panel.is-zoom-far .truck-marker__heading-icon .heading-tip {
  stroke: none !important;
}

.truck-marker__photo .photo-bed,
.truck-marker__photo .photo-box,
.truck-marker__photo .photo-trailer,
.truck-marker__photo .photo-container,
.truck-marker__photo .photo-wing,
.truck-marker__photo .photo-cab {
  stroke: rgba(255, 255, 255, 0.58) !important;
}

.truck-marker__photo .photo-wheel {
  fill: color-mix(in srgb, var(--marker-dark) 54%, #ffffff 46%) !important;
  stroke: rgba(255, 255, 255, 0.48) !important;
}

.truck-marker__status {
  border: 0 !important;
  box-shadow: none !important;
}

.truck-marker__plate,
.truck-marker:hover .truck-marker__plate,
.truck-marker.is-selected .truck-marker__plate,
.map-panel.is-zoom-far .truck-marker:hover .truck-marker__plate,
.map-panel.is-zoom-far .truck-marker.is-selected .truck-marker__plate {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  opacity: 0 !important;
}

.map-panel.is-zoom-far .truck-marker__badge {
  background: color-mix(in srgb, var(--marker-fill) 84%, #ffffff 16%) !important;
}

#map button.truck-marker[title],
#map button.truck-marker[title]:hover,
#map button.truck-marker[title].is-selected {
  border: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
}

/* Mobile operations pass: keep map actions reachable while preserving the list. */
@media (max-width: 860px) {
  .map-panel.has-route-focus .map-message,
  .map-panel.has-marker-actions .map-message,
  .map-panel.has-marker-actions .map-status-panel,
  .map-panel.has-marker-actions .map-legend {
    display: none;
  }
}

@media (max-width: 560px) {
  .workspace {
    grid-template-rows: minmax(300px, 42vh) minmax(0, 1fr);
  }

  body.is-map-expanded .workspace {
    grid-template-rows: minmax(0, 1fr);
  }

  .topbar {
    gap: 8px;
  }

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

  .status-pill {
    grid-column: 1 / -1;
    justify-content: center;
    min-width: 0;
    min-height: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-shell .toolbar-button {
    min-width: 0;
    min-height: 44px;
    gap: 5px;
    padding: 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #logoutButton.toolbar-button {
    min-height: 44px;
  }

  .button-icon,
  .button-icon svg {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .ops-brief {
    order: 4;
    padding: 12px;
  }

  .summary-grid {
    order: 3;
  }

  .view-tabs {
    order: 1;
  }

  .ops-brief-grid span,
  .metric {
    padding: 8px;
  }

  .vehicle-panel {
    order: 2;
    min-height: 320px;
  }

  #driversPanel.vehicle-panel {
    min-height: 500px;
  }

  .driver-form {
    grid-template-columns: 1fr;
  }

  .map-control-deck {
    top: 8px;
    right: 8px;
    left: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    justify-items: stretch;
    gap: 7px;
  }

  .map-panel.has-route-focus .map-control-deck {
    top: 8px;
  }

  .map-layer-toggle {
    width: auto;
  }

  .map-layer-toggle button {
    min-height: 40px;
    padding: 0 6px;
  }

  .map-zoom-stack {
    display: grid;
    grid-template-columns: repeat(2, 44px);
    width: auto;
  }

  .map-zoom-stack button {
    min-width: 44px;
    min-height: 40px;
  }

  .map-zoom-stack button + button {
    border-top: 0;
    border-left: 1px solid var(--hud-border);
  }

  .app-shell .map-expand-button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 40px;
  }

  .map-status-panel {
    top: 103px;
    right: 8px;
    left: 8px;
    display: grid;
    width: auto;
    padding: 8px;
  }

  .map-panel.has-route-focus .map-status-panel {
    display: none;
  }

  .map-status-panel .section-eyebrow,
  .map-status-panel > strong {
    display: none;
  }

  .map-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-status-grid span {
    padding: 6px;
    font-size: 10px;
    line-height: 14px;
  }

  .map-status-grid b {
    font-size: 13px;
    line-height: 16px;
  }

  .map-legend {
    bottom: 8px;
    left: 8px;
    right: auto;
    min-height: 32px;
    max-width: calc(100% - 16px);
    padding: 6px 8px;
  }

  .route-focus-panel {
    right: 8px;
    bottom: 48px;
    left: 8px;
    width: auto;
    max-height: 98px;
    gap: 4px;
    padding: 9px 10px;
    overflow: hidden;
  }

  .route-focus-panel strong,
  .route-focus-panel p {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
  }

  .route-focus-panel strong {
    -webkit-line-clamp: 1;
  }

  .route-focus-panel p {
    -webkit-line-clamp: 2;
  }

  .marker-action-panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: min(78vh, 440px);
    gap: 10px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 10px 10px 0 0;
    overflow: auto;
  }

  .marker-action-head {
    gap: 10px;
  }

  .marker-action-head button {
    min-height: 44px;
  }

  .marker-action-summary,
  .marker-action-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marker-action-buttons button {
    min-height: 44px;
    padding: 0 8px;
  }

  .history-drawer {
    right: 8px;
    bottom: 8px;
    left: 8px;
    max-height: min(42vh, 240px);
  }

  .history-list {
    max-height: 180px;
  }

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

  .vehicle-title strong {
    order: -1;
    font-size: 14px;
  }

  .vehicle-route-line,
  .vehicle-cargo-line {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
  }

  .vehicle-route-line {
    -webkit-line-clamp: 2;
  }

  .vehicle-cargo-line {
    -webkit-line-clamp: 1;
  }

  .speed {
    min-width: 0;
    padding-top: 7px;
    border-top: 1px solid var(--border);
  }

  .speed small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  .topbar-chip {
    display: none;
  }

  .toolbar-button {
    font-size: 12px;
  }

  .ops-brief-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-layer-toggle button,
  .app-shell .map-expand-button {
    font-size: 11px;
  }
}
