/* ============================
   AndaYa Conductor — Design System v2.0
   White Premium Glassmorphic Driver Mode
   ============================ */

/* ── Tokens ── */
:root {
  /* Colores base */
  --black-deep:    #050810;
  --black-card:    #0d1526;
  --black-input:   #f8fafc;
  --navy:          #111827;

  /* Acentuaciones */
  --blue-primary:  #2563eb;
  --blue-light:    #3b82f6;
  --cyan:          #06b6d4;
  --green:         #10b981;
  --green-dark:    #047857;
  --green-light:   #34d399;
  --red:           #ef4444;
  --yellow:        #f59e0b;

  /* Tipografía y Textos */
  --text-primary:  #0f172a;
  --text-secondary:#64748b;
  --text-muted:    #94a3b8;

  /* Bordes */
  --border-subtle: #e2e8f0;
  --border-card:   rgba(0, 0, 0, 0.08);

  /* Glassmorphism */
  --glass-bg:     rgba(255, 255, 255, 0.96);
  --glass-blur:   blur(24px);

  /* Sombras */
  --shadow-card:   0 16px 40px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
  --shadow-glow:   0 8px 24px -6px rgba(37, 99, 235, 0.5);

  /* Fuentes */
  --font-display: 'Outfit', sans-serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;

  /* Radios */
  --radius-md:  16px;
  --radius-lg:  22px;
  --radius-xl:  28px;

  /* Transiciones */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition:  all 0.28s var(--ease-smooth);
}

/* ── Reset Global ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* Utilidad Global de Ocultación */
.hidden {
  display: none !important;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050810;
  color: var(--text-primary);
  font-family: var(--font-body);
}

#driver-app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ============================
   TOPBAR COCKPIT INSTRUMENTAL (DESIGN SYSTEM ANDAYA v2.0)
   ============================ */
.driver-cockpit-bar,
.driver-navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  margin: 8px 10px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  box-sizing: border-box;
}

/* 1. Avatar */
.cockpit-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #2563eb;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cockpit-avatar-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.cockpit-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 2 y 3. Pastillas Informativas */
.cockpit-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.cockpit-pill svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.pill-plan-bonus {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}

.pill-plan-regular {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

.pill-wallet {
  background: #f8fafc !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
}

.pill-wallet.healthy {
  border-color: #cbd5e1;
}

.pill-wallet.warning {
  background: #fffbeb !important;
  color: #b45309 !important;
  border-color: #fde68a !important;
}

.pill-wallet.blocked {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}

/* 4. Switch ON / OFF */
.cockpit-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.cockpit-switch-btn.state-on {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

.cockpit-switch-btn.state-off {
  background: #64748b;
  color: #ffffff;
}

.status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  display: inline-block;
}

.cockpit-switch-btn.state-on .status-indicator-dot {
  box-shadow: 0 0 6px #ffffff;
  animation: dotPulse 1.8s infinite;
}

/* --- FIX RESPONSIVE GANANCIAS EN TARJETA INFERIOR --- */
.daily-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.daily-earnings-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
}

.daily-earnings-badge .currency-tag {
  font-size: 0.75rem;
  color: #64748b;
  margin-left: 2px;
}

/* --- OPTIMIZACIÓN RESPONSIVE AUTOMOTRIZ (360px a 430px) --- */
@media (max-width: 430px) {
  .driver-cockpit-bar {
    margin: 6px 8px;
    padding: 5px 8px;
    gap: 4px;
  }

  .cockpit-avatar-btn {
    width: 32px;
    height: 32px;
  }

  .cockpit-pill {
    padding: 4px 6px;
    font-size: 0.74rem;
    gap: 3px;
  }

  .cockpit-switch-btn {
    padding: 4px 9px;
    font-size: 0.78rem;
  }

  .driver-theme-float-container {
    top: calc(56px + env(safe-area-inset-top, 0px));
    right: 8px;
  }

  .btn-recenter-gps {
    top: calc(100px + env(safe-area-inset-top, 0px));
    right: 8px;
  }

  .btn-float-nav {
    top: calc(144px + env(safe-area-inset-top, 0px));
    right: 8px;
  }

  .btn-float-theme,
  .btn-recenter-gps {
    width: 38px;
    height: 38px;
  }

  .btn-float-nav {
    width: 40px;
    height: 40px;
  }

  .driver-theme-floating-popup {
    right: 44px;
    width: 220px;
  }
}

@media (max-width: 375px) {
  .driver-cockpit-bar {
    margin: 4px 6px;
    padding: 4px 6px;
    gap: 3px;
  }

  .cockpit-avatar-btn {
    width: 30px;
    height: 30px;
  }

  .cockpit-pill {
    padding: 3px 5px;
    font-size: 0.70rem;
    gap: 2px;
  }

  .cockpit-pill svg {
    width: 14px;
    height: 14px;
  }

  .cockpit-switch-btn {
    padding: 4px 8px;
    font-size: 0.74rem;
  }

  .driver-theme-float-container {
    top: calc(50px + env(safe-area-inset-top, 0px));
    right: 6px;
  }

  .btn-recenter-gps {
    top: calc(90px + env(safe-area-inset-top, 0px));
    right: 6px;
  }

  .btn-float-nav {
    top: calc(130px + env(safe-area-inset-top, 0px));
    right: 6px;
  }

  .btn-float-theme,
  .btn-recenter-gps {
    width: 34px;
    height: 34px;
  }

  .btn-float-nav {
    width: 36px;
    height: 36px;
  }

  .driver-theme-floating-popup {
    right: 40px;
    width: 200px;
  }
}

.driver-profile-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}

.profile-meta .driver-name {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 85px;
  line-height: 1.15;
}

.star-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  font-size: 0.62rem;
  font-weight: 800;
  color: #b45309;
  padding: 1px 4px;
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}

.icon-svg-xs {
  width: 13px;
  height: 13px;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}

.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

/* ── Toggle Online/Offline Interactivo ── */
.btn-toggle-online {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-toggle-online.offline {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #dc2626;
}

.btn-toggle-online.online {
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  color: #047857;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}

.toggle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.btn-toggle-online.online .toggle-dot {
  animation: dotPulse 1.8s infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.3); opacity: 0.5; }
}

/* ── Píldora de Suscripción ── */
.sub-status-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 6px;
  background: #f0fdf4;
  border: 1px solid #a7f3d0;
  color: #047857;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}

.sub-status-pill:hover {
  background: #dcfce7;
  transform: translateY(-1px);
}

.sub-status-pill.commission-mode {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.sub-status-pill.commission-mode:hover {
  background: #ffedd5;
}

.sub-status-pill.bonus-mode {
  background: #047857 !important;
  border-color: #065f46 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(4, 120, 87, 0.35) !important;
  padding: 4px 10px !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 600 !important;
}

.sub-status-pill.bonus-mode:hover {
  background: #065f46 !important;
}

/* ── Píldora de Billetera de Garantía Efectivo (C12) ── */
.wallet-status-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 6px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.wallet-status-pill.healthy {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}

.wallet-status-pill.warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #d97706;
}

