/* ============================================
   Driver Dashboard Styles
   Extracted from driver-dashboard.html
   ============================================ */

:root {
  /* Mercor-inspired color palette */
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --secondary-light: #94a3b8;
  --background: #f8fafc;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --accent: #f1f5f9;
  --accent-light: #f8fafc;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #06b6d4;
  --info-light: #cffafe;
  
  /* Shadows - Mercor style */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Border radius - Mercor style */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  
  /* Spacing - Mercor 8px grid */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  
  /* Focus states */
  --focus: 0 0 0 3px rgba(37, 99, 235, 0.1);
  --focus-ring: 0 0 0 2px var(--primary);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.dashboard-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-8);
  padding-left: max(var(--space-8), env(safe-area-inset-left));
  padding-right: max(var(--space-8), env(safe-area-inset-right));
  padding-bottom: max(var(--space-8), env(safe-area-inset-bottom));
}

.topbar {
  background: var(--surface);
  padding: var(--space-4) var(--space-8);
  padding-left: max(var(--space-8), env(safe-area-inset-left));
  padding-right: max(var(--space-8), env(safe-area-inset-right));
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: var(--space-6);
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.logo:hover {
  transform: translateY(-1px);
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: #28a745;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon span {
  font-size: 20px;
  font-weight: 700;
  color: white;
  font-family: inherit;
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: #274690;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--surface), var(--accent));
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(39, 70, 144, 0.1);
}

.header-left h1 {
  color: var(--primary);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.header-left p {
  color: var(--muted);
  font-size: 1.1rem;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.user-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.user-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 auto 0.5rem;
  box-shadow: 0 4px 15px rgba(39, 70, 144, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.user-avatar .spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.75);
  color: var(--primary);
  font-size: 1.1rem;
}

.user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(39, 70, 144, 0.4);
}

.user-name {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.user-role {
  color: var(--muted);
  font-size: 0.9rem;
}

#changeProfilePhotoBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
  min-width: 140px;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.stat-card:hover::before {
  left: 100%;
}

.stat-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(39, 70, 144, 0.15);
}

.stat-icon {
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--primary);
  font-size: 2rem;
  transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite;
}

.stat-card:hover .stat-icon {
  animation: pulse 0.6s ease-in-out;
  transform: scale(1.1);
  background: linear-gradient(135deg, var(--accent), #d4e6ff);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.stat-card:hover .stat-value {
  color: var(--primary-light);
}

.stat-label {
  color: var(--muted);
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.stat-card:hover .stat-label {
  color: var(--primary);
}

/* Tabs */
.tabs-container {
  display: flex;
  gap: 0;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  overflow: visible;
  min-height: 600px;
}

.tabs-header {
  display: flex;
  flex-direction: column;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  flex-shrink: 0;
}

.tab-button {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  border-right: none;
  position: relative;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.125rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
  pointer-events: auto;
  user-select: none;
}

.tab-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.tab-button i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.tab-button.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
  font-weight: 600;
}

.tab-button:hover:not(.active) {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.03);
}

.tab-button:active {
  background: rgba(37, 99, 235, 0.1);
  transform: scale(0.98);
}

.tab-button span,
.tab-button i {
  pointer-events: none;
}

.tab-button a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  height: 100%;
}

.tab-button a:hover {
  color: inherit;
}

.tabs-content-wrapper {
  flex: 1;
  padding: 0;
  min-width: 0;
  overflow-x: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Ensure money tab content appears at top of content area */
#moneyTab.tab-content {
  margin: 0;
  padding-top: 2rem;
}

#moneyTab.tab-content.active {
  display: block;
  position: relative;
  order: -1; /* Ensure it appears first when active */
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  position: relative;
  margin: 1.5rem auto;
  z-index: 1001;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  width: 100%;
  max-width: 300px;
  height: 48px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.mobile-menu-toggle i {
  font-size: 1.1rem;
}

.mobile-menu-toggle:hover {
  background: var(--primary-light);
  transform: scale(1.05);
}

.mobile-menu-toggle.active {
  background: var(--primary-dark);
}

/* Mobile Close Button (inside sidebar) */
.mobile-close-button {
  display: none;
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
}

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

.mobile-close-button i {
  font-size: 1.1rem;
}

/* Mobile Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mobile-nav-overlay.active {
  opacity: 1;
  display: block;
  pointer-events: auto;
}



@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}



.tab-content {
  padding: 2rem;
  display: none;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
  margin: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-content.active {
  display: block;
  animation: tabFadeIn 0.4s ease forwards;
}

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

.tab-content.fade-out {
  animation: tabFadeOut 0.2s ease forwards;
}

@keyframes tabFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* When money tab is active, ensure it's at the top - use class for better browser support */
.tabs-content-wrapper.money-active {
  align-items: flex-start;
}

.tabs-content-wrapper.money-active #moneyTab.active {
  align-self: flex-start;
  width: 100%;
  margin-top: 0;
  padding-top: 2rem;
}

/* Embedded chat */
.chat-embed-wrapper {
  width: 100%;
  height: 80vh;
  min-height: 680px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.chat-embed-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Collapsible Sections */
.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slots-actions {
  gap: 1.5rem;
  flex-wrap: wrap;
}

.slots-action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.slots-action-buttons .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .slots-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .slots-action-buttons {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }

  .slots-action-buttons .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
  }
}

.collapse-toggle {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.collapse-toggle:hover {
  background: var(--primary-light);
  transform: scale(1.05);
}

.collapse-toggle i {
  transition: transform 0.3s ease;
}

.collapse-toggle.collapsed i {
  transform: rotate(-90deg);
}

.collapsible-section {
  transition: all 0.3s ease;
  overflow: hidden;
}

.collapsible-section.collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  padding: 0.5rem 0;
}

