/* ==========================================================
   SISTEMA DE DISEÑO AVANZADO - ASLAN CORE v1.0.0 (2026)
========================================================== */
:root {
    /* Nueva paleta basada exactamente en el logo (Azul y Naranja corporativo) */
    --aslan-blue: #2ab1ee;
    --aslan-blue-hover: #1995ce;
    --aslan-blue-deep: #0e6490;
    --aslan-orange: #f28b41;
    --aslan-orange-hover: #dc742b;
    
    --aslan-glow: rgba(42, 177, 238, 0.12);
    
    --slate-900: #0f172a;
    --slate-700: #334155;
    --slate-400: #94a3b8;
    
    --border-clean: #e2e8f0;
    --bg-input-flat: #f8fafc;
    --white: #ffffff;
    
    --bezier-senior: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================
   RESET & REGLAS BASE
========================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    background: var(--white);
    color: var(--slate-700);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

.aslan-premium-auth {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* ==========================================================
   PANEL IZQUIERDO: COMPOSICIÓN VISUAL IMPACTANTE (65%)
========================================================== */
.auth-visual-hero {
    width: 65%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    padding: 80px;
    overflow: hidden;
}

/* Mecanismo del Slider de Imágenes */
.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.slide-item {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.slide-item.active {
    opacity: 1;
    z-index: 2;
}

/* Capa refinada de unificación cromática con tinte azulado sutil */
.visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(235, 248, 255, 0.80) 100%);
    z-index: 3;
}

/* Contenedor de Texto Principal */
.hero-brand-presentation {
    position: relative;
    z-index: 10 !important;
    max-width: 680px;
    width: 100%;
}

.hero-brand-presentation h1 {
    font-size: 64px !important;
    font-weight: 900 !important;
    color: var(--aslan-blue-deep) !important;
    letter-spacing: -2px !important;
    line-height: 1 !important;
    margin-bottom: 10px;
}

.hero-brand-presentation h2 {
    font-size: 26px !important;
    font-weight: 600 !important;
    color: var(--aslan-blue-hover) !important;
    margin-top: 14px !important;
    letter-spacing: -0.5px !important;
}

.hero-brand-presentation p {
    margin-top: 20px !important;
    font-size: 16px !important;
    color: var(--slate-700) !important;
    line-height: 1.6 !important;
}

/* ==========================================================
   TARJETAS KPI PREMIUM 
========================================================== */
.hero-kpi-row {
    display: flex !important;
    gap: 20px !important;
    margin-top: 48px !important;
    flex-wrap: wrap !important;
    position: relative !important;
    z-index: 12 !important;
}

.kpi-premium-card {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 10px !important;
    padding: 20px 24px !important;
    min-width: 160px;
    flex: 1;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    transition: transform 0.3s var(--bezier-senior);
}

.kpi-premium-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

/* Línea de acento lateral (Naranja corporativo del logo) */
.kpi-accent-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--aslan-orange);
}

/* Distribución interna */
.kpi-header-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 6px !important;
}

/* Número o Valor de la Tarjeta */
.kpi-value {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: var(--aslan-blue-deep) !important;
    letter-spacing: -0.5px !important;
    display: inline-block !important;
}

/* Íconos con acento corporativo azul */
.kpi-icon {
    font-size: 26px !important;
    color: var(--aslan-blue) !important;
    background: transparent !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
    text-shadow: 0 4px 8px rgba(42, 177, 238, 0.25) !important;
    transition: transform 0.3s ease, text-shadow 0.3s ease !important;
}

.kpi-premium-card:hover .kpi-icon {
    transform: scale(1.1) !important;
    color: var(--aslan-blue-hover) !important;
    text-shadow: 0 6px 12px rgba(25, 149, 206, 0.4) !important;
}

/* Texto descriptivo inferior de la tarjeta */
.kpi-label {
    display: block !important;
    color: #475569 !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-top: 4px !important;
}

/* ==========================================================
   PANEL DERECHO: LOGIN COMPACTO MINIMALISTA (35%)
========================================================== */
.auth-form-gate {
    width: 35%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    border-left: 1px solid var(--border-clean);
    z-index: 5;
}

.compact-form-anchor {
    width: 100%;
    max-width: 360px;
}

