/* --- GOOGLE FONTS IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Poppins:wght@400;500;700&display=swap');

/* --- MASTER DESIGN SYSTEM - OBLIGATORIO --- */
:root {
    /* Paleta de Marca */
    --primary-violet: #7B2CBF;
    --secondary-teal: #00B4D8;
    --alert-red: #FF3B30;
    
    /* Paleta UI Neutra (Estilo iOS) */
    --bg-app: #FFFFFF;         /* Fondo principal limpio */
    --bg-secondary: #F6F6F6;   /* Para inputs y fondos de sección */
    --text-dark: #1A1A1A;      /* Títulos casi negros */
    --text-muted: #8E8E93;     /* Subtítulos grises estilo Apple */
    --divider: #E5E5EA;        /* Líneas divisorias sutiles */

    /* Física y Sombras (Lo que lo hace sentir "caro") */
    --shadow-bottom-sheet: 0px -8px 30px rgba(0, 0, 0, 0.12); /* Sombra suave hacia arriba */
    --shadow-floating-btn: 0px 4px 16px rgba(0, 0, 0, 0.2);   /* Sombra para botones sobre mapa */
    --radius-xl: 24px;  /* Para bordes superiores de paneles */
    --radius-m: 16px;   /* Para botones y tarjetas */
    --radius-s: 12px;   /* Para inputs */
    --transition-spring: cubic-bezier(0.25, 0.8, 0.25, 1); /* Animación tipo "resorte" de iOS */
}

/* --- RESET & BASE STYLES --- */
* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    background-color: var(--bg-app);
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    color: var(--text-dark);
}

#app {
    width: 100%;
    height: 100vh;
    background: var(--bg-app);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* --- TYPOGRAPHY HIERARCHY --- */
h1, h2 {
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    margin: 0 0 10px 0;
}
h1 { font-size: 28px; }
h2 { font-size: 24px; }

p {
    font-weight: 400;
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.subtitulo, .help-text {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 14px;
}

a {
    color: var(--primary-violet);
    text-decoration: none;
    font-weight: 500;
}

/* --- UI COMPONENTS (CRITICAL SPECS) --- */

/* Inputs de Texto - Specs Exactas */
input[type="text"],
input[type="email"],
input[type="password"] {
    appearance: none;
    border: none; /* NO deben tener bordes por defecto */
    background-color: var(--bg-secondary);
    height: 56px; /* Altos y fáciles de tocar */
    width: 100%;
    border-radius: var(--radius-s);
    padding: 0 20px;
    font-size: 16px;
    font-family: 'Inter', 'Poppins', sans-serif;
    color: var(--text-dark);
    transition: all 0.2s var(--transition-spring);
    margin-bottom: 12px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border: 2px solid var(--primary-violet); /* Estado :focus: Agregar un borde de 2px sólido */
    background-color: var(--bg-app);
}

/* Botones Primarios (CTA) - Specs Exactas */
.btn, .btn-primary {
    display: block;
    width: 100%; /* width: 100% */
    height: 56px; /* height: 56px */
    background-color: var(--primary-violet);
    color: white;
    font-weight: 700;
    font-size: 18px;
    border-radius: var(--radius-m);
    border: none;
    cursor: pointer;
    text-align: center;
    line-height: 56px; /* Para alinear texto verticalmente */
    box-shadow: 0 4px 12px rgba(123, 44, 191, 0.3); /* Sombra coloreada sutil */
    transition: all 0.3s var(--transition-spring);
}

.btn:hover, .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(123, 44, 191, 0.4);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-dark);
    box-shadow: none;
}
.btn-secondary:hover {
    background-color: #e8e8e8;
    box-shadow: none;
    transform: translateY(-1px);
}

/* --- ARQUITECTURA DE CAPAS --- */

/* CAPA BASE (Mapa) - Z-INDEX 0 */
#map-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0; /* CAPA BASE (Z-Index 0): El Mapa */
}
#map {
    width: 100%;
    height: 100%;
}
/* Leaflet attribution hidden for cleaner UI */
.leaflet-control-attribution { 
    display: none;
}


/* CAPA 10: HEADER FLOTANTE - Z-INDEX 10 */
.floating-header {
    position: absolute;
    top: 50px;
    left: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-m);
    padding: 12px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.menu-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-app);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 18px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--transition-spring);
}

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

