:root {
  --blue: #1e3a8a;
  --blue-dark: #172554;
  --red: #dc2626;
  --green: #16a34a;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --surface: #ffffff;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  color: var(--ink);
  background: #eef2f7;
  overscroll-behavior: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.app-header {
  position: relative;
  z-index: 10;
  display: flex;
  height: calc(52px + env(safe-area-inset-top));
  min-height: calc(52px + env(safe-area-inset-top));
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: env(safe-area-inset-top) clamp(12px, 2vw, 22px) 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--blue);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong {
  color: var(--red);
}

.app-header nav {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
}

.app-shell {
  width: 100%;
  height: calc(100dvh - 52px - env(safe-area-inset-top));
  margin: 0 auto;
  overflow: hidden;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}

#app-panel {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

#app-alert {
  position: fixed;
  z-index: 40;
  top: calc(60px + env(safe-area-inset-top));
  right: 12px;
  width: min(420px, calc(100% - 24px));
  margin: 0;
  box-shadow: var(--shadow);
}

.login-card,
.panel,
.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card {
  max-width: 560px;
  margin: 8vh auto 0;
  padding: clamp(24px, 5vw, 42px);
}

.kicker {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 1.25rem;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.primary-button,
.ghost-button,
.small-button,
.danger-button,
.success-button,
.icon-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

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

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

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

.danger-button {
  color: #fff;
  background: var(--red);
}

.success-button {
  color: #fff;
  background: var(--green);
}

.icon-button {
  width: 42px;
  padding: 0;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}

.small-button,
.danger-button,
.success-button {
  min-height: 44px;
  padding: 8px 10px;
  font-size: 0.86rem;
}

.help-text {
  min-height: 24px;
  margin: 14px 0 0;
  font-size: 0.92rem;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.staff-login {
  display: grid;
  gap: 12px;
}

.staff-login .ghost-button {
  width: 100%;
}

.optional {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.field-help {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.workspace-top {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.workspace-top h1 {
  margin-bottom: 2px;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
}

.workspace-top .kicker {
  display: none;
}

.workspace-top p {
  margin-bottom: 0;
  font-size: 0.74rem;
  line-height: 1.3;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  max-width: 42vw;
  padding: 6px 10px;
  color: var(--blue);
  background: #fff;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.warning-box {
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 14px 16px;
  color: #713f12;
  background: #fffbeb;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 7px;
}

.stat {
  min-height: 50px;
  padding: 7px 10px;
  box-shadow: none;
}

.stat-button {
  display: block;
  border: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.stat-button:hover {
  border-color: var(--blue);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.stat strong {
  display: block;
  margin-top: 1px;
  color: var(--blue);
  font-size: 1.18rem;
}

.stat strong.stat-copy {
  font-size: 1rem;
}

.calendar-workspace {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: clamp(190px, 18vw, 230px) minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  overflow: hidden;
}

.calendar-sidebar {
  display: grid;
  min-height: 0;
  grid-auto-rows: minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
}

.panel {
  margin-bottom: 8px;
  padding: clamp(16px, 3vw, 22px);
}

.calendar-panel {
  display: flex;
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  padding: 9px 10px 10px;
  box-shadow: none;
}

.calendar-sidebar .panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  padding: 9px;
  box-shadow: none;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.panel-head--action {
  align-items: flex-start;
}

.panel-head p {
  margin-bottom: 0;
  font-size: 0.72rem;
  line-height: 1.35;
}

.stack {
  display: grid;
  min-height: 0;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.request-row {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  background: var(--soft);
  cursor: pointer;
}

.request-row:hover {
  border-color: #f59e0b;
  background: #fffbeb;
}

.request-row span {
  display: grid;
  gap: 3px;
}

.request-row__top {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.request-row b {
  color: var(--red);
  font-size: 0.76rem;
}

.request-row strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.request-row small,
.request-row em,
.driver-key small {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.35;
}

.request-row em {
  color: #92400e;
  font-weight: 800;
}

.driver-key {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
}

.driver-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-height: 58px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  text-align: left;
  background: var(--soft);
  cursor: pointer;
}

.driver-card:hover,
.driver-card:focus-visible {
  border-color: var(--blue);
}

.driver-card--needs-login {
  border-color: #f59e0b;
  background: #fffbeb;
}

.driver-card--needs-login em {
  color: #92400e;
}

.driver-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
}

.driver-card > span:last-child {
  display: grid;
}

.driver-card small,
.driver-card em {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
}

.fleet-roster {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.fleet-roster summary {
  padding: 8px 10px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.fleet-roster dl {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.fleet-roster dl div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  font-size: 0.68rem;
}

.fleet-roster dl div + div {
  border-top: 1px solid #f1f5f9;
}

.fleet-roster dt {
  font-weight: 800;
}

.fleet-roster dd {
  margin: 0;
  color: var(--muted);
}

.driver-card em {
  color: var(--blue);
  font-weight: 800;
}

.driver-dot {
  grid-row: 1 / 3;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
}

#jobs-calendar {
  --fc-border-color: #dbe3ef;
  --fc-page-bg-color: #ffffff;
  --fc-today-bg-color: #eff6ff;
  --fc-small-font-size: 0.78rem;
  color: var(--ink);
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  flex: 0 0 auto;
  gap: 4px 10px;
  margin-bottom: 5px;
  color: #475569;
  font-size: 0.64rem;
  font-weight: 700;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-edit-hint {
  margin-left: auto;
  color: var(--blue);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b;
}

.legend-dot--pending {
  background: #f59e0b;
}

.legend-dot--assigned {
  background: var(--blue);
}

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

.fc .event-pending {
  border-style: dashed;
  border-width: 2px;
}

.fc .event-unread {
  box-shadow: inset 4px 0 0 #dc2626;
}

.fc {
  height: 100%;
  font-family: "Poppins", Arial, sans-serif;
}

.fc .fc-toolbar {
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  margin-bottom: 5px;
}

.fc .fc-toolbar-title {
  color: var(--blue);
  font-size: clamp(0.88rem, 2vw, 1.2rem);
  font-weight: 800;
  letter-spacing: 0;
}

.fc .fc-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
  box-shadow: none;
  padding: 5px 8px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: capitalize;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button:hover {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.fc .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number {
  color: #334155;
  font-weight: 800;
}

.fc .fc-event {
  border-radius: 9px;
  padding: 0;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 9px rgba(15, 23, 42, 0.16);
}

.fc .fc-timegrid-event {
  padding: 0;
}

.calendar-job {
  display: grid;
  height: 100%;
  min-height: 0;
  align-content: start;
  gap: 2px;
  overflow: hidden;
  padding: 5px 6px 7px;
  line-height: 1.12;
}

.calendar-job__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
}

.calendar-job__time {
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-job__type {
  overflow: hidden;
  border-radius: 999px;
  padding: 1px 4px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.calendar-job__type i {
  margin-right: 3px;
}

.legend-icon {
  width: 14px;
  margin-right: 4px;
  text-align: center;
}

.legend-icon--outbound {
  color: var(--blue);
}

.legend-icon--return {
  color: #7e22ce;
}

.fc .leg-outbound {
  box-shadow: inset 4px 0 0 #60a5fa, 0 3px 9px rgba(15, 23, 42, 0.16);
}

.fc .leg-return {
  box-shadow: inset 4px 0 0 #d8b4fe, 0 3px 9px rgba(15, 23, 42, 0.16);
}

.calendar-job__customer {
  overflow: hidden;
  font-size: 0.69rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-job__route,
.calendar-job__driver {
  overflow: hidden;
  font-size: 0.58rem;
  font-weight: 700;
  opacity: 0.92;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-job__driver {
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0.78;
}

.fc .fc-event-resizer-end {
  right: 6px;
  bottom: 2px;
  left: 6px;
  height: 7px;
  border-bottom: 3px solid currentColor;
  border-radius: 999px;
  opacity: 0.82;
}

.fc .fc-timegrid-event-short .calendar-job {
  gap: 1px;
  padding-block: 4px 6px;
}

.fc .fc-timegrid-event-short .calendar-job__route,
.fc .fc-timegrid-event-short .calendar-job__driver {
  display: none;
}

.fc .fc-event-dragging {
  cursor: grabbing;
}

.fc .fc-timegrid-slot {
  height: 1.35em;
}

.fc .fc-timegrid-slot-label,
.fc .fc-col-header-cell-cushion {
  font-size: 0.68rem;
}

.fc .fc-scroller {
  overscroll-behavior: contain;
}

.fc .fc-list-event-title,
.fc .fc-list-event-time {
  font-weight: 800;
}

.booking-dialog {
  width: min(98vw, 1180px);
  height: fit-content;
  max-width: none;
  max-height: 94dvh;
  border: 0;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

#booking-dialog {
  width: min(96vw, 1240px);
  height: min(640px, calc(80dvh));
  max-height: calc(100dvh - 24px);
}

.booking-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
}

.driver-complete-dialog {
  width: min(calc(100vw - 32px), 440px);
  max-width: 440px;
  border: 0;
  border-radius: 22px;
  padding: 26px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 70px #101a2b42;
  text-align: center;
}

.driver-complete-dialog::backdrop {
  background: #17203399;
  backdrop-filter: blur(3px);
}

.driver-complete-dialog__icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #16a34a;
  font-size: 1.25rem;
}

.driver-complete-dialog h2 { margin: 0; color: var(--blue); font-size: 1.5rem; }
.driver-complete-dialog > p { margin: 10px 0 0; line-height: 1.55; }
.driver-complete-dialog__note { color: var(--muted); font-size: 0.82rem; }
.driver-complete-dialog__actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; margin-top: 22px; }
.driver-complete-dialog__actions button { min-height: 50px; }

@media (max-width: 420px) {
  .driver-complete-dialog { padding: 22px 18px; }
  .driver-complete-dialog__actions { grid-template-columns: 1fr; }
  .driver-complete-dialog__actions .success-button { grid-row: 1; }
}

.booking-dialog form {
  display: grid;
  height: fit-content;
  min-height: 0;
  grid-template-rows: auto auto auto auto;
  gap: 7px;
  overflow: hidden;
  padding: 12px 14px;
}

#booking-dialog form {
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

#booking-dialog .dialog-head {
  grid-row: 1;
}

#booking-dialog .dialog-alerts {
  grid-row: 2;
}

#booking-dialog .booking-editor,
#booking-dialog .driver-leg-details {
  grid-row: 3;
}

#booking-dialog .dialog-actions {
  grid-row: 4;
}

.dialog-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  border-bottom: 3px solid var(--red);
  padding-bottom: 7px;
}

.dialog-head .icon-button {
  width: 36px;
  min-height: 36px;
  padding: 0;
}

.dialog-head h2 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.1;
}

.dialog-head p {
  margin: 0 7px 0 0;
  font-size: 0.7rem;
  line-height: 1.3;
}

.dialog-head .kicker {
  color: var(--red);
}

.dialog-head__state {
  display: flex;
  max-width: 300px;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  text-align: right;
}

.dialog-alerts:empty,
.dialog-alerts:not(:has(.app-alert:not([hidden]))) {
  display: none;
}

.dialog-alerts .app-alert {
  margin: 0;
  padding: 6px 9px;
  font-size: 0.7rem;
}

.booking-editor {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr) minmax(220px, 0.72fr);
  gap: 8px;
  overflow: hidden;
}

.booking-details {
  display: grid;
  min-height: 0;
  grid-column: 1 / 3;
  grid-template-columns: minmax(0, 1.45fr) minmax(230px, 0.72fr);
  gap: 8px;
  overflow: visible;
}

.booking-column {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  background: var(--soft);
}

.booking-column h3,
.booking-summary__head h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.72rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.booking-column h3 i,
.booking-summary__head h3 i {
  color: var(--blue);
}

.booking-column__fields {
  display: grid;
  gap: 6px;
}

.booking-column--customer,
.booking-column--schedule {
  overflow-y: auto;
}

.admin-booking-form {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 8px;
  background: #f8fafc;
}

.admin-booking-section {
  display: grid;
  gap: 7px;
  border: 1px solid #dbe5f3;
  border-radius: 9px;
  padding: 8px;
  background: #fff;
}

.admin-booking-section--contact,
.admin-booking-section--luggage {
  background: #f7fbff;
}

.admin-booking-section--transport,
.admin-booking-section--seats {
  background: #fffaf5;
}

.admin-booking-section--journeys {
  background: #f8faff;
}

.admin-booking-section--notes {
  background: #fbfbfd;
}

.admin-booking-section__heading {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
}

.admin-booking-section__heading > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 0.7rem;
  font-weight: 900;
}

.admin-booking-section__heading h3 {
  margin: 1px 0 0;
  color: var(--blue);
  font-size: 0.72rem;
}

.admin-booking-section__heading p,
.admin-dispatch-panel__intro {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.35;
}

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

.admin-booking-field--half {
  width: calc(50% - 3px);
}

.admin-flight-details {
  display: grid;
  gap: 6px;
  border-top: 1px dashed #cbd5e1;
  padding-top: 7px;
}

.admin-booking-form textarea {
  height: auto;
  min-height: 52px;
  resize: vertical;
}

.admin-dispatch-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  background: #eef4ff;
}

.dispatch-leg-card {
  display: grid;
  gap: 7px;
  border: 1px solid #bfdbfe;
  border-left: 3px solid #2563eb;
  border-radius: 8px;
  padding: 7px;
  background: #fff;
}

.dispatch-leg-card--return {
  border-color: #e9d5ff;
  border-left-color: #9333ea;
}

.dispatch-leg-card legend {
  padding-inline: 4px;
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 900;
}

.legacy-field-note {
  margin: 0;
  border-radius: 6px;
  padding: 5px 7px;
  color: #854d0e;
  background: #fef3c7;
  font-size: 0.64rem;
  font-weight: 700;
}

.field-validation-error {
  margin: 0;
  border-radius: 6px;
  padding: 5px 7px;
  color: #991b1b;
  background: #fee2e2;
  font-size: 0.66rem;
  font-weight: 800;
}

.address-input-wrap,
.address-autocomplete-host {
  position: relative;
  display: block;
}

.address-suggestions {
  position: absolute;
  z-index: 2000;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
}

.address-suggestion {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 9px;
  color: #1f2937;
  background: #fff;
  font: inherit;
  font-size: 0.7rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.address-suggestion:hover,
.address-suggestion.is-active {
  color: var(--blue);
  background: #eff6ff;
}

.address-suggestions__attribution {
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: flex-end;
  padding: 3px 7px;
  background: #fff;
}

.address-suggestions__attribution img {
  width: auto;
  max-width: 110px;
  height: 13px;
}

.booking-route-extras {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.booking-route-extras summary {
  padding: 7px 9px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.booking-route-extras summary span {
  color: var(--muted);
  font-weight: 600;
}

.booking-route-extras__fields {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding: 7px;
}

.booking-field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

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

.booking-field-pair:has(> [hidden] + [hidden]) {
  display: none;
}

.leg-assignment {
  align-items: end;
  border-left: 3px solid #60a5fa;
  padding-left: 7px;
}

.leg-assignment--return {
  border-left-color: #a855f7;
}

.leg-assignment__hint {
  align-self: center;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.4;
}

.leg-assignment__hint i {
  margin-right: 5px;
  color: var(--blue);
}

.capacity-warning {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 7px 9px;
  color: #92400e;
  background: #fffbeb;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.4;
}

.dialog-leg-operations > .booking-route-extras__fields {
  grid-template-columns: minmax(0, 1fr);
}

.leg-operation-card {
  display: grid;
  gap: 6px;
  border-left: 3px solid #60a5fa;
  padding-left: 8px;
}

.leg-operation-card--return {
  border-left-color: #a855f7;
}

.leg-operation-card + .leg-operation-card {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.leg-operation-card legend {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
}

.leg-operation-card--return legend {
  color: #7e22ce;
}

.admin-car-seats {
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 7px;
  background: #fffbeb;
}

.admin-car-seats legend {
  padding-inline: 4px;
  color: #854d0e;
  font-size: 0.7rem;
  font-weight: 900;
}

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

fieldset {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.booking-state-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lock-state {
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
}

.dialog-wide {
  grid-column: 1 / -1;
}

.dialog-col-2 {
  grid-column: span 2;
}

.dialog-col-3 {
  grid-column: span 3;
}

.dialog-col-4 {
  grid-column: span 4;
}

.booking-dialog label {
  gap: 2px;
  font-size: 0.68rem;
  line-height: 1.15;
}

.booking-dialog input,
.booking-dialog select,
.booking-dialog textarea {
  min-height: 32px;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 13px;
  font-weight: 700;
}

.booking-dialog textarea {
  height: 32px;
  min-height: 32px;
  resize: none;
}

.booking-dialog [hidden] {
  display: none !important;
}

.dialog-actions {
  display: flex;
  min-height: 38px;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

.dialog-actions > * {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.72rem;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-weight: 800;
}

.card-time {
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 800;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--blue);
  background: #dbeafe;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.badge--pending {
  color: #92400e;
  background: #fef3c7;
}

.badge--complete {
  color: #166534;
  background: #dcfce7;
}

.badge--new_request,
.badge--pending_review {
  color: #92400e;
  background: #fef3c7;
}

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

.badge--confirmed {
  color: #334155;
  background: #e2e8f0;
}

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

.badge--declined,
.badge--cancelled {
  color: #991b1b;
  background: #fee2e2;
}

.service-chip {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 2px 6px;
  color: #1e3a8a;
  background: #dbeafe;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.service-chip--event {
  color: #9f1239;
  background: #ffe4e6;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  margin: 10px 0;
}

.detail {
  min-width: 0;
}

.detail span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail strong,
.detail a {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.92rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.form-stack {
  display: grid;
  gap: 12px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
}

textarea {
  resize: vertical;
}

.empty-state {
  display: grid;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}

.empty-state i {
  color: var(--blue);
  font-size: 2rem;
}

.empty-state p {
  margin: 8px 0 0;
}

.app-alert {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 12px 14px;
  color: #1e3a8a;
  background: #eff6ff;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.5;
}

.app-alert--success {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.app-alert--warning {
  border-color: #fde68a;
  color: #92400e;
  background: #fffbeb;
}

.app-alert--error {
  border-color: #fecaca;
  color: #991b1b;
  background: #fef2f2;
}

#dialog-error,
#dialog-conflict {
  scroll-margin-block: 96px;
}

.dialog-head + .booking-state-row + .app-alert {
  margin-bottom: 0;
}

.checkbox-label {
  display: flex;
  min-height: 34px;
  align-items: center;
  grid-template-columns: none;
  flex-direction: row;
}

.booking-dialog .checkbox-label input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 18px;
}

.booking-tools {
  display: grid;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
  background: #f8fbff;
}

.booking-summary__head {
  display: grid;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.booking-summary__head h3 {
  margin-bottom: 0;
}

.booking-summary__head .dialog-head__state {
  display: grid;
  max-width: none;
  justify-content: start;
  justify-items: start;
  gap: 5px;
  text-align: left;
}

.pricing-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: end;
  border: 0;
  border-left: 3px solid var(--blue);
  border-radius: 9px;
  padding: 7px;
  background: #eff6ff;
}

.pricing-panel > :first-child {
  grid-column: 1 / -1;
}

.price-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: #fff;
}

.price-input span {
  padding-left: 9px;
  color: var(--blue);
  font-size: 1rem;
  font-weight: 800;
}

.booking-dialog .price-input input {
  min-height: 34px;
  border: 0;
  font-size: 1.12rem;
  font-weight: 800;
}

.pricing-panel small {
  display: block;
  margin-top: 2px;
  color: #475569;
  font-size: 0.62rem;
}

.price-suggestion {
  display: flex;
  align-items: center;
  gap: 4px;
}

.price-suggestion span {
  display: none;
}

.price-suggestion strong {
  color: var(--blue);
  font-size: 0.9rem;
}

.message-panel {
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 0;
  border-radius: 9px;
  overflow: hidden;
  padding: 6px 2px 0;
  background: #fff;
}

.message-panel h3 {
  margin: 0;
  color: var(--blue);
  font-size: 0.82rem;
}

.message-panel .panel-head {
  margin-bottom: 4px;
}

.message-panel .panel-head p {
  margin: 0;
  font-size: 0.62rem;
}

.message-list {
  display: grid;
  min-height: 0;
  gap: 5px;
  overflow-y: auto;
  padding: 2px;
}

.message {
  width: 92%;
  border-radius: 8px;
  padding: 6px 7px;
  background: #e2e8f0;
  font-size: 0.7rem;
}

.message--outbound {
  justify-self: end;
  color: #fff;
  background: var(--blue);
}

.message p {
  margin: 0;
  color: inherit;
  white-space: pre-wrap;
}

.message small,
.message em {
  display: block;
  margin-top: 2px;
  color: inherit;
  font-size: 0.58rem;
  font-style: normal;
  opacity: 0.82;
}

.message-empty {
  margin: 0;
  font-size: 0.7rem;
}

.message-compose {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 5px;
  margin-top: 5px;
  align-items: end;
}

.booking-dialog .message-compose textarea {
  height: 46px;
}

.message-compose .primary-button {
  min-height: 46px;
  padding: 5px;
  font-size: 0.68rem;
}

.driver-job-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.driver-job-card--outbound {
  border-left: 4px solid #2563eb;
}

.driver-job-card--return {
  border-left: 4px solid #9333ea;
}

.driver-job-card > button {
  display: grid;
  width: 100%;
  min-height: 44px;
  gap: 7px;
  border: 0;
  padding: 12px;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.driver-job-card > button > span {
  color: #475569;
  font-size: 0.8rem;
}

.driver-job-card .route-line {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.service-chip--leg-outbound,
.service-chip--leg-return {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
}

.service-chip--leg-outbound {
  color: #1e40af;
  background: #dbeafe;
}

.service-chip--leg-return {
  color: #6b21a8;
  background: #f3e8ff;
}

.car-seat-line,
.vehicle-line {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  padding: 5px 7px;
  font-weight: 800;
}

.car-seat-line {
  color: #854d0e !important;
  background: #fef9c3;
}

.vehicle-line {
  color: #1e3a8a !important;
  background: #eff6ff;
}

.driver-leg-details {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) minmax(280px, 1fr);
  gap: 10px;
  overflow: auto;
}

.driver-leg-hero,
.driver-leg-facts,
.driver-route-list,
.driver-leg-notes {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.driver-leg-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 5px solid #2563eb;
  padding: 15px;
}

.driver-leg-hero--return {
  border-left-color: #9333ea;
}

.driver-leg-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2563eb;
  font-size: 1.2rem;
}

.driver-leg-hero--return .driver-leg-icon {
  background: #9333ea;
}

.driver-leg-hero p,
.driver-leg-hero strong,
.driver-leg-hero span {
  display: block;
  margin: 0;
}

.driver-leg-hero p,
.driver-leg-hero span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.driver-leg-hero strong {
  margin-block: 2px;
  color: var(--ink);
  font-size: 1.05rem;
}

.driver-leg-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  background: var(--line);
}

.driver-leg-facts div {
  padding: 10px;
  background: #fff;
}

.driver-leg-facts__wide {
  grid-column: 1 / -1;
}

.driver-leg-facts__seats {
  color: #854d0e;
  background: #fef9c3 !important;
}

.driver-leg-facts dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.driver-leg-facts dd {
  margin: 3px 0 0;
  font-size: 0.82rem;
  font-weight: 800;
}

.driver-route-list {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  padding: 8px 8px 8px 38px;
}

.driver-route-list li {
  padding: 8px 8px 8px 3px;
}

.driver-route-list li + li {
  border-top: 1px solid var(--line);
}

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

.driver-route-list strong {
  color: var(--blue);
  font-size: 0.67rem;
  text-transform: uppercase;
}

.driver-route-list span {
  margin-top: 2px;
  font-size: 0.82rem;
  font-weight: 800;
}

.driver-leg-notes {
  grid-column: 1 / -1;
  padding: 10px 12px;
}

.driver-leg-notes h3 {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 0.78rem;
}

.driver-leg-notes p {
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.5;
}

.driver-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.driver-card-actions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.driver-card-actions a + a {
  border-left: 1px solid var(--line);
}

.danger-button--outline {
  border: 1px solid #fecaca;
  color: var(--red);
  background: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .pricing-panel {
    grid-template-columns: 1fr 1fr;
  }

  .pricing-panel > .small-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .calendar-workspace {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .panel-head p,
  .calendar-legend span:nth-child(2) {
    display: none;
  }

  .calendar-sidebar h2 {
    font-size: 1rem;
  }

  .small-button {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 0.72rem;
  }

  .request-row {
    padding: 8px;
  }

  .request-row small,
  .request-row em,
  .driver-card small,
  .driver-card em {
    font-size: 0.68rem;
  }
}

@media (min-width: 561px) and (max-width: 900px) {
  #booking-dialog {
    height: min(720px, calc(100dvh - 20px));
  }

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

  .booking-details {
    grid-column: 1;
  }

  .booking-tools {
    grid-template-columns: minmax(130px, 0.65fr) minmax(180px, 1fr) minmax(220px, 1.15fr);
    grid-template-rows: minmax(0, 1fr);
  }

  .booking-summary__head {
    border-right: 1px solid var(--line);
    border-bottom: 0;
    padding-right: 8px;
    padding-bottom: 0;
  }

  .message-panel {
    padding-top: 0;
  }
}

@media (max-height: 720px) and (min-width: 561px) {
  .app-header {
    height: calc(46px + env(safe-area-inset-top));
    min-height: calc(46px + env(safe-area-inset-top));
  }

  .app-shell {
    height: calc(100dvh - 46px - env(safe-area-inset-top));
    padding-top: 5px;
  }

  .workspace-top {
    min-height: 36px;
    margin-bottom: 4px;
  }

  .workspace-top h1 {
    font-size: 1.22rem;
  }

  .workspace-top #workspace-subtitle {
    display: none;
  }

  .stats-grid {
    margin-bottom: 5px;
  }

  .stat {
    min-height: 42px;
    padding: 4px 8px;
  }

  .calendar-legend {
    display: none;
  }

  .calendar-sidebar .panel {
    padding: 7px;
  }

  .panel-head {
    margin-bottom: 5px;
  }

  .panel-head p {
    display: none;
  }

  .request-row {
    gap: 3px;
    padding: 7px;
  }

  .booking-dialog {
    width: 99vw;
    height: auto;
    max-height: 97dvh;
  }

  .booking-dialog form {
    gap: 5px;
    padding: 8px 10px;
  }

  .dialog-head {
    padding-bottom: 5px;
  }

  .dialog-head h2 {
    font-size: 1rem;
  }

  .booking-column {
    padding: 6px;
  }

  .dialog-grid {
    gap: 4px 5px;
  }

  .booking-dialog label {
    font-size: 0.62rem;
  }

  .booking-dialog input,
  .booking-dialog select,
  .booking-dialog textarea {
    min-height: 30px;
    padding: 4px 6px;
    font-size: 12px;
  }

  .booking-dialog textarea {
    height: 30px;
    min-height: 30px;
  }

  .booking-dialog .checkbox-label input {
    min-height: 16px;
  }

  .dialog-actions {
    min-height: 34px;
    padding-top: 5px;
  }

  .dialog-actions > * {
    min-height: 30px;
    padding: 4px 8px;
  }
}

@media (pointer: coarse) and (min-width: 561px) {
  .fc .fc-event-resizer-end {
    height: 12px;
  }
}

@media (max-width: 560px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow: auto;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .app-header nav {
    width: 100%;
    justify-content: space-between;
  }

  .field-row,
  .detail-grid,
  .dialog-grid,
  .booking-field-pair,
  .booking-field-triple {
    grid-template-columns: 1fr;
  }

  .admin-booking-field--half {
    width: 100%;
  }

  .driver-leg-details,
  .driver-leg-facts {
    grid-template-columns: 1fr;
  }

  .driver-route-list,
  .driver-leg-facts__wide {
    grid-column: 1;
    grid-row: auto;
  }

  .dialog-col-2,
  .dialog-col-3,
  .dialog-col-4,
  .dialog-wide {
    grid-column: 1;
  }

  .nested-grid,
  .pricing-panel,
  .message-compose {
    grid-template-columns: 1fr;
  }

  .card-top {
    flex-direction: column;
  }

  .primary-button,
  .ghost-button,
  .small-button,
  .danger-button,
  .success-button {
    width: 100%;
  }

  .app-shell {
    width: min(100% - 18px, 1240px);
    height: auto;
    min-height: calc(100dvh - 68px);
    overflow: visible;
    padding-top: 16px;
  }

  #app-panel {
    display: block;
    height: auto;
    overflow: visible;
  }

  .calendar-workspace,
  .stats-grid {
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .calendar-sidebar {
    overflow: visible;
  }

  .calendar-sidebar .panel,
  .calendar-panel {
    height: auto;
    overflow: visible;
  }

  .panel {
    padding: 12px;
  }

  .fc .fc-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .fc .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .fc .fc-button {
    padding: 7px 9px;
    font-size: 0.78rem;
  }

  .fc .fc-toolbar-title {
    text-align: center;
  }

  .booking-dialog {
    width: 100%;
    height: auto;
    max-width: none;
    max-height: 94dvh;
    margin: auto 0 0;
    border-radius: 12px 12px 0 0;
  }

  #booking-dialog {
    height: auto;
    max-height: 94dvh;
  }

  .booking-dialog form {
    display: block;
    height: auto;
    max-height: 94dvh;
    overflow: auto;
    padding: 14px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .booking-editor {
    display: block;
    overflow: visible;
  }

  .booking-details {
    display: block;
  }

  .booking-column + .booking-column {
    margin-top: 10px;
  }

  .booking-details,
  .booking-tools {
    margin-top: 10px;
    overflow: visible;
  }

  .booking-tools {
    display: grid;
  }

  .message-panel {
    min-height: 260px;
  }

  .dialog-actions {
    position: sticky;
    bottom: -1px;
    margin: 0 -18px -18px;
    padding: 12px 18px 18px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
  }

  .booking-state-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .message {
    width: 94%;
  }
}

/* Dispatch workspace: simple operational screens rather than a squeezed dashboard. */
#app-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.role-workspace {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

#admin-view:not([hidden]) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.admin-command-bar {
  display: grid;
  grid-template-columns: auto minmax(220px, 440px) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.app-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
}

.app-tab {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 9px;
  padding: 8px 12px;
  color: #526178;
  background: transparent;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.app-tab:hover,
.app-tab.is-active {
  color: #fff;
  background: var(--blue);
}

.global-search {
  position: relative;
  display: block;
}

.global-search i {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  color: #8390a4;
  transform: translateY(-50%);
}

.global-search input {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  padding: 8px 38px;
  background: #f1f5f9;
  font-size: 0.78rem;
  font-weight: 600;
}

.global-search input:focus {
  outline: 2px solid #93c5fd;
  background: #fff;
}

.new-booking-button {
  min-height: 40px;
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.admin-screen {
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.jobs-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.queue-toolbar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 1px;
  scrollbar-width: none;
}

.queue-toolbar::-webkit-scrollbar {
  display: none;
}

.queue-chip {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px 6px 13px;
  color: #526178;
  background: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.queue-chip strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: var(--blue);
  background: #e8eefc;
}

.queue-chip:hover,
.queue-chip.is-active {
  border-color: var(--blue);
  color: var(--blue);
  background: #eff4ff;
}

.queue-chip--review strong {
  color: #92400e;
  background: #fef3c7;
}

.jobs-panel,
.search-results-panel,
#customers-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 14px;
  box-shadow: none;
}

.screen-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.screen-heading .kicker {
  margin-bottom: 1px;
  font-size: 0.6rem;
}

.screen-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.screen-heading > p {
  margin: 0;
  font-size: 0.68rem;
}

.booking-list {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1px;
}

.booking-list > .empty-state {
  grid-column: 1 / -1;
}

.request-row {
  position: relative;
  min-width: 0;
  gap: 8px;
  border: 1px solid #dce4ef;
  border-radius: 11px;
  padding: 11px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.request-row:hover,
.request-row:focus-visible {
  border-color: #93a9d9;
  background: #f8faff;
  outline: none;
  transform: translateY(-1px);
}

.request-row__meta,
.request-row__footer {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 9px !important;
}

.request-row__meta {
  justify-content: space-between;
}

.request-row__route {
  overflow: hidden;
  color: #283548 !important;
  font-size: 0.78rem !important;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-row__footer {
  border-top: 1px solid #edf1f6;
  padding-top: 7px;
}

.request-row__footer small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
}

.request-row__footer b {
  margin-left: auto;
  font-size: 0.65rem;
}

.request-row--compact {
  border-radius: 8px;
  padding: 8px;
  box-shadow: none;
}

.request-row--compact .request-row__footer {
  display: none !important;
}

.customer-grid {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  overflow-y: auto;
}

.customer-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.customer-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
}

.customer-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
}

.customer-card h3,
.customer-card p {
  margin: 0;
}

.customer-card h3 {
  color: #192436;
  font-size: 0.86rem;
}

.customer-card p {
  font-size: 0.65rem;
}

.customer-card__contact {
  display: grid;
  gap: 4px;
  border-block: 1px solid #edf1f6;
  padding: 8px 11px;
  background: #f8fafc;
}

.customer-card__contact a {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: #526178;
  font-size: 0.67rem;
  font-weight: 700;
  text-overflow: ellipsis;
}

.customer-card__jobs {
  display: grid;
  max-height: 220px;
  gap: 6px;
  overflow-y: auto;
  padding: 8px;
}

.drivers-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 8px;
}

.drivers-panel,
.vehicles-panel {
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  margin: 0;
  padding: 14px;
  box-shadow: none;
}

.driver-grid,
.vehicle-grid {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  margin: 0;
}

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

.vehicle-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  background: #f8fafc;
}

