:root {
  --lavender: #d9cff7;
  --lavender-strong: #bca9f0;
  --shell-header-bg: var(--lavender);
  --shell-header-border: #c8bced;
  --shell-header-text: #17202a;
  --shell-header-muted: #354052;
  --shell-header-button-bg: #fff;
  --shell-header-button-text: #334155;
  --shell-header-button-border: var(--line);
  --teal: #0f9f9a;
  --teal-dark: #087a78;
  --ink: #17202a;
  --muted: #657284;
  --line: #dfe5ec;
  --panel: #ffffff;
  --soft: #f6f8fb;
  --warn: #b45309;
  --danger: #b91c1c;
  --success: #16803d;
  --blue: #2364aa;
  --tone-neutral-bg: #eaecf0;
  --tone-neutral-text: #3f4b5a;
  --tone-route-bg: #c4e3ff;
  --tone-route-text: #00466b;
  --tone-active-bg: #c9f2f0;
  --tone-active-text: #075a3e;
  --tone-success-bg: #c3ffbe;
  --tone-success-text: #1c5d04;
  --tone-warn-bg: #fff3cd;
  --tone-warn-text: #674e04;
  --tone-danger-bg: #f3d3d1;
  --tone-danger-text: #880606;
  --shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 78px;
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: #364152;
  font-size: 13px;
  font-weight: 650;
}

.address-autocomplete-wrap {
  position: relative;
}

.address-autocomplete-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.address-autocomplete-menu button {
  width: 100%;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  line-height: 1.35;
}

.address-autocomplete-menu button:hover,
.address-autocomplete-menu button:focus {
  background: #eef8f8;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(246, 248, 251, 0.9), rgba(246, 248, 251, 0.96)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='720' viewBox='0 0 1200 720'%3E%3Crect width='1200' height='720' fill='%23eef4f4'/%3E%3Cg fill='none' stroke='%230f9f9a' stroke-width='5' opacity='.22'%3E%3Cpath d='M114 436h202l58-118h104l58 118h550'/%3E%3Ccircle cx='262' cy='486' r='55'/%3E%3Ccircle cx='822' cy='486' r='55'/%3E%3Cpath d='M520 338h168l74 98'/%3E%3Cpath d='M140 434c22-94 85-142 188-142h184c92 0 163 48 213 142'/%3E%3C/g%3E%3Cg fill='%23bca9f0' opacity='.35'%3E%3Crect x='74' y='104' width='220' height='16' rx='8'/%3E%3Crect x='903' y='142' width='210' height='16' rx='8'/%3E%3Crect x='502' y='98' width='130' height='16' rx='8'/%3E%3C/g%3E%3C/svg%3E") center / cover;
}

.login-panel {
  width: min(460px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-panel .brand-mark {
  width: min(340px, 100%);
  height: auto;
  max-height: 156px;
  margin: 0 auto 14px;
  object-fit: contain;
  background: transparent;
}

.login-panel h1 {
  margin: 10px 0 4px;
  font-size: 32px;
  letter-spacing: 0;
  text-align: center;
}

.login-panel p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}

.login-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 20px;
  color: #475569;
  font-size: 13px;
  font-weight: 750;
}

.login-status::before,
.button-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin .75s linear infinite;
  content: "";
}

.login-status::before {
  border-color: rgba(15, 159, 154, .2);
  border-top-color: var(--teal);
}

.button-spinner {
  display: none;
}

button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

button.is-loading .button-spinner {
  display: inline-block;
}

button.is-loading .button-label {
  display: inline-block;
}

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

.brand-mark {
  display: block;
  width: min(280px, 82vw);
  height: 104px;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
}

.brand-mark.small {
  width: 132px;
  height: 54px;
  border-radius: 6px;
}

.demo-users {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  background: var(--shell-header-bg);
  border-bottom: 1px solid var(--shell-header-border);
  color: var(--shell-header-text);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--shell-header-muted);
  font-size: 12px;
  line-height: 1.35;
}

.topbar .brand strong {
  color: var(--shell-header-text);
}

.topbar .ghost {
  background: var(--shell-header-button-bg);
  color: var(--shell-header-button-text);
  border-color: var(--shell-header-button-border);
}

.top-actions,
.table-actions,
.row-actions,
.toolbar,
.form-actions,
.driver-actions,
.metric-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.global-notifications {
  position: relative;
}

.global-notification-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.global-notification-button.has-unread {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.global-notification-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.global-notification-button.has-unread .global-notification-icon {
  background: #dc2626;
  color: #fff;
}

.global-notification-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  width: min(390px, calc(100vw - 28px));
  overflow: hidden;
  pointer-events: auto;
  border: 1px solid #d7ddea;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
}

.global-notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid #e5eaf2;
  background: #f8fafc;
}

.global-notification-title {
  font-weight: 950;
  color: #172033;
}

.global-notification-meta {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.global-notification-list {
  display: grid;
  gap: 0;
  max-height: min(440px, calc(100vh - 160px));
  overflow-y: auto;
}

.global-notification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid #eef2f7;
}

.global-notification-row:last-child {
  border-bottom: 0;
}

.global-notification-row strong {
  display: block;
  color: #172033;
  font-size: 14px;
  line-height: 1.25;
}

.global-notification-row p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.global-notification-count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 11px;
  font-weight: 950;
}

.global-notification-empty {
  padding: 22px 16px;
  color: #64748b;
  font-weight: 750;
  text-align: center;
}

.primary,
.secondary,
.ghost,
.danger,
.chip,
.tab {
  min-height: 36px;
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 750;
}

.primary {
  background: var(--teal);
  color: #fff;
}

.primary:hover {
  background: var(--teal-dark);
}

.secondary {
  background: #eef8f8;
  color: var(--teal-dark);
  border: 1px solid #bde1df;
}

.ghost,
.chip {
  background: #fff;
  color: #334155;
  border: 1px solid var(--line);
}

.danger {
  background: #fee2e2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.full {
  width: 100%;
}

.tabs {
  position: sticky;
  top: 67px;
  z-index: 25;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.driver-app-mode #module-tabs,
.driver-app-mode #driver-portal-toggle,
.driver-app-mode #add-trip-top {
  display: none;
}

.driver-app-mode .topbar {
  position: static;
}

.driver-app-mode main {
  padding-top: 12px;
}

.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  background: transparent;
  color: #445066;
}

.tab.active {
  background: #eef8f8;
  color: var(--teal-dark);
}

.tab.has-unread {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.tab.has-unread > span:first-child {
  color: #991b1b;
  font-weight: 900;
}

.unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}

.has-unread .unread-badge {
  animation: unread-buzz 1.6s ease-in-out infinite;
}

@keyframes unread-buzz {
  0%, 88%, 100% { transform: translateX(0); }
  90% { transform: translateX(-1px); }
  92% { transform: translateX(1px); }
  94% { transform: translateX(-1px); }
  96% { transform: translateX(1px); }
}

.subtabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 8px 10px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.subtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: #475569;
  font-weight: 800;
  white-space: nowrap;
}

.subtab.active {
  background: #eef8f8;
  color: var(--teal-dark);
  border: 1px solid #bde1df;
  border-bottom-color: #eef8f8;
}

