.login-page {
    width: 100%;
    min-height: calc(100vh - 85px - 130px);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    position: relative;
    padding: 24px 16px;
}

.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(30, 30, 50, 0.45);
    z-index: 0;
}

.content:has(.login-page) { padding: 0; }
body.page-login .sidebar  { display: none; }
body.page-login .content  { padding: 0; }
body.page-login .login-page { min-height: calc(100vh - 85px - 130px); }

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 450px;
    background: #ffffff;
    padding: 50px 40px;
    border-radius: 20px;
    z-index: 1;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 20px;
}

.login-card p{
    text-align: center;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-card input, select {
    height: 56px;
    border-radius: 10px;
    border: none;
    padding: 0 20px;
    margin-top: 5px;
    font-size: 1rem;
    width: 100%;
}

.login-card button {
    height: 56px;
    border: none;
    border-radius: 10px;
    background: #4262FF;
    font-size: 1.4rem;
    font-weight: bold;
    cursor: pointer;
    color: #ffffff;
    transition: background 0.15s, transform 0.1s;
}
.login-card button:hover  { background: #0c2082; }
.login-card button:active { transform: scale(0.98); }

.login-error {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 14px;
    text-align: center;
}

.campo, .campo-login {
    display: flex;
    flex-direction:column;
}

.campo-login input {
    background-color: #F4F4F4;
}

.campo input, .campo select, .campo-login input {
    border: 2px solid #f0f0f0;
    border-radius: 6px;
    display: block;
    padding: 10px;
    width: 100%;
    background-color: #F4F4F4;
}

.campo input:focus, .campo select:focus {
    outline: 0;
}

.campo-login input:focus {
    outline: 0;
    border-color: #4262FF;
}

.campo.success input, .campo.success select {
    border-color: #09c372;
}

.campo.error input, .campo.error select {
    border-color: #d40c27;
}

.campo .error {
    color: #d40c27;
    font-size: 13px;
    height: 13px;
}

@media (max-width: 768px) {
    body.page-login .login-page { min-height: calc(100vh - 60px - 110px); }
    .login-page { min-height: calc(100vh - 60px - 110px); padding: 20px 16px; }
    .login-card { padding: 36px 24px; border-radius: 16px; }
    .login-card h1 { font-size: 2rem; margin-bottom: 28px; }
}

@media (max-width: 480px) {
    .login-card { padding: 28px 18px; border-radius: 14px; }
    .login-card h1 { font-size: 1.6rem; margin-bottom: 22px; }
    .login-card input  { height: 48px; font-size: 0.95rem; }
    .login-card button { height: 48px; font-size: 1.2rem; }
}
body.page-login .sidebar { display: none; }
body.page-login .content { margin-left: 0 !important; }

#registro-link, #login-link {
    color: #424242;
    text-decoration: none;
    font-weight: bold;

}


.login-card .email-input, .login-card .password-input {
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    display: block;
    padding: 10px 12px 10px 52px;
    width: 100%;
    background-color: #F4F4F4;
    transition: border-color 0.15s;
}

/* Icono como pseudo-elemento del wrapper .field: el autofill del navegador
   fuerza `background-image: none` en el input, pero no toca al wrapper,
   así que el icono no desaparece al autocompletar. */
.field {
    position: relative;
}

.field::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background-repeat: no-repeat;
    background-size: 22px 22px;
    pointer-events: none;
    z-index: 2;
}

.field--email::before    { background-image: url('/images/login/email_face.svg'); }
.field--password::before { background-image: url('/images/login/lock_vector.svg'); }

/* Autofill: enmascara el fondo amarillo y conserva el look del campo */
.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover,
.login-card input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #F4F4F4 inset;
    box-shadow: 0 0 0 1000px #F4F4F4 inset;
    -webkit-text-fill-color: #333;
    transition: background-color 9999s ease-in-out 0s;
}

/* Hover: borde azul */
.login-card .email-input:hover, .login-card .password-input:hover {
    border: 2px solid #0077ff;
}

/* Foco (escribiendo): borde azul más oscuro */
.login-card .email-input:focus, .login-card .password-input:focus {
    border: 2px solid #0c2082;
    outline: 0;
}


/* Contenedor de logos: fuera de flujo, flota justo encima del card.
   Así el card permanece centrado (el logo no lo desplaza). */
.login-logos {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    width: min(560px, 92vw);
    height: 315px;
    z-index: 5;
    pointer-events: none;
}

.UOH-logo,
.NubeUOH-logo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ambos limitados por la misma altura => tamaño/protagonismo equivalente */
.UOH-logo img {
    display: block;
    width: auto;
    max-width: 360px;
    max-height: 120px;
}

.NubeUOH-logo img {
    display: block;
    width: auto;
    max-width: 560px;
    max-height: 315px;
}

/* Animación: crossfade suave, cada logo ~3s (ciclo 6s) */
@keyframes logo-swap-a {
    0%   { opacity: 1; }
    33%  { opacity: 1; }
    50%  { opacity: 0; }
    83%  { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes logo-swap-b {
    0%   { opacity: 0; }
    33%  { opacity: 0; }
    50%  { opacity: 1; }
    83%  { opacity: 1; }
    100% { opacity: 0; }
}

.UOH-logo    { animation: logo-swap-a 6s ease-in-out infinite; }
.NubeUOH-logo { animation: logo-swap-b 6s ease-in-out infinite; }

/* Accesibilidad: sin animación, se muestra solo el logo UOH */
@media (prefers-reduced-motion: reduce) {
    .UOH-logo    { animation: none; opacity: 1; }
    .NubeUOH-logo { animation: none; opacity: 0; }
}


/* ===== Registro: mismos estados de borde que login ===== */
.login-card .campo input,
.login-card .campo select {
    transition: border-color 0.15s;
}

/* Hover: borde azul (no aplica si el campo está en error) */
.login-card .campo:not(.error) input:hover,
.login-card .campo:not(.error) select:hover {
    border-color: #0077ff;
}

/* Foco (escribiendo): borde azul más oscuro */
.login-card .campo:not(.error) input:focus,
.login-card .campo:not(.error) select:focus {
    border-color: #0c2082;
    outline: 0;
}

/* El estado de error (rojo) siempre gana, incluso sobre los iconos email/password */
.login-card .campo.error input,
.login-card .campo.error select,
.login-card .campo.error .email-input,
.login-card .campo.error .password-input {
    border-color: #d40c27;
}