@media (max-width: 820px) {
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
  
  /* Schedule cards on tablets */
  .schedule-card-content {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  
  .schedule-card-content .btn {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
  }
}

@media (max-width: 640px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .slot-card {
    padding: 1rem 1.1rem;
    margin-bottom: 0;
  }

  .slot-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  /* Responsive schedule cards */
  .schedule-card-content {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  
  .schedule-card-content .btn {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
  }

  .slot-card-status {
    width: 100%;
    justify-content: space-between;
    margin-top: 0.25rem;
  }

  .slot-route {
    flex-wrap: wrap;
  }

  .slot-route span {
    max-width: 100%;
    white-space: normal;
  }

  .slot-card-tags {
    width: 100%;
    gap: 0.4rem;
  }
}

.card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(39, 70, 144, 0.15);
  border-color: var(--primary);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.card-title {
  font-weight: 500;
  color: #495057;
  font-size: 1rem;
  letter-spacing: 0.025em;
}

.card-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.badge-primary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.badge-success {
  background: rgba(40, 167, 69, 0.9);
  color: white;
  border-color: rgba(40, 167, 69, 1);
}

.badge-warning {
  background: rgba(255, 193, 7, 0.9);
  color: white;
  border-color: rgba(255, 193, 7, 1);
}

.badge-danger {
  background: rgba(220, 53, 69, 0.9);
  color: white;
  border-color: rgba(220, 53, 69, 1);
}

.badge-secondary {
  background: rgba(99, 115, 129, 0.15);
  color: #1f2937;
  border-color: rgba(148, 163, 184, 0.6);
}

.card-content {
  color: #6c757d;
  font-size: 0.875rem;
  line-height: 1.5;
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f8f9fa;
}

.card-row:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.card-label {
  font-weight: 500;
  color: #495057;
  font-size: 0.875rem;
}

.card-value {
  color: #6c757d;
  font-size: 0.875rem;
  text-align: right;
}

.detail-section {
  margin-bottom: 1rem;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 0.2rem;
}

.slot-type-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.vehicle-section {
  background: #f3f8ff;
  border-radius: 4px;
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid #e3f2fd;
}

.vehicle-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: #1565c0;
  font-size: 0.875rem;
}

.vehicle-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.vehicle-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.vehicle-label {
  color: #1565c0;
  font-weight: 500;
}

.vehicle-value {
  color: #424242;
  font-weight: 400;
}

/* Transport dates block */
.driver-dates-block {
  position: relative;
  background: linear-gradient(135deg, #f9fbff 0%, #eef3ff 100%);
  border: 1px solid #e1e8ff;
  border-radius: 16px;
  padding: 1rem 1.25rem 1.15rem 1.25rem;
  margin: 1rem 0;
  box-shadow: 0 8px 24px rgba(64, 82, 181, 0.08);
  overflow: hidden;
}

.driver-dates-block::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 5px;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: 16px 0 0 16px;
}

.driver-dates-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.driver-dates-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #1d4ed8;
  letter-spacing: 0.25px;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.driver-dates-title i {
  color: #2563eb;
}

.recurrence-pill {
  background: #fff;
  border: 1px solid #d6ddff;
  color: #1f3a93;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(64, 82, 181, 0.12);
}

.date-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.1rem;
}

.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dce4ff;
  color: #2b3d6b;
  font-weight: 700;
  letter-spacing: 0.1px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.date-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.date-chip .dow {
  color: #5a6bc7;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.date-chip .date-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.dates-empty {
  color: #6c757d;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.25rem 0;
}

.card-actions {
  display: flex !important;
  gap: 0.75rem;
  margin-top: 0;
  padding: 1rem;
  border-top: 1px solid #e3f2fd;
  justify-content: flex-end;
  flex-wrap: wrap;
  visibility: visible !important;
  opacity: 1 !important;
}

.card-actions .btn {
  min-width: 100px;
  justify-content: center;
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  white-space: nowrap;
  padding: 0.5rem 1rem;
}

/* Force button visibility */
.card-actions button {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure card actions are always visible */
.collapsible-card .card-actions {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Override any collapsed state hiding */
.collapsible-content.collapsed .card-actions {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Collapsible Card Styles */
.collapsible-card {
  transition: all 0.3s ease;
}

.collapsible-card .card-header {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background-color 0.2s ease;
}

.collapsible-card .card-header::after {
  content: 'Click to expand';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: #9aa0a6;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.collapsible-card.collapsed .card-header::after {
  opacity: 1;
}

.collapsible-card .card-header:hover {
  background: #f3f8ff;
  border-radius: 6px 6px 0 0;
}

.collapse-icon {
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
  font-size: 0.8rem;
  opacity: 0.6;
}

.collapse-icon.rotated {
  transform: rotate(180deg);
}

/* Market Insights Header Styling */
.market-insights-header {
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
  border: none;
}

.market-insights-header .card-content {
  padding: 0;
}

@media (max-width: 768px) {
  .market-insights-header {
    padding: 1.25rem !important;
  }

  .market-insights-header > div {
    gap: 1rem !important;
  }

  .market-insights-header > div > div:first-child {
    width: 60px !important;
    height: 60px !important;
  }

  .market-insights-header h3 {
    font-size: 1.5rem !important;
  }

  .market-insights-header p {
    font-size: 0.95rem !important;
  }
}

.collapsible-content {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.collapsible-content.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
}

.collapsible-content.collapsed .card-actions {
  display: flex !important;
}

.collapsible-content.collapsed .slot-details,
.collapsible-content.collapsed .analytics-grid,
.collapsible-content.collapsed .weekly-chart,
.collapsible-content.collapsed .chart-legend,
.collapsible-content.collapsed .stats-grid,
.collapsible-content.collapsed .request-details {
  display: none;
}

/* Compact collapsed state */
.collapsible-card.collapsed {
  padding-bottom: 0.75rem;
}

.collapsible-card.collapsed .card-header {
  margin-bottom: 0;
  padding-bottom: 0.5rem;
}

/* Hover effect for collapsed cards */
.collapsible-card.collapsed:hover {
  background: #f8fbff;
}

/* Collapsed card indicator */
.collapsible-card.collapsed .card-header {
  border-bottom: none;
}

.collapsible-card.collapsed .card-header:hover {
  background: #e3f2fd;
}

/* Ensure buttons are visible when expanded */
.collapsible-content:not(.collapsed) .card-actions {
  display: flex !important;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f3f4;
  justify-content: flex-end;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Make request body scroll when tall */
.collapsible-content:not(.collapsed) .request-details {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
  pointer-events: auto;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-md);
  animation: pulse 0.3s ease-in-out;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #218838;
  transform: translateY(-1px);
}

.btn-danger {
  background: #f44336;
  color: white;
  border: 1px solid #d32f2f;
}

.btn-danger:hover {
  background: #d32f2f;
  border-color: #c62828;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-1px);
}

.btn-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #9ca3af;
}

.btn-outline:disabled:hover {
  transform: none;
  background: #f3f4f6;
}


.btn-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 4px;
  font-weight: 400;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
}

/* Loading */
.loading {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.loading i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

/* Messages */
.message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

      .message.success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
  }
  


/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--primary);
  background: linear-gradient(135deg, var(--accent), #f8fbff);
  border-radius: 12px;
  border: 1px solid rgba(39, 70, 144, 0.1);
  transition: all 0.3s ease;
}

.empty-state:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(39, 70, 144, 0.1);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary);
  transition: all 0.3s ease;
}

.empty-state:hover i {
  transform: scale(1.1);
  color: var(--primary-light);
}

.empty-state h3 {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.empty-state:hover h3 {
  color: var(--primary-light);
}

.empty-state p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
  transition: all 0.3s ease;
}

.empty-state:hover p {
  color: var(--primary);
}

/* Request Tabs */
.request-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 2rem;
}

.request-tab-btn {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
  color: #6b7280;
  position: relative;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  border-bottom: 3px solid transparent;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
  pointer-events: auto;
  user-select: none;
}

.request-tab-btn:active {
  transform: scale(0.98);
}

.request-tab-btn:hover {
  color: #374151;
  background-color: #f9fafb;
}

.request-tab-btn.active {
  color: #1e40af;
  font-weight: 600;
  background-color: #eff6ff;
  border-bottom-color: #1e40af;
}

.request-tab-btn i {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #e5e7eb;
  color: #6b7280;
  font-size: 0.75rem;
}

.request-tab-btn.active i {
  background-color: #1e40af;
  color: white;
}

/* Droppable Schedule Structure */
.schedule-list {
  max-height: 70vh;
  overflow-y: auto;
  margin-top: 1rem;
  padding-right: 0.5rem;
}

