/* Base layout */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Generic hidden class for any element */
.hidden {
  display: none !important;
}

/* Toast notifications */
.toast-notification {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f2937;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-notification.toast-success {
  background: #059669;
}

.toast-notification.toast-error {
  background: #dc2626;
}

.toast-notification.toast-info {
  background: #2563eb;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
}

/* Beta access gate */
.beta-gate {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #f8faf8 0%, #e8f5e9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.beta-gate.hidden {
  display: none !important;
}

.beta-gate-content {
  background: #fff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.beta-gate-logo {
  width: 180px;
  margin-bottom: 24px;
}

.beta-gate-content h2 {
  color: #1f2937;
  margin: 0 0 12px 0;
  font-size: 24px;
}

.beta-gate-content p {
  color: #6b7280;
  margin: 0 0 24px 0;
  font-size: 14px;
  line-height: 1.5;
}

.beta-code-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.beta-code-wrapper .beta-code-input {
  margin-bottom: 0;
  padding-right: 48px;
}

.beta-code-wrapper .password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.beta-code-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 16px;
  text-align: center;
  letter-spacing: 2px;
  transition: border-color 0.2s;
}

.beta-code-input:focus {
  outline: none;
  border-color: #22c55e;
}

.beta-submit-btn {
  width: 100%;
  padding: 14px 24px;
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.beta-submit-btn:hover {
  background: #16a34a;
}

.beta-error {
  color: #dc2626;
  font-size: 14px;
  margin-top: 16px;
  margin-bottom: 0;
}

/* App wrapper - hide until fully loaded to prevent flash */
.app-wrapper.app-loading {
  visibility: hidden;
  opacity: 0;
}

.app-wrapper {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s ease-out;
}

/* Splash screen */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f8faf8;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease-out;
}

.splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-logo {
  width: 200px;
  max-width: 60%;
  height: auto;
  animation: splash-pulse 1.5s ease-in-out infinite;
}

@keyframes splash-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.app-header {
  background: #111827;
  color: #f9fafb;
  padding: 0.9rem 1rem 0.8rem;
  border-bottom: 1px solid #1f2933;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-header-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.header-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: contain;
}

.app-logo {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
}

.app-tagline {
  margin: 0;
  font-size: 0.8rem;
  color: #9ca3af;
}

.app-main {
  padding: 0.75rem;
  padding-bottom: 4.5rem; /* space for bottom nav */
  max-width: 900px;
  margin: 0 auto;
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.toolbar-left {
  flex: 1;
  min-width: 0;
}

.toolbar-title {
  margin: 0;
  font-size: 1.15rem;
}

.toolbar-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.toolbar-right {
  display: flex;
  align-items: center;
}

/* Post delivery button */
.post-delivery-btn {
  background: #22c55e;
  color: #ffffff;
  border: none;
  border-radius: 0.25rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.post-delivery-btn:hover {
  background: #16a34a;
}

/* Role toggle (hidden - now in Account tab) */
.role-toggle {
  display: flex;
}

.role-tab {
  border: none;
  background: transparent;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  color: #9ca3af;
  position: relative;
}

.role-tab.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.role-tab.has-unseen::after {
  content: "";
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 0.5rem;
  height: 0.5rem;
  background: #22c55e;
  border-radius: 50%;
}

/* Category tab bar */
.category-tab-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  background: #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.25rem;
  max-width: 16rem;
  margin-left: auto;
  margin-right: auto;
}

.category-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  color: #6b7280;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.category-tab:hover {
  color: #374151;
}

.category-tab.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.category-tab .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  background: #22c55e;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 999px;
}

.category-tab .badge:empty,
.category-tab .badge[data-count="0"] {
  display: none;
}

.category-tab .badge.has-unseen {
  background: #22c55e;
}

/* Legacy rotate label styles - can be removed later */
.rotate-label .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: #6b7280;
  color: #ffffff;
}

.rotate-label .badge:empty,
.rotate-label .badge[data-count="0"] {
  display: none;
}

.rotate-label .badge.has-unseen {
  background: #22c55e;
  color: #ffffff;
}

.category-tab.active {
  background: #22c55e;
  color: #ffffff;
}

.category-tab:not(.active):hover {
  background: #d1d5db;
}

/* Swipeable category panels */
.category-swipe-container {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.category-panels {
  display: block;
  width: 100%;
}

.category-panel {
  display: none;
  width: 100%;
}

.category-panel.active {
  display: block;
}

.category-empty {
  padding: 2rem 1rem;
  text-align: center;
}

.category-empty p {
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.category-empty .empty-hint {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-bottom: 1rem;
}

.empty-seeking-availability {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.empty-seeking-availability .availability-count-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.empty-seeking-availability .availability-label {
  font-size: 0.85rem;
  color: #6b7280;
}

.empty-seeking-availability .availability-helper {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.account-link {
  color: #2563eb;
  text-decoration: underline;
  cursor: pointer;
}

.account-link:hover {
  color: #1d4ed8;
}

/* Buttons */
.primary-btn,
.secondary-btn {
  border-radius: 999px;
  border: none;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}

.primary-btn {
  background: #22c55e;
  color: #ffffff;
}

.danger-btn {
  background: #ef4444;
  color: #ffffff;
  border-radius: 999px;
  border: none;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}

.danger-btn:hover {
  background: #dc2626;
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.secondary-btn {
  background: #e5e7eb;
  color: #111827;
}

/* Blue glow for unseen items */
.secondary-btn.unseen-glow {
  border: 1.5px solid #22c55e;
  box-shadow: 0 0 4px rgba(37, 99, 235, 0.35);
}

/* Deliveries list */
.deliveries-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Delivery card */
.delivery-card {
  background: #ffffff;
  border-radius: 0.8rem;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
  border: 1px solid #e5e7eb;
  font-size: 0.7rem;
}

/* Customer vs driver tweak */
.driver-card {
  border-left: 3px solid transparent;
}

/* Driver view Deliveries tab - dark theme matching header */
body.driver-mode.on-deliveries-tab {
  background: #111827;
}

body.driver-mode.on-deliveries-tab .app-main {
  background: #111827;
}

body.driver-mode.on-deliveries-tab .app-footer {
  background: #111827;
  color: #9ca3af;
}

body.driver-mode.on-deliveries-tab .app-footer a {
  color: #34d399;
}

body.driver-mode #tab-deliveries {
  background: #111827;
  min-height: 100vh;
}

body.driver-mode #driver-view {
  background: #111827;
  color: #f9fafb;
  min-height: 100vh;
}

/* Driver Deliveries tab text adjustments for dark background */
body.driver-mode #driver-view h1,
body.driver-mode #driver-view h2,
body.driver-mode #driver-view h3,
body.driver-mode #driver-view h4,
body.driver-mode #driver-view .section-heading {
  color: #f9fafb;
}

body.driver-mode #driver-view p,
body.driver-mode #driver-view span,
body.driver-mode #driver-view label {
  color: #e5e7eb;
}

/* Off-white background for driver mode cards */
body.driver-mode #driver-view .delivery-card {
  background: #f8f9fa;
}

/* Restore dark text colors inside delivery cards (off-white background) */
body.driver-mode #driver-view .delivery-card p,
body.driver-mode #driver-view .delivery-card span,
body.driver-mode #driver-view .delivery-card label,
body.driver-mode #driver-view .delivery-card .card-title,
body.driver-mode #driver-view .delivery-card .age-label,
body.driver-mode #driver-view .delivery-card .addr-label,
body.driver-mode #driver-view .delivery-card .profile-name,
body.driver-mode #driver-view .delivery-card .driver-meta-inline,
body.driver-mode #driver-view .delivery-card .date-line {
  color: #1f2937;
}

body.driver-mode #driver-view .delivery-card .age-label {
  color: #6b7280;
}

body.driver-mode #driver-view .delivery-card .addr-text.addr-link {
  color: #22c55e;
}

/* Driver Deliveries tab bar styling */
body.driver-mode #driver-view .category-tab-bar {
  background: #1f2937;
  border-color: #374151;
}

body.driver-mode #driver-view .category-tab-bar button {
  color: #d1d5db;
}

body.driver-mode #driver-view .category-tab-bar button.active {
  color: #fff;
  background: #22c55e;
}

/* Driver Deliveries empty state card */
body.driver-mode #driver-view .empty-state {
  background: #1f2937;
  border-color: #374151;
  color: #9ca3af;
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px dashed #374151;
}

/* Driver Deliveries links */
body.driver-mode #driver-view a {
  color: #34d399;
}

/* Fix button text in driver mode - white text on green button */
body.driver-mode #driver-view a.primary-btn {
  color: #fff;
}

body.driver-mode #driver-view .footer-links a {
  color: #34d399;
}

/* Job Access Off card styling for driver mode */
.job-access-off-card {
  text-align: left;
  font-style: normal;
}

.job-access-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.job-access-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.job-access-section h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: #f9fafb;
}

.job-access-section p {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #d1d5db;
}

.job-access-section p:last-child {
  margin-bottom: 0;
}

.job-access-section .micro-clarifier,
.job-access-section .section-footer-note {
  font-size: 0.85rem;
  color: #9ca3af;
  font-style: italic;
  margin-top: 0.75rem;
}

.job-access-section .share-tab-link {
  margin-top: 0.5rem;
}

.job-access-section .share-tab-nav-link {
  color: #34d399;
  text-decoration: underline;
  cursor: pointer;
}

.job-access-section .share-tab-nav-link:hover {
  color: #4ade80;
}

/* Light mode fallback for job access off card */
body:not(.driver-mode) .job-access-section h4 {
  color: #111827;
}

body:not(.driver-mode) .job-access-section p {
  color: #4b5563;
}

body:not(.driver-mode) .job-access-section .micro-clarifier {
  color: #6b7280;
}

body:not(.driver-mode) .job-access-section {
  border-bottom-color: #e5e7eb;
}

body:not(.driver-mode) .job-access-section .share-tab-nav-link {
  color: #059669;
}

/* Setup summary and tips lists in blank states */
.setup-summary-list,
.tips-list {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.setup-summary-list li,
.tips-list li {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #d1d5db;
  margin-bottom: 0.35rem;
}

.setup-summary-list li:last-child,
.tips-list li:last-child {
  margin-bottom: 0;
}

body:not(.driver-mode) .setup-summary-list li,
body:not(.driver-mode) .tips-list li {
  color: #4b5563;
}

.tips-list a {
  color: #34d399;
  text-decoration: underline;
}

.tips-list a:hover {
  color: #4ade80;
}

body:not(.driver-mode) .tips-list a {
  color: #059669;
}

/* Customer blank state card styling */
.customer-blank-state {
  text-align: left;
  font-style: normal;
}

.customer-blank-card {
  text-align: left;
}

.customer-blank-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.customer-blank-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.customer-blank-section h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: #111827;
}

.customer-blank-section p {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #4b5563;
}

.customer-blank-section p:last-child {
  margin-bottom: 0;
}

.customer-blank-section .primary-btn {
  margin-top: 0.75rem;
}

.customer-request-list {
  margin: 0;
  padding-left: 1.25rem;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.6;
}

.customer-request-list li {
  margin-bottom: 0.25rem;
}

.customer-request-list li:last-child {
  margin-bottom: 0;
}

.customer-blank-section .section-footer-note {
  font-size: 0.85rem;
  color: #6b7280;
  font-style: italic;
  margin-top: 0.75rem;
}

.customer-blank-section .availability-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.customer-blank-section .availability-count-value {
  font-weight: 600;
  color: #059669;
}



/* Message card unseen indicator - gold dot */
.message-card.unseen {
  position: relative;
}

.message-card.unseen::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 0.5rem;
  height: 0.5rem;
  background: #22c55e;
  border-radius: 50%;
}

/* Customer cards also get transparent border by default */
.customer-card {
  border-left: 3px solid transparent;
}

/* Overdue action label for driver cards */
.overdue-action-label {
  background: #dc2626;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  text-align: center;
  letter-spacing: 0.5px;
  animation: pulse-overdue 2s ease-in-out infinite;
}

@keyframes pulse-overdue {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Card top */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

/* 2-line clamp utility for long names */
.name-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  line-height: 1.3;
}

/* Status pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
}

/* Name pill in message cards - allow flex growth for name truncation */
.status-pill.status-neutral {
  min-width: 0;
  flex: 0 1 auto;
  max-width: 180px;
}

.status-pill.status-neutral span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

/* Status chip - prevent shrinking */
.chat-status-label {
  flex-shrink: 0;
  white-space: nowrap;
}

.status-pill-count {
  font-weight: 600;
}

/* Status colors */
.status-seeking {
  background: #e0f2fe;
  color: #0369a1;
}

.status-quoted {
  background: #fef9c3;
  color: #854d0e;
}

.status-booked {
  background: #dcfce7;
  color: #166534;
}

.status-completed {
  background: #e5e7eb;
  color: #374151;
}

.status-cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

.status-closed {
  background: #f3f4f6;
  color: #6b7280;
}

/* Driver-specific statuses */
.status-new-job {
  background: #e0f2fe;
  color: #0369a1;
}

.status-your-quote {
  background: #fef9c3;
  color: #854d0e;
}

.status-pill.clickable-pill {
  cursor: pointer;
  transition: all 0.15s ease;
}

