/* Gentle Journey Driver Booking App - Premium Design System */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --primary: hsl(43, 93%, 55%); /* Gentle Journey Gold/Yellow */
  --primary-hover: hsl(43, 93%, 45%);
  --primary-light: hsl(43, 100%, 96%);
  
  --secondary: hsl(142, 69%, 29%); /* Companion Forest Green */
  --secondary-light: hsl(142, 50%, 95%);
  
  --dark-slate: hsl(215, 28%, 17%);
  --slate-gray: hsl(215, 15%, 50%);
  --light-slate: hsl(210, 40%, 96%);
  --border-color: hsl(214, 32%, 91%);
  
  --white: #ffffff;
  --black: #090d16;
  
  --success: hsl(142, 69%, 29%);
  --warning: hsl(38, 92%, 50%);
  --danger: hsl(0, 84%, 60%);
  --info: hsl(199, 89%, 48%);
  
  /* Styling constants */
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 10px 20px -5px rgba(0,0,0,0.04), 0 4px 6px -2px rgba(0,0,0,0.02);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.02);
  --shadow-premium: 0 25px 50px -12px rgba(234, 160, 17, 0.08);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 280px;
}

/* Base resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: hsl(210, 30%, 98%);
  color: var(--dark-slate);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

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

/* Sidebar navigation */
.sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: var(--transition);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 3.5rem;
  padding-left: 8px;
}

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 16px rgba(245, 194, 66, 0.3);
  border: 2px solid var(--primary);
}

.logo-text h1 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--dark-slate);
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--secondary);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: block;
  margin-top: -2px;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  width: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  color: var(--slate-gray);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
}

.nav-link svg {
  width: 22px;
  height: 22px;
  transition: var(--transition);
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
}

.nav-link:hover {
  background: var(--light-slate);
  color: var(--dark-slate);
}

.nav-link.active {
  background: var(--primary-light);
  color: var(--dark-slate);
  font-weight: 600;
}

.nav-link.active svg {
  stroke: var(--dark-slate);
  fill: rgba(245, 194, 66, 0.15);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.driver-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--dark-slate);
  border: 2px solid white;
  box-shadow: var(--shadow-md);
}

.driver-info .name {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
}

.driver-info .role {
  font-size: 0.75rem;
  color: var(--slate-gray);
}

/* Main workspace area */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 2.5rem 3.5rem;
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  transition: var(--transition);
}

/* View transitions & wrappers */
.view-panel {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header section */
.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.header-title h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-slate);
}

.header-title p {
  color: var(--slate-gray);
  margin-top: 4px;
}

.header-actions {
  display: flex;
  gap: 12px;
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--dark-slate);
  box-shadow: 0 4px 14px rgba(245, 194, 66, 0.4);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 194, 66, 0.5);
}

.btn-secondary {
  background: var(--white);
  color: var(--dark-slate);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--light-slate);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* Stats Row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-premium);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stat-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--slate-gray);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary-hover);
}

.stat-icon.green {
  background: var(--secondary-light);
  color: var(--secondary);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--dark-slate);
  line-height: 1.2;
}

.stat-meta {
  font-size: 0.8rem;
  color: var(--slate-gray);
  margin-top: 4px;
}

/* Agenda / Content Layout */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Agenda list */
.agenda-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.agenda-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
}

.agenda-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.time-slot {
  display: flex;
  flex-direction: column;
  min-width: 80px;
  border-right: 2px solid var(--primary-light);
  padding-right: 12px;
}

.time-start {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}

.time-duration {
  font-size: 0.75rem;
  color: var(--slate-gray);
  margin-top: 4px;
}

.booking-details {
  flex-grow: 1;
}

.client-name-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.client-link {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-slate);
  cursor: pointer;
  transition: var(--transition);
}

.client-link:hover {
  color: var(--secondary);
}

.ride-route {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--slate-gray);
  margin-bottom: 8px;
}