.clean-form-flow {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.form-brand-space {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 28px;
}

.form-brand-logo {
    height: 52px !important;
    width: auto !important;
    object-fit: contain;
    transition: filter 0.3s ease !important;
}

.gate-header {
    margin-bottom: 32px;
}

.gate-header h3 {
    font-size: 30px !important;
    font-weight: 700 !important;
    color: var(--slate-900) !important;
    letter-spacing: -0.5px !important;
}

.gate-subtitle {
    font-size: 14px !important;
    color: var(--slate-400) !important;
    margin-top: 6px !important;
}

.gate-field-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.gate-field-group label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--slate-700) !important;
    margin-bottom: 6px !important;
}

.gate-input-context {
    position: relative;
    width: 100%;
}

.gate-field-group input {
    width: 100%;
    height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 14px;
    font-size: 14.5px !important;
    color: var(--slate-900);
    background-color: var(--bg-input-flat);
    outline: none;
    transition: var(--bezier-senior);
}

.gate-field-group input:focus {
    border-color: var(--aslan-blue);
    background-color: var(--white);
    box-shadow: 0 0 0 4px var(--aslan-glow);
}

.password-context input {
    padding-right: 44px;
}

.btn-toggle-view {
    position: absolute;
    right: 0;
    top: 0;
    width: 44px;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--slate-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: color 0.2s;
}

.btn-toggle-view:hover {
    color: var(--slate-900);
}

.gate-actions-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
    margin-bottom: 24px;
}

.recovery-anchor {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--aslan-blue-hover) !important;
    text-decoration: none;
    transition: color 0.2s;
}

.recovery-anchor:hover {
    color: var(--aslan-blue-deep);
    text-decoration: underline;
}

/* Botón de ingreso con el color azul corporativo del logo */
.btn-gate-execute {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 6px;
    background: var(--aslan-blue);
    color: var(--white);
    font-size: 14.5px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: var(--bezier-senior);
}

.btn-gate-execute:hover {
    background: var(--aslan-blue-hover);
    box-shadow: 0 4px 12px rgba(42, 177, 238, 0.25);
}

.gate-compliance {
    display: flex;
    gap: 10px;
    margin-top: 28px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #f1f5f9;
}

.gate-compliance i {
    font-size: 14px;
    color: var(--slate-400);
    margin-top: 1px;
}

.gate-compliance p {
    font-size: 12px !important;
    color: var(--slate-400) !important;
    line-height: 1.4 !important;
}

.gate-copyright {
    margin-top: 36px;
    text-align: center;
    font-size: 12px !important;
    color: var(--slate-400) !important;
}

/* ==========================================================
   RESPONSIVO INTEGRADO (MÓVILES Y TABLETS OPTIMIZADO)
========================================================== */
@media (max-width: 1024px) {
    .auth-visual-hero { 
        width: 45%; 
        padding: 40px; 
    }
    .auth-form-gate { 
        width: 55%; 
    }
    .hero-brand-presentation h1 { 
        font-size: 46px !important; 
    }
    .hero-kpi-row { 
        gap: 12px !important; 
        margin-top: 32px !important; 
    }
}