.wallet-status-pill.blocked {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  animation: pulseBlocked 2s infinite;
}

@keyframes pulseBlocked {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.wallet-status-pill:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
}

/* ── Banner Visible de Viajes en Efectivo Pausados (Saldo $0) ── */
.driver-cash-warning-banner {
  position: absolute;
  top: 68px;
  left: 10px;
  right: 10px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-left: 4px solid #ef4444;
  border-radius: 14px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(239, 68, 68, 0.15);
  cursor: pointer;
  animation: slideDownFade 0.35s var(--ease-smooth);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.driver-cash-warning-banner:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.6), 0 0 20px rgba(239, 68, 68, 0.25);
}

.cash-warn-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  animation: pulseBlocked 2s infinite;
}

.cash-warn-body {
  flex: 1;
  min-width: 0;
}

.cash-warn-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: #f87171;
  line-height: 1.2;
}

.cash-warn-desc {
  font-size: 0.72rem;
  color: #cbd5e1;
  line-height: 1.3;
  margin-top: 2px;
}

.btn-cash-warn-recharge {
  padding: 6px 12px;
  background: #ef4444;
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  transition: var(--transition);
}

.btn-cash-warn-recharge:hover {
  background: #dc2626;
  transform: scale(1.04);
}

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

.btn-driver-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  padding: 0;
  background: #eff6ff;
  border: 2px solid #3b82f6;
  border-radius: 50%;
  color: #2563eb;
  font-size: 0.95rem;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.btn-driver-auth:hover {
  background: #dbeafe;
  transform: scale(1.08);
  border-color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.driver-account-avatar-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.driver-account-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.driver-account-img.hidden {
  display: none !important;
}

.auth-photo-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #2563eb;
}

.btn-map-theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-map-theme:hover {
  background: rgba(37, 99, 235, 0.25);
  border-color: rgba(59, 130, 246, 0.4);
}

/* ============================
   MAPA CONDUCTOR (NIGHT HUD DARK MODE)
   ============================ */
.map-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.map-layer.dark-mode .leaflet-tile-pane,
#driver-map.dark-mode .leaflet-tile-pane {
  filter: brightness(0.65) invert(1) contrast(2.6) hue-rotate(200deg) saturate(0.35);
}

/* Botón Flotante Circular Waze / Navegación Externa (Estilo Uber/DiDi) */
.btn-float-nav {
  position: absolute;
  top: calc(164px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 850;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #f0f9ff);
  border: 2px solid #38bdf8;
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.35), 0 2px 6px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-float-nav:hover {
  background: linear-gradient(145deg, #e0f2fe, #bae6fd);
  border-color: #0284c7;
  transform: scale(1.06) translateY(-1px);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.45);
}

.btn-float-nav:active {
  transform: scale(0.94);
}

.float-nav-icon-svg {
  width: 22px;
  height: 22px;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.float-nav-label {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 0.54rem;
  font-weight: 800;
  color: #0369a1;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: -2px;
}

/* Botón Flotante Circular Recentrar GPS (Estilo Uber/DiDi) */
.btn-recenter-gps {
  position: absolute;
  top: calc(114px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 850;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-recenter-gps:hover {
  background: #ffffff;
  transform: scale(1.06);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.3);
  color: #1d4ed8;
}

.btn-recenter-gps:active {
  transform: scale(0.94);
}

/* Botón Flotante Circular SOS Conductor (Ley EAT 21.553) */
.btn-driver-map-sos {
  position: absolute;
  top: calc(166px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 850;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--glass-bg, #0f172a);
  backdrop-filter: var(--glass-blur, blur(12px));
  -webkit-backdrop-filter: var(--glass-blur, blur(12px));
  border: 1.5px solid #dc2626;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  animation: pulseSos 2s infinite ease-in-out;
}

.btn-driver-map-sos:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.btn-driver-map-sos:active {
  transform: scale(0.94);
  background: #450a0a;
}

.btn-driver-map-sos.hidden {
  display: none !important;
}

/* ============================
   PANEL FLOTANTE INFERIOR (BLANCO PREMIUM)
   ============================ */
.driver-panel {
  position: absolute;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: 14px;
  right: 14px;
  z-index: 900;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* States */
.panel-state {
  display: none;
  animation: stepIn 0.3s var(--ease-smooth) both;
}

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

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

.state-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-card);
  color: #0f172a;
}

/* Waiting State */
.waiting-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.pulse-radar {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.radar-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.6);
}

.pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #2563eb;
  animation: radarExpand 2s ease-out infinite;
}

@keyframes radarExpand {
  0%   { transform: scale(0.4); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

.waiting-copy h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}

.waiting-copy p {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 2px;
}

.earnings-compact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: #475569;
}

.earnings-compact-bar strong {
  color: #059669;
  font-family: var(--font-display);
  font-weight: 800;
}

.zero-badge-mini {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 9px;
  border-radius: 10px;
}

/* Banner de Bono 0% Activo en Dashboard (Compensación) */
.driver-bonus-active-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  color: #047857;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  margin-top: 4px;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.12);
  letter-spacing: -0.01em;
  animation: pulse-border 2.5s infinite;
}

.driver-bonus-active-banner .bonus-active-icon {
  color: #059669;
  font-size: 1rem;
}

/* Badge de Bono 0% en Tarjeta Entrante */
.incoming-bonus-zero-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ecfdf5;
  border: 1.5px solid #059669;
  color: #065f46;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.15);
}

.incoming-bonus-zero-badge.hidden,
.driver-bonus-active-banner.hidden {
  display: none !important;
}

/* Incoming Card */
.incoming-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 2px solid #cbd5e1;
  background: linear-gradient(145deg, #ffffff 0%, #f0f7ff 100%);
}

.incoming-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.new-trip-tag {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  color: #2563eb;
  letter-spacing: 0.5px;
}

.timer-bubble {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2563eb;
  color: white;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.5);
}

.passenger-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Badge de Alta Demanda / Surge Pricing (C1) - Alto Contraste Automotriz */
.incoming-surge-badge {
  background: #fff7ed;
  border: 1.5px solid #ea580c;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: #9a3412;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.12);
}

.incoming-surge-badge.hidden {
  display: none !important;
}

.surge-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9a3412;
  font-weight: 900;
  letter-spacing: 0.3px;
}