.arrow-icon {
  color: var(--primary);
  font-weight: 700;
}

.care-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.care-badge.attend {
  background: var(--primary-light);
  color: hsl(38, 92%, 40%);
}

.care-badge.door-to-door {
  background: var(--secondary-light);
  color: var(--secondary);
}

.care-badge.transport {
  background: hsl(210, 40%, 93%);
  color: var(--dark-slate);
}

.status-indicator {
  position: absolute;
  right: 20px;
  bottom: 20px;
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  text-transform: capitalize;
}

.status-pill.upcoming {
  background: hsl(200, 100%, 95%);
  color: hsl(200, 100%, 35%);
}

.status-pill.en-route {
  background: hsl(199, 89%, 95%);
  color: hsl(199, 89%, 35%);
  border: 1px solid hsl(199, 89%, 85%);
}

.status-pill.in-transit {
  background: hsl(38, 92%, 95%);
  color: hsl(38, 92%, 35%);
  border: 1px solid hsl(38, 92%, 85%);
}

.status-pill.support {
  background: var(--secondary-light);
  color: var(--secondary);
  border: 1px solid var(--border-color);
}

.status-pill.completed {
  background: var(--secondary-light);
  color: var(--secondary);
}

.status-pill.cancelled {
  background: hsl(0, 100%, 96%);
  color: var(--danger);
}

.action-menu {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.action-btn {
  background: none;
  border: none;
  color: var(--slate-gray);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  transition: var(--transition);
}

.action-btn:hover {
  background: var(--light-slate);
  color: var(--dark-slate);
}

.action-btn.complete:hover {
  background: var(--secondary-light);
  color: var(--secondary);
}

.action-btn.cancel:hover {
  background: hsl(0, 100%, 96%);
  color: var(--danger);
}

/* Sidebar Info Card */
.side-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  height: fit-content;
}

.quick-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.quick-link-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.quick-link-icon {
  width: 32px;
  height: 32px;
  background: var(--light-slate);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-slate);
}

.quick-link-item:hover .quick-link-icon {
  background: var(--white);
}

.quick-link-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.quick-link-desc {
  font-size: 0.75rem;
  color: var(--slate-gray);
}

/* Forms Styling */
.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  max-width: 800px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-slate);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--white);
  color: var(--dark-slate);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(245, 194, 66, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

/* Client Management List */
.client-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 20px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  width: 320px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(245, 194, 66, 0.15);
}

.search-bar svg {
  width: 20px;
  height: 20px;
  color: var(--slate-gray);
  margin-right: 8px;
}

.search-input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.9rem;
  color: var(--dark-slate);
}

.client-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.client-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.client-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.client-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.client-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
}

.client-card-info {
  flex-grow: 1;
}

.client-card-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--dark-slate);
}

.client-card-phone {
  font-size: 0.8rem;
  color: var(--slate-gray);
}

.client-badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.client-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.client-badge.mobility-wheelchair {
  background: #fee2e2;
  color: #ef4444;
}

.client-badge.mobility-powerchair {
  background: #f3e8ff;
  color: #a855f7;
}

.client-badge.mobility-walker {
  background: #ffedd5;
  color: #ea580c;
}

.client-badge.mobility-cane {
  background: #fef9c3;
  color: #ca8a04;
}

.client-badge.mobility-none {
  background: #dcfce7;
  color: #15803d;
}

.client-card-details {
  font-size: 0.85rem;
  color: var(--slate-gray);
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

.client-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: auto;
}

.footer-detail {
  font-size: 0.75rem;
  color: var(--slate-gray);
}

.footer-detail strong {
  color: var(--dark-slate);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--slate-gray);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark-slate);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--slate-gray);
  font-size: 0.9rem;
  max-width: 360px;
  margin-bottom: 20px;
}

