:root {
  --bg: #f4f6f2;
  --surface: #ffffff;
  --surface-soft: #eef3ee;
  --ink: #17201b;
  --muted: #68746d;
  --line: #d7ded6;
  --line-strong: #b8c4bb;
  --accent: #166c63;
  --accent-soft: #dcefeb;
  --warn: #9c5b13;
  --warn-soft: #fff1d8;
  --danger: #a03333;
  --danger-soft: #f8dfdf;
  --now: #d92d20;
  --slot-height: 116px;
  --header-height: 74px;
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 1180px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

.dashboard {
  height: 100vh;
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.topbar {
  min-height: 52px;
  padding-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.brand-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(22, 108, 99, 0.18);
}

.brand-icon svg {
  width: 19px;
  height: 19px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: 82px;
  padding: 0;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--ink);
}

.main-nav a.active {
  color: var(--accent);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.1;
}

h2 {
  font-size: 16px;
  line-height: 1.2;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
}

.action-button {
  min-width: 82px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.action-button.primary {
  border: 0;
  background: var(--accent);
  color: #ffffff;
}

.action-button.primary:hover {
  background: #11574f;
}

.action-button.secondary,
.action-button.login {
  border: 0;
  background: transparent;
  color: #46514a;
}

.action-button.secondary:hover,
.action-button.login:hover {
  background: #eef1ed;
  color: var(--ink);
}

.parse-depth-select {
  min-height: 34px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  outline: none;
}

.parse-depth-select:hover,
.parse-depth-select:focus {
  border-color: var(--accent);
}

.parse-depth-select.compact {
  width: 58px;
  min-height: 34px;
  padding-left: 7px;
  padding-right: 22px;
}

.action-divider {
  width: 1px;
  height: 26px;
  background: var(--line-strong);
}

.board-shell {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 64px minmax(720px, 1fr) 330px;
  gap: 10px;
}

.time-column,
.fleet-board,
.incoming-panel {
  min-height: 0;
}

.time-column {
  display: grid;
  grid-template-rows: var(--header-height) 1fr;
}

.vehicle-header {
  min-height: var(--header-height);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface);
}

.vehicle-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(76px, 120px);
  align-items: center;
  gap: 8px;
}