.surge-bonus-pill {
  background: #dcfce7;
  border: 1.5px solid #86efac;
  color: #14532d;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

.p-avatar { font-size: 1.8rem; }
.p-meta { flex: 1; }
.p-meta h4 { font-family: var(--font-display); font-size: 1rem; font-weight: 800; color: #0f172a; }
.p-rating { font-size: 0.78rem; color: #b45309; font-weight: 800; white-space: nowrap; }

.p-fare { display: flex; flex-direction: column; align-items: flex-end; }
.p-amount { font-family: var(--font-display); font-size: 1.6rem; font-weight: 900; color: #059669; line-height: 1; }
.p-net { font-size: 0.68rem; color: #047857; font-weight: 800; text-transform: uppercase; margin-top: 2px; background: #ecfdf5; padding: 2px 6px; border-radius: 6px; border: 1px solid #a7f3d0; }

.route-preview-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 14px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.route-point-row { display: flex; align-items: flex-start; gap: 10px; }
.r-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.origin-r { background: #2563eb; box-shadow: 0 0 6px rgba(37, 99, 235, 0.4); }
.dest-r   { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }
.r-line   { width: 2px; height: 14px; background: #cbd5e1; margin-left: 4px; opacity: 0.6; }
.r-label-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.r-label  { font-family: var(--font-display); font-size: 0.68rem; font-weight: 800; color: #475569; letter-spacing: 0.5px; }
.r-pickup-eta {
  display: inline-flex;
  align-items: center;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  color: #1d4ed8;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 6px;
  letter-spacing: 0;
}
.r-text p { font-size: 0.88rem; font-weight: 700; color: #0f172a; }

.action-buttons { display: flex; gap: 10px; }

.btn-decline {
  flex: 1;
  padding: 14px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-md);
  color: #dc2626;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-decline:hover {
  background: #fee2e2;
}

.btn-accept {
  flex: 2;
  padding: 14px;
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 8px 24px -6px rgba(16, 185, 129, 0.6);
  transition: var(--transition);
}

.btn-accept:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -6px rgba(16, 185, 129, 0.7); }

/* In Trip Card */
.in-trip-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.phase-banner {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 12px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition);
}

/* Fases de viaje — clases CSS en lugar de style inline */
.phase-banner.phase-1 {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.phase-banner.phase-2 {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #0891b2;
}

.phase-banner.phase-3 {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.phase-banner.phase-4 {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #047857;
}


.passenger-in-trip {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.p-info h4 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 800; color: #0f172a; }
.p-info p { font-size: 0.82rem; color: #64748b; margin-top: 2px; }

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

.btn-quick-action {
  width: 42px;
  height: 42px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: #0f172a;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}

.btn-quick-action:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-quick-action#btn-quick-map {
  background: linear-gradient(145deg, #ffffff, #f0f9ff);
  border-color: #7dd3fc;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.22);
}

.btn-quick-action#btn-quick-map:hover {
  background: linear-gradient(145deg, #e0f2fe, #bae6fd);
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35);
}

.btn-quick-action#btn-quick-map .icon-quick-svg {
  width: 22px;
  height: 22px;
  display: block;
}

.taximeter-glass {
  background: linear-gradient(145deg, #ffffff 0%, #f0f7ff 100%);
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.tax-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.8px;
}

.tax-price {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 900;
  color: #059669;
  line-height: 1.15;
  margin: 4px 0 2px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tax-net-badge {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  color: #047857;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 9999px;
  padding: 3px 10px;
  letter-spacing: 0.2px;
  display: inline-block;
}

.tax-sub { font-size: 0.78rem; color: #047857; font-weight: 600; margin-top: 2px; }

/* Indicador Fase 1 Conductor: Viaje con Abordaje Seguro */
.driver-safety-pin-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1d4ed8;
  animation: fadeIn 0.2s ease;
}

.driver-safety-pin-hint.hidden {
  display: none !important;
}

/* Entrada Directa de PIN de Abordaje Seguro (Fase 2) */
.driver-pin-entry-card {
  background: #0f172a;
  border: 1.5px solid #1e3a8a;
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 10px;
  color: #f8fafc;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.15);
  animation: fadeIn 0.25s ease;
}

.driver-pin-entry-card.hidden {
  display: none !important;
}

.d-pin-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.d-pin-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.25);
  border: 1px solid #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.d-pin-header-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.d-pin-header-text strong {
  font-size: 0.84rem;
  font-weight: 800;
  color: #93c5fd;
  letter-spacing: 0.3px;
}

.d-pin-header-text span {
  font-size: 0.74rem;
  color: #94a3b8;
}

.d-pin-inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}

.d-pin-digit {
  width: 48px;
  height: 54px;
  border-radius: 10px;
  border: 1.5px solid #334155;
  background: #1e293b;
  color: #38bdf8;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  text-align: center;
  outline: none;
  transition: all 0.15s ease;
}

.d-pin-digit:focus {
  border-color: #38bdf8;
  background: #0f172a;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
  transform: translateY(-2px);
}

.d-pin-digit.has-value {
  border-color: #0284c7;
  color: #38bdf8;
  background: #0b1329;
}

.d-pin-error {
  background: #450a0a;
  border: 1px solid #7f1d1d;
  color: #fca5a5;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  margin: 8px 0;
  text-align: center;
  animation: pinShake 0.3s ease-in-out;
}

.d-pin-error.hidden {
  display: none !important;
}

.d-pin-bypass-link-wrap {
  text-align: center;
  margin-top: 6px;
}

.btn-d-pin-bypass {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
  transition: color 0.15s ease;
}

.btn-d-pin-bypass:hover {
  color: #94a3b8;
}

.btn-phase-action {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px -6px rgba(37, 99, 235, 0.6);
  transition: var(--transition);
}

.btn-phase-blue  { background: linear-gradient(135deg, #1d4ed8, #2563eb); box-shadow: 0 8px 24px -6px rgba(37, 99, 235, 0.6); }
.btn-phase-cyan  { background: linear-gradient(135deg, #0284c7, #06b6d4); box-shadow: 0 8px 24px -6px rgba(6, 182, 212, 0.6); }
.btn-phase-green { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 8px 24px -6px rgba(16, 185, 129, 0.6); }

.btn-phase-action:hover { transform: translateY(-2px); }


/* ============================
   MODALES (SUSCRIPCIÓN Y AUTENTICACIÓN)
   ============================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.hidden {
  display: none !important;
}

.glass-modal {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  background: #ffffff;
  color: #0f172a;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 10000;
}

/* Prevenir selección accidental de texto y popups de copia en Android en botones y controles */
button,
.btn-toggle-online,
.sub-status-pill,
.driver-navbar,
.auth-photo-text,
.badge-status,
.plan-card,
.modal-header,
.auth-tab-btn,
.zero-badge-mini,
.dev-trigger {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

/* Bottom Action Sheet para Pases de Suscripción (Cabecera fija + Cuerpo desplazable) */
#sub-modal-overlay {
  padding: 0;
  align-items: flex-end;
}

#sub-modal-overlay .sub-modal {
  width: 100%;
  max-width: 520px;
  height: 90vh;
  height: 90dvh;
  max-height: 90vh;
  max-height: 90dvh;
  border-radius: 28px 28px 0 0;
  padding: 12px 20px 0 20px;
  margin: 0 auto;
  box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.4);
  animation: sheetSlideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 0;
}

.sub-modal-fixed-top {
  flex-shrink: 0;
  background: #ffffff;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.sub-modal-fixed-top .sheet-drag-handle {
  margin-bottom: 6px;
}

.sub-modal-fixed-top .modal-header {
  padding: 0 0 8px 0;
  border-bottom: none;
  position: static;
}

.sub-modal-fixed-top .sub-mode-tabs {
  margin: 0;
}

.sub-modal-scroll-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 0 calc(24px + env(safe-area-inset-bottom, 0px)) 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Full-Screen Premium Sheet para Modal de Registro / Login Chofer */
#driver-auth-modal-overlay {
  padding: 0;
  align-items: flex-end;
}

#driver-auth-modal-overlay .auth-modal {
  width: 100%;
  max-width: 540px;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  border-radius: 0;
  padding: 20px 20px 30px 20px;
  margin: 0 auto;
  box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.4);
  animation: sheetSlideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sheetSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

#driver-auth-modal-overlay .modal-header {
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 20;
  padding: 4px 0 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

#driver-auth-modal-overlay .auth-tabs {
  position: sticky;
  top: 60px;
  background: #ffffff;
  z-index: 19;
  padding: 8px 0;
  margin-bottom: 6px;
}

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.modal-subtext {
  font-size: 0.88rem;
  color: #64748b;
}

.btn-close-modal {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-close-modal:hover {
  background: #fee2e2;
  color: #dc2626;
}

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

.plan-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  transition: var(--transition);
}

.plan-card.featured {
  background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 100%);
  border-color: #a7f3d0;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.1);
}

.plan-badge {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  color: #2563eb;
  letter-spacing: 0.5px;
}

.featured-badge {
  color: #047857;
}

.plan-card h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.plan-price {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: #0f172a;
}

.plan-price small {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
}

.plan-desc {
  font-size: 0.8rem;
  color: #64748b;
}

.btn-select-plan {
  margin-top: 8px;
  padding: 10px;
  background: #2563eb;
  border: none;
  border-radius: 10px;
  color: white;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.featured-btn {
  background: linear-gradient(135deg, #059669, #10b981);
}

.btn-select-plan:hover {
  transform: translateY(-1px);
}

/* Flexible 8% Plan Card */
.plan-card.flexible-plan {
  background: linear-gradient(145deg, #ffffff 0%, #fff7ed 100%);
  border: 1.5px solid #fdba74;
}

.flexible-badge {
  color: #ea580c;
  font-weight: 800;
}

.flexible-btn {
  background: linear-gradient(135deg, #ea580c, #f97316);
}

.flexible-btn:hover {
  background: linear-gradient(135deg, #c2410c, #ea580c);
}

/* Selfie Upload Box */
.selfie-upload-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}

.btn-selfie-trigger {
  padding: 9px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-selfie-trigger:hover {
  background: #dbeafe;
  border-color: #3b82f6;
}

.selfie-status-text {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

/* Auth Modal Tabs */
.auth-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 14px;
  padding: 4px;
  border: 1px solid #e2e8f0;
}

.auth-tab-btn {
  flex: 1;
  padding: 9px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #64748b;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab-btn.active {
  background: #2563eb;
  color: white;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

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

.auth-form.active { display: flex; }

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

.form-group label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 14px;
  color: #0f172a;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

.form-group select,
.form-select-modern {
  width: 100%;
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 11px 36px 11px 14px;
  color: #0f172a;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

.form-group select:focus,
.form-select-modern:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-chip-subtle {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  cursor: pointer;
  transition: var(--transition);
}

.btn-chip-subtle:hover {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.checkbox-legal-group {
  margin: 14px 0 10px 0;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.checkbox-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #2563eb;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label span {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.45;
}

.checkbox-label .legal-link {
  color: #2563eb;
  font-weight: 700;
  text-decoration: underline;
}

/* ============================
   NOTIFICACIONES TOAST (CERO ALERT NATIVO)
   ============================ */
.toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: 90%;
  max-width: 440px;
}

.toast-pill {
  pointer-events: auto;
  width: 100%;
  background: #ffffff;
  color: #0f172a;
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.06);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  animation: toastSlideDown 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-pill.fade-out {
  opacity: 0;
  transform: translateY(-12px);
}

@keyframes toastSlideDown {
  from { opacity: 0; transform: translateY(-24px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon .toast-svg {
  width: 20px;
  height: 20px;
  display: block;
}

.toast-text {
  flex: 1;
  line-height: 1.35;
}

.toast-close {
  background: #f1f5f9;
  border: none;
  color: #94a3b8;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.toast-close:hover {
  background: #fee2e2;
  color: #dc2626;
}

.toast-success { border-left: 4px solid #10b981; }
.toast-success .toast-icon { color: #059669; }
.toast-warning { border-left: 4px solid #f59e0b; }
.toast-warning .toast-icon { color: #d97706; }
.toast-error   { border-left: 4px solid #ef4444; }
.toast-error   .toast-icon { color: #dc2626; }
.toast-info    { border-left: 4px solid #2563eb; }
.toast-info    .toast-icon { color: #2563eb; }

.cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #0ea5e9 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px -6px rgba(37, 99, 235, 0.6);
  transition: var(--transition);
}

.cta-green {
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  box-shadow: 0 8px 24px -6px rgba(16, 185, 129, 0.6);
}

/* Marcador Vectorial Elegante para Vehículos */
.sleek-car-marker {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.car-glow-ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.8);
  animation: carPulse 2s infinite ease-in-out;
}

@keyframes carPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%      { transform: scale(1.15); opacity: 1; }
}

.car-svg-icon {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Responsive Mobile */
@media (max-width: 480px) {
  .driver-navbar {
    top: 8px;
    left: 8px;
    right: 8px;
    padding: 6px 10px;
  }

  .driver-profile-compact .driver-name {
    font-size: 0.85rem;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .driver-panel {
    bottom: 8px;
    left: 8px;
    right: 8px;
    max-width: calc(100% - 16px);
  }

  .state-card {
    padding: 14px;
    border-radius: var(--radius-xl);
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

/* ============================
   BOTÓN DEV — Simulador de solicitud (solo para demo con inversores)
   Visible como botiqueo flotante en la esquina inferior izquierda.
   Eliminar o deshabilitar antes de deploy a producción.
   ============================ */
.dev-trigger {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 99000;
  background: rgba(37, 99, 235, 0.9);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.5);
  backdrop-filter: blur(8px);
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.dev-trigger:hover {
  background: rgba(37, 99, 235, 1);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.6);
}

/* ============================
   ESTILOS FORMULARIO LEY EAT & BANCARIO
   ============================ */
.signup-section-header {
  margin-top: 14px;
  margin-bottom: 8px;
  padding: 8px 12px;
  background: #f1f5f9;
  border-left: 4px solid var(--blue-primary);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.signup-section-header span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-icon-svg {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

.docs-grid-eat {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.doc-upload-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  transition: var(--transition);
}

.doc-upload-card:hover {
  border-color: var(--blue-primary);
  background: #ffffff;
}

.doc-upload-card label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-doc-trigger {
  width: 100%;
  padding: 8px 6px;
  background: #ffffff;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-doc-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex-shrink: 0;
}

.btn-doc-trigger:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.doc-status-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748b;
}

.doc-status-label.ready {
  color: #047857;
  font-weight: 900;
}

/* ============================
   ESTILOS MODAL VUELTO CONDUCTOR & FARE BREAKDOWN (WHITE PREMIUM BOTTOM ACTION SHEET)
   ============================ */
#vuelto-driver-modal-overlay {
  align-items: flex-end;
  padding: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
}

.vuelto-driver-card {
  max-width: 520px;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.22);
  border-radius: 28px 28px 0 0;
  color: #0f172a;
  padding: 14px 20px calc(24px + env(safe-area-inset-bottom, 0px)) 20px;
  animation: sheetSlideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.vuelto-driver-card .sheet-drag-handle {
  width: 44px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 3px;
  margin: 0 auto 12px auto;
}

.vuelto-driver-card .modal-header {
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.vuelto-driver-card .modal-header h3 {
  color: #0f172a !important;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
}

.vuelto-driver-card .modal-header p {
  color: #64748b;
  font-size: 0.82rem;
  margin-top: 2px;
}

.modal-brand-badge-emerald {
  background: #ecfdf5;
  color: #059669;
  border: 1.5px solid #a7f3d0;
  border-radius: 14px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.modal-brand-icon-svg {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.vuelto-driver-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.fare-breakdown-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
  color: #475569;
}

.breakdown-row strong {
  color: #0f172a;
  font-weight: 800;
}

.breakdown-row.discount-row {
  color: #059669;
}

.breakdown-row.discount-row strong {
  color: #059669;
}

.discount-footnote {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: #059669;
  line-height: 1.3;
}

.breakdown-divider {
  height: 1.5px;
  background: #e2e8f0;
  margin: 4px 0;
}

.total-label-highlight {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #0f172a;
}

.cash-to-collect {
  font-size: 1.85rem;
  font-weight: 900;
  color: #059669;
  font-family: var(--font-display);
}

/* Bloque Colapsable de Desglose Pedagógico Contable (Opción 2) */
.driver-accounting-collapse-box {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-toggle-accounting-collapse {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: transparent;
  border: none;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  gap: 8px;
}

.btn-toggle-accounting-collapse:hover {
  background: #e2e8f0;
}

.icon-collapse-chevron {
  transition: transform 0.25s ease;
  color: #64748b;
}

.driver-accounting-collapse-box.open .icon-collapse-chevron {
  transform: rotate(180deg);
}

.accounting-collapse-content {
  padding: 12px 14px 14px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
}

.accounting-collapse-content.hidden {
  display: none;
}

.acc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #475569;
}

.acc-row strong {
  font-weight: 800;
  color: #0f172a;
}

.acc-pos {
  color: #059669 !important;
}

.acc-neg {
  color: #dc2626 !important;
}

.acc-net {
  color: #059669 !important;
  font-size: 1.05rem !important;
}

.acc-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 2px 0;
}

.acc-retention-note {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.25;
  margin-top: -4px;
}

.acc-net-highlight {
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0f172a;
  padding-top: 4px;
}

.driver-wallet-badge {
  background: #f0fdf4;
  border: 1px solid #a7f3d0;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.wallet-badge-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: #065f46;
  font-weight: 600;
}

.wallet-badge-content strong {
  color: #047857;
  font-weight: 800;
}

.driver-wallet-badge small {
  font-size: 0.72rem;
  color: #059669;
  opacity: 0.85;
}

.vuelto-actions-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-cash-confirm-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.98rem;
  padding: 15px 18px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.btn-cash-confirm-pill:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-icon-svg-white {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

.btn-vuelto-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 14px 18px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-vuelto-trigger:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-icon-svg-accent {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.vuelto-input-form {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vuelto-input-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.vuelto-input-wrap {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid #059669;
  border-radius: 14px;
  padding: 8px 16px;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.12);
}

.vuelto-input-wrap .currency-symbol {
  font-size: 1.3rem;
  font-weight: 800;
  color: #059669;
}

.vuelto-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  color: #0f172a;
  font-size: 1.5rem;
  font-weight: 900;
  text-align: center;
  outline: none;
  font-family: var(--font-display);
}

.vuelto-input-wrap .currency-suffix {
  font-size: 0.82rem;
  font-weight: 800;
  color: #64748b;
}

.vuelto-limit-hint {
  font-size: 0.74rem;
  color: #64748b;
}

.vuelto-limit-hint strong {
  color: #0f172a;
}

.vuelto-form-buttons {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.btn-cancel-vuelto-form {
  flex: 1;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel-vuelto-form:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-send-vuelto-action {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: #ffffff;
  border-radius: 12px;
  padding: 12px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-send-vuelto-action:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.vuelto-waiting-box {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.vuelto-waiting-box h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.vuelto-waiting-box p {
  font-size: 0.84rem;
  color: #475569;
  margin: 0;
}

.waiting-timer-ring {
  font-size: 0.92rem;
  color: #b45309;
  font-weight: 800;
}

/* ====================================================
   FASE 1: BADGES DE REQUERIMIENTOS ESPECIALES (P6)
   ==================================================== */
.special-preferences-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
  width: 100%;
}

.special-preferences-badges.hidden {
  display: none;
}

.pref-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 8px;
  letter-spacing: 0.2px;
}

.badge-mobility {
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  color: #1e40af;
}

.badge-trunk {
  background: #fefce8;
  border: 1.5px solid #fde047;
  color: #713f12;
}

.badge-silence {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #334155;
}

.badge-music {
  background: #faf5ff;
  border: 1.5px solid #e9d5ff;
  color: #6b21a8;
}

.badge-pax {
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  color: #065f46;
}

/* ====================================================
   FASE 2: ALERTA DE ZONAS DE PRECAUCIÓN / RIESGO (C11)
   ==================================================== */
.risk-zone-alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.22), rgba(245, 158, 11, 0.18));
  border: 1.5px solid rgba(239, 68, 68, 0.55);
  border-radius: 14px;
  padding: 10px 14px;
  margin: 10px 0 12px 0;
  animation: pulseAlertBorder 2s infinite ease-in-out;
}

.risk-zone-alert-banner.hidden {
  display: none;
}

@keyframes pulseAlertBorder {
  0%, 100% {
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.55);
  }
  50% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.45);
    border-color: rgba(245, 158, 11, 0.85);
  }
}

.rz-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

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

.rz-info strong {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fca5a5;
  letter-spacing: 0.2px;
}

.rz-info small {
  font-size: 0.72rem;
  color: #fef08a;
  line-height: 1.3;
}

/* ====================================================
   TEMPORIZADOR DE ESPERA EN RECOJO & NO-SHOW (CONDUCTOR)
   ==================================================== */
.driver-waiting-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(59, 130, 246, 0.4);
  border-radius: 16px;
  padding: 12px 14px;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.driver-waiting-box.hidden,
.driver-waiting-fee-box.hidden,
.btn-no-show-cancel.hidden {
  display: none !important;
}

.driver-waiting-box.warning-state {
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(245, 158, 11, 0.12);
}

.driver-waiting-box.paid-state {
  border-color: rgba(239, 68, 68, 0.8);
  background: rgba(239, 68, 68, 0.15);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.25);
}

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

.d-waiting-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.driver-waiting-box.warning-state .d-waiting-badge {
  color: #fcd34d;
}

.driver-waiting-box.paid-state .d-waiting-badge {
  color: #fca5a5;
}

.d-waiting-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  animation: waitingPulse 1.6s infinite;
}

.driver-waiting-box.warning-state .d-waiting-pulse {
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
}

.driver-waiting-box.paid-state .d-waiting-pulse {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
}

.d-waiting-timer-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
}

.driver-waiting-box.warning-state .d-waiting-timer-value {
  color: #fde047;
}

.driver-waiting-box.paid-state .d-waiting-timer-value {
  color: #f87171;
}

.d-waiting-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  margin: 0;
}

.driver-waiting-fee-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.d-fee-lbl {
  color: #fca5a5;
}

.d-fee-val {
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 900;
}

.btn-no-show-cancel {
  width: 100%;
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
  border: 1px solid #ef4444;
  color: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
  animation: pulseAlertBorder 2s infinite ease-in-out;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.btn-no-show-cancel.hidden {
  display: none !important;
}

.btn-no-show-cancel:hover {
  background: #ef4444;
  transform: translateY(-1px);
}

/* ── OCULTAR ATRIBUCIÓN Y MARCA DE AGUA LEAFLET (HIGIENE VIAL) ── */
.leaflet-control-attribution {
  display: none !important;
}

/* ── BOTÓN FLOTANTE APARIENCIA MAPA (MAP FLOATING THEME) ── */
.driver-theme-float-container {
  position: absolute;
  top: calc(64px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 850;
}

.btn-float-theme {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
  color: #8b5cf6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-float-theme:hover {
  background: #ffffff;
  transform: scale(1.06);
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.3);
  color: #7c3aed;
}

.btn-float-theme:active {
  transform: scale(0.94);
}

.driver-theme-floating-popup {
  position: absolute;
  top: 0;
  right: 50px;
  width: 240px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  animation: floatPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 900;
}

.driver-theme-floating-popup.hidden {
  display: none !important;
}

@keyframes floatPopIn {
  from { opacity: 0; transform: scale(0.92) translateX(10px); }
  to   { opacity: 1; transform: scale(1) translateX(0); }
}

.floating-theme-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.f-theme-title {
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 800;
  color: #f8fafc;
}

.f-theme-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.theme-segmented-ctrl {
  display: flex;
  align-items: center;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}

.theme-seg-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 4px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-seg-option:hover {
  color: #ffffff;
}

.theme-seg-option.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.theme-seg-option svg {
  flex-shrink: 0;
}

/* ── BARRA TÁCTIL SUPERIOR DE HOJA DESLIZABLE (BOTTOM SHEET DRAG HANDLE) ── */
.sheet-drag-handle {
  width: 42px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 10px;
  margin: 0 auto 10px auto;
  flex-shrink: 0;
}

/* ── MODALIDAD DE TRABAJO & PASES (PRO TABS & SELECTABLE CARDS) ── */
.sub-mode-tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 14px;
  margin-top: 4px;
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.sub-mode-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.sub-mode-tab .sub-tab-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sub-tab-icon-svg {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.sub-mode-tab .sub-tab-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.sub-mode-tab .sub-tab-info strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.sub-mode-tab .sub-tab-info small {
  display: block;
  font-size: 0.67rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.sub-mode-tab.active {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.sub-mode-tab.active .sub-tab-info strong {
  color: #0f172a;
}

.sub-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sub-tab-panel.hidden {
  display: none !important;
}

/* Banner ROI */
.savings-roi-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 10px 14px;
}

.roi-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.roi-icon-svg {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.roi-text strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  color: #1e40af;
}

.roi-text p {
  font-size: 0.74rem;
  color: #3b82f6;
  margin: 0;
}

/* Grid de Pases Seleccionables */
.passes-selectable-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pass-select-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.pass-select-card:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.pass-select-card.selected {
  border-color: #2563eb;
  background: #f8faff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.pass-select-card.featured.selected {
  border-color: #10b981;
  background: #f0fdf4;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.pass-featured-tag {
  position: absolute;
  top: -9px;
  right: 14px;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.4px;
  padding: 2px 8px;
  border-radius: 20px;
}

.pass-featured-tag.green {
  background: #059669;
}

.pass-card-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.pass-select-card.selected .pass-card-radio {
  border-color: #2563eb;
  background: #2563eb;
}

.pass-select-card.featured.selected .pass-card-radio {
  border-color: #10b981;
  background: #10b981;
}

.pass-select-card.selected .pass-card-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
}

.pass-card-content {
  flex: 1;
  min-width: 0;
}

.pass-badge-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 6px;
  margin-bottom: 2px;
}

.pass-card-content h4 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.pass-card-price {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.2;
}

.pass-card-price small {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

.pass-card-sub {
  font-size: 0.74rem;
  color: #64748b;
  margin: 2px 0 0 0;
}

/* Tarjeta Comisión Flexible 8% */
.flexible-commission-card {
  background: linear-gradient(145deg, #ffffff 0%, #fff7ed 100%);
  border: 2px solid #fdba74;
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.flex-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #ffedd5;
  border: 1.5px solid #fed7aa;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-briefcase-svg {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.flex-badge {
  font-size: 0.68rem;
  font-weight: 900;
  color: #c2410c;
  background: #ffedd5;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.flexible-commission-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.flex-rate-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: #ea580c;
}

.flex-rate-number small {
  font-size: 0.8rem;
  color: #9a3412;
  display: block;
}

.flex-desc {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.45;
  margin: 4px 0;
}

.flex-points {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 10px 14px;
}

.f-point {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.78rem;
  color: #334155;
}

.f-check {
  color: #ea580c;
  font-weight: 900;
}

/* Caja de Términos Legales & Checkbox (Ley 19.496) */
.legal-terms-box {
  margin-top: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  transition: all 0.25s ease;
}

.legal-terms-box.shake-error {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  animation: termsShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes termsShake {
  10%, 90% { transform: translateX(-3px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.terms-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.terms-label input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: #059669;
  flex-shrink: 0;
  cursor: pointer;
}

.terms-text {
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.45;
}

.terms-text strong {
  color: #0f172a;
}

/* Acciones de Suscripción */
.sub-modal-actions {
  margin-top: 6px;
}

.cta-primary-sub {
  width: 100%;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.cta-primary-sub:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
}

/* ── BILLETERA DE GARANTÍA EFECTIVO PRO (BOTTOM ACTION SHEET C12) ── */
#modal-driver-wallet-overlay {
  padding: 0;
  align-items: flex-end;
}

#modal-driver-wallet-overlay .wallet-modal {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  max-height: 88dvh;
  border-radius: 28px 28px 0 0;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 0px)) 20px;
  margin: 0 auto;
  box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.4);
  animation: sheetSlideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
  gap: 12px;
}

.modal-brand-badge-blue {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  border-radius: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-brand-icon-svg {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.wallet-icon-badge {
  background: #10b981;
  color: #ffffff;
  border-radius: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wallet-icon-svg {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.icon-svg-xs {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: middle;
}

.wallet-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}

/* Tarjeta Hero Saldo Esmeralda */
.wallet-hero-card {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.wallet-hero-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #d1fae5;
  text-transform: uppercase;
}

.wallet-hero-amount {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin: 4px 0;
}

.wallet-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.wallet-hero-badge.warning {
  background: rgba(251, 191, 36, 0.25);
  color: #fef3c7;
}

.wallet-hero-badge.blocked {
  background: rgba(239, 68, 68, 0.25);
  color: #fee2e2;
}

.wallet-hero-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
}

.wallet-hero-badge.warning .status-dot {
  background: #f59e0b;
}

.wallet-hero-badge.blocked .status-dot {
  background: #ef4444;
}

/* Acordeón Explicativo */
.wallet-faq-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  transition: var(--transition);
}

.wallet-faq-toggle {
  width: 100%;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #334155;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  transition: var(--transition);
}

.wallet-faq-toggle:hover {
  background: #f1f5f9;
}

.faq-toggle-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1e293b;
}

.faq-chevron {
  color: #64748b;
  transition: transform 0.25s ease;
}

.wallet-faq-card.open .faq-chevron {
  transform: rotate(180deg);
}

.wallet-faq-content {
  padding: 4px 14px 14px 14px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.5;
}

.wallet-faq-content.hidden {
  display: none !important;
}

.wallet-faq-content ul {
  padding-left: 18px;
  margin: 8px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wallet-faq-content li strong {
  color: #0f172a;
}

/* Botones de Recarga */
.wallet-recharge-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recharge-section-title {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #64748b;
  text-transform: uppercase;
}

.recharge-btns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-wallet-recharge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  color: #ffffff;
  transition: var(--transition);
}

.btn-wallet-recharge.green {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-wallet-recharge.green:hover {
  background: linear-gradient(135deg, #047857, #059669);
  transform: translateY(-1px);
}

.btn-wallet-recharge.blue {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-wallet-recharge.blue:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
  transform: translateY(-1px);
}

.recharge-plus {
  font-size: 1.1rem;
  font-weight: 900;
}

.wallet-security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}

.wallet-security-badge svg {
  color: #10b981;
}

/* Quick Actions SVGs en Estado de Viaje */
.icon-quick-svg {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

/* ===== MODAL DE VERIFICACIÓN DE PIN CONDUCTOR ===== */
.driver-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.2s ease-out;
}

.driver-modal-overlay.hidden {
  display: none !important;
}

.driver-pin-modal {
  background: #ffffff;
  border-radius: 20px;
  max-width: 380px;
  width: 100%;
  padding: 24px 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
  text-align: center;
  animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pin-modal-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #eff6ff;
  border: 2px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
}

.icon-pin-shield {
  width: 26px;
  height: 26px;
  filter: invert(36%) sepia(85%) saturate(1982%) hue-rotate(205deg) brightness(98%) contrast(96%);
}

.pin-modal-header h3 {
  font-family: var(--font-display, sans-serif);
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.pin-modal-header p {
  font-size: 0.86rem;
  color: #64748b;
  line-height: 1.4;
  margin-bottom: 20px;
}

.pin-input-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.pin-digit-input {
  width: 52px;
  height: 60px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  background: #f8fafc;
  font-family: var(--font-display, sans-serif);
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  color: #0f172a;
  outline: none;
  transition: all 0.15s ease;
}

.pin-digit-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  transform: translateY(-2px);
}

.pin-digit-input.has-value {
  border-color: #3b82f6;
  background: #eff6ff;
}

.pin-error-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  animation: pinShake 0.3s ease-in-out;
}

.pin-error-alert.hidden {
  display: none !important;
}

.pin-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-pin-confirm {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-family: var(--font-display, sans-serif);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pin-confirm:hover:not(:disabled) {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-pin-confirm:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-pin-bypass {
  background: transparent;
  color: #64748b;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pin-bypass:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}

.btn-pin-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 6px;
}

.btn-pin-close:hover {
  color: #475569;
}

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

.pin-shake {
  animation: pinShake 0.4s ease-in-out !important;
}

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

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

/* ==========================================================================
   CARTOLA SEMANAL Y LIQUIDACIONES BANCARIAS (MODAL DE GANANCIAS)
   ========================================================================== */
#modal-driver-earnings-overlay .earnings-modal {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  max-height: 88dvh;
  border-radius: 28px 28px 0 0;
  padding: 14px 20px calc(24px + env(safe-area-inset-bottom, 0px)) 20px;
  margin: 0 auto;
  box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.4);
  animation: sheetSlideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
  gap: 14px;
}

.earnings-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}

/* Tarjeta Hero de Período y Líquido */
.earnings-summary-header-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 18px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.period-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.period-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.period-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseRadar 2s infinite ease-in-out;
}

.earnings-hero-amount-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-amount-label {
  font-size: 0.76rem;
  color: #cbd5e1;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.earnings-hero-amount {
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #10b981;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}

.earnings-bank-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  color: #e2e8f0;
  font-weight: 600;
  width: fit-content;
}

/* Desglose Contable */
.earnings-breakdown-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

html[data-theme="dark"] .earnings-breakdown-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
}

.breakdown-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

html[data-theme="dark"] .breakdown-title {
  color: #f8fafc;
}

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

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: #334155;
}

html[data-theme="dark"] .breakdown-row {
  color: #cbd5e1;
}

.b-concept {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.b-concept .sign {
  font-weight: 800;
  font-size: 0.88rem;
}

.b-concept .sign.pos { color: #059669; }
.b-concept .sign.neg { color: #dc2626; }
.b-concept .sign.neut { color: #2563eb; }

.b-val {
  font-weight: 700;
  color: #0f172a;
}

html[data-theme="dark"] .b-val {
  color: #ffffff;
}

.b-val.neg {
  color: #dc2626;
}

.breakdown-row.highlight-transfer {
  background: rgba(37, 99, 235, 0.06);
  padding: 4px 8px;
  border-radius: 8px;
  border-left: 3px solid #2563eb;
}

.breakdown-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 0;
}

html[data-theme="dark"] .breakdown-divider {
  background: rgba(255, 255, 255, 0.1);
}

.breakdown-row.subtotal {
  font-weight: 800;
  font-size: 0.9rem;
  color: #0f172a;
}

html[data-theme="dark"] .breakdown-row.subtotal {
  color: #f8fafc;
}

.breakdown-row.tax-row {
  font-size: 0.78rem;
  color: #64748b;
}

.tax-disclaimer-note {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid #94a3b8;
}

html[data-theme="dark"] .tax-disclaimer-note {
  background: rgba(15, 23, 42, 0.6);
  color: #94a3b8;
}

/* Acciones de Gestión de Fondos */
.earnings-actions-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

html[data-theme="dark"] .earnings-actions-card {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.08);
}

.actions-card-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.06em;
}

.action-transfer-box {
  background: #ffffff;
  border: 1.5px solid #3b82f6;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

html[data-theme="dark"] .action-transfer-box {
  background: #1e293b;
  border-color: #2563eb;
}

.transfer-copy strong {
  display: block;
  font-size: 0.82rem;
  color: #0f172a;
}

html[data-theme="dark"] .transfer-copy strong {
  color: #f8fafc;
}

.transfer-copy p {
  font-size: 0.72rem;
  color: #64748b;
  margin: 2px 0 0 0;
  line-height: 1.3;
}

.btn-earnings-transfer {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.btn-earnings-transfer:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

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

.secondary-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-express-payout {
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-express-payout:hover {
  background: #059669;
}

.btn-download-cert {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.18s ease;
}

html[data-theme="dark"] .btn-download-cert {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.btn-download-cert:hover {
  background: #f1f5f9;
}

.earnings-compact-bar.interactive {
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.earnings-compact-bar.interactive:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.earnings-compact-bar.interactive:active {
  transform: translateY(0);
}

/* ── Badges de Confianza del Pasajero en Ofertas (Smart Trust Badge) ── */
.p-name-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.passenger-trust-badge {
  display: inline-flex;
  align-items: center;
}

.trust-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.trust-icon-svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Cédula Verificada: Esmeralda / Verificado */
.trust-badge-pill.trust-id {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #10b981;
}
html[data-theme="dark"] .trust-badge-pill.trust-id {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

/* Pago con Tarjeta: Azul / Fintech */
.trust-badge-pill.trust-card {
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.38);
  color: #3b82f6;
}
html[data-theme="dark"] .trust-badge-pill.trust-card {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

/* Teléfono Verificado: Ámbar / Celular SMS */
.trust-badge-pill.trust-phone {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #d97706;
}
html[data-theme="dark"] .trust-badge-pill.trust-phone {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

/* ====================================================
   BANNER DE ERRORES / DUPLICADOS EN REGISTRO CHOFER (CP-1.2)
   ==================================================== */
.signup-alert-banner {
  background: #fef2f2;
  border: 1.5px solid #f87171;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeInNotice 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.signup-alert-banner.hidden {
  display: none !important;
}

.signup-alert-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.signup-alert-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.signup-alert-text {
  flex: 1;
}

.signup-alert-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: #991b1b;
  margin-bottom: 3px;
  font-family: var(--font-display, inherit);
}

.signup-alert-text p {
  font-size: 0.82rem;
  color: #7f1d1d;
  margin: 0;
  line-height: 1.35;
  font-weight: 500;
}

.btn-goto-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #dc2626;
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: var(--font-display, inherit);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.btn-goto-login:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

/* ── Estandarización Universal de Iconos (Design System v2.0) ── */
.icon-inline-svg {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
  display: inline-block;
  object-fit: contain;
}

.icon-svg-btn {
  width: 16px;
  height: 16px;
  display: block;
  pointer-events: none;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #94a3b8;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #f8fafc;
}

/* ── MODALES CONDUCTOR WHITE HIGH-CONTRAST (DESIGN SYSTEM v2.0) ── */
.driver-compensation-modal {
  max-width: 440px !important;
  width: 92% !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18) !important;
  border-radius: 20px !important;
  padding: 22px !important;
  color: #0f172a !important;
}

.driver-compensation-modal .btn-close-modal,
.driver-noshow-modal .btn-close-modal {
  background: #f1f5f9 !important;
  color: #64748b !important;
}

.driver-compensation-modal .btn-close-modal:hover,
.driver-noshow-modal .btn-close-modal:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.driver-noshow-modal {
  max-width: 420px !important;
  width: 92% !important;
  background: #ffffff !important;
  border: 1px solid #fecaca !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18) !important;
  border-radius: 20px !important;
  padding: 22px !important;
  color: #0f172a !important;
}

.compensation-icon-wrap {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #047857 !important;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.compensation-icon-wrap svg {
  width: 24px;
  height: 24px;
  color: #047857;
}

.noshow-icon-wrap {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #dc2626 !important;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-comp-title {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  margin: 0;
  line-height: 1.3;
}

.modal-comp-subtitle {
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.85rem !important;
  color: #475569 !important;
  margin: 2px 0 0 0;
}

.comp-modal-body {
  padding: 14px 0 4px 0 !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comp-desc-text {
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.95rem !important;
  color: #475569 !important;
  line-height: 1.5 !important;
  margin: 0;
}

.comp-benefits-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comp-unified-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 16px !important;
  margin: 16px 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.comp-unified-card .flex {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  color: #1e293b !important;
  font-size: 0.90rem !important;
  font-weight: 500 !important;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif) !important;
}

.comp-unified-card .text-amber-500 {
  color: #f59e0b !important;
}

.comp-unified-card .text-emerald-600 {
  color: #059669 !important;
}

.comp-unified-card svg {
  width: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  flex-shrink: 0 !important;
  display: block !important;
}

.comp-unified-card strong {
  font-weight: 700 !important;
  color: #0f172a !important;
}

.btn-comp-action {
  width: 100% !important;
  background: #2563eb !important;
  color: #ffffff !important;
  padding: 13px 20px !important;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25) !important;
  transition: all 0.2s ease !important;
}

.btn-comp-action:hover {
  background: #1d4ed8 !important;
  transform: translateY(-1px);
}