.status-pill.clickable-pill:hover {
  filter: brightness(0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.status-pill.clickable-pill:active {
  transform: translateY(0);
  filter: brightness(0.9);
}

.status-assigned {
  background: #dcfce7;
  color: #166534;
}

/* Accepted summary */
.accepted-summary {
  margin: 0.25rem 0 0.35rem;
  padding: 0.4rem 0.45rem;
  border-radius: 0.6rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-size: 0.75rem;
  color: #16a34a;
  max-width: 100%;
  box-sizing: border-box;
}

.accepted-summary-amounts {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.accepted-summary .amount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accepted-summary .amount-label {
  color: #374151;
}

.accepted-summary .amount-value {
  font-weight: 600;
  color: #374151;
}

.accepted-summary .amount-due {
  margin-top: 0.15rem;
  padding-top: 0.25rem;
  border-top: 1px solid #bfdbfe;
}

.accepted-summary .amount-due .amount-label,
.accepted-summary .amount-due .amount-value {
  color: #16a34a;
  font-weight: 600;
}

.accepted-summary-sub {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #1e3a8a;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.cancellation-fee-summary.fee-paid {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 1px solid #86efac;
}

.cancellation-fee-summary.fee-paid .amount-due .amount-label,
.cancellation-fee-summary.fee-paid .amount-due .amount-value {
  color: #15803d;
}

.accepted-summary-sub.paid-status {
  color: #15803d;
}

.paid-badge {
  display: inline-block;
  background: #16a34a;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-right: 0.3rem;
}

.failed-badge {
  display: inline-block;
  background: #dc2626;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-right: 0.3rem;
}

.fee-failed {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.failed-status {
  color: #dc2626;
}

.refund-summary.refund-processed {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 1px solid #86efac;
}

.refund-summary.refund-processed .amount-due .amount-label,
.refund-summary.refund-processed .amount-due .amount-value {
  color: #15803d;
}

.accepted-summary-sub.refunded-status {
  color: #15803d;
}

.refunded-badge {
  display: inline-block;
  background: #16a34a;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-right: 0.3rem;
}

.refunded-badge.processing {
  background: #f59e0b;
}

.refunded-badge.failed {
  background: #dc2626;
}

/* Driver progress action on card face */
.driver-progress-action {
  margin: 0.5rem 0;
  display: flex;
  justify-content: flex-end;
}

.driver-progress-action .driver-step-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Quote summary */
.quote-summary-line {
  font-size: 0.75rem;
  color: #854d0e;
  margin-bottom: 0.3rem;
}

/* Age label */
.age-label {
  font-size: 0.75rem;
  color: #6b7280;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Card layout */
.card-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
}

/* Thumbnails */
.thumb-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 0.6rem;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

.thumb {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background-size: cover;
  background-position: center;
}

.thumb-count {
  position: absolute;
  bottom: 3px;
  right: 6px;
  font-size: 0.7rem;
  background: rgba(17, 24, 39, 0.85);
  color: #f9fafb;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
}

.thumb.photo-placeholder {
  background: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-count-badge {
  font-size: 0.65rem;
  color: #6b7280;
  font-weight: 500;
  text-align: center;
  padding: 0.25rem;
}

/* Card body */
.card-main-body {
  min-width: 0;
}

.card-title {
  font-weight: 600;
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
  color: #1f2937;
  word-break: break-word;
}

.card-title .title-text {
  color: #1f2937;
}

.delivery-id-badge {
  font-size: 0.65rem;
  font-weight: 500;
  color: #4b5563;
  background: #e5e7eb;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Profile rows */
.profile-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.profile-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #374151;
  background-size: cover;
  background-position: center;
}

.profile-text {
  font-size: 0.75rem;
  color: #4b5563;
  min-width: 0;
  flex: 1;
}

.profile-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Addresses */
.card-addresses {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.addr-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem;
  align-items: baseline;
  margin-bottom: 0.08rem;
}

.addr-label {
  font-size: 0.75rem;
  color: #6b7280;
}

.addr-text {
  font-size: 0.8rem;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.addr-link {
  color: #2563eb;
  text-decoration: none;
}

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

/* Same-location move note */
.same-location-note {
  font-size: 0.75rem;
  color: #dc2626;
  font-weight: 500;
  margin-top: 0.1rem;
}

.car-suv-note {
  font-size: 0.75rem;
  color: #dc2626;
  font-weight: 500;
  margin-top: 0.1rem;
}

.same-address-truck-note {
  font-size: 0.75rem;
  color: #dc2626;
  font-weight: 500;
  margin-top: 0.1rem;
}

/* Same-location move helper line in form */
.same-location-helper {
  font-size: 0.8rem;
  color: #7c3aed;
  font-style: italic;
  margin: 0.25rem 0 0.5rem 0;
  padding: 0.5rem 0.75rem;
  background: #f5f3ff;
  border-radius: 6px;
  border-left: 3px solid #7c3aed;
}

.same-location-helper.hidden {
  display: none;
}

/* Same address truck required helper line in form */
.same-address-truck-helper {
  font-size: 0.8rem;
  color: #7c3aed;
  font-style: italic;
  margin: 0.25rem 0 0.5rem 0;
  padding: 0.5rem 0.75rem;
  background: #f5f3ff;
  border-radius: 6px;
  border-left: 3px solid #7c3aed;
}

.same-address-truck-helper.hidden {
  display: none;
}

/* Single address privacy note */
.single-address-privacy-note {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0.25rem 0 0.5rem 0;
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border-radius: 6px;
  border-left: 3px solid #d1d5db;
}

.single-address-privacy-note.hidden {
  display: none;
}

/* Address clarification modal options */
.address-clarification-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.address-clarification-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.address-clarification-option:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.address-clarification-option:active {
  transform: scale(0.98);
}

.address-clarification-option .option-icon {
  font-size: 1.5rem;
}

.address-clarification-option .option-text {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.4;
}

.address-clarification-option .option-text small {
  font-size: 0.75rem;
  color: #6b7280;
}

.address-clarification-option.secondary {
  background: transparent;
  border: 1px dashed #d1d5db;
  justify-content: center;
}

.address-clarification-option.secondary:hover {
  background: #f9fafb;
}

/* Meta section */
.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.2rem;
}
/* Driver inline meta row (quote + distance) */
.driver-meta-inline {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0.15rem 0 0.2rem;
}

.driver-meta-inline .driver-payout {
  font-weight: 600;
  color: #111827;
}

.driver-meta-inline .driver-distance {
  font-size: 0.75rem;
}

.date-window {
  font-size: 0.75rem;
  font-weight: 600;
  color: #111827;
}

.date-booked {
  color: #111827;
}

.date-rescheduled {
  font-size: 0.75rem;
  font-weight: 600;
  color: #2563eb;
}

.posted-time {
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 2px;
}

.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.chip {
  border-radius: 999px;
  background: #f3f4f6;
  padding: 0.05rem 0.4rem;
  font-size: 0.7rem;
  color: #4b5563;
}

/* Expand button */
.expand-toggle {
  margin-top: 0.55rem;
  width: 100%;
  border: none;
  background: #f3f4f6;
  color: #374151;
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.expand-toggle.has-dot::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}

/* View quotes row with New! indicator */
.view-quotes-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.new-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: #22c55e;
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse-new 1.5s ease-in-out infinite;
}

.new-arrow {
  font-size: 0.7rem;
}

@keyframes pulse-new {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.new-badge {
  color: #22c55e;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.4rem;
  animation: pulse-new 1.5s ease-in-out infinite;
}

.view-quotes-btn.primary-small {
  background: #22c55e;
  color: #fff;
  border: none;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}

.view-quotes-btn.primary-small:hover {
  background: #16a34a;
}

/* Expanded area */
.card-expanded {
  margin-top: 0.6rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 0.55rem;
  display: none;
  font-size: 0.8rem;
}

.delivery-card.expanded .card-expanded {
  display: block;
}

/* Notes */
.notes-block {
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: #111827;
}

/* Checklist columns */
.checklist-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.checklist-col-title {
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.checklist-col label {
  display: block;
  font-size: 0.75rem;
  color: #374151;
  margin-bottom: 0.18rem;
}

.checklist-col input[type="checkbox"] {
  margin-right: 0.3rem;
}

/* Simple flat checklist for card display */
.checklist-simple {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.6rem;
}

.checklist-simple label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #374151;
}

.checklist-simple input[type="checkbox"] {
  margin: 0;
}

/* Card footer */
.card-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card-footer-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.distance-label {
  font-size: 0.75rem;
  color: #4b5563;
}

.route-btn {
  border-radius: 999px;
  border: none;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  background: #e5e7eb;
  color: #111827;
  cursor: pointer;
}

/* Driver view loading splash */
.driver-view-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  min-height: 200px;
}

.driver-view-loading.hidden {
  display: none;
}

.driver-loading-logo {
  width: 180px;
  max-width: 60%;
  margin-bottom: 1rem;
  animation: pulse 1.5s ease-in-out infinite;
}

.driver-loading-text {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.98);
  }
}

/* Empty & placeholder */
.empty-state,
.placeholder-panel {
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  font-size: 0.8rem;
  color: #4b5563;
}

/* Cancelled pulse */
.just-cancelled {
  animation: cancelledPulse 0.7s ease-out;
}

@keyframes cancelledPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.65);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(248, 113, 113, 0);
  }
}

/* Green flash animation for cards moving between categories */
.just-moved {
  animation: greenGlow 6s ease-out;
  position: relative;
  z-index: 5;
}

@keyframes greenGlow {
  0%, 50% {
    box-shadow: 0 0 12px 4px rgba(34, 197, 94, 0.5);
    outline: 2px solid rgba(34, 197, 94, 0.6);
    outline-offset: 2px;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    outline: 2px solid rgba(34, 197, 94, 0);
    outline-offset: 2px;
  }
}

/* Red flash animation for cancelled items */
.just-cancelled-glow {
  animation: redGlow 6s ease-out;
  position: relative;
  z-index: 5;
}

@keyframes redGlow {
  0%, 50% {
    box-shadow: 0 0 12px 4px rgba(239, 68, 68, 0.5);
    outline: 2px solid rgba(239, 68, 68, 0.6);
    outline-offset: 2px;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    outline: 2px solid rgba(239, 68, 68, 0);
    outline-offset: 2px;
  }
}

/* Footer */
.app-footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.4rem 0.75rem 3.5rem;
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
}

.footer-disclaimer {
  margin: 0;
  line-height: 1.5;
  color: #6b7280;
}

.footer-links {
  margin: 0 0 0.75rem;
}

.footer-link {
  color: #22c55e;
  text-decoration: none;
}

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

.footer-separator {
  margin: 0 0.5rem;
  color: #9ca3af;
}

/* Bottom navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  display: flex;
  justify-content: space-around;
  padding: 0.4rem 0;
  z-index: 20;
}

.bottom-nav-item {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.8rem;
  padding: 0.35rem 0;
  cursor: pointer;
  color: #6b7280;
  position: relative;
}

.bottom-nav-item.active {
  color: #111827;
  font-weight: 600;
}

.bottom-nav-item.has-unseen::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  right: calc(50% - 1.5rem);
  width: 0.5rem;
  height: 0.5rem;
  background: #22c55e;
  border-radius: 50%;
}

.unread-badge {
  display: none;
  margin-left: 0.25rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  background: #22c55e;
  color: #ffffff;
  border-radius: 0.6rem;
  min-width: 1rem;
  text-align: center;
}

.unread-badge.visible {
  display: inline-block;
}

/* Modals (quote, complete, book) */
.quote-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-top: calc(1rem + env(safe-area-inset-top, 0px));
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 200;
}

.quote-modal.hidden {
  display: none;
}

.quote-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
}

.quote-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 1.75rem 1.25rem 2rem;
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.35);
  z-index: 1;
  max-height: calc(100vh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.quote-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.quote-panel-header h2 {
  margin: 0;
  font-size: 1rem;
}

.quote-close-btn {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: #6b7280;
}

.quote-job-line {
  font-size: 0.8rem;
  color: #4b5563;
  margin: 0.1rem 0;
}

.quote-field {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.8rem;
}

.address-privacy-note {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0.5rem 0 0.25rem 0;
  padding: 0.5rem;
  background: #f0fdf4;
  border-radius: 0.25rem;
  border-left: 3px solid #22c55e;
}

/* Same-location move checkbox */
.same-location-checkbox-wrapper {
  margin: 0.5rem 0;
}

.same-location-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
}

.same-location-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #22c55e;
  cursor: pointer;
}

.dropoff-field-wrapper {
  transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
  overflow: hidden;
}

.dropoff-field-wrapper.hidden-animate {
  opacity: 0;
  max-height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

/* Same-location move indicator on cards */
.same-location-indicator {
  color: #dc2626;
  font-weight: 600;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.quote-field span {
  display: block;
  margin-bottom: 0.2rem;
}

.quote-field input,
.quote-field textarea,
.quote-field select {
  width: 100%;
  padding: 0.4rem 0.45rem;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  font-size: 16px;
  resize: vertical;
  font-family: inherit;
}

.input-char-helper {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}

.input-char-helper .char-counter {
  display: block;
}

.input-char-helper .char-tip {
  display: block;
  font-style: italic;
  margin-top: 2px;
}

.field-helper-text {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 4px;
  font-style: italic;
}

.textarea-char-counter {
  text-align: right;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 4px;
}

.saved-address-select {
  margin-bottom: 0.4rem;
  background: #f9fafb;
  cursor: pointer;
}

.saved-address-select.hidden {
  display: none;
}

.date-range-input {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  background: #ffffff;
}

.date-range-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.quote-date-display {
  margin-top: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #22c55e;
}

.quote-datetime-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quote-datetime-row input {
  width: 100%;
  padding: 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
  box-sizing: border-box;
  background: #fff;
}

.quote-datetime-row input::placeholder {
  color: #6b7280;
  opacity: 1;
}

#quote-date:empty:not(:focus)::before,
#quote-date[value=""]::placeholder {
  color: #6b7280;
}

.quote-time-input {
  width: 100%;
  padding: 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
  font-weight: normal;
  box-sizing: border-box;
}

.quote-datetime-note {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}

.quote-input-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.quote-currency-prefix {
  font-size: 0.9rem;
  color: #4b5563;
}

#quote-amount {
  width: 100%;
  padding: 0.35rem 0.45rem;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
}

#quote-message,
#complete-notes {
  width: 100%;
  padding: 0.4rem 0.45rem;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  font-size: 0.8rem;
  resize: vertical;
}

#complete-rating {
  width: 100%;
  padding: 0.35rem 0.45rem;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  font-size: 0.8rem;
}

.quote-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: #374151;
}

.driver-payout-amount {
  color: #16a34a;
}

.quote-note {
  font-size: 0.75rem;
  color: #4b5563;
  margin-top: 0.4rem;
}

.bc-legal-note {
  font-size: 0.7rem;
  color: #6b7280;
  margin: 0.75rem 0 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
  font-weight: 600;
}

.bc-nonrefundable-warning {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #dc2626;
  line-height: 1.4;
}

.bc-nonrefundable-warning strong {
  color: #b91c1c;
}

.quote-breakdown-note {
  font-size: 0.7rem;
  color: #6b7280;
  margin: 0.5rem 0 0 0;
  line-height: 1.4;
}

.quote-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.withdraw-quote-modal-btn {
  padding: 0.4rem 0.9rem;
  background: transparent;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin-right: auto;
}

.withdraw-quote-modal-btn:hover {
  background: #fef2f2;
  border-color: #f87171;
}

/* Complete flow steps inside complete modal */
.complete-steps {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.6rem;
  margin-bottom: 0.5rem;
}

.complete-step {
  font-size: 0.75rem;
}

.complete-step-number {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 0.15rem;
}

.complete-step-label {
  margin-top: 0.2rem;
  color: #6b7280;
  font-size: 0.72rem;
}

.complete-step-label-inline {
  margin-top: 0;
}

.complete-step-btn.completed {
  background: #dcfce7;
  color: #166534;
}

.complete-step-heading {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #111827;
}

/* Messages Layout (original bubble styles) */
.messages-wrapper {
  padding: 0.25rem 0;
}

.message-thread-empty {
  font-size: 0.8rem;
  color: #6b7280;
  padding: 1rem 1rem;
  border-radius: 0.75rem;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  margin-top: 0.5rem;
  text-align: center;
}

.message-thread-empty .empty-title {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.25rem;
}

.message-thread-empty .empty-hint {
  font-size: 0.75rem;
  color: #6b7280;
}

/* Chat status label */
.chat-status-label {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.chat-status-label.status-booked {
  background: #dcfce7;
  color: #166534;
}

.chat-status-label.status-completed {
  background: #e0e7ff;
  color: #3730a3;
}

.chat-status-label.status-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.chat-status-label.status-quoted {
  background: #dcfce7;
  color: #92400e;
}

.chat-status-label.status-seeking {
  background: #f3f4f6;
  color: #4b5563;
}

.chat-status-label.status-closed {
  background: #f3f4f6;
  color: #6b7280;
}

.status-pill.status-neutral {
  background: #e5e7eb;
  color: #374151;
}

/* Messages search */
.messages-search-wrapper {
  margin-bottom: 0.5rem;
}

.messages-filter-wrapper {
  margin-bottom: 0.75rem;
}

.messages-unread-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.messages-unread-filter input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #2563eb;
  cursor: pointer;
}

/* Driver booked filter */
.driver-filter-wrapper {
  padding: 0.5rem 1rem 0.25rem;
}

.driver-booked-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.driver-booked-filter input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #2563eb;
  cursor: pointer;
}

.driver-completed-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.driver-completed-filter input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #2563eb;
  cursor: pointer;
}

/* Customer history filter */
.customer-filter-wrapper {
  padding: 0.5rem 1rem 0.25rem;
}

.customer-completed-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.customer-completed-filter input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #2563eb;
  cursor: pointer;
}

.messages-search-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.messages-search-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.messages-search-input::placeholder {
  color: #9ca3af;
}

.messages-no-results,
.messages-loading {
  font-size: 0.7rem;
  color: #6b7280;
  padding: 1rem;
  text-align: center;
  background: #f9fafb;
  border-radius: 0.25rem;
  border: 1px dashed #d1d5db;
}

.admin-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 0.5rem;
}

.search-highlight {
  background: #fef08a;
  color: #713f12;
  padding: 0 0.1rem;
  border-radius: 0.15rem;
}

/* Chat overlay bottom nav */
.chat-overlay-nav {
  flex-shrink: 0;
  border-top: 1px solid #e5e7eb;
}

/* Cancelled chat footer */
.chat-overlay-footer.chat-cancelled {
  background: #fef2f2;
  border-top: 1px solid #fecaca;
}

.chat-overlay-footer.chat-cancelled .chat-demo-note {
  color: #991b1b;
}

/* Photo upload area */
.photo-upload-area {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.photo-upload-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.photo-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0.2rem 0.5rem;
}

.photo-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.photo-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 0.25rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-preview-remove:hover {
  background: rgba(0, 0, 0, 0.8);
}

