:root {
    --bg-main: #06020c;
    --surface: #12041a;
    --text-main: #FFFFFF;
    --text-muted: #A0A0A0;
    --glass-bg: rgba(18, 4, 30, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* ========================================================
   TEMAS GLOBALES DISPONIBLES (5 DISEÑOS)
   ======================================================== */

/* 1. Cyberpunk Glow (Azul y Magenta) */
body.theme-cyberpunk {
    --bg-main: #0a081c;
    --surface: rgba(18, 14, 38, 0.75);
    --primary: #00e5ff;
    --secondary: #e040fb;
    --accent-glow: rgba(0, 229, 255, 0.25);
    --glass-bg: rgba(18, 14, 38, 0.75);
    --glass-border: rgba(0, 229, 255, 0.2);
    --text-main: #ffffff;
    --text-muted: #a0aec0;
}

/* 2. Emerald Synthwave (Verde Esmeralda y Naranja) */
body.theme-emerald {
    --bg-main: #0a140f;
    --surface: rgba(15, 30, 22, 0.75);
    --primary: #00e676;
    --secondary: #ff9800;
    --accent-glow: rgba(0, 230, 118, 0.25);
    --glass-bg: rgba(15, 30, 22, 0.75);
    --glass-border: rgba(0, 230, 118, 0.2);
    --text-main: #ffffff;
    --text-muted: #8ea89a;
}

/* 3. Deep Space Minimalist (Glow Violeta y Obsidian) */
body.theme-deepspace {
    --bg-main: #07050d;
    --surface: rgba(15, 12, 26, 0.85);
    --primary: #8a2be2;
    --secondary: #e2e8f0;
    --accent-glow: rgba(138, 43, 226, 0.25);
    --glass-bg: rgba(15, 12, 26, 0.85);
    --glass-border: rgba(138, 43, 226, 0.15);
    --text-main: #ffffff;
    --text-muted: #9f9bb0;
}

/* 4. Retro Gold & Amber (Oro y Fuego) */
body.theme-gold {
    --bg-main: #140d07;
    --surface: rgba(30, 20, 12, 0.75);
    --primary: #ffeb3b;
    --secondary: #ff5722;
    --accent-glow: rgba(255, 235, 59, 0.25);
    --glass-bg: rgba(30, 20, 12, 0.75);
    --glass-border: rgba(255, 235, 59, 0.2);
    --text-main: #ffffff;
    --text-muted: #bda691;
}

/* 5. Volcano Crimson (Rojo Lava y Carbón) */
body.theme-volcano {
    --bg-main: #140606;
    --surface: rgba(35, 12, 12, 0.75);
    --primary: #ff1744;
    --secondary: #d32f2f;
    --accent-glow: rgba(255, 23, 68, 0.25);
    --glass-bg: rgba(35, 12, 12, 0.75);
    --glass-border: rgba(255, 23, 68, 0.25);
    --text-main: #ffffff;
    --text-muted: #caa6a6;
}

/* 6. Pach Neon (Púrpura y Fucsia del Logo) */
body.theme-pach {
    --bg-main: #06020c;
    --surface: rgba(18, 4, 30, 0.75);
    --primary: #b000ff;
    --secondary: #ff007f;
    --accent-glow: rgba(176, 0, 255, 0.3);
    --glass-bg: rgba(18, 4, 30, 0.75);
    --glass-border: rgba(176, 0, 255, 0.2);
    --text-main: #ffffff;
    --text-muted: #af9dbd;
}


/* Modo Pasajero (Por defecto) */
body, body.passenger-mode {
    --primary: #00E5FF; /* Cian neón */
    --secondary: #e040fb; /* Magenta/Rosa neón */
    --accent-glow: rgba(0, 229, 255, 0.4);
}

/* Modo Conductor */
body.driver-mode {
    --primary: #B000FF; /* Púrpura neón */
    --secondary: #E040FB; /* Magenta neón */
    --accent-glow: rgba(176, 0, 255, 0.4);
}

/* Modo Socio de Flota */
body.partner-mode {
    --primary: #FF9800; /* Naranja neón */
    --secondary: #FF5722; /* Ámbar/Rojo neón */
    --accent-glow: rgba(255, 152, 0, 0.4);
}
body.partner-mode #map,
body.partner-mode .watermark,
body.partner-mode .floating-draggable-btn,
body.partner-mode #demand-pill,
body.partner-mode #demand-indicator-card,
body.partner-mode #map-provider-container {
    display: none !important;
}

/* Ocultar elementos condicionalmente por rol */
body.passenger-mode .driver-only,
body.passenger-mode .partner-only,
body:not(.driver-mode) .driver-only {
    display: none !important;
}
body.driver-mode .passenger-only,
body.driver-mode .partner-only {
    display: none !important;
}
body.partner-mode .passenger-only,
body.partner-mode .driver-only {
    display: none !important;
}
body:not(.partner-mode) .partner-only {
    display: none !important;
}

/* Contenedor del selector de rol */
.role-toggle-container {
    display: flex;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.role-toggle-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

body.passenger-mode #role-btn-passenger,
body:not(.driver-mode) #role-btn-passenger {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 10px var(--primary);
}

body.driver-mode #role-btn-driver {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 10px var(--primary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html, body {
    background-color: var(--bg-main);
    color: var(--text-main);
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center; /* Centrar la app en PC */
}