/* Modal Overlay styling */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 100000; /* Placed above login screen overlay (z-index: 99999) */
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
  overflow-y: auto; /* Allow vertical scrolling when content exceeds height */
  padding: 40px 16px; /* Spacing for scrollable overlay viewport */
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  margin: auto; /* Center within overlay flexbox and allow scrolling without clipping */
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 90%;
  max-width: 600px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  animation: modalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--slate-gray);
  transition: var(--transition);
}

.close-btn:hover {
  color: var(--dark-slate);
}

/* Responsive Grid Adjustments */
@media (max-width: 1200px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — Driver Portal
   Complete mobile overhaul: drawer sidebar, top bar, bottom nav
   ═══════════════════════════════════════════════════════════════ */

/* ── Mobile elements: hidden on desktop ──────────────────────── */
.mobile-topbar,
.mobile-bottom-nav,
.sidebar-backdrop { display: none; }

@media (max-width: 768px) {

  /* ── 1. Mobile top header bar ─────────────────────────────── */
  .mobile-topbar {
    display: flex;
    position: fixed;
    top: 0;
    top: env(safe-area-inset-top, 0);
    left: 0;
    right: 0;
    height: 56px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    padding: 0 16px;
    z-index: 400;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  }

  .mobile-topbar-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
  }

  .mobile-topbar-title {
    flex: 1;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-slate);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-hamburger {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    color: var(--dark-slate);
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
  }

  .mobile-hamburger:active { background: var(--light-slate); }

  /* ── 2. Sidebar becomes a slide-in drawer ─────────────────── */
  .sidebar {
    transform: translateX(-110%);
    box-shadow: 8px 0 32px rgba(0,0,0,0.18);
    z-index: 500;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 80px 1.25rem 1.5rem;
    width: 280px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  /* Show all sidebar content on mobile drawer (reset icon-only mode) */
  .logo-text,
  .nav-text,
  .driver-info,
  .sidebar-footer {
    display: flex !important;
  }
  .logo-text { display: block !important; }
  .driver-info { flex-direction: column; gap: 2px; }
  .sidebar-footer { display: block !important; }

  .logo-container {
    padding-left: 8px;
    justify-content: flex-start;
    margin-bottom: 2rem;
  }

  .nav-link {
    justify-content: flex-start;
    padding: 14px 18px;
    min-height: 50px;
  }

  /* ── 3. Sidebar backdrop overlay ─────────────────────────── */
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(9, 13, 22, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 450;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .sidebar-backdrop.visible {
    opacity: 1;
    pointer-events: all;
  }

  /* ── 4. Main content — full width, clear sidebar ─────────── */
  :root { --sidebar-width: 0px; }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
    padding-top: calc(56px + 1rem);
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px) + 0.5rem);
    min-height: 100dvh;
  }

  /* ── 5. Mobile bottom tab navigation ─────────────────────── */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--white);
    border-top: 1px solid var(--border-color);
    z-index: 400;
    align-items: stretch;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.07);
  }

  .mobile-bottom-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--slate-gray);
    font-family: var(--font-main);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 6px 2px;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease;
    position: relative;
  }

  .mobile-bottom-nav-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.2s ease;
  }

  .mobile-bottom-nav-btn.active {
    color: var(--dark-slate);
  }

  .mobile-bottom-nav-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 4px 4px;
  }

  .mobile-bottom-nav-btn.active svg {
    stroke: var(--dark-slate);
    filter: drop-shadow(0 0 6px rgba(245,194,66,0.4));
  }

  .mobile-bottom-nav-btn:active {
    opacity: 0.7;
    transform: scale(0.94);
  }

  /* ── 6. Header ───────────────────────────────────────────── */
  .header-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 1.25rem;
  }

  .header-title h2 { font-size: 1.35rem; }
  .header-title p   { font-size: 0.82rem; }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .header-actions .btn {
    flex: 1;
    min-width: 110px;
    font-size: 0.85rem;
    padding: 10px 14px;
  }

  /* ── 7. Stats grid — 2 columns ───────────────────────────── */
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }

  .stat-card { padding: 14px 12px; }
  .stat-number { font-size: 1.6rem; }

  /* ── 8. Dashboard layout — single column ────────────────── */
  .dashboard-layout {
    grid-template-columns: 1fr !important;
  }

  /* ── 9. Client card grid ─────────────────────────────────── */
  .client-card-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── 10. Booking layout — single column ─────────────────── */
  .booking-container-layout {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .map-side-card { position: static !important; }

  #booking-map { height: 220px !important; }

  /* ── 11. Search bar — full width ─────────────────────────── */
  .search-bar { width: 100% !important; max-width: 100%; }
  .search-section { flex-direction: column; gap: 10px; }
  .search-section .filter-chips { flex-wrap: wrap; }

  /* ── 12. Filter chips — bigger tap targets ───────────────── */
  .filter-chip {
    padding: 8px 14px;
    font-size: 0.8rem;
    min-height: 38px;
  }

  /* ── 13. Action buttons — bigger tap targets ─────────────── */
  .action-btn {
    padding: 8px 14px !important;
    font-size: 0.8rem;
    min-height: 38px;
  }

  /* ── 14. General buttons ─────────────────────────────────── */
  .btn {
    min-height: 46px;
    padding: 12px 18px;
  }

  /* ── 15. Modals — full-width, bottom-sheet feel ──────────── */
  .modal-overlay {
    padding: 16px;
    align-items: flex-end;
  }

  .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px 16px 24px;
    border-radius: var(--radius-xl) var(--radius-xl) var(--radius-sm) var(--radius-sm);
    margin: 0;
    max-height: 92dvh;
    overflow-y: auto;
  }

  .modal-header { margin-bottom: 16px; }
  .modal-title { font-size: 1.05rem; }

  .close-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--light-slate);
  }

  /* ── 16. Emergency contact grid — 2 columns ──────────────── */
  .emergency-contact-grid,
  [style*="grid-template-columns: 1fr 1fr 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* ── 17. Card payment fields — single column ─────────────── */
  .payment-grid,
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* ── 18. iOS zoom prevention — 16px min font on inputs ───── */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea {
    font-size: 16px !important;
  }

  /* ── 19. Toast — full-width at bottom ────────────────────── */
  .toast-container {
    left: 12px !important;
    right: 12px !important;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px) + 8px) !important;
    min-width: unset !important;
    max-width: unset !important;
  }

  .toast {
    min-width: unset;
    width: 100%;
  }

  /* ── 20. Agenda tabs — scrollable ────────────────────────── */
  .agenda-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 2px;
  }

  .agenda-tabs::-webkit-scrollbar { display: none; }

  .agenda-tab {
    white-space: nowrap;
    padding: 8px 14px;
    min-height: 38px;
    font-size: 0.8rem;
  }

  /* ── 21. Tables — horizontal scroll ─────────────────────── */
  .table-wrapper, .earnings-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ── 22. Booking form grid ───────────────────────────────── */
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full-width {
    grid-column: span 1;
  }

  /* ── 23. Quick links ─────────────────────────────────────── */
  .quick-links-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }

  .quick-link-item { padding: 14px 10px; }

  /* ── 24. Login screen safe area ─────────────────────────── */
  #login-screen {
    padding: 0;
    padding-top: env(safe-area-inset-top, 0);
  }

  /* ── 25. Page body safe insets ──────────────────────────── */
  body {
    padding-top: env(safe-area-inset-top, 0);
  }
}