.photo-remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-remove-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Book modal checklist - simple flat list */
.book-checklist-simple {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.book-checklist-simple label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.book-checklist-simple input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

/* Car/SUV Eligible Section */
.car-suv-section {
  margin: 0.5rem 0 0.25rem 0;
  padding: 0;
}

.car-suv-section label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.car-suv-section input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  cursor: pointer;
}

/* Client Management Section */
.client-management-section {
  margin: 0.25rem 0 0.5rem 0;
  padding: 0;
}

.client-toggle-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.client-toggle-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  cursor: pointer;
}

.client-info-panel {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.client-field {
  margin-bottom: 0.75rem;
}

.client-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.client-field label .required {
  color: #ef4444;
}

.client-field input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  box-sizing: border-box;
}

.client-field input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.1);
}

.client-contact-note {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0.5rem 0;
}

.client-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #374151;
  margin-top: 0.75rem;
  cursor: pointer;
}

.client-consent-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  cursor: pointer;
  flex-shrink: 0;
}

.client-validation-error {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* Driver ETA Modal */
.eta-panel {
  max-width: 380px;
}

.eta-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.25rem 0;
}

.eta-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 1rem 0;
}

.eta-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.eta-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.eta-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
}

.eta-date-input,
.eta-time-input,
.eta-note-input {
  padding: 0.625rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.eta-date-input:focus,
.eta-time-input:focus,
.eta-note-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.1);
}

.eta-helper-text {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0;
}

.eta-validation-error {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.eta-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.eta-actions button {
  flex: 1;
}

/* Pickup ETA Modal Radio Options */
.pickup-eta-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.pickup-eta-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pickup-eta-option:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.pickup-eta-option:has(input:checked) {
  background: #f0fdf4;
  border-color: #22c55e;
}

.pickup-eta-option input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: #22c55e;
  cursor: pointer;
}

.pickup-eta-option span {
  font-size: 0.9rem;
  color: #374151;
}

/* Fullscreen Modal (Manage Service Areas) */
.fullscreen-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.fullscreen-modal.hidden {
  display: none;
}

.fullscreen-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.fullscreen-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
}

.fullscreen-modal-header h1 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: #111827;
}

.fullscreen-back-btn {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-back-btn:hover {
  color: #111827;
}

/* Manage Service Areas Specific Styles */
.manage-sa-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .manage-sa-body {
    flex-direction: row;
    overflow: hidden;
  }
}

.manage-sa-form-section {
  padding: 1rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .manage-sa-form-section {
    max-width: 420px;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
  }
}

.manage-sa-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 1rem 0;
}

.manage-sa-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.manage-sa-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
}

.manage-sa-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.manage-sa-item-number {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
}

.manage-sa-remove-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.manage-sa-remove-btn:hover {
  text-decoration: underline;
}

.manage-sa-field {
  margin-bottom: 0.75rem;
}

.manage-sa-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.manage-sa-field input[type="text"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.manage-sa-field input[type="text"]:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.1);
}

.manage-sa-field-error {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.25rem;
}

.manage-sa-radius-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.manage-sa-radius-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: #111827;
  min-width: 60px;
}

.manage-sa-radius-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  appearance: none;
  cursor: pointer;
}

.manage-sa-radius-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22c55e;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.manage-sa-radius-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22c55e;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.manage-sa-mode-toggle {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.manage-sa-mode-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.manage-sa-mode-btn:hover {
  border-color: #d1d5db;
}

.manage-sa-mode-btn.active {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #166534;
}

.manage-sa-mode-btn.scheduled.active {
  background: #fefce8;
  border-color: #eab308;
  color: #854d0e;
}

.manage-sa-dates-section {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #e5e7eb;
}

.manage-sa-legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #6b7280;
}

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

.legend-green {
  background: rgba(34, 197, 94, 0.6);
  border: 2px solid #22c55e;
}

.legend-yellow {
  background: rgba(234, 179, 8, 0.6);
  border: 2px solid #eab308;
}

.manage-sa-map-section {
  flex-shrink: 0;
  height: 350px;
  position: relative;
}

@media (min-width: 768px) {
  .manage-sa-map-section {
    flex: 1;
    height: auto;
    min-height: 0;
  }
}

.manage-sa-map {
  width: 100%;
  height: 100%;
  min-height: 250px;
  background: #f3f4f6;
  position: relative;
}

.manage-sa-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.manage-sa-map-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}

.manage-sa-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
}

.manage-sa-footer button {
  flex: 1;
}

/* Discard Changes Confirmation Overlay */
.discard-confirm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.discard-confirm-panel {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.discard-confirm-panel h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

.discard-confirm-panel p {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.discard-confirm-actions {
  display: flex;
  gap: 0.75rem;
}

.discard-confirm-actions button {
  flex: 1;
  padding: 0.75rem 1rem;
}

/* Driver Business Name Subsection (Account Screen) */
.driver-business-subsection {
  padding-bottom: 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.driver-business-subsection .contact-header {
  margin-bottom: 0.75rem;
}

.driver-business-subsection .contact-header h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.driver-business-subsection .field-help-text {
  margin-top: 0.5rem;
}

/* Service Areas Summary Card (Account Screen) */
.service-areas-summary-card {
  padding-top: 0.5rem;
}

.service-areas-summary {
  margin-bottom: 1rem;
}

.service-areas-summary-empty {
  font-size: 0.875rem;
  color: #9ca3af;
  font-style: italic;
}

.service-area-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.service-area-summary-item:last-child {
  border-bottom: none;
}

.service-area-summary-info {
  flex: 1;
  min-width: 0;
}

.service-area-summary-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
}

.service-area-summary-details {
  font-size: 0.75rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-area-summary-badge {
  font-size: 0.7rem;
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.service-area-summary-badge.always {
  background: #dcfce7;
  color: #166534;
}

.service-area-summary-badge.scheduled {
  background: #fef9c3;
  color: #854d0e;
}

.service-area-summary-badge.expired {
  background: #fee2e2;
  color: #991b1b;
}

.service-area-summary-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.service-area-summary-dates {
  font-size: 0.7rem;
  color: #6b7280;
}

.manage-service-areas-btn {
  width: 100%;
  margin-top: 0.5rem;
}

/* Availability Address Section */
.availability-card {
  margin-bottom: 0;
}

.availability-display {
  margin-top: 0.5rem;
}

.availability-address-row {
  margin-bottom: 0.75rem;
}

.availability-address-row p {
  font-size: 0.9rem;
  color: #374151;
  margin: 0;
}

.availability-count-section {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 8px;
}

.availability-count-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.availability-label {
  font-size: 0.875rem;
  color: #374151;
}

.availability-count {
  font-weight: 700;
  font-size: 1rem;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
}

.availability-count-gray {
  color: #6b7280;
  background: #e5e7eb;
}

.availability-count-amber {
  color: #b45309;
  background: #fef3c7;
}

.availability-count-light-green {
  color: #15803d;
  background: #dcfce7;
}

.availability-count-green {
  color: #166534;
  background: #bbf7d0;
}

.availability-count-dark-green {
  color: #14532d;
  background: #86efac;
}

.availability-refresh-btn {
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 1rem;
  padding: 0.25rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s, transform 0.3s;
}

.availability-refresh-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

.availability-refresh-btn.spinning {
  animation: spin 1s linear infinite;
}

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

.availability-helper {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.5rem;
  line-height: 1.4;
}

.availability-edit-form {
  margin-top: 0.5rem;
}

/* Confirmation Modal */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-modal.hidden {
  display: none;
}

.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.confirm-panel {
  position: relative;
  background: white;
  border-radius: 0.75rem;
  padding: 1.25rem;
  width: 90%;
  max-width: 320px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  text-align: center;
}

/* Generic modal overlay (for password confirmation, etc.) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem;
}

.modal-overlay .modal-content {
  position: relative;
  background: white;
  border-radius: 0.75rem;
  padding: 1.25rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-overlay .modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.modal-overlay .modal-actions button {
  flex: 1;
}

.confirm-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.confirm-message {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.confirm-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.confirm-buttons button {
  flex: 1 1 auto;
  min-width: fit-content;
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

/* When there are 3 buttons, stack them vertically */
.confirm-buttons.three-buttons {
  flex-direction: column;
}

.confirm-buttons.three-buttons button {
  flex: none;
  width: 100%;
}

/* Photo Lightbox */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-lightbox.hidden {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav.hidden {
  display: none;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-stage {
  position: relative;
  z-index: 5;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 0.25rem;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.875rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  z-index: 10;
}

/* Make photo thumbnails clickable */
.thumb-wrapper.clickable-photos {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.thumb-wrapper.clickable-photos:hover {
  transform: scale(1.05);
}

.thumb-wrapper.clickable-photos .thumb {
  position: relative;
}

.thumb-wrapper.clickable-photos::after {
  content: "Tap to view";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.thumb-wrapper.clickable-photos:hover::after {
  opacity: 1;
}

/* Booked delivery note */
.booked-note {
  font-size: 0.7rem;
  color: #6b7280;
  font-style: italic;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
}

/* Message card footer */
.message-card-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e5e7eb;
}

.message-bubble {
  max-width: 80%;
  border-radius: 1rem;
  padding: 0.5rem 0.75rem;
}

.message-you {
  margin-left: auto;
  background: #22c55e;
  color: #ffffff;
  border-bottom-right-radius: 0.25rem;
}

.message-you .message-meta {
  color: rgba(255, 255, 255, 0.7);
}

.message-them {
  margin-right: auto;
  background: #e5e7eb;
  color: #111827;
  border-bottom-left-radius: 0.25rem;
}

.message-system {
  margin: 0.5rem 0;
  align-self: center;
  background: #dcfce7;
  color: #92400e;
  text-align: center;
  font-size: 0.8rem;
  font-style: italic;
  max-width: 90%;
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
}

.message-text {
  font-size: 0.8rem;
}

.message-meta {
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 0.15rem;
  text-align: right;
}

/* FULL-SCREEN CHAT OVERLAY */
.chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 56px; /* Leave room for bottom nav */
  z-index: 100; /* Higher z-index to ensure it covers everything */
  background: #ffffff;
  display: flex;
  flex-direction: column;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 0 0 100vmax #ffffff; /* Extend white background to edges */
}

/* Mobile keyboard handling - hide bottom nav when keyboard is open */
.chat-overlay.keyboard-open {
  bottom: 0;
  /* Don't use 100dvh on Android - it causes layout issues with keyboard */
  /* Instead, let the fixed positioning handle it */
}

.chat-overlay.keyboard-open .chat-overlay-nav {
  display: none;
}

.chat-overlay.keyboard-open .chat-overlay-footer {
  border-top: none;
  padding-bottom: 0;
}

.chat-overlay.keyboard-open .chat-input-row {
  padding-bottom: 0.25rem;
}

/* Add extra padding to messages when keyboard is open so last message is visible */
.chat-overlay.keyboard-open .chat-messages-list {
  padding-bottom: 1rem;
}

/* On iOS, add more padding to account for safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .chat-overlay.keyboard-open .chat-messages-list {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Hide main bottom nav when chat input is focused */
body.chat-input-focused .bottom-nav:not(.chat-overlay-nav) {
  display: none;
}

.chat-overlay.hidden {
  display: none;
}

.chat-overlay-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.chat-overlay-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.chat-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 0.1rem;
}

.view-delivery-link {
  background: none;
  border: none;
  color: #22c55e;
  font-size: 0.8rem;
  font-weight: 400;
  cursor: pointer;
  padding: 0.15rem 0;
  white-space: nowrap;
}

.view-delivery-link:hover {
  color: #16a34a;
  text-decoration: underline;
}

.chat-flag-btn {
  background: none;
  border: none;
  color: #b0b5bd;
  cursor: pointer;
  padding: 0.15rem 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chat-flag-btn:hover {
  color: #f59e0b;
  background: #fef3c7;
}

.flag-modal-panel {
  max-width: 400px;
}

.flag-modal-field {
  margin-bottom: 12px;
}

.flag-modal-field label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.flag-modal-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.flag-modal-field textarea:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.flag-details-box {
  background: #f3f4f6;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid #f59e0b;
}

.flag-details-box p {
  margin: 0 0 6px 0;
  font-size: 0.875rem;
  color: #374151;
}

.flag-details-box p:last-child {
  margin-bottom: 0;
}

.flag-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.flag-history-item {
  background: #f9fafb;
  border-radius: 8px;
  padding: 12px 16px;
  border-left: 4px solid #f59e0b;
}

.flag-history-item.reviewed {
  border-left-color: #10b981;
  background: #f0fdf4;
}

.flag-user-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.flag-user-link:hover {
  text-decoration: underline;
  color: #2563eb;
}

.flag-history-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.flag-history-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.flag-history-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.flag-history-status.reviewed {
  background: #d1fae5;
  color: #065f46;
}

.flag-history-meta {
  font-size: 0.8rem;
  color: #6b7280;
}

.flag-history-meta strong {
  color: #374151;
}

.flag-history-note {
  background: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #374151;
  margin: 8px 0;
  border: 1px solid #e5e7eb;
}

.flag-history-note-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 4px;
  font-weight: 500;
}

.flag-history-admin-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #d1d5db;
}

.flag-history-admin-note {
  background: #eff6ff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.flag-review-form {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.flag-review-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  resize: vertical;
  min-height: 50px;
}

.flag-review-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}

.flag-review-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
}

.flag-review-btn.confirm {
  background: #10b981;
  color: white;
}

.flag-review-btn.confirm:hover {
  background: #059669;
}

.flag-history-empty {
  text-align: center;
  color: #6b7280;
  padding: 20px;
  font-size: 0.9rem;
}

.admin-needs-review-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

.admin-flag-details {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
  font-size: 0.8rem;
}

.admin-flag-details p {
  margin: 0 0 6px 0;
  color: #78350f;
}

.admin-flag-details p:last-child {
  margin-bottom: 0;
}

.admin-flag-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.driver-card-flag-btn {
  background: none;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.driver-card-flag-btn:hover {
  border-color: #f59e0b;
  color: #f59e0b;
  background: #fffbeb;
}

.chat-back-btn {
  border: none;
  background: transparent;
  font-size: 0.7rem;
  cursor: pointer;
  color: #22c55e;
  padding: 0.2rem 0.35rem;
}

.chat-header-text {
  flex: 1;
  min-width: 0;
}

.chat-header-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-view-job-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
}

.chat-overlay-profile {
  /* Contains job title bar */
}

/* Reschedule Banner */
.chat-reschedule-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  border-bottom: 1px solid #93c5fd;
}

.chat-reschedule-banner.hidden {
  display: none;
}

.reschedule-banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.reschedule-banner-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.reschedule-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.reschedule-banner-text strong {
  font-size: 0.875rem;
  color: #1e40af;
}

.reschedule-banner-text span {
  font-size: 0.75rem;
  color: #3b82f6;
}

.reschedule-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.reschedule-banner-actions button {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

.reschedule-approve-btn {
  background: #22c55e;
  color: white;
}

.reschedule-approve-btn:hover {
  background: #16a34a;
}

.reschedule-reject-btn {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db !important;
}

.reschedule-reject-btn:hover {
  background: #e5e7eb;
}

.reschedule-cancel-btn {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca !important;
}

.reschedule-cancel-btn:hover {
  background: #fee2e2;
}

@media (max-width: 600px) {
  .chat-reschedule-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
  }
  
  .reschedule-banner-actions {
    justify-content: flex-end;
  }
}

.chat-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.chat-profile-row .chat-job-title {
  padding: 0;
  border-bottom: none;
  background: none;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-reschedule-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #3b82f6;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-reschedule-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.chat-reschedule-btn svg {
  flex-shrink: 0;
}

.chat-job-title {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

@media (max-width: 600px) {
  .chat-job-title {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .chat-overlay-header {
    padding: 0.5rem 0.75rem;
  }
  
  .chat-header-avatar {
    width: 34px;
    height: 34px;
  }
  
  .chat-header-initials {
    width: 34px;
    height: 34px;
    font-size: 0.75rem;
  }
  
  .chat-header-name {
    font-size: 0.9rem;
  }
  
  .view-delivery-link {
    font-size: 0.75rem;
  }
  
  .chat-input-row {
    padding: 0.5rem;
  }
  
  .chat-messages-list {
    padding: 0.5rem;
  }
}

.chat-messages-wrapper {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.chat-messages-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.chat-messages-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem 0.75rem;
}

/* Remove min-height when keyboard is open to prevent gap on Android */
.chat-overlay:not(.keyboard-open) .chat-messages-list {
  min-height: 100%;
}

/* Chat loading spinner */
.chat-loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  gap: 0.75rem;
  color: #6b7280;
  font-size: 0.85rem;
}

.chat-loading-spinner .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #22c55e;
  border-radius: 50%;
  animation: chatSpin 0.8s linear infinite;
}

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

.chat-overlay-footer {
  flex-shrink: 0;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.chat-readonly-notice {
  font-size: 0.75rem;
  color: #6b7280;
  padding: 0.6rem 0.85rem;
  text-align: center;
}

.chat-readonly-notice.hidden {
  display: none;
}

.chat-input-area.hidden {
  display: none;
}

.chat-demo-note {
  font-size: 0.75rem;
  color: #6b7280;
  padding: 0.6rem 0.85rem;
}

/* Snippet preview (messages list) */
.messages-snippet {
  font-size: 0.78rem;
  color: #4b5563;
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thumb-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  background: #e5e7eb;
  color: #374151;
}

/* Responsive */
@media (min-width: 768px) {
  .card-main {
    grid-template-columns: 96px 1fr;
  }

  .thumb-wrapper {
    width: 96px;
    height: 96px;
  }

  .complete-steps {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .complete-step {
    flex: 1 1 45%;
  }
}

/* Customer-side driver status highlight */
.driver-status-highlight {
  margin-top: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.78rem;
  background: #e0f2fe;          /* soft blue pill */
}

.driver-status-highlight-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  font-size: 0.7rem;
  color: #0369a1;
}
/* Remove extra spacing between top pill and DRIVER/YOUR STATUS pill */
.driver-status-highlight {
  margin-top: 0 !important;
}
.driver-status-highlight-value {
  font-weight: 700;
  color: #0f172a;
}
/* Blue YOUR STATUS pill on driver cards */
.driver-status-highlight {
  background: #e0f2fe;
  border: 1px solid #38bdf8;
  padding: 0.35rem 0.55rem;
  border-radius: 0.25rem;
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.75rem;

  /* This is the spacing that lifts it upward */
  margin: -0.35rem 0 0.15rem;
}

.driver-status-highlight-label {
  font-weight: 600;
  color: #0369a1;
}
/* Remove extra space under the top status pill */
.card-top {
  margin-bottom: 0.1rem !important;
}

.status-pill {
  margin-bottom: 0 !important;
}
/* === Quotes list modal cards === */
#quotes-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.quote-list-item {
  padding: 0.75rem 0.85rem;
}

/* Top row of each quote card */
.ql-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

/* Slightly tweaked pill for quotes header */
.status-pill-quote {
  background: #eff6ff;
  color: #16a34a;
  padding: 0.15rem 0.65rem;
  font-size: 0.75rem;
}

/* Big price on the right */
.ql-amount {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
}

/* Rows for time + money breakdown */
.ql-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.8rem;
}