/* Contenedor que simula un celular en web */
.app-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 480px; 
    background-color: var(--bg-main);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

/* Efecto de cristal (Glassmorphism) */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border);
}

.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.top-nav h1 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.menu-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

.profile-pic {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
}

.map-container {
    width: 100%;
    height: 100%;
    background-color: #050014;
}

/* Panel Inferior */
.bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 15px calc(15px + env(safe-area-inset-bottom, 0px)) 15px; /* Reducido de 30px 20px con soporte para safe area */
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
    max-height: 60vh; /* Altura máxima del 60% de pantalla */
    overflow-y: auto; /* Permite hacer scroll en celulares cortos */
}

.search-bar {
    background-color: var(--bg-main);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px; /* Reducido de 16px */
    display: flex;
    align-items: center;
    margin-bottom: 12px; /* Reducido de 25px */
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-bar:hover {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

.dot.blue {
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border-radius: 50%;
    margin-right: 15px;
    box-shadow: 0 0 8px var(--primary);
}

.search-input {
    background: none;
    border: none;
    color: #FFFFFF !important;
    font-size: 1.1rem;
    width: 100%;
    outline: none;
    cursor: pointer;
}

.search-input::placeholder {
    color: #B0B0B0 !important;
    font-weight: 500;
}

select, option {
    background-color: #1E1E1E !important;
    color: #FFFFFF !important;
    border: 1px solid var(--glass-border);
}

input[type="text"], input[type="email"], select {
    color: #FFFFFF !important;
}

.recent-places {
    margin-bottom: 12px; /* Reducido de 25px */
}

.place-item {
    display: flex;
    align-items: center;
    padding: 8px 0; /* Reducido de 12px 0 */
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.place-item:hover {
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
}

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

.place-item .icon {
    font-size: 1.2rem;
    margin-right: 15px;
    background: rgba(255,255,255,0.05);
    padding: 8px; /* Reducido de 10px */
    border-radius: 50%;
}

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

.place-info strong {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.place-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.primary-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.neon-blue {
    background: var(--primary);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}

.neon-blue:hover {
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.7);
    transform: translateY(-2px);
}

/* Botón Flotante de Configuración */
.config-floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--surface);
    color: var(--primary);
    border: 2px solid var(--primary);
    font-size: 1.3rem;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

.config-floating-btn:hover {
    transform: scale(1.1) rotate(45deg);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
}

/* Modal de Configuración Glassmorphic */
.settings-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 400px;
    max-height: 80%;
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--primary);
    border-radius: 20px;
    padding: 20px;
    z-index: 3000;
    box-shadow: 0 0 35px rgba(0, 229, 255, 0.35);
    display: none;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-panel.active {
    display: flex;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.settings-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
    margin-bottom: 5px;
}

.settings-panel-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.settings-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.settings-close-btn:hover {
    color: #ff3b30;
}

/* Secciones de Configuración */
.settings-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-section-title {
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    text-align: left;
}

/* Temas - Botones de Opción Premium */
.theme-options {
    display: flex;
    gap: 8px;
}

.theme-btn {
    flex: 1;
    padding: 10px 5px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.theme-btn.active {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
    font-weight: 600;
}

/* Toggles / Checkboxes Premium */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 12px 15px;
    border-radius: 10px;
    transition: all 0.2s;
}

.setting-row:hover {
    border-color: rgba(0, 229, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: white;
}

/* Switch Deslizable */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.1);
    transition: .3s;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

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

input:checked + .slider {
    background-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

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

/* Tarjeta de Convenios para el Conductor */
.agreement-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: all 0.2s;
    text-align: left;
}

.agreement-card:hover {
    border-color: var(--secondary);
    background: rgba(176, 0, 255, 0.05);
    box-shadow: 0 0 10px rgba(176, 0, 255, 0.15);
}

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

.agreement-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

.agreement-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    background: rgba(176, 0, 255, 0.2);
    color: #e040fb;
    border: 1px solid rgba(176, 0, 255, 0.3);
}