.vehicle-card__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  color: var(--blue);
  background: #e4ebfb;
}

.vehicle-card dt {
  color: #192436;
  font-size: 0.75rem;
  font-weight: 800;
}

.vehicle-card dd {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
}

.calendar-workspace {
  display: block;
  height: 100%;
}

.calendar-panel {
  border-radius: 12px;
}

.driver-workspace {
  width: min(100%, 1040px);
  margin: 0 auto;
}

#driver-view:not([hidden]) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.driver-command-bar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 7px 11px;
  background: #fff;
}

.driver-command-bar .kicker,
.driver-command-bar h2 {
  margin: 0;
}

.driver-command-bar .kicker {
  font-size: 0.58rem;
}

.driver-command-bar h2 {
  font-size: 1rem;
}

.driver-live-count {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--blue);
  background: #e8eefc;
  font-size: 0.65rem;
  font-weight: 800;
}

.driver-live-count strong {
  font-size: 0.9rem;
}

.driver-jobs-panel {
  min-height: 0;
  overflow: auto;
}

.driver-job-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.driver-history-tabs {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #eef1f7;
}

.driver-history-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: transparent;
  color: #52617a;
  font: inherit;
  font-weight: 600;
}

.driver-history-tabs button[aria-pressed="true"] {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 2px 8px #172a4a12;
}