/* Slot Group (Top Level) */
.slot-group {
  margin-bottom: 1rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slot-header:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.slot-info {
  flex: 1;
}

.slot-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.slot-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  opacity: 0.9;
}

.slot-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.slot-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slot-capacity {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 0.375rem;
}

.btn-success {
  background-color: #28a745;
  border-color: #28a745;
  color: white;
}

.btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

.slot-toggle {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.slot-group.expanded .slot-toggle {
  transform: rotate(180deg);
}

.slot-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.slot-group.expanded .slot-content {
  max-height: 5000px;
}

/* Passenger Group (Second Level) */
.passenger-group {
  border-bottom: 1px solid var(--accent);
}

.passenger-group:last-child {
  border-bottom: none;
}

.passenger-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--accent);
  cursor: pointer;
  transition: all 0.3s ease;
}

.passenger-header:hover {
  background: #d1e7ff;
}

.passenger-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.passenger-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary) 0%, #ff8c5a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

.passenger-details h4 {
  margin: 0 0 0.25rem 0;
  color: var(--text);
  font-size: 1rem;
}

.passenger-details p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.passenger-toggle {
  font-size: 1rem;
  color: var(--muted);
  transition: transform 0.3s ease;
}

.passenger-group.expanded .passenger-toggle {
  transform: rotate(180deg);
}

.passenger-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.passenger-group.expanded .passenger-content {
  max-height: 2000px;
}

/* Schedule Card (Third Level) */
.schedule-card {
  background: var(--background);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--muted);
  transition: all 0.3s ease;
}

.schedule-card.pending {
  border-left-color: var(--muted);
}

.schedule-card.accepted {
  border-left-color: var(--secondary);
}

.schedule-card.rejected {
  border-left-color: #F44336;
}

.schedule-card.completed {
  border-left-color: #9C27B0;
}

.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  cursor: pointer;
}

.schedule-date {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.schedule-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-pending {
  color: var(--muted);
  background-color: color-mix(in srgb, var(--muted) 20%, transparent);
}

.status-accepted {
  color: var(--secondary);
  background-color: color-mix(in srgb, var(--secondary) 20%, transparent);
}

.status-rejected {
  color: #F44336;
  background-color: color-mix(in srgb, #F44336 20%, transparent);
}

.status-completed {
  color: #9C27B0;
  background-color: color-mix(in srgb, #9C27B0 20%, transparent);
}

.schedule-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.schedule-card.expanded .schedule-content {
  max-height: 500px;
}

.schedule-times {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.schedule-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
}

.schedule-time i {
  color: var(--primary);
  width: 16px;
}

.schedule-notes {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--accent);
}

.schedule-notes p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.schedule-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--accent);
}

.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
  pointer-events: auto;
  user-select: none;
}

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

.action-btn:hover {
  color: var(--primary);
  background: var(--accent);
}

.action-btn.accept {
  color: var(--success);
}

.action-btn.accept:hover {
  background: color-mix(in srgb, var(--success) 20%, transparent);
}

.action-btn.decline {
  color: #F44336;
}

.action-btn.decline:hover {
  background: color-mix(in srgb, #F44336 20%, transparent);
}

.collapse-icon {
  transition: transform 0.3s ease;
}

.schedule-card.expanded .collapse-icon {
  transform: rotate(180deg);
}

/* Empty State */
.schedules-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.schedules-empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.schedules-empty-state h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  color: var(--text);
}

.schedules-empty-state p {
  margin: 0;
  font-size: 1rem;
}

/* Loading State */
.schedules-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.schedules-loading i {
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .slot-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .schedule-times {
    flex-direction: column;
  }

  .schedule-actions {
    flex-direction: column;
  }

  .action-btn {
    justify-content: center;
    width: 100%;
  }
}

/* Request Cards */
.request-card {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.request-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Collapsible Request Card Styles */
.request-card.collapsible-card .card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--accent), #f8fbff);
  border-left: 4px solid var(--primary);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.request-card.collapsible-card .card-header:hover {
  background: #f3f8ff;
}

.request-card.collapsible-card .card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
}

.request-card.collapsible-card .request-icon {
  font-size: 1.2rem;
}

.request-card.collapsible-card .card-content {
  padding: 1.5rem;
}

.request-card.collapsible-card .card-actions {
  padding: 1rem 1rem;
  border-top: 1px solid var(--border);
  background: #f8f9fa;
  display: flex !important;
  gap: 0.5rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  box-sizing: border-box;
  overflow: hidden;
}

.request-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--accent), #f8fbff);
  border-left: 4px solid var(--primary);
}

.customer-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
}

.trip-type {
  background-color: rgba(39, 70, 144, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
}

.request-card-body {
  padding: 1.5rem;
}

.customer-info {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.customer-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(39, 70, 144, 0.3);
  transition: all 0.3s ease;
}

.customer-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(39, 70, 144, 0.4);
}

.info-item {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.info-label {
  font-weight: 500;
  color: var(--primary);
  display: inline-block;
  width: 80px;
}

.divider {
  height: 1px;
  background-color: var(--border);
  margin: 1rem 0;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  line-height: 1.3;
}

.detail-icon {
  color: var(--muted);
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

.date-row {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 1rem 0;
}

.date-icon {
  margin-right: 0.5rem;
}

.status-badge {
  padding: 0.75rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Mobile alignment tweaks */
@media (max-width: 640px) {
  .collapsible-card,
  .request-card {
    width: 100%;
    margin: 0 0 1rem 0;
    box-sizing: border-box;
  }
  
  .card-actions {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .card-actions .btn {
    min-width: 90px;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }

  .card-header {
    align-items: flex-start;
    gap: 0.6rem;
  }

  .status-badge {
    align-self: flex-start;
    margin-top: 0.1rem;
  }

  .card-actions {
    justify-content: flex-start !important;
    flex-wrap: wrap;
  }
}

.status-accepted {
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--success);
}

/* Negotiation badges in card header */
.negotiation-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  animation: slideIn 0.3s ease;
}

.negotiation-badge i {
  font-size: 0.9rem;
}

.negotiation-pending {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  color: #856404;
  border: 2px solid #ffc107;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
  animation: pulse 2s ease infinite;
}

.negotiation-active {
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  color: #0c5460;
  border: 2px solid #17a2b8;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
  }
  50% {
    box-shadow: 0 2px 12px rgba(255, 193, 7, 0.5);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Negotiation summary in card actions */
.negotiation-summary {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
}

.negotiation-summary-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #495057;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.negotiation-summary-title i {
  color: #0ea5e9;
}

.negotiation-summary-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.negotiation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.6rem;
  background: white;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.negotiation-label {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.negotiation-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #495057;
}

.negotiation-value.highlight {
  color: #10b981;
}

.negotiation-value small {
  font-weight: 400;
  color: #6c757d;
  margin-left: 0.3rem;
}

.status-declined {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--danger);
}

  .request-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    padding: 0 0.5rem;
  }

  .request-actions .btn {
    flex: 1 1 auto;
    min-width: 120px;
    max-width: 100%;
    pointer-events: auto;
    white-space: nowrap;
    text-align: center;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .request-actions .btn i {
    margin-right: 0.3rem;
  }

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ced4da;
}

