:root {
  --bg-primary: #0a0f1d;
  --bg-secondary: #131b2e;
  --bg-card: #1c2640;
  --bg-hover: #263353;
  --accent-emerald: #10b981;
  --accent-emerald-hover: #059669;
  --accent-blue: #3b82f6;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
  --border-color: #273553;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-c {
  color: var(--accent-emerald);
}

.brand-share {
  color: #ffffff;
}

.brand-tagline {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
}

.user-badge-name {
  font-size: 13px;
  font-weight: 600;
}

.wallet-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-emerald);
  cursor: pointer;
  background: rgba(16, 185, 129, 0.12);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.wallet-badge:hover {
  background: rgba(16, 185, 129, 0.24);
}

/* Nav Tabs */
.nav-links {
  display: flex;
  gap: 8px;
}

.nav-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover, .nav-btn.active {
  color: #ffffff;
  background: var(--bg-card);
}

.btn-logout {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* Main Views */
#main-view {
  flex: 1;
  padding: 24px;
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}

.hidden {
  display: none !important;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
  color: var(--text-muted);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(16, 185, 129, 0.15);
  border-top-color: var(--accent-emerald);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Common Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent-emerald);
  color: #042f1a;
  font-weight: 700;
}

.btn-primary:hover {
  background-color: var(--accent-emerald-hover);
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: var(--bg-card);
}