@media (max-width: 768px) {
    body { 
        overflow-y: auto; 
    }
    
    .auth-visual-hero { 
        display: none; 
    } 
    
    .auth-form-gate {
        width: 100%;
        height: 100vh;
        padding: 40px 24px;
        background: var(--white);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .compact-form-anchor { 
        max-width: 440px;
        width: 100%;
    }
    
    .form-brand-space {
        margin-bottom: 36px;
    }
    
    .form-brand-logo {
        height: 58px;
    }

    .gate-header {
        margin-bottom: 36px;
    }

    .gate-header h3 { 
        font-size: 32px !important; 
    }
    
    .gate-subtitle {
        font-size: 15px !important;
    }

    .gate-field-group {
        margin-bottom: 24px;
    }

    .gate-field-group label {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }

    .gate-field-group input {
        height: 52px;
        font-size: 16px !important;
        padding: 0 16px;
        border-radius: 8px;
    }
    
    .btn-toggle-view {
        width: 52px;
        font-size: 17px;
    }
    
    .recovery-anchor {
        font-size: 14px !important;
    }

    .btn-gate-execute {
        height: 52px;
        font-size: 16px !important;
        border-radius: 8px;
        margin-top: 8px;
    }

    .gate-compliance {
        margin-top: 36px;
        padding: 16px;
        border-radius: 8px;
    }
    
    .gate-compliance p {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    .gate-copyright {
        margin-top: 44px;
        font-size: 13px !important;
    }
}

/* ==========================================================
   AVISOS DE ERROR DEL INICIO DE SESIÓN
========================================================== */
.gate-alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #7f1d1d;
    animation: gate-alert-in 0.25s var(--bezier-senior);
}

.gate-alert-icon {
    flex: 0 0 34px;
    height: 34px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.gate-alert-body { flex: 1; min-width: 0; }
.gate-alert-body strong { display: block; font-size: 14.5px; font-weight: 800; margin-bottom: 2px; }
.gate-alert-body p { font-size: 13px; line-height: 1.45; margin: 0; color: #991b1b; }

.gate-alert-usuario, .gate-alert-campos { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.gate-alert-usuario .gate-alert-icon, .gate-alert-campos .gate-alert-icon { background: #fef3c7; color: #d97706; }
.gate-alert-usuario .gate-alert-body p, .gate-alert-campos .gate-alert-body p { color: #92400e; }

.gate-alert-bloqueado, .gate-alert-bloqueado_ahora { background: #fff1f2; border-color: #fda4af; }
.gate-alert-bloqueado .gate-alert-icon, .gate-alert-bloqueado_ahora .gate-alert-icon { background: #dc2626; color: #fff; }

.gate-attempts { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.gate-attempts small { font-size: 12px; font-weight: 700; color: #991b1b; margin-left: 4px; }
.gate-attempt-dot { width: 12px; height: 12px; border-radius: 50%; background: #fecaca; border: 1px solid #fca5a5; }
.gate-attempt-dot.on { background: #dc2626; border-color: #dc2626; }

.gate-alert-link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--aslan-blue-deep); }
.gate-alert-steps { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: #7f1d1d; }
.gate-alert-steps li { margin-bottom: 2px; }

@keyframes gate-alert-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

/* Marca: «ASLAN» grande y «MultiAgente de Seguros» como subtítulo pequeño y discreto. */
.hero-brand-presentation h1 .hero-by {
    display: block;
    margin-top: 6px;
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: .1em !important;
    text-transform: none;
    color: var(--aslan-blue-deep, #0f3a5c);
    opacity: .72;
}
@media (max-width: 991px) {
    .hero-brand-presentation h1 .hero-by { font-size: 14px !important; }
}

/* ==========================================================
   AJUSTE AUTOMÁTICO DEL FORMULARIO A CUALQUIER ALTO DE PANTALLA
   Antes el panel del formulario se centraba con altura fija y, en pantallas bajas, se recortaban el logo de arriba
   y la versión de abajo. Ahora el panel se centra sin recortar el principio y, si no cabe, se desplaza. En pantallas
   bajas solo se reducen ESPACIOS (no tamaños de letra ni se oculta nada) para que quepa sin desplazar en lo posible.
   El panel de la izquierda no se toca.
========================================================== */
.aslan-premium-auth { height: 100vh; height: 100dvh; }

.auth-form-gate {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    align-items: flex-start;               /* con «center» el contenido alto se cortaba por arriba */
}
.compact-form-anchor { margin: auto; }     /* centra cuando sobra espacio; si no cabe, empieza arriba y se desplaza */

@media (max-height: 780px) {
    .auth-form-gate { padding-top: 20px; padding-bottom: 20px; }
    .form-brand-space { margin-bottom: 14px; }
    .gate-header { margin-bottom: 18px; }
    .gate-field-group { margin-bottom: 14px; }
    .gate-actions-meta { margin-bottom: 16px; }
    .gate-compliance { margin-top: 18px; }
    .gate-copyright { margin-top: 16px; }
}

@media (max-height: 640px) {
    .auth-form-gate { padding-top: 12px; padding-bottom: 12px; }
    .form-brand-space { margin-bottom: 8px; }
    .gate-header { margin-bottom: 12px; }
    .gate-field-group { margin-bottom: 10px; }
    .gate-compliance { margin-top: 12px; }
    .gate-copyright { margin-top: 10px; }
}

@media (max-width: 768px) {
    .auth-form-gate { height: 100vh; height: 100dvh; align-items: flex-start; }
}