.header-greeting {
    flex: 1;
    margin: 0 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.profile-circle {
    width: 44px;
    height: 44px;
    background: var(--primary-violet);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(123, 44, 191, 0.3);
}

/* Indicador de Geolocalización */
.location-status {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-teal);
    font-size: 16px;
}

.location-pulse {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary-teal);
    opacity: 0.3;
    animation: location-pulse 2s infinite;
}

@keyframes location-pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.1;
    }
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

/* PIN CENTRAL FIJO - Z-INDEX 10 */
.central-pin {
    position: fixed;
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -100%);
    z-index: 10;
    pointer-events: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.central-pin i {
    font-size: 40px;
    color: var(--primary-violet);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease-out;
}

/* Animación del pin cuando el mapa se mueve */
.map-moving .central-pin i {
    animation: pin-bounce 0.3s ease-out;
}

@keyframes pin-bounce {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.15); }
    100% { transform: translateY(0) scale(1); }
}


/* CAPA 20: BOTTOM SHEETS - Z-INDEX 20 */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    background: white; /* background: white */
    border-radius: var(--radius-xl) var(--radius-xl) 0 0; /* border-radius: var(--radius-xl) var(--radius-xl) 0 0 */
    box-shadow: var(--shadow-bottom-sheet); /* box-shadow: var(--shadow-bottom-sheet) */
    
    transform: translateY(100%); /* Fuera de la pantalla por defecto */
    transition: transform 0.4s var(--transition-spring); /* Duración de 0.4s con --transition-spring */
    z-index: 20; /* CAPA "BOTTOM SHEETS" (Z-Index 20) */

    padding: 20px;
    padding-top: 10px;
    max-height: 90vh;
    overflow-y: auto;
}

.bottom-sheet.is-visible {
    transform: translateY(0); /* Cambiar transform cuando se muestra */
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background-color: var(--divider);
    border-radius: 2px;
    margin: 0 auto 15px auto;
}

/* Panel de Destino Estilo Uber/DiDi */
.map-bottom-sheet {
    padding: 24px;
    padding-bottom: 120px; /* Espacio para el botón SOS y botón de confirmar */
}

.destination-search-container {
    margin-top: 8px;
}

.search-box-large {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 20px;
    z-index: 1;
}

.search-input-large {
    width: 100%;
    height: 64px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-m);
    padding: 0 20px 0 56px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.2s var(--transition-spring);
}

.search-input-large:focus {
    outline: none;
    border-color: var(--primary-violet);
    background: var(--bg-app);
    box-shadow: 0 0 0 4px rgba(123, 44, 191, 0.1);
}

.quick-destinations {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.quick-dest-btn {
    flex: 1;
    height: 56px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-m);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s var(--transition-spring);
    font-family: 'Poppins', sans-serif;
}

.quick-dest-btn i {
    font-size: 20px;
    color: var(--primary-violet);
}

.quick-dest-btn span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.quick-dest-btn:active {
    transform: scale(0.98);
    background: var(--bg-app);
    border-color: var(--primary-violet);
}

/* Botón de Confirmar Destino */
.btn-confirm-destination {
    position: absolute;
    bottom: 20px;
    left: 24px;
    right: 24px;
    height: 56px;
    background: #1A1A1A;
    color: white;
    border: none;
    border-radius: var(--radius-m);
    font-size: 16px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.2s var(--transition-spring);
    z-index: 21;
}

.btn-confirm-destination:active {
    transform: scale(0.98);
    background: #2A2A2A;
}


/* CAPA MODALES/OVERLAYS - Z-INDEX 50 */
.sos-overlay-full {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--alert-red); /* Fondo rojo sólido */
    z-index: 50; /* CAPA MODALES/OVERLAYS (Z-Index 50): Bloqueos Totales */
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sos-overlay-full.is-visible {
    opacity: 1;
    pointer-events: all;
}

.sos-content {
    text-align: center;
    padding: 40px;
}

.sos-icon-large {
    font-size: 80px;
    margin-bottom: 20px;
    animation: sos-pulse-icon 2s infinite;
}

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

.sos-overlay-full h1 {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: white;
}

.sos-timer {
    font-size: 64px;
    font-weight: 700;
    margin: 30px 0;
    font-family: 'Courier New', monospace;
    letter-spacing: 4px;
}

.sos-message {
    font-size: 18px;
    text-align: center;
    color: white;
    margin: 20px 0;
    line-height: 1.6;
}