.driver-job-group--completed { grid-column: 1 / -1; }

.driver-completion-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f9fc;
}

.driver-completion-panel h3 { margin: 0 0 6px; }
.driver-completion-panel p { margin: 0 0 12px; }
.driver-completion-panel button { min-height: 44px; }

.driver-job-group {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px;
  background: #fff;
}

.driver-job-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.driver-job-group__head h3,
.driver-job-group__head p {
  margin: 0;
}

.driver-job-group__head h3 {
  color: var(--blue);
  font-size: 0.92rem;
}

.driver-job-group__head p {
  font-size: 0.62rem;
}

.driver-job-group__head > span {
  display: grid;
  min-width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  color: var(--blue);
  background: #e8eefc;
  font-size: 0.7rem;
  font-weight: 800;
}

.driver-job-group__list {
  display: grid;
  gap: 8px;
}

.empty-state--compact {
  min-height: 120px;
  padding: 16px;
}

/* One intake form plus one useful scheduling rail. */
#booking-dialog {
  width: min(96vw, 1220px);
  height: min(760px, calc(100dvh - 28px));
  max-height: calc(100dvh - 20px);
  border-radius: 16px;
}

.booking-editor {
  display: block;
  min-height: 0;
  overflow: hidden;
}

.booking-details {
  height: 100%;
  grid-column: auto;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.72fr);
  gap: 10px;
}