/* Responsive */
/* Mobile Responsive Styles */
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex !important;
  }

  .tabs-container {
    position: relative;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
    display: block !important;
    flex-direction: column !important;
  }

  .tabs-header {
    position: fixed !important;
    top: 0 !important;
    left: -280px !important;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    height: 100vh !important;
    background: var(--surface) !important;
    border-right: 1px solid var(--border) !important;
    padding: 0 0 2rem 0 !important;
    z-index: 1000 !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: var(--shadow-xl) !important;
    overflow-y: auto !important;
    border-radius: 0 !important;
    flex-shrink: 0 !important;
    flex-direction: column !important;
  }

  .mobile-close-button {
    display: flex !important;
  }

  .tabs-header.mobile-open {
    left: 0 !important;
  }

  body.menu-open .mobile-menu-toggle {
    display: none !important;
  }

  .tab-button {
    padding: 1.25rem 1.5rem !important;
    border-left: 3px solid transparent !important;
    border-bottom: none !important;
    white-space: normal !important;
    width: 100% !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    min-height: 48px !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    user-select: none !important;
  }

  .tab-button.active {
    border-left-color: var(--primary) !important;
    border-bottom: none !important;
  }

  .tab-button:active {
    background: rgba(37, 99, 235, 0.1) !important;
    transform: scale(0.98) !important;
  }

  .tab-button span {
    display: inline !important;
    pointer-events: none !important;
  }

  .tab-button i {
    pointer-events: none !important;
    font-size: 1.1rem !important;
    width: 24px !important;
  }

  .tabs-content-wrapper {
    width: 100% !important;
    padding: 0 !important;
    flex: none !important;
  }

  .tab-content {
    padding: 1.5rem 1rem !important;
  }

  body.menu-open {
    overflow: hidden !important;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    padding: 1rem !important;
    padding-left: max(1rem, env(safe-area-inset-left)) !important;
    padding-right: max(1rem, env(safe-area-inset-right)) !important;
    padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important;
  }

  .topbar {
    padding-left: max(1rem, env(safe-area-inset-left)) !important;
    padding-right: max(1rem, env(safe-area-inset-right)) !important;
  }

  .mobile-menu-toggle {
    margin: 1.5rem auto !important;
    width: 100% !important;
    max-width: 300px !important;
    height: 48px !important;
    font-size: 1rem !important;
  }
  
  .header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .tabs-header {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    left: -260px !important;
  }

  .tabs-header.mobile-open {
    left: 0 !important;
  }

  .tab-content {
    padding: 1rem !important;
  }

  .request-tabs {
    flex-direction: column;
  }

  .customer-info {
    flex-direction: column;
  }

    .request-actions {
      flex-direction: column;
      justify-content: flex-start;
      gap: 0.5rem;
      padding: 0;
    }

    .request-actions .btn {
      flex: 1 1 auto;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      min-height: 44px;
      font-size: 0.95rem;
      padding: 0.65rem 0.5rem;
      white-space: normal;
      line-height: 1.3;
    }

  .action-btn {
    min-height: 48px;
    width: 100%;
    justify-content: center;
  }

  .schedule-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .schedule-actions .action-btn {
    width: 100%;
  }

  .request-tab-btn {
    min-height: 48px;
    flex: 1;
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--surface);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(39, 70, 144, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: var(--accent);
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(39, 70, 144, 0.1);
  transform: translateY(-1px);
}

/* Access Denied Modal Styles - Prominent and Attention-Grabbing */
.access-denied-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(4px);
}

.access-denied-modal.show {
  display: flex;
}

.access-denied-modal-content {
  background: var(--surface);
  border-radius: 16px;
  width: 90%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(220, 53, 69, 0.2);
  border: 2px solid #dc3545;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(0.9);
  opacity: 0;
}

.access-denied-modal.show .access-denied-modal-content {
  transform: scale(1);
  opacity: 1;
}

.access-denied-header {
  position: relative;
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border-radius: 14px 14px 0 0;
  color: white;
}

.access-denied-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: pulse 2s infinite;
}

.access-denied-header h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
}

.access-denied-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.access-denied-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.access-denied-body {
  padding: 2rem;
}

.access-denied-message {
  font-size: 1.25rem;
  font-weight: 600;
  color: #dc3545;
  margin: 0 0 1rem 0;
  text-align: center;
}

.access-denied-description {
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 2rem 0;
  font-size: 1rem;
}

.access-denied-steps {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary);
}

.access-denied-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.access-denied-step:last-child {
  margin-bottom: 0;
}

.step-number {
  background: var(--primary);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.step-text {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.access-denied-step.fleet-notice {
  background: #e3f2fd;
  border: 2px solid #2196f3;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.access-denied-step.fleet-notice .step-icon {
  font-size: 1.5rem;
  margin-right: 0.75rem;
}

.access-denied-step.fleet-notice .step-text {
  font-weight: 500;
  color: #1565c0;
}

.access-denied-footer {
  padding: 0 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  min-height: 56px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

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

@media (max-width: 768px) {
  .access-denied-modal-content {
    width: 95%;
    max-width: none;
  }

  .access-denied-header {
    padding: 1.5rem 1rem 1rem;
  }

  .access-denied-header h2 {
    font-size: 1.5rem;
  }

  .access-denied-icon {
    font-size: 3rem;
  }

  .access-denied-body {
    padding: 1.5rem;
  }

  .access-denied-footer {
    padding: 0 1.5rem 1.5rem;
  }
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

/* Tab Navigation for Vehicle Modal */
.tab-nav {
  display: flex;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 1.5rem;
  position: relative;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
  padding: 0.5rem 0.5rem 0;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 14px 24px;
  cursor: pointer;
  font-weight: 600;
  color: #64748b;
  border-bottom: 3px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border-radius: 8px 8px 0 0;
  font-size: 0.95rem;
}

.tab-btn::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn.active {
  color: var(--primary);
  background: white;
  border-bottom-color: white;
}

.tab-btn.active::before {
  transform: scaleX(1);
}

.tab-btn:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

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

.tab-btn i {
  margin-right: 0.5rem;
}

#photoCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 0.5rem;
  min-width: 24px;
  height: 20px;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
  transition: all 0.3s ease;
}

.tab-btn.active #photoCount {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
  transform: scale(1.05);
}

.tab-btn:hover #photoCount {
  transform: scale(1.1);
}

/* Photo Upload Styles */
.photo-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  transition: border-color 0.2s;
  margin-bottom: 20px;
}

.photo-upload-area.drag-over {
  border-color: var(--primary);
  background-color: rgba(59, 130, 246, 0.05);
}

.photo-upload-area input[type="file"] {
  display: none;
}

.upload-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  margin-bottom: 10px;
}

.upload-btn:hover {
  background-color: var(--primary-dark);
}