.sos-recording {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
    font-size: 16px;
    font-weight: 600;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.btn-sos-cancel {
    margin-top: 30px;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: var(--radius-m);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s var(--transition-spring);
}

.btn-sos-cancel:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Skeleton Loaders */
.skeleton-loader-container {
    margin-top: 24px;
}

.skeleton-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-m);
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-content {
    flex: 1;
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    border-radius: 6px;
    margin-bottom: 8px;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-line-title {
    width: 60%;
}

.skeleton-line-subtitle {
    width: 40%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}


/* --- OTROS COMPONENTES --- */

/* Botón SOS flotante sobre el panel - Z-INDEX 15 */
/* Flujo Crítico de Seguridad (SOS): El botón SOS debe tener una animación CSS permanente de "latido" (animation: pulse 2s infinite) */
.sos-btn {
    position: fixed;
    bottom: 160px;
    right: 24px;
    width: 64px;
    height: 64px;
    background-color: var(--alert-red);
    color: white;
    border-radius: 50%;
    border: none;
    font-size: 16px;
    font-weight: 700;
    z-index: 15;
    cursor: pointer;
    display: none; /* Oculto por defecto, se muestra durante el viaje */
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(255, 59, 48, 0.4), 0 0 0 0 rgba(255, 59, 48, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s var(--transition-spring);
}

/* Animación de latido cuando el viaje está activo */
.sos-btn.active-trip {
    animation: pulse 2s infinite, sos-pulse-active 1.5s infinite; /* Animación CSS permanente de "latido" */
    display: flex !important; /* Mostrar cuando el viaje está activo */
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .sos-btn {
        bottom: 140px;
        right: 20px;
    }
    
    .floating-header {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: calc(100vw - 20px);
    }
}

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

/* Animación de latido permanente para botón SOS */
@keyframes pulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(255, 59, 48, 0.4), 0 0 0 0 rgba(255, 59, 48, 0.7);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 4px 20px rgba(255, 59, 48, 0.6), 0 0 0 15px rgba(255, 59, 48, 0);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(255, 59, 48, 0.4), 0 0 0 0 rgba(255, 59, 48, 0.7);
    }
}

.login-container {
    padding: 20px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- COMPONENTES DE SIMULACIÓN --- */

/* Overlay de Radar */
.radar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 30;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.radar-overlay.is-visible {
    opacity: 1;
    pointer-events: all;
}

.radar-circle {
    width: 200px;
    height: 200px;
    border: 3px solid var(--primary-violet);
    border-radius: 50%;
    position: relative;
    animation: radar-pulse 2s infinite;
}

.radar-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    border: 2px solid var(--secondary-teal);
    border-radius: 50%;
    animation: radar-pulse 2s infinite 0.5s;
}

.radar-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 2px solid var(--primary-violet);
    border-radius: 50%;
    animation: radar-pulse 2s infinite 1s;
}

@keyframes radar-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.radar-content {
    margin-top: 40px;
    text-align: center;
    color: white;
}

.radar-content h2 {
    color: white;
    font-size: 18px;
    font-weight: 500;
}

/* Micro-notificaciones flotantes */
.micro-notifications {
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.micro-notification {
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    border-radius: var(--radius-m);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    color: var(--text-dark);
    animation: notification-fade 3s ease forwards;
    max-width: 80%;
    text-align: center;
}

@keyframes notification-fade {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    10% {
        opacity: 1;
        transform: translateY(0);
    }
    90% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Panel de Conductoras Encontradas */
.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: var(--primary-violet);
    border-radius: 50%;
    animation: dot-bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dot-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Tarjeta de Viaje Activo Premium */
.trip-active-sheet {
    padding: 24px;
}

.trip-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.driver-info-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.driver-photo-large {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-m);
    margin-right: 16px;
    object-fit: cover;
    border: 3px solid var(--primary-violet);
}

.driver-details {
    flex: 1;
}

.driver-name-large {
    margin: 0 0 4px 0;
    font-weight: 700;
    font-size: 22px;
    color: var(--text-dark);
}

.driver-car-text {
    margin: 0;
    color: var(--text-muted);
    font-size: 16px;
}

.plate-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-m);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.plate-label {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plate-number {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--primary-violet);
    font-family: 'Courier New', monospace;
}