.ql-label {
  color: #6b7280;
}

.ql-value {
  font-weight: 600;
  color: #111827;
}

.ql-breakdown .ql-value {
  font-weight: 600;
}

/* Message block inside each quote */
.quote-list-message {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: #111827;
}

/* Actions at bottom of quote card */
.ql-actions {
  margin-top: 0.6rem;
  display: flex;
  justify-content: flex-end;
}

/* Status chips for quote state */
.chip-accepted {
  background: #dcfce7;
  color: #166534;
}

.chip-pending {
  background: #fef9c3;
  color: #854d0e;
}

.chip-not-selected {
  background: #e5e7eb;
  color: #4b5563;
}

/* Driver rating display */
.driver-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  color: #22c55e;
}

.driver-rating .stars {
  font-weight: 600;
  color: #111827;
}

.driver-rating-row {
  margin-top: -0.25rem;
  margin-bottom: 0.35rem;
  margin-left: 2.5rem;
}

/* Customer rating display */
.customer-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  color: #22c55e;
}

.customer-rating .stars {
  font-weight: 600;
  color: #111827;
}

.customer-rating-row {
  margin-top: -0.25rem;
  margin-bottom: 0.35rem;
  margin-left: 2.5rem;
}

/* Review submitted indicator */
.review-submitted {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: #059669;
  font-weight: 500;
}

.review-submitted::before {
  content: "✓";
}

/* Rating modal */
.rating-panel {
  max-width: 400px;
}

.rating-driver-profile {
  margin-bottom: 1rem;
}

.rating-stars-section {
  text-align: center;
  margin-bottom: 1rem;
}

.rating-prompt {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: #374151;
}

.rating-stars {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.star-btn {
  background: none;
  border: none;
  font-size: 2.5rem;
  color: #d1d5db;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s, transform 0.1s;
}

.star-btn:hover {
  transform: scale(1.1);
}

.star-btn.selected {
  color: #16a34a;
}

.rating-label {
  margin: 0.5rem 0 0;
  font-size: 0.7rem;
  color: #6b7280;
  min-height: 1.25rem;
}

/* Profile Overlay */
.profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.profile-overlay.hidden {
  display: none;
}

.profile-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.profile-overlay-panel {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 500px;
  height: 90vh;
  border-radius: 1rem 1rem 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.profile-overlay-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.profile-overlay-header .back-btn {
  background: none;
  border: none;
  font-size: 0.9rem;
  color: #22c55e;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.profile-overlay-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  flex: 1;
}

.profile-overlay-header .edit-link-btn {
  background: none;
  border: none;
  font-size: 0.9rem;
  color: #22c55e;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-weight: 500;
}

.profile-overlay-body {
  flex: 1;
  overflow-y: auto;
  padding: 2.5rem 1.5rem;
}

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2rem;
}

.profile-hero-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #e5e7eb;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 1rem;
}

.profile-hero-name {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
}

.profile-hero-rating {
  font-size: 1.1rem;
  color: #6b7280;
}

.profile-hero-rating .stars {
  color: #16a34a;
  font-weight: 600;
}

.profile-about-section {
  margin-top: 1.5rem;
  background: #f0f9ff;
  border-radius: 0.25rem;
  padding: 1rem;
  border: 1px solid #bae6fd;
}

.profile-about-text {
  margin: 0;
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.5;
}

.profile-reviews-section {
  margin-top: 1.5rem;
}

.profile-section-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
}

.profile-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-ratings-disclaimer {
  font-size: 0.7rem;
  color: #9ca3af;
  margin: 1rem 0 0 0;
  line-height: 1.4;
  font-style: italic;
}

.profile-review-card {
  background: #f9fafb;
  border-radius: 0.25rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
}

.profile-review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.profile-review-author {
  font-weight: 500;
  color: #374151;
  font-size: 0.9rem;
}

.profile-review-stars {
  color: #16a34a;
  font-size: 0.7rem;
}

.profile-review-text {
  color: #6b7280;
  font-size: 0.7rem;
  line-height: 1.4;
  margin: 0;
}

.profile-review-date {
  display: block;
  color: #9ca3af;
  font-size: 0.7rem;
  margin-top: 0.5rem;
}

.profile-no-reviews {
  color: #9ca3af;
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 1rem;
}

.clickable-profile {
  cursor: pointer;
  transition: opacity 0.15s;
}

.clickable-profile:hover {
  opacity: 0.8;
}

/* Account tab About section */
.about-card h3 {
  margin-bottom: 0.25rem;
}

.about-section-group {
  margin-bottom: 0;
}

.about-label {
  display: block;
  margin-bottom: 0.5rem;
}

.about-role-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
  display: block;
}

.about-hint {
  font-size: 0.8rem;
  color: #9ca3af;
  display: block;
  margin-top: 0.15rem;
}

.about-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  box-sizing: border-box;
}

.about-textarea:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.about-save-message {
  color: #059669;
  font-size: 0.9rem;
  font-weight: 500;
  margin-left: 0.75rem;
}

/* Account profile header */
.account-profile-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.account-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.account-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e5e7eb;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #6b7280;
}

.avatar-edit-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background: #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid #fff;
  transition: background 0.15s;
}

.avatar-edit-overlay:hover {
  background: #16a34a;
}

.avatar-edit-icon {
  font-size: 0.75rem;
  line-height: 1;
}

/* Password form */
.password-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.password-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: #374151;
}

.password-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
}

.password-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.password-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.password-message {
  font-size: 0.875rem;
}

.password-message.success {
  color: #059669;
}

.password-message.error {
  color: #dc2626;
}

.password-message.hidden {
  display: none;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.name-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 400px) {
  .name-fields-row {
    grid-template-columns: 1fr;
  }
}

.contact-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: #374151;
}

.contact-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
}

.contact-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.contact-actions.hidden {
  display: none;
}

.contact-save-message {
  font-size: 0.875rem;
  color: #059669;
}

.field-help-text {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.4;
  margin: 0.25rem 0 0 0;
}

.business-name-field {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.contact-save-message.hidden {
  display: none;
}

.contact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.contact-header h3 {
  margin: 0;
}

.edit-link-btn {
  background: none;
  border: none;
  color: #22c55e;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.edit-link-btn:hover {
  text-decoration: underline;
}

.edit-link-btn.hidden {
  display: none;
}

.contact-input[readonly] {
  background: transparent;
  border: none;
  color: #111827;
  padding-left: 0;
  cursor: default;
}

.privacy-note {
  font-size: 0.7rem;
  color: #6b7280;
  margin: 0.5rem 0 0;
}

.contact-field-note {
  display: block;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
  font-weight: normal;
}

.pending-email-banner {
  background-color: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  padding: 0.75rem;
  margin-top: 0.5rem;
}

.pending-email-banner p {
  margin: 0;
  font-size: 0.875rem;
  color: #92400e;
}

.pending-email-banner .pending-email-hint {
  font-size: 0.75rem;
  color: #b45309;
  margin-top: 0.25rem;
}

.pending-email-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.pending-email-actions .small-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}

.pending-email-actions .text-btn {
  background: none;
  border: none;
  color: #b45309;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  text-decoration: underline;
}

.pending-email-banner.hidden {
  display: none;
}

.payout-display {
  color: #111827;
}

.payout-display p {
  margin: 0;
}

.payout-display.hidden {
  display: none;
}

.payout-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.payout-form.hidden {
  display: none;
}

.payout-form select.contact-input {
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
}

.referral-link-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.referral-link-container.clickable-link {
  cursor: pointer;
  transition: opacity 0.15s;
}

.referral-link-container.clickable-link:hover {
  opacity: 0.85;
}

.referral-link-container.clickable-link:active {
  opacity: 0.7;
}

.referral-link-container .contact-input {
  flex: 1;
  font-size: 0.9rem;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.share-print-buttons {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.share-btn,
.print-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}

.share-btn {
  background: #22c55e;
  color: #fff;
}

.share-btn:hover {
  background: #16a34a;
}

.print-btn {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.print-btn:hover {
  background: #e5e7eb;
}

.print-modal-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.print-option-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: #f9fafb;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  position: relative;
}

.print-option-btn:hover {
  background: #e5e7eb;
}

.print-option-btn.print-landscape {
  padding-right: 5rem;
}

.print-option-btn .landscape-note {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 400;
}

.qr-code-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.qr-code-container img {
  width: 188px;
  height: 188px;
}

.referral-details {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: #374151;
}

.referral-details li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.referral-details li:last-child {
  margin-bottom: 0;
}

.secondary-btn {
  padding: 0.2rem 0.5rem;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}

.secondary-btn:hover {
  background: #f3f4f6;
}

.about-display {
  color: #111827;
  white-space: pre-wrap;
  line-height: 1.5;
}

.about-display.empty {
  color: #9ca3af;
  font-style: italic;
}

.about-display.hidden {
  display: none;
}

.about-textarea.hidden {
  display: none;
}

/* Driver toggle switch */
.driver-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  margin-bottom: 1rem;
}

.driver-toggle input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background: #d1d5db;
  border-radius: 12px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.driver-toggle input:checked + .toggle-slider {
  background: #22c55e;
}

.driver-toggle input:checked + .toggle-slider::after {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 1rem;
  color: #374151;
}

/* Driver acknowledgment section */
.driver-acknowledgment-section {
  margin-top: 0.75rem;
  padding: 1rem;
  background: #fef9c3;
  border: 1px solid #fbbf24;
  border-radius: 8px;
}

.driver-acknowledgment-section.hidden {
  display: none;
}

.acknowledgment-checkbox {
  display: flex;
  gap: 0.75rem;
  cursor: pointer;
  align-items: flex-start;
}

.acknowledgment-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #22c55e;
}

.acknowledgment-checkbox input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.acknowledgment-text {
  font-size: 0.875rem;
  color: #78350f;
  line-height: 1.5;
}

.acknowledgment-lock-message {
  margin-top: 0.75rem;
  margin-bottom: 0;
  font-size: 0.8rem;
  color: #b91c1c;
  font-style: italic;
}

.acknowledgment-lock-message.hidden {
  display: none;
}

.driver-info-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.driver-info-section.hidden {
  display: none;
}

.driver-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.driver-info-section h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #374151;
}

.driver-info-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.driver-info-form select.contact-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
}

.driver-info-form select.contact-input[disabled] {
  background: transparent;
  border: none;
  padding-left: 0;
  color: #111827;
  cursor: default;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.radius-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.radius-input-wrapper > span:first-of-type {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.radius-value-display {
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
}

.radius-slider-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.radius-min-label,
.radius-max-label {
  font-size: 0.75rem;
  color: #6b7280;
  min-width: 1.5rem;
}

.radius-min-label {
  text-align: right;
}

.radius-max-label {
  text-align: left;
}

.radius-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #e5e7eb;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.radius-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #22c55e;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.radius-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #22c55e;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.radius-unit {
  color: #6b7280;
  font-size: 0.95rem;
}

.label-input {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 500;
  border: none;
  background: transparent;
  padding: 0;
  width: 100%;
  margin-bottom: 0.25rem;
}

.label-input:not([readonly]) {
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  background: #fff;
}

.label-input:focus {
  outline: none;
  border-color: #22c55e;
}

.service-areas-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-area-item {
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 8px;
  position: relative;
}

.service-area-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.service-area-name {
  font-weight: 600;
  max-width: 200px;
}

.service-area-address {
  width: 100%;
}

.radius-label {
  font-size: 0.9rem;
  color: #374151;
}

.remove-service-area-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.remove-service-area-btn:hover {
  text-decoration: underline;
}

.add-service-area-btn {
  background: none;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 0.75rem;
  color: #22c55e;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

.add-service-area-btn:hover {
  background: #f0f9ff;
  border-color: #22c55e;
}

.add-service-area-btn.hidden {
  display: none;
}

.driver-photos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.driver-photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
}

.driver-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.driver-photo-item .remove-photo-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.driver-photo-item:hover .remove-photo-btn {
  opacity: 1;
}

.driver-photo-add {
  aspect-ratio: 1;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #9ca3af;
  font-size: 0.8rem;
}

.driver-photo-add:hover {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #22c55e;
}

.driver-photo-add .add-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.profile-photos-section {
  margin-top: 1rem;
}

.profile-photos-section h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #374151;
}

.profile-photos-strip {
  display: flex;
  gap: 6px;
  padding-bottom: 4px;
}

.profile-photos-strip img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.empty-state {
  color: #9ca3af;
  font-style: italic;
  font-size: 0.9rem;
}

.account-profile-info {
  min-width: 0;
}

.account-name {
  margin: 0 0 0.15rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
}

.account-user-id {
  font-size: 0.75rem;
  font-weight: 400;
  color: #9ca3af;
  margin-left: 6px;
}

.account-subtitle {
  margin: 0;
  font-size: 0.7rem;
  color: #6b7280;
}

.view-profile-btn {
  margin-top: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #22c55e;
  background: transparent;
  border: 1px solid #22c55e;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.view-profile-btn:hover {
  background: #22c55e;
  color: #fff;
}

/* Account role toggle */
.view-toggle-card h3 {
  margin-bottom: 0.25rem;
}

.account-role-toggle {
  display: flex;
  gap: 0.5rem;
}

.account-role-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
}

.account-role-btn:hover {
  background: #f9fafb;
}