.agreement-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Estilo para los Marcadores DivIcon de Emojis */
.poi-emoji-marker {
    background: none;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.poi-emoji-icon-inner {
    width: 36px;
    height: 36px;
    background: rgba(18, 18, 18, 0.85);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    box-shadow: 0 0 12px var(--primary);
    animation: bounceMarker 0.3s ease-out;
}

@keyframes bounceMarker {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* M.map-container {
    width: 100%;
    height: 100%;
    background-color: #050014;
}

/* Cyberpunk Map Neon Filter style - disabled here to let dynamic styles apply cleanly */
/* .map-container .leaflet-tile-container {
    filter: invert(100%) hue-rotate(275deg) brightness(55%) contrast(150%) saturate(180%);
} */

.menu-btn, .back-nav-btn {
    background: rgba(0, 240, 255, 0.08) !important;
    border: 1.5px solid var(--primary) !important;
    color: var(--primary) !important;
    box-shadow: 0 0 10px var(--accent-glow) !important;
    border-radius: 8px !important;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}
.menu-btn {
    display: flex;
}
.back-nav-btn {
    display: none;
}
.menu-btn:hover, .back-nav-btn:hover {
    box-shadow: 0 0 15px var(--primary) !important;
    transform: scale(1.05);
}

/* Marca de agua elegante y no obstructiva */
.watermark {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 2.2rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03); /* Muy tenue */
    text-transform: uppercase;
    letter-spacing: 6px;
    z-index: 999;
    pointer-events: none; /* No interfiere con clics/gestos en el mapa */
    user-select: none;
    white-space: nowrap;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);
}

/* MENÚ LATERAL HAMBURGUESA (DRAWER) - ESTILO UBER PREMIUM GLASS */
.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.side-drawer {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 2001;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
}

.side-drawer.open {
    transform: translateX(0);
}

/* Tema Conductor para el Drawer (Morado neón) */
.side-drawer.driver-theme {
    background: rgba(15, 10, 25, 0.96);
    border-right: 1px solid rgba(176, 0, 255, 0.15);
}

.drawer-header {
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.5), rgba(10, 10, 10, 0.8));
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.side-drawer.driver-theme .drawer-header {
    background: linear-gradient(135deg, rgba(176, 0, 255, 0.1), rgba(15, 10, 25, 0.8));
    border-bottom: 1px solid rgba(176, 0, 255, 0.2);
}

.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.drawer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
    background: linear-gradient(45deg, var(--primary), var(--secondary));
}

.side-drawer.driver-theme .drawer-avatar {
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(176, 0, 255, 0.4);
}

.drawer-user-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.drawer-user-rating {
    font-size: 0.85rem;
    color: #ffc107;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.drawer-balance-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px 15px;
    margin-top: 10px;
}

.side-drawer.driver-theme .drawer-balance-card {
    background: rgba(176, 0, 255, 0.05);
    border: 1px solid rgba(176, 0, 255, 0.15);
}

.drawer-balance-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drawer-balance-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 2px;
}

.side-drawer.driver-theme .drawer-balance-value {
    color: var(--text-main);
}

.drawer-menu-items {
    flex: 1;
    padding: 20px 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.drawer-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 15px;
    border-radius: 12px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawer-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: var(--primary);
}

.side-drawer.driver-theme .drawer-item i {
    color: var(--secondary);
}

.drawer-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.side-drawer.driver-theme .drawer-item:hover {
    background: rgba(176, 0, 255, 0.08);
}

.drawer-item.active {
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary);
}

.drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* ESTILOS DE MODALES GENERALES SIMULADOS */
.premium-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 2, 16, 0.95);
    backdrop-filter: blur(25px);
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(30px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.premium-modal.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

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

.modal-header-premium h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-close-btn-premium {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close-btn-premium:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* HISTORIAL DE VIAJES */
.ride-history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.history-card-header .price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.history-card-route {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    padding-left: 18px;
}

.history-card-route::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: rgba(255, 255, 255, 0.15);
}

.history-node {
    font-size: 0.9rem;
    position: relative;
}

.history-node::after {
    content: '';
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.history-node.origin::after {
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary);
}

.history-node.dest::after {
    background: var(--secondary);
    box-shadow: 0 0 6px var(--secondary);
}

.history-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 10px;
    color: var(--text-muted);
}

@keyframes sound-wave {
    0% { transform: scaleY(0.4); }
    100% { transform: scaleY(1.4); }
}