.upload-info {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Photo Grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.photo-item {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.photo-image-container {
  position: relative;
  width: 100%;
  height: 150px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
}

.photo-placeholder i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.photo-placeholder span {
  font-size: 0.75rem;
  opacity: 0.7;
}

.photo-placeholder.error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.photo-placeholder.error i {
  color: #dc2626;
}

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

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.retry-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: 4px;
}

.retry-btn:hover {
  background: #2563eb;
}

.retry-btn-small {
  background: #6b7280;
  color: white;
  border: none;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.625rem;
  cursor: pointer;
  margin-top: 4px;
}

.retry-btn-small:hover {
  background: #4b5563;
}

.photo-info {
  padding: 12px;
}

.photo-type {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: 4px;
}

.photo-description {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.photo-actions {
  display: flex;
  gap: 8px;
}

.photo-actions button {
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  background: white;
  color: var(--muted);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.photo-actions button:hover {
  background-color: #f9fafb;
}

.photo-actions .primary-btn {
  background-color: #10b981;
  color: white;
  border-color: #10b981;
}

.photo-actions .delete-btn {
  background-color: #ef4444;
  color: white;
  border-color: #ef4444;
}

.primary-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: #10b981;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.status-approved {
  background-color: #10b981;
  color: white;
}

.status-pending {
  background-color: #f59e0b;
  color: white;
}

.status-rejected {
  background-color: #ef4444;
  color: white;
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Loading state for form */
.form-loading {
  opacity: 0.6;
  pointer-events: none;
}

.form-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Fleet Status Banner */
.fleet-status-banner {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 2px solid #2196f3;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 25px rgba(33, 150, 243, 0.15);
  animation: slideInDown 0.6s ease-out;
}

.fleet-banner-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.fleet-banner-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #2196f3, #1976d2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.fleet-banner-text {
  flex: 1;
}

.fleet-banner-text h3 {
  color: #1976d2;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.fleet-banner-text p {
  color: #424242;
  font-size: 1rem;
  margin: 0;
}

.fleet-banner-actions {
  flex-shrink: 0;
}

/* Fleet Info Card */
.fleet-info-card {
  background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
  border: 2px solid #4caf50;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.15);
  animation: slideInDown 0.6s ease-out;
}

.fleet-info-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.fleet-info-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #4caf50, #388e3c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.fleet-info-details {
  flex: 1;
}

.fleet-info-details h3 {
  color: #2e7d32;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.fleet-info-details p {
  color: #424242;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.fleet-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #4caf50;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.fleet-info-actions {
  flex-shrink: 0;
}



/* Animations */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .fleet-banner-content,
  .fleet-info-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

}

/* Driver Ratings Styles */
.rating-card {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-left: 4px solid #274690;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rating-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(39, 70, 144, 0.3);
}

.rating-card .stat-icon {
  background: #274690;
  color: white;
}

.rating-details {
  margin-top: 0.5rem;
  text-align: center;
}

.rating-stars {
  display: flex;
  justify-content: center;
  gap: 0.1rem;
  margin-bottom: 0.25rem;
}

.rating-star {
  color: #ddd;
  font-size: 0.8rem;
}

.rating-star.filled {
  color: #274690;
}

.rating-count {
  font-size: 0.75rem;
  color: #666;
}

/* Rating Popup Styles */
.rating-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.rating-popup-content {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.rating-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e9ecef;
  background: linear-gradient(135deg, #274690 0%, #3867d6 100%);
  color: white;
}

.rating-popup-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.close-rating-popup {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

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

.rating-popup-body {
  padding: 2rem;
}

.rating-summary-horizontal {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
}

.rating-main-display {
  text-align: center;
}

.rating-score-large {
  font-size: 4rem;
  font-weight: 700;
  color: #274690;
  margin-bottom: 0.5rem;
}

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

.rating-stars-large .rating-star {
  font-size: 1.5rem;
}

.rating-count-large {
  font-size: 1.1rem;
  color: #6c757d;
  font-weight: 600;
}

.rating-stats-horizontal {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.rating-stat-horizontal {
  text-align: center;
}

.stat-value-horizontal {
  font-size: 2rem;
  font-weight: 700;
  color: #274690;
  margin-bottom: 0.25rem;
}

.stat-label-horizontal {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 600;
}

.stat-label-horizontal-small {
  font-size: 0.8rem;
  color: #999;
  font-style: italic;
}

.rating-metrics-horizontal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.rating-metric-horizontal {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rating-metric-horizontal:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.metric-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: linear-gradient(135deg, #274690 0%, #3867d6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.metric-content {
  flex: 1;
}

.metric-content .metric-label {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.metric-content .metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #274690;
  margin-bottom: 0.25rem;
}

.metric-content .metric-stars {
  display: flex;
  gap: 0.1rem;
}

.metric-content .metric-star {
  color: #ddd;
  font-size: 0.9rem;
}

.metric-content .metric-star.filled {
  color: #274690;
}

/* Responsive Design for Popup */
@media (max-width: 768px) {
  .rating-popup {
    padding: 1rem;
  }

  .rating-popup-content {
    max-height: 95vh;
  }

  .rating-popup-header {
    padding: 1rem;
  }

  .rating-popup-body {
    padding: 1rem;
  }

  .rating-summary-horizontal {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .rating-stats-horizontal {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .rating-metrics-horizontal {
    grid-template-columns: 1fr;
  }

  .rating-score-large {
    font-size: 3rem;
  }
}

/* Rating Summary Grid */
.rating-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.rating-summary-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rating-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.rating-summary-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, #274690, #4a90e2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.rating-summary-content {
  flex: 1;
}

.rating-summary-value {
  font-size: 2rem;
  font-weight: 700;
  color: #274690;
  margin-bottom: 0.25rem;
}

.rating-summary-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.rating-summary-stars {
  display: flex;
  gap: 0.1rem;
}

.rating-summary-subtitle {
  font-size: 0.8rem;
  color: #999;
}

/* Rating Metrics Section */
.rating-metrics-section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.rating-metrics-section h4 {
  color: #274690;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rating-metrics-section h4::before {
  content: '';
  width: 4px;
  height: 20px;
  background: #274690;
  border-radius: 2px;
}

.rating-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.rating-metric-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: background-color 0.2s ease;
}

.rating-metric-card:hover {
  background: #e9ecef;
}

.rating-metric-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #274690;
}

.rating-metric-header i {
  color: #274690;
}

.rating-metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #274690;
  margin-bottom: 0.5rem;
}

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

/* Rating View Tabs */
.rating-view-tab {
  transition: all 0.2s ease;
}

.rating-view-tab:hover {
  color: var(--primary) !important;
  background: rgba(39, 70, 144, 0.05);
}

.rating-view-content {
  animation: fadeIn 0.3s ease;
}

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

/* No Ratings State */
.no-ratings-state {
  text-align: center;
  padding: 3rem 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.no-ratings-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: #6c757d;
  font-size: 2rem;
}

.no-ratings-state h4 {
  color: #274690;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.no-ratings-state p {
  color: #666;
  font-size: 1rem;
  line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
  .rating-summary-grid {
    grid-template-columns: 1fr;
  }

  .rating-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rating-summary-card {
    padding: 1rem;
  }

  .rating-summary-value {
    font-size: 1.5rem;
  }

  .rating-card-header {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .rating-expand-icon {
    align-self: center;
  }

  .rating-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .rating-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .rating-metrics-grid {
    grid-template-columns: 1fr;
  }

  .rating-stats-row {
    grid-template-columns: 1fr;
  }

  .rating-metric-item {
    padding: 0.25rem;
  }

  .metric-value {
    font-size: 1rem;
  }

  .stat-number {
    font-size: 1.2rem;
  }
}

/* Money Tab Styles */
.money-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.money-summary-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.money-summary-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.money-summary-content {
  flex: 1;
}

.money-summary-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.money-summary-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.money-summary-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
}

.money-actions-section {
  margin-bottom: 2rem;
}

.money-actions-section h4 {
  color: var(--text);
  margin-bottom: 1rem;
  font-weight: 600;
}

.money-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.money-action-btn {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.money-action-btn:hover {
  border-color: var(--primary);
  background: var(--background);
  transform: translateY(-2px);
}

.money-action-btn.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.money-action-btn.primary:hover {
  background: var(--primary-light);
}

.money-action-btn i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.money-action-btn span {
  font-weight: 600;
  font-size: 1rem;
}

.money-action-btn small {
  font-size: 0.8rem;
  opacity: 0.8;
}

.driver-access-card {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 45%),
              radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.16), transparent 40%),
              linear-gradient(120deg, #0f172a, #1d4ed8, #0f172a);
  border-radius: 16px;
  padding: 1.75rem;
  color: #f8fafc;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.5rem;
  isolation: isolate;
}

.driver-access-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.12), transparent 30%),
              radial-gradient(circle at 30% 80%, rgba(37, 99, 235, 0.25), transparent 35%);
  pointer-events: none;
  z-index: 0;
}