.subtab.has-unread {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.subtab.has-unread > span:first-child {
  color: #991b1b;
  font-weight: 900;
}

.subtab-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.subtab.active .subtab-count-badge {
  background: #fff;
  color: var(--teal-dark);
  box-shadow: inset 0 0 0 1px rgba(15, 159, 154, .22);
}

.subtab-count-badge.alert,
.subtab.has-unread .subtab-count-badge {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 0 0 2px #fff;
}

.result-count-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.subview {
  display: none;
}

.subview.active {
  display: block;
}

main {
  padding: 16px;
}

.module-view,
.admin-layout,
#module-supplements,
.reports-page,
.report-filter-panel,
.report-chart-card,
.report-metric-card,
.panel,
.table-wrap {
  min-width: 0;
}

.module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.module-header h2 {
  margin: 0 0 4px;
  font-size: 24px;
  letter-spacing: 0;
}

.module-header p {
  margin: 0;
  color: var(--muted);
}

.trips-module-header {
  align-items: flex-end;
}

.trips-page-tabs {
  padding: 8px 0 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.trips-page-tabs .subtab {
  border-radius: 0;
  border-bottom: 3px solid transparent;
}

.trips-page-tabs .subtab.active {
  border-color: transparent transparent var(--teal);
  background: transparent;
}

.facility-users-panel {
  margin-top: 14px;
}

.facility-user-list {
  display: grid;
  gap: 8px;
}

.facility-user-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.facility-user-list span {
  color: var(--muted);
  font-size: 12px;
}

.facility-user-list small,
.request-submitter small,
.request-log-list span {
  color: var(--muted);
  font-size: 11px;
}

.trip-requests-table td:nth-child(3),
.trip-requests-table td:nth-child(4),
.trip-requests-table td:nth-child(5) {
  max-width: 260px;
  color: #475569;
  line-height: 1.35;
}

.trip-requests-table tr.new-facility-request {
  position: relative;
  background: #fffbeb;
  box-shadow: inset 4px 0 0 #f59e0b;
  animation: facility-request-pulse 2.4s ease-in-out infinite;
}

.request-passenger-cell {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.new-request-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 20px;
  padding: 3px 7px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

@keyframes facility-request-pulse {
  0%, 100% { box-shadow: inset 4px 0 0 #f59e0b, 0 0 0 rgba(245, 158, 11, 0); }
  50% { box-shadow: inset 4px 0 0 #f59e0b, 0 0 0 3px rgba(245, 158, 11, .08); }
}

.activity-log-table td {
  vertical-align: top;
  line-height: 1.35;
}

.activity-log-table code {
  display: inline-block;
  max-width: 180px;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: 11px;
}

.audit-change-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 150px;
}

.audit-change-list code {
  max-width: 140px;
  padding: 2px 5px;
  border: 1px solid #dbe3ee;
  border-radius: 5px;
  background: #f8fafc;
}

.audit-code-detail {
  min-width: 180px;
}

.audit-code-detail summary {
  width: fit-content;
  cursor: pointer;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.audit-code-detail pre {
  max-width: min(560px, 64vw);
  max-height: 320px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.audit-code-detail pre code {
  display: block;
  max-width: none;
  color: inherit;
  font-size: inherit;
  overflow-wrap: anywhere;
}

.request-submitter,
.request-log-list {
  display: grid;
  gap: 2px;
  min-width: 150px;
}

.request-submitter strong,
.request-log-list strong {
  color: #111827;
  font-size: 12px;
}

.trip-requests-table .row-actions {
  min-width: 300px;
}

.dispatch-ops,
.dispatch-layout {
  display: grid;
  grid-template-columns: 360px minmax(720px, 1fr);
  gap: 14px;
  align-items: start;
  transition: grid-template-columns .22s ease;
}

.dispatch-layout.unassigned-collapsed {
  grid-template-columns: 44px minmax(720px, 1fr);
}

.dispatch-layout.unassigned-empty {
  grid-template-columns: 260px minmax(720px, 1fr);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel-pad {
  padding: 14px;
}

.sidebar {
  position: sticky;
  top: 132px;
  max-height: calc(100vh - 150px);
  overflow: auto;
}

.dispatch-sidebar {
  position: sticky;
  top: 132px;
  min-height: calc(100vh - 155px);
  max-height: calc(100vh - 155px);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  overflow: hidden;
}

.unassigned-panel.empty {
  grid-template-rows: auto auto auto 1fr;
}

.unassigned-panel.empty .unassigned-list {
  min-height: 110px;
}

.unassigned-panel.empty .sidebar-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.unassigned-panel.empty .sidebar-tools .secondary {
  grid-column: 1 / -1;
}

.unassigned-panel.empty .sidebar-action-bar {
  align-self: end;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.unassigned-panel.empty .sidebar-action-bar button,
.unassigned-panel.empty .sidebar-tools button {
  width: 100%;
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
}

.unassigned-panel.collapsed {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: calc(100vh - 155px);
  max-height: calc(100vh - 155px);
  padding: 10px 6px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.icon-collapse {
  min-width: 32px;
  min-height: 32px;
  padding: 4px 8px;
  font-weight: 900;
}

.assignment-collapse-icon {
  display: inline-grid;
  place-items: center;
}

.assignment-collapse-icon svg {
  display: block;
}

.assignment-collapse-icon.collapse-ready svg {
  transform: scaleX(-1);
}

.rail-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

.rail-count {
  display: grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  border-radius: 999px;
  background: #eef8f8;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 850;
}

.sidebar-search,
.sidebar-tools {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.sidebar-search {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
}

.sidebar-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.unassigned-list {
  overflow: auto;
  padding: 8px 10px 82px;
}

.unassigned-list.drag-over {
  outline: 2px solid var(--teal);
  outline-offset: -5px;
  background: #edfafa;
}

.sidebar-action-bar {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 24px rgba(15, 23, 42, .08);
}

.dispatch-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: calc(100vh - 132px);
  max-height: calc(100vh - 132px);
  overflow: hidden;
}

.board-topline {
  position: sticky;
  top: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto auto;
  grid-template-areas:
    "date search filters operations"
    "strip strip strip strip"
    "stats stats stats stats";
  align-items: center;
  gap: 4px 6px;
  margin-bottom: 4px;
  padding-bottom: 4px;
  background: var(--bg);
}

.board-topline > .date-cluster {
  grid-area: date;
}

.board-topline > .dispatch-date-strip {
  grid-area: strip;
}

.board-topline > .assigned-search {
  grid-area: search;
}

.board-topline > .dispatch-filter-menu {
  grid-area: filters;
}

.board-topline > .dispatch-operations-menu {
  grid-area: operations;
}

.board-topline > .metric-pills {
  grid-area: stats;
}

.date-cluster,
.metric-pills,
.board-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.dispatch-date-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(86px, 1fr));
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  padding: 3px 0 2px;
  scrollbar-width: thin;
}

.dispatch-date-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "day date"
    "trips trips"
    "meta meta";
  align-items: center;
  gap: 1px 5px;
  min-width: 86px;
  min-height: 48px;
  padding: 6px 8px;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  text-align: left;
}

.dispatch-date-chip span {
  grid-area: day;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dispatch-date-chip strong {
  grid-area: date;
  color: #17202a;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.dispatch-date-chip em,
.dispatch-date-chip i {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  line-height: 1.1;
}

.dispatch-date-chip em {
  grid-area: trips;
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
}

.dispatch-date-chip i {
  grid-area: meta;
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
}

.dispatch-date-chip.today {
  border-color: #bde1df;
  background: #f0fdfa;
}

.dispatch-date-chip.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}

.dispatch-date-chip.active span,
.dispatch-date-chip.active strong,
.dispatch-date-chip.active em,
.dispatch-date-chip.active i {
  color: #fff;
}

.today-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: max-content;
  white-space: nowrap;
}

.today-button strong {
  color: #17202a;
  font-size: 12px;
}

.dispatch-selected-date {
  display: inline-grid;
  gap: 1px;
  min-width: 86px;
  padding: 4px 10px;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  background: #fff;
  color: #17202a;
  line-height: 1.05;
}

.dispatch-selected-date span {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dispatch-selected-date strong {
  font-size: 13px;
  font-weight: 900;
}

.metric-pills {
  flex-wrap: nowrap;
  overflow: visible;
  scrollbar-width: thin;
  justify-content: flex-end;
}

.dispatch-layout-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 2px;
}

.date-picker {
  width: 142px;
}

.assigned-search {
  min-width: 220px;
}

.square {
  width: 36px;
  padding-left: 0;
  padding-right: 0;
}

.compact-menu {
  position: relative;
}

.compact-menu summary {
  list-style: none;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

.compact-menu summary::-webkit-details-marker {
  display: none;
}

.compact-menu-body {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  width: 280px;
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.crew-schedule-page {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
}

.crew-schedule-tabs,
.crew-schedule-datebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  min-width: 0;
}

.crew-schedule-toolbar,
.crew-date-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.crew-schedule-search {
  min-width: min(320px, 34vw);
}

.segmented-control {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segmented-control button {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: #334155;
}

.segmented-control button:last-child {
  border-right: 0;
}

.segmented-control button.active {
  background: var(--teal);
  color: #fff;
}

.crew-selected-date {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-weight: 750;
}

.crew-selected-date strong {
  color: #334155;
  font-size: 16px;
}

.crew-week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(58px, 1fr));
  gap: 18px;
  flex: 1;
  min-width: min(100%, 520px);
}

.crew-week-strip button {
  display: grid;
  place-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  cursor: pointer;
}

.crew-week-strip strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
  color: #334155;
}

.crew-week-strip button.active strong {
  background: var(--teal);
  color: #fff;
}

.crew-schedule-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.crew-schedule-board {
  display: grid;
  grid-template-columns: 230px minmax(980px, 1fr);
  min-width: 1220px;
}

.crew-vehicle-head,
.crew-time-head {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.crew-time-head {
  position: sticky;
  top: 0;
}

.crew-time-head span {
  position: absolute;
  bottom: 18px;
  transform: translateX(-50%);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.crew-time-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: repeating-linear-gradient(90deg, #cbd5e1 0 1px, transparent 1px 24px);
}

.crew-vehicle-cell {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 72px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.crew-vehicle-cell strong {
  color: #334155;
  font-size: 14px;
}

.crew-vehicle-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.crew-timeline-row {
  position: relative;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  transition: background-color .12s ease, box-shadow .12s ease;
}

.crew-timeline-row.drag-over {
  background: #edfafa;
  box-shadow: inset 0 0 0 2px var(--teal);
}

.crew-hour-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(148, 163, 184, .45);
}

.crew-shift-block {
  position: absolute;
  top: 8px;
  min-width: 170px;
  height: 56px;
  padding: 10px 14px;
  border: 1px solid #64748b;
  border-radius: 7px;
  background: #d1d5db;
  color: #475569;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
  cursor: grab;
  user-select: none;
}

.crew-shift-block:active {
  cursor: grabbing;
}

.crew-shift-block.inactive {
  opacity: .58;
}

.crew-shift-time {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
}

.crew-shift-actions {
  position: absolute;
  top: 8px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.crew-shift-edit,
.crew-shift-delete {
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.crew-shift-delete {
  color: #991b1b;
}

.crew-shift-edit:hover,
.crew-shift-edit:focus-visible,
.crew-shift-delete:hover,
.crew-shift-delete:focus-visible {
  text-decoration: underline;
  outline: none;
}

.crew-shift-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.crew-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 220px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #6d4bd1;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-chip.attendant {
  background: var(--teal);
}

.crew-form-mode-tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.crew-form-mode-tabs button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 0 14px;
  background: #f8fafc;
  color: #334155;
  font-weight: 850;
  cursor: pointer;
}

.crew-form-mode-tabs button:last-child {
  border-right: 0;
}

.crew-form-mode-tabs button.active {
  background: var(--teal);
  color: #fff;
}

.crew-form-errors {
  display: grid;
  gap: 8px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fef2f2;
  color: #991b1b;
}

.crew-form-errors[hidden] {
  display: none;
}

.crew-form-errors strong {
  font-size: 0.88rem;
}

.crew-form-errors ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.crew-current-week-form {
  display: grid;
  gap: 10px;
}

.crew-current-week-form[hidden],
.crew-vehicle-gate-hint[hidden] {
  display: none;
}

.crew-vehicle-gate-hint {
  border: 1px dashed rgba(10, 117, 117, .32);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f0fdfa;
  color: #0f766e;
}

.crew-day-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.crew-day-card.active {
  border-color: rgba(10, 117, 117, .35);
  box-shadow: inset 3px 0 0 var(--teal);
}

.crew-day-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 850;
  color: #334155;
}

.crew-day-body {
  display: grid;
  gap: 10px;
}

.crew-day-schedules {
  display: grid;
  gap: 10px;
}

.crew-day-schedules[hidden] {
  display: none;
}

.crew-day-empty {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.crew-day-entry {
  display: grid;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.crew-day-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crew-day-entry-head strong {
  color: #111827;
  font-size: 0.92rem;
}

.crew-day-entry-head > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.crew-day-entry-grid label {
  min-width: 0;
}

.crew-day-entry-grid .span-2 {
  grid-column: 1 / -1;
}

.mini {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 0.78rem;
}

.mini.danger {
  color: #991b1b;
}

.weekday-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.weekday-picker legend {
  padding: 0 4px;
  color: var(--muted);
  font-weight: 800;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 7px;
  background: #eef8f8;
  color: #334155;
  font-size: 11px;
  white-space: nowrap;
}

.metric-pill strong {
  color: var(--teal-dark);
  margin-right: 4px;
}

.metric-mile-stack {
  display: grid;
  gap: 2px;
}

.metric-pill.mileage {
  justify-content: flex-start;
  gap: 4px;
  min-width: 112px;
  background: #eef6ff;
  color: #0b63d8;
  border: 1px solid #d9e8fb;
  font-size: 11px;
}

.metric-pill.mileage strong {
  color: #0b63d8;
  margin-right: 0;
}

.metric-pill.revenue {
  min-height: 28px;
  padding: 4px 12px;
  background: #e9f9ef;
  border: 1px solid #d3f0dd;
  color: #128247;
  font-size: 13px;
  font-weight: 850;
}

.metric-status-grid {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 4px 12px;
  align-items: center;
}

.metric-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #111827;
  font-size: 12px;
  white-space: nowrap;
}

.metric-status i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
}

.metric-status i.all-trips {
  background: #111827;
}

.metric-status i.completed {
  background: #64748b;
}

.metric-status i.will-call {
  background: #ead5ff;
}

.metric-status i.canceled {
  background: #b91c1c;
}

.metric-status i.on-time {
  background: var(--teal);
}

.metric-status i.delayed {
  background: #fbbf24;
}

.metric-status i.assigned {
  background: #2364aa;
}

.metric-menu {
  display: grid;
  place-items: center;
  width: 24px;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.board-tools {
  margin-bottom: 4px;
}

.driver-assignments {
  --driver-col-width: 228px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  transition: opacity .18s ease, transform .18s ease;
}

.driver-assignments.collapsed {
  --driver-col-width: 92px;
}

.sidebar h3,
.board-header h3,
.detail-title {
  margin: 0;
  font-size: 16px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(8, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.ops-metrics {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.audit-control-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border-color: #d8e4ef;
  background: #fbfcfe;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
}

.audit-control-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.audit-control-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: 0;
}

.audit-control-head p {
  margin: 0;
  max-width: 820px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.audit-control-metrics,
.audit-control-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}

.audit-control-details {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}

.audit-control-metrics span,
.audit-control-details span {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid #dde7f1;
  border-radius: 8px;
  background: #fff;
}

.audit-control-metrics small,
.audit-control-details small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.audit-control-metrics strong,
.audit-control-details strong {
  color: var(--ink);
  font-size: 19px;
  line-height: 1.15;
}

.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  min-height: 72px;
}

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

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.board {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid #e3e8f0;
  border-radius: 6px;
  background: #f6f8fb;
  max-height: calc(100vh - 135px);
}

.board-grid {
  position: relative;
  display: grid;
  grid-template-columns: 56px repeat(var(--driver-count), minmax(var(--driver-col-width), var(--driver-col-width)));
  min-width: calc(56px + var(--driver-count) * var(--driver-col-width));
  --time-row-height: 54px;
  transition: min-width .18s ease;
}

.time-gutter,
.driver-head,
.slot {
  border-right: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .22);
}

.time-gutter {
  position: sticky;
  left: 0;
  z-index: 8;
  background: #f6f8fb;
  padding: 3px 8px 0 4px;
  color: var(--muted);
  font-weight: 750;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.time-gutter.half-hour {
  color: #a1a8b3;
  font-size: 10px;
  font-weight: 700;
}

.time-gutter-head {
  top: 0;
  z-index: 11;
  background: #f6f8fb;
  border-right-color: transparent;
  border-bottom-color: transparent;
}

.current-time-line {
  position: absolute;
  top: var(--current-time-top);
  left: 0;
  right: 0;
  z-index: 12;
  height: 0;
  border-top: 1px solid #ff6b4a;
  pointer-events: none;
}

.current-time-line span {
  position: sticky;
  left: 3px;
  display: inline-block;
  transform: translateY(-50%);
  padding-right: 4px;
  background: #fff;
  color: #ff6b4a;
  font-size: 11px;
  font-weight: 750;
}

.driver-head {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 4px 6px;
  background: #fff;
  min-height: 0;
  box-shadow: inset 0 -2px 0 #d8dee8;
}

.driver-head strong,
.driver-head span {
  display: block;
}

.driver-head span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.driver-head.off-duty {
  background: #f8fafc;
  color: #64748b;
}

.driver-head.unavailable {
  background: #fff7ed;
}

.driver-head.sick {
  background: #fee2e2;
}

.driver-head .driver-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.driver-unit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 6px;
  margin-bottom: 3px;
}

.driver-head .driver-unit-chip,
.driver-head .driver-trip-count {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-head .driver-unit-chip {
  max-width: 122px;
  min-height: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.driver-head .driver-trip-count {
  flex: 0 0 auto;
  color: #475569;
  font-size: 10px;
  font-weight: 850;
}

.driver-head .driver-title strong {
  font-size: 12px;
}

.driver-head .driver-title .ghost {
  min-height: 26px;
  padding: 3px 6px;
  font-size: 11px;
}

.driver-menu-dot {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 22px;
  min-height: 26px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #0f172a;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.driver-menu-dot:hover,
.driver-menu-dot:focus-visible {
  background: #eef2f7;
  outline: none;
}

.driver-head.column-shrunk {
  padding-inline: 5px;
}

.driver-assignments.collapsed .driver-head {
  min-height: 78px;
  padding: 5px;
  overflow: hidden;
}

.driver-assignments.collapsed .driver-head,
.driver-assignments.collapsed .driver-head *,
.driver-assignments.collapsed .assigned-card,
.driver-assignments.collapsed .assigned-card * {
  min-width: 0;
}

.driver-assignments.collapsed .driver-title {
  gap: 4px;
}

.driver-assignments.collapsed .driver-unit-row {
  gap: 3px;
  margin-bottom: 2px;
}

.driver-assignments.collapsed .driver-head .driver-unit-chip {
  max-width: 48px;
  padding-inline: 4px;
  font-size: 9px;
}

.driver-assignments.collapsed .driver-head .driver-trip-count {
  max-width: 32px;
  font-size: 9px;
}

.driver-assignments.collapsed .driver-title .checkbox-row {
  gap: 3px;
}

.driver-assignments.collapsed .driver-title .ghost {
  width: 22px;
  min-height: 22px;
  padding: 0;
  font-size: 0;
  overflow: hidden;
  white-space: nowrap;
}

.driver-assignments.collapsed .driver-title .ghost::after {
  content: "...";
  font-size: 11px;
}

.driver-assignments.collapsed .driver-title strong,
.driver-assignments.collapsed .driver-revenue,
.driver-assignments.collapsed .driver-head-meta,
.driver-assignments.collapsed .driver-flag,
.driver-assignments.collapsed .assigned-card strong,
.driver-assignments.collapsed .assigned-card .trip-time,
.driver-assignments.collapsed .assigned-card .eta-strip,
.driver-assignments.collapsed .assigned-card .assigned-meta-row,
.driver-assignments.collapsed .assigned-card .assigned-tile-footer,
.driver-assignments.collapsed .assigned-card .trip-meta,
.driver-assignments.collapsed .status-strip .badge {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-assignments.collapsed .driver-title strong,
.driver-assignments.collapsed .driver-revenue {
  max-width: 58px;
}

.driver-assignments.collapsed .driver-head-meta {
  gap: 3px;
}

.driver-assignments.collapsed .driver-head-meta span {
  max-width: 58px;
  font-size: 9px;
}

.driver-assignments.collapsed .driver-head-flags {
  gap: 3px;
  margin-top: 3px;
}

.driver-assignments.collapsed .driver-flag {
  max-width: 68px;
  padding: 1px 4px;
  font-size: 8px;
}

.driver-assignments.collapsed .shift-editor {
  grid-template-columns: 1fr;
  gap: 3px;
  margin-top: 3px;
}

.driver-assignments.collapsed .vehicle-editor {
  margin-top: 3px;
}

.driver-assignments.collapsed .shift-editor label,
.driver-assignments.collapsed .vehicle-editor label {
  font-size: 9px;
}

.driver-assignments.collapsed .mini-select,
.driver-assignments.collapsed .mini-input {
  min-height: 22px;
  padding: 2px 4px;
  font-size: 10px;
}

.driver-assignments.collapsed .status-strip {
  gap: 3px;
  margin-top: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.driver-assignments.collapsed .status-strip .badge {
  max-width: 64px;
  padding: 2px 4px;
}

.driver-assignments.collapsed .slot {
  padding: 5px;
}

.driver-assignments.collapsed .assigned-card {
  gap: 3px;
  margin-bottom: 5px;
  padding: 5px;
  border-left-width: 3px;
}

.driver-assignments.collapsed .assigned-card .compact-check {
  gap: 3px;
}

.driver-assignments.collapsed .assigned-card .trip-select {
  width: 12px;
  height: 12px;
}

.driver-assignments.collapsed .assigned-card strong {
  font-size: 10px;
}

.driver-assignments.collapsed .assigned-card .trip-meta,
.driver-assignments.collapsed .assigned-card .trip-time,
.driver-assignments.collapsed .assigned-card .eta-strip,
.driver-assignments.collapsed .assigned-card .assigned-meta-row,
.driver-assignments.collapsed .assigned-card .assigned-tile-footer {
  font-size: 10px;
}

.driver-assignments.collapsed .multi-load-card {
  gap: 5px;
  padding: 5px;
}

.driver-assignments.collapsed .multi-load-header,
.driver-assignments.collapsed .multi-load-metrics,
.driver-assignments.collapsed .multi-load-trip-row {
  min-width: 0;
}

.driver-assignments.collapsed .multi-load-actions,
.driver-assignments.collapsed .multi-load-stops,
.driver-assignments.collapsed .multi-load-warnings {
  display: none;
}

.driver-assignments.collapsed .multi-load-trip-row {
  grid-template-columns: minmax(0, 1fr);
}

.driver-assignments.collapsed .multi-load-trip-row span,
.driver-assignments.collapsed .multi-load-trip-row select,
.driver-assignments.collapsed .multi-load-trip-row button {
  display: none;
}

.driver-revenue {
  margin-top: 1px;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 850;
}

.driver-head-meta,
.driver-head-flags {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  margin-top: 2px;
  overflow: hidden;
}

.driver-head-meta span {
  min-width: 0;
  max-width: 112px;
  margin-top: 0;
  color: #64748b;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-head-flags:empty {
  display: none;
}

.driver-flag {
  display: inline-flex;
  align-items: center;
  max-width: 120px;
  min-height: 16px;
  margin-top: 0;
  padding: 1px 5px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-flag.warn {
  background: #fef3c7;
  color: #92400e;
}

.driver-flag.danger {
  background: #fee2e2;
  color: #991b1b;
}

.driver-cancel-driver-badge {
  border: 1px solid #fecaca;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, .34);
  animation: driver-cancel-ack-pulse 1.15s ease-in-out infinite;
}

.mini-select,
.mini-input {
  min-height: 22px;
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 10px;
}

.shift-editor,
.vehicle-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-top: 3px;
}

.vehicle-editor {
  grid-template-columns: 1fr;
}

.shift-editor label,
.vehicle-editor label {
  gap: 3px;
  font-size: 9px;
  font-weight: 800;
  color: #475569;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.status-strip .badge {
  min-height: 16px;
  max-width: 86px;
  padding: 1px 5px;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-return-base-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 24px;
  margin-top: 4px;
  padding: 3px 7px;
  border: 1px solid rgba(15, 159, 154, .24);
  border-radius: 6px;
  background: rgba(15, 159, 154, .09);
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-return-base-chip:hover,
.driver-return-base-chip:focus-visible {
  background: rgba(15, 159, 154, .14);
  border-color: rgba(15, 118, 110, .34);
  outline: none;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  display: inline-block;
}

.status-dot.warn {
  background: var(--warn);
}

.status-dot.danger {
  background: var(--danger);
}

.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.bulk-bar .danger-action {
  border-color: rgba(220, 38, 38, .28);
  background: #fff5f5;
  color: #991b1b;
}

.bulk-bar .danger-action:hover,
.bulk-bar .danger-action:focus-visible {
  background: #fee2e2;
  color: #7f1d1d;
}

.vehicle-pool {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.vehicle-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  max-width: 260px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 4px 5px;
  cursor: grab;
}

.vehicle-chip .checkbox-row {
  flex: 0 0 auto;
  gap: 4px;
  white-space: nowrap;
}

.vehicle-chip span {
  min-width: 0;
  max-width: 120px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-chip .badge {
  flex: 0 0 auto;
  width: fit-content;
  min-height: 16px;
  padding: 1px 5px;
  font-size: 9px;
}

.trip-select {
  width: auto;
}

.slot {
  position: relative;
  box-sizing: border-box;
  height: var(--time-row-height);
  min-height: var(--time-row-height);
  padding: 4px;
  overflow: visible;
  background: transparent;
}

.slot.outside-shift {
  background: rgba(226, 232, 240, .46);
}

.slot.in-shift {
  background: rgba(255, 255, 255, .82);
}

.slot.drag-over {
  outline: 2px solid var(--teal);
  outline-offset: -3px;
  background: #edfafa;
}

.slot.drop-focus {
  animation: drop-slot-pulse 1.8s ease;
}

.trip-card.drop-focus {
  animation: drop-card-pulse 1.8s ease;
}

@keyframes drop-slot-pulse {
  0%, 72% {
    background: #ecfeff;
    outline: 2px solid var(--teal);
    outline-offset: -3px;
  }
  100% {
    background: #fff;
    outline: 0 solid transparent;
  }
}

@keyframes drop-card-pulse {
  0%, 72% {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .18), 0 8px 20px rgba(15, 23, 42, .14);
    transform: scale(1.015);
  }
  100% {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    transform: scale(1);
  }
}

.trip-card {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.unassigned-card {
  position: relative;
  container-type: inline-size;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 4px 8px;
  margin-bottom: 8px;
  padding: 10px 11px 10px 7px;
  border-color: #a855f7;
  border-radius: 6px;
  background: #f6ddff;
  box-shadow: none;
}

.unassigned-trip-select {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  position: static;
  z-index: 2;
  width: 14px;
  height: 14px;
  transform: none;
}

.unassigned-card-main {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: grid;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  align-items: center;
}

.unassigned-card .ride-title-row {
  grid-column: 1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  font-size: 13px;
}

.unassigned-card .ride-title-row strong {
  flex: 1 1 auto;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.08;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.trip-card-menu-dot {
  grid-column: 1;
  grid-row: 2 / span 2;
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 18px;
  min-height: 18px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #475569;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}

.trip-card-menu-dot:hover,
.trip-card-menu-dot:focus-visible {
  background: #eef8f8;
  color: var(--teal-dark);
  outline: none;
}

.trip-time-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #2f7fbd;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.unassigned-route {
  display: flex;
  align-items: center;
  grid-column: 1 / -1;
  gap: 5px;
  min-width: 0;
  color: #5f5870;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.unassigned-route span:not(.route-arrow),
.unassigned-route a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-route-address,
.trip-detail-route-link {
  color: inherit;
  text-decoration: none;
}

.dispatch-route-address[href],
.trip-detail-route-link {
  cursor: pointer;
}

.dispatch-route-address[href]:hover,
.dispatch-route-address[href]:focus,
.trip-detail-route-link:hover,
.trip-detail-route-link:focus {
  color: var(--teal-dark);
  text-decoration: underline;
}

.route-arrow {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.unassigned-address {
  grid-column: 1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  color: #64748b;
  font-size: clamp(12px, 1.15vw, 14px);
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.unassigned-address span:first-child {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unassigned-address.pickup span:first-child {
  white-space: nowrap;
}

.unassigned-address.dropoff span:first-child {
  white-space: nowrap;
}

.unassigned-card .trip-meta,
.unassigned-card .trip-badges,
.unassigned-card-actions {
  grid-column: 2;
}

.unassigned-card .trip-meta {
  display: none;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
}

.unassigned-card .trip-badges,
.unassigned-card-actions {
  display: none;
}

.assignment-lane {
  position: absolute;
  box-sizing: border-box;
  top: var(--pickup-offset, 0);
  left: calc(4px + var(--overlap-left, 0%));
  width: calc(var(--overlap-width, 100%) - 8px);
  height: max(var(--trip-duration, 30px), 30px);
  min-width: 0;
  z-index: 3;
  pointer-events: none;
}

.assigned-card {
  position: relative;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: start;
  gap: 2px;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 4px 5px 3px 6px;
  border-left: 3px solid #2364aa;
  border-top: 1px solid rgba(15, 23, 42, .06);
  border-right: 1px solid rgba(15, 23, 42, .06);
  border-bottom: 1px solid rgba(15, 23, 42, .06);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background: #cfe5ff;
  box-shadow: none;
  overflow: hidden;
  pointer-events: auto;
}

.assigned-card > * {
  position: relative;
  z-index: 2;
}

.assigned-card.multiload-overlap {
  border-right-color: rgba(20, 184, 166, .42);
  box-shadow: inset -2px 0 0 rgba(20, 184, 166, .28);
}

.travel-shade {
  position: absolute;
  display: flex;
  align-items: flex-end;
  left: 0;
  right: 0;
  top: var(--travel-shade-top, 0);
  z-index: 1;
  height: var(--travel-shade-height, 0);
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0 4px 4px;
  border: 0;
  border-left: 2px solid rgba(37, 99, 235, .18);
  border-radius: 5px 5px 0 0;
  background: rgba(59, 130, 246, .07);
  color: #475569;
  cursor: pointer;
  font: inherit;
  pointer-events: auto;
  text-align: left;
}

.travel-shade.late {
  border-left-color: rgba(220, 38, 38, .28);
  background: rgba(248, 113, 113, .11);
}

.travel-shade:hover,
.travel-shade:focus-visible {
  background: rgba(96, 165, 250, .16);
  outline: 1px solid rgba(37, 99, 235, .28);
  outline-offset: -1px;
}

.travel-shade.late:hover,
.travel-shade.late:focus-visible {
  background: rgba(248, 113, 113, .16);
  outline-color: rgba(220, 38, 38, .26);
}

.return-base-shade {
  top: calc(100% + 2px);
  align-items: flex-start;
  z-index: 0;
  height: var(--base-return-shade-height, 0);
  padding: 4px 4px 0;
  border-left-color: rgba(15, 118, 110, .18);
  border-radius: 0 0 5px 5px;
  background: rgba(15, 118, 110, .06);
  color: #0f766e;
}

.return-base-shade:hover,
.return-base-shade:focus-visible {
  background: rgba(15, 159, 154, .15);
  outline-color: rgba(15, 118, 110, .28);
}

.eta-shade-label {
  display: block;
  max-width: 100%;
  padding: 1px 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .48);
  color: #334155;
  font-size: 8.5px;
  font-weight: 850;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assigned-card.eta-good {
  background: #effaf3;
  border-left-color: #22c55e;
}

.assigned-card.eta-close {
  background: #fff9db;
  border-left-color: #eab308;
}

.assigned-card.eta-late {
  background: #fff0dd;
  border-left-color: #f97316;
}

.assigned-card.eta-critical {
  background: #ffe9e9;
  border-left-color: #dc2626;
}

.assigned-card.eta-unknown {
  background: #f1f5f9;
  border-left-color: #94a3b8;
}

.trip-card.status-assigned {
  background: #dbeafe;
  border-left-color: #2563eb;
}

.trip-card.status-enroute,
.trip-card.status-on-time {
  background: #dcfce7;
  border-left-color: #16a34a;
}

.trip-card.status-completed {
  background: #f1f5f9;
  border-left-color: #64748b;
  color: #475569;
}

.trip-card.status-delayed,
.trip-card.status-will-call {
  background: #fff9db;
  border-left-color: #eab308;
}

.trip-card.status-canceled {
  background: #fecaca;
  border-left-color: #b91c1c;
  color: #7f1d1d;
}

.assigned-card.status-canceled {
  border-left-width: 4px;
  border-top-color: #fca5a5;
  border-right-color: #fca5a5;
  border-bottom-color: #fca5a5;
  padding: 2px 5px;
}

.assigned-card.status-canceled .trip-appt-time,
.assigned-card.status-canceled .assigned-tile-footer,
.assigned-card.status-canceled .tile-warning {
  display: none;
}

.assigned-card.status-canceled .ride-title-row {
  min-height: 16px;
}

.assigned-card.status-canceled strong,
.assigned-card.status-canceled .trip-time {
  font-size: 10px;
  line-height: 1.05;
}

.assignment-lane:has(.assigned-card.status-completed) > .travel-shade,
.assignment-lane:has(.assigned-card.status-canceled) > .travel-shade {
  display: none;
}

.unassigned-card.status-assigned,
.unassigned-card.status-enroute,
.unassigned-card.status-on-time,
.unassigned-card.status-completed,
.unassigned-card.status-delayed,
.unassigned-card.status-will-call {
  background: #f6ddff;
  border-color: #a855f7;
  color: #111827;
}

.unassigned-card.status-canceled {
  background: #fee2e2;
  border-color: #ef4444;
  border-left: 4px solid #b91c1c;
  color: #7f1d1d;
}

.assignment-card-moving {
  animation: assignment-card-land .38s ease-out;
  outline: 2px solid rgba(20, 184, 166, .75);
}

@keyframes assignment-card-land {
  from {
    opacity: .35;
    transform: translateY(-8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.assignment-collapsed {
  gap: 2px;
  padding: 5px 6px;
}

.assignment-collapsed .assignment-detail {
  display: none;
}

.assigned-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 15px;
  padding-right: 20px;
}

.assigned-card strong {
  color: #173f5f;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.assigned-card[data-overlap-count="2"] strong,
.assigned-card[data-overlap-count="3"] strong {
  font-size: 11px;
}

.assigned-card .trip-meta {
  font-size: 10px;
  color: #315b78;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assigned-card .trip-time {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  color: #0f4a6b;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.assigned-status-pill {
  flex: 0 0 auto;
  max-width: 72px;
  padding: 1px 4px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  color: #334155;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assigned-status-pill.assigned {
  border-color: rgba(37, 99, 235, .22);
  background: rgba(219, 234, 254, .8);
  color: #1d4ed8;
}

.assigned-status-pill.on-time {
  border-color: rgba(22, 163, 74, .2);
  background: rgba(220, 252, 231, .84);
  color: #166534;
}

.assigned-status-pill.warn {
  border-color: rgba(234, 179, 8, .24);
  background: rgba(254, 249, 195, .86);
  color: #854d0e;
}

.assigned-status-pill.danger {
  border-color: rgba(220, 38, 38, .22);
  background: rgba(254, 226, 226, .86);
  color: #991b1b;
}

.assigned-card .trip-appt-time {
  max-width: 100%;
  color: #475569;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assigned-route-compact {
  display: grid;
  gap: 1px;
  min-width: 0;
  max-height: 27px;
  color: #334155;
  font-size: 9px;
  font-weight: 760;
  line-height: 1.15;
  overflow: hidden;
}

.assigned-route-compact span,
.assigned-route-compact a {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assigned-route-compact b {
  color: #173f5f;
  font-size: 8px;
  font-weight: 950;
}

.assigned-meta-row,
.assigned-tile-footer {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
  line-height: 1;
}

.assigned-tile-footer {
  align-self: end;
  justify-content: space-between;
}

.external-id-chip {
  display: inline-block;
  max-width: 100%;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .62);
  color: #475569;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eta-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1px 4px;
  width: 100%;
  margin: 0;
  border: 0;
  color: #334155;
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.12;
  text-align: left;
}

.assigned-card .eta-strip {
  flex: 1 1 auto;
  max-width: 100%;
  max-height: 16px;
  overflow: hidden;
  padding: 1px 3px;
  border: 1px solid rgba(15, 23, 42, .07);
  border-radius: 4px;
  background: rgba(255, 255, 255, .42);
  color: #334155;
}

.assigned-card .eta-strip:hover,
.assigned-card .eta-strip:focus-visible {
  background: rgba(255, 255, 255, .68);
  outline: 1px solid rgba(37, 99, 235, .28);
  outline-offset: -1px;
}

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

.eta-strip-good {
  color: #166534;
}

.eta-strip-close {
  color: #854d0e;
}

.eta-strip-late {
  color: #9a3412;
}

.eta-strip-critical {
  color: #b91c1c;
}

.eta-strip-unknown {
  color: #475569;
}

.assigned-card[data-overlap-count="2"],
.assigned-card[data-overlap-count="3"],
.assigned-card[data-overlap-count="4"] {
  padding-right: 4px;
  padding-left: 5px;
}

.assigned-card[data-overlap-count="2"] .eta-strip,
.assigned-card[data-overlap-count="3"] .eta-strip,
.assigned-card[data-overlap-count="4"] .eta-strip {
  max-height: 15px;
  flex-wrap: nowrap;
  font-size: 8px;
  white-space: nowrap;
}

.assigned-card[data-overlap-count="2"] .eta-strip span:nth-child(3),
.assigned-card[data-overlap-count="3"] .eta-strip span:nth-child(3),
.assigned-card[data-overlap-count="4"] .eta-strip span:nth-child(3) {
  display: none;
}

.assigned-card[data-overlap-count="2"] .eta-strip span,
.assigned-card[data-overlap-count="3"] .eta-strip span,
.assigned-card[data-overlap-count="4"] .eta-strip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assigned-card[data-overlap-count="2"] .external-id-chip,
.assigned-card[data-overlap-count="3"] .external-id-chip,
.assigned-card[data-overlap-count="4"] .external-id-chip {
  max-width: 68px;
}

.assigned-card[data-overlap-count="3"] .assigned-meta-row,
.assigned-card[data-overlap-count="4"] .assigned-meta-row {
  display: none;
}

.assigned-card[data-overlap-count="2"] .assigned-route-compact,
.assigned-card[data-overlap-count="3"] .assigned-route-compact,
.assigned-card[data-overlap-count="4"] .assigned-route-compact {
  max-height: 13px;
  font-size: 8px;
}

.assigned-card[data-overlap-count="3"] .assigned-route-compact,
.assigned-card[data-overlap-count="4"] .assigned-route-compact {
  display: none;
}

.assigned-tile-compact {
  grid-template-rows: auto auto auto;
}

.assigned-tile-compact .assigned-route-compact,
.assigned-tile-compact .assigned-tile-footer,
.assigned-tile-compact .assigned-status-pill {
  display: none;
}

.assigned-tile-roomy.assignment-collapsed .assignment-detail {
  display: grid;
}

.assigned-tile-roomy.assignment-collapsed .assigned-route-compact {
  display: grid;
  gap: 3px;
  max-height: none;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.18;
}

.assigned-tile-roomy.assignment-collapsed .assigned-route-compact span,
.assigned-tile-roomy.assignment-collapsed .assigned-route-compact a {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.assigned-tile-tiny {
  grid-template-rows: auto auto;
  gap: 1px;
  padding-top: 3px;
  padding-bottom: 2px;
}

.assigned-tile-tiny .assigned-route-compact,
.assigned-tile-tiny .assigned-tile-footer,
.assigned-tile-tiny .assigned-status-pill {
  display: none;
}

.compact-check {
  width: 100%;
}

.ride-title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.ride-title-row input {
  width: auto;
}

.ride-title-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ride-mobility-label {
  justify-self: end;
  max-width: 44%;
  overflow: hidden;
  color: #6d28d9;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-time {
  color: #315b78;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
}

.mobility-token {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: auto;
  border: 1px solid #35506f;
  border-radius: 999px;
  background: #eef6ff;
  color: #173f5f;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.assigned-card .ride-title-row {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px;
  min-height: 16px;
  padding-right: 14px;
}

.assigned-card .mobility-token {
  position: absolute;
  top: -1px;
  right: -1px;
  z-index: 5;
  min-width: 18px;
  height: 18px;
  margin-left: 0;
  border-width: 1.5px;
  background: #eef6ff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .18);
  font-size: 9px;
}

.assigned-overlap-markers {
  position: absolute;
  right: -4px;
  top: 20px;
  z-index: 8;
  display: grid;
  gap: 2px;
  pointer-events: auto;
}

.overlap-marker {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  min-height: 19px;
  padding: 0;
  border: 1px solid #0f766e;
  border-radius: 999px;
  background: #e0f7fb;
  color: #17445f;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .22);
  cursor: pointer;
  font-size: 8px;
  font-weight: 950;
  line-height: 1;
}

.overlap-marker.current {
  border-color: #2563eb;
  background: #dbeafe;
}

.overlap-marker:hover,
.overlap-marker:focus-visible {
  outline: 2px solid rgba(20, 184, 166, .35);
  outline-offset: 1px;
}

.unassigned-card .mobility-token {
  position: static;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  min-width: 0;
  height: auto;
  max-width: 96px;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  background: #faf5ff;
  color: #6d28d9;
  box-shadow: none;
  font-size: 10px;
  font-weight: 700;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@container (max-width: 300px) {
  .unassigned-card-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .unassigned-card .mobility-token {
    grid-column: 1;
    grid-row: auto;
    justify-self: end;
  }

  .unassigned-address,
  .unassigned-route {
    grid-column: 1;
  }
}

.mobility-ambulatory {
  border-color: #15803d;
  background: #dcfce7;
  color: #166534;
}

.mobility-wheelchair {
  border-color: #315b78;
  background: #dcecff;
  color: #173f5f;
}

.mobility-wheelchair-xl {
  border-color: #7c3aed;
  background: #f3e8ff;
  color: #5b21b6;
}

.mobility-stretcher {
  border-color: #b91c1c;
  background: #fee2e2;
  color: #991b1b;
}

.compact-actions {
  gap: 4px;
}

.assigned-card .compact-actions {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: none;
  align-items: center;
  width: min(190px, calc(100% - 8px));
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
}

.assigned-card:hover .compact-actions,
.assigned-card:focus-within .compact-actions {
  display: flex;
}

.compact-actions .ghost {
  min-height: 22px;
  padding: 2px 5px;
  font-size: 10px;
}

.multi-load-card {
  display: grid;
  gap: 8px;
  margin-top: var(--pickup-offset, 0);
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid #7bb8de;
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  background: #eef9fb;
  box-shadow: inset 0 0 0 1px rgba(15, 159, 154, .12);
}

.multi-load-lane .multi-load-card {
  height: 100%;
  margin-top: 0;
  margin-bottom: 0;
  overflow: hidden;
  pointer-events: auto;
}

.multi-load-header,
.multi-load-metrics,
.multi-load-trip-row,
.multi-load-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.multi-load-header {
  justify-content: space-between;
}

.multi-load-header strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #17445f;
}

.multi-load-actions {
  display: flex;
  gap: 4px;
}

.multi-load-actions .ghost,
.multi-load-trip-row .ghost {
  min-height: 24px;
  padding: 3px 6px;
  font-size: 10px;
}

.multi-load-metrics {
  color: #315b78;
  font-size: 10px;
}

.multi-load-metrics span {
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
}

.risk-warn {
  color: var(--warn);
  font-weight: 850;
}

.risk-clear {
  color: var(--success);
  font-weight: 850;
}

.multi-load-stops {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  font-size: 11px;
  color: #173f5f;
}

.multi-load-stops li small {
  display: block;
  color: var(--muted);
}

.multi-load-trips {
  display: grid;
  gap: 5px;
}

.multi-load-trip-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto minmax(86px, .8fr) auto;
  gap: 5px;
  align-items: center;
  padding: 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .78);
  font-size: 10px;
}

.multi-load-trip-row strong,
.multi-load-trip-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-load-warnings,
.multi-load-warning-list {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.badge.multiload {
  background: #dff7f6;
  color: var(--teal-dark);
}

.multi-load-editor {
  display: grid;
  gap: 12px;
}

.multi-load-choice {
  display: grid;
  gap: 18px;
  padding: 10px 18px 2px;
}

.multi-load-choice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.multi-load-choice-top strong {
  display: block;
  color: #111827;
  font-size: 24px;
}

.multi-load-choice-top span {
  color: var(--muted);
  font-size: 13px;
}

.wizard-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 22px;
  font-style: normal;
  white-space: nowrap;
}

.wizard-progress span {
  display: block;
  width: 110px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal) 0 50%, #e5e7eb 50% 100%);
}

.wizard-progress em {
  font-style: normal;
}

.multi-load-choice-icon {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 74px;
  height: 74px;
  border: 10px solid #dff7f6;
  border-radius: 999px;
  background: #f0fffd;
  color: var(--teal-dark);
  font-size: 18px;
  font-weight: 900;
}

.multi-load-choice h3 {
  margin: 0;
  color: #111827;
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 500;
  text-align: center;
}

.multi-load-choice-list {
  display: grid;
  gap: 18px;
}

.multi-load-choice-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px 16px;
  align-items: center;
}

.multi-load-choice-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .06);
}

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

.choice-title strong {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-load-choice-card p {
  margin: 0;
  color: #64748b;
  font-size: 16px;
  line-height: 1.45;
}

.multi-load-choice-card small,
.choice-helper {
  color: var(--muted);
  font-size: 13px;
}

.choice-helper {
  grid-column: 2;
  margin-top: -8px;
  padding-left: 14px;
}

.choice-check {
  display: grid;
  place-items: center;
}

.choice-check input {
  width: 22px;
  height: 22px;
}

.muted-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.multi-load-order-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.multi-load-order-list li {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) minmax(180px, 1.5fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.multi-load-order-list li.dragging {
  opacity: .55;
}

.stop-drag-handle {
  color: var(--muted);
  cursor: grab;
  font-weight: 850;
}

.no-schedule {
  min-height: 430px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  text-align: center;
  color: var(--muted);
}

.no-schedule h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 18px;
}

.no-schedule p {
  margin: 0;
}

.trip-card[draggable="true"] {
  cursor: grab;
}

.trip-card strong {
  display: block;
  font-size: 14px;
}

.trip-meta,
.trip-badges,
.small-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.unassigned-card .trip-badges,
.unassigned-card .unassigned-card-actions {
  display: none;
}

.assigned-card .trip-badges {
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

.assigned-card .trip-badges .badge {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-warning {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #b91c1c;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.driver-cancel-ack-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 8px);
  min-height: 20px;
  padding: 3px 7px;
  border: 1px solid #b91c1c;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, .38);
  animation: driver-cancel-ack-pulse 1.15s ease-in-out infinite;
}

.driver-cancel-ack-badge.detail,
.unassigned-card-main > .driver-cancel-ack-badge {
  position: static;
  justify-self: start;
  width: fit-content;
  min-height: 24px;
  font-size: 11px;
}

.driver-cancel-ack-section {
  border-color: #fecaca;
  background: #fff7f7;
}

@keyframes driver-cancel-ack-pulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, .34);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: 0 0 0 5px rgba(220, 38, 38, 0);
  }
}

.trip-meta {
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef2f7;
  color: #344054;
  font-size: 11px;
  font-weight: 750;
}

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

.badge.success {
  background: #eaf8ef;
  color: var(--success);
}

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

.badge.assigned {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge.on-time,
.badge.completed {
  background: #dcfce7;
  color: #166534;
}

.badge.delayed,
.badge.will-call {
  background: #fef3c7;
  color: #92400e;
}

.badge.cancelled,
.badge.canceled,
.badge.no-show {
  background: #fee2e2;
  color: #b91c1c;
}

.address-line {
  font-size: 12px;
  color: #405168;
  line-height: 1.35;
}

.admin-layout {
  display: grid;
  gap: 12px;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

td {
  font-size: 13px;
}

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

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

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.modal:has(.user-account-form) {
  width: min(620px, 100%);
}

.modal:has(.driver-profile-form) {
  width: min(520px, 100%);
}

.form-intro {
  display: grid;
  gap: 4px;
}

.form-intro h3,
.form-intro p {
  margin: 0;
}

.form-intro h3 {
  font-size: 14px;
  color: #475569;
}

.form-intro p {
  color: var(--muted);
  font-size: 13px;
}

.invite-guidance {
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #eff6ff;
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
  padding: 10px 12px;
}

.temp-password-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  background: #eef2ff;
  padding: 12px;
}

.temp-password-panel > div:first-child {
  display: grid;
  gap: 4px;
}

.temp-password-panel strong {
  color: #1f2937;
  font-size: 13px;
}

.temp-password-panel span,
.temp-password-panel small {
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
}

.temp-password-result {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  border-top: 1px solid rgba(99, 102, 241, 0.28);
  padding-top: 10px;
}

.temp-password-result code {
  width: fit-content;
  border: 1px solid #a5b4fc;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 8px 10px;
}

.driver-profile-link-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  background: #eef2ff;
  padding: 12px;
}

.driver-profile-link-panel > div:first-child {
  display: grid;
  gap: 4px;
}

.driver-profile-link-panel strong {
  color: #1f2937;
  font-size: 13px;
}

.driver-profile-link-panel span {
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
}

.danger-text {
  color: var(--danger);
}

.wizard-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wizard-heading strong {
  font-size: 18px;
  color: #111827;
}

.wizard-heading span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.wizard-heading b {
  display: inline-block;
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.driver-profile-form h4 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 14px;
}

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

.skill-option {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: #334155;
  font-weight: 700;
}

.skill-option input {
  width: auto;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  font-weight: 700;
}

.checkbox-row input {
  width: auto;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: start center;
  overflow-y: auto;
  padding: 32px 16px;
  background: rgba(15, 23, 42, 0.45);
}

.side-panel-root {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
}

.side-panel-root:not(.hidden) {
  pointer-events: auto;
}

.side-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
}

.side-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(440px, 100vw);
  height: 100%;
  overflow: auto;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.trip-detail-panel {
  top: 12px;
  left: 12px;
  right: auto;
  width: min(420px, calc(100vw - 24px));
  height: auto;
  max-height: calc(100vh - 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.trip-detail-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 8px;
  background: #fff;
  border-bottom: 0;
}

.trip-detail-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #111827;
}

.trip-detail-title-row strong {
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1.15;
}

.trip-detail-menu-button {
  display: grid;
  place-items: center;
  width: 28px;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 22px;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color .12s ease, color .12s ease;
}

.trip-detail-menu-button:hover,
.trip-detail-menu-button:focus-visible {
  background: #eef8f8;
  color: var(--teal-dark);
  outline: none;
}

.trip-detail-menu {
  position: fixed;
  top: 44px;
  left: min(270px, calc(100vw - 286px));
  z-index: 140;
  width: 278px;
  padding: 6px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .18);
  overflow: visible;
}

.trip-detail-menu-item {
  position: relative;
}

.trip-detail-menu button,
.trip-detail-submenu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 30px;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease, padding-left .12s ease;
}

.trip-detail-submenu {
  position: absolute;
  top: -6px;
  left: calc(100% - 2px);
  display: none;
  width: 224px;
  max-height: min(430px, calc(100vh - 72px));
  overflow-y: auto;
  padding: 6px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .18);
}

.trip-detail-menu-item.has-submenu:hover > .trip-detail-submenu,
.trip-detail-menu-item.has-submenu:focus-within > .trip-detail-submenu {
  display: block;
}

.trip-detail-menu-item.has-submenu:hover > .trip-detail-menu-row,
.trip-detail-menu button:hover,
.trip-detail-menu button:focus-visible,
.trip-detail-submenu button:hover,
.trip-detail-submenu button:focus-visible {
  background: #eef8f8;
  color: var(--teal-dark);
  padding-left: 16px;
  outline: none;
}

.trip-detail-body {
  padding: 0 18px 18px;
}

.trip-detail-section {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.trip-detail-section h4 {
  margin: 0 0 5px;
  color: #050505;
  font-size: 14px;
}

.trip-detail-section p {
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.35;
}

.trip-detail-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.trip-summary-panel {
  display: flex;
  flex-direction: column;
}

.trip-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 18px 10px;
}

.trip-summary-meta span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.trip-timeline-list {
  display: grid;
  gap: 0;
  overflow: auto;
  padding: 0 12px 12px;
}

.trip-timeline-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.trip-timeline-item strong {
  display: block;
  color: #111827;
  font-size: 12px;
}

.trip-timeline-item p {
  margin: 2px 0 0;
  color: #64748b;
  line-height: 1.25;
  white-space: pre-wrap;
}

.trip-timeline-item time {
  color: #475569;
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}

.trip-timeline-dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 999px;
  background: #3b82f6;
}

.trip-timeline-item.status .trip-timeline-dot {
  background: #7c3aed;
}

.trip-timeline-item.wait .trip-timeline-dot {
  background: #f59e0b;
}

.trip-timeline-item.notes .trip-timeline-dot {
  background: #14b8a6;
}

.trip-timeline-item.audit .trip-timeline-dot {
  background: #64748b;
}

.trip-summary-footer {
  padding: 10px 18px 14px;
  border-top: 1px solid var(--line);
}

.side-panel header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  background: var(--lavender);
  border-bottom: 1px solid #c8bced;
}

.side-panel-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.side-panel.trip-detail-panel .trip-detail-header {
  padding: 14px 18px 8px;
  background: #fff;
  border-bottom: 0;
}

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

.detail-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.detail-line span:first-child {
  color: var(--muted);
  font-weight: 750;
}

.detail-line.stacked {
  display: grid;
  gap: 4px;
}

.detail-line.stacked strong {
  line-height: 1.35;
}

.modal:has(.eta-detail-popup) {
  width: min(560px, 100%);
}

.eta-detail-popup {
  display: grid;
  gap: 12px;
}

.eta-warning-box {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff1f2;
  color: #7f1d1d;
  font-size: 13px;
}

.eta-warning-box span {
  color: #991b1b;
}

.eta-popover-root {
  position: fixed;
  inset: 0;
  z-index: 135;
  pointer-events: none;
}

.eta-mini-popover {
  position: fixed;
  width: max-content;
  min-width: 260px;
  max-width: min(420px, calc(100vw - 24px));
  padding: 18px 22px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .16);
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  pointer-events: auto;
}

.eta-mini-popover p {
  margin: 0;
  white-space: nowrap;
}

.eta-mini-popover p + p {
  margin-top: 10px;
}

.eta-mini-popover strong {
  font-weight: 900;
}

.eta-mini-popover.warning {
  border-color: rgba(248, 113, 113, .28);
}

.eta-mini-popover.base-return {
  border-color: rgba(15, 159, 154, .24);
  background: #f7fdfc;
}

.eta-mini-popover.base-return .eta-mini-caret {
  border-color: rgba(15, 159, 154, .24);
  background: #f7fdfc;
}

.eta-mini-warning {
  color: #991b1b;
}

.eta-mini-caret {
  position: absolute;
  left: var(--eta-caret-left, 50%);
  bottom: -8px;
  width: 16px;
  height: 16px;
  border-right: 1px solid rgba(226, 232, 240, .9);
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.eta-mini-popover.below .eta-mini-caret {
  top: -8px;
  bottom: auto;
  border: 0;
  border-left: 1px solid rgba(226, 232, 240, .9);
  border-top: 1px solid rgba(226, 232, 240, .9);
}

.eta-mini-popover.warning .eta-mini-caret {
  border-color: rgba(248, 113, 113, .28);
}

.context-menu-root {
  position: fixed;
  z-index: 130;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 6px;
  overflow: visible;
}

.context-menu-item {
  position: relative;
}

.context-menu-root button,
.context-submenu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 32px;
  text-align: left;
  border-radius: 5px;
  padding: 7px 9px;
  background: transparent;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease, padding-left .12s ease;
}

.context-submenu {
  position: absolute;
  top: -6px;
  left: calc(100% - 2px);
  display: none;
  width: 230px;
  max-height: min(420px, calc(100vh - 72px));
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .18);
}

.context-menu-item.has-submenu:hover > .context-submenu,
.context-menu-item.has-submenu:focus-within > .context-submenu,
.context-menu-item.has-submenu.is-open > .context-submenu {
  display: block;
}

.context-menu-item.has-submenu:hover > .context-menu-row,
.context-menu-item.has-submenu.is-open > .context-menu-row,
.context-menu-root button:hover,
.context-menu-root button:focus-visible,
.context-submenu button:hover,
.context-submenu button:focus-visible {
  background: #eef8f8;
  color: var(--teal-dark);
  padding-left: 13px;
  outline: none;
}

.submenu-arrow {
  color: #111827;
  font-size: 18px;
  line-height: 1;
}

.modal {
  width: min(980px, 100%);
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

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

.modal-body {
  padding: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.bulk-delete-ride-list {
  display: grid;
  gap: 10px;
  max-height: min(44vh, 420px);
  overflow: auto;
  padding-right: 4px;
}

.bulk-delete-ride {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr);
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.bulk-delete-ride div {
  display: grid;
  gap: 4px;
}

.bulk-delete-ride span {
  color: #64748b;
  font-size: 12px;
}

.modal-root:has(.add-trip-form),
.modal-root:has(.passenger-form) {
  place-items: stretch;
  padding: 0;
}

.modal:has(.add-trip-form),
.modal:has(.passenger-form) {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  border-radius: 0;
}

.modal:has(.add-trip-form) .modal-header,
.modal:has(.passenger-form) .modal-header {
  display: none;
}

.modal:has(.add-trip-form) .modal-body,
.modal:has(.passenger-form) .modal-body {
  flex: 1;
  overflow: auto;
  padding: 14px 18px 84px;
}

.modal:has(.add-trip-form) .modal-footer,
.modal:has(.passenger-form) .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 4;
  align-items: center;
  background: #fff;
  box-shadow: 0 -8px 20px rgba(15, 23, 42, .06);
}

.passenger-delete-action {
  margin-right: auto;
}

.add-trip-form,
.passenger-form {
  display: grid;
  gap: 12px;
}

.add-trip-heading h2,
.passenger-form-heading h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 1.1;
}

.passenger-form-heading {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
}

.passenger-form-heading p,
.passenger-form-heading span {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
}

.trip-form-section {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.trip-form-section-payer {
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 560px);
  align-items: start;
}

.trip-request-row {
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr) minmax(170px, 340px);
}

.trip-field,
.passenger-field,
.trip-toggle-block,
.trip-switch,
.trip-stepper,
.passenger-toggle-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #4b5563;
  font-size: 13px;
  font-weight: 750;
}

.trip-field input,
.trip-field select,
.trip-field textarea,
.passenger-field input,
.passenger-field select,
.passenger-field textarea {
  min-width: 0;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
}

.trip-field textarea {
  min-height: 34px;
  max-height: 68px;
  resize: vertical;
}

.passenger-field textarea {
  min-height: 72px;
  resize: vertical;
}

.trip-side-button,
.trip-leg-actions button,
.trip-footer-actions span {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafc;
  color: #374151;
  font-weight: 800;
}

.trip-side-button {
  padding: 7px 12px;
  white-space: nowrap;
}

.trip-side-button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.passenger-search-field {
  position: relative;
}

.passenger-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 12;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.passenger-search-results button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: #fff;
  color: #111827;
  text-align: left;
  cursor: pointer;
}

.passenger-search-results button:hover,
.passenger-search-results button:focus-visible {
  background: #eef8f8;
  outline: none;
}

.passenger-search-results span {
  color: #64748b;
  font-size: 12px;
}

.trip-options-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(140px, 1fr) minmax(180px, 1.35fr) repeat(6, minmax(104px, auto));
  gap: 8px;
  align-items: end;
}

.trip-field-wide-sm {
  min-width: 180px;
}

.trip-toggle-block small,
.passenger-toggle-field small {
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
}

.switch-control {
  display: inline-flex;
  align-items: center;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #cbd5e1;
  padding: 2px;
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-control span {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  transition: transform .16s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .18);
}

.switch-control input:checked + span {
  transform: translateX(14px);
}

.switch-control:has(input:checked) {
  background: var(--teal);
}

.trip-switch {
  align-content: start;
  justify-items: start;
}

.trip-switch.compact {
  align-items: end;
}

.trip-stepper span {
  display: grid;
  grid-template-columns: 28px 52px 28px;
  align-items: center;
  gap: 4px;
}

.trip-stepper button {
  min-height: 28px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
}

.trip-stepper input {
  min-height: 30px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-weight: 800;
}

.trip-leg-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--teal);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(20, 184, 166, .12);
}

.trip-leg-main {
  display: grid;
  grid-template-columns:
    minmax(130px, 160px)
    minmax(150px, 185px)
    minmax(260px, 1.15fr)
    40px
    minmax(260px, 1.05fr)
    44px
    minmax(178px, 240px);
  grid-template-areas:
    "will date notes notes price money ."
    "pickup pickup pickup pickupPin pickupDetails pickupDetails pickupTime"
    "pickupCompare pickupCompare pickupCompare pickupCompare pickupCompare pickupCompare pickupCompare"
    "dropoff dropoff dropoff dropoffPin dropoffDetails dropoffDetails appointment"
    "dropoffCompare dropoffCompare dropoffCompare dropoffCompare dropoffCompare dropoffCompare dropoffCompare"
    "tags tags tags tags tags tags tags";
  gap: 8px;
  align-items: end;
}

.trip-inline-toggle {
  display: grid;
  gap: 5px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 750;
}

.trip-notes-field {
  grid-area: notes;
}

.trip-address-field {
  min-width: 0;
}

.trip-inline-toggle {
  grid-area: will;
}

.trip-date-field {
  grid-area: date;
}

.trip-price-field {
  grid-area: price;
}

.trip-money-button {
  grid-area: money;
}

.trip-pickup-address {
  grid-area: pickup;
}

.trip-dropoff-address {
  grid-area: dropoff;
}

.trip-pickup-compare {
  grid-area: pickupCompare;
}

.trip-dropoff-compare {
  grid-area: dropoffCompare;
}

.trip-pickup-pin {
  grid-area: pickupPin;
}

.trip-dropoff-pin {
  grid-area: dropoffPin;
}

.trip-pickup-details {
  grid-area: pickupDetails;
}

.trip-dropoff-details {
  grid-area: dropoffDetails;
}

.trip-pickup-time {
  grid-area: pickupTime;
}

.trip-appointment-time {
  grid-area: appointment;
}

.trip-time-field {
  min-width: 178px;
}

.assigned-time-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.assigned-time-status > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assigned-time-status .badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  font-size: 10px;
}

.trip-time-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
}