.btn-share-route {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    border-radius: var(--radius-m);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.3s var(--transition-spring);
}

.btn-share-route:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.btn-share-route i {
    font-size: 20px;
}

/* Botón SOS pulsante durante viaje */
/* Animación de pulso para SOS activo (consolidada) */
@keyframes sos-pulse-active {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 20px rgba(255, 59, 48, 0);
    }
}

/* Canvas de confeti */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 100;
}

/* Voucher aplicado */
.voucher-applied {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 16px;
    border-radius: var(--radius-m);
    margin: 16px 0;
    text-align: center;
    animation: voucher-success 0.5s ease;
}

@keyframes voucher-success {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Animación para actualización de precio a $0.00 con color verde */
@keyframes voucher-price-update {
    0% {
        transform: scale(1.2);
        color: var(--text-dark);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        color: #4CAF50;
    }
}

.voucher-applied .check-icon {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

/* Icono de auto personalizado para Leaflet */
.leaflet-div-icon {
    background: transparent !important;
    border: none !important;
}

.car-marker {
    font-size: 32px;
    color: var(--primary-violet);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.1s ease;
}

.car-marker-icon {
    background: transparent !important;
    border: none !important;
}

/* Registro de Conductora */
.driver-step {
    padding: 20px 0;
}

.document-upload {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-m);
    cursor: pointer;
    transition: all 0.2s var(--transition-spring);
    border: 2px dashed var(--divider);
}

.upload-btn:hover {
    background: var(--bg-app);
    border-color: var(--primary-violet);
}

.upload-btn i {
    font-size: 24px;
    color: var(--primary-violet);
}

.upload-btn span {
    font-weight: 500;
    color: var(--text-dark);
}

/* Escáner Biométrico */
.biometric-scanner {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.scanner-frame {
    width: 250px;
    height: 300px;
    border: 3px solid var(--primary-violet);
    border-radius: var(--radius-m);
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
}

.scanner-laser {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #00FF00;
    box-shadow: 0 0 10px #00FF00;
    z-index: 2;
}

@keyframes scan-laser {
    0% {
        top: 0;
    }
    100% {
        top: 100%;
    }
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 1;
}

.scanner-overlay i {
    font-size: 80px;
    color: var(--primary-violet);
    opacity: 0.3;
}

.scanner-overlay p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Dashboard de Conductora */
.driver-dashboard-content {
    padding: 100px 24px 24px 24px;
    max-width: 600px;
    margin: 0 auto;
}

.earnings-card {
    background: linear-gradient(135deg, var(--primary-violet) 0%, #9B4DCA 100%);
    border-radius: var(--radius-xl);
    padding: 32px;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(123, 44, 191, 0.3);
}

.earnings-card h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
    color: white;
}

.earnings-card h1 {
    margin: 0 0 8px 0;
    font-size: 48px;
    font-weight: 700;
    color: white;
}

.earnings-card .subtitulo {
    margin: 0;
    color: white;
    opacity: 0.8;
}

.status-toggle-card {
    background: var(--bg-app);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.status-toggle-card h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 700;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-bottom: 12px;
}

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

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

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

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-violet);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.status-text {
    margin: 8px 0 0 0;
    font-weight: 600;
    font-size: 16px;
}

.recent-trips-card {
    background: var(--bg-app);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.recent-trips-card h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 700;
}

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

.trip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-m);
}

.trip-item strong {
    display: block;
    margin-bottom: 4px;
}

.trip-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-violet);
}

/* Lista de Conductoras Disponibles */
.drivers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.driver-card-selectable {
    background: var(--bg-app);
    border: 2px solid var(--divider);
    border-radius: var(--radius-m);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s var(--transition-spring);
}

.driver-card-selectable:hover {
    border-color: var(--primary-violet);
    box-shadow: 0 4px 12px rgba(123, 44, 191, 0.15);
    transform: translateY(-2px);
}

.driver-card-selectable.selected {
    border-color: var(--primary-violet);
    background: rgba(123, 44, 191, 0.05);
    box-shadow: 0 4px 12px rgba(123, 44, 191, 0.2);
}

.driver-card-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-violet);
}

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

.driver-card-name {
    font-weight: 700;
    font-size: 18px;
    margin: 0 0 4px 0;
    color: var(--text-dark);
}

.driver-card-details {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.driver-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #FFA500;
    font-weight: 600;
}

.driver-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.driver-card-price {
    text-align: right;
}