.booking-column {
  border-radius: 12px;
}

.booking-column--customer,
.booking-column--schedule {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.admin-dispatch-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(120px, 1fr);
  align-content: start;
  border-color: #cbd8f1;
  padding: 10px;
  background: #f3f6fc;
}

.admin-booking-form label,
.admin-dispatch-panel label {
  font-weight: 700;
}

.admin-booking-form input,
.admin-booking-form select,
.admin-booking-form textarea,
.admin-dispatch-panel input,
.admin-dispatch-panel select,
.admin-dispatch-panel textarea {
  font-weight: 600;
}

.booking-summary__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.booking-summary__head .dialog-head__state {
  min-width: 0;
  justify-items: end;
  text-align: right;
}

.pricing-panel {
  margin-top: 2px;
}

.message-panel {
  min-height: 150px;
}

.booking-editor-tabs {
  display: none;
}

.admin-internal-field {
  display: none !important;
}

@media (max-width: 1100px) {
  .admin-command-bar {
    grid-template-columns: 1fr auto;
  }

  .app-tabs {
    grid-column: 1 / -1;
    order: 2;
    justify-content: stretch;
  }

  .app-tab {
    flex: 1;
    justify-content: center;
  }

  .global-search {
    grid-column: 1;
  }

  .new-booking-button {
    grid-column: 2;
  }

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

  .drivers-screen {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.58fr);
  }

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

  .booking-editor {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 7px;
  }

  .booking-editor-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 9px;
    padding: 3px;
    background: #e8edf5;
  }

  .booking-editor-tabs button {
    min-height: 36px;
    border: 0;
    border-radius: 7px;
    color: #526178;
    background: transparent;
    font-size: 0.72rem;
    font-weight: 800;
  }

  .booking-editor-tabs button.is-active {
    color: #fff;
    background: var(--blue);
  }

  .booking-details {
    display: block;
    height: 100%;
    overflow: hidden;
  }

  .booking-details > [data-editor-pane] {
    display: none;
    height: 100%;
    margin: 0;
  }

  .booking-details > [data-editor-pane].is-pane-active {
    display: grid;
  }

  .booking-column--customer.is-pane-active {
    overflow-y: auto;
  }
}