.trip-recalculate-pickup {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
  cursor: pointer;
}

.trip-recalculate-pickup:disabled {
  cursor: wait;
  opacity: .65;
}

.auto-pickup-note {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 650;
}

.auto-pickup-note.success {
  color: #047857;
}

.auto-pickup-note.warn,
.auto-pickup-note.manual {
  color: #b45309;
}

.auto-pickup-note.loading {
  color: #2563eb;
}

.trip-tags-field {
  grid-area: tags;
}

.trip-pin-icon,
.trip-money-button {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid #bde1df;
  border-radius: 6px;
  color: #475569;
}

.trip-money-button {
  background: #fff;
}

.trip-leg-actions {
  display: grid;
  gap: 8px;
  align-content: start;
}

.trip-leg-actions button {
  padding: 7px 10px;
}

.trip-address-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  margin: -2px 0 2px;
  padding: 9px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.trip-address-compare span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.trip-address-compare small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.trip-address-compare b {
  color: #172554;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  word-break: break-word;
}

.trip-address-compare div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trip-address-compare button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.trip-delete-leg {
  color: #dc2626 !important;
  background: #fff8f8 !important;
  border-color: #fecaca !important;
}

.trip-footer-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.trip-action-toggle {
  position: relative;
  display: block;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-weight: 800;
  text-align: center;
  outline: none;
}

