/* ============================================================================
   account.css — Estilo compartido de las vistas de cuenta (Login, recuperar y
   restablecer contraseña + confirmaciones). Pantalla a sangre completa con
   video de fondo, tarjeta de cristal y marca SAGI.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&display=swap');

/* ── Neutralizar el cromo del layout para una pantalla a sangre completa ──
   Estas reglas globales sólo cargan en las páginas de cuenta (este archivo se
   enlaza únicamente desde esas vistas), por eso no necesitan acotarse. */
* { text-transform: none; }
header, .main-header, .main-sidebar, .main-footer, .breadcrumb, .content-header { display: none !important; }

html, body { height: 100%; }
body .content-wrapper {
    font-family: 'Roboto', "Helvetica Neue", sans-serif;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    background: #0d1e35; /* respaldo por si el video no carga */
}
body #contenido {
    width: 100% !important;
    max-width: none !important;
    min-height: 100vh;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left;
}
#contenido .container-fluid { padding: 0 !important; }
/* Oculta el título h2 que el layout inyecta antes del cuerpo */
#contenido .container-fluid > .row.margenAjustado { display: none !important; }

/* ── Escenario ───────────────────────────────────────────────── */
.login-stage {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    overflow: auto;
}
.login-bg-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.login-bg-scrim {
    position: fixed;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(20,37,64,.35) 0%, rgba(13,30,53,.78) 70%, rgba(8,18,33,.92) 100%),
        linear-gradient(135deg, rgba(13,30,53,.55) 0%, rgba(20,37,64,.45) 50%, rgba(13,30,53,.7) 100%);
}