/* ========================================================
   DISEÑOS ESTRUCTURALES DE PANEL (LAYOUT PRESETS)
   ======================================================== */

/* 1. Predeterminado (Rejilla Completa) */
body.layout-default .stats-grid { display: grid !important; }
body.layout-default .channels-grid { display: grid !important; }
body.layout-default .sos-grid { display: grid !important; }

/* 2. Enfoque en Monitoreo / Mapas (Oculta estadísticas, expande mapas) */
body.layout-mapfocus .stats-grid { display: none !important; }
body.layout-mapfocus .channels-grid { grid-template-columns: 1fr !important; }
body.layout-mapfocus .sos-grid { grid-template-columns: 1fr !important; }

/* 3. Enfoque en Métricas e Historial (Oculta mapas, expande estadísticas) */
body.layout-analyticsfocus .channels-grid { display: none !important; }
body.layout-analyticsfocus .sos-grid { display: none !important; }
body.layout-analyticsfocus .stats-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important; }


/* ========================================================
   DISEÑOS ESTRUCTURALES ADICIONALES (MOCKUP STYLING)
   ======================================================== */

/* 1. Cyberpunk Glow Layout */
body.theme-cyberpunk .section-card, 
body.theme-cyberpunk .stat-card, 
body.theme-cyberpunk .channel-card-wrapper, 
body.theme-cyberpunk .sidebar {
    border-radius: 16px !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37), 0 0 15px var(--accent-glow) !important;
    border: 1px solid var(--glass-border) !important;
}

/* 2. Emerald Synthwave Layout (Retro Matrix Terminal) */
body.theme-emerald .section-card, 
body.theme-emerald .stat-card, 
body.theme-emerald .channel-card-wrapper, 
body.theme-emerald .sidebar {
    border-radius: 0px !important; /* Sharp technical corners */
    border: 1px solid var(--primary) !important;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.1) !important;
    background: rgba(10, 20, 15, 0.9) !important;
    position: relative;
}
body.theme-emerald .section-card::after,
body.theme-emerald .channel-card-wrapper::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    opacity: 0.35;
    z-index: 5;
}

/* 3. Deep Space Minimalist Layout */
body.theme-deepspace .section-card, 
body.theme-deepspace .stat-card, 
body.theme-deepspace .channel-card-wrapper, 
body.theme-deepspace .sidebar {
    border-radius: 24px !important; /* Super rounded modern shapes */
    border: none !important;
    box-shadow: inset 0 0 20px rgba(138, 43, 226, 0.15), 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    background: #0d0b14 !important;
}

/* 4. Retro Gold & Amber Layout */
body.theme-gold .section-card, 
body.theme-gold .stat-card, 
body.theme-gold .channel-card-wrapper, 
body.theme-gold .sidebar {
    border-radius: 8px !important;
    border: 2px solid #ffeb3b !important;
    box-shadow: 0 0 15px rgba(255, 235, 59, 0.15) !important;
    background: rgba(20, 13, 7, 0.95) !important;
}
body.theme-gold h1, 
body.theme-gold h2, 
body.theme-gold h3 {
    text-shadow: 0 0 8px rgba(255, 235, 59, 0.5) !important;
}

/* 5. Volcano Crimson Layout */
body.theme-volcano .section-card, 
body.theme-volcano .stat-card, 
body.theme-volcano .channel-card-wrapper, 
body.theme-volcano .sidebar {
    border-radius: 10px !important;
    border: 1px solid #ff1744 !important;
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.25) !important;
    background: rgba(18, 6, 6, 0.95) !important;
}

/* 6. Pach Neon Layout */
body.theme-pach .section-card, 
body.theme-pach .stat-card, 
body.theme-pach .channel-card-wrapper, 
body.theme-pach .sidebar {
    border-radius: 16px !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), 0 0 20px rgba(176, 0, 255, 0.2) !important;
    border: 1px solid var(--glass-border) !important;
}

/* ========================================================
   ESTILOS PREMIUM VEHICLE OPTION CARDS (GRID/NEON)
   ======================================================== */
.vehicle-option-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid var(--glass-border) !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.25s ease-in-out !important;
    margin-bottom: 8px !important;
    user-select: none !important;
    box-sizing: border-box !important;
}

.vehicle-option-card:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(0, 229, 255, 0.3) !important;
}

.vehicle-option-card:has(input[type="radio"]:checked) {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 12px var(--accent-glow) !important;
}

/* ========================================================
   ESTILOS PREMIUM NEON GLASSMORPHISM (MOCKUP ACCURACY)
   ======================================================== */
