/* ====================================================
   MyBelvoy Design System
   ==================================================== */
:root {
  --primary:        #0E7C8A;
  --primary-hover:  #0A5C66;
  --primary-light:  #E3F1F2;
  --primary-border: #A9D6DA;
  --primary-dark:   #0A5C66;
  --accent: #2e7d4f;
  --accent-hover: #236040;
  --accent-light: #e6f4ec;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --warning-border: #fcd34d;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-light: #fef2f2;
  --danger-border: #fca5a5;
  --grey: #6b7280;
  --grey-light: #f3f4f6;
  --grey-border: #d1d5db;
  --text: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg: #f4f5f7;
  --card: #ffffff;
  --border: #e5e7eb;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  --shadow: 0 4px 16px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14), 0 4px 8px rgba(0,0,0,0.07);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --touch: 48px;
  --header-h: 80px;
  --nav-h: 60px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ====================================================
   Loading
   ==================================================== */
#initial-loading {
  display: flex; align-items: center; justify-content: center;
  height: 100vh; background: var(--bg);
}
.spinner-wrap { text-align: center; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--primary-border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
.brand-mark { font-size: 1.25rem; font-weight: 600; color: var(--primary); }
.brand-mark-logo { width: 200px; height: auto; display: block; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ====================================================
   Layout
   ==================================================== */
#app { display: flex; flex-direction: column; min-height: 100vh; }

/* Header */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: radial-gradient(ellipse 78% 200% at 18% 48%, #EEF6E8 0%, #C4EAE0 24%, #8AD2CE 44%, #4FB4BC 64%, #1F8F9A 84%, #0E6975 100%);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 12px rgba(10,92,102,0.3);
}
.header-logo {
  display: flex; align-items: center; gap: 12px;
  color: white; font-weight: 700; font-size: 1.2rem;
}
.header-logo .logo-icon { font-size: 1.5rem; }
.header-logo-img { height: 60px; width: auto; display: block; }
.header-right {
  display: flex; align-items: center; gap: 12px;
}
.header-user {
  color: rgba(255,255,255,0.9);
  font-size: 0.875rem; font-weight: 500;
  text-align: right;
}
.header-user .role-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  background: rgba(255,255,255,0.2);
  padding: 2px 8px; border-radius: 20px;
  margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-logout {
  background: rgba(255,255,255,0.15);
  color: white; font-size: 0.8rem; font-weight: 600;
  padding: 8px 14px; border-radius: var(--radius-sm);
  transition: background 0.2s;
  min-height: 36px;
}
.btn-logout:hover { background: rgba(255,255,255,0.25); }

/* Nav tabs */
.app-nav {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 99;
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex; overflow-x: auto;
  height: var(--nav-h);
  box-shadow: var(--shadow-xs);
  scrollbar-width: none;
}
.app-nav::-webkit-scrollbar { display: none; }
.nav-tab {
  flex: 1; min-width: 80px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
  padding: 8px 4px;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.nav-tab .nav-icon { color: #0E3949; font-size: 24px; }
.nav-tab.active { color: #0A4750; background: rgba(14,124,138,0.10); border-bottom-color: #0A5C66; }
.nav-tab.active .nav-icon { color: #F39627; }
.nav-tab:hover { color: var(--primary); background: var(--primary-light); }

/* Main content */
.main-content {
  margin-top: calc(var(--header-h) + var(--nav-h));
  flex: 1; padding: 16px;
  max-width: 800px; margin-left: auto; margin-right: auto;
  width: 100%;
}
.main-content.no-nav { margin-top: var(--header-h); }
.main-content.full-width { max-width: none; }

/* ====================================================
   Login Screen
   ==================================================== */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #0A5C66 0%, #0E7C8A 50%, #2AA6B0 100%);
  padding: 24px 16px;
}
.login-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 36px 28px 32px;
  width: 100%; max-width: 380px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  text-align: center; margin-bottom: 28px;
}
.login-logo .logo-icon { font-size: 3.5rem; display: block; margin-bottom: 8px; }
.login-logo-img { width: 200px; height: auto; display: block; margin: 0 auto 16px; }
.login-logo h1 {
  font-size: 1.8rem; font-weight: 700; color: var(--primary);
  letter-spacing: -0.5px;
}
.login-logo .tagline { font-size: 0.875rem; color: var(--text-muted); margin-top: 4px; }

.login-label { font-size: 0.875rem; font-weight: 600; color: var(--text); margin-bottom: 8px; display: block; }

.user-select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem; font-family: var(--font);
  color: var(--text);
  background: white;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  cursor: pointer;
  transition: border-color 0.2s;
  min-height: var(--touch);
}
.user-select:focus { outline: none; border-color: var(--primary); }

.pin-dots {
  display: flex; gap: 16px; justify-content: center; margin: 20px 0 16px;
}
.pin-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid var(--primary-border);
  background: transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.pin-dot.filled {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
}

.pin-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin: 0 0 20px;
}
.pin-btn {
  background: var(--grey-light);
  color: var(--text);
  font-size: 1.4rem; font-weight: 600;
  border-radius: var(--radius);
  height: 60px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.1s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.pin-btn:hover { background: var(--primary-light); }
.pin-btn:active { background: var(--primary); color: white; transform: scale(0.96); }
.pin-btn.action { font-size: 1rem; font-weight: 700; color: var(--primary); }
.pin-btn.action:active { background: var(--primary); color: white; }

.btn-login {
  width: 100%; height: 52px;
  background: var(--primary); color: white;
  font-size: 1rem; font-weight: 700;
  border-radius: var(--radius);
  transition: background 0.2s, opacity 0.2s;
  letter-spacing: 0.3px;
}
.btn-login:hover { background: var(--primary-hover); }
.btn-login:disabled { opacity: 0.5; cursor: not-allowed; }

.login-error {
  background: var(--danger-light); color: var(--danger);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: 0.875rem; font-weight: 500;
  margin-top: 12px; text-align: center;
}

/* ====================================================
   Cards
   ==================================================== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.card-body { padding: 20px; }
.card + .card { margin-top: 12px; }

/* ====================================================
   Trip Cards
   ==================================================== */
.trip-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.2s;
  margin-bottom: 16px;
  border: 2px solid transparent;
}
.trip-card:hover { box-shadow: var(--shadow); }

/* Status color themes — Official MyBelvoy Color System */
/* GREY #718096 = Scheduled */
.trip-card.status-scheduled {
  background: #f8f9fa;
  border-color: #718096;
}
/* GREEN #38a169 = En Route / Departed (moving, left Cogir) */
.trip-card.status-en_route {
  background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
  border-color: #38a169;
}
/* RED #e53e3e = Arriving (stopped, holding at destination) */
.trip-card.status-arriving {
  background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
  border-color: #e53e3e;
}
/* YELLOW #d69e2e = Waiting (parked outside, resident inside appointment) — SORT FIRST */
.trip-card.status-waiting {
  background: linear-gradient(135deg, #fffff0 0%, #fefcbf 100%);
  border-color: #d69e2e;
}
/* BLUE #3182ce = Returning (picked up, heading back to Cogir) */
.trip-card.status-returning {
  background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%);
  border-color: #3182ce;
}
/* LIGHT GREY #e2e8f0 = Completed */
.trip-card.status-completed {
  background: #e2e8f0;
  border-color: #cbd5e0;
  opacity: 0.75;
}

/* Collapsed tile — shown for arrived/waiting/returning/completed (Phase 2) */
.trip-card-collapsed {
  padding: 0;
  margin-bottom: 10px;
}
.collapsed-pax {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  font-weight: 700;
  -webkit-tap-highlight-color: rgba(0,0,0,0.08);
  user-select: none;
}
.collapsed-pax:active {
  transform: scale(0.985);
  filter: brightness(0.97);
}
.collapsed-pax + .collapsed-pax {
  border-top: 1px solid rgba(0,0,0,0.08);
}
.collapsed-pax-name {
  font-size: 1.05rem;
  color: #1a202c;
}
.collapsed-pax-status {
  font-size: 0.9rem;
  font-weight: 800;
}

.trip-card-header {
  padding: 16px 20px 12px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
}
.trip-status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.status-scheduled .trip-status-badge { background: #e2e8f0; color: #718096; }
.status-en_route .trip-status-badge { background: #c6f6d5; color: #276749; }
.status-arriving .trip-status-badge { background: #fed7d7; color: #c53030; }
.status-waiting .trip-status-badge { background: #fefcbf; color: #975a16; }
.status-returning .trip-status-badge { background: #bee3f8; color: #2c5282; }
.status-completed .trip-status-badge { background: #e2e8f0; color: #718096; }

.trip-vehicle-tag {
  font-size: 0.8rem; font-weight: 600; color: var(--grey);
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.7);
  padding: 4px 10px; border-radius: 20px;
}

/* Tappable destination block — replaces static text + separate navigate button */
.trip-dest-btn {
  display: block; width: 100%;
  padding: 12px 20px 10px;
  text-align: left; background: transparent;
  border-bottom: 1px solid rgba(42,92,170,0.1);
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.trip-dest-btn:hover, .trip-dest-btn:active {
  background: rgba(42,92,170,0.06);
}
.trip-dest-name {
  font-size: 1.15rem; font-weight: 800; color: var(--text);
  line-height: 1.3; margin-bottom: 2px;
}
.trip-dest-addr {
  font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; line-height: 1.3;
}
.trip-dest-nav-hint {
  font-size: 0.72rem; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 4px; opacity: 0.85;
}

/* Legacy — kept for any remaining references */
.trip-destination {
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  padding: 0 20px 8px;
  line-height: 1.3;
}

.trip-times {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  padding: 0 20px 12px;
}
.trip-time-item {
  font-size: 0.8rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.trip-time-item strong { color: var(--text); font-weight: 600; }

.trip-divider { height: 1px; background: rgba(0,0,0,0.06); margin: 0 20px; }

/* Countdown timer */
.countdown-timer {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 20px;
  font-size: 0.9rem; font-weight: 600; color: #92400e;
  background: rgba(254,249,195,0.8);
}
.countdown-timer .timer-value { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ====================================================
   Passenger Rows
   ==================================================== */
.passengers-section { padding: 12px 0; }
.passenger-row {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.passenger-row:last-child { border-bottom: none; }
.passenger-info {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.passenger-name {
  font-size: 0.95rem; font-weight: 700; color: var(--text);
}
.passenger-room { font-size: 0.8rem; color: var(--text-muted); }
.passenger-meta {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.mobility-badge {
  font-size: 0.75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  background: var(--grey-light); color: var(--grey);
}
.mobility-badge.walker { background: #fef3c7; color: #92400e; }
.mobility-badge.wheelchair { background: #ede9fe; color: #5b21b6; }
.family-badge {
  font-size: 0.75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary);
}
.phone-link {
  font-size: 0.8rem; color: var(--primary); font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
  text-decoration: none;
}

.status-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.status-btn {
  height: var(--touch); min-height: var(--touch);
  font-size: 0.78rem; font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: white;
  color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  transition: all 0.15s;
  padding: 4px;
  -webkit-tap-highlight-color: transparent;
}
.status-btn .btn-icon { font-size: 1rem; }
.status-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.status-btn.active {
  background: var(--primary); border-color: var(--primary);
  color: white; box-shadow: 0 2px 8px rgba(42,92,170,0.35);
}
.status-btn:disabled { cursor: not-allowed; }
.status-btn.past { opacity: 0.3; }
.status-btn.locked { opacity: 0.25; }

/* "Released" — full-size status button beside Arrived: resident returning on their own.
   Purple + arrow icon signals it ends the trip (pops them out of the queue). */
.status-btn-release {
  border-color: #6D5BD0;
  background: #6D5BD0;
  color: white;
}
.status-btn-release .btn-icon { color: white; }
.status-btn-release:hover { background: #5A49B8; border-color: #5A49B8; color: white; }
.status-btn-release:active { transform: scale(0.96); }
.collapsed-pax-released { opacity: 0.7; }
.collapsed-pax-released .collapsed-pax-status { color: #6D5BD0; font-weight: 700; }

/* Collapsed card destination header — facility name + full address, selectable */
.collapsed-dest-header {
  padding: 10px 18px 6px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}
.collapsed-dest-name {
  display: block;
  font-size: 0.9rem; font-weight: 700; color: var(--text);
  line-height: 1.3;
}
.collapsed-dest-addr {
  display: block;
  font-size: 0.78rem; color: var(--text-muted);
  line-height: 1.4;
  user-select: text;
  -webkit-user-select: text;
}

/* Undo button — appears next to status buttons for 30 seconds */
.status-undo-btn {
  height: var(--touch); min-height: var(--touch);
  padding: 4px 10px;
  font-size: 0.78rem; font-weight: 700;
  border-radius: var(--radius-sm);
  border: 2px solid #f59e0b;
  background: #fffbeb; color: #92400e;
  display: flex; align-items: center; gap: 5px;
  animation: undo-pop 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.status-undo-btn:hover { background: #fef3c7; border-color: #d97706; }
.undo-countdown { font-size: 0.7rem; font-weight: 400; color: #b45309; min-width: 24px; }
@keyframes undo-pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Fix Status link — small, below status buttons, admin/scheduler only */
.fix-status-row { margin-top: 6px; }
.fix-status-link {
  font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
  background: none; border: none; cursor: pointer;
  padding: 2px 4px; text-decoration: underline; text-underline-offset: 2px;
  opacity: 0.6;
}
.fix-status-link:hover { opacity: 1; color: var(--primary); }

/* Correction log link — bottom of trip card */
.trip-corrections-row {
  padding: 8px 20px 12px;
  border-top: 1px solid rgba(0,0,0,0.04);
}
.trip-corrections-link {
  font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
  background: none; border: none; cursor: pointer;
  padding: 2px 0; opacity: 0.55;
}
.trip-corrections-link:hover { opacity: 1; color: var(--primary); }

/* ====================================================
   Delay Alert Buttons
   ==================================================== */
.delay-section {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.delay-section-title {
  font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.delay-buttons {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn-delay {
  height: 64px; min-height: 64px;
  background: var(--warning-light); border: 2px solid var(--warning-border);
  color: var(--warning); font-size: 0.875rem; font-weight: 700;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  line-height: 1.3; padding: 4px 8px;
}
.btn-delay:hover { background: #fef0c7; border-color: var(--warning); }
.btn-delay.danger { background: var(--danger-light); border-color: var(--danger-border); color: var(--danger); }
.btn-delay.danger:hover { background: #fde8e8; border-color: var(--danger); }

/* Driver quick-alert bar (top of driver dashboard) */
.driver-alert-bar {
  background: white; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 8px 12px; margin-bottom: 12px;
  border: 1.5px solid #fcd34d;
  display: flex; align-items: center; gap: 8px;
}
.driver-alert-bar-title {
  font-size: 0.65rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.4px;
  white-space: nowrap; flex-shrink: 0;
}
.driver-alert-btns {
  display: flex; flex-direction: row; gap: 6px; flex: 1; min-width: 0;
}
.btn-alert-driver {
  flex: 1; height: 36px; min-height: 36px;
  background: var(--warning-light); border: 1.5px solid var(--warning-border);
  color: #92400e; font-size: 0.72rem; font-weight: 700;
  border-radius: var(--radius-sm); line-height: 1.2; padding: 0 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: all 0.12s; -webkit-tap-highlight-color: transparent;
}
.btn-alert-driver:hover, .btn-alert-driver:active {
  background: #fef0c7; border-color: var(--warning); transform: scale(0.98);
}
.btn-alert-driver.danger {
  background: var(--danger-light); border-color: var(--danger-border); color: var(--danger);
}
.btn-alert-driver.danger:hover, .btn-alert-driver.danger:active {
  background: #fde8e8; border-color: var(--danger);
}

/* Color-coded passenger status buttons */
.status-btn[data-status="departed"].active,
.status-btn[data-status="picked_up"].active {
  background: #38a169; border-color: #38a169; color: white;
  box-shadow: 0 2px 8px rgba(56,161,105,0.35);
}
.status-btn[data-status="arrived"].active {
  background: #e53e3e; border-color: #e53e3e; color: white;
  box-shadow: 0 2px 8px rgba(229,62,62,0.35);
}
.status-btn[data-status="waiting"].active {
  background: #d69e2e; border-color: #d69e2e; color: white;
  box-shadow: 0 2px 8px rgba(214,158,46,0.35);
}
.status-btn[data-status="returned"].active {
  background: #e2e8f0; border-color: #a0aec0; color: #4a5568;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Navigate button on trip card */
.btn-navigate {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: var(--touch);
  padding: 10px 20px;
  background: var(--primary-light); color: var(--primary);
  font-size: 0.875rem; font-weight: 700;
  border-top: 1px solid rgba(42,92,170,0.12);
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn-navigate:hover, .btn-navigate:active { background: var(--primary); color: white; }

/* Navigation choice modal */
.nav-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.nav-modal-sheet {
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
  width: 100%; max-width: 480px;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-modal-label {
  font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  text-align: center; margin-bottom: 6px;
}
.nav-modal-dest {
  font-size: 1rem; font-weight: 700; color: var(--text);
  text-align: center; margin-bottom: 20px; line-height: 1.4;
}
.nav-option-btn {
  width: 100%; height: 64px; min-height: 64px;
  background: var(--grey-light); border-radius: var(--radius);
  font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 10px; transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.nav-option-btn:hover, .nav-option-btn:active { background: var(--primary-light); color: var(--primary); }
.nav-recommended {
  font-size: 0.65rem; font-weight: 800;
  background: var(--accent); color: white;
  padding: 2px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.nav-cancel-btn {
  width: 100%; height: 52px;
  color: var(--grey); font-size: 0.95rem; font-weight: 600;
  margin-top: 4px;
}
.nav-stop-item {
  font-size: 0.88rem; font-weight: 600; color: var(--text);
  text-align: center; padding: 3px 0; line-height: 1.4;
}
.nav-single-label {
  font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.4px;
  text-align: center; margin: 10px 0 4px;
}
.nav-option-single { height: 48px; font-size: 0.88rem; }
.passenger-dest {
  font-size: 0.75rem; color: var(--primary); font-weight: 600;
  margin: 2px 0 3px;
}

/* ====================================================
   Conflict Tier Indicators
   ==================================================== */
.conflict-indicator {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 20px;
  font-size: 0.78rem; font-weight: 700;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.conflict-green  { background: #f0fff4; color: #276749; }
.conflict-yellow { background: #fffff0; color: #975a16; }
.conflict-orange { background: #fff8f0; color: #c05621; }
.conflict-red    { background: #fff5f5; color: #c53030; border-top: 2px solid #e53e3e; }

/* ====================================================
   Driver Day Timeline (Scheduler Dashboard)
   ==================================================== */
.driver-timeline {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-xs); padding: 14px 16px;
  margin-bottom: 16px; overflow: visible;
}
.driver-timeline-title {
  font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px;
}
.timeline-axis {
  position: relative; height: 18px;
  margin-left: 80px; border-left: 1px solid var(--border);
  margin-bottom: 6px;
}
.timeline-tick {
  position: absolute; font-size: 0.62rem; color: var(--text-muted);
  transform: translateX(-50%); white-space: nowrap; user-select: none;
}
.timeline-row {
  display: flex; align-items: center; margin-bottom: 6px;
}
.timeline-label {
  width: 80px; min-width: 80px; font-size: 0.72rem; font-weight: 600;
  color: var(--text); padding-right: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.timeline-bar {
  flex: 1; height: 24px; background: #f1f3f5;
  border-radius: 4px; position: relative; overflow: visible;
}
.timeline-block {
  position: absolute; height: 100%; border-radius: 3px;
  opacity: 0.88; min-width: 6px; cursor: default;
  transition: opacity 0.15s;
}
.timeline-block:hover { opacity: 1; z-index: 10; }
.timeline-gap {
  position: absolute; top: 0; height: 100%; opacity: 0.25;
  border-radius: 3px; pointer-events: none;
}

/* Same-day schedule panel in trip form */
.same-day-trip {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.same-day-trip:last-child { border-bottom: none; }
.same-day-trip.group-opportunity {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}
.group-opp-badge {
  font-size: 0.75rem; font-weight: 700; color: #166534;
  background: #dcfce7; border: 1px solid #86efac;
  padding: 3px 10px; border-radius: 20px;
  margin-bottom: 6px; display: inline-block;
}
.same-day-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px;
}
.same-day-time { font-weight: 700; font-size: 0.9rem; color: var(--primary); }
.same-day-dest { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.same-day-meta { font-size: 0.8rem; color: var(--text-muted); }
.btn-join-trip {
  margin-top: 8px;
  background: var(--primary); color: white;
  font-size: 0.8rem; font-weight: 700;
  padding: 8px 16px; border-radius: var(--radius-sm);
  min-height: var(--touch);
  transition: background 0.2s;
}
.btn-join-trip:hover { background: var(--primary-hover); }

/* ====================================================
   Alert Banner
   ==================================================== */
#alert-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: var(--danger);
  color: white; font-weight: 600;
  padding: 0;
  box-shadow: 0 4px 16px rgba(220,38,38,0.4);
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#alert-banner.visible {
  transform: translateY(0);
}
#alert-banner.hidden { display: none; }
.alert-banner-content {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; max-width: 800px; margin: 0 auto;
}
.alert-banner-text { flex: 1; font-size: 0.9rem; }
.alert-banner-text strong { display: block; font-size: 1rem; }
.btn-dismiss-alert {
  background: rgba(255,255,255,0.2); color: white;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 700;
  flex-shrink: 0;
  min-height: var(--touch);
}
.btn-dismiss-alert:hover { background: rgba(255,255,255,0.3); }

/* ====================================================
   Dashboard Sections
   ==================================================== */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-size: 1.05rem; font-weight: 700; color: var(--text);
}
.section-subtitle { font-size: 0.85rem; color: var(--text-muted); }

.on-call-banner {
  background: var(--accent-light);
  border: 1.5px solid #a7d7bc;
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.on-call-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,125,79,0.2);
  flex-shrink: 0;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(46,125,79,0.2); }
  50% { box-shadow: 0 0 0 6px rgba(46,125,79,0.1); }
}
.on-call-text { font-size: 0.875rem; font-weight: 600; color: var(--accent); }

.date-nav {
  display: flex; align-items: center; gap: 8px;
}
.date-nav input[type="date"] {
  padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.875rem; color: var(--text);
  background: white; height: var(--touch);
}

/* ====================================================
   Backup Driver On-Call Toggle
   ==================================================== */
.oncall-screen {
  padding: 24px 16px; text-align: center;
}
.oncall-hero {
  padding: 32px 0;
}
.oncall-hero h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.oncall-hero p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 28px; }
.btn-oncall {
  width: 180px; height: 180px;
  border-radius: 50%;
  font-size: 1rem; font-weight: 800;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  margin: 0 auto 24px;
  border: 4px solid;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow);
}
.btn-oncall .oncall-icon { font-size: 2.5rem; }
.btn-oncall.off {
  background: var(--grey-light); border-color: var(--grey-border); color: var(--grey);
}
.btn-oncall.on {
  background: var(--accent-light); border-color: var(--accent); color: var(--accent);
  box-shadow: 0 8px 32px rgba(46,125,79,0.25);
}
.btn-oncall:active { transform: scale(0.95); }
.oncall-status-text {
  font-size: 1.1rem; font-weight: 700;
  padding: 10px 24px; border-radius: 24px; display: inline-block;
}
.oncall-status-text.on { background: var(--accent-light); color: var(--accent); }
.oncall-status-text.off { background: var(--grey-light); color: var(--grey); }

/* ====================================================
   Schedule Trip Form
   ==================================================== */
.trip-form { }
.form-section {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  overflow: visible;
}
.form-section > .form-section-header {
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.form-section-header {
  padding: 14px 20px;
  background: var(--grey-light);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted);
}
.form-section-body { padding: 20px; }
.form-row { margin-bottom: 16px; }
.form-row:last-child { margin-bottom: 0; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

.field-label {
  display: block; font-size: 0.8rem; font-weight: 700;
  color: var(--text); margin-bottom: 6px; letter-spacing: 0.2px;
}
.field-label .required { color: var(--danger); margin-left: 2px; }

.field-input {
  width: 100%; padding: 12px 14px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.95rem; color: var(--text);
  background: white;
  transition: border-color 0.2s;
  min-height: var(--touch);
}
.field-input:focus { outline: none; border-color: var(--primary); }
.field-input.error { border-color: var(--danger); }

.field-select {
  width: 100%; padding: 12px 36px 12px 14px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.95rem; color: var(--text);
  background: white;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  cursor: pointer;
  transition: border-color 0.2s;
  min-height: var(--touch);
}
.field-select:focus { outline: none; border-color: var(--primary); }

.field-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.field-error { font-size: 0.75rem; color: var(--danger); margin-top: 4px; font-weight: 600; }

/* Vehicle cards */
.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.vehicle-card {
  border: 2.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  background: white;
}
.vehicle-card:hover { border-color: var(--primary); background: var(--primary-light); }
.vehicle-card.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 3px rgba(14,124,138,0.15); }
.vehicle-card.unavailable { opacity: 0.4; cursor: not-allowed; }
.vehicle-card--blocked { border-color: var(--danger) !important; background: var(--danger-light) !important; }
.vehicle-warn { font-size: 0.7rem; color: var(--danger); font-weight: 600; margin-top: 4px; line-height: 1.3; }
.vehicle-icon { font-size: 2rem; margin-bottom: 6px; }
.vehicle-name { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.vehicle-capacity { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.vehicle-detail-line { font-size: 0.7rem; color: var(--text-muted); margin-top: 3px; line-height: 1.3; }
.vehicle-reg-line { font-size: 0.7rem; color: var(--text-muted); margin-top: 3px; }
.vehicle-reg-warn { color: var(--warning-dark, #92400e); font-weight: 600; }
.reg-expiry-warn { color: #b45309; font-weight: 600; }
.reg-expiry-ok   { color: var(--text-muted); }
.capacity-bar {
  height: 4px; border-radius: 2px; background: var(--border);
  margin-top: 6px; overflow: hidden;
}
.capacity-fill {
  height: 100%; border-radius: 2px; background: var(--accent);
  transition: width 0.3s, background 0.3s;
}
.capacity-fill.warn { background: var(--warning); }
.capacity-fill.full { background: var(--danger); }

/* Departure info box */
.departure-box {
  background: var(--primary-light);
  border: 1.5px solid var(--primary-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 4px;
}
.departure-box .dep-label { font-size: 0.75rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; }
.departure-box .dep-time { font-size: 1.4rem; font-weight: 800; color: var(--primary); margin: 2px 0; }
.departure-box .dep-detail { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.dep-override-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; }
.dep-nudge-btn {
  background: var(--primary); color: #fff; border: none; border-radius: 6px;
  padding: 6px 12px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
}
.dep-nudge-btn:hover { background: var(--primary-dark, #1a5276); }
.dep-time-input {
  flex: 1; min-width: 0; font-size: 1.2rem; font-weight: 700; color: var(--primary);
  border: 1.5px solid var(--primary-border); border-radius: 6px; padding: 5px 8px;
  background: #fff; text-align: center;
}
.dep-calc-ref { font-size: 0.78rem; color: var(--text-muted); font-style: italic; margin-bottom: 4px; }
.dep-calc-ref.hidden { display: none; }

/* Passenger search */
.passenger-search-wrap { position: relative; }
.search-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 300;
  background: white; border: 2px solid var(--primary);
  border-top: none; border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  max-height: 240px; overflow-y: auto;
}
.search-item {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--primary-light); }
.search-item-name { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.search-item-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.search-room-badge {
  display: inline-block; background: var(--primary); color: #fff;
  border-radius: 4px; padding: 1px 6px; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.02em; margin-right: 2px;
}
.search-item.add-new {
  background: var(--accent-light); color: var(--accent);
  font-weight: 700;
}

/* ── Passenger registration cards ─────────────────────────── */
.passenger-chips { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.passenger-chip {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.pax-chip-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.passenger-chip-info { min-width: 0; }
.passenger-chip-name { font-size: 0.95rem; font-weight: 700; color: var(--text); flex: 1; }
.pax-new-badge {
  font-size: 0.68rem; font-weight: 700; padding: 2px 7px;
  background: #fef3c7; color: #92400e; border-radius: 10px;
  border: 1px solid #fcd34d; white-space: nowrap;
}

/* Fields grid */
.pax-fields { display: flex; flex-direction: column; gap: 8px; }
.pax-field-row { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.pax-concierge-row { margin-top: -4px; }
.pax-field-label {
  font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
  min-width: 90px; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.04em;
}
.pax-field-input {
  flex: 1; height: 36px; padding: 0 10px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.88rem; color: var(--text); background: var(--grey-light);
  min-width: 0;
}
.pax-field-input:focus { border-color: var(--primary); outline: none; background: #fff; }
.pax-name-input { font-weight: 600; }

/* Button group selectors (Wing, Aid, Transfer) */
.pax-btn-group { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.pax-btn {
  height: 34px; padding: 0 12px; border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 600; border: 1.5px solid var(--border);
  background: var(--grey-light); color: var(--text-muted);
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.pax-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.pax-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Divider between main and family sections */
.pax-divider { border: none; border-top: 1px dashed var(--border); margin: 4px 0; }

/* Legacy classes kept for trip card passenger rows */
.passenger-chip-room { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.room-label {
  background: var(--primary); color: #fff;
  border-radius: 4px; padding: 1px 6px; font-size: 0.68rem; font-weight: 700;
}
.passenger-chip-meta { font-size: 0.75rem; color: var(--text-muted); }
.passenger-chip-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.chip-toggle {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; font-weight: 500; color: var(--text-muted);
  cursor: pointer;
}
.chip-toggle input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
.btn-remove-pax {
  background: var(--danger-light); color: var(--danger);
  border-radius: var(--radius-sm); padding: 6px 10px;
  font-size: 0.8rem; font-weight: 700;
  min-height: 36px;
}

/* Buffer buttons */
.buffer-btns { display: flex; gap: 8px; }
.buffer-btn {
  flex: 1; height: var(--touch);
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: white; font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
  transition: all 0.15s;
}
.buffer-btn.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.buffer-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ====================================================
   Buttons
   ==================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; min-height: var(--touch);
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 700;
  transition: all 0.15s;
  cursor: pointer; font-family: var(--font);
  border: 2px solid transparent;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: white; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary-light); }
.btn-success { background: var(--accent); color: white; }
.btn-success:hover { background: var(--accent-hover); }
.btn-danger { background: var(--danger-light); color: var(--danger); border-color: var(--danger-border); }
.btn-danger:hover { background: #fde8e8; }
.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--grey-light); }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 14px; min-height: 36px; font-size: 0.8rem; }
.btn-lg { padding: 16px 28px; min-height: 56px; font-size: 1rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1.5px solid; background: none; padding: 0;
  font-size: 18px; flex-shrink: 0;
  transition: background 0.15s;
}
.icon-btn-edit    { color: #0E7C8A; border-color: #A9D6DA; }
.icon-btn-edit:hover    { background: #E3F1F2; }
.icon-btn-trash   { color: #A32D2D; border-color: #fca5a5; }
.icon-btn-trash:hover   { background: #fef2f2; }
.icon-btn-archive { color: var(--warning); border-color: var(--warning-border); }
.icon-btn-archive:hover { background: var(--warning-light); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ====================================================
   Tables
   ==================================================== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 14px; background: var(--grey-light); border-bottom: 1px solid var(--border); }
td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 0.875rem; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--grey-light); }

/* ====================================================
   Badges / Tags
   ==================================================== */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 20px; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--accent-light); color: var(--accent); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-grey { background: var(--grey-light); color: var(--grey); }

/* ====================================================
   Admin Panel
   ==================================================== */
.admin-tabs {
  display: flex; gap: 4px;
  background: var(--grey-light); padding: 4px;
  border-radius: var(--radius); margin-bottom: 16px;
  overflow-x: auto;
}
.admin-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.15s;
  min-height: var(--touch);
}
.admin-tab.active { background: white; color: var(--primary); box-shadow: var(--shadow-xs); }
.admin-tab:hover:not(.active) { color: var(--text); }
.admin-tab .admin-tab-icon { color: #0E3949; font-size: 18px; }
.admin-tab.active .admin-tab-icon { color: #F39627; }
.directory-sub-tab {
  border-radius: 8px 8px 0 0;
  border-bottom: none;
}
/* ============================================================
   MULTI-SELECT BULK DELETE
   ============================================================ */
.ms-cb {
  width: 18px; height: 18px; cursor: pointer;
  accent-color: #e53e3e; flex-shrink: 0;
  vertical-align: middle;
}
.ms-row.ms-selected { background: rgba(229, 62, 62, 0.07) !important; }
.ms-row.ms-selected td { background: transparent !important; }
.ms-toolbar {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: #1f2937; color: #f9fafb;
  border-radius: 14px; padding: 12px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  z-index: 600; font-size: 0.88rem; white-space: nowrap;
  transition: opacity 0.18s, transform 0.18s;
}
.ms-toolbar.hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(16px); }
.ms-count { font-weight: 700; }
.ms-toolbar-delete {
  background: #ef4444; color: white; border: none;
  border-radius: 8px; padding: 7px 14px;
  cursor: pointer; font-size: 0.82rem; font-weight: 600;
  transition: background 0.12s;
}
.ms-toolbar-delete:hover { background: #dc2626; }
.ms-toolbar-clear {
  background: transparent; color: #9ca3af; border: none;
  cursor: pointer; font-size: 1.1rem; padding: 2px 4px; line-height: 1;
}
.ms-toolbar-clear:hover { color: #f9fafb; }
.ms-select-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.82rem; color: #6b7280; font-weight: 500;
}

.dest-group-sublabel {
  padding: 2px 14px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-inline {
  background: var(--primary-light);
  border: 1.5px solid var(--primary-border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.form-inline h4 { font-size: 0.9rem; font-weight: 700; color: var(--primary); margin-bottom: 12px; }

/* ====================================================
   Modal
   ==================================================== */
#modal-overlay, #quick-add-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(4px);
}
#modal-overlay.hidden, #quick-add-overlay.hidden { display: none; }
#modal-box, #quick-add-box {
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%; max-width: 700px;
  max-height: 85vh; overflow-y: auto;
  padding: 24px 20px 32px;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@media (min-width: 600px) {
  #modal-overlay, #quick-add-overlay { align-items: center; }
  #modal-box, #quick-add-box { border-radius: var(--radius-xl); max-height: 80vh; }
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }

/* ====================================================
   Empty state
   ==================================================== */
.empty-state {
  text-align: center; padding: 48px 24px;
}
.empty-state .empty-icon { font-size: 3rem; display: block; margin-bottom: 12px; opacity: 0.5; }
.empty-state h3 { font-size: 1rem; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.empty-state p { font-size: 0.875rem; color: var(--text-light); }

/* ====================================================
   Toggle switch
   ==================================================== */
.toggle-wrap { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle {
  width: 48px; height: 28px; border-radius: 14px;
  background: var(--grey-border); position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle.on { background: var(--accent); }
.toggle::after {
  content: ''; position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: white; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: left 0.2s;
}
.toggle.on::after { left: 23px; }
.toggle-label { font-size: 0.875rem; font-weight: 600; }

/* ====================================================
   Reminder info cards
   ==================================================== */
.reminder-sent { color: var(--accent); font-size: 0.75rem; font-weight: 700; }
.reminder-pending { color: var(--text-muted); font-size: 0.75rem; }

/* ====================================================
   Helpers
   ==================================================== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--accent); }
.text-primary { color: var(--primary); }
.font-bold { font-weight: 700; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

/* Responsive */
@media (min-width: 640px) {
  .main-content { padding: 24px; }
  .status-buttons { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 400px) {
  .form-row-2 { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
}

/* Room number */
.field-room {
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0.04em;
  border: 2px solid var(--primary); color: var(--primary);
  max-width: 160px;
}
.field-note {
  font-size: 0.72rem; font-weight: 400; color: var(--text-muted);
  margin-left: 4px;
}
.room-badge {
  display: inline-block; background: var(--primary-light); color: var(--primary);
  border: 1px solid var(--primary); border-radius: 4px;
  padding: 2px 8px; font-size: 0.8rem; font-weight: 700;
}
.room-history { margin-top: 10px; padding: 10px 12px; background: var(--grey-light); border-radius: var(--radius-sm); }
.room-history-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 0.8rem; }
.room-history-meta { color: var(--text-muted); font-size: 0.75rem; }
.resident-row:hover td { background: var(--primary-light); }
.family-flag {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.75rem; font-weight: 500; margin-top: 3px;
}
.family-flag--yes { color: var(--accent); }
.family-flag--no  { color: var(--text-muted); }
.family-flag-box  { font-size: 1rem; line-height: 1; }
.btn-danger {
  background: var(--danger-light); color: var(--danger);
  border: 1.5px solid var(--danger); border-radius: var(--radius-sm);
  padding: 0 16px; min-height: var(--touch); font-weight: 700; font-size: 0.9rem;
}

/* ====================================================
   Driver Upcoming Schedule View
   ==================================================== */
.upcoming-day-section { margin-bottom: 20px; }
.upcoming-day-header {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  padding: 6px 4px 8px; border-bottom: 2px solid var(--border);
  margin-bottom: 10px;
}
.upcoming-trip-card {
  background: var(--card); border-radius: var(--radius);
  border: 1.5px solid var(--border); padding: 14px 16px;
  margin-bottom: 10px; box-shadow: var(--shadow-xs);
}
.upcoming-trip-destination {
  font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 6px;
}
.upcoming-trip-times {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px;
}
.upcoming-trip-times strong { color: var(--text); }
.upcoming-trip-passengers { display: flex; flex-direction: column; gap: 4px; }
.upcoming-pax-row { font-size: 0.875rem; color: var(--text); }

.dest-group-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); padding: 6px 12px 2px;
}
.dest-dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }
.freq-badge {
  display: inline-block; background: var(--accent-light); color: var(--accent);
  border-radius: 4px; font-size: 0.7rem; font-weight: 700; padding: 1px 6px;
}

/* ====================================================
   Medical Destinations Admin Tab
   ==================================================== */
.medical-cat-section {
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.medical-cat-section:last-child { border-bottom: none; }
.medical-cat-header {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-muted);
  padding: 8px 16px 4px; background: var(--grey-light);
}
.medical-dest-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.medical-dest-row:last-child { border-bottom: none; }
.medical-dest-name { font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.medical-dest-addr { font-size: 0.78rem; color: var(--text-muted); }

/* Medical preview (import modal) */
.medical-preview-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 16px; cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.15s;
}
.medical-preview-row:hover { background: var(--primary-light); }
.medical-preview-row.already-saved { opacity: 0.65; }
.medical-preview-info { flex: 1; }
.already-saved-badge {
  display: inline-block; font-size: 0.65rem; font-weight: 700;
  background: var(--grey-light); color: var(--grey); border-radius: 20px;
  padding: 1px 7px; margin-left: 6px;
}

/* Distance badge (used in dropdown and medical tab) */
.dist-badge {
  display: inline-block; background: var(--primary-light); color: var(--primary);
  border-radius: 4px; font-size: 0.7rem; font-weight: 700; padding: 1px 6px;
  margin-left: 4px;
}

.tag-badge {
  display: inline-block; font-size: 0.65rem; font-weight: 700;
  border-radius: 20px; padding: 1px 7px; margin-left: 5px;
}
.tag-accessible { background: #d1fae5; color: #065f46; }

/* ====================================================
   SCHEDULER CALENDAR
   ==================================================== */
.cal-wrap { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.cal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.cal-month-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.cal-nav-btn { background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 14px; font-size: 0.9rem; cursor: pointer; color: var(--text); transition: all 0.12s; }
.cal-nav-btn:hover { background: var(--grey-light); }
.cal-body { display: flex; min-height: 380px; }
.cal-grid-wrap { flex: 1; display: flex; flex-direction: column; border-right: 1px solid var(--border); min-width: 0; }
.cal-day-headers { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--grey-light); border-bottom: 1px solid var(--border); }
.cal-day-hdr { text-align: center; font-size: 0.68rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; padding: 7px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(6, 1fr); flex: 1; }
.cal-day { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 5px 7px; cursor: pointer; transition: background 0.1s; display: flex; flex-direction: column; gap: 3px; min-height: 64px; }
.cal-day:nth-child(7n) { border-right: none; }
.cal-day:hover { background: var(--primary-light); }
.cal-day.out-of-month { background: #fafafa; }
.cal-day.out-of-month .cal-day-num { color: #c0c4cc; }
.cal-day.today .cal-day-num { background: var(--primary); color: white; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; }
.cal-day.selected { background: var(--primary-light); outline: 2px solid var(--primary); outline-offset: -2px; }
.cal-day-num { font-size: 0.8rem; font-weight: 600; color: var(--text); line-height: 1.6; }
.cal-badges { display: flex; flex-direction: column; gap: 2px; }
.cal-badge { font-size: 0.6rem; font-weight: 700; border-radius: 4px; padding: 1px 4px; display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-badge.badge-default { background: var(--primary-light); color: var(--primary); }
.cal-badge.badge-unassigned { background: #fef3c7; color: #92400e; }
.cal-badge.badge-waiting { background: #fefcbf; color: #92400e; }
.cal-badge.badge-arriving { background: #fed7d7; color: #c53030; }

/* Calendar day panel */
.cal-day-panel { width: 260px; min-width: 260px; display: flex; flex-direction: column; }
.cal-panel-header { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.cal-panel-date { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.cal-panel-subtitle { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.cal-panel-trips { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.cal-panel-empty { padding: 20px 12px; text-align: center; color: var(--text-muted); font-size: 0.82rem; }
.cal-trip-row { background: var(--grey-light); border-radius: var(--radius-sm); padding: 7px 10px; cursor: pointer; transition: background 0.1s; border-left: 3px solid var(--border); }
.cal-trip-row:hover { background: var(--primary-light); }
.cal-trip-row.status-waiting { border-left-color: #d69e2e; }
.cal-trip-row.status-arriving { border-left-color: #e53e3e; }
.cal-trip-row.status-en_route { border-left-color: #38a169; }
.cal-trip-row.status-returning { border-left-color: #3182ce; }
.cal-trip-row.status-scheduled { border-left-color: #a0aec0; }
.cal-trip-row-dest { font-size: 0.8rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-trip-row-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.cal-panel-new-btn { padding: 8px; border-top: 1px solid var(--border); }

/* ====================================================
   DRIVER CALENDAR
   ==================================================== */
.driver-cal { display: flex; flex-direction: column; gap: 10px; }
.driver-cal-day { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.driver-cal-day.today .driver-cal-day-header { background: var(--primary); color: white; }
.driver-cal-day.empty .driver-cal-day-header { background: var(--grey-light); color: var(--text-muted); }
.driver-cal-day-header { padding: 9px 14px; font-size: 0.82rem; font-weight: 700; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: space-between; }
.driver-cal-day-no-trips { padding: 10px 14px; font-size: 0.8rem; color: var(--text-light); font-style: italic; }
.driver-cal-trip { padding: 9px 12px; border-top: 1px solid var(--border); cursor: pointer; transition: background 0.1s; border-left: 4px solid transparent; display: flex; flex-direction: column; gap: 3px; }
.driver-cal-trip:hover { background: var(--primary-light); }
.driver-cal-trip.status-waiting { border-left-color: #d69e2e; background: #fffff0; }
.driver-cal-trip.status-arriving { border-left-color: #e53e3e; background: #fff5f5; }
.driver-cal-trip.status-en_route { border-left-color: #38a169; background: #f0fff4; }
.driver-cal-trip.status-returning { border-left-color: #3182ce; background: #ebf8ff; }
.driver-cal-trip.status-scheduled { border-left-color: #a0aec0; }
.driver-cal-trip-dest { font-size: 0.86rem; font-weight: 600; color: var(--text); }
.driver-cal-trip-time { font-size: 0.76rem; color: var(--text-muted); }
.driver-cal-trip-pax { font-size: 0.72rem; color: var(--text-light); }

/* ====================================================
   DRIVER FLOATING TIMELINE BAR
   ==================================================== */
.driver-float-bar {
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--header-h) + var(--nav-h));
  z-index: 50;
  background: white;
  border-bottom: 2px solid var(--border);
  border-top: 3px solid var(--primary);
  box-shadow: 0 3px 10px rgba(0,0,0,0.10);
  padding: 9px 14px;
  margin: -16px -16px 14px -16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.driver-float-label {
  min-width: 60px;
  flex-shrink: 0;
}
.driver-float-name {
  font-size: 0.72rem; font-weight: 700; color: var(--text); line-height: 1.2;
}
.driver-float-date {
  font-size: 0.62rem; color: var(--text-muted);
}
.driver-float-timeline {
  flex: 1; height: 34px; background: #f1f3f5; border-radius: 6px; position: relative; overflow: visible;
}
.driver-float-block {
  position: absolute; top: 0; height: 100%; border-radius: 4px; cursor: pointer;
  opacity: 0.88; min-width: 8px; transition: opacity 0.12s, transform 0.12s;
  display: flex; align-items: center; overflow: hidden; z-index: 1;
}
.driver-float-block:hover { opacity: 1; transform: scaleY(1.1); z-index: 5; }
.driver-float-block-label {
  font-size: 0.56rem; font-weight: 700; color: white; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; padding: 0 5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.driver-float-gap {
  position: absolute; top: 0; height: 100%; border-radius: 4px; pointer-events: none;
}
.driver-float-now {
  position: absolute; top: -5px; bottom: -5px; width: 2px;
  background: #dc2626; border-radius: 1px; pointer-events: none; z-index: 10;
}
.driver-float-now::before {
  content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px; background: #dc2626; border-radius: 50%;
}
.tag-group      { background: #ede9fe; color: #5b21b6; }

/* ====================================================
   NEXT STOP BANNER (driver view)
   ==================================================== */
.next-stop-banner {
  border-radius: 12px;
  margin: 0 0 10px;
  overflow: hidden;
  transition: background 0.2s;
}
.next-stop-banner.hidden { display: none; }
.next-stop-content {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
}
.next-stop-icon { font-size: 1.3rem; flex-shrink: 0; }
.next-stop-text { flex: 1; min-width: 0; }
.next-stop-label { font-size: 0.875rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-stop-sub   { font-size: 0.75rem; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-stop-nav   { font-size: 0.75rem; font-weight: 700; flex-shrink: 0; opacity: 0.9; }

.next-stop-active   { background: #c6f6d5; color: #22543d; border: 1.5px solid #68d391; }
.next-stop-waiting  { background: #fefcbf; color: #744210; border: 1.5px solid #f6e05e; }
.next-stop-returning{ background: #bee3f8; color: #2a4365; border: 1.5px solid #90cdf4; }
.next-stop-urgent   { background: #fed7d7; color: #742a2a; border: 1.5px solid #fc8181; animation: pulse-bg 1s infinite; }
.next-stop-soon     { background: #fefcbf; color: #744210; border: 1.5px solid #faf089; }
.next-stop-default  { background: #e2e8f0; color: #2d3748; border: 1.5px solid #cbd5e0; }

@keyframes pulse-bg {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.75; }
}

/* ====================================================
   Reports Tab
   ==================================================== */
.report-section {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 16px;
}
.report-section-title {
  font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px;
}
.report-stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px;
}
.report-stat-card {
  background: var(--grey-light); border-radius: var(--radius-sm);
  padding: 14px 10px; text-align: center;
}
.report-stat-value {
  font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 4px;
}
.report-stat-label {
  font-size: 0.7rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.4px;
}
.report-stat-sub {
  font-size: 0.65rem; color: var(--text-muted); margin-top: 2px;
}

/* ====================================================
   Compact Trip Cards — Arrived / Returned status
   ==================================================== */
.trip-card.status-arrived .trip-times,
.trip-card.status-arrived .trip-dest-btn,
.trip-card.status-arrived .delay-section,
.trip-card.status-returned .trip-times,
.trip-card.status-returned .trip-dest-btn,
.trip-card.status-returned .delay-section {
  display: none;
}
.trip-card.status-arrived,
.trip-card.status-returned {
  padding: 8px 12px;
  opacity: 0.85;
}
.trip-card.status-returned {
  opacity: 0.6;
}

/* ====================================================
   Home Base Button
   ==================================================== */
.btn-home-base {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: #10b981;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.2px;
  z-index: 10;
  position: relative;
}
.btn-home-base:active {
  background: #059669;
}

.outing-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.outing-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
  border-left: 4px solid var(--primary, #1A4F66);
}
.outing-card:hover {
  box-shadow: 0 6px 20px rgba(14,57,73,0.12);
  transform: translateY(-2px);
}
.outing-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}
.outing-card-dest {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0E3949;
  line-height: 1.25;
}
.outing-card-name {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 10px;
}
.outing-card-event {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6D5BD0;
  margin-bottom: 8px;
}
.outing-card-date {
  font-size: 0.9rem;
  color: #374151;
  margin-bottom: 12px;
}
.outing-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.outing-stat {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1A4F66;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 8px;
}
.outing-stat-wait {
  color: #b45309;
  background: #fef3c7;
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
}

.passengers-section { display:flex; flex-direction:column; }
.passenger-row { border-radius:8px; padding:10px 12px; margin-bottom:8px; }
.trip-card-group { border-left:4px solid #cbd5e1; }
.passenger-row.pax-status-departed   { border-left:4px solid #38a169; background:#f0fff4; }
.passenger-row.pax-status-arrived    { border-left:4px solid #e53e3e; background:#fff5f5; }
.passenger-row.pax-status-waiting,
.passenger-row.pax-status-dropped_off{ border-left:4px solid #d69e2e; background:#fffbeb; }
.passenger-row.pax-status-picked_up  { border-left:4px solid #3182ce; background:#ebf8ff; }
.passenger-row.pax-status-returned   { border-left:4px solid #a0aec0; }
.passenger-row.pax-done { opacity:.5; order:99; }
.pax-nav-btn { background:#0E7C8A; color:#fff; }