/* Extra small phones */
@media (max-width: 390px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .mobile-bottom-nav-btn span {
    display: none; /* icon-only on tiny screens */
  }

  .mobile-bottom-nav-btn {
    justify-content: center;
  }

  .header-title h2 { font-size: 1.15rem; }
  .main-content { padding: 0.75rem; padding-top: calc(56px + 0.75rem); }
}


/* Client type/funding badge colors */
.client-badge.billing-ACC {
  background: hsl(215, 100%, 94%);
  color: hsl(215, 100%, 35%);
}

.client-badge.billing-TMS {
  background: hsl(185, 100%, 94%);
  color: hsl(185, 100%, 30%);
}

.client-badge.billing-Split {
  background: hsl(290, 100%, 95%);
  color: hsl(290, 80%, 35%);
}

.client-badge.billing-Cash {
  background: hsl(210, 40%, 93%);
  color: var(--dark-slate);
}

/* Booking Two-Column Layout & Route Mapping styling */
.booking-container-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: start;
}

.map-side-card {
  position: sticky;
  top: 40px;
}

#booking-map {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  transition: border-color 0.3s ease;
}

#booking-map.loading {
  border-color: var(--primary);
}

.map-loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-color);
  animation: pulse 1.5s infinite ease-in-out;
}

