/*
// Nombre del archivo: login.css
// Ubicación: /Modules/Usuarios/Assets/css/login.css
// Descripción: Estilos exclusivos para la pantalla de autenticación y efectos glassmorphism.
*/

/* 1. Fondo Oscuro Profundo Base (Casi Negro) */
.blob-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1; overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #0f172a 0%, #000000 100%);
}

/* Textura Orgánica Oscura */
.blob-bg::after {
    content: "";
    position: absolute; top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.12;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 2;
}

/* Orbes de Luz */
.blob {
    position: absolute; border-radius: 50%; filter: blur(140px); opacity: 0.35;
    animation: floatBlob 20s infinite alternate ease-in-out;
    z-index: 1;
}
.blob-1 {
    width: 700px; height: 700px; background-color: var(--brand-blue);
    top: -100px; left: -150px;
}
.blob-2 {
    width: 800px; height: 800px; background-color: #06b6d4;
    bottom: -200px; right: -150px; animation-delay: -10s;
}
@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(120px, 80px) scale(1.2) rotate(90deg); }
}

/* Levitación del Logotipo */
.logo-magico {
    animation: floatLogo 4.5s ease-in-out infinite;
    cursor: pointer; /* 💡 AÑADIDO: Pista visual para el Webmaster */
}
@keyframes floatLogo {
    0% { transform: translateY(0px); filter: drop-shadow(0px 8px 15px rgba(0, 0, 0, 0.4)); }
    50% { transform: translateY(-8px); filter: drop-shadow(0px 20px 20px rgba(255, 255, 255, 0.08)); }
    100% { transform: translateY(0px); filter: drop-shadow(0px 8px 15px rgba(0, 0, 0, 0.4)); }
}