@media (max-width: 760px) {
  html,
  body {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
  }

  .app-header {
    height: calc(52px + env(safe-area-inset-top));
    min-height: calc(52px + env(safe-area-inset-top));
    align-items: center;
    flex-direction: row;
    padding: env(safe-area-inset-top) 10px 0;
  }

  .app-header nav {
    width: auto;
    justify-content: flex-end;
  }

  .website-link {
    display: none;
  }

  .app-shell {
    width: 100%;
    height: calc(100dvh - 52px - env(safe-area-inset-top));
    min-height: 0;
    overflow: hidden;
    padding: 7px 8px calc(8px + env(safe-area-inset-bottom));
  }

  #app-panel {
    display: grid;
    height: 100%;
    overflow: hidden;
  }

  .workspace-top {
    min-height: 40px;
    margin-bottom: 5px;
  }

  .workspace-top h1 {
    font-size: 1.15rem;
  }

  .workspace-top #workspace-subtitle {
    display: none;
  }

  .user-pill {
    max-width: 46vw;
    padding: 5px 8px;
    font-size: 0.62rem;
  }

  .admin-command-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    border-radius: 11px;
    padding: 5px;
  }

  .app-tabs {
    gap: 1px;
  }

  .app-tab {
    min-width: 0;
    min-height: 38px;
    gap: 4px;
    padding: 6px 3px;
    font-size: 0.61rem;
  }

  .global-search input {
    min-height: 38px;
    padding-right: 8px;
    font-size: 0.7rem;
  }

  .new-booking-button {
    width: auto;
    min-height: 38px;
    padding: 7px 10px;
    font-size: 0.68rem;
  }

  .queue-toolbar {
    padding-block: 1px;
  }

  .queue-chip {
    min-height: 34px;
    padding-block: 4px;
    font-size: 0.64rem;
  }

  .queue-chip strong {
    min-width: 22px;
    height: 22px;
  }

  .jobs-panel,
  .search-results-panel,
  #customers-view,
  .drivers-panel,
  .vehicles-panel {
    padding: 10px;
  }

  .screen-heading > p {
    display: none;
  }

  .booking-list,
  .customer-grid,
  .drivers-screen,
  .driver-job-groups {
    grid-template-columns: 1fr;
  }

  .drivers-screen {
    overflow-y: auto;
  }

  .drivers-panel,
  .vehicles-panel {
    overflow: visible;
  }

  .driver-grid,
  .vehicle-grid {
    overflow: visible;
  }

  .calendar-panel {
    height: 100%;
    overflow: hidden;
  }

  .calendar-legend {
    display: none;
  }

  #booking-dialog {
    width: 100%;
    height: min(94dvh, 760px);
    max-height: 94dvh;
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
  }

  #booking-dialog form {
    display: grid;
    height: 100%;
    max-height: none;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    overflow: hidden;
    padding: 11px;
    padding-bottom: calc(11px + env(safe-area-inset-bottom));
  }

  .booking-field-pair,
  .booking-field-triple {
    grid-template-columns: 1fr 1fr;
  }

  .booking-field-triple > :first-child:last-child,
  .booking-field-triple > :nth-child(3) {
    grid-column: 1 / -1;
  }

  .booking-editor,
  .booking-details,
  .booking-details > [data-editor-pane].is-pane-active {
    min-height: 0;
  }

  .dialog-actions {
    position: static;
    margin: 0;
    padding: 7px 0 0;
    padding-bottom: 0;
  }

  .dialog-actions > * {
    width: auto;
  }

  .dialog-actions .primary-button,
  .dialog-actions .success-button {
    flex: 1;
  }

  .admin-dispatch-panel {
    overflow-y: auto;
  }

  .message-panel {
    min-height: 180px;
  }
}