.account-role-btn.active {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

/* Referral history styles */
.referral-stats {
  display: flex;
  justify-content: space-around;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.referral-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.referral-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.referral-item:last-child {
  border-bottom: none;
}

.referral-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.referral-name {
  font-weight: 600;
  color: #111827;
}

.referral-role {
  font-size: 0.8rem;
  color: #6b7280;
}

.referral-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bonus-amount {
  font-weight: 600;
  color: #059669;
}

.ref-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 500;
}

.ref-badge.paid {
  background: #d1fae5;
  color: #065f46;
}

.ref-badge.earned {
  background: #dcfce7;
  color: #92400e;
}

.ref-badge.pending {
  background: #e5e7eb;
  color: #6b7280;
}

/* Print QR button - styled as small link */
.print-qr-btn {
  display: inline;
  margin-top: 0.5rem;
  padding: 0;
  background: none;
  border: none;
  font-size: 0.75rem;
  color: #22c55e;
  cursor: pointer;
  text-decoration: underline;
}

.print-qr-btn:hover {
  color: #16a34a;
}

/* Print options section */
.print-options {
  margin-top: 0.75rem;
}

.print-links {
  display: flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.print-link-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0.4rem 0.5rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
}

.print-link-btn:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #111827;
}

.landscape-note {
  display: block;
  font-size: 0.6rem;
  font-weight: 500;
  color: #6b7280;
  margin-top: 2px;
}

/* Show more button */
.show-more-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  color: #22c55e;
  cursor: pointer;
  transition: all 0.15s;
}

.show-more-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

/* Legal links footer */
.legal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 0 2rem;
  font-size: 0.85rem;
}

.legal-links a {
  color: #6b7280;
  text-decoration: none;
}

.legal-links a:hover {
  color: #22c55e;
  text-decoration: underline;
}

.legal-divider {
  color: #d1d5db;
}

/* Chat input styling */
.chat-input-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  background: #f9fafb;
}

.chat-photo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  color: #6b7280;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.chat-photo-btn svg {
  width: 18px;
  height: 18px;
}

.chat-photo-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

.chat-message-input {
  flex: 1;
  padding: 0.4rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 1.25rem;
  font-size: 16px; /* Must be 16px+ to prevent iOS zoom on focus */
  outline: none;
}

.chat-message-input:focus {
  border-color: #22c55e;
}

.chat-send-btn {
  padding: 0.4rem 0.75rem;
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 1.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.chat-send-btn:hover {
  background: #16a34a;
}

/* Chat photo preview */
.chat-photo-preview {
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chat-photo-preview .photo-preview-container {
  position: relative;
  display: inline-block;
}

.chat-photo-preview img {
  width: 70px;
  height: 70px;
  border-radius: 0.5rem;
  object-fit: cover;
}

.chat-photo-preview .remove-photo-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border: none;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-photo-preview .photo-loading {
  color: #6b7280;
  font-size: 0.875rem;
  padding: 0.5rem;
}

/* Message photo in bubble */
.message-photo {
  max-width: 200px;
  max-height: 200px;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}

.message-photo:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

/* Photo wrapper for tap to view functionality */
.message-photo-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
  max-width: 200px;
  margin-bottom: 0.25rem;
}

.message-photo-wrapper .message-photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  margin-bottom: 0;
}

.tap-to-view-label {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 8px;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0.8;
}

.message-photo-wrapper:active {
  opacity: 0.7;
  transform: scale(0.98);
}

.message-photo-wrapper:active .message-photo {
  opacity: 0.9;
}

.message-bubble.message-me .message-photo-wrapper {
  margin-left: auto;
  display: block;
}

/* Role label under profile photo in messages list */
.message-card .thumb-wrapper {
  width: 56px;
  height: auto;
  flex-direction: column;
  background: transparent;
}

.message-card .thumb-wrapper .thumb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.thumb-role-label {
  display: block;
  font-size: 0.65rem;
  color: #6b7280;
  text-align: center;
  margin-top: 0.2rem;
}

/* Support email link */
.support-email {
  display: inline-block;
  color: #22c55e;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.support-email:hover {
  text-decoration: underline;
}

/* Clickable quotes links */
.clickable-quotes {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.clickable-quotes:hover {
  opacity: 0.8;
}

.status-pill.clickable-quotes {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quote-summary-line.clickable-quotes {
  color: #22c55e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quote-summary-line.clickable-quotes:hover {
  color: #16a34a;
}

.new-indicator-inline {
  color: #dc2626;
  font-weight: 600;
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

.clickable-quotes.has-unseen {
  font-weight: 600;
}

/* Chat overlay back button */
.back-btn {
  background: none;
  border: none;
  color: #22c55e;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.back-btn:hover {
  color: #16a34a;
}

/* Chat header profile */
.chat-header-profile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.chat-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  align-self: center;
}

.chat-header-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-header-initials {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #6b7280;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.chat-header-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
  min-width: 0;
  flex: 1;
}

.chat-header-name {
  font-weight: 600;
  font-size: 1rem;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  max-width: 100%;
}

.chat-header-role {
  font-size: 0.7rem;
  color: #9ca3af;
  opacity: 0.85;
}

/* Onboarding Overlay */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  padding: 1rem;
}

.onboarding-overlay.hidden {
  display: none;
}

.onboarding-card {
  background: white;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  max-width: 340px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.onboarding-skip {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.onboarding-skip:hover {
  color: #111827;
}

.onboarding-slides {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.onboarding-slide.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.onboarding-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.onboarding-icon.onboarding-emoji {
  font-size: 3.5rem;
  background: #f0fdf4;
  border-radius: 50%;
}

.onboarding-title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  color: #111827;
}

.onboarding-text {
  margin: 0;
  font-size: 1rem;
  color: #4b5563;
  line-height: 1.5;
}

.onboarding-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  transition: background 0.2s, transform 0.2s;
}

.onboarding-dot.active {
  background: #22c55e;
  transform: scale(1.2);
}

.onboarding-next-btn {
  width: 100%;
  padding: 0.875rem;
  background: #22c55e;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.onboarding-next-btn:hover {
  background: #16a34a;
}

/* Push Notification Prompt */
.notification-prompt {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9997;
  padding: 1rem;
}

.notification-prompt.hidden {
  display: none;
}

.notification-prompt-card {
  background: white;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.notification-prompt-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.notification-prompt-title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  color: #111827;
}

.notification-prompt-text {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: #4b5563;
  line-height: 1.5;
}

.notification-prompt-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.notification-btn-allow {
  width: 100%;
  padding: 0.875rem;
  background: #22c55e;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.notification-btn-allow:hover {
  background: #16a34a;
}

.notification-btn-skip {
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  color: #6b7280;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s;
}

.notification-btn-skip:hover {
  color: #111827;
}

/* Account Settings */
.account-settings {
  background: white;
  border-radius: 10px;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.setting-label {
  font-weight: 600;
  color: #111827;
  font-size: 1rem;
}

.setting-description {
  font-size: 0.85rem;
  color: #6b7280;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-switch .toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #22c55e;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.toggle-description {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: #6b7280;
}

/* Google Places Autocomplete */
.pac-container {
  z-index: 10001;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
  margin-top: 4px;
  font-family: inherit;
}

.pac-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.95rem;
  border-top: 1px solid #f3f4f6;
}

.pac-item:first-child {
  border-top: none;
}

.pac-item:hover {
  background-color: #f9fafb;
}

.pac-item-selected {
  background-color: #eff6ff;
}

.pac-icon {
  display: none;
}

.pac-item-query {
  font-weight: 500;
  color: #111827;
}

.pac-matched {
  font-weight: 600;
}

/* Custom autocomplete dropdown */
.autocomplete-wrapper {
  position: relative;
  width: 100%;
}

.autocomplete-dropdown {
  position: fixed;
  z-index: 10001;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-height: 250px;
  overflow-y: auto;
}

.autocomplete-dropdown.hidden {
  display: none;
}

.autocomplete-item {
  padding: 12px 14px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background-color: #f9fafb;
}

/* Post Confirmation Modal */
.post-confirm-panel {
  text-align: center;
  padding: 2rem 1.5rem;
}

.post-confirm-icon {
  margin-bottom: 1rem;
}

.post-confirm-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.post-confirm-message {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.5;
}

/* Driver Coverage Section */
.post-confirm-coverage {
  background: #f9fafb;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.coverage-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #374151;
}

.coverage-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.coverage-badge-gray {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.coverage-badge-amber {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.coverage-badge-light-green {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.coverage-badge-green {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.coverage-badge-dark-green {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.coverage-title {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}

.coverage-body {
  margin: 0;
  font-size: 0.85rem;
  color: #4b5563;
  line-height: 1.5;
}

.coverage-referral {
  margin-top: 0.75rem;
}

.coverage-referral p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.coverage-referral-strong {
  color: #374151;
}

.coverage-referral-medium {
  color: #4b5563;
}

.coverage-referral-soft {
  color: #6b7280;
  font-size: 0.8rem !important;
}

.coverage-referral-link {
  color: #22c55e;
  text-decoration: underline;
  cursor: pointer;
}

.coverage-referral-link:hover {
  color: #16a34a;
}

.post-confirm-tips {
  background: #f9fafb;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.post-confirm-tip-title {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
}

.post-confirm-tip-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: #4b5563;
  line-height: 1.6;
}

.post-confirm-tip-list li {
  margin-bottom: 0.25rem;
}

.post-confirm-tip-list li:last-child {
  margin-bottom: 0;
}

.post-confirm-payment-note {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  background: #fef3c7;
  border-radius: 0.5rem;
  text-align: left;
  line-height: 1.5;
}

.post-confirm-actions {
  display: flex;
  justify-content: center;
}

.cancel-confirm-actions {
  gap: 0.75rem;
}

.cancel-confirm-item {
  font-weight: 600;
  color: #111827;
  margin: 0.5rem 0 1rem;
  font-size: 0.9rem;
}

/* Cancel Booking Modal - Refund Notices */
.cancel-booking-refund-info {
  margin-bottom: 1rem;
}

.refund-notice {
  padding: 1rem;
  border-radius: 0.75rem;
  text-align: left;
}

.refund-notice.refund-yes {
  background: #dcfce7;
  border: 1px solid #86efac;
}

.refund-notice.refund-no {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.refund-notice.hidden {
  display: none;
}

.refund-headline {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.refund-yes .refund-headline {
  color: #166534;
}

.refund-no .refund-headline {
  color: #991b1b;
}

.refund-detail {
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
  color: #374151;
}

.cancel-booking-details {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: left;
}

.cancel-booking-item {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cancel-booking-item:last-child {
  margin-bottom: 0;
}

.post-confirm-btn {
  padding: 0.6rem 2rem;
  font-size: 1rem;
  font-weight: 600;
}

/* Edit Delivery Confirmation Modal */
.edit-confirm-panel {
  max-width: 400px;
}

.edit-confirm-summary {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: left;
}

.edit-confirm-item {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.edit-confirm-item:last-child {
  margin-bottom: 0;
}

.edit-confirm-label {
  font-weight: 600;
  color: #374151;
  margin-right: 0.5rem;
}

.edit-confirm-value {
  color: #4b5563;
}

.edit-confirm-notice {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0 0 1.5rem;
  font-style: italic;
}

.edit-confirm-actions {
  gap: 0.75rem;
}

/* Quote Sent Confirmation Summary */
.quote-confirm-summary {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.quote-confirm-item {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  color: #374151;
}

.quote-confirm-item:last-child {
  margin-bottom: 0;
}

.earnings-note {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: normal;
}

/* Booking Success Details */
.booking-success-details {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  text-align: left;
}

.booking-success-driver,
.booking-success-item,
.booking-success-date {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  color: #374151;
}

.booking-success-driver {
  font-weight: 600;
  color: #166534;
}

.booking-success-details p:last-child {
  margin-bottom: 0;
}

/* Just booked highlight animation - uses same greenGlow as just-moved for consistency */
.just-booked {
  animation: greenGlow 6s ease-out;
  position: relative;
  z-index: 5;
}

/* ===== Stripe Payment Styles ===== */
.stripe-card-section {
  margin: 1rem 0;
}

.stripe-card-element,
.stripe-element-field {
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 44px;
  box-sizing: border-box;
}

.stripe-card-element:focus-within,
.stripe-element-field:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.stripe-card-element--invalid,
.stripe-element-field--invalid {
  border-color: #ef4444;
}

.stripe-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.stripe-field-half {
  flex: 1;
  min-width: 0;
}

.stripe-card-errors {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  min-height: 1.25rem;
}


/* Payment States */
.payment-state {
  min-height: 300px;
}

.payment-state-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
  min-height: 300px;
}

.payment-state-title {
  margin: 1rem 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
}

.payment-state-message {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.5;
}

.payment-state-note {
  margin: 0.5rem 0 1rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.payment-state-icon {
  margin-bottom: 0.5rem;
}

/* Payment Spinner */
.payment-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: paymentSpin 1s linear infinite;
}

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

/* Pay button states */
#booking-pay-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#booking-pay-btn.btn-loading {
  position: relative;
  color: transparent;
}

#booking-pay-btn.btn-loading::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  top: 50%;
  left: 50%;
  margin-left: -0.5rem;
  margin-top: -0.5rem;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: paymentSpin 0.8s linear infinite;
}


/* Service Area Mode Toggle and Date Picker */
.service-area-mode-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.mode-toggle-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-label {
  font-size: 0.85rem;
  color: #4b5563;
  font-weight: 500;
}

.mode-toggle-buttons {
  display: flex;
  gap: 8px;
}

.mode-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #4b5563;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-btn:hover {
  border-color: #9ca3af;
}

.mode-btn.active {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.scheduled-dates-wrapper {
  margin-top: 12px;
}

.scheduled-dates-wrapper.hidden {
  display: none;
}

.date-inputs-row {
  display: flex;
  gap: 12px;
}

.date-input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-input-group label {
  font-size: 0.8rem;
  color: #6b7280;
}

.date-input-group input[type="date"] {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  color: #111827;
}

.date-input-group input[type="date"]:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.service-area-mode-display {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
}

.mode-display-label {
  font-size: 0.8rem;
  color: #6b7280;
  font-style: italic;
}

/* Date range input for service areas */
.date-range-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.date-range-label {
  font-size: 0.8rem;
  color: #6b7280;
}

.service-area-date-range {
  cursor: pointer;
  background-color: #fff !important;
}

.service-area-date-range::placeholder {
  color: #9ca3af;
}

.service-area-date-range {
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  padding: 10px 12px !important;
  background: #fff !important;
}

.service-area-date-range:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15) !important;
  outline: none !important;
}

.date-range-hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 6px 0 0 0;
  font-style: italic;
}

/* About page modal */
.about-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-modal.hidden {
  display: none;
}

.about-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.about-panel {
  position: relative;
  background: #fff;
  width: 95%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: 12px;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.about-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.about-close-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

.about-content {
  padding: 32px 24px;
}

.about-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #22c55e;
  margin: 0 0 24px 0;
  text-align: center;
}

.about-section {
  margin-bottom: 24px;
}

.about-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 12px 0;
}

.about-section p {
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.6;
  margin: 0 0 8px 0;
}

.about-section p:last-child {
  margin-bottom: 0;
}

.about-legal {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.about-legal a {
  color: #22c55e;
  text-decoration: none;
}

.about-legal a:hover {
  text-decoration: underline;
}

/* Account link button */
.account-link-btn {
  width: 100%;
  padding: 12px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #22c55e;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.account-link-btn:hover {
  background: #f0fdf4;
  border-color: #22c55e;
}

.about-link-card {
  padding: 0 !important;
}

.about-link-card .account-link-btn {
  border: none;
  background: transparent;
  padding: 16px;
}

/* Confirmation modal */
.confirm-panel {
  max-width: 420px;
  padding: 24px;
}

.confirm-content {
  padding: 32px 24px;
  text-align: center;
}

.confirm-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-icon svg {
  width: 56px;
  height: 56px;
}

.confirm-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 16px 0;
}

.confirm-message {
  font-size: 0.95rem;
  color: #374151;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.confirm-note {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 24px 0;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-actions .secondary-btn,
.confirm-actions .danger-btn {
  flex: 1;
  padding: 12px 16px;
}

.danger-btn {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.danger-btn:hover {
  background: #dc2626;
}

/* Login Screen */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #f8faf8 0%, #e8f5e9 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 9000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.login-screen.hidden {
  display: none;
}

.login-content {
  text-align: center;
  padding: 2rem;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 40px));
  max-width: 400px;
  margin: auto;
}

.login-logo {
  width: 200px;
  max-width: 80%;
  height: auto;
  margin-bottom: 2rem;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.75rem 0;
}

.login-subtitle {
  font-size: 1rem;
  color: #4b5563;
  margin: 0 0 2rem 0;
  line-height: 1.5;
}

.login-btn {
  display: inline-block;
  background: #16a34a;
  color: #fff;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.login-btn:hover {
  background: #15803d;
}

.login-note {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 1.5rem;
  line-height: 1.5;
}

.login-note a {
  color: #16a34a;
  text-decoration: none;
}

.login-note a:hover {
  text-decoration: underline;
}

/* Auth Forms */
.auth-form {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.auth-form.hidden {
  display: none;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
  background: #fff;
}

.auth-input:focus {
  outline: none;
  border-color: #22c55e;
}

.password-input-wrapper {
  position: relative;
  width: 100%;
}

.password-input-wrapper .auth-input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(calc(-50% - 6px));
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: #374151;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.password-toggle .hidden {
  display: none;
}

.auth-form .login-btn {
  width: 100%;
  border: none;
  cursor: pointer;
  margin-top: 4px;
}

.auth-form .login-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.auth-helper-text {
  font-size: 0.8rem;
  color: #6b7280;
  margin: -4px 0 12px 0;
  line-height: 1.4;
}

.auth-error {
  color: #dc2626;
  font-size: 0.85rem;
  margin: 12px 0 0 0;
  text-align: center;
}

.auth-error.hidden {
  display: none;
}

.auth-success {
  color: #16a34a;
  font-size: 0.85rem;
  margin: 12px 0 0 0;
  text-align: center;
}

.auth-success.hidden {
  display: none;
}

.auth-form-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
}

.auth-form-desc {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.auth-switch {
  font-size: 0.9rem;
  color: #4b5563;
  margin-top: 16px;
}

.auth-switch a {
  color: #16a34a;
  text-decoration: none;
  font-weight: 500;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* SMS Consent checkbox styling */
.sms-consent-wrapper {
  margin: 16px 0;
  text-align: left;
}

.sms-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #374151;
}

.sms-consent-checkbox {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #16a34a;
  cursor: pointer;
}

.sms-consent-text {
  flex: 1;
}

.sms-consent-disclosure {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 8px 0 0 28px;
  line-height: 1.4;
}

/* Header login button */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-login-btn {
  background: #16a34a;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}

.header-login-btn:hover {
  background: #15803d;
}

.header-login-btn.hidden {
  display: none;
}

/* Notification options in prompt */
.notification-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 1rem 0 1.5rem 0;
  text-align: left;
}

.notification-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: #374151;
  cursor: pointer;
}

.notification-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #16a34a;
  cursor: pointer;
}

.notification-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.notification-option.disabled input[type="checkbox"] {
  cursor: not-allowed;
}

.notification-sms-consent {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0.25rem 0 0 30px;
  line-height: 1.4;
}

.notification-sms-add-phone {
  font-size: 0.8rem;
  color: #9ca3af;
  margin: 0.25rem 0 0 30px;
  font-style: italic;
}

/* Disabled toggle row for SMS in Account */
.driver-toggle.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.driver-toggle.disabled input {
  cursor: not-allowed;
}

/* Email notification toggle in Account tab */
.notification-toggles {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.logout-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.logout-section {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.logout-btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 16px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
  text-decoration: none;
}

.logout-btn:hover {
  background: #e5e7eb;
}

.delete-account-btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 16px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.delete-account-btn:hover {
  background: #fee2e2;
}

.delete-account-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Progress photo section for Item Inspected step */
.progress-photo-section {
  margin: 16px 0;
  text-align: left;
}

.progress-photo-section.hidden {
  display: none;
}

.progress-photo-label {
  font-size: 0.9rem;
  color: #374151;
  margin-bottom: 12px;
  font-weight: 500;
}

.progress-photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 60px;
}

.progress-photo-preview .photo-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.progress-photo-preview .photo-thumb-container {
  position: relative;
}

.progress-photo-preview .remove-photo-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-photo-thumb {
  position: relative;
  width: 60px;
  height: 60px;
}

.progress-photo-thumb img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.progress-photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-photo-buttons {
  display: flex;
  gap: 8px;
}

.progress-photo-buttons .photo-upload-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s;
}

