/* ============================================================
   INVERSORA IPSFA - LOGIN SYSTEM (DYNAMIC LIQUID GLASS)
   ============================================================ */

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
    background-color: #050a18;
}

.login-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* ====== FONDO DINÁMICO CON GRADIENTE Y ESPACIO ====== */
.login-bg {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 30%, #0d1b3e 70%, #0a0a1a 100%);
    background-size: 400% 400%;
    animation: gradientMove 25s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ====== CÍRCULOS DE ORBES DE CRISTAL FLOTANTES ====== */
.circles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    top: 0; left: 0;
    z-index: 2;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.02) 45%, rgba(0, 0, 0, 0.7) 85%);
    box-shadow: 
        inset 0 0 15px rgba(255, 255, 255, 0.3),
        inset -5px -5px 15px rgba(0, 0, 0, 0.8),
        0 20px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: floatOrb 25s infinite linear;
}

.circle:nth-child(1) { 
    width: 110px; 
    height: 110px; 
    top: 12%; 
    right: 18%; 
    animation-duration: 20s; 
}
.circle:nth-child(2) { 
    width: 60px; 
    height: 60px; 
    bottom: 25%; 
    left: 15%; 
    animation-duration: 26s; 
    animation-delay: -5s; 
}
.circle:nth-child(3) { 
    width: 40px; 
    height: 40px; 
    bottom: 12%; 
    right: 25%; 
    animation-duration: 18s; 
    animation-delay: -2s; 
}

@keyframes floatOrb {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    33% { transform: translateY(-20px) translateX(10px) rotate(120deg) scale(1.03); }
    66% { transform: translateY(15px) translateX(-5px) rotate(240deg) scale(0.97); }
    100% { transform: translateY(0) rotate(360deg) scale(1); }
}

/* ====== CAPA DE CONTENIDO Y TARJETA CRISTAL ====== */
.login-content {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 40px 35px;
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    box-shadow: 
        inset 0 2px 2px rgba(255, 255, 255, 0.2),
        0 40px 80px rgba(0, 0, 0, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardEntrance {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ====== LOGO CORPORATIVO CON CONTORNO DE RESALTE BLANCO ====== */
.logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
    width: 100%;
}

.brand-logo-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 290px;
}

.main-corporate-logo {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    max-height: 85px;
    object-fit: contain;
    
    /* Contorno blanco electrónico nítido y resplandor base */
    filter: 
        drop-shadow(1px 0px 0px #ffffff) 
        drop-shadow(-1px 0px 0px #ffffff) 
        drop-shadow(0px 1px 0px #ffffff) 
        drop-shadow(0px -1px 0px #ffffff)
        drop-shadow(0px 8px 15px rgba(255, 255, 255, 0.25));
        
    animation: logoPulse 4s ease-in-out infinite alternate;
}

@keyframes logoPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.02); }
}

/* ====== CABECERA Y TEXTOS ====== */
.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-title {
    font-size: 21px;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.login-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

/* ====== CAMPOS DEL FORMULARIO LÍQUIDOS ====== */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 14px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-group input {
    width: 100%;
    padding: 13px 14px 13px 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-size: 14px;
    color: #ffffff;
    transition: all 0.3s ease;
    font-family: inherit;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.18);
}

.input-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.08);
}

.input-wrapper:focus-within .field-icon {
    color: #38bdf8;
}

/* ====== BOTÓN DE INGRESO CON REFLEJO ====== */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #38bdf8 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-top: 5px;
    letter-spacing: 0.3px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(56, 189, 248, 0.3);
    filter: brightness(1.05);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ====== FOOTERS ====== */
.login-footer {
    text-align: center;
    margin-top: 20px;
}

.forgot-password {
    color: rgba(255, 255, 255, 0.25);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 300;
}

.forgot-password:hover {
    color: rgba(255, 255, 255, 0.6);
}

.login-footer-bottom {
    text-align: center;
    margin-top: 25px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.login-footer-bottom p {
    color: rgba(255, 255, 255, 0.15);
    font-size: 11px;
    font-weight: 300;
}

/* ====== ALERTAS ====== */
.alert {
    padding: 11px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    display: none;
    animation: alertFadeIn 0.3s ease;
}

.alert.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.alert.success {
    display: block;
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.15);
}

@keyframes alertFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====== PARTICULAS LAYER ====== */
#tsparticles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0; left: 0;
    z-index: 1;
    pointer-events: none;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 480px) {
    .login-box {
        max-width: 92%;
        padding: 35px 22px;
    }
    .login-title { font-size: 19px; }
}

/* ====== RESPONSIVE TABLET (768px) ====== */
@media (max-width: 768px) {
    .login-box {
        max-width: 85%;
        padding: 35px 28px;
    }
    .login-title {
        font-size: 20px;
    }
    .main-corporate-logo {
        max-height: 70px;
    }
    .circle:nth-child(1) {
        width: 90px;
        height: 90px;
    }
    .circle:nth-child(2) {
        width: 50px;
        height: 50px;
    }
    .circle:nth-child(3) {
        width: 30px;
        height: 30px;
    }
}

/* ====== RESPONSIVE MÓVIL PEQUEÑO (480px) ====== */
@media (max-width: 480px) {
    .login-box {
        max-width: 92%;
        padding: 28px 18px;
        border-radius: 16px;
    }
    .login-title {
        font-size: 18px;
    }
    .login-subtitle {
        font-size: 12px;
    }
    .input-group input {
        padding: 12px 12px 12px 36px;
        font-size: 16px; /* evita zoom en iOS */
    }
    .btn-login {
        padding: 12px;
        font-size: 14px;
    }
    .main-corporate-logo {
        max-height: 60px;
    }
    .circle:nth-child(1) {
        width: 70px;
        height: 70px;
        top: 8%;
        right: 10%;
    }
    .circle:nth-child(2) {
        width: 40px;
        height: 40px;
        bottom: 20%;
        left: 10%;
    }
    .circle:nth-child(3) {
        width: 25px;
        height: 25px;
        bottom: 8%;
        right: 15%;
    }
    .login-footer-bottom p {
        font-size: 10px;
    }
}

/* ====== MÓVIL MUY PEQUEÑO / LANDSCAPE ====== */
@media (max-height: 600px) {
    .login-container {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
        overflow-y: auto;
    }
    .login-box {
        margin: 10px auto;
    }
}

/* ====== ORIENTACIÓN LANDSCAPE EN MÓVIL ====== */
@media (max-width: 768px) and (orientation: landscape) {
    .login-box {
        max-width: 70%;
        padding: 24px 20px;
    }
    .main-corporate-logo {
        max-height: 50px;
    }
    .input-group {
        margin-bottom: 12px;
    }
    .input-group input {
        padding: 10px 10px 10px 34px;
    }
}