/* ── Tarjeta de cristal ──────────────────────────────────────── */
.login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 360px;
    padding: 40px 32px 26px;
    text-align: center;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-top: 4px solid #CEB05B;
    border-radius: 18px;
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: loginCardIn .55s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes loginCardIn {
    from { opacity: 0; transform: translateY(18px) scale(.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

#contenido .logo-login {
    width: 120px;
    height: auto;
    margin: 2px auto 18px;
    display: block;
}

/* ── Marca SAGI ──────────────────────────────────────────────── */
.login-brand {
    margin: 0 0 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(20, 37, 64, .1);
}
.login-brand-name {
    display: block;
    font-family: 'Poppins', 'Montserrat', sans-serif;
    font-size: clamp(28px, 9vw, 36px);
    font-weight: 800;
    line-height: 1;
    color: #142540;
    letter-spacing: .12em;
    padding-left: .12em; /* compensa el tracking para centrar ópticamente */
}
.login-brand-full {
    display: block;
    margin-top: 7px;
    font-size: clamp(9px, 2.6vw, 10.5px);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .055em;
    line-height: 1.35;
    color: #bb9332;
}

/* ── Encabezado ──────────────────────────────────────────────── */
.login-welcome h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 21px;
    font-weight: 700;
    color: #142540;
    margin: 0 0 6px;
    letter-spacing: .01em;
}
.login-welcome p {
    font-size: 13px;
    color: #6b7a8d;
    margin: 0 0 24px;
    line-height: 1.5;
}

/* ── Ícono de confirmación / éxito ───────────────────────────── */
.login-ok-icon {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 4px auto 20px;
    border-radius: 50%;
    background: rgba(29, 111, 66, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d6f42;
    font-size: 34px;
    animation: okPop .45s cubic-bezier(.34, 1.4, .5, 1) both;
    animation-delay: .15s;
}
.login-ok-icon > .fa-envelope-o { font-size: 30px; }
.login-ok-check {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1d6f42;
    border: 3px solid #fff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
@keyframes okPop {
    from { opacity: 0; transform: scale(.6); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Campos ──────────────────────────────────────────────────── */
.login-field { text-align: left; margin-bottom: 16px; }

.login-input { position: relative; display: flex; align-items: center; }
.login-input > i.fa {
    position: absolute;
    left: 15px;
    color: #9aa5b4;
    font-size: 15px;
    pointer-events: none;
    transition: color .15s;
}
.login-input:focus-within > i.fa { color: #CEB05B; }

.login-control.form-control {
    width: 100%;
    height: 48px;
    border: 1px solid #d9dfe7;
    border-radius: 10px;
    background: #fff;
    padding: 0 14px 0 42px;
    font-size: 14px;
    color: #1a2b4a;
    outline: none;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}
.login-input.has-toggle .login-control.form-control { padding-right: 44px; }
.login-control.form-control::placeholder { color: #aab3c0; }
.login-control.form-control:focus {
    border-color: #CEB05B;
    box-shadow: 0 0 0 3px rgba(206, 176, 91, 0.22);
}

.login-toggle {
    position: absolute;
    right: 7px;
    background: none;
    border: none;
    color: #9aa5b4;
    cursor: pointer;
    padding: 9px;
    font-size: 15px;
    line-height: 1;
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.login-toggle:hover { color: #142540; background: rgba(20, 37, 64, .06); }

/* ── Botón principal ─────────────────────────────────────────── */
.btn-iniciar-sesion {
    position: relative;
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border: none;
    border-radius: 10px;
    background: #CEB05B;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(206, 176, 91, .42);
    transition: background .2s, box-shadow .2s, transform .08s;
}
.btn-iniciar-sesion.as-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-top: 4px;
}
.btn-iniciar-sesion:hover { background: #bb9332; box-shadow: 0 10px 24px rgba(187, 147, 50, .52); color: #fff; }
.btn-iniciar-sesion:active { transform: translateY(1px); }
.btn-iniciar-sesion:focus-visible { outline: 3px solid rgba(206, 176, 91, .5); outline-offset: 2px; }
.btn-iniciar-sesion.loading { cursor: default; }
.btn-iniciar-sesion.loading .btn-label { opacity: 0; }
.btn-iniciar-sesion.loading .btn-spinner { opacity: 1; }
.btn-spinner {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
    animation: loginSpin .7s linear infinite;
}
@keyframes loginSpin { to { transform: rotate(360deg); } }

/* ── Enlaces / pie / validación ──────────────────────────────── */
.login-forgot {
    display: inline-flex;
    align-items: center;
    margin-top: 18px;
    font-size: 13px;
    color: #142540;
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}
.login-forgot:hover { color: #bb9332; text-decoration: underline; }

.login-footer { margin-top: 18px; font-size: 11px; color: #9aa5b4; letter-spacing: .02em; }

.text-danger { display: block; font-size: 12px; color: #e23b3b; font-weight: 600; line-height: 1.2; }
.contenedor-mensaje-alerta { margin-top: 6px; min-height: 4px; }
.login-valsummary { text-align: left; }
.login-valsummary ul {
    margin: 0 0 14px;
    padding: 10px 12px 10px 32px;
    list-style: none;
    position: relative;
    background: rgba(226, 59, 59, .08);
    border: 1px solid rgba(226, 59, 59, .25);
    border-radius: 9px;
}
.login-valsummary li { color: #c62b2b; font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.login-valsummary li::before { content: "\f06a"; font-family: FontAwesome; position: absolute; left: 12px; color: #e23b3b; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 480px) {
    .login-stage { padding: 16px; }
    .login-card { padding: 30px 22px 22px; border-radius: 16px; }
    #contenido .logo-login { width: 104px; }
    .login-brand { margin-bottom: 18px; padding-bottom: 16px; }
    .login-brand-full { letter-spacing: .03em; }
}
@media (max-width: 340px) {
    .login-brand-name { letter-spacing: .08em; padding-left: .08em; }
}

/* ── Accesibilidad: reducir movimiento ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .login-bg-video { display: none; }
    .login-card, .btn-spinner, .login-ok-icon { animation: none; }
}