.vehicle-header strong {
  display: block;
  font-size: 15px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-header span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.driver-select {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 4px 28px 4px 9px;
  border: 0;
  border-radius: 6px;
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #68746d 50%) calc(100% - 14px) 12px / 5px 5px
      no-repeat,
    linear-gradient(135deg, #68746d 50%, transparent 50%) calc(100% - 9px) 12px / 5px 5px
      no-repeat,
    #eef1ed;
  color: #46514a;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  cursor: pointer;
}

.driver-select:hover {
  background:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%) calc(100% - 14px) 12px / 5px 5px
      no-repeat,
    linear-gradient(135deg, var(--ink) 50%, transparent 50%) calc(100% - 9px) 12px / 5px 5px
      no-repeat,
    #e6ebe7;
  color: var(--ink);
}

.driver-select:focus {
  outline: 2px solid rgba(22, 108, 99, 0.16);
  outline-offset: 1px;
}

.driver-select:disabled {
  background: #f6f7f6;
  color: #aeb5b0;
  cursor: not-allowed;
  opacity: 1;
}

.vehicle-header.muted {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.time-axis,
.vehicle-grid {
  overflow-y: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.time-axis::-webkit-scrollbar,
.vehicle-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.time-axis {
  position: relative;
  background: var(--surface-soft);
  border-left: 1px solid var(--line);
}

.time-sticky-date {
  position: sticky;
  top: 0;
  z-index: 7;
  height: 28px;
  margin-bottom: -28px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(238, 243, 238, 0.98), rgba(238, 243, 238, 0.82));
  pointer-events: none;
}

.time-sticky-date span {
  padding: 0 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.time-tick {
  height: var(--slot-height);
  padding-top: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.time-tick.day-start {
  border-top: 2px solid var(--accent);
  background: #e7f0eb;
}

.time-tick span,
.time-tick small {
  display: block;
}

.time-tick small {
  margin-top: 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.fleet-board {
  display: grid;
  grid-template-rows: var(--header-height) 1fr;
  overflow: hidden;
}

.vehicle-headers,
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(var(--vehicle-count), minmax(132px, 1fr));
}

.vehicle-headers {
  gap: 8px;
}

.vehicle-grid {
  gap: 8px;
}

.vehicle-lane {
  position: relative;
  min-height: calc(var(--slot-height) * var(--hour-count));
  border-inline: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      to bottom,
      #ffffff 0,
      #ffffff calc(var(--slot-height) - 1px),
      var(--line) calc(var(--slot-height) - 1px),
      var(--line) var(--slot-height)
    );
}

.day-separator {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  height: 0;
  border-top: 2px solid rgba(22, 108, 99, 0.55);
  pointer-events: none;
}

.day-separator span {
  position: absolute;
  top: -10px;
  left: 8px;
  padding: 2px 6px;
  border: 1px solid rgba(22, 108, 99, 0.24);
  border-radius: 6px;
  background: rgba(244, 246, 242, 0.96);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.now-line {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  height: 0;
  border-top: 2px solid var(--now);
  pointer-events: none;
}

.time-axis .now-line::before {
  content: "";
  position: absolute;
  top: -5px;
  right: -5px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--now);
}

.vehicle-lane .now-line {
  z-index: 4;
}

.drop-preview {
  position: absolute;
  left: 5px;
  right: 5px;
  z-index: 3;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: var(--radius);
  background: rgba(23, 32, 27, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.connection-note {
  position: absolute;
  left: 8px;
  right: 8px;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid rgba(22, 108, 99, 0.28);
  border-radius: 7px;
  background: #eef8f1;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  box-shadow: 0 8px 18px rgba(23, 32, 27, 0.11);
  pointer-events: none;
}

.connection-note span,
.connection-note b,
.connection-note i,
.connection-note small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-note b {
  justify-self: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.connection-note i {
  width: 1px;
  height: 1px;
}

.connection-note small {
  justify-self: end;
  font-size: 10px;
  font-weight: 750;
  color: rgba(22, 108, 99, 0.82);
}

.connection-note.is-best {
  border-width: 2px;
  background: #e3f5ea;
  box-shadow:
    0 10px 22px rgba(22, 108, 99, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.connection-note.is-tight {
  border-color: rgba(170, 44, 44, 0.35);
  background: #fff0f0;
  color: var(--danger);
}

.connection-note.is-tight small {
  color: rgba(160, 51, 51, 0.86);
}

.connection-note.is-tight b {
  background: var(--danger);
}

.vehicle-lane.drag-over {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background:
    repeating-linear-gradient(
      to bottom,
      #f4fbf9 0,
      #f4fbf9 calc(var(--slot-height) - 1px),
      var(--line-strong) calc(var(--slot-height) - 1px),
      var(--line-strong) var(--slot-height)
    );
}

.vehicle-lane.connection-best {
  box-shadow: inset 0 0 0 2px rgba(22, 108, 99, 0.28);
}

.vehicle-lane.drop-blocked {
  outline: 2px solid var(--danger);
  outline-offset: -2px;
  cursor: not-allowed;
  background:
    repeating-linear-gradient(
      to bottom,
      #fff7f7 0,
      #fff7f7 calc(var(--slot-height) - 1px),
      #e5c5c5 calc(var(--slot-height) - 1px),
      #e5c5c5 var(--slot-height)
    );
}

.incoming-panel {
  display: grid;
  grid-template-rows: var(--header-height) 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.incoming-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.dashboard-last-parse {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0.72;
}

.incoming-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.incoming-count-badge {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.incoming-list {
  min-height: 0;
  height: 100%;
  padding: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.incoming-day-header {
  position: sticky;
  top: -10px;
  z-index: 3;
  margin: 4px 0 -2px;
  padding: 4px 2px 2px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.order-card {
  position: relative;
  width: calc(100% - 10px);
  min-height: 92px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(23, 32, 27, 0.08);
  cursor: grab;
  user-select: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-card:active {
  cursor: grabbing;
}

.vehicle-lane .order-card {
  position: absolute;
  left: 5px;
  z-index: 2;
  min-height: 122px;
}

.order-card.compact {
  min-height: 92px;
}

.order-card[data-direction="from-airport"] {
  border-left-color: #f0c84b;
}

.order-card[data-direction="to-airport"] {
  border-left-color: var(--accent);
}

.order-card[data-direction="other"] {
  border-left-color: #8b5d22;
}

.order-card.is-past {
  opacity: 0.48;
  filter: grayscale(0.75);
  box-shadow: none;
}

.order-card.is-past .order-time,
.order-card.is-past .badge {
  color: var(--muted);
}

.order-card.is-assigned {
  border-color: rgba(22, 108, 99, 0.34);
  background: #f2fbf5;
}

.order-card.is-split-order {
  border-color: rgba(112, 74, 190, 0.34);
  border-left-color: #8d6bd8;
  background: #f7f3ff;
  box-shadow: 0 10px 22px rgba(112, 74, 190, 0.13);
}

.order-card.is-split-order .badge {
  border-color: rgba(112, 74, 190, 0.42);
  color: #6b4cb3;
}

.delay-block {
  position: absolute;
  left: 5px;
  right: 5px;
  z-index: 1;
  border: 1px dashed #b8c0ba;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(104, 116, 109, 0.12) 0,
      rgba(104, 116, 109, 0.12) 7px,
      rgba(255, 255, 255, 0.44) 7px,
      rgba(255, 255, 255, 0.44) 14px
    );
  color: #68746d;
  overflow: hidden;
  pointer-events: none;
}

.delay-block span {
  display: block;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.order-main {
  display: grid;
  gap: 5px;
  min-height: 0;
}

.order-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  line-height: 1.15;
  min-width: 0;
}

.order-source {
  min-width: 0;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-time {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.order-time.delayed {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.order-original-time {
  color: var(--muted);
  font-weight: 600;
}

.order-delayed-time {
  color: #b23838;
  font-weight: 900;
}

.order-route {
  display: grid;
  gap: 5px;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.2;
  min-width: 0;
}

.order-route span {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  min-width: 0;
}

.order-route strong {
  min-width: 0;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.route-dot.from {
  border: 1.5px solid rgba(22, 108, 99, 0.72);
  background: transparent;
}

.route-dot.to {
  background: rgba(22, 108, 99, 0.82);
}

.order-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  min-width: 0;
}

.footer-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
}

.passenger-count {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  white-space: nowrap;
}

.assign-button,
.assign-status {
  flex: 1 1 auto;
  min-height: 20px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.assign-row {
  margin-top: 2px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
}

.assign-button {
  border: 0;
  background: #fff0bd;
  color: #745700;
  cursor: pointer;
}

.assign-button:hover {
  background: #f4d979;
  color: #5c4500;
}

.assign-status {
  background: var(--accent);
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delay-control {
  position: relative;
  flex: 0 0 auto;
}

.toolbar-secondary-button {
  min-height: 20px;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: transparent;
  color: #5f6b64;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}

.toolbar-secondary-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.toolbar-secondary-button.is-copied {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.delay-select {
  position: absolute;
  right: 0;
  bottom: calc(100% + 4px);
  z-index: 8;
  width: 74px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(23, 32, 27, 0.14);
}

.route-stat {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  max-width: 78px;
  min-height: 18px;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge.sedan {
  background: #fff0bd;
  color: #806000;
}

.badge.van {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.empty-state {
  padding: 18px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.incoming-loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.incoming-loading-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: incoming-spin 900ms linear infinite;
}

@keyframes incoming-spin {
  to {
    transform: rotate(360deg);
  }
}

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

.order-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.order-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 32, 27, 0.38);
}

.order-modal-panel {
  position: relative;
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(23, 32, 27, 0.24);
  overflow: hidden;
}

.order-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px 10px;
}

.order-modal-header h2 {
  font-size: 17px;
  line-height: 1.2;
}

.modal-close-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close-button:hover {
  background: transparent;
}

.order-modal-content {
  max-height: calc(100vh - 150px);
  padding: 10px 20px 20px;
  overflow-y: auto;
  display: grid;
  gap: 14px;
}

.route-map {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef3ee;
  overflow: hidden;
}

.google-route-map {
  display: block;
}

.map-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.route-map svg {
  width: 100%;
  height: 100%;
  display: block;
}

.map-road {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.map-road.secondary {
  stroke: rgba(104, 116, 109, 0.28);
  stroke-width: 2;
}

.map-route {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 1 0;
  vector-effect: non-scaling-stroke;
}

.map-point {
  stroke: #ffffff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.map-point.start {
  fill: var(--accent);
}

.map-point.end {
  fill: #2f6fb2;
}

.map-label {
  position: absolute;
  transform: translate(-50%, calc(-100% - 8px));
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(23, 32, 27, 0.16);
}

.map-label.start {
  color: var(--accent);
}

.map-label.end {
  color: #2f6fb2;
}

.route-map.unavailable {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.detail-section {
  display: grid;
  gap: 9px;
}

.detail-section + .detail-section {
  padding-top: 0;
}

.detail-section h3 {
  margin: 0 0 2px;
  font-size: 16px;
}

.detail-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  font-size: 13px;
  line-height: 1.35;
}

.detail-row span {
  color: var(--muted);
}

.detail-row strong {
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.manual-flight-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.manual-flight-display {
  min-width: 28px;
}

.manual-flight-input {
  width: 104px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  outline: none;
}

.manual-flight-input::placeholder {
  color: #a8b0ab;
  opacity: 1;
  text-transform: none;
}

.manual-flight-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 108, 99, 0.12);
}

.flight-status-card {
  display: grid;
  padding: 12px;
  border: 1px solid rgba(104, 116, 109, 0.28);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.flight-status-card span {
  font-weight: 900;
}

.flight-status-card strong {
  font-size: 14px;
  font-weight: 500;
}

.flight-status-compact {
  display: grid;
  grid-template-columns: minmax(76px, max-content) minmax(88px, max-content) minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
}

.flight-status-main {
  color: var(--ink);
  font-weight: 500;
}

.flight-status-pill {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid rgba(104, 116, 109, 0.45);
  border-radius: 4px;
  color: var(--muted);
  background: rgba(104, 116, 109, 0.08);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.flight-arrival-actual {
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  text-align: right;
}

.flight-arrival-scheduled {
  color: var(--muted);
  font-weight: 400;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.flight-status-card .flight-arrival-actual {
  font-weight: 600;
}

.flight-status-card .flight-arrival-scheduled {
  font-weight: 400;
}

.flight-status-card[data-status-tone="green"] .flight-status-pill {
  border-color: rgba(55, 139, 42, 0.5);
  color: #2f7f25;
  background: rgba(55, 139, 42, 0.08);
}

.flight-status-card[data-status-tone="green"] .flight-arrival-actual {
  color: #2f7f25;
}

.flight-status-card[data-status-tone="red"] .flight-status-pill {
  border-color: rgba(185, 55, 55, 0.5);
  color: #b93737;
  background: rgba(185, 55, 55, 0.08);
}

.flight-status-card[data-status-tone="red"] .flight-arrival-actual {
  color: #b93737;
}

.flight-status-card.is-loading {
  border-left-color: var(--muted);
  background: rgba(104, 116, 109, 0.08);
  color: var(--muted);
}

.flight-status-card.is-error {
  border-color: rgba(160, 51, 51, 0.28);
  border-left-color: #a03333;
  background: rgba(160, 51, 51, 0.08);
  color: #8c2f2f;
}

.detail-link {
  color: var(--accent);
  text-decoration: none;
}

.modal-title-link {
  color: inherit;
  text-decoration: none;
}

.modal-title-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.detail-link:hover {
  text-decoration: underline;
}

@media (max-width: 1320px) {
  .board-shell {
    grid-template-columns: 58px minmax(640px, 1fr) 300px;
  }

  .vehicle-headers,
  .vehicle-grid {
    grid-template-columns: repeat(var(--vehicle-count), minmax(160px, 1fr));
  }
}