.driver-access-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  align-items: center;
}

.driver-access-heading {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: 0.25px;
}

.driver-access-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #c7d2fe;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: fit-content;
}

.driver-access-copy {
  margin: 0.35rem 0 0.6rem;
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.driver-access-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.driver-access-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 0.85rem;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.driver-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-start;
}

.driver-access-button {
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.98rem;
}

.driver-access-button.primary {
  background: linear-gradient(135deg, #a855f7, #6366f1, #22d3ee);
  color: #0f172a;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.45);
}

.driver-access-button.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.driver-access-button.linky {
  background: transparent;
  color: #c7d2fe;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.driver-access-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.driver-access-button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.driver-access-status {
  font-weight: 700;
  color: #c7d2fe;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.driver-access-status strong {
  color: #fff;
}

.driver-access-note {
  color: #cbd5e1;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Simple modal for insufficient funds */
.insufficient-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.insufficient-modal-overlay.show {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

.insufficient-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.insufficient-modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.insufficient-modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #111827;
}

.insufficient-modal-body {
  padding: 1rem 1.25rem;
  color: #374151;
  font-size: 0.95rem;
}

.insufficient-modal-footer {
  padding: 0.75rem 1.25rem 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.insufficient-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  background: #f3f4f6;
  border-radius: 10px;
  color: #111827;
  font-weight: 600;
  font-size: 0.9rem;
}

.modal-btn {
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.modal-btn.primary {
  background: #2563eb;
  color: #fff;
}

.modal-btn.secondary {
  background: #eef2ff;
  color: #4338ca;
}

.modal-btn.ghost {
  background: transparent;
  color: #6b7280;
}

.pass-list-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

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

.pass-items {
  display: grid;
  gap: 0.5rem;
}

.pass-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pass-code {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  letter-spacing: 0.04em;
}

.pass-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.pass-pill {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--surface);
}

.pass-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.pass-actions button {
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  font-weight: 700;
}

.pass-actions .primary {
  background: var(--primary);
  color: #fff;
}

.pass-actions .secondary {
  background: var(--accent);
  color: var(--text);
}
/* Shared overlay styling reused for purchase confirmation */
.purchase-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  padding: 1rem;
}

.purchase-modal-overlay.show {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 960px) {
  .driver-access-grid {
    grid-template-columns: 1fr;
  }
}

.recent-transactions-section h4 {
  color: var(--text);
  margin-bottom: 1rem;
  font-weight: 600;
}

.transactions-list {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.transaction-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-info {
  display: flex;
  flex-direction: column;
}

.transaction-description {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.transaction-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.transaction-amount {
  font-weight: 600;
  font-size: 1.1rem;
}

.transaction-amount.positive {
  color: var(--success);
}

.transaction-amount.negative {
  color: var(--error);
}

.transaction-status {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.status-completed {
  background: #d4edda;
  color: #155724;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.list-toggle-btn {
  margin-top: 0.75rem;
  width: 100%;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  padding: 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.list-toggle-btn:hover {
  background: rgba(39, 70, 144, 0.08);
}

.insight-item-hidden {
  display: none !important;
}

.activity-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 5000;
}

.activity-modal.open {
  display: flex;
}

.activity-modal-content {
  width: min(600px, 95vw);
  max-height: 80vh;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 25px 45px rgba(15, 23, 42, 0.35);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.activity-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.activity-modal-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
}

.activity-modal-close:hover {
  color: var(--text);
}

.activity-modal-body {
  margin-top: 1rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* ============================================
   Modal & Form Styles
   ============================================ */

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--surface);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: var(--accent);
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
}

/* Special Trip Form Styles */
#specialTripModal .modal-content {
  max-width: 800px;
}

.time-preference-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.radio-option:hover {
  background-color: var(--accent);
}

.radio-option input[type="radio"] {
  margin: 0;
  cursor: pointer;
}

.radio-option span {
  cursor: pointer;
  font-weight: 500;
}

#specialTripLeaveByTimeGroup {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--accent);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}

#specialTripReturnFields {
  margin-top: 1rem;
  padding: 1rem;
  background: #fff3cd;
  border-radius: 8px;
  border-left: 4px solid var(--warning);
}

#specialTripReturnSpecificTimeGroup {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--accent);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}

#specialTripFixedDestinationFields {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  border-left: 4px solid var(--primary);
}

.form-help {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

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

.date-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.date-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.date-input input {
  flex: 1;
}

.date-input .remove-date {
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

/* Loading state for form */
.form-loading {
  opacity: 0.6;
  pointer-events: none;
}

.form-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Photo Deletion Modal Styles */
.delete-confirmation-content {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.photo-preview-container {
  flex-shrink: 0;
}

.delete-photo-preview {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #e9ecef;
}

.delete-message {
  flex: 1;
}

.delete-message p {
  margin-bottom: 0.75rem;
}

.text-warning {
  color: #ffc107 !important;
}

.text-danger {
  color: #dc3545 !important;
}

.text-muted {
  color: #6c757d !important;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
  margin-top: 1rem;
}

.delete-photo-btn {
  transition: all 0.2s ease;
}

.delete-photo-btn:hover {
  background-color: #c82333 !important;
  border-color: #bd2130 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
}

.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.375rem;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  text-decoration: none;
}

.btn-danger {
  color: #fff;
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-primary {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.btn:hover {
  opacity: 0.9;
}

/* Photo Bulk Controls */
.photo-controls {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.bulk-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  color: #495057;
}

.checkbox-container input[type="checkbox"] {
  margin-right: 0.5rem;
  transform: scale(1.2);
}

.bulk-actions {
  display: flex;
  gap: 0.5rem;
}

.photo-item {
  position: relative;
}

.photo-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  transform: scale(1.3);
}

.photo-item.selected {
  border: 2px solid #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.photo-item.selected .photo-image-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 123, 255, 0.1);
  pointer-events: none;
}

/* Responsive adjustments for delete modal */
@media (max-width: 768px) {
  .delete-confirmation-content {
    flex-direction: column;
    text-align: center;
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
  
  .bulk-controls {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .bulk-actions {
    justify-content: center;
  }
}

/* Responsive */
/* Vehicle Photo Styles */
.vehicle-photo-section {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.vehicle-photo-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #495057;
}

.vehicle-photo-header i {
  color: #6c757d;
}

.vehicle-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}

.vehicle-photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid #e9ecef;
  transition: all 0.2s ease;
}

.vehicle-photo-item:hover {
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.vehicle-photo-item.primary {
  border-color: #28a745;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.photo-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vehicle-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 0.75rem;
  text-align: center;
  padding: 0.5rem;
}

.photo-placeholder i {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  opacity: 0.5;
}

.photo-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 0.5rem 0.25rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  text-transform: capitalize;
}

.primary-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background: #28a745;
  color: white;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.vehicle-photo-item.more-photos {
  background: #6c757d;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vehicle-photo-item.more-photos:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.more-count {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.no-photos-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px dashed #dee2e6;
  color: #6c757d;
  font-style: italic;
  margin-bottom: 1rem;
}

.no-photos-section i {
  font-size: 1.25rem;
}

.vehicle-details-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }
  
  .vehicle-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
  }
  
  .modal-content {
    width: 95%;
    margin: 10px;
  }
}