.bottom-sheet.glass {
    background: rgba(10, 6, 22, 0.85) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid var(--glass-border) !important;
    border-top: 2px solid var(--primary) !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-glow) !important;
}

.search-bar {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.search-bar:focus-within, .search-bar:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 0 12px var(--accent-glow) !important;
}

/* Modales Premium con Glow Neon */
.premium-modal {
    background: rgba(8, 4, 18, 0.96) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.premium-modal.open {
    border-color: var(--primary) !important;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8), 0 0 25px var(--accent-glow) !important;
}

/* Botones Premium con Neon */
.primary-btn.neon-blue, .primary-btn {
    background: var(--primary) !important;
    color: black !important;
    font-weight: 800 !important;
    box-shadow: 0 0 15px var(--accent-glow) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transition: all 0.2s ease-in-out !important;
}

body.driver-mode .primary-btn, body.driver-mode .btn-accept {
    color: white !important;
}

.primary-btn.neon-blue:hover, .primary-btn:hover {
    box-shadow: 0 0 25px var(--primary) !important;
    transform: translateY(-1px) !important;
}

/* Estilo para las Tarjetas en General */
.history-card, .drawer-balance-card, .recent-places, #price-estimate, #searching-driver-card, #driver-assigned-card, .ride-request-modal {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

#driver-assigned-card, #searching-driver-card, .ride-request-modal {
    border: 2px solid var(--primary) !important;
    box-shadow: 0 0 18px var(--accent-glow) !important;
}

.search-tabs button {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted) !important;
}
.search-tabs button.active {
    background: rgba(0, 229, 255, 0.15) !important;
    border-color: var(--primary) !important;
    color: white !important;
    box-shadow: 0 0 10px var(--accent-glow) !important;
}

/* ========================================================
   ESTILOS PORTAL DE SOCIOS (PARTNER MODE)
   ======================================================== */

body.partner-mode {
    --primary: #ffb300 !important;
    --secondary: #ff6f00 !important;
    --accent-glow: rgba(255, 179, 0, 0.25) !important;
    background-color: #050200 !important;
}

body:not(.partner-mode) .partner-only {
    display: none !important;
}

body.partner-mode .passenger-only,
body.partner-mode .driver-only,
body.partner-mode #map,
body.partner-mode .leaflet-control-container,
body.partner-mode .watermark,
body.partner-mode #passenger-request-flow,
body.partner-mode #driver-active-panel,
body.partner-mode .floating-draggable-btn,
body.partner-mode .bottom-sheet {
    display: none !important;
}

body.partner-mode .partner-only {
    display: block !important;
}

body.partner-mode span.partner-only,
body.partner-mode div.partner-only {
    display: block !important;
}

body.partner-mode flex.partner-only {
    display: flex !important;
}

/* Forzar que el menu lateral en partner mode use colores neon naranja */
.side-drawer.partner-theme {
    background: rgba(20, 10, 0, 0.96);
    border-right: 1px solid rgba(255, 179, 0, 0.2);
}

.side-drawer.partner-theme .drawer-header {
    background: linear-gradient(135deg, rgba(255, 111, 0, 0.1), rgba(20, 10, 0, 0.8));
    border-bottom: 1px solid rgba(255, 179, 0, 0.2);
}

.side-drawer.partner-theme .drawer-avatar {
    border-color: #ffb300;
    box-shadow: 0 0 10px rgba(255, 179, 0, 0.4);
}

.side-drawer.partner-theme .drawer-item i {
    color: #ffb300;
}

.side-drawer.partner-theme .drawer-item:hover {
    background: rgba(255, 179, 0, 0.08);
}

/* ========================================================
   ESTILOS ADICIONALES CYBERPUNK Y CONDUCTOR (TOKYO STYLE)
   ======================================================== */

/* Filtros dinámicos de mapa según selección del usuario */
.map-style-traditional .leaflet-tile-pane {
    filter: none !important;
}
.map-style-cyberpunk .leaflet-tile-pane {
    filter: invert(100%) hue-rotate(275deg) brightness(55%) contrast(150%) saturate(200%) !important;
}
.map-style-emerald .leaflet-tile-pane {
    filter: invert(100%) hue-rotate(90deg) brightness(55%) contrast(150%) saturate(200%) !important;
}
.map-style-volcano .leaflet-tile-pane {
    filter: invert(100%) hue-rotate(330deg) brightness(50%) contrast(160%) saturate(250%) !important;
}
.map-style-deepspace .leaflet-tile-pane {
    filter: invert(100%) hue-rotate(200deg) brightness(50%) contrast(140%) saturate(180%) !important;
}
.map-style-gold .leaflet-tile-pane {
    filter: invert(100%) hue-rotate(20deg) brightness(60%) contrast(130%) saturate(180%) !important;
}
.map-style-pach .leaflet-tile-pane {
    filter: invert(100%) hue-rotate(290deg) brightness(50%) contrast(150%) saturate(250%) !important;
}