.trip-action-toggle:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 159, 154, 0.18);
}

.trip-action-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.trip-action-toggle span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 12px;
  cursor: pointer;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.trip-action-toggle.selected {
  border-color: #99f6e4;
  background: #ecfeff;
  color: var(--teal-dark);
}

.trip-option-review {
  display: none;
}

.trip-option-review.active {
  display: grid;
  gap: 12px;
}

.trip-linked-leg-card {
  background: #fff;
}

.trip-linked-leg-card.return,
.trip-linked-leg-card.additional {
  border-color: #14b8a6;
  box-shadow: 0 2px 8px rgba(20, 184, 166, .12);
}

.trip-linked-leg-card.will-call {
  border-color: #d8b4fe;
  background: #fdfaff;
  box-shadow: 0 2px 8px rgba(168, 85, 247, .1);
}

.trip-linked-leg-card.will-call .switch-control {
  background: #7c3aed;
}

.trip-linked-leg-card .switch-control:has(input:disabled) {
  cursor: default;
}

.trip-linked-leg-card .switch-control input:disabled + span {
  opacity: .92;
}

.trip-linked-wait-field {
  min-width: 130px;
}

.trip-option-review-card {
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.trip-option-review-card > strong {
  display: block;
  margin-bottom: 10px;
  color: #17202a;
}

.trip-option-review-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.trip-option-review-grid + .trip-option-review-grid {
  margin-top: 10px;
}

.trip-option-review-grid span,
.trip-option-review-grid label {
  min-width: 0;
  border: 1px solid #e3e8ef;
  border-radius: 6px;
  background: #fff;
  padding: 8px;
}

.trip-option-review-grid small {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 0.76rem;
}

.trip-option-review-grid b {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.86rem;
  font-weight: 700;
}

.trip-option-review-grid input {
  width: 100%;
}

.trip-option-review-grid textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
}

.trip-option-review-grid .span-2 {
  grid-column: span 2;
}

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

.trip-form-revenue {
  display: grid;
  gap: 2px;
  margin-top: auto;
}

.trip-form-revenue span {
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.trip-form-revenue strong {
  color: #000;
  font-size: 30px;
  line-height: 1;
}

.passenger-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
}

.passenger-wide {
  grid-column: span 2;
}

.passenger-span {
  grid-column: 1 / -1;
}

.passenger-toggle-field {
  align-content: start;
  justify-items: start;
}

@media (max-width: 1280px) {
  .trip-options-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .trip-leg-card {
    grid-template-columns: 1fr;
  }

  .trip-leg-main {
    grid-template-columns: minmax(125px, .8fr) minmax(145px, .9fr) minmax(0, 1.5fr) minmax(170px, 220px);
    grid-template-areas:
      "will date price money"
      "notes notes notes notes"
      "pickup pickup pickup pickupTime"
      "pickupPin pickupDetails pickupDetails pickupDetails"
      "pickupCompare pickupCompare pickupCompare pickupCompare"
      "dropoff dropoff dropoff appointment"
      "dropoffPin dropoffDetails dropoffDetails dropoffDetails"
      "dropoffCompare dropoffCompare dropoffCompare dropoffCompare"
      "tags tags tags tags";
  }

  .trip-leg-actions {
    grid-template-columns: minmax(130px, 1fr) minmax(160px, 1fr) minmax(80px, .6fr) minmax(160px, 1fr);
    align-items: stretch;
  }

  .trip-option-review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .linked-leg-confirm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .modal:has(.add-trip-form) .modal-body,
  .modal:has(.passenger-form) .modal-body {
    padding: 12px 12px 92px;
  }

  .trip-form-section,
  .trip-form-section-payer,
  .trip-request-row,
  .trip-options-row,
  .trip-option-review-grid,
  .passenger-form {
    grid-template-columns: 1fr;
  }

  .trip-leg-main {
    grid-template-columns: 1fr 40px;
    grid-template-areas:
      "will will"
      "date date"
      "notes notes"
      "price money"
      "pickup pickupPin"
      "pickupCompare pickupCompare"
      "pickupDetails pickupDetails"
      "pickupTime pickupTime"
      "dropoff dropoffPin"
      "dropoffCompare dropoffCompare"
      "dropoffDetails dropoffDetails"
      "appointment appointment"
      "tags tags";
  }

  .trip-address-compare {
    grid-template-columns: 1fr;
  }

  .trip-address-compare div {
    justify-content: flex-start;
  }

  .trip-leg-card {
    grid-template-columns: 1fr;
  }

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

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

  .passenger-wide {
    grid-column: auto;
  }
}

.csv-import-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.csv-upload-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.csv-upload-step h4 {
  margin: 0 0 10px;
  font-size: 0.92rem;
}

.csv-download-form .span-all {
  grid-column: 1 / -1;
}

.csv-download-form small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.csv-template-message,
.csv-import-form .muted {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.csv-validation-summary,
.csv-preview-wrap {
  grid-column: 1 / -1;
}

.csv-validation-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--muted);
}

.csv-validation-summary.success {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.csv-validation-summary.error {
  border-color: #fecaca;
  color: #991b1b;
  background: #fef2f2;
}

.csv-import-progress {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #b7ebe7;
  border-radius: 8px;
  background: #f0fffd;
}

.csv-import-progress-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #0f172a;
  font-weight: 850;
}

.csv-import-progress-header span {
  color: var(--teal-dark);
  font-variant-numeric: tabular-nums;
}

.csv-import-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe4e8;
}

.csv-import-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #0ea5e9);
  transition: width .18s ease;
}

.csv-import-floating-progress {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 180;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid #b7ebe7;
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}

.csv-import-floating-progress small {
  color: var(--muted);
  font-weight: 700;
}

.download-preview-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.download-preview-list li {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid rgba(22, 101, 52, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.download-preview-list span,
.download-preview-list small {
  color: var(--muted);
}

.download-preview-trip-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.download-preview-trip-list article {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 6px;
  background: #f8fafc;
}

.download-check-group {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 0;
  padding: 0;
}

.download-check-group legend {
  margin-bottom: 2px;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 800;
}

.status-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.status-checkbox-grid .checkbox-row {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  background: #fff;
}

.messages-header {
  align-items: center;
}

.messaging-shell {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 14px;
  height: clamp(460px, calc(100vh - 220px), 720px);
  min-height: 0;
}

.dispatch-email-shell {
  display: grid;
  grid-template-columns: minmax(480px, 0.98fr) minmax(360px, 1.02fr);
  grid-template-rows: minmax(430px, 1fr) minmax(140px, 0.38fr);
  grid-template-areas:
    "compose conversation"
    "threads conversation";
  gap: 16px;
  height: clamp(620px, calc(100vh - 220px), 820px);
  min-height: 0;
  padding: 2px;
}

.dispatch-email-compose,
.dispatch-email-thread-list,
.dispatch-email-message-panel {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(12, 74, 110, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.dispatch-email-compose::before,
.dispatch-email-thread-list::before,
.dispatch-email-message-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #14b8a6, #38bdf8, #94a3b8);
}

.dispatch-email-compose {
  grid-area: compose;
}

.dispatch-email-thread-list {
  grid-area: threads;
}

.dispatch-email-message-panel {
  grid-area: conversation;
}

.dispatch-email-compose .panel-pad {
  display: grid;
  gap: 16px;
  max-height: 100%;
  overflow: auto;
  padding: 16px;
}

.dispatch-email-compose-head {
  align-items: center;
  border: 1px solid rgba(20, 184, 166, 0.16);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.card-heading strong {
  font-size: 0.98rem;
  color: var(--ink);
}

.card-heading span,
.field-hint {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.email-kicker {
  width: fit-content;
  border: 1px solid rgba(20, 184, 166, 0.26);
  border-radius: 999px;
  padding: 3px 8px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dispatch-email-send-cluster {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: max-content;
}

.dispatch-email-send-cluster > span {
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  padding: 6px 9px;
  background: #f0fdfa;
  color: #115e59;
  font-size: 0.78rem;
  font-weight: 850;
}

.dispatch-email-send-cluster .primary,
.dispatch-email-schedule-card .secondary {
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.16);
}

.dispatch-email-schedule-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(236, 254, 255, 0.92), rgba(240, 249, 255, 0.88)),
    linear-gradient(90deg, rgba(20, 184, 166, 0.16), transparent);
}

.dispatch-email-schedule-card > div {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  z-index: 1;
}

.dispatch-email-schedule-card strong {
  color: #0f172a;
}

.dispatch-email-schedule-card span,
.dispatch-email-schedule-card small {
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.35;
}

.dispatch-email-schedule-card small {
  position: relative;
  grid-column: 1 / -1;
  z-index: 1;
  max-width: 78ch;
}

.dispatch-email-schedule-card button {
  position: relative;
  z-index: 1;
}

.dispatch-email-compose-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.dispatch-email-compose-block,
.dispatch-email-message-fields {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.dispatch-email-message-fields {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.dispatch-email-compose-block {
  padding: 0;
  border: 0;
  background: transparent;
}

.dispatch-email-compose-block label,
.dispatch-email-message-fields label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 850;
}

.dispatch-email-compose-block label > span,
.dispatch-email-message-fields label > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dispatch-email-compose-block input,
.dispatch-email-message-fields input,
.dispatch-email-message-fields textarea,
.dispatch-email-thread-list input {
  border-color: rgba(148, 163, 184, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
}

.dispatch-email-message-fields textarea {
  min-height: 170px;
  resize: vertical;
}

.inline-input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.dispatch-email-recipient-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  padding: 2px 4px 2px 0;
  background: transparent;
}

.email-recipient-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.86);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.email-recipient-row:hover {
  border-color: rgba(20, 184, 166, 0.36);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.email-recipient-row input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: #0f766e;
}

.email-recipient-row span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.email-recipient-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1e293b;
  font-size: 0.84rem;
  line-height: 1.2;
}

.email-recipient-row small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
}

.email-chip {
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: 999px;
  background: #eff6ff;
  color: #075985;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.dispatch-email-thread-list .panel-pad {
  display: grid;
  gap: 9px;
  padding: 15px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.62);
}

.dispatch-email-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.dispatch-email-section-title strong {
  color: #0f172a;
}

.dispatch-email-section-title span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.dispatch-email-thread-list .message-thread-stack {
  gap: 8px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.88), rgba(241, 245, 249, 0.92));
}

.dispatch-email-thread-list .message-thread-button {
  border-color: rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.dispatch-email-thread-list .message-thread-button:hover,
.dispatch-email-thread-list .message-thread-button.active {
  border-color: rgba(20, 184, 166, 0.42);
  background: #f0fdfa;
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.12);
}

.email-message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100% - 74px);
  overflow: auto;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96)),
    linear-gradient(90deg, rgba(20, 184, 166, 0.08), transparent);
}

.email-message {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.email-message.outbound {
  margin-left: 22px;
  border-left-color: #14b8a6;
}

.email-message.inbound {
  margin-right: 22px;
  border-left-color: #38bdf8;
}

.email-message-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.email-message p {
  margin: 0;
  line-height: 1.45;
}

.dispatch-email-message-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.dispatch-email-message-panel .message-chat-header {
  border-bottom-color: rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.68);
}

.dispatch-email-message-panel .message-chat-header > div:first-child {
  min-width: 0;
}

.dispatch-email-message-panel .message-chat-status {
  min-width: 0;
  max-width: 100%;
}

.dispatch-email-message-panel .message-chat-header strong {
  color: #0f172a;
  font-size: 1rem;
}

.dispatch-email-message-panel .message-chat-header span,
.dispatch-email-message-panel .message-chat-status .badge,
.email-message small,
.email-message span,
.email-message p {
  overflow-wrap: anywhere;
}

.dispatch-email-message-panel .message-chat-status .badge {
  background: #ecfeff;
  color: #0f766e;
  max-width: 100%;
  white-space: normal;
}

