/* ==========================================================================
   WAY DRIVER - DISEÑO PROFESIONAL UNIFICADO 🚗
   ========================================================================== */

:root {
    --primary: #f39c12; /* Naranja del logo */
    --secondary: #0084ff; /* Azul del logo */
    --dark-bg: #000b1a;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    margin: 0; 
    padding: 0; 
    height: 100vh; 
    display: flex; 
    flex-direction: column; 
    background: var(--dark-bg); 
    overflow: hidden; 
}

#map { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 1; 
}

/* ==========================================================================
   AUTH SCREEN (LOGIN / REGISTRO CON EFECTO CRISTAL)
   ========================================================================== */
#auth-screen { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: radial-gradient(circle at center, #001a33 0%, #000b1a 100%); 
    z-index: 99999; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 20px; 
    box-sizing: border-box; 
    overflow-y: auto; 
    padding-top: 40px; 
}

.auth-box { 
    width: 100%; 
    max-width: 380px; 
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 30px 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    margin-bottom: 50px;
    color: white;
    text-align: center;
}

.logo-auth {
    width: 220px;
    margin-bottom: 25px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.6));
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

#auth-screen input, #auth-screen select { 
    width: 100%; 
    padding: 15px; 
    margin-bottom: 12px; 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    border-radius: 12px; 
    font-size: 16px; 
    box-sizing: border-box; 
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: 0.3s;
}

#auth-screen input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#auth-screen input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.2);
}

.btn-auth-primary {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border: none;
    font-weight: bold;
    font-size: 18px;
    text-transform: uppercase;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
    width: 100%;
    transition: 0.3s;
}

.btn-auth-primary:active {
    transform: scale(0.96);
}

/* ==========================================================================
   PANELES Y UI DEL SISTEMA
   ========================================================================== */
.panel { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    background: white; 
    border-top-left-radius: 25px; 
    border-top-right-radius: 25px; 
    padding: 20px; 
    z-index: 5000; 
    box-sizing: border-box; 
    max-height: 85vh; 
    display: flex; 
    flex-direction: column; 
    overflow-y: auto; 
    box-shadow: 0 -5px 20px rgba(0,0,0,0.15); 
}

.hidden { display: none !important; }

.btn-black { background: #1a1a1a; color: white; border: none; font-weight: bold; padding: 15px; border-radius: 12px; cursor: pointer; }
.btn-green { background: #27ae60; color: white; border: none; font-weight: bold; padding: 15px; border-radius: 12px; cursor: pointer; }
.btn-red { background: #c0392b; color: white; border: none; font-weight: bold; padding: 15px; border-radius: 12px; cursor: pointer; }
.btn-gray { background: #eee; color: black; border: none; font-weight: bold; padding: 15px; border-radius: 12px; cursor: pointer; }

.car-icon-marker { 
    font-size: 35px; 
    text-shadow: 0 0 5px rgba(255,255,255,0.8); 
    background: transparent !important; 
    z-index: 1000 !important; 
}

/* ==========================================================================
   TARJETA DEL CONDUCTOR (SOLUCIÓN IMAGEN GRANDE)
   ========================================================================== */
.driver-card { 
    display: flex; 
    align-items: center; 
    background: white; 
    padding: 12px; 
    border-radius: 15px; 
    border: 1px solid #eee; 
    margin-bottom: 10px;
}

.driver-card img { 
    width: 55px !important;  /* Tamaño fijo para que no salga grande */
    height: 55px !important; 
    border-radius: 50%;     /* Forma circular */
    object-fit: cover;      /* Centra la imagen sin deformar */
    margin-right: 15px; 
    border: 2px solid var(--primary); 
    flex-shrink: 0;         /* Evita que se aplaste */
}

/* ==========================================================================
   SISTEMA DE CHAT
   ========================================================================== */
#chat-modal { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 70vh; 
    background: white; 
    z-index: 9999; 
    border-top-left-radius: 25px; 
    border-top-right-radius: 25px; 
    display: none; 
    flex-direction: column; 
    box-shadow: 0 -5px 25px rgba(0,0,0,0.2);
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f9f9f9;
}

.msg { padding: 10px 14px; border-radius: 15px; max-width: 80%; font-size: 14px; }
.msg.mine { background: var(--primary); color: white; align-self: flex-end; border-bottom-right-radius: 2px; }
.msg.theirs { background: #e4e6eb; color: black; align-self: flex-start; border-bottom-left-radius: 2px; }

.notification-dot { 
    position: absolute; 
    top: -5px; 
    right: 10px; 
    width: 18px; 
    height: 18px; 
    background: red; 
    border-radius: 50%; 
    border: 2px solid white; 
    display: none; 
    z-index: 10001; 
    animation: pulse 1s infinite;
}

@keyframes pulse { 
    0% { transform: scale(1); } 
    50% { transform: scale(1.2); } 
    100% { transform: scale(1); } 
}

/* ==========================================================================
   ESTRELLAS DE CALIFICACIÓN
   ========================================================================== */
#rating-modal { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.85); 
    z-index: 999999; 
    display: none; 
    justify-content: center; 
    align-items: center; 
}

.rating-box { 
    background: white; 
    padding: 30px; 
    border-radius: 20px; 
    text-align: center; 
    width: 85%; 
}

.stars { 
    font-size: 60px; 
    color: #ddd; 
    cursor: pointer; 
    margin: 25px 0; 
    display: flex; 
    justify-content: center; 
    gap: 15px; 
    user-select: none;
}

.star.active { color: #f1c40f; }

/* ==========================================================================
   AJUSTES FINALES
   ========================================================================== */
.leaflet-control-container, .leaflet-routing-container { display: none !important; }

.result-item { 
    padding: 12px; 
    border-bottom: 1px solid #eee; 
    cursor: pointer; 
    background: white; 
    color: #333;
}