/* Botón central del Conductor (Uber-Style GO Button) */
#driver-go-button {
    position: relative;
    background: radial-gradient(circle, #120422 0%, #06020a 100%) !important;
    border: 3px solid #ff3b30 !important;
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.3) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

#driver-go-button:hover {
    transform: scale(1.05);
}

#driver-go-button:active {
    transform: scale(0.95);
}

#driver-go-button.online {
    border-color: #00e5ff !important;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.6) !important;
}

/* Animación de respiración / pulso cuando está online */
@keyframes pulse-go {
    0% { box-shadow: 0 0 15px rgba(0, 229, 255, 0.4); }
    50% { box-shadow: 0 0 35px rgba(0, 229, 255, 0.8); }
    100% { box-shadow: 0 0 15px rgba(0, 229, 255, 0.4); }
}

.pulse-online {
    animation: pulse-go 2.5s infinite ease-in-out !important;
}

/* Rediseño del modal de alerta de viaje del conductor como bottom sheet compacto */
.driver-only#ride-modal {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 24px 24px 0 0 !important;
    border: 2px solid var(--primary) !important;
    border-bottom: none !important;
    background: rgba(10, 15, 30, 0.92) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    box-shadow: 0 -5px 25px var(--accent-glow) !important;
    padding: 15px 20px 25px 20px !important;
    box-sizing: border-box !important;
    z-index: 2100 !important;
    animation: slideUpBottom 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

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

.bottom-sheet-drag-handle {
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    margin: 0 auto 12px auto;
}

/* Botón de retroceso en los modales para volver al drawer lateral */
.modal-back-btn-premium {
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: #00e5ff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-right: 12px;
    transition: all 0.2s;
}

.modal-back-btn-premium:hover {
    background: rgba(0, 229, 255, 0.25);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

/* ========================================================
   HIGH-FIDELITY CYBERPUNK TOKYO REDESIGN OVERRIDES
   ======================================================== */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700;800&family=Share+Tech+Mono&display=swap');

body.passenger-mode,
body.passenger-mode button,
body.passenger-mode input,
body.passenger-mode select,
body.passenger-mode textarea {
    font-family: 'Rajdhani', 'Inter', sans-serif !important;
}

/* Map tiles neon filter for passenger mode handled dynamically by map-style classes */

/* Custom floating bottom sheet styling in passenger mode */
body.passenger-mode .bottom-sheet {
    bottom: 15px !important;
    left: 15px !important;
    width: calc(100% - 30px) !important;
    border: 1.5px solid var(--primary) !important;
    box-shadow: 0 0 25px var(--accent-glow) !important;
    border-radius: 20px !important;
    background: rgba(10, 8, 28, 0.85) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    max-height: 80vh !important;
    box-sizing: border-box !important;
}

body.passenger-mode .bottom-sheet.minimized {
    max-height: 60px !important;
    border-radius: 12px !important;
    bottom: 15px !important;
    overflow: hidden !important;
}

body.passenger-mode .bottom-sheet.minimized > *:not(#minimize-sheet-btn):not(#minimized-sheet-title):not(.drag-handle) {
    display: none !important;
}

body.passenger-mode .bottom-sheet.minimized #minimized-sheet-title {
    display: block !important;
}

/* Cyber option card layout override */
.cyber-option-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(8, 2, 24, 0.5) !important;
    border: 1px solid rgba(0, 229, 255, 0.3) !important;
    border-radius: 12px !important;
    padding: 12px 6px !important;
    cursor: pointer;
    transition: all 0.25s ease-in-out !important;
    position: relative;
}

.cyber-option-card svg {
    color: rgba(0, 229, 255, 0.6) !important;
    transition: all 0.25s ease !important;
}

.cyber-option-card span {
    color: rgba(0, 229, 255, 0.6) !important;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    transition: all 0.25s ease !important;
}

/* Active card styling matching high-fidelity mockup */
.cyber-option-card.active {
    background: rgba(0, 229, 255, 0.15) !important;
    border: 2.5px solid #00e5ff !important;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.6) !important;
}

.cyber-option-card.active svg {
    color: #ffffff !important;
    filter: drop-shadow(0 0 8px #00e5ff) !important;
}

.cyber-option-card.active span {
    color: #00e5ff !important;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.5) !important;
}

/* Bottom pointer triangle for active card */
.cyber-option-card.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #00e5ff;
    z-index: 1001;
}