.message-thread-list {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  overflow: hidden;
}

.message-thread-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.message-thread-stack {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: auto;
  padding: 0 10px 10px;
}

.message-thread-button {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: #111827;
  text-align: left;
}

.message-thread-button:hover,
.message-thread-button.active {
  border-color: rgba(20, 184, 166, 0.42);
  background: #f0fdfa;
}

.message-thread-button.has-unread {
  border-color: rgba(220, 38, 38, 0.32);
  background: #fffafa;
}

.message-thread-meta,
.message-chat-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.message-thread-meta > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.message-thread-button span,
.message-thread-button em {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.message-thread-button strong,
.message-thread-button small,
.message-thread-button em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-thread-button small,
.message-thread-button em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.message-chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

.message-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

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

.message-chat-header span {
  color: var(--muted);
  font-size: 0.84rem;
}

.message-thread-button .unread-badge,
.message-chat-header .unread-badge,
.driver-chat-header .unread-badge {
  display: inline-flex;
  color: #fff;
  font-size: 10px;
}

.message-chat-header .message-chat-status,
.driver-chat-header .message-chat-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}

.message-list-shell {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  overflow: auto;
  padding: 16px;
  background: #f8fafc;
}

.message-latest-jump {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 4;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f766e;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
}

.message-latest-jump.hidden {
  display: none;
}

.message-bubble {
  display: grid;
  gap: 5px;
  max-width: min(680px, 78%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.message-bubble.mine {
  align-self: flex-end;
  border-color: rgba(20, 184, 166, 0.34);
  background: #ecfeff;
}

.message-bubble div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.message-bubble div span,
.message-bubble time {
  color: var(--muted);
  font-size: 0.76rem;
}

.message-bubble p {
  margin: 0;
  color: #111827;
}

.message-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.message-composer textarea {
  resize: vertical;
}

.message-empty-state {
  display: grid;
  place-content: center;
  gap: 6px;
  min-height: 320px;
  padding: 24px;
  text-align: center;
}

.message-empty-state h3,
.message-empty-state p {
  margin: 0;
}

.message-recipient-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.message-recipient-grid legend {
  padding: 0 4px;
  color: #334155;
  font-weight: 800;
}

.message-recipient-grid .checkbox-row {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
}

.message-recipient-grid small {
  color: var(--muted);
  font-weight: 700;
}

.date-range-picker {
  display: grid;
  gap: 10px;
}

.report-filters .date-range-picker {
  grid-column: 1 / -1;
}

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

.date-range-calendar {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.date-range-calendar-header {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  text-align: center;
}

.date-range-calendar-header button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.date-range-weekdays,
.date-range-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.date-range-weekdays span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.date-range-days button {
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.date-range-days button:hover {
  background: #e0f2fe;
}

.date-range-days button.muted {
  color: #94a3b8;
}

.date-range-days button.in-range {
  background: #dbeafe;
  color: #1d4ed8;
}

.date-range-days button.selected {
  background: var(--teal);
  color: #fff;
}

.date-range-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.csv-error-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.csv-preview-wrap {
  overflow: auto;
  max-height: min(560px, 62vh);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.csv-preview-toolbar {
  position: sticky;
  left: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1.2fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 1280px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.csv-preview-toolbar span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.csv-preview-toolbar div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.csv-preview-toolbar button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 0.78rem;
}

.csv-preview-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1280px;
  font-size: 0.84rem;
}

.csv-preview-table th,
.csv-preview-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.csv-preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: var(--muted);
}

.csv-row-error td {
  background: #fff7ed;
}

.csv-row-excluded td {
  background: #f8fafc;
  color: #94a3b8;
}

.csv-row-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 78px;
  font-size: 0.78rem;
  font-weight: 800;
}

.csv-row-toggle input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.csv-edit-input,
.csv-edit-select,
.csv-edit-textarea {
  min-width: 120px;
  border-radius: 6px;
  padding: 6px 7px;
  font-size: 0.8rem;
}

.csv-edit-textarea {
  min-width: 190px;
  min-height: 48px;
  resize: vertical;
}

.csv-raw-value {
  display: block;
  margin-top: 4px;
  color: #b45309;
  font-size: 0.72rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.csv-status-valid,
.csv-status-error {
  display: inline-flex;
  max-width: 180px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.25;
}

.csv-status-valid {
  background: #dcfce7;
  color: #166534;
}

.csv-status-error {
  background: #fee2e2;
  color: #991b1b;
}

.schedule-delete-blocker {
  display: grid;
  gap: 12px;
  color: #334155;
}

.schedule-delete-blocker p {
  margin: 0;
}

.schedule-delete-blocker > strong {
  display: block;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffbeb;
  color: #92400e;
}

.schedule-delete-blocker ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.schedule-delete-blocker li {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.schedule-delete-blocker li span {
  color: var(--muted);
  font-size: 0.82rem;
}

.map-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 140px);
  border-top: 1px solid var(--line);
}

.map-driver-panel {
  min-height: calc(100vh - 140px);
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  overflow: hidden;
}

.map-driver-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.map-driver-panel-head div {
  display: grid;
  gap: 2px;
}

.map-driver-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.map-driver-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 12px 0;
}

.map-driver-stats span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.map-driver-stats strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1;
}

.map-driver-panel input {
  width: calc(100% - 24px);
  margin: 12px;
}

.map-driver-list {
  display: grid;
  max-height: calc(100vh - 180px);
  overflow: auto;
}

.map-driver-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.map-driver-row:hover,
.map-driver-row.selected {
  background: #eefafa;
}

.map-driver-row.selected {
  border: 1px solid #9bdad7;
  background: #d8f4f1;
}

.map-driver-row-main {
  display: grid;
  gap: 3px;
}

.map-driver-row-main strong {
  color: var(--ink);
  font-size: 14px;
}

.map-driver-row-main span,
.map-driver-chevron {
  color: var(--muted);
  font-weight: 800;
}

.map-driver-row-status {
  align-self: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-driver-row.is-stale .map-driver-row-status {
  background: #fff7ed;
  color: #9a3412;
}

.map-driver-row.is-offline .map-driver-row-status {
  background: #f1f5f9;
  color: #475569;
}

.map-driver-trip-details {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 10px;
  border-left: 3px solid var(--teal);
  background: #fff;
}

.map-driver-trip-details span,
.driver-popup-grid span {
  display: grid;
  gap: 2px;
}

.map-driver-trip-details small,
.driver-popup-grid small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.map-driver-trip-details strong,
.driver-popup-grid strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.map-workspace {
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto;
  min-height: calc(100vh - 140px);
  min-width: 0;
  background: #eef4f7;
}

.map-canvas {
  position: relative;
  min-height: calc(100vh - 360px);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  cursor: grab;
  touch-action: none;
  background:
    linear-gradient(90deg, rgba(15,159,154,.12) 1px, transparent 1px),
    linear-gradient(rgba(15,159,154,.12) 1px, transparent 1px),
    #f7fbfb;
  background-size: 48px 48px;
}

.map-active-card-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 12px 14px 14px;
}

.map-active-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-active-card-head div {
  display: grid;
  gap: 2px;
}

.map-active-card-head strong {
  color: var(--ink);
  font-size: 14px;
}

.map-active-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.map-active-driver-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 330px);
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.map-active-driver-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 12px;
  min-height: 156px;
  padding: 12px 12px 12px 14px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
  cursor: pointer;
}

.map-active-driver-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 8px 0 0 8px;
  background: #0f9f9a;
}

.map-active-driver-card:hover,
.map-active-driver-card.selected {
  border-color: #8fd8d5;
  background: #f3fbfb;
  box-shadow: 0 12px 26px rgba(15, 159, 154, .16);
}

.map-active-driver-card.is-stale::before {
  background: #f59e0b;
}

.map-active-driver-card.is-offline::before {
  background: #64748b;
}

.map-active-driver-card.is-stale {
  background: #fffdf7;
}

.map-active-driver-card.is-offline {
  background: #f8fafc;
}

.map-card-live-dot {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, .14);
}

.map-active-driver-card.is-stale .map-card-live-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .16);
}

.map-active-driver-card.is-offline .map-card-live-dot {
  background: #64748b;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, .14);
}

.map-card-title {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-right: 18px;
}

.map-card-title strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-card-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.map-card-status {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 88px;
  padding-top: 14px;
}

.map-card-status > span:last-child {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-card-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 84px;
  gap: 7px;
}

.map-card-metrics span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: rgba(255, 255, 255, .78);
}

.map-card-metrics small {
  color: #64748b;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-card-metrics strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-canvas.dragging {
  cursor: grabbing;
}

.map-canvas.satellite {
  background: #2d3b38;
}

.map-loading,
.map-attribution {
  position: absolute;
  z-index: 5;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
}

.map-loading {
  left: 50%;
  top: 50%;
  padding: 10px 14px;
  transform: translate(-50%, -50%);
}

.map-attribution {
  right: 10px;
  bottom: 10px;
  padding: 6px 9px;
}

.map-search-box {
  position: absolute;
  z-index: 7;
  top: 16px;
  left: 16px;
  width: min(340px, calc(100% - 220px));
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
}

.map-fit-active {
  position: absolute;
  z-index: 7;
  top: 64px;
  left: 16px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  padding: 0 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
  font-size: 13px;
  font-weight: 850;
}

.map-fit-active:hover,
.map-fit-active.active {
  background: #eefafa;
  color: var(--teal-dark);
  border-color: #a7dddd;
}

.map-layer-toggle {
  position: absolute;
  z-index: 7;
  top: 16px;
  right: 16px;
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
}

.map-layer-toggle button {
  min-height: 40px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0 18px;
  font-weight: 850;
}

.map-layer-toggle button:last-child {
  border-right: 0;
}

.map-layer-toggle button.active {
  background: #9aa1ad;
  color: #fff;
}

.map-zoom-controls {
  position: absolute;
  z-index: 7;
  right: 16px;
  bottom: 16px;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
}

.map-zoom-controls button {
  width: 40px;
  height: 40px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 24px;
  font-weight: 850;
}

.map-zoom-controls button:last-child {
  border-bottom: 0;
}

.map-zoom-controls button:hover,
.map-layer-toggle button:hover {
  background: #eefafa;
  color: var(--teal-dark);
}

.google-js-map-layer,
.map-fallback-layer,
.map-overlay {
  position: absolute;
  inset: 0;
}

.google-js-map-layer {
  z-index: 0;
  background: #eef4f7;
}

.google-map-error {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  width: min(520px, calc(100% - 32px));
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: rgba(255, 247, 247, .96);
  color: #991b1b;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 16px 34px rgba(127, 29, 29, .18);
}

.map-overlay {
  z-index: 2;
  pointer-events: none;
}

.map-overlay button,
.map-overlay .driver-map-popup {
  pointer-events: auto;
}

.map-canvas.dragging .google-js-map-layer,
.map-canvas.dragging .map-overlay {
  transform: translate(var(--drag-x, 0), var(--drag-y, 0));
}

.map-fallback-layer {
  background:
    linear-gradient(90deg, rgba(15,159,154,.12) 1px, transparent 1px),
    linear-gradient(rgba(15,159,154,.12) 1px, transparent 1px),
    #f7fbfb;
  background-size: 48px 48px;
}

.route-line {
  position: absolute;
  z-index: 2;
  height: 4px;
  border-radius: 999px;
  transform-origin: left center;
  background: var(--teal);
}

.driver-route-line {
  position: absolute;
  z-index: 2;
  height: 5px;
  border-radius: 999px;
  transform-origin: left center;
  background: rgba(17, 153, 142, .68);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .8);
}

.pin,
.driver-pin,
.base-pin {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .18);
}

.pin {
  width: 28px;
  height: 28px;
  background: #fff;
  border: 3px solid var(--blue);
}

.pin.drop {
  border-color: var(--teal);
}

.base-pin {
  width: 48px;
  height: 48px;
  border: 4px solid #fff;
  background: #a51d2d;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.driver-pin {
  width: 38px;
  height: 38px;
  background: var(--teal);
  color: #fff;
  font-weight: 850;
}

.driver-map-marker,
.driver-cluster-marker {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 3px solid #fff;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .24);
  cursor: pointer;
}

.driver-map-marker {
  width: 58px;
  height: 58px;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #0f172a;
}

.driver-map-marker.selected {
  outline: none;
}

.vehicle-marker-icon {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: 44px;
  height: 54px;
  border: 0;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 10px 14px rgba(15, 23, 42, .28));
  transform: translateX(-50%) rotate(var(--heading, 0deg));
  transform-origin: 50% 50%;
}

.vehicle-marker-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0, 88% 100%, 50% 78%, 12% 100%);
  background: #172033;
  border: 2px solid #fff;
}

.driver-map-marker.selected .vehicle-marker-icon {
  filter: drop-shadow(0 12px 18px rgba(15, 23, 42, .35));
}

.driver-map-marker strong {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 50%;
  min-width: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  transform: translateX(-50%);
}

.driver-cluster-marker {
  width: 46px;
  height: 46px;
  background: #4f46e5;
}

.driver-map-popup {
  position: absolute;
  z-index: 6;
  width: min(292px, calc(100% - 32px));
  transform: translate(0, -100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .22);
  padding: 10px 12px;
  color: #4b5563;
}

.driver-map-popup header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.driver-map-popup header div {
  display: grid;
  gap: 2px;
}

.driver-map-popup header strong {
  color: var(--ink);
  font-size: 15px;
}

.driver-map-popup header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.driver-map-popup .icon-button.small {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.driver-popup-grid,
.driver-popup-section {
  display: grid;
  gap: 7px;
}

.driver-popup-section {
  padding: 7px 0;
  border-top: 1px solid #eef2f7;
}

.driver-popup-section.first {
  padding-top: 0;
  border-top: 0;
}

.driver-popup-section.last {
  padding-bottom: 0;
}

.driver-popup-section.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.driver-popup-section.compact .map-chip,
.driver-popup-section.compact .map-popup-status {
  grid-column: 1 / -1;
}

.driver-popup-section > span:not(.map-chip) {
  display: grid;
  gap: 2px;
}

.driver-popup-section > span:not(.map-chip) small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.driver-popup-section > span:not(.map-chip) strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.map-chip {
  justify-self: start;
  padding: 1px 8px;
  border: 1px solid #d7e5e3;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #4b5563;
  font-size: 11px;
  font-weight: 850;
}

.map-icon-line {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}

.map-line-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.map-line-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-icon-line strong {
  min-width: 0;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.map-icon-line strong span {
  display: block;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.map-popup-status .badge {
  margin: 0;
}

.map-destination-pin {
  position: absolute;
  z-index: 3;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -100%);
  border: 3px solid #fff;
  border-radius: 999px 999px 999px 0;
  background: #10a7a0;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .24);
  rotate: -45deg;
}

.map-destination-pin span {
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  background: #fff;
}

.regional-map-card {
  position: absolute;
  z-index: 5;
  min-width: 170px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  padding: 8px 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .16);
}

.regional-map-card strong,
.regional-map-card span,
.regional-map-card small {
  display: block;
}

.regional-map-card span,
.regional-map-card small,
.region-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.map-region-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.region-row {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.reports-page {
  display: grid;
  gap: 14px;
}

.report-filter-panel {
  overflow: hidden;
}

.reports-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.report-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.report-metric-card,
.report-chart-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
}

.report-metric-card {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.report-metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-metric-card strong {
  font-size: 22px;
}

.report-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.report-chart-card {
  padding: 14px;
}

.report-chart-card h3 {
  margin-bottom: 12px;
}

.donut-chart {
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  margin: 4px auto 12px;
  border-radius: 999px;
  background: conic-gradient(var(--donut));
  position: relative;
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: inherit;
  background: #fff;
}

.donut-chart strong,
.donut-chart span {
  position: relative;
  z-index: 1;
}

.donut-chart strong {
  align-self: end;
  font-size: 24px;
}

.donut-chart span {
  align-self: start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.bar-chart {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  align-items: center;
  gap: 10px;
}

.bar-row span,
.bar-row strong {
  font-size: 12px;
}

.bar-row span {
  overflow: hidden;
  color: var(--muted);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.report-table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.custom-report-panel {
  display: grid;
  gap: 12px;
}

.driver-reassign-list {
  display: grid;
  gap: 8px;
  max-height: min(520px, 70vh);
  overflow: auto;
}

.driver-reassign-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease, transform .14s ease;
}

.driver-reassign-row span {
  display: grid;
  gap: 2px;
}

.driver-reassign-row small {
  color: var(--muted);
  font-weight: 700;
}

.driver-reassign-row:hover,
.driver-reassign-row:focus-visible {
  border-color: var(--teal);
  background: #eefafa;
  transform: translateX(2px);
  outline: none;
}

.driver-reassign-row:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background: #f8fafc;
}

.driver-reassign-row:disabled:hover {
  border-color: var(--line);
  background: #f8fafc;
  transform: none;
}

.modal:has(.stellar-run-review),
.modal:has(.stellar-run-loading),
.modal:has(.stellar-run-crew-selection) {
  width: min(980px, 100%);
}

.stellar-run-loading {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
}

.stellar-run-loading .button-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
}

.stellar-run-review {
  display: grid;
  gap: 14px;
}

.stellar-run-crew-selection {
  display: grid;
  gap: 12px;
}

.stellar-run-settings-strip,
.stellar-run-crew-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stellar-run-settings-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 850;
}

.stellar-run-settings-strip strong {
  color: #0f172a;
}

.stellar-run-crew-table {
  max-height: min(56vh, 520px);
  overflow: auto;
}

.stellar-run-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.stellar-run-summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.stellar-run-summary strong {
  color: #111827;
  font-size: 18px;
}

.stellar-run-warnings,
.stellar-run-card-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stellar-run-list {
  display: grid;
  gap: 10px;
}