/* EL EFECTO MAYALAND: Dark Glassmorphism Interactivo */
.mayaland-glass-card {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(15px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(120%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
    border-radius: 16px !important;
}

.mayaland-glass-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.mayaland-glass-card form,
.mayaland-glass-card .modal-info-side,
.mayaland-glass-card .modal-header,
.mayaland-glass-card .modal-footer {
    background: transparent !important;
}

/* Textos e Inputs */
.mayaland-glass-card h3,
.mayaland-glass-card h5,
.mayaland-glass-card .global-text-primary {
    color: #ffffff !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}
.mayaland-glass-card .text-muted-custom,
.mayaland-glass-card .global-label {
    color: rgba(255, 255, 255, 0.75) !important;
}
.mayaland-glass-card .global-input {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    padding: 10px 14px !important;
}
.mayaland-glass-card .global-input:focus {
    background-color: rgba(0, 0, 0, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

/* Entrada Suave */
.card-entrance {
    animation: slideUpFade 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(40px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================================
    💡 REGLAS DE RESPONSIVIDAD Y COMPACTACIÓN
    ========================================================= */
.modal-overlay.active {
    display: flex;
    align-items: flex-start !important;
    justify-content: center;
    padding: 2rem 1rem !important;
    overflow-y: auto !important;
    background: transparent !important;
}

.login-glass-wrapper {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 980px;
    margin: auto;
    overflow: hidden;
}

.login-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 3.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.login-info-panel {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}

.mobile-only { display: none; }
.desktop-only { display: flex; flex-direction: column; align-items: center; width: 100%; text-align: center; }

.company-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.3;
    word-wrap: break-word;
    white-space: normal;
}

.compact-margin { margin-bottom: 14px !important; }

@media (max-width: 768px) {
    .login-glass-wrapper {
        flex-direction: column;
        margin: 15px auto;
    }
    .login-form-panel {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1.5rem 1rem;
    }
    .login-info-panel {
        padding: 1.5rem 1rem;
    }
    .mobile-only {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-bottom: 15px;
    }
    .desktop-only { display: none !important; }
}

/* =========================================================
   💡 SOBREESCRIBIR EL AUTOCOMPLETADO AMARILLO DEL NAVEGADOR
   ========================================================= */
/* Cuando el navegador autocompleta el usuario/contraseña */
.mayaland-glass-card .global-input:-webkit-autofill,
.mayaland-glass-card .global-input:-webkit-autofill:hover, 
.mayaland-glass-card .global-input:-webkit-autofill:focus, 
.mayaland-glass-card .global-input:-webkit-autofill:active {
    /* 1. Usamos una sombra interna brutal para "tapar" el amarillo de Chrome con nuestro oscuro con transparencia */
    -webkit-box-shadow: 0 0 0 30px #1e293b inset !important;
    
    /* 2. Forzamos que el color del texto sea blanco y no negro */
    -webkit-text-fill-color: #ffffff !important;
    
    /* 3. Aseguramos que los bordes se mantengan fieles a nuestro diseño */
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    
    /* 4. Suavizamos la transición por si el usuario lo borra */
    transition: background-color 5000s ease-in-out 0s;
}

/* =========================================================
   💡 BARRIDO CROMÁTICO PERIÓDICO (Genesis EcoSystems)
   ========================================================= */

.genesis-pulse-text {
    font-weight: 700;
    font-size: 0.85rem; /* 💡 Un poquito más grande para lectura perfecta */
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block; /* 💡 VITAL para que la animación no colapse el enlace */
    
    /* 🚨 SIN !important para que el keyframe tenga permiso de cambiar el color */
    color: #06b6d4; 
    
    /* Ciclo de 10 segundos: reposa y luego hace el barrido */
    animation: colorSweep 20s infinite ease-in-out;
    transition: transform 0.2s ease, text-shadow 0.2s ease, color 0.2s ease;
}

/* Hover interactivo: Brilla al instante si el mouse pasa encima */
.genesis-pulse-text:hover {
    color: #38bdf8 !important; /* Aquí sí usamos !important para forzar el hover */
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.6) !important;
    transform: scale(1.05); /* Pequeño efecto de acercamiento */
}

/* Keyframes: 0% a 60% en Reposo -> 60% a 100% Barrido de 10 tonos */
@keyframes colorSweep {
    /* --- FASE DE REPOSO (Celeste Base) --- */
    0%, 60% {
        color: #06b6d4;
        text-shadow: none;
    }

    /* --- FASE DE BARRIDO (Transición suave hacia el azul y de regreso) --- */
    65% { color: #22d3ee; text-shadow: 0 0 4px rgba(34, 211, 238, 0.4); }
    70% { color: #38bdf8; text-shadow: 0 0 6px rgba(56, 189, 248, 0.5); }
    75% { color: #60a5fa; text-shadow: 0 0 6px rgba(96, 165, 250, 0.5); }
    80% { color: #3b82f6; text-shadow: 0 0 6px rgba(59, 130, 246, 0.5); }
    85% { color: #2563eb; text-shadow: 0 0 4px rgba(37, 99, 235, 0.4); }
    90% { color: #1e40af; text-shadow: none; } /* Azul más oscuro */
    95% { color: #0ea5e9; text-shadow: none; } /* Retornando al claro */
    100% {
        color: #06b6d4; /* Vuelve a la base celeste */
        text-shadow: none;
    }
}

/* =========================================================
   💡 BOTÓN DE LOGIN (Tono Oscuro Elegante)
   ========================================================= */
.btn-login-dark {
    background-color: rgba(4, 112, 201, 0.568) !important; /* Azul pizarra muy oscuro, casi negro translúcido */
    border: 1px solid rgba(255, 255, 255, 0.15) !important; /* Borde sutil blanco/cristal */
    color: #f1f5f9 !important; /* Texto blanco suave */
    backdrop-filter: blur(5px) !important; /* Mantiene la filosofía Glassmorphism */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-login-dark:hover {
    background-color: rgba(30, 41, 59, 0.9) !important; /* Aclara ligeramente al pasar el mouse */
    border-color: rgba(6, 182, 212, 0.5) !important; /* Borde cian que conecta con el "Genesis EcoSystems" */
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2) !important; /* Resplandor sutil */
    transform: translateY(-2px);
}

.btn-login-dark:active {
    transform: translateY(0);
    background-color: rgba(15, 23, 42, 0.9) !important;
}