.progress-photo-buttons .photo-upload-btn:hover {
  background: #e5e7eb;
}

.progress-photo-buttons .photo-upload-btn svg {
  width: 18px;
  height: 18px;
}

/* Message photos grid for multiple photos */
.message-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}

.message-photos-grid .message-photo {
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: cover;
  border-radius: 6px;
}

/* Admin Dashboard Styles */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  background: #f9fafb;
}

.admin-stat-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
}

.admin-stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.admin-stat-label {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Financial Summary Cards */
.financials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 16px;
}

@media (min-width: 768px) {
  .financials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.financial-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
}

.financial-card.highlight {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #10b981;
}

.financial-card.earnings {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #22c55e;
}

.financial-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.financial-card-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #10b981;
  margin: 0 0 4px 0;
}

.financial-card-value.negative {
  color: #ef4444;
}

.financial-card-subtitle {
  font-size: 0.8rem;
  color: #9ca3af;
  margin: 0;
}

.financial-card.highlight .financial-card-title {
  color: #047857;
}

.financial-card.highlight .financial-card-value {
  font-size: 1.75rem;
  color: #047857;
}

.financial-card.highlight .financial-card-subtitle {
  color: #059669;
}

/* Financials Sub-tabs */
.financials-sub-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  background: #f3f4f6;
  border-radius: 8px;
  margin: 16px;
  width: fit-content;
}

.financials-sub-tab {
  padding: 8px 20px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
}

.financials-sub-tab:hover {
  color: #374151;
  background: rgba(255,255,255,0.5);
}

.financials-sub-tab.active {
  background: white;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.financials-sub-panel {
  padding: 0 16px 16px;
}

/* Overview Controls */
.overview-controls {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

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

.month-selector label {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 500;
}

.month-picker {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  background: white;
}

.compare-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #374151;
  cursor: pointer;
}

.compare-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

/* KPI Sections */
.kpi-section {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
}

.kpi-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px 0;
}

.kpi-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.kpi-row:last-child {
  border-bottom: none;
}

.kpi-label {
  font-size: 0.95rem;
  color: #374151;
  flex: 1;
}

.kpi-count {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 400;
  margin-left: 4px;
}

.kpi-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  min-width: 100px;
  text-align: right;
}

.kpi-value.positive {
  color: #10b981;
}

.kpi-value.negative {
  color: #ef4444;
}

.kpi-value.warning {
  color: #f59e0b;
}

.kpi-delta {
  min-width: 80px;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: right;
  margin-left: 12px;
}

.kpi-delta.up {
  color: #10b981;
}

.kpi-delta.down {
  color: #ef4444;
}

.kpi-delta.neutral {
  color: #6b7280;
}

/* KPI Summary */
.kpi-summary {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #10b981;
  border-radius: 12px;
  padding: 20px;
}

.kpi-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.kpi-summary-label {
  font-size: 1rem;
  font-weight: 600;
  color: #047857;
}

.kpi-summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #047857;
}

.kpi-summary-note {
  margin: 8px 0 0 0;
  font-size: 0.85rem;
  color: #059669;
}

/* Ledger Pagination */
.ledger-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

#ledger-showing-count {
  font-size: 0.9rem;
  color: #6b7280;
}

/* Payments Ledger Styles */
.payments-ledger-section {
  margin-top: 0;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
}

.payments-ledger-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.payments-ledger-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

.payments-ledger-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.payments-filter-select {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.85rem;
  background: white;
  cursor: pointer;
}

.payments-ledger-table-wrapper {
  overflow-x: auto;
}

.payments-ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.payments-ledger-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.payments-ledger-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  color: #4b5563;
}

.payments-ledger-table tr:hover {
  background: #f9fafb;
}

.payments-ledger-table .loading-cell {
  text-align: center;
  color: #9ca3af;
  padding: 40px;
}

.payment-type-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.payment-type-badge.deposit {
  background: #d1fae5;
  color: #047857;
}

.payment-type-badge.refund {
  background: #fef3c7;
  color: #92400e;
}

.payment-type-badge.driver_payout {
  background: #dbeafe;
  color: #1e40af;
}

.payment-type-badge.referral_payout {
  background: #f3e8ff;
  color: #7c3aed;
}

.payment-type-badge.manual_payout {
  background: #fef3c7;
  color: #92400e;
}

.payment-status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.payment-status-badge.processing {
  background: #fef3c7;
  color: #92400e;
}

.payment-status-badge.paid {
  background: #d1fae5;
  color: #047857;
}

.payment-status-badge.refunded {
  background: #e5e7eb;
  color: #4b5563;
}

.payment-status-badge.action-needed {
  background: #fecaca;
  color: #991b1b;
}

.payment-amount {
  font-weight: 600;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
}

.payment-amount.positive {
  color: #10b981;
}

.payment-amount.negative {
  color: #6b7280;
}

.payment-actions {
  display: flex;
  gap: 6px;
}

.payment-action-btn {
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: white;
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
}

.payment-action-btn:hover {
  background: #f3f4f6;
}

.payment-action-btn.retry {
  border-color: #fbbf24;
  color: #92400e;
}

.payment-action-btn.retry:hover {
  background: #fef3c7;
}

.payment-action-btn.notes {
  border-color: #a78bfa;
  color: #5b21b6;
}

.payment-action-btn.notes:hover {
  background: #f3e8ff;
}

.payment-reference-link {
  color: #2563eb;
  text-decoration: none;
}

.payment-reference-link:hover {
  text-decoration: underline;
}

.admin-tabs {
  display: flex;
  gap: 0;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 16px;
}

.admin-tab {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-tab:hover {
  color: #111827;
}

.admin-tab.active {
  color: #10b981;
  border-bottom-color: #10b981;
}

.admin-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
  background: #ef4444;
  border-radius: 9px;
}

.admin-card-bonus {
  font-size: 1.1rem;
  font-weight: 700;
  color: #10b981;
  margin-left: auto;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 12px;
  margin-left: auto;
  white-space: nowrap;
}

.status-badge.refund {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-badge.pay-driver {
  background: #fef3c7;
  color: #b45309;
}

.cancellation-card .admin-card-subtitle {
  font-size: 0.8rem;
}

.admin-panel-header {
  margin-bottom: 16px;
}

.admin-panel-description {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0;
}

.admin-panel {
  padding: 16px;
}

.admin-filter-row {
  margin-bottom: 16px;
}

.admin-users-filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-search-input {
  padding: 10px 14px;
  font-size: 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  color: #111827;
  flex: 1;
  min-width: 200px;
  max-width: 350px;
}

.admin-search-input::placeholder {
  color: #9ca3af;
}

.admin-filter-select {
  padding: 10px 14px;
  font-size: 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  color: #111827;
  cursor: pointer;
  min-width: 180px;
}

.admin-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 16px 0;
  border-top: 1px solid #e5e7eb;
}

.admin-pagination-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-pagination-btn:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.admin-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-pagination-info {
  font-size: 0.9rem;
  color: #6b7280;
}

/* Service Area Map Styles */
.service-map-filters {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.service-map-filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #374151;
  cursor: pointer;
}

.service-map-filter-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #22c55e;
}

.service-map-stats {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.service-map-last-updated {
  color: #9ca3af;
  font-size: 0.8rem;
}

.service-map-stale-badge {
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.service-area-map {
  width: 100%;
  height: 500px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
}

.service-map-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #6b7280;
}

.service-map-empty p {
  margin: 0 0 8px;
  font-size: 1rem;
}

.service-map-empty-hint {
  font-size: 0.85rem;
  color: #9ca3af;
}

.service-map-info-window {
  padding: 8px 0;
  min-width: 200px;
  position: relative;
}

.info-window-close {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  font-size: 20px;
  font-weight: bold;
  color: #9ca3af;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.info-window-close:hover {
  color: #374151;
}

.service-map-info-window h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #111827;
}

.service-map-info-window p {
  margin: 4px 0;
  font-size: 0.85rem;
  color: #4b5563;
}

.service-map-info-window .suspended-badge {
  display: inline-block;
  background: #fecaca;
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 8px;
}

.service-map-info-window .scheduled-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
}

.service-map-info-window .driver-badge {
  display: inline-block;
  background: #d1fae5;
  color: #059669;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
  margin-left: 4px;
}

.service-map-availability-count {
  color: #3b82f6;
  font-size: 0.875rem;
}

.availability-info-window hr {
  margin: 8px 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

.availability-counts p {
  margin: 4px 0;
  font-size: 0.875rem;
}

/* Coverage Tabs */
.coverage-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.coverage-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.coverage-tab:hover {
  color: #374151;
}

.coverage-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.coverage-tab-content.hidden {
  display: none;
}

/* Coverage List */
.coverage-list-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.coverage-list-sort {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  background: white;
}

.coverage-list-stats {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 12px;
}

.coverage-list-container {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  max-height: 600px;
  overflow-y: auto;
}

.coverage-list-loading {
  padding: 40px;
  text-align: center;
  color: #6b7280;
}

.coverage-region-group {
  border-bottom: 1px solid #e5e7eb;
}

.coverage-region-group:last-child {
  border-bottom: none;
}

.coverage-region-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f9fafb;
  cursor: pointer;
  user-select: none;
}

.coverage-region-header:hover {
  background: #f3f4f6;
}

.coverage-region-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
}

.coverage-region-summary {
  font-size: 0.8rem;
  color: #6b7280;
}

.coverage-region-warning {
  font-size: 0.75rem;
  color: #dc2626;
  font-weight: 500;
  margin-left: 8px;
}

.coverage-region-toggle {
  font-size: 1rem;
  color: #9ca3af;
  transition: transform 0.2s;
}

.coverage-region-group.collapsed .coverage-region-toggle {
  transform: rotate(-90deg);
}

.coverage-region-group.collapsed .coverage-region-items {
  display: none;
}

.coverage-region-items {
  border-top: 1px solid #e5e7eb;
}

.coverage-item {
  display: grid;
  grid-template-columns: 2fr 0.5fr 1fr 1fr 90px 100px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.85rem;
}

.coverage-item:last-child {
  border-bottom: none;
}

.coverage-item:hover {
  background: #f9fafb;
}

.coverage-item-header {
  background: #f9fafb;
  font-weight: 600;
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e5e7eb;
}

.coverage-item-header:hover {
  background: #f9fafb;
}

.coverage-health-badge-header {
  text-align: center;
}

.coverage-address {
  min-width: 0;
}

.coverage-address-text {
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coverage-address-city {
  font-size: 0.75rem;
  color: #6b7280;
}

.coverage-state {
  font-weight: 500;
  color: #374151;
  text-align: center;
}

.coverage-count {
  text-align: center;
}

.coverage-count-total {
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
}

.coverage-count-breakdown {
  font-size: 0.7rem;
  color: #9ca3af;
}

.coverage-health-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
}

.coverage-health-badge.healthy {
  background: #dcfce7;
  color: #166534;
}

.coverage-health-badge.thin {
  background: #fef3c7;
  color: #92400e;
}

.coverage-health-badge.inactive {
  background: #fee2e2;
  color: #991b1b;
}

.coverage-updated {
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: right;
}

.coverage-no-active {
  color: #dc2626;
  font-size: 0.75rem;
}

@media (max-width: 900px) {
  .coverage-item {
    grid-template-columns: 1.5fr 1fr 1fr 80px;
    gap: 8px;
  }
  
  .coverage-state,
  .coverage-updated {
    display: none;
  }
}

@media (max-width: 600px) {
  .service-area-map {
    height: 400px;
  }
  
  .service-map-filters {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ========== Supply Readiness Map ========== */
.readiness-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.readiness-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
}

.readiness-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.readiness-control-group label {
  font-size: 0.875rem;
  color: #374151;
  font-weight: 500;
}

.readiness-control-group select {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
}

.readiness-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 8px;
  flex-wrap: wrap;
}