/* Confirm pickup button style overrides */
body.passenger-mode #btn-request,
body.passenger-mode .primary-btn.neon-blue {
    background: rgba(0, 229, 255, 0.12) !important;
    border: 2.5px solid #00e5ff !important;
    color: #00e5ff !important;
    font-family: 'Rajdhani', sans-serif !important;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.5) !important;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4) !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    border-radius: 16px !important;
    padding: 14px 0 !important;
}

body.passenger-mode #btn-request:hover,
body.passenger-mode .primary-btn.neon-blue:hover {
    background: rgba(0, 229, 255, 0.22) !important;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.7) !important;
}

/* Top nav elements visibility and layout in passenger mode */
body.passenger-mode #header-neon-title {
    display: block !important;
    text-align: center;
    margin: 0 auto !important;
}

body.passenger-mode .role-toggle-container {
    display: none !important;
}

/* Restructured header controls in passenger mode */
body.passenger-mode .header-left .menu-btn,
body.passenger-mode .header-left .reload-floating-btn {
    display: none !important;
}

body.passenger-mode .header-left .back-nav-btn {
    display: block !important;
}

body.passenger-mode .header-right #connection-status-pill,
body.passenger-mode .header-right #header-rating-display,
body.passenger-mode .header-right #header-profile-pic {
    display: none !important;
}

body.passenger-mode .header-right .passenger-menu-btn {
    display: block !important;
    color: #00e5ff !important;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.6) !important;
}

/* Hide extra clutter from bottom sheet in passenger mode */
body.passenger-mode #bottom-sheet-el #country-selector-container,
body.passenger-mode #bottom-sheet-el #only-female-driver-container,
body.passenger-mode #bottom-sheet-el .recent-places {
    display: none !important;
}

/* Ocultar botón de recarga superior por defecto para evitar superposiciones */
.reload-floating-btn {
    display: none !important;
}

/* GPS locate button target crosshair neon cyan styling */
body.passenger-mode #map-locate-btn {
    display: flex !important;
    background: rgba(0, 229, 255, 0.08) !important;
    border: 2px solid #00e5ff !important;
    color: #00e5ff !important;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.5) !important;
}

body.passenger-mode #map-locate-btn svg {
    stroke: #00e5ff !important;
    filter: drop-shadow(0 0 4px #00e5ff) !important;
}

/* Hide floating gears and developer buttons from the map stack in passenger mode */
body.passenger-mode .config-floating-btn,
body.passenger-mode .reload-floating-btn {
    display: none !important;
}

/* Colapsar modal de solicitud de viaje del conductor */
.ride-request-modal.minimized {
    max-height: 80px !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
}
.ride-request-modal.minimized #passenger-info-container,
.ride-request-modal.minimized .ride-details,
.ride-request-modal.minimized .action-buttons,
.ride-request-modal.minimized #demand-modal-warning {
    display: none !important;
}

/* ========================================================
   OPTIMIZACIONES PARA MOBILE / CAPACITOR (CORRECCIÓN DE RENDIMIENTO Y PARPADEO)
   ======================================================== */
/* Desactivar efectos de desenfoque de cristal en apps móviles para evitar parpadeos y fallas al abrir el teclado */
body.is-mobile-app *, 
body.is-mobile-app .glass, 
body.is-mobile-app .bottom-sheet, 
body.is-mobile-app .bottom-sheet.glass,
body.is-mobile-app .sidebar, 
body.is-mobile-app .modal-content-premium,
body.is-mobile-app .premium-modal,
body.is-mobile-app .ride-request-modal, 
body.is-mobile-app .chat-window, 
body.is-mobile-app .floating-draggable-btn, 
body.is-mobile-app .floating-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Colores de fondo opacos correspondientes a cada tema para móviles */
body.is-mobile-app {
    --surface: #12041a !important;
    --glass-bg: #12041a !important;
}
body.is-mobile-app.theme-cyberpunk, body.is-mobile-app .theme-cyberpunk {
    --surface: #120e26 !important;
    --glass-bg: #120e26 !important;
}
body.is-mobile-app.theme-emerald, body.is-mobile-app .theme-emerald {
    --surface: #0f1e16 !important;
    --glass-bg: #0f1e16 !important;
}
body.is-mobile-app.theme-deepspace, body.is-mobile-app .theme-deepspace {
    --surface: #0f0c1a !important;
    --glass-bg: #0f0c1a !important;
}
body.is-mobile-app.theme-gold, body.is-mobile-app .theme-gold {
    --surface: #1e140c !important;
    --glass-bg: #1e140c !important;
}
body.is-mobile-app.theme-volcano, body.is-mobile-app .theme-volcano {
    --surface: #230c0c !important;
    --glass-bg: #230c0c !important;
}
body.is-mobile-app.theme-pach, body.is-mobile-app .theme-pach {
    --surface: #12041a !important;
    --glass-bg: #12041a !important;
}

