.login-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}
.login-box {
    background-color: var(--element-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    position: relative; /* Added for absolute error message */
}
.login-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-main);
    font-size: 1.8rem;
    font-weight: 700;
}
#login-error, #errorMsg {
    color: #ff0000 !important; /* Rojo puro */
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin: 0 auto 1.5rem auto !important;
    margin-top: -0.5rem !important;
    display: none; 
    justify-content: center !important;
    align-items: center !important;
    gap: 0.6rem !important;
    width: fit-content !important;
    min-width: 240px !important;
    background: rgba(255, 0, 0, 0.1) !important; /* Fondo rojo algo más visible */
    border: 3px solid #ff0000 !important; /* Borde rojo MUY GRUESO */
    padding: 0.8rem 2rem !important;
    border-radius: 50px !important; /* Forma de píldora/círculo perfecta */
    position: static !important;
    transform: none !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3) !important; /* Resplandor rojo exterior */
    min-height: auto !important;
    z-index: 999 !important;
    line-height: 1.2 !important;
}

#login-error.show-error, #errorMsg.show-error {
    display: flex !important;
}

/* Mensaje de éxito (registro → verificación) */
#successMsg {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    margin: 0 auto 1.25rem auto;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.45;
    color: #0d3d12 !important;
    background: rgba(88, 229, 75, 0.18);
    border: 2px solid #58e54b;
    box-shadow: 0 0 18px rgba(88, 229, 75, 0.25);
}
#successMsg.show-success {
    display: flex !important;
    flex-direction: column;
}
#successMsg.show-success i {
    font-size: 1.75rem;
    color: #2ea043;
}
.register-box.register-success-mode .register-title {
    display: none;
}
.register-box.register-success-mode .form-group,
.register-box.register-success-mode button[type="submit"],
.register-box.register-success-mode form > p {
    display: none !important;
}

/* Limpiar efectos anteriores */
.login-box.has-error form {
    filter: none !important;
    pointer-events: all !important;
}

.login-box.has-error {
    animation: none !important;
}

@keyframes errorAppear {
    from { opacity: 0; transform: translate(-50%, -40%) scale(0.8); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes shake {
    10%, 90% { transform: translate(-51%, -50%); }
    20%, 80% { transform: translate(-48%, -50%); }
    30%, 50%, 70% { transform: translate(-53%, -50%); }
    40%, 60% { transform: translate(-47%, -50%); }
}

#login-error span {
    line-height: 1.5 !important;
    display: block !important;
}

.login-btn {
    width: 100%;
    justify-content: center;
    padding: 0.9rem;
    font-size: 1.05rem;
    margin-top: 1rem;
}

/* Estilos de Registro */
.register-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem 0;
}
.register-box {
    background-color: var(--element-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.register-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-main);
    font-size: 1.8rem;
    font-weight: 700;
}
.register-btn {
    width: 100%;
    justify-content: center;
    padding: 0.9rem;
    font-size: 1.05rem;
    margin-top: 1rem;
}
.pass-wrap { position: relative; width: 100%; }
.pass-wrap input { width: 100%; padding-right: 45px; }
.pass-wrap .eye-icon {
    position: absolute; 
    right: 15px; 
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted); 
    cursor: pointer; 
    font-size: 1.1rem;
    transition: color 0.3s;
    z-index: 100; /* Aumentado drásticamente */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all !important; /* Asegurar que reciba clics */
    padding: 5px; /* Área de clic más grande */
}
.pass-wrap .eye-icon:hover {
    color: var(--primary-blue);
}

/* Estilos compartidos con registro.html */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
}
.auth-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}
.auth-link:hover {
    text-decoration: underline;
}