@media (max-width: 430px) {
  .brand {
    gap: 5px;
    font-size: 0.88rem;
  }

  .app-header .ghost-button {
    min-height: 36px;
    padding: 6px 9px;
    font-size: 0.7rem;
  }

  .app-tab i {
    display: none;
  }

  .new-booking-button {
    font-size: 0;
  }

  .new-booking-button i {
    font-size: 0.8rem;
  }

  .booking-field-pair,
  .booking-field-triple {
    grid-template-columns: 1fr;
  }

  .booking-field-triple > :nth-child(3) {
    grid-column: auto;
  }

  .dialog-head p:not(.kicker) {
    display: none;
  }

  .admin-booking-section {
    padding: 7px;
  }
}

/* Mobile dispatch shell. Document-flow sizing is consolidated at the end. */
@media (max-width: 760px) {
  :root {
    --mobile-nav-height: 66px;
  }

  html,
  body {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    background: #eef3fa;
  }

  .app-header {
    height: calc(48px + env(safe-area-inset-top));
    min-height: calc(48px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 12px 0;
  }

  .brand {
    gap: 5px;
    font-size: 0.82rem;
    letter-spacing: -0.01em;
  }

  .app-header .ghost-button {
    width: auto;
    min-height: 36px;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 0.68rem;
  }

  .app-shell {
    width: 100%;
    height: calc(100dvh - 48px - env(safe-area-inset-top));
    min-height: 0;
    overflow: hidden;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }

  #app-panel[data-role="admin"] {
    padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
  }

  #app-panel,
  #admin-view:not([hidden]) {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  #app-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  #admin-view:not([hidden]) {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 6px;
  }

  .workspace-top {
    min-height: 40px;
    margin-bottom: 4px;
    padding-inline: 2px;
  }

  .workspace-top h1 {
    margin: 0;
    font-size: 1.14rem;
    letter-spacing: -0.035em;
  }

  .workspace-top .user-pill {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    justify-content: center;
    padding: 0;
    border-color: #d8e1ef;
    color: #fff;
    background: var(--blue);
  }

  .workspace-top .user-pill span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .admin-command-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 6px;
    border-radius: 13px;
    padding: 5px;
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.07);
  }

  .global-search {
    grid-column: 1;
    min-width: 0;
  }

  .global-search input {
    min-height: 42px;
    border-radius: 9px;
    padding: 8px 10px 8px 37px;
    font-size: 0.72rem;
  }

  .new-booking-button {
    width: 44px;
    min-height: 42px;
    grid-column: 2;
    border-radius: 10px;
    padding: 0;
    font-size: 0;
  }

  .new-booking-button i {
    font-size: 0.9rem;
  }

  .app-tabs {
    position: fixed;
    z-index: 45;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    border-top: 1px solid #d6dfec;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(16px);
  }

  .app-tab {
    display: grid;
    min-width: 0;
    min-height: 52px;
    place-items: center;
    align-content: center;
    gap: 3px;
    border-radius: 11px;
    padding: 4px 2px;
    font-size: 0.59rem;
    line-height: 1;
  }

  .app-tab i {
    display: block;
    font-size: 0.92rem;
  }

  .admin-screen,
  .jobs-screen,
  #customers-view,
  .drivers-screen,
  .calendar-workspace {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .jobs-screen {
    grid-template-rows: auto minmax(0, 1fr);
    gap: 6px;
  }

  .queue-toolbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
    padding: 0;
  }

  .queue-chip {
    min-width: 0;
    min-height: 36px;
    justify-content: center;
    gap: 4px;
    border-radius: 10px;
    padding: 4px;
    font-size: 0.55rem;
  }

  .queue-chip strong {
    min-width: 20px;
    height: 20px;
    font-size: 0.58rem;
  }

  .jobs-panel,
  .search-results-panel,
  #customers-view,
  .drivers-panel,
  .vehicles-panel,
  .calendar-panel {
    border-radius: 14px;
    padding: 10px;
  }

  #pending-panel > .screen-heading {
    display: none;
  }

  .job-groups,
  .booking-list,
  .customer-grid,
  .drivers-screen,
  .driver-grid,
  .vehicle-grid,
  .driver-job-groups {
    min-height: 0;
    grid-auto-rows: max-content;
    align-content: start;
  }

  .job-groups,
  .customer-grid,
  .drivers-screen {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .job-groups {
    gap: 12px;
    padding: 1px;
  }

  .job-list-group {
    gap: 7px;
  }

  .job-list-group__heading {
    align-items: center;
    padding: 0 2px 6px;
  }

  .job-list-group__heading h3 {
    font-size: 0.82rem;
  }

  .booking-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    overflow: visible;
  }

  .request-row,
  .request-row--compact {
    gap: 7px;
    min-height: 0;
    border-radius: 13px;
    padding: 10px;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.045);
  }

  .request-row__eyebrow {
    min-height: 20px;
  }

  .request-row__route {
    display: -webkit-box !important;
    overflow: hidden;
    font-size: 0.83rem !important;
    line-height: 1.28;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .request-row__timing,
  .request-row--compact .request-row__timing {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px !important;
  }

  .request-row__timing > span {
    min-width: 0;
    border-radius: 8px;
    padding: 6px 7px;
  }

  .request-row__timing small {
    font-size: 0.5rem;
  }

  .request-row__timing b {
    font-size: 0.63rem;
  }

  .request-row__footer {
    gap: 4px 8px !important;
    padding-top: 6px;
  }

  .request-row__footer > strong,
  .request-row__footer small {
    font-size: 0.62rem;
  }

  #customers-view {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    margin: 0;
  }

  .customer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 1px;
  }

  .customer-card {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
    border-radius: 13px;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.04);
  }

  .customer-card__head {
    padding: 10px;
  }

  .customer-avatar {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 0.75rem;
  }

  .customer-card h3 {
    font-size: 0.79rem;
  }

  .customer-card p {
    font-size: 0.59rem;
  }

  .customer-card__contact {
    display: flex;
    min-height: 0;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 8px 10px;
  }

  .customer-card__contact a,
  .customer-card__contact > span {
    flex: 1 1 135px;
    font-size: 0.61rem;
  }

  .customer-card__featured {
    padding: 8px;
  }

  .customer-card__featured > span {
    font-size: 0.51rem;
  }

  .customer-card__history summary {
    min-height: 40px;
    padding: 10px;
  }

  .drivers-screen {
    display: block;
  }

  .drivers-panel,
  .vehicles-panel {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
    margin: 0 0 8px;
  }

  .drivers-panel .screen-heading,
  .vehicles-panel .screen-heading {
    margin-bottom: 8px;
  }

  #add-driver-button {
    width: auto;
    min-height: 40px;
    padding: 7px 10px;
    font-size: 0.66rem;
  }

  .driver-grid,
  .vehicle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    overflow: visible;
  }

  .driver-card {
    height: auto;
    min-height: 72px;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
  }

  .driver-card > span:last-child {
    min-width: 0;
    gap: 1px;
  }

  .driver-card strong {
    font-size: 0.78rem;
  }

  .driver-card small,
  .driver-card em {
    display: block;
    overflow: hidden;
    font-size: 0.61rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vehicle-card {
    min-height: 64px;
    border-radius: 12px;
    padding: 10px;
  }

  .calendar-workspace,
  .calendar-panel {
    display: block;
    height: 100%;
  }

  .calendar-panel {
    overflow: hidden;
  }

  #jobs-calendar {
    height: 100%;
    overflow: hidden;
  }

  .fc .fc-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    margin-bottom: 9px;
  }

  .fc .fc-toolbar-chunk {
    display: flex;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 2px;
  }

  .fc .fc-toolbar-title {
    overflow: hidden;
    font-size: 0.8rem;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .fc .fc-button {
    min-height: 36px;
    padding: 5px 7px;
    font-size: 0.62rem;
  }

  .fc .fc-list {
    border: 0;
  }

  .fc .fc-list-day-cushion {
    padding: 8px 9px;
    color: var(--blue);
    background: #edf3ff;
    font-size: 0.68rem;
  }

  .fc .fc-list-event td {
    padding-block: 9px;
  }

  .fc .fc-list-event-time {
    width: 70px;
    color: var(--blue);
    font-size: 0.66rem;
  }

  .fc .fc-list-event-title {
    font-size: 0.68rem;
  }

  /* A phone editor is a full-screen task, not a compressed desktop modal. */
  #booking-dialog {
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  #booking-dialog form {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 7px;
    overflow: hidden;
    padding: calc(8px + env(safe-area-inset-top)) 10px calc(8px + env(safe-area-inset-bottom));
  }

  #booking-dialog .dialog-head {
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 8px;
    padding-bottom: 7px;
  }

  #booking-dialog .dialog-head .kicker {
    margin-bottom: 2px;
    font-size: 0.58rem;
  }

  #booking-dialog .dialog-head h2 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.18;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  #booking-dialog .dialog-head .icon-button {
    width: 40px;
    min-height: 40px;
    align-self: start;
    border-radius: 11px;
  }

  .dialog-time-summary {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 1px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .dialog-time-summary::-webkit-scrollbar {
    display: none;
  }

  .dialog-time-summary > span,
  .dialog-time-summary > span:first-child,
  .dialog-time-summary > span:nth-child(2) {
    min-width: 146px;
    flex: 0 0 146px;
    scroll-snap-align: start;
    padding: 5px 7px;
  }

  .booking-editor {
    display: grid;
    min-width: 0;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 7px;
    overflow: hidden;
  }

  .booking-editor-tabs {
    display: grid;
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    border-radius: 10px;
    padding: 3px;
  }

  .booking-editor-tabs button {
    min-width: 0;
    min-height: 40px;
    overflow: hidden;
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .booking-details {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    grid-column: 1;
    grid-row: 2;
    overflow: hidden;
  }

  .booking-details > [data-editor-pane] {
    display: none;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-bottom: 88px;
  }

  .booking-details > [data-editor-pane].is-pane-active {
    display: block;
  }

  .booking-column--customer,
  .booking-column--schedule,
  .admin-dispatch-panel {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .admin-booking-form,
  .admin-dispatch-panel {
    padding: 7px;
  }

  .admin-booking-section {
    gap: 7px;
    margin-bottom: 7px;
    border-radius: 11px;
    padding: 9px;
  }

  .admin-booking-section__heading {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .admin-booking-section__heading > span {
    width: 22px;
    height: 22px;
    font-size: 0.64rem;
  }

  .booking-field-pair,
  .booking-field-triple,
  .admin-flight-timing-grid,
  .admin-requested-pickup-grid {
    grid-template-columns: 1fr;
  }

  .booking-field-triple > :nth-child(3) {
    grid-column: auto;
  }

  .booking-dialog label {
    font-size: 0.66rem;
  }

  .booking-dialog input,
  .booking-dialog select,
  .booking-dialog textarea {
    min-height: 44px;
    border-radius: 9px;
    padding: 8px 10px;
    font-size: 16px;
  }

  .booking-dialog textarea {
    min-height: 74px;
    resize: vertical;
  }

  .admin-dispatch-panel {
    display: block;
  }

  .admin-dispatch-panel > * + * {
    margin-top: 9px;
  }

  .message-panel {
    min-height: 220px;
  }

  .dialog-actions {
    position: static;
    display: grid;
    min-width: 0;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 6px;
    margin: 0;
    border-top: 1px solid var(--line);
    padding: 7px 0 0;
    background: #fff;
  }

  .dialog-actions > * {
    width: auto;
    min-width: 0;
    min-height: 44px;
    padding: 7px 9px;
    font-size: 0.66rem;
  }

  #dialog-phone-link,
  #dialog-maps {
    width: 44px;
    overflow: hidden;
    padding: 0;
    font-size: 0;
  }

  #dialog-phone-link i,
  #dialog-maps i {
    font-size: 0.84rem;
  }

  #save-booking-button,
  #approve-booking-button,
  #assign-driver-button,
  #complete-booking-button,
  .driver-action {
    grid-column: 3;
  }

  #decline-booking-button,
  #cancel-booking-button {
    grid-column: 1 / -1;
    min-height: 34px;
    border: 0;
    padding: 3px;
    color: #b91c1c;
    background: transparent;
  }
}