/* Custom Marker Pin Styles for Leaflet Map */
.custom-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.3));
}

.custom-pin.green-pin svg {
  color: var(--secondary);
}

.custom-pin.gold-pin svg {
  color: var(--primary-hover);
}

@keyframes pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.02); }
}

@media (max-width: 1024px) {
  .booking-container-layout {
    grid-template-columns: 1fr;
  }
  .map-side-card {
    position: static;
  }
}

/* Print Invoice Styling */
@media print {
  body * {
    visibility: hidden;
  }
  #invoice-modal, #invoice-modal * {
    visibility: visible;
  }
  #invoice-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
  }
  .modal-overlay {
    background: transparent;
    position: static;
  }
  .invoice-actions, .close-btn, .sidebar, .main-content {
    display: none !important;
  }
}

/* Authentication Lock Screen & PIN-pad Styles */

/* Hide sidebar and main content when user is not logged in */
body.not-logged-in .sidebar,
body.not-logged-in .main-content {
  display: none !important;
}

body.not-logged-in .login-overlay {
  display: flex;
}

.login-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, hsl(215, 28%, 20%) 0%, hsl(215, 35%, 11%) 100%);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(10px);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 40px rgba(234, 160, 17, 0.05);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.login-card.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

.login-brand {
  background: linear-gradient(135deg, var(--primary-light) 0%, hsl(43, 100%, 92%) 100%);
  padding: 32px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 8px 16px rgba(245, 194, 66, 0.4);
  margin-bottom: 12px;
}

.login-brand h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-slate);
  margin-bottom: 4px;
}

.login-brand p {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.login-body {
  padding: 32px 28px;
}

/* PIN Indicator Dots */
.pin-dots-container {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 28px 0;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #cbd5e1;
}

.pin-dot.active {
  background: var(--secondary);
  border-color: var(--secondary);
  transform: scale(1.25);
  box-shadow: 0 0 0 4px var(--secondary-light);
}

.pin-dots-container.error .pin-dot {
  background: var(--danger);
  border-color: var(--danger);
  box-shadow: 0 0 0 4px hsl(0, 100%, 94%);
}

/* Touch PIN-pad Grid */
.pin-pad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 250px;
  margin: 0 auto;
}

.pin-key {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--light-slate);
  border: 1px solid var(--border-color);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-slate);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  outline: none;
}

.pin-key:hover {
  background: hsl(210, 40%, 92%);
  border-color: hsl(214, 30%, 85%);
  transform: scale(1.05);
}

.pin-key:active {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: scale(0.95);
}

.pin-key.pin-action-clear,
.pin-key.pin-action-back {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-gray);
  background: transparent;
  border-color: transparent;
}

.pin-key.pin-action-clear:hover,
.pin-key.pin-action-back:hover {
  background: var(--light-slate);
  border-color: var(--border-color);
  color: var(--dark-slate);
}

.pin-key.pin-action-back {
  font-size: 1.25rem;
}

