/* SPG - Login / re-login por sesion expirada. Extraido de Login.jsp (2026-11-10). Fuente Inter local: asset/css/fuentes-locales.css */


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at 50% 45%, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.88) 100%), url('../../images/fondo_login_plomov2.png') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    position: relative;
}

/* Particulas / sutil resplandor de fondo */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.12) 0%, transparent 40%),
                radial-gradient(circle at 80% 80%, rgba(30, 60, 114, 0.25) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 470px;
    margin: 0 auto;
    padding: 20px;
    top: 50%;
    transform: translateY(-50%);
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(calc(-50% + 20px));
    }
    to {
        opacity: 1;
        transform: translateY(-50%);
    }
}

.box {
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 30px 60px rgba(0, 0, 0, 0.45), 
        0 10px 25px rgba(0, 0, 0, 0.25);
    padding: 44px 38px 38px 38px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 15px;
}

.login-header img:first-child {
    height: 105px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
    transition: transform 0.3s ease;
}
.login-header img:first-child:hover {
    transform: scale(1.04);
}

.login-header img:last-child {
    height: 75px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
    transition: transform 0.3s ease;
}
.login-header img:last-child:hover {
    transform: scale(1.04);
}

.login-header h2 {
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
    color: #ffffff;
    margin: 0;
    flex: 1;
    letter-spacing: 0.8px;
    opacity: 0.96;
    text-shadow: 0 2px 6px rgba(0,0,0,0.45);
}

.form-title {
    color: #f8fafc;
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 22px;
    letter-spacing: 0.4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.form-title::before, .form-title::after {
    content: '';
    height: 1px;
    width: 32px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
}
.form-title::after {
    background: linear-gradient(90deg, rgba(255,255,255,0.3), transparent);
}

/* Alerta de credenciales incorrectas */
@keyframes shakeAlert {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-6px); }
    30%, 60%, 90% { transform: translateX(6px); }
}
.login-alert-error {
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.45);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    color: #fca5a5;
    animation: shakeAlert 0.5s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}
.login-alert-error i {
    font-size: 20px;
    color: #ef4444;
    flex-shrink: 0;
}
.login-alert-error .alert-text strong {
    display: block;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}
.login-alert-error .alert-text span {
    font-size: 12px;
    color: #fecaca;
    line-height: 1.35;
    display: block;
}

.inputBox {
    margin-bottom: 20px;
    position: relative;
}

.inputBox input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    font-size: 14px;
    color: #0f172a;
    background-color: #ffffff;
    border: 2px solid transparent;
    border-radius: 30px;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
    font-weight: 500;
}

.inputBox input:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25), 0 6px 16px rgba(0,0,0,0.2);
    background-color: #ffffff;
}

.inputBox input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.inputBox i.input-icon-main {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #E3BC19;
    font-size: 16px;
    pointer-events: none;
    transition: transform 0.2s ease;
}
.inputBox input:focus + i.input-icon-main,
.inputBox:focus-within i.input-icon-main {
    color: #0284c7;
    transform: translateY(-50%) scale(1.15);
}

.inputBox.has-toggle input {
    padding-right: 48px;
}
.btn-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 16px;
    transition: color 0.2s ease, transform 0.15s ease;
    outline: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-toggle-password:hover {
    color: #0284c7;
    transform: translateY(-50%) scale(1.15);
}
.btn-toggle-password:focus {
    outline: none;
}

/* Boton de login moderno con gradiente institucional y spinner */
.btn-submit-login {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #0284c7 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.4), 0 0 0 1px rgba(255,255,255,0.1) inset;
    outline: none;
}

.btn-submit-login:hover {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 50%, #0369a1 100%);
    box-shadow: 0 8px 25px rgba(30, 60, 114, 0.6);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-submit-login:active {
    transform: translateY(0);
}

.btn-submit-login.loading {
    opacity: 0.88;
    cursor: wait;
    pointer-events: none;
    background: linear-gradient(135deg, #1e3c72 0%, #1e293b 100%);
}

.footer-security-note {
    margin-top: 22px;
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.footer-security-note i {
    color: #22c55e;
}

@media (max-width: 500px) {
    .login-wrapper {
        padding: 12px;
    }
    .box {
        padding: 32px 22px;
        border-radius: 20px;
    }
    .login-header img:first-child {
        height: 75px;
    }
    .login-header img:last-child {
        height: 55px;
    }
    .login-header h2 {
        font-size: 13px;
    }
}
