/* ==========================================================================
   Routify — Cabina Móvil de Conductor
   Responsive Mobile-First, inDrive-Style Connection Toggle, Cockpit & Radar
   ========================================================================== */

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

:root {
  --bg-dark: #070a13;
  --bg-surface: #0e1526;
  --bg-card: rgba(14, 21, 38, 0.92);
  --bg-card-solid: #0f182c;
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.35);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.4);
  --rose: #ef4444;
  --rose-glow: rgba(239, 68, 68, 0.4);
  --border: rgba(255, 255, 255, 0.08);
  --border-active: rgba(16, 185, 129, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --shadow-luxe: 0 15px 35px rgba(0, 0, 0, 0.65);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow: hidden;
  position: fixed;
  inset: 0;
}

.driver-app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: -webkit-fill-available;
  position: relative;
  overflow: hidden;
}

.routify-guarded {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.routify-guarded.routify-active {
  opacity: 1;
  visibility: visible;
}

/* Header Móvil Compacto */
.conductor-header {
  background: rgba(7, 10, 19, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 40;
  height: 56px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-back-btn:active {
  transform: scale(0.92);
}

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

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title-row h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.company-badge {
  font-size: 0.65rem;
  background: var(--gold);
  color: #070a13;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.driver-unit-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

.btn-sos-driver {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--rose);
  color: var(--rose);
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: var(--radius-pill);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.btn-sos-driver:active {
  transform: scale(0.92);
  background: var(--rose);
  color: #fff;
}

/* ==========================================================================
   Toggle de Conexión Estilo inDrive (Táctil, prominente y fluido)
   ========================================================================== */
.indrive-toggle-container {
  padding: 10px 14px 6px;
  background: rgba(7, 10, 19, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 35;
}

.indrive-toggle-bar {
  width: 100%;
  border-radius: 16px;
  padding: 4px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.indrive-toggle-bar.offline {
  background: #141b2d;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.indrive-toggle-bar.online {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.12) 100%);
  border: 1.5px solid var(--emerald);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.25);
}

.indrive-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  gap: 14px;
  text-align: left;
  user-select: none;
}

/* Slider Track & Thumb */
.toggle-slider {
  width: 58px;
  height: 34px;
  background: #1e293b;
  border-radius: var(--radius-pill);
  position: relative;
  flex-shrink: 0;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.indrive-toggle-bar.online .toggle-slider {
  background: var(--emerald);
  border-color: rgba(255, 255, 255, 0.3);
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #070a13;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.indrive-toggle-bar.online .toggle-thumb {
  transform: translateX(24px);
  background: #ffffff;
  color: var(--emerald);
}

.toggle-thumb .icon-offline {
  display: block;
}
.toggle-thumb .icon-online {
  display: none;
}

.indrive-toggle-bar.online .toggle-thumb .icon-offline {
  display: none;
}
.indrive-toggle-bar.online .toggle-thumb .icon-online {
  display: block;
}

/* Text Block in Toggle */
.toggle-text-block {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.toggle-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.radar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b;
  transition: all 0.3s ease;
}

.indrive-toggle-bar.online .radar-dot {
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.toggle-title-line strong {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #fff;
}

.indrive-toggle-bar.online .toggle-title-line strong {
  color: var(--emerald);
}

.toggle-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.indrive-toggle-bar.online .toggle-subtitle {
  color: #a7f3d0;
}

/* Métricas Rápidas */
.driver-metrics-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(14, 21, 38, 0.6);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.metric-val {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.metric-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.metric-item.highlight .metric-val {
  color: var(--gold);
}

.metric-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
}

/* ==========================================================================
   Mapa Satelital Fullscreen y Floating Widgets
   ========================================================================== */
.driver-map-viewport {
  flex: 1 1 auto;
  position: relative;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

#driverMap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #090e1a;
}

.btn-float-gps {
  position: absolute;
  right: 14px;
  bottom: 180px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(14, 21, 38, 0.92);
  border: 1px solid var(--border);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 25;
  transition: all 0.2s ease;
}

.btn-float-gps:active {
  transform: scale(0.92);
  background: var(--gold);
  color: #070a13;
}

/* HUD Tacómetro Flotante */
.speed-hud-float {
  position: absolute;
  left: 14px;
  bottom: 180px;
  background: rgba(14, 21, 38, 0.92);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  z-index: 25;
}

.speed-number-wrap {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.speed-number {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.speed-unit {
  font-size: 0.65rem;
  color: var(--gold);
  font-weight: 700;
}

.speed-accuracy-tag {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ==========================================================================
   Bottom Drawer / Resumen de Turno
   ========================================================================== */
.driver-bottom-drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(7, 10, 19, 0.98) 75%, rgba(7, 10, 19, 0));
  pointer-events: none;
}

.turn-summary-card,
.trip-cockpit-card {
  pointer-events: auto;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-luxe);
}

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

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

.turn-pill-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--gold);
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.turn-summary-left h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.turn-summary-left p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Cockpit Activo de Viaje */
.cockpit-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.cockpit-badge {
  font-size: 0.65rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.cockpit-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}

.cockpit-fare-wrap {
  text-align: right;
}

.cockpit-fare-number {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold);
}

.cockpit-fare-wrap span {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.cockpit-route-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.route-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.point-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.point-badge.origin {
  background: var(--gold);
  color: #070a13;
}

.point-badge.dest {
  background: var(--rose);
  color: #fff;
}

.point-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: block;
}

.point-address {
  font-size: 0.82rem;
  color: #cbd5e1;
  font-weight: 600;
  line-height: 1.3;
  display: block;
}

.cockpit-action-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-step-action {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--gold) 0%, #d97706 100%);
  color: #070a13;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
}

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

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

.btn-nav-ext,
.btn-call-passenger {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.btn-nav-ext {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.btn-call-passenger {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   Modal de Oferta Entrante Estilo inDrive (Touch Friendly)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  z-index: 9999;
}

.trip-offer-card {
  width: 100%;
  max-width: 480px;
  background: #0d1527;
  border: 1.5px solid var(--gold);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px var(--gold-glow);
  position: relative;
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.offer-timer-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
}

.timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--rose));
  transition: width 1s linear;
}

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

.offer-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-ring-dot {
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  animation: livePulse 1s infinite;
}

.offer-badge-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.offer-timer-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.offer-fare-card {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  margin-bottom: 12px;
}

.fare-caption {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.fare-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1.1;
  margin: 2px 0;
}

.fare-category {
  font-size: 0.7rem;
  background: var(--gold);
  color: #070a13;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  font-weight: 800;
}

.offer-locations {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.loc-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.loc-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}

.loc-dot.a {
  background: var(--gold);
  color: #070a13;
}

.loc-dot.b {
  background: var(--rose);
  color: #fff;
}

.loc-lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: block;
}

.loc-row strong {
  font-size: 0.88rem;
  color: #fff;
  font-weight: 600;
  line-height: 1.3;
}

.offer-actions {
  display: flex;
  gap: 10px;
}

.btn-reject {
  flex: 1;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: #cbd5e1;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.btn-reject:active {
  background: rgba(239, 68, 68, 0.2);
  color: var(--rose);
}

.btn-accept {
  flex: 2;
  padding: 14px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 20px var(--emerald-glow);
  animation: acceptPulse 2s infinite;
}

@keyframes acceptPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Modal SOS */
.danger-card {
  background: #14090b;
  border: 1px solid var(--rose);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 440px;
}

.btn-danger-driver {
  padding: 10px 18px;
  background: var(--rose);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-secondary {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: #cbd5e1;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

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

/* ==========================================================================
   Company Header & Selfie Avatar
   ========================================================================== */
.company-brand-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.company-logo-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #141b2d;
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.company-logo-fallback {
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.driver-selfie-pill {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.driver-selfie-pill:active {
  transform: scale(0.92);
}

/* Selfie Verification Alert Banner */
.selfie-alert-banner {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.08) 100%);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: #f8fafc;
  z-index: 36;
}

.selfie-alert-banner .banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-take-selfie-small {
  padding: 5px 12px;
  background: var(--gold);
  color: #070a13;
  border: none;
  border-radius: var(--radius-pill);
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

/* ==========================================================================
   Taxímetro Digital en Vivo
   ========================================================================== */
.digital-taximeter-box {
  background: rgba(7, 10, 19, 0.85);
  border: 1.5px solid var(--emerald);
  border-radius: 12px;
  padding: 6px 12px;
  text-align: right;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.taximeter-fare {
  font-family: 'Outfit', monospace, sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--emerald);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.taximeter-sub {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 2px;
}

.cockpit-passenger-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.passenger-avatar-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #141b2d;
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

/* Botón Llamada WebRTC de Audio */
.btn-call-webrtc {
  flex: 1;
  padding: 10px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--emerald);
  color: var(--emerald);
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-call-webrtc:active {
  background: var(--emerald);
  color: #fff;
  transform: scale(0.95);
}

/* Botón Chat Viaje */
.btn-chat-trip {
  flex: 1;
  padding: 10px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid #3b82f6;
  color: #60a5fa;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-chat-trip:active {
  background: #3b82f6;
  color: #fff;
  transform: scale(0.95);
}

/* Botón Flotante de Chat */
.btn-float-chat {
  position: absolute;
  right: 14px;
  bottom: 236px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(14, 21, 38, 0.94);
  border: 1px solid var(--border);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 25;
  transition: all 0.2s ease;
}

.btn-float-chat:active {
  transform: scale(0.92);
  background: #38bdf8;
  color: #070a13;
}

.chat-badge-counter {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
}

/* ==========================================================================
   Chat & Broadcast Drawer
   ========================================================================== */
.chat-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
}

.chat-drawer-box {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  height: 70vh;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
}

.chat-drawer-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.chat-tabs-row {
  display: flex;
  gap: 8px;
}

.chat-tab-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.chat-tab-btn.active {
  background: var(--gold);
  color: #070a13;
  border-color: var(--gold);
}

.btn-close-chat {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
}

.chat-messages-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-notice {
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  padding: 8px;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  word-break: break-word;
}

.chat-bubble.mine {
  align-self: flex-end;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.chat-bubble.theirs {
  align-self: flex-start;
  background: #1e293b;
  color: #f8fafc;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-bubble.broadcast {
  align-self: stretch;
  max-width: 100%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fef3c7;
  border-radius: 12px;
}

.chat-input-bar {
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--border);
  background: rgba(7, 10, 19, 0.95);
}

.chat-text-input {
  flex-grow: 1;
  background: #141b2d;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.chat-text-input:focus {
  border-color: var(--gold);
}

.btn-send-chat {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  color: #070a13;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* ==========================================================================
   Selfie Modal
   ========================================================================== */
.selfie-card {
  background: #0e1526;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.selfie-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  color: #fff;
}

.selfie-header p {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 4px;
  line-height: 1.4;
}

.selfie-preview-box {
  width: 100%;
  height: 240px;
  background: #070a13;
  border: 2px dashed rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.selfie-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #94a3b8;
  font-size: 0.8rem;
  text-align: center;
  padding: 20px;
}

.selfie-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-emerald {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Responsive media queries */
@media (min-width: 768px) {
  .driver-bottom-drawer {
    max-width: 480px;
    left: 20px;
    right: auto;
    bottom: 20px;
  }
  .indrive-toggle-container {
    max-width: 480px;
    margin: 10px auto 0;
    border-radius: 16px;
    border: 1px solid var(--border);
  }
}

/* ==========================================================================
   Hamburger Button & Header Wallet Pill
   ========================================================================== */
.btn-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-hamburger:active {
  transform: scale(0.92);
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold);
}

.driver-wallet-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.driver-wallet-pill.low-balance {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}

.driver-wallet-pill:active {
  transform: scale(0.94);
}

.badge-porteria-pill {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  margin-left: 6px;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

/* ==========================================================================
   Driver Offcanvas Sidebar Drawer
   ========================================================================== */
.driver-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  animation: fadeInOverlay 0.25s ease;
}

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

.driver-sidebar-drawer {
  width: 320px;
  max-width: 85vw;
  height: 100%;
  background: #090e1a;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
  animation: slideInSidebar 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

@keyframes slideInSidebar {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

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

.sidebar-driver-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: #141d33;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-driver-details h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 3px;
}

.sidebar-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.badge-plate {
  background: #f59e0b;
  color: #070a13;
  font-weight: 800;
}

.status-indicator-tag {
  font-size: 0.7rem;
  color: #94a3b8;
  display: inline-block;
}

.btn-close-sidebar {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.btn-close-sidebar:hover {
  color: #fff;
}

/* Sidebar Wallet Card */
.sidebar-wallet-card {
  margin: 16px 16px 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.9));
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.sidebar-wallet-card.low {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.9));
  border-color: rgba(245, 158, 11, 0.4);
}

.wallet-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.wallet-label {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #94a3b8;
}

.wallet-badge-coin {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  color: #cbd5e1;
}

.wallet-balance-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 10px;
}

.wallet-currency {
  font-size: 1.2rem;
  font-weight: 800;
  color: #10b981;
}

.sidebar-wallet-card.low .wallet-currency {
  color: #f59e0b;
}

.wallet-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 900;
  color: #fff;
}

.porterias-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  margin-bottom: 10px;
}

.porteria-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.porterias-status-pill.disabled .porteria-dot {
  background: #f59e0b;
}

.btn-request-topup {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 10px;
  padding: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-request-topup:active {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--gold);
  color: var(--gold);
}

/* Sidebar Nav Menu */
.sidebar-nav-menu {
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.sidebar-menu-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #cbd5e1;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
}

.sidebar-menu-btn:active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fff;
  transform: scale(0.98);
}