/* Error Toast Message */
.login-error-toast {
  background: hsl(0, 100%, 97%);
  color: var(--danger);
  border: 1px solid hsl(0, 100%, 90%);
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 24px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Logout button in Sidebar */
.btn-logout {
  background: none;
  border: none;
  color: var(--slate-gray);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  margin-left: auto;
  outline: none;
}

.btn-logout:hover {
  color: var(--danger);
  background: hsl(0, 84%, 96%);
  transform: scale(1.05);
}

.btn-logout:active {
  transform: scale(0.95);
}

/* Driver Profile Card Styles */
.driver-profile-card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  background: #eaeaea; /* light grey background like in screenshot */
  border-radius: var(--radius-lg);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-top: 24px;
  border: 1px solid var(--border-color);
}

.driver-profile-card {
  background: #f7f6f5; /* off-white/light grey card background as in image */
  border: 1.5px solid #a0a0a0;
  border-radius: 20px;
  padding: 36px 30px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.12), 0 10px 15px -8px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.driver-profile-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15), 0 12px 18px -10px rgba(0, 0, 0, 0.1);
}

.profile-avatar-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.profile-avatar-container img {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-card-name {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 24px;
}

.profile-card-stats-row {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
}

.profile-stat-col {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #34495e;
  font-size: 0.95rem;
}

.profile-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--dark-slate);
}

.profile-stat-divider {
  width: 0;
  height: 24px;
  border-left: 2px dashed #94a3b8; /* vertical dashed line separator */
}

.profile-card-details-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.profile-card-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: #34495e;
  line-height: 1.5;
}

.profile-card-detail-item svg {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex-shrink: 0;
  color: #2c3e50;
}

.profile-card-detail-item svg.info-icon {
  color: #2c3e50;
}

.profile-detail-text {
  flex-grow: 1;
}

/* Payment gateway micro-animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes scaleUp {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* =====================================================================
   UX IMPROVEMENTS v2
   ===================================================================== */

/* 1. TOAST NOTIFICATION SYSTEM */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  min-width: 300px;
  max-width: 420px;
}
.toast {
  background: var(--dark-slate);
  color: white;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  pointer-events: auto;
  font-family: var(--font-main);
  border-left: 4px solid rgba(255,255,255,0.2);
}
.toast.toast-success { background: var(--secondary); border-left-color: hsl(142, 69%, 45%); }
.toast.toast-info { background: var(--info); border-left-color: hsl(199, 89%, 60%); }
.toast.toast-warning { background: hsl(38, 92%, 50%); color: var(--dark-slate); border-left-color: hsl(38, 92%, 35%); }
.toast.toast-error { background: var(--danger); border-left-color: hsl(0, 84%, 45%); }
.toast.toast-exit { animation: toastSlideOut 0.3s ease-in forwards; }
@keyframes toastSlideIn {
  0% { transform: translateX(40px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes toastSlideOut {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(40px); opacity: 0; }
}

/* 2. LIVE CLOCK & DATE IN HEADER */
.dashboard-datetime {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--primary-light);
  border: 1px solid hsl(43, 93%, 85%);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  margin-top: 10px;
}
.dashboard-datetime .date-str {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark-slate);
}
.dashboard-datetime .clock-str {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--secondary);
  letter-spacing: 2px;
  min-width: 70px;
}

/* 3. AGENDA TABS */
.agenda-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  background: var(--light-slate);
  border-radius: var(--radius-sm);
  padding: 4px;
}
.agenda-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-gray);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
  white-space: nowrap;
}
.agenda-tab.active {
  background: white;
  color: var(--secondary);
  box-shadow: var(--shadow-sm);
}
.agenda-tab .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  margin-left: 5px;
}

/* 4. EARNINGS SUMMARY CARD */
.earnings-card {
  background: linear-gradient(135deg, var(--secondary) 0%, hsl(142, 80%, 20%) 100%);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: white;
  margin-top: 20px;
  box-shadow: 0 8px 24px rgba(37, 99, 58, 0.25);
}
.earnings-card h4 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.85;
  margin-bottom: 12px;
}
.earnings-total {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.earnings-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 12px;
}
.earnings-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  opacity: 0.9;
}
.earnings-row strong { opacity: 1; }