.driver-card-price-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-violet);
    margin: 0;
}

.driver-card-price-time {
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px 0 0 0;
}

/* Métodos de Pago */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.payment-method-btn {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-m);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s var(--transition-spring);
    text-align: left;
    width: 100%;
    font-family: 'Inter', 'Poppins', sans-serif;
}

.payment-method-btn:hover {
    background: var(--bg-app);
    border-color: var(--primary-violet);
    transform: translateY(-2px);
}

.payment-method-btn i {
    font-size: 24px;
    color: var(--primary-violet);
    width: 40px;
}

.payment-method-btn strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.payment-method-btn.selected {
    border-color: var(--primary-violet);
    background: rgba(123, 44, 191, 0.05);
}

/* Formulario de Pago con Tarjeta */
.card-payment-form {
    margin-top: 24px;
}

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

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

.form-group input {
    width: 100%;
    height: 56px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-s);
    padding: 0 20px;
    font-size: 16px;
    font-family: 'Inter', 'Poppins', sans-serif;
    color: var(--text-dark);
    transition: all 0.2s var(--transition-spring);
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-violet);
    background: var(--bg-app);
}

/* Panel de Pago Digital */
.digital-payment-options {
    margin-top: 24px;
}

.payment-option-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-m);
    padding: 24px;
}

.payment-option-card h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 700;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    background: white;
    border-radius: var(--radius-m);
    border: 2px dashed var(--divider);
}

.qr-code-placeholder {
    text-align: center;
    padding: 20px;
}

.payment-link-container {
    margin-top: 16px;
}

.payment-link-box {
    background: white;
    border-radius: var(--radius-m);
    padding: 20px;
}

.payment-link {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.payment-link input {
    flex: 1;
    height: 48px;
    background: var(--bg-secondary);
    border: 2px solid var(--divider);
    border-radius: var(--radius-s);
    padding: 0 16px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: var(--text-dark);
}

.btn-copy-link {
    width: 48px;
    height: 48px;
    background: var(--primary-violet);
    color: white;
    border: none;
    border-radius: var(--radius-s);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--transition-spring);
}

.btn-copy-link:hover {
    background: #6B1FA6;
    transform: scale(1.05);
}

/* Mejoras de Realismo - Input de Tarjeta */
.card-input-wrapper {
    position: relative;
}

.card-type-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card-type-icon.visible {
    opacity: 1;
}

.form-group input:focus + .card-type-icon,
.card-input-wrapper input:focus ~ .card-type-icon {
    opacity: 1;
}

/* Overlay de Procesamiento de Pago */
.payment-processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.payment-processing-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.payment-processing-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.payment-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary-violet), var(--secondary-teal));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: payment-pulse 2s infinite;
}

.payment-spinner i {
    font-size: 40px;
    color: white;
    animation: payment-rotate 2s linear infinite;
}

@keyframes payment-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(123, 44, 191, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(123, 44, 191, 0);
    }
}

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

.payment-processing-content h3 {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.payment-progress {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 20px;
}

.payment-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-violet), var(--secondary-teal));
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 2px;
}

.payment-processing-content.success {
    animation: payment-success-pop 0.5s ease;
}

.payment-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-success-icon i {
    font-size: 50px;
    color: white;
}

@keyframes payment-success-pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mejoras visuales en inputs */
.form-group input:valid {
    border-color: var(--primary-violet);
}

.error-message {
    color: #FF3B30;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Información en Tiempo Real del Viaje */
.realtime-trip-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--divider);
}

.realtime-stats {
    display: flex;
    gap: 16px;
    justify-content: space-around;
}

.realtime-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.realtime-stat i {
    font-size: 24px;
    color: var(--primary-violet);
    width: 32px;
    text-align: center;
}

.realtime-stat strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.realtime-stat .subtitulo {
    margin: 0;
    font-size: 12px;
}

/* Animación de actualización en tiempo real */
.realtime-stat strong {
    animation: realtime-pulse 2s infinite;
}

@keyframes realtime-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Notificación de SOS */
.sos-notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--alert-red);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-m);
    box-shadow: 0 8px 24px rgba(255, 59, 48, 0.4);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s var(--transition-spring);
}

.sos-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.sos-notification i {
    font-size: 20px;
    animation: sos-blink-icon 1s infinite;
}

@keyframes sos-blink-icon {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}