.menu-btn-content strong {
  display: block;
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 2px;
}

.menu-btn-content span {
  font-size: 0.72rem;
  color: #94a3b8;
}

.sidebar-footer-box {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-sidebar-signout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #f43f5e;
  border-radius: 10px;
  padding: 10px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sidebar-signout:active {
  background: #f43f5e;
  color: #fff;
}

.company-legal-footer {
  text-align: center;
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 4px;
}

/* ==========================================================================
   Píldora de Modo de Despacho (FIFO vs Difusión Radial)
   ========================================================================== */
.dispatch-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 6px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  transition: all 0.25s ease;
}

.dispatch-mode-pill.mode-fifo {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

.dispatch-mode-pill.mode-group {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

/* ==========================================================================
   Tarifa Acordada del Viaje (Reemplazo Taxímetro)
   ========================================================================== */
.trip-agreed-fare-box {
  background: rgba(7, 10, 19, 0.85);
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  padding: 6px 12px;
  text-align: right;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

/* ==========================================================================
   HUD Flotante de Guía hacia el Pasajero
   ========================================================================== */
.driver-nav-guidance-hud {
  position: absolute;
  top: 14px;
  left: 12px;
  right: 12px;
  z-index: 30;
  background: rgba(7, 10, 19, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideDownHud 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.nav-hud-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.nav-hud-arrow {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: pulseNav 2s infinite ease-in-out;
}

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

.nav-hud-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nav-hud-target-lbl {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
}

.nav-hud-address {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.nav-hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-hud-metrics {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.nav-hud-metrics strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.nav-hud-metrics span {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
}

.btn-external-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #60a5fa;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-external-nav:hover, .btn-external-nav:active {
  background: #3b82f6;
  color: #fff;
}


/* ============================================================
   ROUTIFY DRIVER UI — Mejoras v4
   ============================================================ */

/* 1) Toggle ONLINE más prominente con aura pulsante */
.indrive-toggle-bar.online {
  position: relative;
  overflow: hidden;
}
.indrive-toggle-bar.online::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: conic-gradient(from 0deg, #10b981, transparent 40%, #10b981 80%);
  animation: rotateGlow 4s linear infinite;
  z-index: 0;
  opacity: 0.35;
  filter: blur(8px);
}
.indrive-toggle-bar.online > * { position: relative; z-index: 1; }
@keyframes rotateGlow { to { transform: rotate(360deg); } }

.indrive-toggle-bar.online .toggle-slider {
  box-shadow: 0 0 16px rgba(16,185,129,0.6), inset 0 0 8px rgba(0,0,0,0.3);
}
.indrive-toggle-bar.online .toggle-title-line strong {
  text-shadow: 0 0 12px rgba(16,185,129,0.8);
}

/* 2) Offer card más atractiva */
.trip-offer-card {
  position: relative;
  overflow: visible;
}
.trip-offer-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 25px;
  background: linear-gradient(135deg, #f59e0b, #ef4444, #f59e0b);
  background-size: 200% 200%;
  animation: offerGlow 3s ease infinite;
  z-index: -1;
  opacity: 0.6;
}
@keyframes offerGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.trip-offer-card .fare-amount {
  font-size: 2.2rem;
  text-shadow: 0 0 20px rgba(245,158,11,0.5);
  letter-spacing: -0.02em;
}
.btn-accept {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.6);
  animation: acceptPulseStrong 1.5s infinite;
}
@keyframes acceptPulseStrong {
  0% { box-shadow: 0 4px 20px rgba(16,185,129,0.4), 0 0 0 0 rgba(16,185,129,0.6); }
  70% { box-shadow: 0 4px 20px rgba(16,185,129,0.4), 0 0 0 12px rgba(16,185,129,0); }
  100% { box-shadow: 0 4px 20px rgba(16,185,129,0.4), 0 0 0 0 rgba(16,185,129,0); }
}

/* 3) Cockpit con tarifa más grande y destacada */
.trip-agreed-fare-box {
  background: linear-gradient(135deg, rgba(245,158,11,0.15) 0%, rgba(245,158,11,0.05) 100%);
  border-color: #f59e0b;
  padding: 10px 16px;
  box-shadow: 0 0 20px rgba(245,158,11,0.35);
}
.taximeter-fare {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-shadow: 0 0 15px rgba(245,158,11,0.4);
}

/* 4) Métricas más elegantes */
.driver-metrics-strip {
  background: linear-gradient(135deg, rgba(14,21,38,0.9), rgba(20,30,50,0.7));
  border-color: rgba(245,158,11,0.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 4px 12px rgba(0,0,0,0.3);
}
.metric-val {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.metric-item.highlight .metric-val {
  color: #f59e0b;
  text-shadow: 0 0 10px rgba(245,158,11,0.5);
}

/* 5) Botones flotantes con más peso */
.btn-float-gps,
.btn-float-chat {
  backdrop-filter: blur(12px);
  border-color: rgba(245,158,11,0.25);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}
.btn-float-gps:hover,
.btn-float-chat:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(245,158,11,0.5);
}
.btn-float-gps:active,
.btn-float-chat:active {
  transform: scale(0.92);
}

/* 6) Header con glassmorphism mejorado */
.conductor-header {
  background: linear-gradient(180deg, rgba(7,10,19,0.98), rgba(7,10,19,0.75));
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.driver-wallet-pill {
  transition: transform 0.2s;
  box-shadow: 0 0 12px rgba(16,185,129,0.3);
}
.driver-wallet-pill:hover { transform: scale(1.03); }

/* 7) Offer card timer más llamativo */
.offer-timer-val {
  background: linear-gradient(135deg, rgba(239,68,68,0.25), rgba(245,158,11,0.25));
  border: 1px solid rgba(239,68,68,0.5);
  font-variant-numeric: tabular-nums;
  animation: timerPulse 1s infinite;
}
@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* 8) Chat bubbles mejorados */
.chat-bubble.mine {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  box-shadow: 0 2px 8px rgba(2,132,199,0.3);
}
.chat-bubble.theirs {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* 9) Animación de entrada para el cockpit */
.trip-cockpit-card {
  animation: cockpitSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cockpitSlide {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 10) Selfie banner más visible */
.selfie-alert-banner {
  animation: bannerPulse 2s ease-in-out infinite;
}
@keyframes bannerPulse {
  0%, 100% { border-bottom-color: rgba(245,158,11,0.3); }
  50% { border-bottom-color: rgba(245,158,11,0.7); }
}
/* ============================================================
   Banner de Permisos de Notificación (v5)
   ============================================================ */

.push-permission-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.06) 100%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.35);
  z-index: 36;
  animation: slideDownPush 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.push-permission-banner .banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.push-permission-banner .banner-text strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.push-permission-banner .banner-text p {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.3;
}

.push-permission-banner button {
  padding: 8px 16px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 9999px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.2s;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.push-permission-banner button:active {
  transform: scale(0.95);
  background: #2563eb;
}

.push-permission-banner button:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Estado: permiso denegado */
.push-permission-banner.denied {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0.06) 100%);
  border-bottom-color: rgba(245, 158, 11, 0.4);
}

.push-permission-banner.denied button {
  background: rgba(255, 255, 255, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: none;
}

/* Estado: iOS requiere instalar PWA */
.push-permission-banner.ios {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.18) 0%, rgba(139, 92, 246, 0.06) 100%);
  border-bottom-color: rgba(139, 92, 246, 0.4);
}

.push-permission-banner.ios button {
  background: rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.5);
  box-shadow: none;
}

/* Cuando el banner es visible, reducimos un poco el margen del toggle para no hacer scroll */
.push-permission-banner + .indrive-toggle-container {
  padding-top: 8px;
}