/* Vehicle Info Styles */
.vehicle-info {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #007bff;
}

.vehicle-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
}

/* Slot Validation Styles */
.slot-validation {
  margin-top: 0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.slot-validation.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.slot-validation.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.slot-validation.loading {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.vehicle-details span {
  color: #495057;
}

.vehicle-model {
  font-weight: 600;
  color: #007bff !important;
}

.vehicle-plate {
  font-family: monospace;
  background: #e9ecef;
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
}

.vehicle-capacity {
  color: #28a745 !important;
}

.form-help {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.25rem;
  display: block;
}

/* Enhanced Slot Card Styles */
.slot-card {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 1rem 1.25rem 1.25rem;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  margin-bottom: 1.25rem;
}

.slot-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.slot-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  cursor: pointer;
}

.slot-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.slot-card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slot-card-title h4 {
  margin: 0;
  font-size: 1.05rem;
  color: #111827;
}

.slot-route {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  color: #1f2937;
}

.slot-route span {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.slot-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 0.85rem;
  font-weight: 500;
}

.slot-tag i {
  font-size: 0.85rem;
}

.slot-card-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-pill {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pill.status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.status-pill.status-paused {
  background: rgba(251, 191, 36, 0.2);
  color: #92400e;
}

.status-pill.status-inactive {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.status-pill.status-pending,
.status-pill.status-draft {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
}

.collapse-icon {
  font-size: 1rem;
  color: #6b7280;
  transition: transform 0.2s ease;
}

.slot-card-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eef2ff;
}

.slot-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.45rem 1rem;
}

.slot-card .card-content {
  padding: 1.25rem 0 0;
}

.slot-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-section {
  border-bottom: 1px solid #f1f3f4;
  padding-bottom: 1rem;
}

.detail-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vehicle-section {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  border-left: 4px solid #28a745;
}

.vehicle-section.no-vehicle {
  border-left-color: #ffc107;
  background: #fff3cd;
}

.vehicle-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.vehicle-title {
  font-weight: 600;
  color: #495057;
  font-size: 0.9rem;
}

.vehicle-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
}

.vehicle-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
}

.vehicle-label {
  font-size: 0.8rem;
  color: #6c757d;
  font-weight: 500;
}

.vehicle-value {
  font-size: 0.85rem;
  color: #495057;
  font-weight: 500;
}

.vehicle-plate {
  font-family: monospace;
  background: #e9ecef;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  color: #495057;
}

.vehicle-capacity {
  color: #28a745;
  font-weight: 600;
}

.no-vehicle-text {
  color: #856404;
  font-style: italic;
  font-size: 0.85rem;
}

.card-actions {
  margin-top: 1.5rem;
  display: flex !important;
  gap: 0.5rem;
  justify-content: flex-end;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure card actions are always visible in this section too */
.collapsible-card .card-actions {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.collapsible-content.collapsed .card-actions {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f3f4;
}

.card-row:last-child {
  border-bottom: none;
}

.card-label {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 500;
}

.card-value {
  font-size: 0.85rem;
  color: #495057;
  font-weight: 500;
  text-align: right;
}

/* Request Card Styles */
.request-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.request-card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
transform: translateY(-2px);
}

.request-date-group {
margin-bottom: 1rem;
border: 1px solid #e9ecef;
border-radius: 12px;
overflow: hidden;
background: #fff;
}

.request-month-group {
margin-bottom: 1rem;
border: 1px solid #dfe5ee;
border-radius: 12px;
overflow: hidden;
background: #f8fafc;
}

.request-month-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.9rem 1rem;
background: #eef2f7;
cursor: pointer;
border-bottom: 1px solid #dfe5ee;
}

.request-month-title {
font-weight: 800;
color: #0f172a;
font-size: 1rem;
letter-spacing: 0.2px;
}

.request-month-count {
color: #475569;
font-size: 0.85rem;
margin-left: auto;
margin-right: 0.5rem;
}

.request-month-toggle {
font-size: 0.9rem;
color: #475569;
transition: transform 0.2s ease;
}

.request-month-list.collapsed {
display: none;
}

.request-date-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.85rem 1rem;
background: #f8fafc;
cursor: pointer;
border-bottom: 1px solid #eef2f7;
}

.request-date-title {
font-weight: 700;
color: #0f172a;
font-size: 0.95rem;
}

.request-date-count {
color: #475569;
font-size: 0.85rem;
margin-left: auto;
margin-right: 0.5rem;
}

.request-date-toggle {
font-size: 0.9rem;
color: #475569;
transition: transform 0.2s ease;
}

.request-date-list.collapsed {
display: none;
}

