/* =========================================================
   Login - Acceso al Intranet
   ========================================================= */

.login-wrapper {
    background: #f5f7fb;
    min-height: 100vh;
}

.login-card {
    border-radius: 14px;
    background-color: #ffffff;
}

.login-logo {
    max-width: 180px;
}

.login-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1f2d4a;
    letter-spacing: 0.2px;
}

.login-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
}

/* -------- Labels y campos -------- */
.login-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2b3445;
    margin-bottom: 0.35rem;
}

.required-mark {
    color: #dc3545;
    font-weight: 700;
}

.input-wrapper {
    position: relative;
}

.login-input {
    padding: 0.65rem 1rem 0.65rem 2.6rem;
    border: 1px solid #d7dbe3;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #2b3445;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input.has-toggle {
    padding-right: 2.6rem;
}

.login-input::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.login-input:focus {
    border-color: #4a6fa5;
    box-shadow: 0 0 0 0.2rem rgba(74, 111, 165, 0.18);
    background-color: #fff;
}

.login-input.is-invalid {
    border-color: #dc3545;
    background-image: none;
}

.login-input.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.18);
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 0.95rem;
    transform: translateY(-50%);
    color: #9aa2b1;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 2;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 0.95rem;
    transform: translateY(-50%);
    color: #9aa2b1;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #4a6fa5;
}

/* -------- Recordar / Olvidó contraseña -------- */
.form-check-input:checked {
    background-color: #4a6fa5;
    border-color: #4a6fa5;
}

.form-check-input:focus {
    border-color: #4a6fa5;
    box-shadow: 0 0 0 0.2rem rgba(74, 111, 165, 0.18);
}

.login-remember {
    font-size: 0.85rem;
    color: #2b3445;
    cursor: pointer;
    user-select: none;
}

.login-forgot {
    font-size: 0.85rem;
    color: #4a6fa5;
    text-decoration: none;
    font-weight: 500;
}

.login-forgot:hover {
    color: #2f4f7f;
    text-decoration: underline;
}

/* -------- Botón Ingresar -------- */
.login-btn {
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    background-color: #6c8ebf;
    border: 1px solid #6c8ebf;
    color: #fff;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.login-btn:hover:not(:disabled) {
    background-color: #4a6fa5;
    border-color: #4a6fa5;
    color: #fff;
}

.login-btn:focus,
.login-btn:focus-visible {
    background-color: #4a6fa5;
    border-color: #4a6fa5;
    box-shadow: 0 0 0 0.2rem rgba(74, 111, 165, 0.25);
    color: #fff;
}

.login-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.login-btn:disabled,
.login-btn.disabled {
    background-color: #a9bcd6;
    border-color: #a9bcd6;
    color: #ffffff;
    opacity: 1;
    cursor: not-allowed;
    box-shadow: none;
}

/* -------- Divisor + pie -------- */
.login-divider {
    margin: 1.5rem 0 1rem;
    border-top: 1px solid #e5e8ef;
    opacity: 1;
}

.login-footer {
    font-size: 0.82rem;
}

.login-help {
    color: #2b3445;
    font-weight: 500;
}

.login-help-link {
    color: #4a6fa5;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.login-help-link:hover {
    color: #2f4f7f;
    text-decoration: underline;
}

.login-help-link .fa-whatsapp {
    color: #25d366;
    margin-right: 0.15rem;
}

.login-copy {
    color: #9aa2b1;
    font-size: 0.78rem;
    margin-top: 0.25rem;
}

/* -------- Errores -------- */
.error-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #dc3545;
    color: #fff;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.78rem;
    z-index: 1000;
    margin-top: 0.3rem;
    display: none;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.25);
}

.error-tooltip:before {
    content: '';
    position: absolute;
    top: -5px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #dc3545;
}

/* Oculta elementos del template que no aplican al login */
.sticky-navbar,
.content-horizontal-menu,
.sticky-footer,
.sticky-footer-horizontal {
    display: none !important;
}

/* Anula los offsets que el template principal aplica al contenedor:
   margin-top:110px + padding-top:1rem + margin-bottom:70px (inline).
   Sin esto, min-vh-100 + esos offsets superan el viewport y aparece scroll. */
.container-top {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}

/* El body adopta el fondo del flujo de autenticación. Se permite scroll
   vertical natural para pantallas con más contenido (reset, requisitos). */
body {
    background-color: #f5f7fb !important;
}

body.auth-no-scroll {
    overflow: hidden;
}

/* =========================================================
   STEPPER común del flujo de recuperación
   (Solicitar · Verificar · Restablecer)
   ========================================================= */
.auth-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.auth-step {
    position: relative;
    flex: 1 1 0;
    text-align: center;
    font-size: 0.78rem;
    color: #9aa2b1;
    padding-top: 2rem;
    font-weight: 500;
}

.auth-step-index {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #eef1f6;
    color: #9aa2b1;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #eef1f6;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    z-index: 2;
}

.auth-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: calc(0.875rem - 1px);
    left: 50%;
    right: -50%;
    height: 2px;
    background: #eef1f6;
    z-index: 1;
}

.auth-step.is-active .auth-step-index {
    background: #4a6fa5;
    border-color: #4a6fa5;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.15);
}

.auth-step.is-active {
    color: #2b3445;
    font-weight: 600;
}

.auth-step.is-done .auth-step-index {
    background: #4a6fa5;
    border-color: #4a6fa5;
    color: #fff;
    font-size: 0;
}

.auth-step.is-done .auth-step-index::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
}

.auth-step.is-done:not(:last-child)::after {
    background: #4a6fa5;
}

.auth-step-label {
    display: block;
    line-height: 1.1;
}

@media (max-width: 400px) {
    .auth-step-label {
        font-size: 0.72rem;
    }
}

/* =========================================================
   Utilidades compartidas entre pantallas de autenticación
   ========================================================= */

/* Enlace "Volver al inicio de sesión" */
.login-back {
    font-size: 0.85rem;
    color: #4a6fa5;
    text-decoration: none;
    font-weight: 500;
}

.login-back:hover {
    color: #2f4f7f;
    text-decoration: underline;
}

/* Email resaltado dentro del alert de éxito */
.alert .login-email-highlight {
    font-weight: 700;
    word-break: break-all;
}