/* 5. CLIENT QUICK-PEEK PANEL */
.client-peek-toggle {
  background: none;
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--slate-gray);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
  margin-top: 6px;
  display: inline-block;
}
.client-peek-toggle:hover {
  background: var(--light-slate);
  color: var(--dark-slate);
  border-color: var(--secondary);
}
.client-peek-panel {
  display: none;
  background: var(--light-slate);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 8px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--slate-gray);
}
.client-peek-panel.open { display: block; }
.client-peek-panel strong { color: var(--dark-slate); }

/* 6. BOOKING CONFIRMATION MODAL */
.booking-confirm-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  font-size: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 0 0 14px var(--secondary-light);
  animation: confirmBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes confirmBounce {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.booking-confirm-summary {
  background: var(--light-slate);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 16px 0;
}
.booking-confirm-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding: 5px 0;
}
.booking-confirm-row:last-child { border-bottom: none; }
.booking-confirm-row .bc-label { color: var(--slate-gray); font-weight: 600; }
.booking-confirm-row .bc-value { color: var(--dark-slate); font-weight: 700; text-align: right; }

/* 7. NEW BOOKING NOTIFICATION BANNER */
.new-booking-banner {
  display: none;
  background: linear-gradient(90deg, var(--secondary) 0%, hsl(142, 69%, 35%) 100%);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(37, 99, 58, 0.25);
  animation: bannerPulse 2.5s ease-in-out infinite;
  cursor: pointer;
}
.new-booking-banner.visible { display: flex; }
@keyframes bannerPulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(37, 99, 58, 0.25); }
  50% { box-shadow: 0 4px 24px rgba(37, 99, 58, 0.5); }
}

/* 8. FILTER CHIPS for client search */
.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--white);
  color: var(--slate-gray);
  transition: var(--transition);
  font-family: var(--font-main);
}
.filter-chip:hover { border-color: var(--secondary); color: var(--secondary); }
.filter-chip.active {
  background: var(--secondary-light);
  border-color: var(--secondary);
  color: var(--secondary);
}

/* 9. IMPROVED EMPTY STATE */
.empty-state.driver-empty {
  background: linear-gradient(135deg, var(--primary-light) 0%, hsl(43,100%,94%) 100%);
  border-color: hsl(43, 93%, 80%);
}
.empty-state.driver-empty h3 { color: hsl(43, 93%, 25%); }
.empty-state .empty-emoji { font-size: 3rem; margin-bottom: 12px; }

/* =============================================
   DRIVER TIPS DISPLAY
   ============================================= */

.stat-icon.gold {
  background: hsl(43, 100%, 92%);
  color: hsl(43, 90%, 38%);
}
.stat-card.tips-card .stat-number { color: hsl(43, 90%, 35%); }

.earnings-row.tips-row {
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 5px 8px;
  margin: 2px -8px;
  border: 1px solid rgba(255,255,255,0.2);
}
.earnings-row.tips-row span { font-weight: 700; opacity: 1; }
.earnings-row.tips-row strong { color: hsl(43,100%,85%); font-size: 0.9rem; }

.tips-history-section {
  margin-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 12px;
}

.tips-history-toggle {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  font-family: var(--font-main);
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s;
}
.tips-history-toggle:hover { background: rgba(255,255,255,0.18); }

.tips-history-list {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  max-height: 220px;
  overflow-y: auto;
}
.tips-history-list.open { display: flex; }

.tip-history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.15);
}

.tip-history-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.3);
}

.tip-history-info { flex: 1; min-width: 0; }
.tip-history-client {
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tip-history-date { font-size: 0.68rem; color: rgba(255,255,255,0.65); margin-top: 1px; }
.tip-history-amount {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: hsl(43,100%,80%);
  flex-shrink: 0;
}
.tips-empty-msg {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 10px 0;
  font-style: italic;
}