@media (max-width: 360px) {
  .queue-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .request-row__timing,
  .request-row--compact .request-row__timing {
    grid-template-columns: 1fr;
  }
}

/* Dispatch clarity: route-first jobs, calm history and explicit taxi/flight times. */
.job-groups {
  display: grid;
  min-height: 0;
  align-content: start;
  gap: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1px 3px 8px 1px;
}

.job-list-group {
  display: grid;
  gap: 8px;
}

/* The outer job-groups pane owns scrolling. Nested auto/contain lists trap
   wheel and trackpad gestures over cards, even when those lists fully fit. */
.job-groups .booking-list {
  overflow: visible;
  overscroll-behavior: auto;
}

.job-list-group__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dce4ef;
  padding: 0 2px 7px;
}

.job-list-group__heading h3,
.job-list-group__heading p {
  margin: 0;
}

.job-list-group__heading h3 {
  color: #172554;
  font-size: 0.86rem;
}

.job-list-group__heading p {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
}

.job-list-group__heading > span {
  display: grid;
  min-width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 999px;
  color: var(--blue);
  background: #e8eefc;
  font-size: 0.68rem;
  font-weight: 900;
}

.job-list-group--attention .job-list-group__heading {
  border-bottom-color: #f8c869;
}

.job-list-group--attention .job-list-group__heading > span {
  color: #92400e;
  background: #fef3c7;
}

.job-list-group--past .job-list-group__heading h3,
.job-list-group--past .job-list-group__heading > span {
  color: #64748b;
}

.booking-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}

.request-row {
  gap: 8px;
  border-radius: 13px;
  padding: 12px;
}

.request-row__eyebrow {
  min-height: 22px;
}