.request-header {
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
color: white;
padding: 1rem 1.5rem;
display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.request-title {
  color: white;
  font-weight: 700;
  font-size: 1rem;
}

.request-type {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.request-icon {
  font-size: 1.2rem;
}

.request-title {
  font-weight: 600;
  font-size: 1rem;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.status-badge.status-pending {
  background: rgba(255, 193, 7, 0.2);
  color: #856404;
}

.status-badge.status-accepted {
  background: rgba(40, 167, 69, 0.2);
  color: #155724;
}

.status-badge.status-declined {
  background: rgba(220, 53, 69, 0.2);
  color: #721c24;
}

.request-content {
  padding: 1.5rem;
}

.request-details {
  margin-bottom: 1rem;
}

.detail-section {
  margin-bottom: 1rem;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--accent), #f8fbff);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  transition: all 0.3s ease;
}

.detail-section:hover {
  background: linear-gradient(135deg, #f8fbff, var(--accent));
  transform: translateX(5px);
}

.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f1f3f4;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 500;
  min-width: 80px;
}

.detail-value {
  font-size: 0.85rem;
  color: #495057;
  font-weight: 500;
  text-align: right;
  flex: 1;
  margin-left: 1rem;
}

.negotiation-section {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 1rem;
  margin: 0.75rem 0;
}

.negotiation-header {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.negotiation-section .detail-row {
  border-bottom: 1px solid #bae6fd;
  padding: 0.5rem 0;
}

.negotiation-section .detail-row:last-of-type {
  border-bottom: none;
}

.offer-note {
  font-size: 0.8rem;
  color: #0369a1;
  background: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-left: 3px solid #0ea5e9;
}

.offer-note i {
  color: #0ea5e9;
}

.request-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.request-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.request-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.request-status-info {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.status-text {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.status-text.status-accepted {
  background: rgba(40, 167, 69, 0.1);
  color: #155724;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-text.status-declined {
  background: rgba(220, 53, 69, 0.1);
  color: #721c24;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Empty state for requests */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  color: #495057;
}

.empty-state p {
  margin-bottom: 1.5rem;
  opacity: 0.8;
}





/* ============================================
   Schedules Pane & Responsive Styles
   ============================================ */

/* Schedules Pane Styles */
.schedules-pane {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.schedules-pane.open {
  transform: translateX(0);
}

.schedules-pane-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
  background: var(--primary);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.schedules-pane-title h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.schedules-pane-title p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.close-schedules-pane {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.close-schedules-pane:hover {
  background: rgba(255,255,255,0.1);
}

.schedules-pane-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.schedules-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.schedules-empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

.schedules-empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary);
  opacity: 0.5;
}

.schedules-empty-state h4 {
  margin: 0 0 0.5rem 0;
  color: var(--text);
}

.schedules-empty-state p {
  margin: 0;
  font-size: 0.9rem;
}

.schedule-item {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.2s;
}

.schedule-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

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

.schedule-customer {
  font-weight: 600;
  color: var(--text);
}

.schedule-status {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.schedule-status.pending {
  background: #fff3cd;
  color: #856404;
}

.schedule-status.accepted {
  background: #d4edda;
  color: #155724;
}

.schedule-status.rejected {
  background: #f8d7da;
  color: #721c24;
}

.schedule-details {
  font-size: 0.9rem;
  color: var(--muted);
}

.schedule-details .detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.schedule-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.schedule-actions .btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.schedule-actions .btn-accept {
  background: #28a745;
  color: white;
}

.schedule-actions .btn-accept:hover {
  background: #218838;
}

.schedule-actions .btn-reject {
  background: #dc3545;
  color: white;
}

.schedule-actions .btn-reject:hover {
  background: #c82333;
}

.schedule-actions .btn-view {
  background: var(--primary);
  color: white;
}

.schedule-actions .btn-view:hover {
  background: var(--primary-light);
}

/* Schedule Date Group Styles */
.schedule-date-group {
  margin-bottom: 2rem;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
}

.date-header {
  background: var(--primary);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.date-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.schedule-count {
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.schedules-for-date {
  padding: 1rem;
  background: white;
}

/* Enhanced Schedule Item Styles */
.schedule-item {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.2s;
}

.schedule-item:last-child {
  margin-bottom: 0;
}

.schedule-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.schedule-customer {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.child-name {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: normal;
}

/* Timing Section */
.schedule-timing {
  margin: 1rem 0;
  padding: 1rem;
  background: white;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.timing-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.timing-row:last-child {
  margin-bottom: 0;
}

.timing-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 4px;
}

.timing-item i {
  color: var(--primary);
  width: 16px;
  text-align: center;
}

.timing-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  min-width: 80px;
}

.timing-value {
  font-weight: 600;
  color: var(--text);
}

/* Locations Section */
.schedule-locations {
  margin: 1rem 0;
  padding: 1rem;
  background: white;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.location-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 4px;
}

.location-item:last-child {
  margin-bottom: 0;
}

.location-item i {
  color: var(--primary);
  width: 16px;
  text-align: center;
}

.pickup-icon {
  color: #28a745;
}

.school-icon {
  color: #007bff;
}

.location-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  min-width: 60px;
}

.location-value {
  font-size: 0.9rem;
  color: var(--text);
  flex: 1;
}

/* Notes Section */
.schedule-notes {
  margin: 1rem 0;
  padding: 1rem;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.schedule-notes i {
  color: #856404;
  margin-top: 0.1rem;
}

.notes-label {
  font-size: 0.85rem;
  color: #856404;
  font-weight: 500;
  min-width: 50px;
}

.notes-value {
  font-size: 0.9rem;
  color: #856404;
  flex: 1;
}


.chat-item {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-item:hover {
  background: rgba(0,123,255,0.05);
}

.chat-item.active {
  background: rgba(0,123,255,0.1);
  border-left: 3px solid var(--primary);
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

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

.chat-name {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-preview {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.chat-time {
  font-size: 0.75rem;
  color: var(--muted);
}

.chat-unread {
  background: var(--danger);
  color: white;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
}

.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}

.chat-empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.chat-empty-state h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.chat-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--muted);
}

.chat-loading i {
  margin-right: 0.5rem;
  animation: spin 1s linear infinite;
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.document-card .card-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.document-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.document-status.status-ready {
  background: rgba(40, 167, 69, 0.15);
  color: var(--success);
  border-color: rgba(40, 167, 69, 0.4);
}

.document-status.status-missing {
  background: rgba(220, 53, 69, 0.1);
  color: var(--error);
  border-color: rgba(220, 53, 69, 0.4);
}

.document-status.status-optional {
  background: rgba(108, 117, 125, 0.1);
  color: var(--secondary);
  border-color: rgba(108, 117, 125, 0.4);
}

.document-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.document-card p {
  margin: 0;
  color: var(--muted);
}

.document-card .card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .schedules-pane {
    width: 100%;
  }
  
  .chat-pane {
    width: 100%;
  }
  
  .timing-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .timing-item {
    justify-content: space-between;
  }
}

/* ── Direction Selector ── */
.direction-selector {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.direction-btn {
  flex: 1;
  min-width: 140px;
  padding: 1rem 0.75rem 0.875rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.875rem;
  background: #f9fafb;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  font-family: inherit;
  position: relative;
}

.direction-btn:hover {
  border-color: #b0b8c9;
  background: #f3f4f6;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.direction-btn.active {
  border-color: #21409a;
  background: linear-gradient(135deg, rgba(33, 64, 154, 0.07), rgba(33, 64, 154, 0.03));
  box-shadow: 0 0 0 1px #21409a, 0 4px 12px rgba(33, 64, 154, 0.12);
}

.direction-btn .direction-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0 auto 0.5rem;
  transition: all 0.2s ease;
}

.direction-btn:hover .direction-icon {
  background: #d1d5db;
}

.direction-btn.active .direction-icon {
  background: #21409a;
  color: #fff;
}

.direction-label {
  display: block;
  font-weight: 700;
  font-size: 0.8125rem;
  color: #1f2937;
  margin-bottom: 3px;
  line-height: 1.2;
}

.direction-sub {
  display: block;
  font-size: 0.6875rem;
  color: #9ca3af;
  font-weight: 400;
  line-height: 1.35;
}

.direction-btn.active .direction-label {
  color: #21409a;
}

.direction-btn.active .direction-sub {
  color: #6b7280;
}

.direction-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  background: rgba(33, 64, 154, 0.08);
  color: #21409a;
}

@media (max-width: 480px) {
  .direction-selector {
    flex-direction: column;
  }

  .direction-btn {
    min-width: unset;
  }
}
