/* ==========================================
   RAITGO CUSTOMER WEB - CUSTOM DESIGN SYSTEM
   ========================================== */

/* Design Tokens & Variables */
:root {
  /* Light Theme Variables (Default) */
  --bg-primary: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  --bg-input-focus: #e2e8f0;
  
  --border-color: #e2e8f0;
  --border-trans: rgba(226, 232, 240, 0.6);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  /* Primary & Accents */
  --primary: #00b14f;
  --primary-hover: #009944;
  --primary-light: rgba(0, 177, 79, 0.1);
  
  --accent-blue: #2563eb;
  --accent-red: #ef4444;
  --accent-red-hover: #dc2626;
  --accent-red-light: rgba(239, 68, 68, 0.1);
  --accent-black: #0f172a;
  --accent-black-hover: #1e293b;
  
  /* Utility & Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --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-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-sans: 'Outfit', sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Overrides */
body.dark-theme {
  --bg-primary: #0f172a;
  --bg-sidebar: #1e293b;
  --bg-card: #334155;
  --bg-input: #1e293b;
  --bg-input-focus: #475569;
  
  --border-color: #334155;
  --border-trans: rgba(51, 65, 85, 0.6);
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  --primary-light: rgba(0, 177, 79, 0.2);
  --accent-black: #cbd5e1;
  --accent-black-hover: #f8fafc;
  
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* Global Reset & Presets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Main Application Layout (Flex row split) */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
}

/* 1. SIDEBAR PANEL */
.sidebar {
  width: 420px;
  min-width: 380px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  transition: transform var(--transition-normal), background-color var(--transition-normal), border-color var(--transition-normal);
  position: relative;
}

/* Brand Header */
.brand-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 28px;
  animation: bounce-logo 2s infinite ease-in-out;
}

.logo-text {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.logo-text span {
  color: var(--primary);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--bg-input);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background-color: var(--bg-input-focus);
  transform: translateY(-2px);
}

.theme-icon-dark, .theme-icon-light {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

body.light-theme .theme-icon-light { display: none; }
body.dark-theme .theme-icon-dark { display: none; }

/* Panel Content Area (Scrollable steps holder) */
.panel-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  position: relative;
}

/* Hide standard scrollbars for a clean look */
.panel-content::-webkit-scrollbar {
  width: 5px;
}
.panel-content::-webkit-scrollbar-track {
  background: transparent;
}
.panel-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

