/* Dispatch UI: shared hierarchy, with a compact sheet on phone-sized screens. */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #202938; background: #f5f6fa; }
button, input, select, textarea { font-family: inherit; }
.app-header .brand { font-family: "Poppins", sans-serif; }
.app-header { border-bottom-color: #eef0f5; }
.workspace-top h1 { font-size: 25px; font-weight: 700; letter-spacing: -.7px; }
.workspace-top .kicker, .screen-heading .kicker { display: none; }
.workspace-top p, .screen-heading p { color: #778194; font-weight: 400; }
.screen-heading h2 { font-size: 19px; font-weight: 650; }
.admin-command-bar { box-shadow: none; border-color: #edf0f5; }
.primary-button, .small-button, .ghost-button, .success-button, .danger-button, .app-tab { font-weight: 600; }
.app-tab { font-size: 14px; }
.app-tab svg, .dialog-actions svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#dialog-title:focus { outline: none; }
.badge { font-size: 10px; font-weight: 650; text-transform: none; padding: 5px 8px; border-radius: 6px; white-space: nowrap; line-height: 1.3; }
.badge--pending_review, .badge--new_request { color: #8c5911; background: #fff0cd; }
.badge--assigned { color: #284477; background: #e9edfa; }
.badge--confirmed { color: #52647a; background: #edf0f5; }
.queue-toolbar { gap: 6px; }
.queue-chip { min-height: 36px; font-size: 12px; font-weight: 550; border: 1px solid #e5e8ef; border-radius: 9px; padding: 6px 10px; gap: 6px; box-shadow: none; }
.queue-chip strong { font-size: 11px; font-weight: 650; width: auto; min-width: 20px; height: 20px; padding: 2px 5px; border-radius: 5px; }
.queue-chip.is-active { border-color: #d3dbef; background: #eaf0ff; }
.jobs-panel { border: 0; background: transparent; padding: 0; box-shadow: none; }
.jobs-panel > .screen-heading { display: none; }
.job-groups { gap: 26px; }
.job-list-group__heading { border: 0; margin: 0 0 10px; padding: 0 2px; }
.job-list-group__heading h3 { font-size: 16px; font-weight: 650; color: #455166; }
.job-list-group__heading p { font-size: 12px; font-weight: 400; color: #838b99; }
.job-list-group__heading > span { background: none; color: #838b99; border: 0; width: auto; min-width: 0; height: auto; font-size: 12px; }
.booking-list { gap: 10px; align-content: start; }
.request-row, .request-row--compact { display: flex; flex-direction: column; align-items: stretch; width: 100%; height: auto; min-height: 0; gap: 11px; padding: 16px; border: 1px solid #e2e7f0; border-radius: 14px; background: #fff; box-shadow: 0 2px 5px #24335703; color: #202938; text-align: left; }
.request-row:hover { border-color: #aabbe2; background: #fafbff; }
.request-row__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.request-row__pickup { font-size: 12px; font-weight: 550; line-height: 1.4; color: #667187; text-align: left; }
.request-row .request-row__route, .request-row--compact .request-row__route { font-size: 16px !important; font-weight: 650; color: #1f2d48; line-height: 1.4; letter-spacing: -.25px; }
.request-row__footer { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 5px 12px; border-top: 0; padding: 0; color: #7e8797; }
.request-row__footer strong { font-size: 12px; font-weight: 500; color: #5d677b; margin-right: auto; }
.request-row__footer small { font-size: 11px; line-height: 1.4; font-weight: 400; }
.request-row__footer small i { font-size: 10px; }
.request-row--past { background: #f0f1f4; border-color: #e7e9ee; filter: saturate(.2); opacity: .78; }
.customer-grid, .driver-grid { align-items: start; align-content: start; grid-auto-rows: auto; }
.customer-card, .driver-card { height: auto; min-height: 0; border: 1px solid #e6e9f0; border-radius: 14px; padding: 16px; box-shadow: none; }
.customer-card__head { gap: 12px; }
.customer-avatar { width: 36px; height: 36px; min-width: 36px; border-radius: 12px; background: #edf0fb; color: #334b85; font-size: 14px; font-weight: 600; }
.customer-card__head h3, .driver-card h3 { font-size: 16px; font-weight: 650; }
.customer-card__head p { font-size: 12px; font-weight: 400; color: #7b8697; }
.customer-card__contact { padding: 12px 0 0; gap: 8px; }
.customer-card__contact a { font-size: 13px; font-weight: 400; color: #617188; overflow-wrap: anywhere; }
.customer-card__history { margin-top: 12px; border-top: 1px solid #edf0f5; }
.customer-card__history summary { padding: 12px 0 0; font-size: 12px; font-weight: 600; color: #304b88; cursor: pointer; list-style: none; }
.customer-card__history summary::-webkit-details-marker { display: none; }
.customer-card__history summary span { float: right; }
.customer-card__jobs { display: grid; gap: 8px; padding-top: 12px; }
/* Directory rows must retain their content height inside the scrolling panel.
   Auto grid tracks shrink when a large snapshot arrives while this tab is hidden. */
#customer-list { grid-auto-rows: max-content; align-content: start; align-items: start; }
#customer-list > .customer-card { display: block; min-width: 0; height: auto; min-height: 0; overflow: visible; }
#customer-list .customer-card__head { padding: 0; align-items: flex-start; }
#customer-list .customer-card__head > div { flex: 1; min-width: 0; }
#customer-list .customer-card__head h3 { margin: 0; line-height: 1.4; overflow-wrap: anywhere; }
#customer-list .customer-card__head p { margin: 3px 0 0; line-height: 1.45; }
#customer-list .customer-avatar { flex: 0 0 36px; }
#customer-list .customer-card__contact { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; min-height: 0; gap: 8px; padding: 12px 0 0; border: 0; background: transparent; }
#customer-list .customer-card__contact a, #customer-list .customer-card__contact p, #customer-list .customer-card__contact span, #customer-list .customer-card__email { display: block; min-width: 0; margin: 0; overflow: visible; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; font-size: 13px; line-height: 1.5; }
#customer-list .customer-card__contact i, #customer-list .customer-card__email i { display: inline-block; width: 18px; margin-right: 4px; }
#customer-list .customer-card__email { padding-top: 12px; color: #617188; }
#customer-list .customer-card__history { min-width: 0; }
#customer-list .customer-card__history summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 10px 0 0; font-size: 13px; }
#customer-list .customer-card__history summary span { float: none; }
#customer-list .customer-card__jobs { grid-auto-rows: max-content; min-width: 0; max-height: none; overflow: visible; padding: 12px 0 0; border: 0; }
#customer-list .customer-card__jobs .request-row { min-width: 0; height: auto; overflow-wrap: anywhere; }
.driver-card { align-items: center; }
.driver-card > div { min-width: 0; }
.driver-card p { font-size: 13px; line-height: 1.5; font-weight: 400; overflow-wrap: anywhere; }
#driver-list .driver-card strong { font-size: 16px; font-weight: 600; }
#driver-list .driver-card small, #driver-list .driver-card em { font-size: 13px; line-height: 1.4; font-weight: 400; }
#fleet-roster-list dt { font-size: 14px; font-weight: 600; }
#fleet-roster-list dd { font-size: 12px; line-height: 1.45; font-weight: 400; }
.vehicle-grid > div { border-radius: 12px; background: #f8f9fc; }

/* An existing booking opens as a readable overview, never a wall of fields. */
#booking-dialog { width: min(900px, calc(100vw - 48px)); max-width: 900px; height: min(840px, calc(100dvh - 64px)); max-height: calc(100dvh - 64px); border: 1px solid #e5e9f1; border-radius: 22px; padding: 0; margin: auto; box-shadow: 0 28px 100px #10204440; overflow: hidden; }
#booking-dialog::backdrop { background: #18233e66; backdrop-filter: blur(3px); }
#booking-dialog-form { display: flex; flex-direction: column; height: 100%; max-height: 100%; min-width: 0; padding: 0; overflow: hidden; }
#booking-dialog .dialog-head { flex: 0 0 auto; display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 14px; margin: 0; border: 0; }
#booking-dialog .dialog-head > div { min-width: 0; flex: 1; }
#booking-dialog .dialog-head .kicker { font-size: 10px; letter-spacing: 1.1px; color: #8a92a2; font-weight: 650; margin: 0 0 5px; }
#booking-dialog #dialog-title { margin: 0; font-size: 21px; font-weight: 650; line-height: 1.3; letter-spacing: -.5px; color: #172b50; overflow-wrap: anywhere; }
#booking-dialog #dialog-subtitle { margin: 5px 0 0; font-size: 12px; font-weight: 400; color: #7f899b; }
#booking-dialog #dialog-close { flex: 0 0 36px; width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; margin: 0; border: 0; border-radius: 50%; color: #758198; background: #f1f3f8; font-size: 16px; }
#booking-dialog #dialog-close:focus:not(:focus-visible) { outline: none; box-shadow: none; }
#booking-dialog #dialog-close span { font-size: 26px; font-weight: 300; line-height: 1; }
#booking-dialog .dialog-time-summary { display: none; }
#booking-dialog .dialog-alerts { flex: 0 0 auto; padding: 0 20px; }
#booking-dialog .booking-editor { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; min-width: 0; gap: 0; padding: 0; overflow: hidden; }
#booking-dialog .booking-editor-tabs { flex: 0 0 auto; display: flex; align-items: stretch; gap: 4px; padding: 4px; margin: 0 24px 14px; border: 0; border-radius: 11px; background: #f0f2f7; min-height: 42px; max-height: none; }
#booking-dialog .booking-editor-tabs button { flex: 1; display: block; min-width: 0; min-height: 34px; padding: 7px; border: 0; border-radius: 8px; font-size: 13px; line-height: 1.25; font-weight: 600; color: #798296; background: transparent; }
#booking-dialog .booking-editor-tabs button.is-active { background: #fff; color: #233f80; box-shadow: 0 1px 4px #22304b15; }
#booking-dialog .booking-details { display: block; flex: 1 1 0; min-height: 0; min-width: 0; width: 100%; overflow: hidden; padding: 0; margin: 0; border: 0; }
#booking-dialog [data-editor-pane] { display: none; width: auto; height: 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 24px 24px; margin: 0; background: #fff; border: 0; border-radius: 0; }
#booking-dialog [data-editor-pane].is-pane-active { display: block; }
#booking-dialog .admin-booking-section { border: 0; border-top: 1px solid #edf0f5; border-radius: 0; margin: 0; padding: 18px 0; background: #fff; box-shadow: none; }
#booking-dialog .admin-booking-section:first-child { border-top: 0; padding-top: 2px; }
#booking-dialog .admin-booking-section__heading { display: flex; gap: 0; margin-bottom: 14px; }
#booking-dialog .admin-booking-section__heading > div { min-width: 0; flex: 1; }
#booking-dialog .admin-booking-section__heading > span { display: none; }
#booking-dialog .admin-booking-section h3, #booking-dialog .booking-summary__head h3 { color: #273851; font-size: 15px; font-weight: 650; text-transform: none; letter-spacing: 0; }
#booking-dialog label { display: block; font-size: 12px; line-height: 1.45; font-weight: 550; color: #768195; }
#booking-dialog input:not([type=checkbox]):not([type=hidden]), #booking-dialog select, #booking-dialog textarea { display: block; box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 46px; height: auto; padding: 11px 12px; margin-top: 5px; border: 1px solid #e1e6ef; border-radius: 9px; background: #f9fafc; color: #29364c; font-size: 16px; line-height: 1.4; font-weight: 400; box-shadow: none; }
#booking-dialog input::placeholder, #booking-dialog textarea::placeholder { color: #a0a8b6; font-size: 14px; font-weight: 400; }
#booking-dialog select { appearance: none; -webkit-appearance: none; min-height: 46px; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23788195' stroke-width='1.5'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
#booking-dialog select.quarter-hour-select { height: 50px; min-height: 50px; text-align: left; }
#booking-dialog .booking-field-pair, #booking-dialog .booking-field-triple { display: grid; gap: 12px; margin: 0; }
#booking-dialog .booking-field-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#booking-dialog .booking-field-triple { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Native Safari date/time contents need explicit sizing, including when empty.
   Keep the real inputs and picker indicators so keyboard/touch behaviour stays native. */
#booking-dialog #booking-dialog-form input:is([type="date"], [type="time"]) { appearance: none; -webkit-appearance: none; box-sizing: border-box; min-width: 0; min-inline-size: 0; width: 100%; max-width: 100%; height: 50px; min-height: 50px; text-align: left; }
#booking-dialog input:is([type="date"], [type="time"])::-webkit-date-and-time-value { min-height: 1.4em; text-align: left; }
#booking-dialog input:is([type="date"], [type="time"])::-webkit-datetime-edit { min-width: 0; padding: 0; }
#booking-dialog input:is([type="date"], [type="time"])::-webkit-datetime-edit-fields-wrapper { padding: 0; }
#booking-dialog .booking-field-pair:has(> label > input:is([type="date"], [type="time"])) > label { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
#booking-dialog .leg-operation-card { border: 0; border-radius: 0; padding: 6px 0; background: transparent; margin: 0 0 16px; }
#booking-dialog .leg-operation-card > label { margin: 0 0 12px; }
#booking-dialog .leg-operation-card legend { padding: 0; font-size: 13px; font-weight: 600; color: #344f88; }
#booking-dialog .admin-flight-timing-grid, #booking-dialog .admin-requested-pickup-grid { border: 0; border-radius: 10px; background: #f3f6fc; padding: 12px; gap: 10px; margin-top: 12px; }
#booking-dialog .dispatch-leg-card { padding: 14px; border: 1px solid #e6eaf2; border-radius: 12px; background: #f8faff; margin: 16px 0; }
#booking-dialog .dispatch-leg-card .booking-field-pair + .booking-field-pair { margin-top: 12px; }
#booking-dialog .dispatch-leg-card legend { font-size: 13px; font-weight: 600; color: #345084; }
#booking-dialog .booking-summary__head { padding: 0 0 12px; border-bottom: 1px solid #eef0f5; }
#booking-dialog .admin-dispatch-panel__intro { font-size: 12px; font-weight: 400; margin-top: 4px; }
#booking-dialog .lock-state { display: none; }
#booking-dialog .pricing-panel { background: #fafbfe; border: 1px solid #e6eaf2; border-radius: 12px; margin-top: 16px; }
#booking-dialog .message-panel { margin-top: 16px; border: 0; }
#booking-dialog .message-panel h3 { font-size: 14px; font-weight: 600; text-transform: none; }
#booking-dialog .message-panel p { font-size: 12px; font-weight: 400; }
#booking-dialog .checkbox-label { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
#booking-dialog .checkbox-label input { flex: 0 0 20px; width: 20px; height: 20px; accent-color: #233e80; }
.booking-overview { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px 24px; }
#booking-dialog[data-unsaved-changes="true"] .booking-overview::before { content: "Showing saved details. Your edits are not saved yet."; display: block; padding: 10px 12px; margin-bottom: 12px; border-radius: 8px; color: #8a6c30; background: #fff8e9; font-size: 12px; line-height: 1.4; }
.overview-customer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0 18px; }
.overview-customer > div { display: grid; gap: 4px; min-width: 0; }
.overview-customer strong { font-size: 17px; font-weight: 600; }
.overview-customer div span { font-size: 13px; color: #8390a3; }
.overview-leg { border: 1px solid #e6eaf2; border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.overview-leg__heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.overview-leg__heading h3, .overview-extras h3 { font-size: 13px; font-weight: 600; color: #5a6b83; margin: 0; }
.overview-leg__heading a { font-size: 12px; font-weight: 550; text-decoration: none; color: #355695; padding: 6px 0 6px 6px; }
.overview-pickup { display: grid; gap: 3px; background: #fff8e9; padding: 12px; border-radius: 9px; margin-bottom: 18px; }
.overview-pickup.is-confirmed { background: #edf2ff; }
.overview-pickup > span { font-size: 11px; color: #7c8495; }
.overview-pickup > strong { font-size: 18px; font-weight: 650; letter-spacing: -.3px; color: #263e6d; }
.overview-pickup > small { font-size: 11px; color: #9b7d45; }
.overview-route { list-style: none; margin: 0; padding: 0; }
.overview-route li { position: relative; display: grid; gap: 4px; padding: 0 0 18px 23px; border-left: 1px solid #dce3ee; margin-left: 5px; }
.overview-route li::before { content: ""; position: absolute; left: -5px; top: 3px; width: 9px; height: 9px; border: 2px solid #5772aa; border-radius: 50%; background: #fff; }
.overview-route li:last-child { border-color: transparent; padding-bottom: 4px; }
.overview-route li:last-child::before { border-color: #df3537; border-radius: 2px; }
.overview-route li span { font-size: 11px; font-weight: 400; color: #8793a5; }
.overview-route li strong { font-size: 15px; line-height: 1.4; font-weight: 550; overflow-wrap: anywhere; color: #283952; }
.overview-assignment { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; border-top: 1px solid #edf0f5; padding-top: 13px; margin-top: 14px; font-size: 13px; color: #6c7b91; }
.overview-assignment i { margin-right: 3px; font-size: 11px; }
.overview-flight { display: grid; gap: 4px; border-top: 1px solid #edf0f5; margin-top: 12px; padding-top: 12px; }
.overview-flight span, .overview-flight small { color: #8691a3; font-size: 11px; }
.overview-flight strong { font-size: 13px; font-weight: 500; color: #5d6b83; }
.overview-extras { padding: 8px 0 14px; }
.overview-extras p, .overview-email { color: #768297; font-size: 13px; line-height: 1.5; margin: 5px 0 0; overflow-wrap: anywhere; }
#booking-dialog .dialog-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 24px; margin: 0; border-top: 1px solid #eef0f5; background: #fff; }
#booking-dialog .dialog-actions > * { min-height: 44px; padding: 10px 14px; margin: 0; border-radius: 10px; font-size: 13px; line-height: 1.3; font-weight: 600; }
#booking-dialog[data-booking-pane="summary"] .dialog-actions > button:not(#overview-schedule-button) { display: none !important; }
#booking-dialog[data-booking-pane="summary"] #overview-schedule-button { order: 3; margin-left: auto; }
#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-phone-link, #booking-dialog[data-booking-pane="schedule"] #dialog-maps { display: none !important; }
#booking-dialog .booking-more-actions { position: relative; padding: 0; min-width: 44px; width: 44px; height: 44px; }
#booking-dialog:not([data-booking-pane="schedule"]) .booking-more-actions { display: none !important; }
#booking-dialog .booking-more-actions summary { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid #e1e6ef; border-radius: 10px; list-style: none; cursor: pointer; font-size: 16px; color: #62728d; }
#booking-dialog .booking-more-actions summary::-webkit-details-marker { display: none; }
#booking-dialog .booking-more-actions > div { position: absolute; right: 0; bottom: 52px; width: 180px; padding: 6px; border-radius: 12px; background: #fff; border: 1px solid #e2e7ef; box-shadow: 0 10px 35px #15244725; z-index: 10; }
#booking-dialog .booking-more-actions button { display: block; width: 100%; min-height: 44px; margin: 0; padding: 10px; border: 0 !important; text-align: left; font-size: 13px; font-weight: 550; }
#booking-dialog[data-booking-mode="new"] .booking-editor-tabs { display: none; }
#booking-dialog[data-booking-mode="new"] [data-editor-pane="details"] { display: block; }
#booking-dialog .driver-leg-details { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 0 24px 24px; }

@media (max-width: 760px) {
  .app-header { height: 48px; min-height: 48px; padding: 8px 16px; }
  .app-header .brand { font-size: 14px; }
  .app-header #sign-out { font-size: 11px; font-weight: 500; border: 0; padding: 8px; min-height: 32px; }
  #app-panel .workspace-top { min-height: 58px; padding: 12px 16px 8px; gap: 8px; }
  .workspace-top h1 { font-size: 23px; }
  .workspace-top .user-pill { width: 30px; min-width: 30px; height: 30px; border: 0; box-shadow: none; background: #e9edfa; color: #304781; }
  #admin-view { padding-left: 12px; padding-right: 12px; gap: 10px; }
  .admin-command-bar { padding: 0; background: transparent; border: 0; }
  .global-search { min-height: 42px; height: 42px; background: #fff; border: 1px solid #e7ebf3; border-radius: 10px; }
  .global-search input { font-size: 14px; font-weight: 400; }
  .new-booking-button { width: 42px; min-width: 42px; min-height: 42px; height: 42px; border-radius: 10px; }
  .app-tabs { gap: 4px; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e6eaf2; box-shadow: none; }
  .app-tab { min-height: 48px; font-size: 10px; font-weight: 550; line-height: 1.15; border-radius: 10px; gap: 5px; }
  .app-tab i { font-size: 17px; }
  .app-tab.is-active { background: #edf1fc; color: #294787; }
  .queue-toolbar { display: flex; overflow-x: auto; gap: 5px; margin: 0; padding: 0 0 2px; scrollbar-width: none; }
  .queue-chip { flex: 0 0 auto; min-width: 0; min-height: 32px; padding: 5px 8px; font-size: 10px; gap: 4px; }
  .queue-chip strong { min-width: 16px; height: 17px; padding: 1px 4px; font-size: 10px; }
  .jobs-panel { padding: 0; border: 0; border-radius: 0; background: transparent; }
  .job-list-group__heading h3 { font-size: 14px; }
  .job-list-group__heading { margin: 4px 2px 8px; }
  .job-list-group__heading > span { font-size: 11px; background: transparent; min-width: 0; min-height: 0; }
  .request-row, .request-row--compact { padding: 14px; gap: 10px; border-radius: 13px; }
  .request-row__pickup { font-size: 11px; }
  .request-row .request-row__route { font-size: 16px !important; }
  .request-row__footer strong { font-size: 12px; }
  .request-row__footer small { font-size: 11px; }
  .request-row__footer small:nth-of-type(n+2) { display: none; }
  .badge { font-size: 9px; padding: 4px 6px; }
  #customers-view, .drivers-panel, .vehicles-panel { padding: 14px; border-radius: 14px; border-color: #e8ecf3; }
  .customer-grid, .driver-grid { gap: 10px; }
  .customer-card, .driver-card { padding: 14px; }
  .driver-card p { font-size: 12px; }
  #add-driver-button { min-height: 36px; padding: 8px 12px; font-size: 12px; width: auto; flex: 0 0 auto; }
  #booking-dialog { width: calc(100vw - 16px); max-width: none; height: min(820px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); margin: auto; border-radius: 22px; }
  #booking-dialog .dialog-head { padding: 18px 16px 12px; gap: 10px; }
  #booking-dialog #dialog-title { font-size: 19px; line-height: 1.3; padding: 0; }
  #booking-dialog #dialog-subtitle { font-size: 11px; }
  #booking-dialog #dialog-close { flex-basis: 36px; }
  #booking-dialog .booking-editor-tabs { margin: 0 16px 12px; padding: 3px; min-height: 38px; }
  #booking-dialog .booking-editor-tabs button { font-size: 12px; min-height: 32px; }
  #booking-dialog [data-editor-pane], .booking-overview { padding-left: 16px; padding-right: 16px; }
  #booking-dialog .admin-booking-section { padding: 16px 0; }
  #booking-dialog .booking-field-triple { grid-template-columns: 1fr; }
  #booking-dialog .booking-field-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #booking-dialog #dialog-contact-title { font-size: 14px; }
  #booking-dialog .booking-field-triple:has(#dialog-service-type) { grid-template-columns: 1fr 1fr; }
  #booking-dialog .booking-field-triple:has(#dialog-service-type) > label:first-child { grid-column: 1 / -1; }
  #booking-dialog .admin-flight-timing-grid, #booking-dialog .admin-requested-pickup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #booking-dialog .leg-assignment { grid-template-columns: 1fr; }
  #booking-dialog .dialog-actions { display: grid; grid-template-columns: 44px 44px minmax(0, 1fr); padding: 10px 16px; gap: 6px; }
  #booking-dialog .dialog-actions > * { min-height: 44px; font-size: 12px; padding: 10px 8px; }
  #booking-dialog #dialog-phone-link, #booking-dialog #dialog-maps { display: flex; justify-content: center; font-size: 0; }
  #booking-dialog #dialog-phone-link i, #booking-dialog #dialog-maps i { font-size: 17px; }
  #booking-dialog[data-booking-pane="summary"] #overview-schedule-button { margin: 0; width: 100%; }
  #booking-dialog[data-booking-pane="schedule"] .dialog-actions { grid-template-columns: 1fr 1fr 44px; }
  #booking-dialog[data-booking-mode="live"][data-booking-pane="schedule"] .dialog-actions { grid-template-columns: minmax(0, 1fr) 44px; }
  #booking-dialog .dialog-actions > .booking-more-actions { padding: 0; }
  #booking-dialog[data-booking-mode="new"] .dialog-actions { grid-template-columns: 1fr; }
  #booking-dialog[data-booking-mode="new"] #dialog-maps { display: none; }
  #booking-dialog[data-booking-mode="closed"][data-booking-pane="summary"] .dialog-actions { grid-template-columns: 44px 44px; justify-content: start; }
  .overview-leg { padding: 14px; border-radius: 12px; }
  .overview-pickup > strong { font-size: 17px; }
  .overview-route li strong { font-size: 15px; }
  #booking-dialog .driver-leg-details { padding: 0 16px 16px; }
}

@media (max-width: 600px) {
  /* A full row leaves room for dates and 12/24-hour native time formats. */
  #booking-dialog .booking-field-pair:has(> label > input:is([type="date"], [type="time"])) { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 360px) {
  #booking-dialog .booking-field-pair, #booking-dialog .admin-flight-timing-grid, #booking-dialog .admin-requested-pickup-grid { grid-template-columns: 1fr; }
  .request-row__top { align-items: flex-start; }
}