.request-row__route {
  display: block !important;
  overflow: hidden;
  color: #172554 !important;
  font-size: 0.96rem !important;
  font-weight: 900 !important;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-row__timing {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px !important;
}

.request-row__timing > span {
  min-width: 0;
  gap: 1px;
  border-radius: 8px;
  padding: 7px 8px;
  background: #f3f6fb;
}

.request-row__timing small {
  color: #64748b;
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.request-row__timing b {
  overflow: hidden;
  color: #243f8f;
  font-size: 0.7rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-row__footer > strong {
  margin-right: auto;
  color: #243044;
  font-size: 0.75rem;
}

.request-row--past {
  border-color: #d8dee8;
  background: #f3f5f8;
  box-shadow: none;
  filter: saturate(0.35);
  opacity: 0.72;
}

.request-row--past:hover,
.request-row--past:focus-visible {
  border-color: #94a3b8;
  background: #eef1f5;
  filter: none;
  opacity: 1;
}

.request-row--compact {
  padding: 9px;
}

.request-row--compact .request-row__timing {
  grid-template-columns: 1fr;
}

.request-row--compact .request-row__timing > span + span {
  display: none;
}

.customer-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 12px;
  padding: 1px 3px 8px 1px;
}

.customer-card {
  display: grid;
  min-height: 260px;
  align-content: start;
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.06);
}

.customer-card__head {
  padding: 14px;
}

.customer-card h3 {
  font-size: 0.93rem;
}

.customer-card__contact {
  min-height: 62px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 6px 12px;
  padding: 10px 14px;
}

.customer-card__contact a,
.customer-card__contact > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: #526178;
  font-size: 0.65rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-card__featured {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.customer-card__featured > span {
  padding-inline: 2px;
  color: #64748b;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.customer-card__history {
  border-top: 1px solid #edf1f6;
}

.customer-card__history summary {
  padding: 10px 12px;
  color: var(--blue);
  font-size: 0.66rem;
  font-weight: 800;
  cursor: pointer;
}

.customer-card__jobs {
  max-height: 300px;
  border-top: 1px solid #edf1f6;
}

.dialog-head h2 {
  color: #172554;
  font-size: clamp(1.08rem, 1.8vw, 1.42rem);
  font-weight: 900;
  letter-spacing: -0.025em;
}

.dialog-time-summary {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.dialog-time-summary > span {
  display: grid;
  min-width: 150px;
  gap: 1px;
  border: 1px solid #dbe5f3;
  border-radius: 7px;
  padding: 5px 8px;
  background: #f7f9fd;
}

.dialog-time-summary small {
  color: #64748b;
  font-size: 0.53rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.dialog-time-summary strong {
  color: #172554;
  font-size: 0.66rem;
  line-height: 1.25;
}

.dialog-time-summary > span:first-child {
  border-color: #f3d7a3;
  background: #fffaf0;
}

.dialog-time-summary > span:nth-child(2) {
  border-color: #bcd0ff;
  background: #f0f5ff;
}

.admin-flight-timing-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-requested-pickup-grid {
  border: 1px solid #c9d8f4;
  border-radius: 9px;
  padding: 7px;
  background: #eef4ff;
}

.fc-event.event-past {
  filter: saturate(0.25);
  opacity: 0.66;
}

@media (max-width: 1100px) {
  .dialog-time-summary > span {
    min-width: 132px;
  }
}

@media (max-width: 760px) {
  .job-groups {
    gap: 12px;
  }

  .job-list-group__heading p {
    display: none;
  }

  .request-row__route {
    font-size: 0.87rem !important;
  }

  .customer-card {
    min-height: 0;
  }

  .customer-card__contact {
    grid-template-columns: 1fr;
  }

  .dialog-time-summary {
    gap: 4px;
  }

  .dialog-time-summary > span {
    min-width: calc(50% - 2px);
    padding: 4px 6px;
  }

  .admin-flight-timing-grid,
  .admin-requested-pickup-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 430px) {
  .request-row__timing {
    grid-template-columns: 1fr;
  }

  .dialog-time-summary > span {
    min-width: 100%;
  }

  .admin-flight-timing-grid,
  .admin-requested-pickup-grid {
    grid-template-columns: 1fr;
  }
}

.directory-state {
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  grid-column: 1 / -1;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
}

.directory-state i {
  color: var(--blue);
}

.directory-state--error {
  border-color: #fecaca;
  color: #991b1b;
  background: #fff7f7;
}

/* Keep these final mobile resets after the route-card enhancement rules above. */
@media (max-width: 760px) {
  .request-row__timing,
  .request-row--compact .request-row__timing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-card__contact {
    display: flex;
    min-height: 0;
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  .dialog-time-summary {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .dialog-time-summary > span,
  .dialog-time-summary > span:first-child,
  .dialog-time-summary > span:nth-child(2) {
    min-width: 146px;
    flex: 0 0 146px;
  }

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

  .booking-editor-tabs,
  .booking-details {
    grid-column: 1;
  }

  .booking-field-pair,
  .booking-field-triple,
  .admin-flight-timing-grid,
  .admin-requested-pickup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .request-row__timing,
  .request-row--compact .request-row__timing {
    grid-template-columns: 1fr;
  }
}

/* Final phone hierarchy: native-style navigation, agenda and editor actions. */
@media (max-width: 760px) {
  .workspace-top .user-pill i {
    display: none;
  }

  .workspace-top .user-pill::before {
    content: attr(data-initial);
    font-size: 0.76rem;
    font-weight: 900;
  }

  .new-booking-button i {
    display: none;
  }

  .new-booking-button::before {
    content: "+";
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
  }

  #admin-view[data-active-screen="drivers"] .admin-command-bar {
    height: 0;
    min-height: 0;
    gap: 0;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  #admin-view[data-active-screen="drivers"] .global-search,
  #admin-view[data-active-screen="drivers"] .new-booking-button {
    display: none;
  }

  .request-row__route,
  .request-row--compact .request-row__route {
    display: -webkit-box !important;
    overflow: hidden;
    white-space: normal !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .customer-card__featured .request-row--compact {
    gap: 5px;
    padding: 8px;
  }

  .customer-card__featured .request-row__timing {
    grid-template-columns: 1fr;
  }

  .customer-card__featured .request-row__timing > span:nth-child(2),
  .customer-card__featured .request-row__footer small {
    display: none;
  }

  .customer-card__featured .request-row__footer {
    padding-top: 4px;
  }

  .fc .fc-toolbar > .fc-toolbar-chunk:first-child {
    justify-content: flex-start;
  }

  .fc .fc-toolbar > .fc-toolbar-chunk:last-child {
    justify-content: flex-end;
  }

  .fc .fc-list-event-title .calendar-job {
    gap: 3px;
    padding: 0 2px;
    color: #172554;
  }

  .fc .fc-list-event-title .calendar-job__time {
    display: none;
  }

  .fc .fc-list-event-title .calendar-job__top {
    justify-content: flex-start;
  }

  .fc .fc-list-event-title .calendar-job__type {
    color: var(--blue);
    background: #dbeafe;
  }

  .fc .fc-list-event-title .calendar-job__customer {
    font-size: 0.72rem;
  }

  .fc .fc-list-event-title .calendar-job__route,
  .fc .fc-list-event-title .calendar-job__driver {
    display: flex;
    font-size: 0.61rem;
  }

  #booking-dialog[data-booking-pane="details"] .dialog-actions {
    grid-template-columns: 44px 44px minmax(0, 1fr);
  }

  #booking-dialog[data-booking-pane="details"] #assign-driver-button,
  #booking-dialog[data-booking-pane="details"] #complete-booking-button,
  #booking-dialog[data-booking-pane="details"] #approve-booking-button,
  #booking-dialog[data-booking-pane="details"] #decline-booking-button,
  #booking-dialog[data-booking-pane="details"] #cancel-booking-button {
    display: none !important;
  }

  #booking-dialog[data-booking-pane="schedule"] .dialog-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #booking-dialog[data-booking-pane="schedule"] #dialog-phone-link,
  #booking-dialog[data-booking-pane="schedule"] #dialog-maps {
    display: none !important;
  }

  #booking-dialog[data-booking-pane="schedule"] #save-booking-button,
  #booking-dialog[data-booking-pane="schedule"] #assign-driver-button,
  #booking-dialog[data-booking-pane="schedule"] #complete-booking-button,
  #booking-dialog[data-booking-pane="schedule"] #approve-booking-button,
  #booking-dialog[data-booking-pane="schedule"] #decline-booking-button,
  #booking-dialog[data-booking-pane="schedule"] #cancel-booking-button {
    grid-column: auto;
  }

  #booking-dialog[data-booking-pane="schedule"] #decline-booking-button,
  #booking-dialog[data-booking-pane="schedule"] #cancel-booking-button {
    min-height: 44px;
    border: 1px solid #fecaca;
    border-radius: 9px;
    padding: 7px 9px;
    background: #fff;
  }

  #booking-dialog[data-booking-mode="new"][data-booking-pane="schedule"] #save-booking-button {
    grid-column: 1 / -1;
  }

  #booking-dialog[data-booking-mode="closed"][data-booking-pane="schedule"] .dialog-actions {
    display: none;
  }
}

/* Phone workspaces scroll with the document, not inside viewport-sized cards.
   Keep this after the legacy shell rules; dialogs retain their own scroll panes. */
@media (max-width: 767px) {
  html {
    height: auto;
    min-height: 100%;
    overflow: auto;
    scroll-padding-bottom: calc(82px + env(safe-area-inset-bottom));
    overscroll-behavior-y: auto;
  }

  body {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    overscroll-behavior-y: auto;
  }

  html:has(dialog[open]) {
    overflow: hidden;
  }

  .app-shell {
    height: auto;
    min-height: calc(100dvh - 48px - env(safe-area-inset-top));
    overflow: visible;
  }

  #app-panel,
  #admin-view:not([hidden]),
  #driver-view:not([hidden]) {
    height: auto;
    max-height: none;
    min-height: 0;
    grid-template-rows: none;
    grid-auto-rows: max-content;
    overflow: visible;
  }

  #app-panel[data-role="admin"] {
    padding-bottom: calc(var(--mobile-nav-height, 66px) + 16px + env(safe-area-inset-bottom));
  }

  #admin-view > .admin-screen,
  .jobs-panel,
  .search-results-panel,
  .drivers-panel,
  .vehicles-panel,
  #driver-jobs-panel {
    height: auto;
    max-height: none;
    min-height: 0;
    grid-template-rows: none;
    grid-auto-rows: max-content;
    overflow: visible;
    overscroll-behavior: auto;
  }

  .job-groups,
  .booking-list,
  .customer-grid,
  .driver-grid,
  .vehicle-grid,
  .driver-job-groups {
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
    overscroll-behavior: auto;
  }
}