/* ========================================================
   SISTEMA DE VERIFICACIÓN BIOMÉTRICA FACIAL (CYBERPUNK)
   ======================================================== */
.biometric-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 2, 12, 0.93);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 200000;
    display: none; /* Controlado por JS */
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.biometric-modal-card {
    background: rgba(18, 4, 30, 0.85);
    border: 2px solid var(--primary);
    border-radius: 28px;
    width: 92%;
    max-width: 400px;
    padding: 24px;
    box-shadow: 0 0 35px rgba(176, 0, 255, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.biometric-scanner-container {
    position: relative;
    width: 260px;
    height: 330px;
    border-radius: 20px;
    background: #000;
    border: 2px solid rgba(0, 229, 255, 0.3);
    box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.2);
    overflow: hidden;
    margin: 20px 0;
}

.biometric-video-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Espejo */
}

.biometric-face-oval {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 170px;
    height: 230px;
    border-radius: 50%;
    border: 3px dashed #00e5ff;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    pointer-events: none;
    z-index: 10;
    transition: all 0.3s ease;
}

.biometric-face-oval.success {
    border-color: #00e676 !important;
    border-style: solid !important;
    box-shadow: 0 0 25px rgba(0, 230, 118, 0.6) !important;
}

.biometric-scanner-laser {
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #00e5ff, transparent);
    box-shadow: 0 0 10px #00e5ff;
    z-index: 15;
    animation: scanLaser 2.2s linear infinite;
    pointer-events: none;
}

.biometric-scanner-laser.success {
    display: none !important;
}

@keyframes scanLaser {
    0% { top: 15%; }
    50% { top: 85%; }
    100% { top: 15%; }
}

.biometric-status-text {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-muted);
    margin-top: 10px;
    letter-spacing: 0.5px;
    min-height: 24px;
}

.biometric-status-text.success {
    color: #00e676;
}

/* Pantalla de bloqueo biométrico forzado */
.biometric-lock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 2, 12, 0.97);
    z-index: 199999;
    display: none; /* Controlado por JS */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
    text-align: center;
}

.biometric-lock-card {
    background: rgba(18, 4, 30, 0.8);
    border: 2px solid #ff3b30;
    border-radius: 28px;
    max-width: 420px;
    width: 100%;
    padding: 35px 25px;
    box-shadow: 0 0 35px rgba(255, 59, 48, 0.3);
    box-sizing: border-box;
}

.biometric-lock-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: lockPulse 1.5s infinite alternate;
}

@keyframes lockPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 1; filter: drop-shadow(0 0 10px rgba(255,59,48,0.5)); }
}

/* Brillo neón dinámico en bordes de contenedores de mapas */
.map-style-cyberpunk div[id^="map-"],
.map-style-cyberpunk .map-container,
.map-style-cyberpunk #map {
    border: 2px solid #ff007f !important;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.45) !important;
    transition: all 0.3s ease;
}
.map-style-emerald div[id^="map-"],
.map-style-emerald .map-container,
.map-style-emerald #map {
    border: 2px solid #00ff66 !important;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.45) !important;
    transition: all 0.3s ease;
}
.map-style-volcano div[id^="map-"],
.map-style-volcano .map-container,
.map-style-volcano #map {
    border: 2px solid #ff3b30 !important;
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.45) !important;
    transition: all 0.3s ease;
}
.map-style-deepspace div[id^="map-"],
.map-style-deepspace .map-container,
.map-style-deepspace #map {
    border: 2px solid #00e5ff !important;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.45) !important;
    transition: all 0.3s ease;
}
.map-style-gold div[id^="map-"],
.map-style-gold .map-container,
.map-style-gold #map {
    border: 2px solid #ffb300 !important;
    box-shadow: 0 0 15px rgba(255, 179, 0, 0.45) !important;
    transition: all 0.3s ease;
}
.map-style-pach div[id^="map-"],
.map-style-pach .map-container,
.map-style-pach #map {
    border: 2px solid #b000ff !important;
    box-shadow: 0 0 15px rgba(176, 0, 255, 0.45) !important;
    transition: all 0.3s ease;
}
.map-style-traditional div[id^="map-"],
.map-style-traditional .map-container,
.map-style-traditional #map {
    border: 1px solid var(--glass-border) !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
}