.stellar-run-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stellar-run-card-head,
.stellar-run-assignment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stellar-run-assignment-row {
  align-items: end;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.stellar-run-assignment-row label {
  display: grid;
  gap: 5px;
  min-width: min(260px, 100%);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.stellar-run-rides {
  display: grid;
  gap: 6px;
}

.stellar-run-rides div {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 6px;
  background: #f8fafc;
}

.stellar-run-rides span,
.stellar-run-reason,
.stellar-run-route small,
.stellar-run-remaining p {
  color: var(--muted);
  font-size: 12px;
}

.stellar-run-route {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 20px;
}

.stellar-run-route li {
  padding-left: 2px;
}

.stellar-run-reason {
  margin: 0;
  line-height: 1.45;
}

.stellar-run-remaining {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stellar-run-remaining summary {
  cursor: pointer;
  font-weight: 850;
}

.driver-portal {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
}

.driver-readiness {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.driver-readiness > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.fleet-vehicle-table th,
.fleet-vehicle-table td {
  vertical-align: top;
}

.fleet-vehicle-table td:first-child strong {
  display: inline-block;
  min-width: 76px;
  color: #0f172a;
  font-size: 15px;
  letter-spacing: 0;
}

.fleet-vehicle-table td:nth-child(3) strong {
  display: block;
  color: #111827;
}

.fleet-vehicle-table td:nth-child(3) small,
.fleet-audit-summary {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.fleet-vin {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  color: #334155;
  word-break: break-all;
}

.fleet-storage-link {
  color: #0f766e;
  font-weight: 750;
  text-decoration: none;
}

.fleet-storage-link:hover {
  text-decoration: underline;
}

.fleet-vehicle-form {
  max-width: 980px;
}

.fleet-form-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.fleet-form-section > div:first-child {
  display: grid;
  gap: 3px;
}

.fleet-form-section strong {
  color: #0f172a;
  font-size: 14px;
}

.fleet-form-section small {
  color: var(--muted);
  line-height: 1.35;
}

.fleet-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fleet-vin-decode-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.vin-decode-status {
  display: grid;
  gap: 4px;
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
}

.vin-decode-status strong {
  color: #0f766e;
}

.danger-text {
  color: var(--danger);
  font-weight: 800;
}

.inspection-board th,
.inspection-board td {
  vertical-align: middle;
}

.inspection-summary-row td {
  height: 64px;
}

.inspection-toggle,
.inspection-export {
  min-width: 34px;
  padding: 6px 8px;
}

.inspection-export {
  display: inline-grid;
  place-items: center;
  gap: 2px;
  color: #334155;
  font-size: 18px;
}

.inspection-export span {
  font-size: 10px;
  font-weight: 800;
}

.inspection-outcome,
.inspection-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

.inspection-outcome.fail,
.inspection-value.fail {
  color: var(--danger);
}

.inspection-detail-card {
  display: grid;
  gap: 10px;
  max-width: 760px;
  padding: 12px 0 16px;
}

.inspection-detail-table {
  border: 0;
  box-shadow: none;
}

.inspection-detail-table th,
.inspection-detail-table td {
  padding: 14px 16px;
}

.inspection-detail-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.inspection-summary-row.selected-inspection-report {
  box-shadow: inset 4px 0 0 #2563eb;
}

.inspection-summary-row.selected-inspection-report td {
  background: #eff6ff;
}

.inspection-detail-row.selected-inspection-report-detail .inspection-detail-card {
  border-color: #93c5fd;
  background: #f8fbff;
}

.inspection-export.selected-inspection-report-action {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1d4ed8;
}

.inspection-report-ready {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: #f5f9ff;
}

.inspection-report-ready p,
.inspection-report-ready small {
  margin: 0;
}

.inspection-report-context {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 12px;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
}

.inspection-report-context strong {
  color: #1e3a8a;
}

.inspection-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.inspection-report-link {
  width: fit-content;
  text-decoration: none;
}

.settings-logo-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.settings-logo-preview div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-logo-preview img,
.settings-logo-placeholder {
  width: 58px;
  height: 58px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.settings-logo-preview img {
  object-fit: contain;
}

.settings-logo-placeholder {
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.modal:has(.organization-settings-form) {
  width: min(920px, 100%);
}

.modal:has(.organization-settings-form) .modal-body {
  max-height: min(76vh, 760px);
}

.organization-settings-form {
  display: grid;
  gap: 14px;
}

.org-settings-section {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.org-section-heading h4,
.org-section-heading p {
  margin: 0;
}

.org-section-heading h4 {
  color: #111827;
  font-size: 15px;
}

.org-section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.org-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.org-section-grid .span-2 {
  grid-column: 1 / -1;
}

.org-field {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.org-field small,
.org-check small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}

.org-field textarea {
  min-height: 78px;
}

.org-field input[type="color"] {
  min-height: 42px;
  padding: 4px;
}

.org-check {
  min-height: 38px;
  align-items: flex-start;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.org-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.org-checkbox-grid > strong {
  grid-column: 1 / -1;
  color: #334155;
  font-size: 12px;
}

.mobile-card {
  max-width: 430px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.mobile-card header {
  padding: 14px;
  background: var(--lavender);
  font-weight: 850;
}

.mobile-card .panel-pad {
  display: grid;
  gap: 10px;
}

.signature-pad {
  width: 100%;
  height: 150px;
  border: 1px dashed #9aa5b1;
  border-radius: 6px;
  background: #fff;
  touch-action: none;
}

.driver-app-mode {
  background: #f6f6f6;
}

.driver-app-mode .topbar {
  display: none;
}

.driver-app-mode main {
  min-height: 100vh;
  padding: 0;
  background: #f6f6f6;
}

.driver-app-mode .module-view {
  padding: 0;
}

.driver-mobile-shell {
  position: relative;
  max-width: 440px;
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: 92px;
  background: #f7f7f7;
  color: #1e1e22;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.driver-mobile-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 82px;
  padding: 16px 18px 14px;
  background: #fff;
  border-bottom: 1px solid #e7e7e7;
}

.driver-mobile-header strong {
  display: block;
  color: #16161a;
  font-size: 22px;
  line-height: 1.12;
}

.driver-mobile-header span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  color: #6b7280;
  font-size: 14px;
}

.driver-mobile-header i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
}

.driver-mobile-header i.online {
  background: #20c997;
}

.driver-bolt {
  flex: 0 0 46px;
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: #171517;
  color: #22c7bd;
  font-size: 24px;
  line-height: 1;
}

.driver-mobile-content,
.driver-wizard .driver-mobile-content {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.driver-mobile-content.centered {
  min-height: calc(100dvh - 174px);
  place-items: start center;
  padding-top: 44px;
  text-align: center;
}

.driver-mobile-content h1,
.driver-wizard h1 {
  margin: 0;
  color: #202124;
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.2;
  letter-spacing: 0;
}

.driver-section-title {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.driver-start-card,
.driver-info-card,
.driver-ride-card,
.settings-list button,
.driver-schedule-tabs {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
}

.driver-profile-required .driver-info-card {
  max-width: 520px;
  display: grid;
  gap: 12px;
  padding: 22px;
  text-align: left;
}

.driver-profile-required p {
  margin: 0;
  color: #4b5563;
  line-height: 1.5;
}

.driver-profile-required small {
  color: #6b7280;
  overflow-wrap: anywhere;
}

.driver-start-card {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 22px 18px;
  text-align: center;
}

.driver-start-card.compact {
  justify-items: start;
  gap: 8px;
  text-align: left;
}

.driver-primary-pill,
.driver-outline-pill,
.driver-outline-full {
  border-radius: 999px;
  font-weight: 850;
  letter-spacing: 0;
}

.driver-primary-pill {
  border: 0;
  padding: 12px 20px;
  background: #171517;
  color: #fff;
  font-size: 17px;
}

.driver-primary-pill.full {
  width: 100%;
  min-height: 48px;
}

.driver-primary-pill:disabled {
  opacity: 0.45;
}

.driver-outline-pill {
  border: 2px solid #252525;
  padding: 7px 14px;
  background: #fff;
  color: #252525;
  font-size: 14px;
}

.driver-outline-full {
  width: 100%;
  min-height: 46px;
  border: 2px solid #252525;
  background: #fff;
  color: #252525;
  font-size: 16px;
}

.driver-info-card {
  display: grid;
  gap: 0;
  padding: 14px 16px;
}

.driver-info-card h2 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 22px;
}

.driver-info-row {
  display: grid;
  grid-template-columns: minmax(112px, .85fr) minmax(0, 1.15fr);
  gap: 12px;
  align-items: start;
  padding: 7px 0;
  font-size: 15px;
}

.driver-info-row strong {
  color: #1f1f22;
}

.driver-info-row span {
  min-width: 0;
  color: #2f3137;
  text-align: right;
  overflow-wrap: anywhere;
}

.driver-info-row.accent span {
  color: #20bdb3;
}

.driver-info-link-row a {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #0f766e;
  text-align: right;
  text-decoration: none;
}

.driver-info-link-row a span {
  min-width: 0;
  color: inherit;
  overflow-wrap: anywhere;
}

.driver-info-link-row a b {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2b9fe8;
  font-size: 20px;
  line-height: 1;
}

.driver-timeline {
  display: grid;
  gap: 8px;
}

.driver-timeline-stop {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 11px 14px;
  background: #f1f1f1;
  color: #666;
}

.driver-timeline-stop span {
  font-size: 15px;
}

.driver-timeline i {
  justify-self: center;
  width: 3px;
  height: 28px;
  border-radius: 999px;
  background: repeating-linear-gradient(to bottom, #cfcfcf 0 6px, transparent 6px 14px);
}

.driver-trip-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.driver-trip-selector button {
  flex: 0 0 auto;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  color: #4b5563;
  font-weight: 800;
}

.driver-trip-selector button.active {
  border-color: #171517;
  background: #171517;
  color: #fff;
}

.driver-trip-selector button.multi {
  min-width: 112px;
}

.driver-trip-selector button.locked,
.driver-trip-selector button:disabled {
  border-color: #d1d5db;
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

.driver-trip-selector button.locked.active {
  border-color: #9ca3af;
  background: #9ca3af;
  color: #fff;
}

.driver-trip-selector button.terminal {
  border-color: #d1d5db;
  background: #f3f4f6;
  color: #6b7280;
}

.driver-trip-selector button.terminal.active {
  border-color: #9ca3af;
  background: #e5e7eb;
  color: #374151;
}

.driver-ride-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px 16px 18px 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 5px solid #facc15;
}

.driver-ride-card.tone-assigned {
  border-left-color: var(--tone-neutral-text);
  background: linear-gradient(90deg, rgba(234, 236, 240, .72), #fff 38%);
}

.driver-ride-card.tone-route {
  border-left-color: var(--tone-route-text);
  background: linear-gradient(90deg, rgba(196, 227, 255, .78), #fff 38%);
}

.driver-ride-card.tone-active {
  border-left-color: var(--tone-active-text);
  background: linear-gradient(90deg, rgba(201, 242, 240, .82), #fff 38%);
}

.driver-ride-card.tone-success {
  border-left-color: var(--tone-success-text);
  background: linear-gradient(90deg, rgba(195, 255, 190, .72), #fff 38%);
}

.driver-ride-card.tone-warn {
  border-left-color: var(--tone-warn-text);
  background: linear-gradient(90deg, rgba(255, 243, 205, .78), #fff 38%);
}

.driver-ride-card.tone-danger {
  border-left-color: var(--tone-danger-text);
  background: linear-gradient(90deg, rgba(243, 211, 209, .82), #fff 38%);
}

.driver-ride-card.eta-good,
.driver-ride-card.eta-green {
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.18);
}

.driver-ride-card.eta-close,
.driver-ride-card.eta-yellow {
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2);
}

.driver-ride-card.eta-late,
.driver-ride-card.eta-orange {
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.2);
}

.driver-ride-card.eta-critical,
.driver-ride-card.eta-red {
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.22);
}

.driver-ride-card.eta-unknown {
  box-shadow: 0 8px 24px rgba(100, 116, 139, 0.16);
}

.driver-ride-card.locked {
  border-left-color: #9ca3af;
  background: #f3f4f6;
  color: #6b7280;
  box-shadow: none;
  filter: grayscale(0.35);
}

.driver-ride-card.terminal,
.driver-ride-card.status-cancelled,
.driver-ride-card.status-completed,
.driver-ride-card.status-no_show {
  box-shadow: none;
}

.driver-ride-card.terminal .driver-route-address strong,
.driver-ride-card.terminal .driver-passenger-row,
.driver-ride-card.terminal .driver-ride-metrics span {
  color: #475569;
}

.driver-ride-card.locked::after {
  content: "Complete the current ride before starting this ride";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(243, 244, 246, 0.78);
  color: #374151;
  font-weight: 850;
  text-align: center;
  pointer-events: none;
}

.driver-ride-top,
.driver-passenger-row,
.driver-route-address {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.driver-status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--tone-neutral-bg);
  color: var(--tone-neutral-text);
  border: 1px solid rgba(63, 75, 90, .22);
  font-size: 13px;
  font-weight: 850;
}

.driver-ride-card.tone-route .driver-status-pill {
  background: var(--tone-route-bg);
  border-color: rgba(0, 70, 107, .22);
  color: var(--tone-route-text);
}

.driver-ride-card.tone-active .driver-status-pill {
  background: var(--tone-active-bg);
  border-color: rgba(7, 90, 62, .2);
  color: var(--tone-active-text);
}

.driver-ride-card.tone-success .driver-status-pill {
  background: var(--tone-success-bg);
  border-color: rgba(28, 93, 4, .2);
  color: var(--tone-success-text);
}

.driver-ride-card.tone-warn .driver-status-pill {
  background: var(--tone-warn-bg);
  border-color: rgba(103, 78, 4, .2);
  color: var(--tone-warn-text);
}

.driver-ride-card.tone-danger .driver-status-pill {
  background: var(--tone-danger-bg);
  border-color: rgba(136, 6, 6, .22);
  color: var(--tone-danger-text);
}

.driver-ride-card.status-arrived_at_pickup .driver-status-pill,
.driver-ride-card.status-passenger_picked_up .driver-status-pill,
.driver-ride-card.status-arrived_at_dropoff .driver-status-pill {
  background: var(--tone-active-bg);
  border-color: rgba(7, 90, 62, .2);
  color: var(--tone-active-text);
}

.driver-ride-card.status-en_route_to_pickup .driver-status-pill,
.driver-ride-card.status-en_route_to_dropoff .driver-status-pill {
  background: var(--tone-route-bg);
  border-color: rgba(0, 70, 107, .22);
  color: var(--tone-route-text);
}

.driver-ride-card.status-completed .driver-status-pill {
  background: var(--tone-success-bg);
  border-color: rgba(28, 93, 4, .2);
  color: var(--tone-success-text);
}

.driver-ride-card.status-cancelled .driver-status-pill,
.driver-ride-card.status-no_show .driver-status-pill {
  background: var(--tone-danger-bg);
  border-color: rgba(136, 6, 6, .22);
  color: var(--tone-danger-text);
}

.driver-ride-card h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  font-size: clamp(21px, 6vw, 28px);
  line-height: 1.15;
}

.driver-ride-card h2 span {
  font-size: 14px;
}

.driver-ride-card .mobility-token {
  width: 28px;
  min-width: 28px;
  height: 28px;
  margin-left: 0;
  border: 2px solid currentColor;
  background: #fff;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.14);
}

.driver-ride-prompt {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(203, 213, 225, .72);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}

.driver-ride-prompt strong {
  color: #111827;
  font-size: 15px;
  line-height: 1.25;
}

.driver-ride-prompt span {
  color: #475569;
  font-size: 13px;
  line-height: 1.35;
}

.driver-multiload-card {
  border-left-color: #0f9f9a;
}

.driver-passenger-count {
  border-radius: 999px;
  padding: 5px 10px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 13px;
  font-weight: 850;
}

.driver-next-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid #ccfbf1;
  border-radius: 8px;
  background: #f0fdfa;
}

.driver-next-action strong {
  min-width: 0;
  color: #134e4a;
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.driver-next-action span,
.driver-nav-button {
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: #0f766e;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.driver-next-move {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  background: linear-gradient(135deg, #ecfeff 0%, #f8fafc 100%);
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.14);
}

.driver-next-move.tone-assigned {
  border-color: rgba(63, 75, 90, .18);
  background: linear-gradient(135deg, rgba(234, 236, 240, .88), #fff 100%);
  box-shadow: 0 6px 18px rgba(63, 75, 90, .1);
}

.driver-next-move.tone-route {
  border-color: rgba(0, 70, 107, .18);
  background: linear-gradient(135deg, rgba(196, 227, 255, .92), #fff 100%);
  box-shadow: 0 6px 18px rgba(0, 70, 107, .12);
}

.driver-next-move.tone-active {
  border-color: rgba(7, 90, 62, .18);
  background: linear-gradient(135deg, rgba(201, 242, 240, .95), #fff 100%);
}

.driver-next-move.tone-success {
  border-color: rgba(28, 93, 4, .18);
  background: linear-gradient(135deg, rgba(195, 255, 190, .78), #fff 100%);
}

.driver-next-move.tone-warn {
  border-color: rgba(103, 78, 4, .2);
  background: linear-gradient(135deg, rgba(255, 243, 205, .88), #fff 100%);
}

.driver-next-move.tone-danger {
  border-color: rgba(136, 6, 6, .2);
  background: linear-gradient(135deg, rgba(243, 211, 209, .9), #fff 100%);
}

.driver-next-move > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.driver-next-move span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.driver-next-move.tone-assigned span {
  color: var(--tone-neutral-text);
}

.driver-next-move.tone-route span {
  color: var(--tone-route-text);
}

.driver-next-move.tone-active span {
  color: var(--tone-active-text);
}

.driver-next-move.tone-success span {
  color: var(--tone-success-text);
}

.driver-next-move.tone-warn span {
  color: var(--tone-warn-text);
}

.driver-next-move.tone-danger span {
  color: var(--tone-danger-text);
}

.driver-next-move strong {
  color: #111827;
  font-size: 19px;
  line-height: 1.2;
}

.driver-next-move small {
  min-width: 0;
  color: #475569;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

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

.driver-next-move-actions .driver-primary-pill {
  grid-column: 1 / -1;
  min-height: 46px;
}

.driver-next-move-actions span {
  justify-self: start;
  border-radius: 999px;
  padding: 6px 9px;
  background: #fff;
  color: #0f766e;
  text-transform: none;
}

.driver-multiload-steps {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.driver-multiload-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 50px;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.driver-multiload-steps li > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-weight: 850;
}

.driver-multiload-steps li div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.driver-multiload-steps strong,
.driver-multiload-steps small,
.driver-multiload-steps em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.driver-multiload-steps strong {
  color: #111827;
  font-size: 14px;
}

.driver-multiload-steps small {
  color: #6b7280;
  font-size: 12px;
}

.driver-multiload-steps em {
  color: #6b7280;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.driver-multiload-steps li.active {
  border-color: #0f9f9a;
  background: #ecfeff;
}

.driver-multiload-steps li.active > span {
  background: #0f9f9a;
  color: #fff;
}

.driver-multiload-steps li.complete {
  background: #f8fafc;
  color: #64748b;
}

.driver-multiload-steps li.complete > span {
  background: #dcfce7;
  color: #166534;
}

.driver-multiload-passengers {
  display: grid;
  gap: 8px;
}

.driver-multiload-passengers section {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.driver-multiload-passengers strong {
  color: #111827;
  font-size: 14px;
}

.driver-multiload-passengers span,
.driver-multiload-passengers small {
  color: #4b5563;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.driver-multiload-passengers .mobility-token {
  width: auto;
  min-width: 0;
  height: auto;
  padding: 2px 6px;
  font-size: 12px;
}

.driver-multiload-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.driver-multiload-footer {
  display: grid;
  gap: 10px;
}

.driver-suggested-order {
  margin-bottom: 12px;
}

.driver-chat-card {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  min-height: min(58vh, 620px);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.driver-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
}

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

.driver-chat-header strong,
.driver-chat-header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-chat-header strong {
  color: #111827;
  font-size: 16px;
}

.driver-chat-header span {
  color: #6b7280;
  font-size: 12px;
}

.driver-message-list-shell {
  min-height: 0;
}

.driver-message-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  background: #f8fafc;
}

.driver-message-composer {
  grid-template-columns: minmax(0, 1fr) auto;
}

.driver-message-composer textarea {
  min-height: 48px;
}

.driver-ride-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.driver-ride-metrics span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
}

.driver-route-address {
  padding: 10px 0;
  border-top: 1px solid #e5e7eb;
}

.driver-route-address strong {
  min-width: 0;
  color: #222;
  font-size: clamp(17px, 4.8vw, 21px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.driver-route-address.dropoff strong {
  color: #c7c7c7;
}

.driver-ride-card.is-transporting .driver-route-address.pickup strong {
  color: #c7c7c7;
}

.driver-ride-card.is-transporting .driver-route-address.dropoff strong {
  color: #222;
}

.driver-route-address a {
  flex: 0 0 auto;
  color: #2b9fe8;
  font-size: 24px;
  text-decoration: none;
}

.driver-map-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #eff6ff;
}

.driver-notes-summary {
  display: grid;
  gap: 10px;
}

.driver-notes-summary section {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.driver-notes-summary strong {
  color: #111827;
}

.driver-notes-summary p {
  margin: 0;
  color: #4b5563;
  overflow-wrap: anywhere;
}

.driver-run-detail {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #f8fafc;
  color: #34444c;
}

.driver-run-detail header {
  display: grid;
  gap: 58px;
  min-height: 182px;
  padding: 18px 20px 26px;
  background: #111043;
  color: #fff;
}

.driver-run-detail header span {
  justify-self: end;
  font-size: 18px;
  font-weight: 500;
}

.driver-run-detail header strong {
  color: #fff;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.05;
}

.driver-run-step {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 10px 20px;
  background: #f4f7fa;
}

.driver-run-step b {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #ffc400;
  color: #fff;
  font-size: 25px;
  font-weight: 500;
}

.driver-run-step span {
  min-width: 0;
  color: #34444c;
  font-size: 29px;
  font-weight: 400;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.driver-run-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 16px;
  border-top: 1px solid #ccd6df;
  background: #f8fafc;
}

.driver-run-times div,
.driver-run-meta div,
.driver-run-address,
.driver-run-assistance {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.driver-run-times span,
.driver-run-meta span,
.driver-run-address span,
.driver-run-assistance > span {
  color: #80939d;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.driver-run-times strong {
  font-size: 34px;
  font-weight: 450;
  line-height: 1.1;
}

.driver-run-times strong.pickup {
  color: #2f62ff;
}

.driver-run-times strong.dropoff {
  color: #f10000;
}

.driver-run-completed {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  background: #fff;
  text-align: center;
}

.driver-run-completed strong {
  color: #07880d;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.driver-run-completed button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: #d9e2e8;
  color: #80939d;
  font-size: 27px;
  font-weight: 450;
  text-transform: uppercase;
}

.driver-run-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 20px;
  background: #fff;
}

.driver-run-meta strong {
  min-width: 0;
  color: #34444c;
  font-size: 23px;
  font-weight: 450;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.driver-run-meta div:nth-child(2) {
  text-align: right;
}

.driver-run-meta div:nth-child(2) strong {
  color: #5b8cff;
}

.driver-run-address,
.driver-run-assistance {
  padding: 18px 20px;
  background: #fff;
}

.driver-run-address strong,
.driver-run-assistance strong {
  min-width: 0;
  color: #34444c;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.driver-run-assistance strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.driver-run-assistance i {
  color: #f10000;
  font-size: 28px;
  font-style: normal;
  line-height: 1;
}

.driver-trip-detail-form {
  display: grid;
  gap: 16px;
}

.driver-trip-status-card {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid rgba(203, 213, 225, .78);
  border-left: 5px solid var(--tone-neutral-text);
  border-radius: 8px;
  background: #fff;
}

.driver-trip-status-card span,
.driver-notification-status {
  color: var(--tone-neutral-text);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.driver-trip-status-card strong {
  color: #111827;
  font-size: 18px;
  line-height: 1.2;
}

.driver-trip-status-card p {
  margin: 0;
  color: #475569;
  line-height: 1.35;
}

.driver-trip-status-card.tone-route,
.driver-notification-card.tone-route {
  border-left-color: var(--tone-route-text);
  background: linear-gradient(90deg, rgba(196, 227, 255, .74), #fff 46%);
}

.driver-trip-status-card.tone-assigned,
.driver-notification-card.tone-assigned {
  border-left-color: var(--tone-neutral-text);
  background: linear-gradient(90deg, rgba(234, 236, 240, .82), #fff 46%);
}

.driver-trip-status-card.tone-active,
.driver-notification-card.tone-active {
  border-left-color: var(--tone-active-text);
  background: linear-gradient(90deg, rgba(201, 242, 240, .8), #fff 46%);
}

.driver-trip-status-card.tone-success,
.driver-notification-card.tone-success {
  border-left-color: var(--tone-success-text);
  background: linear-gradient(90deg, rgba(195, 255, 190, .68), #fff 46%);
}

.driver-trip-status-card.tone-warn,
.driver-notification-card.tone-warn {
  border-left-color: var(--tone-warn-text);
  background: linear-gradient(90deg, rgba(255, 243, 205, .8), #fff 46%);
}

.driver-trip-status-card.tone-danger,
.driver-notification-card.tone-danger {
  border-left-color: var(--tone-danger-text);
  background: linear-gradient(90deg, rgba(243, 211, 209, .8), #fff 46%);
}

.driver-trip-status-card.tone-route span,
.driver-notification-card.tone-route .driver-notification-status {
  color: var(--tone-route-text);
}

.driver-trip-status-card.tone-assigned span,
.driver-notification-card.tone-assigned .driver-notification-status {
  color: var(--tone-neutral-text);
}

.driver-trip-status-card.tone-active span,
.driver-notification-card.tone-active .driver-notification-status {
  color: var(--tone-active-text);
}

.driver-trip-status-card.tone-success span,
.driver-notification-card.tone-success .driver-notification-status {
  color: var(--tone-success-text);
}

.driver-trip-status-card.tone-warn span,
.driver-notification-card.tone-warn .driver-notification-status {
  color: var(--tone-warn-text);
}

.driver-trip-status-card.tone-danger span,
.driver-notification-card.tone-danger .driver-notification-status {
  color: var(--tone-danger-text);
}

.driver-trip-detail-section {
  display: grid;
  gap: 10px;
}

.driver-trip-detail-section h3 {
  margin: 0;
  color: #6b7280;
  font-size: 18px;
  letter-spacing: 0;
}

.driver-trip-detail-card {
  display: grid;
  gap: 0;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
}

.driver-trip-detail-field {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr) auto;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.driver-trip-detail-field:last-child {
  border-bottom: 0;
}

.driver-trip-detail-field strong {
  color: #1f1f22;
  font-size: 14px;
}

.driver-trip-detail-field span {
  min-width: 0;
  color: #2f3137;
  text-align: right;
  overflow-wrap: anywhere;
}

.driver-copy-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #6b7280;
  font-size: 18px;
  line-height: 1;
}

.driver-detail-note {
  display: grid;
  gap: 7px;
}

.driver-detail-note textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
}

.driver-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.driver-detail-actions .driver-outline-full {
  min-height: 44px;
  padding: 8px 10px;
  text-align: center;
  text-decoration: none;
}

.driver-detail-actions small {
  grid-column: 1 / -1;
  color: #64748b;
  text-align: center;
}

.driver-command-hub {
  display: grid;
  gap: 12px;
}

.driver-command-card {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.driver-command-card.current {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.driver-command-card span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.driver-command-card strong {
  color: #111827;
  font-size: 17px;
  line-height: 1.25;
}

.driver-command-card small {
  color: #475569;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.driver-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.driver-command-grid button,
.driver-command-grid a {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: #111827;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.driver-command-grid button:first-child,
.driver-command-grid a:first-child {
  background: #171517;
  color: #fff;
}

.driver-command-grid.secondary button {
  background: #f8fafc;
  color: #334155;
}

.driver-route-divider {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 22px;
}

.driver-notification-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-left: 5px solid var(--tone-neutral-text);
  border-radius: 8px;
  background: #fff;
  color: #374151;
}

.driver-notification-card strong {
  color: #111827;
  font-size: 18px;
}

.driver-notification-card span,
.driver-notification-card small {
  line-height: 1.35;
}

.driver-route-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #e5e7eb;
}

.driver-route-divider span {
  position: relative;
  z-index: 1;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 3px 8px;
  background: #fff;
  color: #4b5563;
  font-size: 12px;
}

.driver-passenger-row {
  border-top: 1px solid #e5e7eb;
  padding-top: 11px;
  font-size: 15px;
}

.driver-actions.vertical {
  display: grid;
  gap: 9px;
}

.driver-schedule-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 0;
  padding: 12px 0 0;
  overflow: hidden;
  text-align: center;
}

.driver-schedule-tabs button {
  min-height: 44px;
  border: 0;
  border-bottom: 4px solid transparent;
  background: transparent;
  color: #8b8b8b;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.driver-schedule-tabs button.active {
  border-bottom: 4px solid #2196f3;
  color: #111;
  font-weight: 650;
}

.schedule-card h2 {
  margin: 0;
  border: 0;
  padding: 0;
  font-size: 21px;
}

.driver-schedule-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schedule-card hr {
  width: 100%;
  border: 0;
  border-top: 1px solid #e5e7eb;
}

.driver-schedule-dot {
  justify-self: center;
  width: 4px;
  height: 28px;
  border-radius: 999px;
  background: repeating-linear-gradient(to bottom, #d1d5db 0 5px, transparent 5px 12px);
}

.driver-schedule-trip-list {
  display: grid;
  gap: 12px;
}

.driver-schedule-trip-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.driver-schedule-trip-card div {
  display: grid;
  gap: 3px;
}

.driver-schedule-trip-card strong {
  color: #111827;
  font-size: 16px;
}

.driver-schedule-trip-card span,
.driver-schedule-trip-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.settings-list {
  padding-left: 0;
  padding-right: 0;
}

.settings-list button,
.settings-list > a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 56px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 0 16px;
  box-shadow: none;
  color: #202124;
  text-align: left;
  text-decoration: none;
}

.settings-list button strong,
.settings-list > a strong {
  font-size: 16px;
}

.settings-list button span,
.settings-list > a span {
  color: #6b7280;
  font-size: 15px;
}

.settings-list .driver-settings-address {
  grid-template-columns: minmax(112px, .7fr) minmax(0, 1.3fr);
  gap: 14px;
  min-height: 72px;
}

.settings-list .driver-settings-address span {
  text-align: right;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.driver-version {
  margin-top: 28px;
  color: #8b8b8b;
  text-align: center;
  font-size: 13px;
}

.driver-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(440px, 100vw);
  min-height: 72px;
  padding: 8px 8px 10px;
  transform: translateX(-50%);
  border-radius: 18px 18px 0 0;
  background: #171517;
  box-shadow: 0 -8px 22px rgba(15, 23, 42, 0.18);
}

.driver-bottom-nav button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 11px;
}

.driver-bottom-nav .driver-nav-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: inherit;
  line-height: 1;
}

.driver-bottom-nav .driver-nav-icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.driver-bottom-nav small {
  color: inherit;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.1;
}

.driver-bottom-nav button.active {
  color: #22c7bd;
}

.driver-nav-unread-badge {
  position: absolute;
  top: 5px;
  right: calc(50% - 24px);
}

.driver-app-mode {
  background: #f6f8fb;
}

.driver-app-mode main {
  background: #f6f8fb;
}

.driver-mobile-shell {
  max-width: 440px;
  padding-bottom: 132px;
  background: #fbfcfe;
  box-shadow: none;
}

.driver-mobile-header {
  align-items: flex-start;
  min-height: 96px;
  padding: 24px 20px 14px;
  background: #111043;
  border-bottom: 0;
  color: #fff;
}

.driver-mobile-header strong {
  color: #fff;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.05;
}

.driver-mobile-header span {
  margin-top: 8px;
  color: rgba(255, 255, 255, .72);
  font-size: 15px;
}

.driver-header-actions {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 2px;
}

.driver-header-link {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.driver-bolt {
  flex-basis: 46px;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 44px;
}

.driver-route-board {
  gap: 12px;
  padding-top: 0;
  padding-bottom: 132px;
  background: #fbfcfe;
}

.driver-dashboard-screen,
.driver-schedule-screen,
.driver-settings-screen {
  background: #fbfcfe;
}

.driver-status-hero {
  justify-items: start;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  padding: 18px 19px;
  background: #eaf2ff;
  box-shadow: none;
  text-align: left;
}

.driver-status-hero span,
.driver-status-hero small,
.driver-settings-hero span {
  color: #80939d;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.driver-status-hero h1 {
  color: #34444c;
  font-size: 31px;
  font-weight: 420;
}

.driver-status-hero.online {
  background: #ecfff2;
}

.driver-status-hero.completed {
  background: #f4f7fa;
}

.driver-day-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  background: #ccd6df;
}

.driver-day-summary div {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 13px 12px;
  background: #fff;
}

.driver-day-summary span {
  color: #80939d;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.driver-day-summary strong {
  color: #34444c;
  font-size: 26px;
  font-weight: 430;
  line-height: 1;
}

.driver-info-card {
  border: 0;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px #e6edf3;
}

.driver-info-row {
  min-height: 38px;
}

.driver-timeline-stop {
  border-radius: 8px;
  background: #eaf2ff;
}

.driver-timeline-stop.status-completed,
.driver-timeline-stop.status-complete,
.driver-timeline-stop.status-cancelled,
.driver-timeline-stop.status-no_show {
  background: #f4f7fa;
  color: #80939d;
}

.driver-timeline-stop.status-en_route_to_pickup,
.driver-timeline-stop.status-en_route_to_dropoff,
.driver-timeline-stop.status-arrived_at_pickup,
.driver-timeline-stop.status-arrived_at_dropoff {
  background: #fff7d7;
  color: #34444c;
}

.driver-route-tabs {
  display: flex;
  align-items: end;
  gap: 0;
  min-height: 62px;
  margin: -16px -18px 0;
  padding: 0 18px;
  background: #111043;
}

.driver-route-tabs button {
  min-height: 46px;
  border: 0;
  border-bottom: 5px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, .48);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.driver-route-tabs button + button::before {
  content: "|";
  display: inline-block;
  margin: 0 10px 0 2px;
  color: rgba(255, 255, 255, .34);
}

.driver-route-tabs button.active {
  border-bottom-color: #ffc400;
  color: #fff;
}

.driver-complete-banner {
  display: grid;
  gap: 7px;
  padding: 18px 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e6edf3;
  text-align: center;
}

.driver-complete-banner strong {
  color: #07880d;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: .02em;
}

.driver-complete-banner span {
  color: #80939d;
  font-size: 15px;
}

.driver-completed-route-list {
  display: grid;
  gap: 8px;
}

.driver-completed-route-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 82px;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: #eaf2ff;
  color: #34444c;
  text-align: left;
}

.driver-completed-route-row > span {
  font-size: 25px;
  font-weight: 430;
}

.driver-completed-route-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.driver-completed-route-row strong {
  font-size: 21px;
  font-weight: 430;
  overflow-wrap: anywhere;
}

.driver-completed-route-row small {
  color: #80939d;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.driver-completed-route-row b {
  color: #07880d;
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

.driver-trip-selector {
  padding: 10px 0 2px;
}

.driver-trip-selector button {
  border-radius: 4px;
  padding: 8px 13px;
  background: #eef4ff;
  color: #34444c;
}

.driver-trip-selector button.active {
  border-color: #5a8cff;
  background: #e8f0ff;
  color: #1f4fbf;
}

.driver-route-time-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.driver-route-time-row strong {
  color: #34444c;
  font-size: 28px;
  font-weight: 450;
  line-height: 1;
}

.driver-info-link {
  min-height: 42px;
  border: 0;
  background: transparent;
  color: #5b8cff;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
}

.driver-ride-card {
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.driver-ride-card.tone-assigned,
.driver-ride-card.tone-route,
.driver-ride-card.tone-active,
.driver-ride-card.tone-success,
.driver-ride-card.tone-warn,
.driver-ride-card.tone-danger {
  background: transparent;
}

.driver-ride-top {
  padding: 0;
}

.driver-status-pill,
.driver-window-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 4px;
  padding: 5px 9px;
  background: #eef4ff;
  color: #34444c;
  font-size: 13px;
  font-weight: 750;
}

.driver-stop-list {
  display: grid;
  overflow: hidden;
  border-radius: 8px;
  background: #eaf2ff;
}

.driver-stop-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-height: 96px;
  padding: 15px 16px;
  border-bottom: 2px solid rgba(255, 255, 255, .9);
}

.driver-stop-row:last-child {
  border-bottom: 0;
}

.driver-stop-row > div {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.driver-stop-row strong {
  color: #34444c;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.1;
}

.driver-stop-row span {
  color: #34444c;
  font-size: 16px;
  font-weight: 430;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.driver-stop-row a {
  display: grid;
  justify-items: end;
  gap: 12px;
  min-width: 82px;
  color: #34444c;
  text-decoration: none;
}

.driver-stop-row b {
  font-size: 19px;
  font-weight: 650;
  line-height: 1.1;
}

.driver-stop-row i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .74);
  color: #5b8cff;
  font-style: normal;
  font-size: 20px;
}

.driver-ride-prompt {
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #edf1f6;
}

.driver-passenger-row {
  display: grid;
  gap: 4px;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #edf1f6;
}

.driver-cancel-link {
  justify-self: start;
  min-height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #b42318;
  font-size: 14px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.driver-actions.vertical {
  margin-top: 2px;
}

.driver-primary-pill,
.driver-outline-full,
.driver-outline-pill {
  border-radius: 7px;
}

.driver-primary-pill {
  background: #111043;
}

.driver-primary-pill.is-loading,
.driver-outline-full.is-loading,
.driver-outline-pill.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: .82;
}

.driver-action-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, .5);
  border-top-color: #fff;
  border-radius: 999px;
  animation: driver-action-spin .72s linear infinite;
}

.driver-next-move-actions .driver-primary-pill.is-loading .driver-action-spinner {
  border-color: rgba(109, 30, 189, .24);
  border-top-color: #6d1ebd;
}

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

.driver-next-move {
  position: fixed;
  left: 50%;
  bottom: 66px;
  z-index: 39;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: min(424px, calc(100vw - 20px));
  min-height: 74px;
  padding: 10px 12px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 0;
  background: #bf45f4;
  color: #fff;
  box-shadow: 0 -5px 18px rgba(17, 16, 67, .14);
}

.driver-next-move.tone-assigned,
.driver-next-move.tone-route,
.driver-next-move.tone-active,
.driver-next-move.tone-success,
.driver-next-move.tone-warn,
.driver-next-move.tone-danger {
  border: 0;
  background: #bf45f4;
  box-shadow: 0 -5px 18px rgba(17, 16, 67, .14);
}

.driver-next-move.action-start,
.driver-next-move.action-start-dropoff {
  background: #2f62ff;
}

.driver-next-move.action-arrived-pickup,
.driver-next-move.action-arrived-dropoff {
  background: #ffbc00;
}

.driver-next-move.action-pickup,
.driver-next-move.action-pickup-same-stop {
  background: #30b700;
}

.driver-next-move.action-complete {
  background: #34484f;
}

.driver-next-move.action-arrived-pickup .driver-next-move-actions .driver-primary-pill,
.driver-next-move.action-arrived-pickup .driver-next-move-actions .driver-nav-button,
.driver-next-move.action-arrived-dropoff .driver-next-move-actions .driver-primary-pill,
.driver-next-move.action-arrived-dropoff .driver-next-move-actions .driver-nav-button {
  color: #735000;
}

.driver-next-move-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 3px solid #fff;
  border-radius: 999px;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.driver-next-move > div:first-of-type {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.driver-next-move > div:first-of-type > span,
.driver-next-move.tone-assigned > div:first-of-type > span,
.driver-next-move.tone-route > div:first-of-type > span,
.driver-next-move.tone-active > div:first-of-type > span,
.driver-next-move.tone-success > div:first-of-type > span,
.driver-next-move.tone-warn > div:first-of-type > span,
.driver-next-move.tone-danger > div:first-of-type > span {
  color: #fff;
  font-size: 21px;
  font-weight: 420;
  text-transform: none;
}

.driver-next-move strong {
  color: #fff;
  font-size: 16px;
  font-weight: 420;
  line-height: 1.15;
}

.driver-next-move small {
  display: none;
}

.driver-next-move-actions {
  grid-column: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.driver-next-move-actions .driver-primary-pill,
.driver-next-move-actions .driver-nav-button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 5px;
  padding: 8px 11px;
  background: #fff;
  color: #6d1ebd;
  font-size: 13px;
  font-weight: 800;
}

.driver-next-move-actions .driver-nav-button {
  display: none;
}

.driver-bottom-nav {
  min-height: 64px;
  padding: 6px 8px 7px;
  border-radius: 0;
  background: #111043;
}

.driver-bottom-nav button.active {
  color: #ffc400;
}

.driver-chat-card {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(17, 16, 67, .1);
}

.driver-chat-header {
  background: #111043;
}

.driver-chat-header strong {
  color: #fff;
}

.driver-chat-header span {
  color: rgba(255, 255, 255, .66);
}

.driver-message-composer {
  padding: 10px;
  background: #fff;
}

.driver-message-composer textarea {
  border-radius: 7px;
}

.driver-schedule-tabs {
  border: 0;
  border-radius: 8px;
  background: #111043;
  box-shadow: none;
}

.driver-schedule-tabs button {
  color: rgba(255, 255, 255, .58);
}

.driver-schedule-tabs button.active {
  border-bottom-color: #ffc400;
  color: #fff;
}

.driver-schedule-route-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 8px;
  background: #eaf2ff;
}

.driver-schedule-route-summary span {
  color: #80939d;
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

.driver-schedule-route-summary strong {
  color: #34444c;
  font-size: 18px;
  font-weight: 500;
}

.driver-settings-hero {
  display: grid;
  gap: 7px;
  min-height: 92px;
  padding: 17px 16px;
  background: #eaf2ff;
}

.driver-settings-hero strong {
  color: #34444c;
  font-size: 23px;
  font-weight: 430;
  line-height: 1.15;
}

/* Driver app rollback: keep the original Stellar flow with cleaner SafeRide-inspired polish. */
.driver-app-mode {
  background: #f4f7fb;
}

.driver-mobile-shell {
  max-width: 440px;
  min-height: 100dvh;
  padding-bottom: 86px;
  background: #f4f7fb;
  color: #172033;
  box-shadow: none;
}

.driver-mobile-header {
  align-items: center;
  min-height: 86px;
  padding: 18px 18px 14px;
  border-bottom: 0;
  background: #111043;
  color: #fff;
}

.driver-mobile-header strong {
  color: #fff;
  font-size: 21px;
  font-weight: 750;
  line-height: 1.1;
}

.driver-mobile-header span {
  margin-top: 5px;
  color: rgba(255, 255, 255, .76);
  font-size: 14px;
}

.driver-header-actions {
  align-items: center;
  gap: 8px;
  margin: 0;
}

.driver-header-link,
.driver-bolt {
  min-height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.driver-bolt {
  width: 40px;
  font-size: 22px;
}

.driver-mobile-content,
.driver-wizard .driver-mobile-content {
  gap: 14px;
  padding: 14px 14px 94px;
}

.driver-dashboard-screen,
.driver-schedule-screen,
.driver-settings-screen,
.driver-route-board {
  background: #f4f7fb;
}

.driver-route-board {
  gap: 12px;
  padding-bottom: 94px;
}

.driver-status-hero,
.driver-start-card,
.driver-info-card,
.driver-chat-card,
.driver-ride-card {
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}

.driver-status-hero {
  justify-items: start;
  gap: 8px;
  padding: 16px;
}

.driver-status-hero h1 {
  color: #172033;
  font-size: 24px;
  font-weight: 760;
  line-height: 1.15;
}

.driver-day-summary {
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.driver-route-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: auto;
  margin: 0;
  padding: 0;
  background: transparent;
}

.driver-route-tabs button {
  min-height: 44px;
  border: 1px solid rgba(17, 24, 39, .1);
  border-radius: 8px;
  background: #fff;
  color: #667085;
  font-size: 16px;
  font-weight: 800;
}

.driver-route-tabs button + button::before {
  content: none;
}

.driver-route-tabs button.active {
  border-color: #111043;
  background: #111043;
  color: #fff;
}

.driver-trip-selector {
  gap: 8px;
}

.driver-trip-selector button {
  min-height: 48px;
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  font-weight: 850;
}

.driver-trip-selector button.active {
  border-color: #ffc400;
  box-shadow: inset 0 -4px 0 #ffc400;
}

.driver-next-move {
  display: none;
}

.driver-ride-card {
  gap: 12px;
  padding: 14px;
  overflow: hidden;
}

.driver-route-time-row strong {
  color: #172033;
  font-size: 26px;
  font-weight: 760;
}

.driver-info-link {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 10px;
  background: #eef4ff;
  color: #315dbf;
  font-size: 13px;
  font-weight: 850;
}

.driver-ride-top {
  gap: 8px;
  padding: 0;
}

.driver-status-pill,
.driver-window-label {
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 850;
}

.driver-ride-metrics {
  gap: 6px;
}

.driver-ride-metrics span {
  border-radius: 999px;
  background: #f2f5fa;
  color: #475467;
  font-size: 12px;
}

.driver-stop-list {
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 8px;
  background: #f8fbff;
}

.driver-stop-row {
  min-height: 86px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(17, 24, 39, .08);
  background: transparent;
}

.driver-stop-row > div {
  gap: 6px;
}

.driver-stop-row strong {
  color: #172033;
  font-size: 17px;
  font-weight: 850;
}

.driver-stop-row span {
  color: #475467;
  font-size: 14px;
  font-weight: 520;
  line-height: 1.35;
}

.driver-stop-row b {
  color: #172033;
  font-size: 15px;
  font-weight: 850;
}

.driver-stop-row i {
  width: 34px;
  height: 34px;
  background: #fff;
  color: #315dbf;
  box-shadow: 0 4px 12px rgba(49, 93, 191, .14);
}

.driver-stop-row.is-locked-stop {
  cursor: not-allowed;
  background: #f1f3f6;
  opacity: .68;
}

.driver-stop-row.is-locked-stop strong,
.driver-stop-row.is-locked-stop span,
.driver-stop-row.is-locked-stop b {
  color: #8b95a1;
}

.driver-stop-locked-control {
  display: grid;
  justify-items: end;
  gap: 12px;
  min-width: 82px;
  color: #8b95a1;
}

.driver-stop-row.is-locked-stop i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #e3e7ee;
  color: #9aa4b2;
  font-style: normal;
  box-shadow: none;
}

.driver-passenger-row,
.driver-ride-prompt {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: none;
}

.driver-ride-prompt {
  border-color: rgba(255, 196, 0, .42);
  background: #fff8df;
}

.driver-ride-prompt span {
  color: #7a5a00;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-ride-prompt strong {
  color: #172033;
  font-size: 17px;
}

.driver-ride-prompt small {
  color: #475467;
  line-height: 1.35;
}

.driver-actions.vertical {
  gap: 9px;
  margin-top: 0;
}

.driver-top-action {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 8px;
  margin: 2px 0;
}

.driver-primary-pill,
.driver-outline-full,
.driver-outline-pill {
  border-radius: 8px;
}

.driver-primary-pill.full,
.driver-outline-full {
  min-height: 48px;
}

.driver-actions.vertical,
.driver-primary-pill[data-driver-ride-action] {
  position: relative;
  z-index: 3;
  pointer-events: auto;
  touch-action: manipulation;
}

.driver-bottom-nav {
  grid-template-columns: repeat(5, 1fr);
  min-height: 70px;
  padding: 7px 6px 8px;
  border-radius: 0;
  background: #111043;
}

.driver-bottom-nav .driver-nav-icon,
.driver-bottom-nav .driver-nav-icon svg {
  width: 27px;
  height: 27px;
}

.driver-bottom-nav small {
  font-size: 10px;
}

.driver-bottom-nav button.active {
  color: #ffc400;
}

@media (max-width: 390px) {
  .driver-mobile-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .driver-route-tabs button,
  .driver-trip-selector button {
    font-size: 14px;
  }

  .driver-stop-row strong,
  .driver-stop-row b {
    font-size: 15px;
  }

  .driver-stop-row span {
    font-size: 13px;
  }
}

.driver-wizard {
  background: #fbfcfe;
}

.driver-wizard-header {
  border-bottom: 0;
  background: #111043;
  box-shadow: none;
}

.driver-wizard-header strong,
.driver-wizard-header button {
  color: #fff;
}

.driver-progress {
  background: #111043;
}

.driver-wizard-step {
  gap: 16px;
  padding-top: 20px;
}

.driver-step-label {
  color: #80939d;
  font-size: 14px;
  text-transform: uppercase;
}

.driver-wizard-step h1 {
  color: #34444c;
  font-size: 29px;
  font-weight: 430;
}

@media (max-width: 390px) {
  .driver-mobile-header {
    padding-left: 20px;
    padding-right: 20px;
  }

  .driver-route-tabs button {
    font-size: 23px;
  }

  .driver-stop-row strong,
  .driver-stop-row b {
    font-size: 24px;
  }

  .driver-stop-row span {
    font-size: 22px;
  }

  .driver-next-move {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }
}

.driver-wizard {
  min-height: 100dvh;
  background: #fbfcfe;
}

.driver-wizard-header {
  position: sticky;
  top: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px 16px;
  border-bottom: 0;
  background: #111043;
  box-shadow: none;
}

.driver-wizard-header strong {
  color: #fff;
  font-size: 20px;
}

.driver-wizard-header button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.driver-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 18px 18px 4px;
}

.driver-progress span {
  height: 5px;
  border-radius: 999px;
  background: #e5e5e5;
}

.driver-progress span.active {
  background: #22c7bd;
}

.driver-step-label {
  color: #22c7bd;
  font-size: 15px;
}

.driver-muted {
  margin: 0;
  color: #666;
  font-size: 16px;
  line-height: 1.3;
}

.driver-assessment-form {
  display: grid;
  gap: 12px;
}

.driver-assessment-form h3 {
  margin: 10px -18px 4px;
  padding: 10px 18px;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
}

.driver-assessment-form label {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  color: #1f1f22;
  font-weight: 800;
}

.driver-assessment-form select,
.driver-assessment-form input,
.driver-assessment-form textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: #111827;
  font: inherit;
}

.driver-assessment-form textarea {
  min-height: 96px;
  resize: vertical;
}

.driver-signature-pad {
  width: 100%;
  min-height: 260px;
  border: 2px solid #252525;
  border-radius: 6px;
  background: #fff;
  touch-action: none;
  box-shadow: inset 0 0 0 1px #9ca3af;
}

.linkish {
  justify-self: start;
  color: #169bd5;
  font-size: 14px;
  font-weight: 850;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  max-width: min(420px, calc(100vw - 36px));
  border-radius: 8px;
  padding: 12px 14px;
  background: #102a43;
  color: #fff;
  box-shadow: var(--shadow);
}

@media (max-width: 1100px) {
  .topbar {
    flex-wrap: wrap;
  }

  .brand {
    min-width: min(100%, 260px);
  }

  .tabs {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .dispatch-ops,
  .dispatch-layout,
  .dispatch-layout.unassigned-collapsed,
  .dispatch-email-shell,
  .map-shell,
  .driver-portal {
    grid-template-columns: 1fr;
  }

  .dispatch-email-shell {
    grid-template-areas:
      "compose"
      "threads"
      "conversation";
    height: auto;
  }

  .dispatch-email-compose-grid,
  .dispatch-email-schedule-card {
    grid-template-columns: 1fr;
  }

  .dispatch-email-compose-head,
  .dispatch-email-section-title {
    align-items: flex-start;
  }

  .dispatch-email-send-cluster {
    justify-content: flex-start;
    min-width: 0;
  }

  .dispatch-email-send-cluster .primary {
    min-width: 118px;
  }

  .email-message.outbound,
  .email-message.inbound {
    margin-left: 0;
    margin-right: 0;
  }

  .dispatch-email-compose,
  .dispatch-email-thread-list,
  .dispatch-email-message-panel {
    overflow: visible;
  }

  .dispatch-sidebar {
    position: static;
    min-height: auto;
    max-height: none;
  }

  .unassigned-panel.collapsed {
    min-height: auto;
    max-height: none;
    flex-direction: row;
    writing-mode: horizontal-tb;
    justify-content: space-between;
  }

  .board-topline {
    grid-template-columns: 1fr;
    grid-template-areas:
      "date"
      "strip"
      "search"
      "filters"
      "operations"
      "stats";
  }

  .assigned-search,
  .crew-schedule-search {
    min-width: 0;
    width: 100%;
  }

  .dispatch-main {
    min-height: auto;
    max-height: none;
    overflow: visible;
  }

  .map-driver-panel,
  .map-workspace {
    min-height: auto;
  }

  .map-driver-list {
    max-height: 280px;
  }

  .map-canvas {
    min-height: 430px;
  }

  .metric-pills {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dispatch-date-strip {
    grid-template-columns: repeat(7, minmax(82px, 1fr));
  }

  .crew-schedule-tabs,
  .crew-schedule-datebar {
    align-items: stretch;
  }

  .crew-schedule-toolbar,
  .crew-date-controls,
  .crew-week-strip {
    width: 100%;
  }

  .crew-schedule-board {
    grid-template-columns: 190px minmax(760px, 1fr);
    min-width: 960px;
  }

  .sidebar {
    position: static;
    max-height: none;
  }

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

  .audit-control-head {
    align-items: stretch;
    flex-direction: column;
  }

  .audit-control-metrics,
  .audit-control-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar,
  .module-header {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions button {
    flex: 1;
  }

  .audit-control-metrics,
  .audit-control-details,
  .billing-summary-grid {
    grid-template-columns: 1fr;
  }

  .map-canvas {
    min-height: 360px;
  }

  .map-search-box {
    top: 12px;
    left: 12px;
    width: min(260px, calc(100% - 112px));
  }

  .map-fit-active {
    top: 60px;
    left: 12px;
  }

  .map-layer-toggle {
    top: 12px;
    right: 12px;
  }

  .map-layer-toggle button {
    min-height: 38px;
    padding: 0 11px;
  }

  .map-active-card-panel {
    order: -1;
    padding: 10px;
  }

  .map-active-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-active-card-head .map-home-button {
    width: 100%;
  }

  .map-active-driver-cards {
    grid-auto-columns: minmax(246px, 86vw);
  }

  .map-active-driver-card {
    min-height: 156px;
  }

  .map-card-metrics {
    grid-template-columns: 70px minmax(0, 1fr) 78px;
  }

  .brand span {
    display: none;
  }

  .tabs {
    top: 132px;
    gap: 4px;
    padding: 8px 10px;
  }

  .form-grid,
  .csv-import-form,
  .date-range-fields,
  .messaging-shell,
  .message-recipient-grid,
  .report-filters,
  .report-summary-grid,
  .report-chart-grid,
  .org-settings-section,
  .org-section-grid,
  .org-checkbox-grid,
  .stellar-run-summary,
  .filters,
  .metrics {
    grid-template-columns: 1fr;
  }

  main {
    padding: 10px;
  }

  .date-cluster,
  .crew-date-controls {
    align-items: stretch;
  }

  .message-chat-panel {
    min-height: 520px;
  }

  .message-composer {
    grid-template-columns: 1fr;
  }

  .message-bubble {
    max-width: 100%;
  }

  .date-cluster .date-picker,
  .crew-date-controls .date-picker {
    flex: 1 1 150px;
    width: auto;
  }

  .today-button {
    flex: 1 1 120px;
  }

  .metric-pill {
    font-size: 10px;
  }

  .unassigned-card {
    grid-template-columns: 22px minmax(0, 1fr);
    padding: 7px 8px 7px 6px;
  }

  .unassigned-trip-select {
    grid-column: 1;
    grid-row: 1;
    position: static;
    justify-self: center;
    align-self: center;
    width: 14px;
    height: 14px;
    transform: none;
  }

  .unassigned-card .ride-title-row {
    flex-wrap: nowrap;
    gap: 7px;
  }

  .unassigned-card-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .unassigned-card .mobility-token {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-left: 0;
    padding: 4px 8px;
    font-size: 10px;
  }

  .trip-time-pill {
    min-width: 62px;
    padding: 4px 8px;
    font-size: 11px;
  }

  .dispatch-date-strip {
    display: flex;
  }

  .dispatch-date-chip {
    flex: 0 0 88px;
  }

  .crew-schedule-page {
    padding: 10px;
  }

  .crew-week-strip {
    grid-template-columns: repeat(7, minmax(36px, 1fr));
    gap: 4px;
    min-width: 0;
  }

  .crew-week-strip strong {
    width: 28px;
    height: 28px;
  }

  .crew-week-strip span {
    font-size: 11px;
  }

  .crew-schedule-board {
    grid-template-columns: 150px minmax(620px, 1fr);
    min-width: 770px;
  }

  .bar-row {
    grid-template-columns: minmax(70px, 96px) minmax(0, 1fr) minmax(52px, auto);
    gap: 8px;
  }

  .report-chart-card {
    overflow: hidden;
  }

  .crew-vehicle-cell {
    padding: 10px 8px;
  }

  .crew-shift-block {
    min-width: 140px;
    padding: 8px 10px;
  }

  .table-wrap,
  .crew-schedule-wrap {
    max-width: 100%;
    overflow: auto;
  }

  .board {
    max-height: none;
  }
}

@media (max-width: 480px) {
  .trip-footer-actions {
    grid-template-columns: 1fr 1fr;
  }

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

  .top-actions button:first-child {
    grid-column: 1 / -1;
  }

  .compact-menu-body {
    left: 0;
    right: auto;
    width: min(280px, calc(100vw - 32px));
  }

  .crew-schedule-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .crew-schedule-toolbar .segmented-control,
  .crew-schedule-toolbar .crew-schedule-search {
    grid-column: 1 / -1;
  }
}

/* Final mobile driver override: Stellar flow, SafeRide polish, no oversized copied layout. */
.driver-mobile-shell {
  padding-bottom: 86px;
  background: #f4f7fb;
}

.driver-mobile-content,
.driver-route-board {
  padding-bottom: 94px;
}

.driver-route-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: auto;
  margin: 0;
  padding: 0;
  background: transparent;
}

.driver-route-tabs button {
  min-height: 44px;
  border: 1px solid rgba(17, 24, 39, .1);
  border-radius: 8px;
  background: #fff;
  color: #667085;
  font-size: 16px;
  font-weight: 800;
}

.driver-route-tabs button + button::before {
  content: none;
}

.driver-route-tabs button.active {
  border-color: #111043;
  background: #111043;
  color: #fff;
}

.driver-ride-card {
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}

.driver-stop-row {
  min-height: 78px;
  padding: 12px 13px;
}

.driver-stop-row > div {
  gap: 5px;
}

.driver-stop-row strong {
  font-size: 16px;
  font-weight: 850;
  line-height: 1.16;
}

.driver-stop-row span {
  font-size: 14px;
  font-weight: 520;
  line-height: 1.32;
}

.driver-stop-row b {
  font-size: 15px;
  font-weight: 850;
}

.driver-passenger-row,
.driver-ride-prompt {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: none;
}

.driver-ride-prompt {
  border-color: rgba(255, 196, 0, .42);
  background: #fff8df;
}

.driver-actions.vertical {
  gap: 9px;
}

.driver-next-move {
  display: none;
}

.driver-bottom-nav {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 390px) {
  .driver-route-tabs button {
    font-size: 14px;
  }

  .driver-stop-row strong,
  .driver-stop-row b {
    font-size: 15px;
  }

  .driver-stop-row span {
    font-size: 13px;
  }
}

.driver-mobile-brand {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.driver-mobile-logo {
  display: block;
  width: min(214px, 56vw);
  height: 58px;
  object-fit: contain;
  object-position: left center;
  background: transparent;
}

.driver-mobile-header .driver-mobile-brand span {
  margin-top: 0;
}

@media (max-width: 380px) {
  .driver-mobile-logo {
    width: min(184px, 52vw);
    height: 50px;
  }
}

html.native-driver-runtime,
html.native-driver-runtime body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior: none;
  background: #f4f7fb;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

html.native-driver-runtime input,
html.native-driver-runtime textarea {
  user-select: text;
}

html.native-driver-runtime .login-screen {
  align-items: stretch;
  justify-content: stretch;
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background:
    linear-gradient(180deg, #111043 0 34%, #f4f7fb 34% 100%);
}

html.native-driver-runtime .login-panel {
  width: 100%;
  max-width: none;
  min-height: calc(100dvh - max(44px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom)));
  margin: 0;
  padding: 28px 20px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html.native-driver-runtime .login-panel .brand-mark {
  width: min(240px, 68vw);
  height: 78px;
  margin: 6px auto 18px;
  object-position: center;
}

html.native-driver-runtime .login-panel h1,
html.native-driver-runtime .login-panel p {
  text-align: center;
}

html.native-driver-runtime .login-panel h1 {
  color: #fff;
  font-size: 30px;
}

html.native-driver-runtime .login-panel p {
  max-width: 330px;
  margin: 8px auto 26px;
  color: rgba(255, 255, 255, .78);
}

html.native-driver-runtime #login-form {
  display: grid;
  gap: 13px;
  padding: 18px;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .14);
}

html.native-driver-runtime #login-form input {
  min-height: 54px;
  border-radius: 8px;
  font-size: 16px;
}

html.native-driver-runtime #login-submit-button,
html.native-driver-runtime #forgot-password-button {
  min-height: 54px;
  border-radius: 8px;
  font-size: 16px;
}

html.native-driver-runtime .demo-users {
  display: none;
}

html.native-driver-runtime .driver-app-mode,
html.native-driver-runtime .driver-app-mode main,
html.native-driver-runtime .driver-mobile-shell {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  background: #f4f7fb;
}

html.native-driver-runtime .driver-mobile-shell {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

html.native-driver-runtime .driver-mobile-header {
  position: sticky;
  top: 0;
  min-height: calc(82px + env(safe-area-inset-top));
  padding: calc(14px + env(safe-area-inset-top)) 18px 12px;
  border-radius: 0;
  background: #111043;
  box-shadow: 0 8px 18px rgba(17, 16, 67, .16);
}

html.native-driver-runtime .driver-mobile-content,
html.native-driver-runtime .driver-wizard .driver-mobile-content {
  padding-right: max(14px, env(safe-area-inset-right));
  padding-left: max(14px, env(safe-area-inset-left));
}

html.native-driver-runtime .driver-bottom-nav {
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: none;
  min-height: calc(72px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-radius: 0;
  box-shadow: 0 -10px 28px rgba(15, 23, 42, .16);
}

html.native-driver-runtime .driver-primary-pill,
html.native-driver-runtime .driver-outline-full,
html.native-driver-runtime .driver-bottom-nav button,
html.native-driver-runtime .driver-route-tabs button,
html.native-driver-runtime .driver-stop-row,
html.native-driver-runtime .driver-settings-address {
  touch-action: manipulation;
}

/* Driver Chrome/PWA shell: do not render the driver app as a narrow preview column. */
.driver-app-mode {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  background: #f4f7fb;
}

.driver-app-mode main,
.driver-app-mode .module-view,
.driver-app-mode #driver-view {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.driver-app-mode .driver-mobile-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  box-shadow: none;
}

.driver-app-mode .driver-mobile-header {
  width: 100%;
  border-radius: 0;
}

.driver-app-mode .driver-mobile-content,
.driver-app-mode .driver-wizard .driver-mobile-content,
.driver-app-mode .driver-route-board {
  width: 100%;
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
}

.driver-app-mode .driver-bottom-nav {
  right: 0;
  left: 0;
  width: 100%;
  max-width: none;
  transform: none;
}

@media (max-width: 820px), (pointer: coarse) {
  .driver-app-mode .driver-mobile-content,
  .driver-app-mode .driver-wizard .driver-mobile-content,
  .driver-app-mode .driver-route-board {
    max-width: none;
  }
}

.billing-trip-finder {
  display: grid;
  gap: 14px;
  min-width: min(1120px, 86vw);
}

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

.billing-summary-grid span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.billing-summary-grid small {
  color: var(--muted);
  font-size: 0.78rem;
}

.billing-summary-grid strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.billing-trip-table {
  max-height: 52vh;
  overflow: auto;
}

.billing-trip-table th,
.billing-trip-table td {
  white-space: nowrap;
}

.billing-row-blocked {
  color: var(--muted);
  background: #f8fafc;
}

.billing-row-blocked td:last-child {
  color: #991b1b;
  font-weight: 700;
}

.billing-audit-panel .module-header {
  align-items: center;
}

.pricing-audit-panel {
  display: grid;
  gap: 14px;
  min-width: min(1160px, 88vw);
}

.pricing-audit-panel > label {
  max-width: 240px;
}

.pricing-audit-table td:nth-child(2),
.pricing-audit-table td:nth-child(4),
.pricing-audit-table td:nth-child(8) {
  font-weight: 700;
  color: var(--ink);
}

.pricing-audit-table td:last-child {
  max-width: 280px;
  white-space: normal;
}

@media (max-width: 760px) {
  .billing-trip-finder {
    min-width: 0;
  }

  .billing-summary-grid {
    grid-template-columns: 1fr;
  }

  .pricing-audit-panel {
    min-width: 0;
  }
}