/* Sections Wrapper */
.panel-section {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.panel-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* 2. AUTHENTICATION SCREENS CSS */
.auth-step {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.auth-step.active {
  display: block;
  opacity: 1;
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Custom Styled Input Prefix wrapper */
.input-wrapper {
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 16px;
  height: 52px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
  background-color: var(--bg-sidebar);
}

.input-prefix {
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 12px;
  font-size: 15px;
}

.input-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  outline: none;
  width: 100%;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.input-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Back Link Button */
.btn-back {
  background: none;
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 24px;
  transition: color var(--transition-fast);
}

.btn-back:hover {
  color: var(--primary);
}

.btn-back svg {
  width: 16px;
  height: 16px;
}

/* OTP 6-Digit input boxes */
.otp-inputs-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.otp-digit {
  width: 100%;
  min-width: 0;
  height: 54px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-sans);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.otp-digit:focus {
  border-color: var(--primary);
  background-color: var(--bg-sidebar);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.timer-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

#otp-timer {
  color: var(--accent-red);
  font-weight: 700;
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.btn-text:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.dev-bypass-tip {
  margin-top: 24px;
  padding: 12px;
  background-color: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-primary);
}

/* 3. LOGGED IN DASHBOARD SCREENS CSS */
.user-header {
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  font-weight: 700;
}

.user-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.user-phone {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Hailing Flow Containers */
.hailing-flow {
  position: relative;
  width: 100%;
}

.flow-step {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.flow-step.active {
  display: block;
  opacity: 1;
}

.flow-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.flow-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Location input forms with connected line indicator */
.location-form {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  margin-bottom: 20px;
}

.location-group {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.location-group:first-child {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  margin-bottom: 6px;
}

.location-group:last-child {
  padding-top: 14px;
}

.loc-indicator {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  z-index: 2;
}

.loc-indicator.pickup {
  background-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.loc-indicator.dropoff {
  background-color: var(--accent-red);
  box-shadow: 0 0 0 4px var(--accent-red-light);
}

/* vertical dashed line between indicators */
.location-form::after {
  content: "";
  position: absolute;
  top: 40px;
  left: 21px;
  width: 2px;
  height: 38px;
  border-left: 2px dashed var(--text-muted);
  z-index: 1;
}

.loc-input-box {
  flex: 1;
  position: relative;
}

.loc-input-box label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.loc-input-box input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
}

.loc-input-box input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.clear-input-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
}

.clear-input-btn svg {
  width: 16px;
  height: 16px;
}

/* Autocomplete suggestions dropdowns */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  z-index: 200;
  margin-top: 6px;
  display: none;
}

.suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-primary);
  transition: background var(--transition-fast);
}

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

.suggestion-item:hover {
  background-color: var(--bg-primary);
  color: var(--primary);
}

.suggestion-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Quick locations */
.quick-locations {
  margin-top: 28px;
}

.sub-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.quick-location-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

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

.quick-icon {
  font-size: 20px;
  width: 38px;
  height: 38px;
  background-color: var(--bg-input);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius-md);
}

.quick-location-item h5 {
  font-size: 14px;
  font-weight: 700;
}

.quick-location-item p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 4. STEP QUOTE CSS */
.route-summary-box {
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.route-point {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.route-point:last-of-type {
  margin-bottom: 0;
}

.point-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

.point-dot.pickup { background-color: var(--primary); }
.point-dot.dropoff { background-color: var(--accent-red); }

.point-address {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 20px);
}

.route-meta {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.meta-dot {
  color: var(--text-muted);
}

/* Vehicle cards selector lists */
.vehicle-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.vehicle-option-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  background-color: var(--bg-sidebar);
  transition: all var(--transition-fast);
}

.vehicle-option-card:hover {
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.vehicle-option-card.active {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.vehicle-icon {
  font-size: 28px;
  width: 52px;
  height: 52px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: center;
  align-items: center;
}

.vehicle-option-card.active .vehicle-icon {
  background-color: var(--bg-sidebar);
}

.vehicle-info-content {
  flex: 1;
}

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

.vehicle-name-row h4 {
  font-size: 16px;
  font-weight: 700;
}

.vehicle-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
}

.original-price {
  font-size: 12px;
  text-decoration: line-through;
  color: var(--text-muted);
  margin-right: 6px;
}

.vehicle-price.discounted {
  color: var(--primary);
}

.vehicle-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Share pooling seat picker */
.shared-seats-panel {
  display: none;
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  animation: slide-down 0.2s ease-out;
}

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

.shared-seats-panel label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.custom-select {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-sidebar);
  color: var(--text-primary);
  padding: 0 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

/* Payment selector row */
.payment-method-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.payment-icon {
  width: 22px;
  height: 22px;
  color: var(--text-secondary);
}

.payment-details {
  flex: 1;
}

.payment-details label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.payment-select {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  outline: none;
  width: 100%;
  cursor: pointer;
}

/* 5. RADAR SCREEN CSS (Matching drivers) */
.radar-container {
  width: 180px;
  height: 180px;
  margin: 36px auto;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.radar-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid var(--primary);
  border-radius: var(--radius-full);
  opacity: 0.2;
  animation: radar-pulse 3s infinite linear;
}

.radar-circle.delayed {
  animation-delay: 1.5s;
}

.radar-scanner {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: conic-gradient(from 0deg, var(--primary-light) 0%, transparent 60%);
  animation: rotate-scanner 2.5s infinite linear;
}

.radar-avatar {
  width: 60px;
  height: 60px;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0, 177, 79, 0.4);
  z-index: 10;
  animation: pulse-avatar 2s infinite ease-in-out;
}

@keyframes radar-pulse {
  0% { transform: scale(0.3); opacity: 0.8; }
  100% { transform: scale(1.2); opacity: 0; }
}

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

@keyframes pulse-avatar {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.finding-details {
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border-color);
}

.finding-detail-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.finding-detail-item .label {
  color: var(--text-secondary);
  font-weight: 500;
}

.finding-detail-item .value {
  font-weight: 700;
  color: var(--primary);
}

/* 6. TRACKING SCREEN CSS */
.driver-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  position: relative;
}

.driver-avatar-wrapper {
  position: relative;
  width: 58px;
  height: 58px;
}

.driver-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary);
}

.driver-rating {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent-black);
  color: white;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.driver-rating svg {
  width: 8px;
  height: 8px;
  fill: #fbbf24;
  color: #fbbf24;
}

.driver-text-info {
  flex: 1;
}

.driver-text-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.driver-vehicle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.license-badge {
  display: inline-block;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}

.driver-contact {
  display: flex;
  align-items: center;
}

/* Journey progression line style */
.journey-progress {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  padding-left: 8px;
}

.journey-progress::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 20px;
  bottom: 12px;
  width: 2px;
  background-color: var(--border-color);
  z-index: 1;
}

.checkpoint {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  z-index: 2;
}

.checkpoint-indicator {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background-color: var(--bg-sidebar);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  transition: all var(--transition-fast);
}

.checkpoint.active .checkpoint-indicator {
  border-color: var(--primary);
  background-color: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px var(--primary-light);
}

.checkpoint.done .checkpoint-indicator {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary);
}

.checkpoint-text h5 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.checkpoint-text p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.checkpoint.active .checkpoint-text h5 {
  color: var(--primary);
}

/* Chat Module (Messenger mock style) */
.chat-module {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 12px 16px;
  background-color: var(--bg-input-focus);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
}

.chat-messages {
  height: 140px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.4;
  word-wrap: break-word;
}

.chat-bubble.system {
  align-self: center;
  background-color: transparent;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}

.chat-bubble.driver {
  align-self: flex-start;
  background-color: var(--bg-sidebar);
  color: var(--text-primary);
  border-bottom-left-radius: 2px;
  border: 1px solid var(--border-color);
}