.readiness-legend-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
}

.readiness-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #4b5563;
}

.readiness-color-box {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.1);
}

.readiness-content {
  display: flex;
  gap: 16px;
}

.readiness-map {
  flex: 1;
  height: 500px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  min-width: 0;
}

.readiness-detail-card {
  width: 280px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  flex-shrink: 0;
}

.readiness-detail-card h4 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #111827;
}

.readiness-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.readiness-detail-label {
  font-size: 0.875rem;
  color: #6b7280;
}

.readiness-detail-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
}

.readiness-band-no_service { color: #dc2626; }
.readiness-band-extremely_fragile { color: #f97316; }
.readiness-band-fragile { color: #f97316; }
.readiness-band-viable { color: #ca8a04; }
.readiness-band-strong { color: #16a34a; }

.readiness-distance-bands {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.readiness-distance-bands strong {
  font-size: 0.8rem;
  color: #374151;
}

.readiness-distance-bands ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.readiness-distance-bands li {
  font-size: 0.8rem;
  color: #4b5563;
  margin-bottom: 4px;
}

.readiness-action-hint {
  margin-top: 12px;
  padding: 10px;
  background: #fef3c7;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #92400e;
  border-left: 3px solid #f59e0b;
}

.readiness-detail-coords {
  margin-top: 12px;
  color: #9ca3af;
}

.readiness-detail-coords small {
  font-size: 0.75rem;
}

@media (max-width: 900px) {
  .readiness-content {
    flex-direction: column;
  }
  
  .readiness-detail-card {
    width: 100%;
  }
  
  .readiness-map {
    height: 400px;
  }
}

/* TCR Info Collapsible */
.tcr-info {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 8px;
}

.tcr-info summary {
  cursor: pointer;
  color: #4b5563;
  font-weight: 500;
  padding: 4px 0;
}

.tcr-info summary:hover {
  color: #111827;
}

.tcr-info p {
  margin: 8px 0 0;
  line-height: 1.5;
  padding-left: 12px;
  border-left: 2px solid #e5e7eb;
}

.tcr-info p:first-of-type {
  margin-top: 8px;
}

/* Quiet Hours Debug Panel */
.quiet-hours-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.quiet-hours-stats {
  margin-bottom: 16px;
  padding: 8px 12px;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 14px;
  color: #374151;
}

@media (max-width: 600px) {
  .quiet-hours-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
}

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

.admin-card-top-row .admin-card-title {
  margin: 0;
}

.admin-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-card-people {
  display: flex;
  gap: 24px;
  margin-bottom: 12px;
}

.admin-card-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 180px;
  overflow: hidden;
}

.admin-person-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.admin-person-role {
  font-size: 0.7rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-person-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-card-financials {
  display: flex;
  gap: 24px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-financial-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-financial-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: capitalize;
}

.admin-financial-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

.admin-financial-value.admin-refund-status.refunded {
  color: #047857;
  background: #d1fae5;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.admin-financial-value.admin-refund-status.processing {
  color: #b45309;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.admin-financial-value.admin-refund-status.failed {
  color: #b91c1c;
  background: #fee2e2;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.admin-view-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  margin-top: 8px;
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  grid-column: 1 / -1;
}

.admin-view-more-btn:hover {
  color: #374151;
}

.admin-view-more-icon {
  font-size: 0.6rem;
}

.admin-view-more-content {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.admin-checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-checkbox-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f0fdf4;
  color: #166534;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 500;
}

.admin-card-actions-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.admin-action-btn-sm {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.admin-action-btn-sm:hover:not(:disabled) {
  opacity: 0.85;
}

.admin-action-btn-sm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-action-btn-sm.complete {
  background: #d1fae5;
  color: #047857;
}

.admin-action-btn-sm.cancel {
  background: #fee2e2;
  color: #b91c1c;
}

.admin-action-btn-sm.chat {
  background: #dbeafe;
  color: #1d4ed8;
}

.admin-action-btn-sm.refund {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.admin-card-avatars {
  display: flex;
  gap: 12px;
}

.admin-card-avatar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.admin-avatar-clickable {
  cursor: pointer;
  transition: opacity 0.15s;
}

.admin-avatar-clickable:hover {
  opacity: 0.8;
}

.referrer-link {
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
}

.referrer-link:hover {
  color: #1d4ed8;
}

.admin-card-referrer-email {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.admin-delivery-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.admin-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 12px;
}

.admin-count-badge.booked {
  background: #fef3c7;
  color: #d97706;
}

.admin-count-badge.customer {
  background: #dbeafe;
  color: #1d4ed8;
}

.admin-count-badge.driver {
  background: #dcfce7;
  color: #16a34a;
}

.admin-count-badge.referral {
  background: #fef3c7;
  color: #b45309;
}

.admin-count-badge.cancelled {
  background: #fee2e2;
  color: #dc2626;
}

.admin-count-badge.missing-photos {
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
}

.admin-count-badge.deposits-paid {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
}

.admin-count-badge.mtc-earnings {
  background: #d1fae5;
  color: #047857;
  font-weight: 600;
}

.admin-count-badge.referral-paid {
  background: #ede9fe;
  color: #7c3aed;
  font-weight: 600;
}

.admin-count-badge.refund {
  background: #fce7f3;
  color: #be185d;
  font-weight: 600;
}

.admin-count-badge.late-fee {
  background: #fef3c7;
  color: #b45309;
  font-weight: 600;
}

/* Admin Financials Summary - Collapsible Row */
.admin-financials-row {
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  overflow: hidden;
}

.admin-financials-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.admin-financials-header:hover {
  background: #f3f4f6;
}

.admin-financials-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.financials-arrow {
  font-size: 11px;
  margin-left: 4px;
  color: #6b7280;
}

.admin-financials-net {
  font-size: 13px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}

.admin-financials-net.net-positive {
  background: #d1fae5;
  color: #047857;
}

.admin-financials-net.net-zero {
  background: #f3f4f6;
  color: #6b7280;
}

.admin-financials-net.net-negative {
  background: #fee2e2;
  color: #b91c1c;
}

.admin-financials-details {
  padding: 0 14px 14px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.financials-section {
  padding: 10px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.financials-section:last-child {
  border-bottom: none;
}

.financials-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.financials-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #374151;
  padding: 3px 0;
}

.financials-hint {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
  font-style: italic;
}

.financials-summary-section {
  background: #f9fafb;
  margin: 0 -14px;
  padding: 10px 14px;
  border-radius: 0 0 8px 8px;
}

.financials-summary-section .financials-line {
  font-weight: 600;
}

/* Inline color classes for financial values */
span.net-positive {
  color: #047857;
}

span.net-negative {
  color: #b91c1c;
}

span.net-zero {
  color: #6b7280;
}

.admin-card-notes {
  font-style: italic;
  color: #4b5563;
  background: #f9fafb;
  padding: 8px;
  border-radius: 6px;
  margin-top: 4px;
}

.admin-card-photos {
  margin-top: 8px;
}

.admin-photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.admin-card-quotes {
  margin-top: 8px;
}

.admin-quotes-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.admin-quote-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: #f0fdf4;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #bbf7d0;
}

.admin-quote-driver {
  font-weight: 600;
  color: #166534;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s;
}

.admin-quote-driver:hover {
  text-decoration-color: #166534;
}

.admin-quote-details {
  display: flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.admin-quote-details:hover {
  background: #dcfce7;
}

.admin-quote-amount {
  font-weight: 700;
  color: #15803d;
}

.admin-quote-date {
  font-size: 0.85rem;
  color: #4b5563;
}

/* Admin Quote Message Modal */
.admin-quote-message-panel {
  max-width: 400px;
  width: 90%;
}

.admin-quote-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.admin-quote-message-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.admin-quote-message-body {
  padding: 16px 20px;
}

.admin-quote-message-from {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0 0 12px 0;
}

.admin-quote-message-from strong {
  color: #166534;
}

.admin-quote-message-content {
  background: #f9fafb;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.admin-quote-message-content p {
  margin: 0;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Admin Refund Modal */
.admin-refund-panel {
  max-width: 420px;
  width: 90%;
}

.admin-refund-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.admin-refund-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.admin-refund-body {
  padding: 16px 20px;
}

.admin-refund-info {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.admin-refund-info p {
  margin: 0 0 6px 0;
  font-size: 0.9rem;
  color: #374151;
}

.admin-refund-amounts {
  background: #f9fafb;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.admin-refund-amount-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.admin-refund-amount-row:last-child {
  margin-bottom: 0;
}

.admin-refund-amount-row.highlight {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-weight: 600;
  color: #166534;
}

.admin-refund-options {
  margin-bottom: 16px;
}

.admin-refund-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  cursor: pointer;
}

.admin-refund-option input[type="radio"] {
  accent-color: #166534;
}

.admin-refund-partial-input {
  margin-top: 8px;
  margin-left: 24px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
}

.admin-refund-partial-input label {
  display: block;
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 6px;
}

.admin-refund-partial-input input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
}

.admin-refund-note {
  margin-bottom: 16px;
}

.admin-refund-note label {
  display: block;
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 6px;
}

.admin-refund-note textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  resize: vertical;
}

.admin-refund-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.admin-refund-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.admin-refund-actions .btn-cancel {
  padding: 10px 20px;
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.admin-refund-actions .btn-confirm {
  padding: 10px 20px;
  border: none;
  background: #166534;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}

.admin-refund-actions .btn-confirm:hover {
  background: #15803d;
}

.admin-refund-actions .btn-confirm:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Admin refund button in delivery cards */
.admin-refund-btn {
  padding: 6px 12px;
  background: #f0fdf4;
  border: 1px solid #22c55e;
  color: #166534;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.admin-refund-btn:hover {
  background: #dcfce7;
}

.admin-refund-btn:disabled {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Admin Cancel Modal */
.admin-cancel-panel {
  max-width: 450px;
  width: 90%;
}

.admin-cancel-unbooked-message {
  background: #f3f4f6;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
}

.admin-cancel-unbooked-message p:first-child {
  margin: 0;
  font-weight: 500;
  color: #374151;
}

.admin-cancel-message-container {
  margin-bottom: 16px;
}

.admin-cancel-message-container label {
  display: block;
  font-size: 0.9rem;
  color: #374151;
  margin-bottom: 6px;
  font-weight: 500;
}

.admin-cancel-message-container textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  resize: vertical;
  font-family: inherit;
}

.admin-cancel-message-container textarea:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.admin-cancel-options {
  margin-bottom: 16px;
}

.admin-cancel-prompt {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  color: #374151;
  font-weight: 500;
}

.admin-cancel-refund-info {
  background: #f0f9ff;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid #bae6fd;
}

.admin-cancel-refund-info.no-refund {
  background: #fef3c7;
  border-color: #fcd34d;
}

.admin-cancel-refund-info.override {
  background: #fef2f2;
  border-color: #fecaca;
}

.admin-cancel-refund-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 500;
}

.admin-cancel-refund-icon {
  font-size: 1.2rem;
}

.admin-cancel-refund-text {
  color: #1e40af;
}

.admin-cancel-refund-info.no-refund .admin-cancel-refund-text {
  color: #92400e;
}

.admin-cancel-refund-info.override .admin-cancel-refund-text {
  color: #991b1b;
}

.admin-cancel-timing-note {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #6b7280;
}

.admin-cancel-override {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.admin-cancel-override-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #6b7280;
}

.admin-cancel-override-label input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #dc2626;
}

/* Admin Complete Modal */
.admin-complete-panel {
  max-width: 400px;
  width: 90%;
}

.admin-complete-summary {
  text-align: center;
  padding: 20px 16px;
  background: #f0fdf4;
  border-radius: 8px;
  margin-bottom: 16px;
}

.admin-complete-icon {
  width: 48px;
  height: 48px;
  background: #22c55e;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 12px;
}

.admin-complete-message {
  margin: 0;
  color: #166534;
  font-size: 0.95rem;
  line-height: 1.5;
}

.admin-complete-btn {
  background: #22c55e !important;
}

.admin-complete-btn:hover {
  background: #16a34a !important;
}

/* Admin Close Modal (Administrative Close) */
.admin-close-panel {
  max-width: 450px;
  width: 90%;
}

.admin-close-summary {
  padding: 16px;
  background: #fef3c7;
  border-radius: 8px;
  margin-bottom: 16px;
}

.admin-close-warning {
  color: #92400e;
  font-size: 0.95rem;
  line-height: 1.5;
}

.admin-close-warning p {
  margin: 0;
}

.admin-close-note-section {
  margin-bottom: 16px;
}

.admin-close-note-section label {
  display: block;
  font-size: 0.875rem;
  color: #374151;
  margin-bottom: 6px;
}

.admin-close-note-section textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  resize: vertical;
  font-family: inherit;
}

.admin-close-note-section textarea:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.admin-close-btn {
  background: #f59e0b !important;
}

.admin-close-btn:hover {
  background: #d97706 !important;
}

/* Admin Closed status badge */
.status-admin-closed {
  background: #fef3c7;
  color: #92400e;
}

/* Admin Close action button */
.admin-action-btn-sm.admin-close {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.admin-action-btn-sm.admin-close:hover {
  background: #fcd34d;
}

/* Admin Photo Status Display */
.admin-photo-status {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.admin-photo-status-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.admin-photo-item {
  font-size: 0.85rem;
  color: #374151;
}

.admin-photo-item .status-uploaded {
  color: #22c55e;
  font-weight: 500;
}

.admin-photo-item .status-unavailable {
  color: #f59e0b;
  font-weight: 500;
}

.admin-photo-item .status-exempted {
  color: #22c55e;
  font-weight: 500;
}

.admin-photo-item .status-nonexempt {
  color: #ef4444;
  font-weight: 500;
}

.admin-photo-item .status-missing {
  color: #ef4444;
  font-weight: 500;
}

.admin-photo-item .status-disapproved {
  color: #ef4444;
  font-weight: 500;
}

.admin-photo-view-link {
  text-decoration: underline;
  cursor: pointer;
}

.admin-photo-view-link:hover {
  opacity: 0.8;
}

.admin-photo-exception-link {
  color: #2563eb;
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
}

.admin-photo-exception-link:hover {
  color: #1d4ed8;
}

/* Admin Photo Exception Modal */
.admin-photo-exception-panel {
  max-width: 450px;
  width: 90%;
}

/* Admin Photo Viewer Modal */
.admin-photo-viewer-panel {
  max-width: 600px;
  width: 90%;
}

.photo-viewer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  background: #f9fafb;
  border-radius: 8px;
  padding: 16px;
}

.photo-viewer-item img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.photo-viewer-item img:hover {
  transform: scale(1.02);
}

.photo-viewer-approval-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.photo-exception-details {
  background: #f9fafb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.photo-exception-note-section {
  margin-bottom: 12px;
}

.photo-exception-note-text {
  margin: 8px 0 0;
  padding: 10px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  font-style: italic;
}

.photo-exception-timestamp {
  font-size: 0.85rem;
  color: #6b7280;
}

.photo-exception-exemption-section {
  padding: 16px;
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  margin-bottom: 16px;
}

.admin-review-breakdown-panel {
  max-width: 400px;
}

.review-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.review-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.review-breakdown-item .review-breakdown-label {
  font-size: 0.9rem;
  color: #374151;
}

.review-breakdown-item .review-breakdown-value {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  min-width: 24px;
  text-align: right;
}

.review-breakdown-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fef2f2;
  border-radius: 8px;
  border-top: 2px solid #fecaca;
}

.review-breakdown-total .review-breakdown-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #991b1b;
}

.review-breakdown-total .review-breakdown-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #dc2626;
}

.photo-exception-status {
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.photo-exception-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.photo-exception-toggle-help {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: #92400e;
}

.photo-exception-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}

.photo-exception-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #22c55e;
}

/* Toggle switch styling for photo exception modal */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-switch .toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #22c55e;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* Admin Cancelled Status Labels */
.admin-cancelled-label {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #6b7280;
  margin-left: 8px;
}

.admin-cancelled-label.early {
  background: #fef3c7;
  color: #92400e;
}

.admin-cancelled-label.late {
  background: #fee2e2;
  color: #991b1b;
}

/* Refunded indicator badge */
.admin-refunded-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: #dcfce7;
  color: #166534;
  font-weight: 500;
}

/* Refund status badge in admin delivery cards */
.admin-refund-status {
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.admin-refund-status.refunded {
  background: #dcfce7;
  color: #166534;
}

.admin-refund-status.processing {
  background: #fef3c7;
  color: #92400e;
}

.admin-refund-status.failed {
  background: #fef2f2;
  color: #dc2626;
}

.admin-photo-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.admin-photo-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.admin-avatar-label {
  font-size: 0.65rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-card-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  background: #e5e7eb;
}

.admin-card-avatar-placeholder {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #6b7280;
  font-size: 1rem;
  flex-shrink: 0;
}

.admin-card-info {
  flex: 1;
  min-width: 0;
}

.admin-card-title {
  font-weight: 600;
  color: #111827;
  margin: 0 0 2px 0;
  font-size: 0.95rem;
}

.admin-delivery-id {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  background: #f3f4f6;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.35rem;
}

.admin-card-subtitle {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
}

.admin-card-status-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.admin-card-timestamp-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.admin-card-timestamp {
  font-size: 0.7rem;
  color: #6b7280;
  white-space: nowrap;
}

.admin-card-eligible-drivers {
  font-size: 0.65rem;
  color: #3b82f6;
  white-space: nowrap;
}

.admin-card-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.admin-card-status.seeking { background: #dbeafe; color: #1d4ed8; }
.admin-card-status.quoted { background: #fef3c7; color: #b45309; }
.admin-card-status.booked { background: #d1fae5; color: #047857; }
.admin-card-status.in_progress { background: #e0e7ff; color: #4338ca; }
.admin-card-status.completed { background: #d1fae5; color: #047857; }
.admin-card-status.cancelled { background: #fee2e2; color: #b91c1c; }
.admin-card-status.admin-closed { background: #fef3c7; color: #92400e; }

/* Overdue badge for admin cards */
.admin-overdue-badge {
  background: #dc2626;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse-glow 2s infinite;
}

.admin-delivery-overdue-badge {
  background: #ea580c;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-needs-review-badge {
  background: #f59e0b;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse-amber 2s infinite;
}

.admin-action-btn-sm.flag {
  background: #f59e0b;
  color: white;
}

.admin-action-btn-sm.flag:hover {
  background: #d97706;
}

@keyframes pulse-amber {
  0%, 100% { box-shadow: 0 0 4px rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 0 12px rgba(245, 158, 11, 0.6); }
}

/* Photo exception badge for admin cards */
.admin-photo-exception-badge {
  background: #7c3aed;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-photo-exception-badge.reviewed {
  background: #a78bfa;
}

.admin-flag-details {
  font-size: 0.85rem;
  color: #374151;
}

.admin-flag-details p {
  margin: 4px 0;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 0 12px rgba(220, 38, 38, 0.6); }
}

.admin-card-flagged {
  border-left: 4px solid #dc2626;
  background: linear-gradient(135deg, #fef2f2 0%, white 20%);
}

.admin-card-expected-delivery {
  background: #f3f4f6;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 0.875rem;
}

.admin-card-expected-delivery.admin-expected-overdue {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-weight: 500;
}

.admin-driver-status {
  background: #fef3c7;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-driver-status-label {
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 500;
}

.admin-driver-status-value {
  color: #b45309;
  font-size: 0.85rem;
  font-weight: 600;
}

.admin-card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.85rem;
}

.admin-card-detail {
  color: #374151;
}

.admin-card-detail-label {
  color: #9ca3af;
  font-size: 0.75rem;
  display: block;
  margin-bottom: 2px;
}

.admin-card-service-areas {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #374151;
}

.admin-card-service-areas .admin-card-detail-label {
  display: inline;
  margin-right: 6px;
}

.service-area-tag {
  display: inline-block;
  background: #ecfdf5;
  color: #047857;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  margin: 2px 4px 2px 0;
}

.service-area-item {
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-top: 4px;
  color: #374151;
}

.admin-card-badges {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.admin-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 500;
}

.admin-badge.driver {
  background: #dbeafe;
  color: #1d4ed8;
}

.admin-badge.admin {
  background: #fce7f3;
  color: #be185d;
}

.admin-badge-clickable {
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.admin-badge-clickable:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

.admin-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #f59e0b;
  font-size: 0.85rem;
}

.admin-card-rating svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.admin-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.admin-action-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.admin-action-btn.complete {
  background: #d1fae5;
  color: #047857;
}

.admin-action-btn.complete:hover {
  background: #a7f3d0;
}

.admin-action-btn.cancel {
  background: #fee2e2;
  color: #b91c1c;
}

.admin-action-btn.cancel:hover {
  background: #fecaca;
}

.admin-action-btn.notes {
  background: #e0e7ff;
  color: #3730a3;
}

.admin-action-btn.notes:hover {
  background: #c7d2fe;
}

.admin-action-btn.suspend {
  background: #fef3c7;
  color: #92400e;
}

.admin-action-btn.suspend:hover {
  background: #fde68a;
}

.admin-action-btn.unsuspend {
  background: #d1fae5;
  color: #047857;
}

.admin-action-btn.unsuspend:hover {
  background: #a7f3d0;
}

.admin-action-btn.payout {
  background: #dbeafe;
  color: #1d4ed8;
}

.admin-action-btn.payout:hover {
  background: #bfdbfe;
}

.admin-payout-section-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #374151;
}

.admin-badge.suspended {
  background: #fee2e2;
  color: #b91c1c;
}

.admin-card.suspended {
  background: #fef2f2;
  border-color: #fecaca;
}

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

.admin-card.processed {
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: 0.75;
}

.admin-card.processed .admin-card-title,
.admin-card.processed .admin-card-subtitle,
.admin-card.processed .admin-card-details {
  color: #64748b;
}

.admin-suspended-reason {
  margin-top: 8px;
  padding: 8px;
  background: #fee2e2;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #991b1b;
}

.suspended-screen {
  position: fixed;
  inset: 0;
  background: #fef2f2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  z-index: 10000;
}

.suspended-screen h1 {
  color: #b91c1c;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.suspended-screen p {
  color: #7f1d1d;
  max-width: 400px;
  line-height: 1.6;
}

.suspended-screen .reason {
  margin-top: 16px;
  padding: 12px 16px;
  background: white;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  font-weight: 500;
}

/* Email Verification Banner */
.email-verification-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-bottom: 1px solid #f59e0b;
  padding: 10px 16px;
  z-index: 1000;
}

.verification-banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.verification-icon {
  font-size: 1.2rem;
}

.verification-text {
  color: #92400e;
  font-size: 0.9rem;
  font-weight: 500;
}

.resend-verification-btn {
  background: #f59e0b;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.resend-verification-btn:hover:not(:disabled) {
  background: #d97706;
}

.resend-verification-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.dismiss-verification-btn {
  background: none;
  border: none;
  color: #92400e;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.dismiss-verification-btn:hover {
  opacity: 1;
}

@media (max-width: 480px) {
  .verification-banner-content {
    gap: 8px;
  }
  
  .verification-text {
    font-size: 0.8rem;
    text-align: center;
    flex: 1 1 100%;
  }
  
  .resend-verification-btn {
    font-size: 0.8rem;
    padding: 5px 12px;
  }
}

/* Suspended Mode Banner */
.suspended-mode-banner {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-bottom: 1px solid #ef4444;
  padding: 10px 16px;
  z-index: 1000;
}

.suspended-banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.suspended-icon {
  font-size: 1.2rem;
}

.suspended-text {
  color: #991b1b;
  font-size: 0.9rem;
  font-weight: 500;
}

@media (max-width: 480px) {
  .suspended-banner-content {
    gap: 8px;
  }
  
  .suspended-text {
    font-size: 0.8rem;
    text-align: center;
    flex: 1 1 100%;
  }
}

/* Pending Payout Banner */
.pending-payout-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-bottom: 1px solid #f59e0b;
  padding: 10px 16px;
  z-index: 999;
}

.pending-payout-banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.payout-icon {
  font-size: 1.2rem;
}

.payout-text {
  color: #92400e;
  font-size: 0.9rem;
  font-weight: 500;
}

.payout-text a {
  color: #b45309;
  text-decoration: underline;
  font-weight: 600;
}

.payout-text a:hover {
  color: #92400e;
}

@media (max-width: 480px) {
  .pending-payout-banner-content {
    gap: 8px;
  }
  
  .payout-text {
    font-size: 0.8rem;
    text-align: center;
    flex: 1 1 100%;
  }
}

/* Admin Chat View Button */
.admin-chat-action {
  border-top: none;
  margin-top: 8px;
  padding-top: 0;
}

.admin-action-btn.chat {
  background: #e0e7ff;
  color: #3730a3;
}

.admin-action-btn.chat:hover {
  background: #c7d2fe;
}

/* Admin Chat Modal */
.admin-chat-panel {
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.admin-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.admin-chat-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #111827;
}

.admin-chat-close-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #6b7280;
  border-radius: 4px;
}

.admin-chat-close-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.admin-chat-info {
  padding: 12px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.admin-chat-info p {
  margin: 0;
  font-size: 0.9rem;
  color: #374151;
}

.admin-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  min-height: 200px;
  max-height: 50vh;
}

.admin-chat-empty {
  text-align: center;
  color: #6b7280;
  padding: 40px 20px;
}

.admin-chat-error {
  color: #dc2626;
}

.admin-chat-conversation {
  margin-bottom: 20px;
}

.admin-chat-conversation:last-child {
  margin-bottom: 0;
}

.admin-chat-participants {
  padding: 8px 12px;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #374151;
  margin-bottom: 12px;
}

.admin-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-chat-no-messages {
  color: #9ca3af;
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
  padding: 12px;
}

.admin-chat-message {
  padding: 10px 12px;
  border-radius: 8px;
  max-width: 85%;
}

.admin-chat-message.customer {
  background: #e0e7ff;
  align-self: flex-start;
}

.admin-chat-message.driver {
  background: #d1fae5;
  align-self: flex-end;
}

.admin-chat-message.system {
  background: #f3f4f6;
  align-self: center;
  text-align: center;
  font-style: italic;
  color: #6b7280;
  max-width: 70%;
}

.admin-chat-message.system .admin-chat-sender {
  color: #9ca3af;
}

.admin-chat-input-container {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.admin-chat-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.admin-chat-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.admin-chat-send-btn {
  padding: 10px 20px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.admin-chat-send-btn:hover {
  background: #2563eb;
}

.admin-chat-send-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.admin-chat-user-link {
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
}

.admin-chat-user-link:hover {
  text-decoration: underline;
}

.admin-chat-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.admin-chat-sender {
  font-weight: 600;
  font-size: 0.8rem;
  color: #374151;
}

.admin-chat-time {
  font-size: 0.75rem;
  color: #6b7280;
}

.admin-chat-content {
  font-size: 0.9rem;
  color: #111827;
  line-height: 1.4;
  word-wrap: break-word;
}

.admin-chat-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.admin-chat-photo {
  max-width: 150px;
  max-height: 150px;
  border-radius: 6px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.15s;
}

.admin-chat-photo:hover {
  opacity: 0.85;
}

/* Admin Dashboard Mobile Responsiveness */
@media (max-width: 768px) {
  .admin-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 8px;
  }
  
  .admin-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .admin-tab {
    padding: 10px 12px;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .admin-tab-badge {
    min-width: 16px;
    height: 16px;
    font-size: 0.65rem;
    margin-left: 4px;
  }
  
  .admin-panel {
    padding: 12px;
  }
  
  .admin-users-filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .admin-search-input {
    min-width: 100%;
    max-width: 100%;
  }
  
  .admin-filter-select {
    width: 100%;
  }
  
  .admin-card {
    padding: 12px;
  }
  
  .admin-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .admin-card-avatars {
    flex-wrap: wrap;
  }
  
  .admin-card-info {
    width: 100%;
  }
  
  .admin-card-title {
    font-size: 0.95rem;
  }
  
  .admin-card-details {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .admin-card-actions {
    flex-direction: column;
  }
  
  .admin-action-btn {
    width: 100%;
    justify-content: center;
  }
  
  .admin-pagination {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }
  
  .admin-pagination-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  
  /* Financial cards mobile */
  .financial-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .financial-card {
    padding: 14px;
  }
  
  .financial-card-value {
    font-size: 1.4rem;
  }
  
  /* Admin stats mobile */
  .admin-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  
  .admin-stat-card {
    padding: 12px;
  }
  
  .admin-stat-value {
    font-size: 1.25rem;
  }
  
  /* Chat panel mobile */
  .admin-chat-panel {
    width: 100%;
    max-width: 100%;
  }
  
  .admin-chat-header {
    padding: 12px;
  }
  
  .admin-chat-header h2 {
    font-size: 1rem;
  }
  
  .admin-chat-body {
    padding: 12px;
  }
  
  /* Cancellation cards */
  .status-badge {
    margin-left: 0;
    margin-top: 8px;
  }
  
  .admin-card-bonus {
    margin-left: 0;
    margin-top: 8px;
  }
}

/* App Store Rating Prompt Modal */
.app-rating-panel {
  max-width: 360px;
  text-align: center;
}

.app-rating-content {
  padding: 20px 0;
}

.app-rating-text {
  font-size: 16px;
  color: #374151;
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.app-rating-subtext {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.app-rating-actions {
  justify-content: center;
  gap: 12px;
  padding-top: 10px;
}

.app-rating-never {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 13px;
  padding: 16px 0 8px 0;
  cursor: pointer;
  text-decoration: underline;
}

.app-rating-never:hover {
  color: #6b7280;
}

/* Referral Prompt Modal */
.referral-prompt-panel {
  max-width: 360px;
  text-align: center;
  padding: 24px;
  position: relative;
}

.referral-prompt-icon {
  margin-bottom: 16px;
}

.referral-prompt-title {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px 0;
}

.referral-prompt-message {
  font-size: 15px;
  color: #4b5563;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.referral-prompt-link-section {
  margin-bottom: 20px;
}

.referral-prompt-link-section .referral-link-container {
  margin-bottom: 0;
}

.referral-prompt-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.referral-prompt-actions .secondary-btn,
.referral-prompt-actions .primary-btn {
  flex: 1;
  max-width: 140px;
}

/* Own delivery notice in driver view */
.own-delivery-notice {
  color: #6b7280;
  font-style: italic;
  text-align: center;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  margin-top: 8px;
}

/* Forbidden Route Policy: Route validation alert */
.route-validation-alert {
  display: flex;
  gap: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0;
}

.route-validation-alert.hidden {
  display: none !important;
}

.route-alert-icon {
  flex-shrink: 0;
  padding-top: 2px;
}

.route-alert-content {
  flex: 1;
}

.route-alert-title {
  margin: 0 0 4px 0;
  font-weight: 600;
  font-size: 14px;
  color: #991b1b;
}

.route-alert-message {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #7f1d1d;
  line-height: 1.5;
}

.route-alert-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.route-learn-more {
  color: #dc2626;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

.route-learn-more:hover {
  color: #b91c1c;
}

.route-retry-btn {
  padding: 6px 12px;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.route-retry-btn:hover {
  background: #fecaca;
}

.route-retry-btn.hidden {
  display: none;
}

/* Route Policy Modal styles */
.route-policy-content {
  text-align: left;
  padding: 0 4px;
}

.route-policy-content p {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #374151;
}

.route-policy-subhead {
  font-weight: 600;
  color: #111827 !important;
  margin-top: 16px !important;
}

.route-policy-list {
  margin: 8px 0 16px 0;
  padding-left: 20px;
}

.route-policy-list li {
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 4px;
}

.route-policy-note {
  background: #f0fdf4;
  border-radius: 6px;
  padding: 12px;
  margin-top: 16px !important;
  color: #166534 !important;
  font-size: 13px !important;
}

/* Disabled submit button state for route blocking */
.book-submit-disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
}

/* Generic modal styles */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-top: calc(1rem + env(safe-area-inset-top, 0px));
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 50;
}

.admin-notes-modal-overlay {
  z-index: 300;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
  z-index: 1;
  max-height: calc(100vh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close-btn {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  line-height: 1;
  padding: 0;
}

.modal-close-btn:hover {
  color: #374151;
}

.modal-body {
  padding: 1.25rem;
}
