/*
 * Login, registro y recuperación de contraseña.
 *
 * Usa los mismos tokens de color que la landing: el azul de marca para las acciones y el gris
 * neutro para los bordes. El tono legible es el que se usa sobre blanco, porque el azul puro
 * con texto blanco no llega al contraste que pide AA.
 */
:root {
    --auth-primary: #2f7ef0;
    --auth-primary-legible: #1b6ae0;
    --auth-primary-dark: #1b5fc4;
    --auth-primary-darker: #123a7a;
    --auth-borde: #d7dee8;
    --auth-texto: #1f2d3d;
    --auth-texto-suave: #5a6672;
}

html, body {
    /* El mismo degradé azul del fondo de la landing, sin animación: acá no hace falta. */
    background: linear-gradient(160deg, #071c3f 0%, #123a7a 45%, #1b5fc4 100%) !important;
    min-height: 100%;
    margin: 0;
}

.wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin-top: -50px;
}

#formContent {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(7, 28, 63, 0.35);
    width: 100%;
    max-width: 430px;
    position: relative;
    z-index: 1;
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-nombre {
    margin-top: 0.6rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--auth-texto);
}

.logo-container .landing-header-logo {
    display: inline-flex;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--auth-borde);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #2c3e50;
}

.form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 0.2rem rgba(47, 126, 240, 0.22);
    outline: none;
}

.form-control::placeholder {
    color: #9aa6b4;
}

.btn-primary {
    background: linear-gradient(135deg, var(--auth-primary-legible), var(--auth-primary-dark));
    border: none;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(27, 95, 196, 0.35);
}

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

.forgot-password {
    color: var(--auth-primary-legible);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    font-size: 0.9rem;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Estilos para el checkbox de "Recordarme" */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    border: 1px solid var(--auth-borde);
    border-radius: 3px;
    cursor: pointer;
}

.form-check-label {
    color: var(--auth-texto-suave);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 576px) {
    #formContent {
        padding: 1.5rem;
        margin: 1rem;
    }

    .logo {
        max-width: 150px;
    }

    .form-control {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .btn-primary {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .alert {
        padding: 0.8rem;
        font-size: 0.85rem;
    }
}

/* Animaciones */
.fadeInDown {
    -webkit-animation-name: fadeInDown;
    animation-name: fadeInDown;
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

@-webkit-keyframes fadeInDown {
    0% {
        opacity: 0;
        -webkit-transform: translate3d(0, -100%, 0);
        transform: translate3d(0, -100%, 0);
    }
    100% {
        opacity: 1;
        -webkit-transform: none;
        transform: none;
    }
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        -webkit-transform: translate3d(0, -100%, 0);
        transform: translate3d(0, -100%, 0);
    }
    100% {
        opacity: 1;
        -webkit-transform: none;
        transform: none;
    }
}

/* Simple CSS3 Fade-in Animation */
@-webkit-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@-moz-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.fadeIn {
    opacity:0;
    -webkit-animation:fadeIn ease-in 1;
    -moz-animation:fadeIn ease-in 1;
    animation:fadeIn ease-in 1;

    -webkit-animation-fill-mode:forwards;
    -moz-animation-fill-mode:forwards;
    animation-fill-mode:forwards;

    -webkit-animation-duration:1s;
    -moz-animation-duration:1s;
    animation-duration:1s;
}

.fadeIn.first {
    -webkit-animation-delay: 0.4s;
    -moz-animation-delay: 0.4s;
    animation-delay: 0.4s;
}

.fadeIn.second {
    -webkit-animation-delay: 0.6s;
    -moz-animation-delay: 0.6s;
    animation-delay: 0.6s;
}

.fadeIn.third {
    -webkit-animation-delay: 0.8s;
    -moz-animation-delay: 0.8s;
    animation-delay: 0.8s;
}

.fadeIn.fourth {
    -webkit-animation-delay: 1s;
    -moz-animation-delay: 1s;
    animation-delay: 1s;
}

/* Simple CSS3 Fade-in Animation */
.underlineHover:after {
    display: block;
    left: 0;
    bottom: -10px;
    width: 0;
    height: 2px;
    background-color: #56baed;
    content: "";
    transition: width 0.2s;
}

.underlineHover:hover {
    color: #0d0d0d;
}

.underlineHover:hover:after{
    width: 100%;
}

*:focus {
    outline: none;
}

#icon {
    width:60%;
}