.chat-bubble.customer {
  align-self: flex-end;
  background-color: var(--primary);
  color: white;
  border-bottom-right-radius: 2px;
}

.chat-input-row {
  display: flex;
  padding: 8px;
  background-color: var(--bg-sidebar);
  border-top: 1px solid var(--border-color);
  align-items: center;
}

.chat-input-row input {
  flex: 1;
  height: 36px;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 0 8px;
  color: var(--text-primary);
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border: none;
  background-color: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.chat-send-btn svg {
  width: 14px;
  height: 14px;
}

/* 7. COMPLETE / RECEIPT SCREEN */
.receipt-header {
  text-align: center;
  margin: 20px 0 28px;
}

.success-checkmark {
  font-size: 44px;
  margin-bottom: 12px;
}

.receipt-header h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.receipt-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

.receipt-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.receipt-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
}

.receipt-row span {
  color: var(--text-secondary);
}

.receipt-row strong {
  color: var(--text-primary);
}

.receipt-divider {
  border-top: 1px dashed var(--border-color);
  margin: 14px 0;
}

.receipt-row.total {
  margin-bottom: 0;
  font-size: 16px;
}

.receipt-row.total span {
  font-weight: 700;
  color: var(--text-primary);
}

.receipt-row.total strong {
  font-size: 20px;
  color: var(--primary);
  font-weight: 800;
}

/* Star rating styles */
.rating-feedback-area {
  text-align: center;
  margin-bottom: 28px;
}

.rating-feedback-area h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

.star-rating-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.star-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  outline: none;
  transition: transform var(--transition-fast);
}

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

.star-btn svg {
  width: 32px;
  height: 32px;
}

.star-btn.active {
  color: #fbbf24;
}

.star-btn.active svg {
  fill: #fbbf24;
}

.rating-feedback-area textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 12px;
  outline: none;
  resize: vertical;
  transition: border-color var(--transition-fast);
}

.rating-feedback-area textarea:focus {
  border-color: var(--primary);
  background-color: var(--bg-sidebar);
}

/* Button UI Components */
.btn {
  height: 52px;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(0, 177, 79, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(0, 177, 79, 0.35);
  transform: translateY(-1px);
}

.btn-black {
  background-color: var(--accent-black);
  color: var(--bg-sidebar);
}

.btn-black:hover:not(:disabled) {
  background-color: var(--accent-black-hover);
  transform: translateY(-1px);
}

.btn-green {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(0, 177, 79, 0.25);
}

.btn-green:hover:not(:disabled) {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-red {
  background-color: var(--accent-red);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

.btn-red:hover:not(:disabled) {
  background-color: var(--accent-red-hover);
  transform: translateY(-1px);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.btn-icon:hover {
  background-color: var(--bg-input);
  color: var(--text-primary);
}

.btn-circle {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-circle:hover {
  background-color: var(--primary-hover);
  transform: scale(1.05);
}

.clickable:active {
  transform: scale(0.98) !important;
}

/* ==========================================
   5. RIGHT PANEL - MAP VIEWPORT
   ========================================== */
.map-viewport {
  flex: 1;
  position: relative;
  height: 100vh;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 10;
}

/* Leaflet Map Dark filter overlays */
body.dark-theme .leaflet-tile-pane {
  filter: invert(90%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

.map-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  z-index: 50;
  transition: opacity 0.4s ease;
}

body.dark-theme .map-loading-overlay {
  background-color: rgba(15, 23, 42, 0.85);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: rotate-scanner 1s linear infinite;
}

.map-state-tag {
  position: absolute;
  top: 24px;
  right: 24px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 30;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  animation: pulse-dot-anim 1.5s infinite alternate;
}

@keyframes pulse-dot-anim {
  from { transform: scale(0.8); opacity: 0.5; }
  to { transform: scale(1.3); opacity: 1; }
}

/* ==========================================
   6. GLOBAL TOAST ALERTS & UTILS
   ========================================== */
.toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background-color: var(--accent-black);
  color: white;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(-20px);
  animation: slide-toast 3.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  pointer-events: auto;
}

.toast.error {
  background-color: var(--accent-red);
}

.toast.success {
  background-color: var(--primary);
}

@keyframes slide-toast {
  0% { opacity: 0; transform: translateY(-20px) translateX(0); }
  10% { opacity: 1; transform: translateY(0) translateX(0); }
  90% { opacity: 1; transform: translateY(0) translateX(0); }
  100% { opacity: 0; transform: translateY(-20px) translateX(0); }
}

/* Animations keyframes */
@keyframes bounce-logo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Responsive Styles for Tablet & Mobile */
@media (max-width: 992px) {
  .sidebar {
    width: 360px;
  }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column-reverse;
  }
  
  .sidebar {
    width: 100%;
    height: 50vh;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    border-right: none;
    border-top: 1px solid var(--border-color);
  }
  
  .map-viewport {
    height: 50vh;
    width: 100%;
  }

  .map-state-tag {
    top: 16px;
    right: 16px;
    padding: 8px 12px;
    font-size: 11px;
  }
}