.btn-danger {
  background: var(--accent-red);
  color: #ffffff;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 14px 20px;
  font-size: 16px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-live {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-bank {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

/* Auth View */
#auth-view {
  max-width: 580px;
  margin: 30px auto;
}

.auth-hero {
  text-align: center;
  margin-bottom: 24px;
}

.auth-hero h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: #ffffff;
}

.auth-hero p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 6px;
  background-color: var(--bg-primary);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.auth-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background-color: var(--bg-card);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input, .form-group select {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

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

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

/* Vehicle Powertrain Selection */
.vehicle-selection-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--radius-sm);
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.radio-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-card {
  display: flex;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.radio-card input {
  margin-top: 4px;
  margin-right: 8px;
}

.radio-card-body strong {
  display: block;
  font-size: 13px;
  color: #ffffff;
}

.radio-card-body small {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  display: block;
}

.hire-purchase-notice {
  display: flex;
  gap: 10px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: #bfdbfe;
  line-height: 1.4;
}

/* Quick Demo Box */
.quick-demo-box {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.quick-demo-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.quick-demo-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-demo {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.btn-demo:hover {
  background-color: var(--bg-hover);
  border-color: var(--accent-emerald);
}

/* Commuter Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 24px;
}

.booking-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h2, .card-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.location-input-group label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-green {
  background-color: var(--accent-emerald);
}

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

.input-with-action {
  display: flex;
  gap: 6px;
}

.input-with-action input {
  flex: 1;
}

.btn-input-action {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  cursor: pointer;
}

.location-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.chip {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover {
  background-color: var(--bg-hover);
  color: #ffffff;
}

/* Category Grid */
.ride-category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.category-card {
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-card input {
  display: none;
}

.category-card.active {
  border-color: var(--accent-emerald);
  background-color: rgba(16, 185, 129, 0.08);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-header .title {
  font-size: 14px;
  color: #ffffff;
}

.category-card .subtitle {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.category-price {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-emerald);
}

.category-price small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Route Estimate Box */
.estimate-summary-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.estimate-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.estimate-item .label {
  color: var(--text-muted);
}

.estimate-item .value {
  font-weight: 600;
}

.total-fare-item {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.total-fare {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-emerald);
}

.total-fare small {
  font-size: 12px;
  color: var(--text-muted);
}

/* Map & Tracking Area */
.map-and-tracking-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.map-container {
  height: 380px;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  z-index: 1;
}

.map-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.fleet-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

/* Active Ride Banner */
.active-ride-banner {
  background: linear-gradient(135deg, #1c2e4a 0%, #17243c 100%);
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow);
}

.ride-banner-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

.pulse-indicator {
  width: 10px;
  height: 10px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.ride-banner-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.driver-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

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

/* Recent Trips List */
.recent-trips-section {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.recent-trips-section h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

.recent-trips-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trip-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.trip-route strong {
  display: block;
  font-size: 13px;
  color: #ffffff;
}

.trip-route small {
  color: var(--text-muted);
}

.trip-fare {
  text-align: right;
  font-weight: 700;
  color: var(--accent-emerald);
}

/* Driver Console */
.driver-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 24px;
}

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

.driver-avatar-lg {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.vehicle-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-top: 4px;
}

.online-toggle-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-label {
  font-size: 13px;
  font-weight: 600;
}

/* Switch UI */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #475569;
  transition: .3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-emerald);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.driver-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.driver-queue-card, .driver-stats-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.requests-queue-container {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.request-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.request-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.request-route {
  font-size: 14px;
  color: #ffffff;
}

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

.empty-state {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

/* Driver Stats & HP Ledger */
.stats-metric-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.metric-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.metric-card .label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.metric-card .amount {
  font-size: 20px;
  font-weight: 800;
  display: block;
}

.metric-card .usd-equivalent {
  font-size: 12px;
  color: var(--text-muted);
}

.bank-escrow-card {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}

.escrow-note {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.active-contract-summary {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.active-contract-summary h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.contract-table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
}

.contract-table td {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.contract-table td:last-child {
  text-align: right;
}

/* PremiumTrust Bank Ledger View */
.bank-ledger-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.bank-ledger-header h2 {
  font-size: 22px;
  font-weight: 800;
}

.bank-ledger-header p {
  color: var(--text-muted);
  font-size: 13px;
}

.bank-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.bank-kpi-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.bank-kpi-card .label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
}

.bank-kpi-card .val {
  font-size: 22px;
  font-weight: 800;
  display: block;
  margin: 4px 0;
}

.bank-kpi-card small {
  font-size: 11px;
  color: var(--text-muted);
}

.text-emerald {
  color: var(--accent-emerald) !important;
}

.text-emerald-bg {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.06);
}

.text-success {
  color: #34d399;
}

.table-responsive {
  overflow-x: auto;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.bank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.bank-table th {
  background-color: var(--bg-card);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 11px;
}

.bank-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.bank-table tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 24px;
  box-shadow: var(--shadow);
}

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

.btn-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}

.amount-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.btn-preset {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

.btn-preset.active {
  background-color: var(--accent-emerald);
  color: #042f1a;
  border-color: var(--accent-emerald);
}

/* Mobile Media Queries */
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .driver-grid {
    grid-template-columns: 1fr;
  }
  .bank-kpi-row {
    grid-template-columns: 1fr 1fr;
  }
  .app-header {
    padding: 10px 14px;
  }
  #main-view {
    padding: 14px;
  }
  .map-container {
    height: 300px;
  }
}


/* Additional Anti-Overcrowding & Admin Compliance Styles */
.admin-kyc-alert {
  display: flex;
  gap: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #fde68a;
  line-height: 1.4;
  margin-bottom: 8px;
}

.comfort-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #a7f3d0;
}

.ride-category-grid-three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

@media (max-width: 600px) {
  .ride-category-grid-three {
    grid-template-columns: 1fr;
  }
}

.corridor-fleet-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fleet-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.fleet-vacancy-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fleet-car-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.fleet-car-item:hover, .fleet-car-item.selected {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
}

.fleet-car-info {
  display: flex;
  flex-direction: column;
}

.fleet-car-seats {
  display: flex;
  align-items: center;
  gap: 6px;
}

.seat-pill {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.seat-pill-green {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.seat-pill-red {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.driver-seat-status-box {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
}

.seat-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.seat-metric .label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.seat-metric .val {
  font-size: 13px;
  font-weight: 700;
}

.driver-compliance-banner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--accent-yellow);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 13px;
  color: #fef3c7;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger-outline {
  background: transparent;
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* Dynamic QR Code Components */
.btn-qr-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-qr-pill:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: #10b981;
  color: #ffffff;
  transform: translateY(-1px);
}

#app-qr-canvas canvas, #app-qr-canvas img,
#active-sub-qr-canvas canvas, #active-sub-qr-canvas img,
#fs-pass-qr-canvas canvas, #fs-pass-qr-canvas img {
  display: block;
  margin: 0 auto;
}


/* ==========================================================================
   ACTIVE RIDE & DRIVER COMMUNICATION SUITE (CHAT & IN-APP DATA CALL)
   ========================================================================== */

.active-ride-card {
  background: linear-gradient(135deg, #131d36 0%, #0d1527 100%);
  border: 2px solid #38bdf8;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.15);
  animation: fadeInDown 0.3s ease-out;
}

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

.active-ride-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.seat-badge-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 8px 14px;
  border-radius: 12px;
}

.seat-badge-hero .seat-icon {
  font-size: 26px;
}

.seat-badge-hero .seat-label {
  font-size: 11px;
  color: #34d399;
  text-transform: uppercase;
  font-weight: 700;
  display: block;
}

.seat-badge-hero .seat-number {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.ride-trip-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-family: monospace;
  color: #94a3b8;
}

.active-ride-driver-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0;
}

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

.driver-avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.driver-subinfo {
  font-size: 13px;
  color: #cbd5e1;
  margin: 2px 0 4px;
}

.driver-rating-pill {
  font-size: 11px;
  color: #f59e0b;
  font-weight: 700;
}

/* Big Action Buttons for Chat and Call */
.comm-actions-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-comm {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.btn-comm .comm-icon {
  font-size: 22px;
}

.btn-comm .comm-text strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.btn-comm .comm-text small {
  font-size: 11px;
  opacity: 0.85;
}

.btn-comm-chat {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.btn-comm-chat:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-2px);
}

.btn-comm-call {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-comm-call:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
}

.ride-secondary-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------------------------------
   IN-APP CHAT MODAL
   -------------------------------------------------------------------------- */
.chat-modal-content {
  max-width: 480px;
  height: 600px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #0d1527;
  border: 1px solid #38bdf8;
  border-radius: 16px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #131d36;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.chat-seat-tag {
  font-size: 11px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
}

.chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #0a0f1d;
}

.chat-system-bubble {
  align-self: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 14px;
  text-align: center;
  max-width: 90%;
}

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
  position: relative;
  word-break: break-word;
}

.chat-bubble-rider {
  align-self: flex-end;
  background: #0284c7;
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.chat-bubble-driver {
  align-self: flex-start;
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid #334155;
  border-bottom-left-radius: 2px;
}

.chat-bubble .chat-sender {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
  opacity: 0.9;
}

.chat-bubble .chat-time {
  font-size: 10px;
  opacity: 0.75;
  text-align: right;
  margin-top: 4px;
  display: block;
}

.chat-quick-chips {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  background: #10182b;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.quick-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 16px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-chip:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #131d36;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-input-bar input {
  flex: 1;
  background: #0a0f1d;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 24px;
  font-size: 13px;
  outline: none;
}

.chat-input-bar input:focus {
  border-color: #38bdf8;
}

.btn-chat-send {
  border-radius: 24px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.chat-footer-notice {
  font-size: 10px;
  color: #64748b;
  text-align: center;
  padding: 6px 12px 10px;
  background: #131d36;
}

/* --------------------------------------------------------------------------
   IN-APP DATA CALL MODAL
   -------------------------------------------------------------------------- */
.call-modal-content {
  max-width: 400px;
  background: linear-gradient(180deg, #0b132b 0%, #060b18 100%);
  border: 2px solid #10b981;
  border-radius: 20px;
  text-align: center;
  padding: 32px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(16, 185, 129, 0.2);
}

.call-security-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.call-avatar-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
}

.call-avatar {
  position: relative;
  z-index: 2;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #1e293b;
  border: 3px solid #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.call-radar-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid #10b981;
  animation: radarPulse 2s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ring-2 {
  animation-delay: 0.6s;
}

@keyframes radarPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

.call-seat-pill {
  font-size: 12px;
  color: #38bdf8;
  margin: 4px 0 16px;
  font-weight: 600;
}

.call-status-box {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 16px;
}

.call-status-box span {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.call-timer {
  font-size: 22px;
  font-weight: 800;
  font-family: monospace;
  color: #34d399;
  margin-top: 4px;
}

.call-audio-waves {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  height: 30px;
  margin-bottom: 24px;
}

.wave-bar {
  width: 4px;
  height: 8px;
  background: #34d399;
  border-radius: 4px;
  animation: waveMotion 1.2s infinite ease-in-out;
}

.wave-bar:nth-child(2) { animation-delay: 0.2s; }
.wave-bar:nth-child(3) { animation-delay: 0.4s; }
.wave-bar:nth-child(4) { animation-delay: 0.6s; }
.wave-bar:nth-child(5) { animation-delay: 0.8s; }

@keyframes waveMotion {
  0%, 100% { height: 6px; }
  50% { height: 26px; }
}

.call-actions-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.btn-call-tool {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-call-tool.active {
  background: #3b82f6;
  border-color: #60a5fa;
}

.btn-call-tool .tool-icon {
  font-size: 20px;
}

.btn-call-tool .tool-label {
  font-size: 9px;
  margin-top: 2px;
}

.btn-call-end {
  background: #ef4444;
  border: none;
  color: #ffffff;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
  transition: all 0.2s;
}

.btn-call-end:hover {
  background: #dc2626;
  transform: scale(1.05);
}

.btn-call-end .end-icon {
  font-size: 24px;
}

.btn-call-end .end-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 2px;
}

.call-timestamp-log {
  font-size: 10px;
  color: #64748b;
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   WALLET MODAL & VIRTUAL BANK ACCOUNT
   -------------------------------------------------------------------------- */
.wallet-modal-content {
  max-width: 480px;
  background: #0d1527;
  border: 1px solid #10b981;
  border-radius: 16px;
}

.wallet-balance-hero {
  background: linear-gradient(135deg, #132338 0%, #0d1b2a 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 18px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 18px;
}

.wallet-balance-hero .balance-title {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.wallet-balance-hero .balance-val-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 6px 0;
}

.wallet-balance-hero .balance-naira {
  font-size: 32px;
  font-weight: 900;
  color: #34d399;
}

.wallet-balance-hero .balance-usd {
  font-size: 14px;
  color: #94a3b8;
}

.virtual-account-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 14px;
  margin-top: 16px;
}

.virtual-account-card .va-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  color: #e2e8f0;
}

.virtual-account-card .va-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.virtual-account-card .va-row {
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
}

.virtual-account-card .va-row strong {
  color: #ffffff;
}

.wallet-tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

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

.wallet-tx-credit {
  color: #34d399;
  font-weight: 700;
}

.wallet-tx-debit {
  color: #f87171;
  font-weight: 700;
}
