/*========================================================
        ACCESO — Sistema de Gestión Docente

Hoja del flujo de acceso: la cargan auth/login.blade.php y las
tres pantallas de contraseña (passwords/reset, passwords/new y
passwords/change-insecure-password) a través de @yield('estilos').
No se toca login.css porque esa la comparten two_factor, login1
y loginno: cualquier cambio allí las arrastraría a todas.

Paleta: los azules del shell ya autenticado (layout.scss) más
el oro del escudo (#f6c23e, el --warning del tema). Los radios
(5.6px = .35rem) y los neutros salen de sb-admin-2 para que el
login y la aplicación se lean como la misma pieza.
=========================================================*/

/*--------------------------------------------------------
        Marco

auth/layout.blade.php envuelve el contenido en
section.h-100 > .container.h-100 > .row.h-100. Ese contenedor
limita el ancho y el login va a sangre, así que la plantilla
expone tres @yield con valor por defecto: las vistas hermanas
siguen recibiendo las clases de Bootstrap y solo el login pide
estas tres. Así no hace falta pelear el !important de .h-100.
--------------------------------------------------------*/

.sgd-login-section {
    display: block;
}

.sgd-login-container {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
}

.sgd-login-row {
    display: block;
    margin: 0;
}

body.my-login-page {
    background-color: #f8f9fc;
}

.sgd-login {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 100vh;
    background-color: #f8f9fc;
    font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    overflow-x: hidden;
}

/*--------------------------------------------------------
        Panel institucional
--------------------------------------------------------*/

.sgd-login__panel {
    position: relative;
    flex: 0 0 53.33%;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 96px 120px 96px clamp(40px, 6.1vw, 88px);
    background-image: linear-gradient(158deg, #16307f 0%, #224abe 54%, #3f63d4 100%);
}

/* El escudo monocromo a gran escala, sangrado por el borde
   inferior izquierdo: lee como textura de marca, no como logo. */
.sgd-login__texture {
    position: absolute;
    left: -212px;
    bottom: -178px;
    width: 900px;
    max-width: none;
    opacity: 0.08;
    pointer-events: none;
    user-select: none;
}

.sgd-login__brand {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    max-width: 484px;
}

.sgd-login__eyebrow {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    color: #f6c23e;
}

.sgd-login__title {
    margin: 0;
    font-size: clamp(38px, 4.2vw, 60px);
    font-weight: 900;
    line-height: 1.03;
    letter-spacing: -0.015em;
    color: #ffffff;
    text-wrap: balance;
}

.sgd-login__rule {
    width: 76px;
    height: 5px;
    border-radius: 3px;
    background-color: #f6c23e;
}

/* Se posiciona contra .sgd-login (no contra el panel) para poder salir del
   azul en móvil sin duplicar el marcado. */
.sgd-login__legal {
    position: absolute;
    left: clamp(40px, 6.1vw, 88px);
    bottom: 58px;
    z-index: 1;
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.62);
}

/*--------------------------------------------------------
        Tarjeta

La tarjeta muerde el panel 100px: ese solape es la costura
sobre la que se monta el medallón del escudo.
--------------------------------------------------------*/

.sgd-login__form {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    padding: 48px 40px 48px 0;
}

.sgd-login__card {
    position: relative;
    width: 500px;
    max-width: 100%;
    margin-left: -100px;
    background-color: #ffffff;
    border: 1px solid #e3e6f0;
    border-radius: 6px;
    box-shadow: 0 22px 48px rgba(15, 29, 73, 0.20), 0 2px 6px rgba(15, 29, 73, 0.06);
}

.sgd-login__seal {
    position: absolute;
    left: -52px;
    top: -30px;
    z-index: 2;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px #f6c23e, 0 12px 26px rgba(15, 29, 73, 0.30);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sgd-login__seal img {
    display: block;
    width: 74px;
    height: auto;
}

.sgd-login__head {
    padding: 34px 48px 26px 68px;
    border-bottom: 1px solid #e3e6f0;
}

.sgd-login__heading {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #4e4d5e;
}

.sgd-login__body {
    padding: 30px 48px 40px;
}

/*--------------------------------------------------------
        Campos

Clases propias en lugar de .form-control: el control mide
46px (los 38px de sb-admin-2 quedan por debajo del mínimo
táctil de 44px) y así no hay que deshacer los estilos del
tema ni los de .was-validated.
--------------------------------------------------------*/

.sgd-group + .sgd-group {
    margin-top: 20px;
}

.sgd-label {
    display: block;
    margin-bottom: 9px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6e707e;
}

.sgd-field {
    position: relative;
}

.sgd-field__icon {
    position: absolute;
    left: 15px;
    top: 13px;
    z-index: 2;
    line-height: 0;
    color: #b7b9cc;
    pointer-events: none;
    transition: color 0.15s ease-in-out;
}

.sgd-field:focus-within .sgd-field__icon {
    color: #4e73df;
}

.sgd-input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 16px 0 46px;
    border: 2px solid #d1d3e2;
    border-radius: 5.6px;
    background-color: #ffffff;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #6e707e;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.sgd-input:focus {
    outline: 0;
    border-color: #4e73df;
    /* .2rem, el mismo halo de foco que sb-admin-2 */
    box-shadow: 0 0 0 3.2px rgba(78, 115, 223, 0.25);
}

.sgd-input--error,
.was-validated .sgd-input:invalid {
    border-color: #e74a3b;
    background-color: #fdf5f4;
}

.sgd-group--error .sgd-field__icon {
    color: #e74a3b;
}

.sgd-group--error .sgd-label {
    color: #e74a3b;
}

.sgd-error {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 9px;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.45;
    color: #e74a3b;
}

.sgd-error svg {
    flex: 0 0 auto;
    margin-top: 1px;
}

/* El ojo lo inyecta login.js en tiempo de ejecución (data-eye):
   llega con posición y tamaño en línea, aquí solo se le da color.
   La clase .show la pone el propio login.js al revelar la clave. */
.sgd-login [id^="passeye-toggle-"] {
    z-index: 3;
    color: #b7b9cc;
    transition: color 0.15s ease-in-out;
}

.sgd-login [id^="passeye-toggle-"]:hover {
    color: #4e73df;
}

.sgd-login .sgd-input.show ~ [id^="passeye-toggle-"] {
    color: #4e73df;
}

/*--------------------------------------------------------
        Acciones
--------------------------------------------------------*/

.sgd-forgot {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.sgd-forgot a {
    font-size: 13px;
    font-weight: 700;
    color: #4e73df;
    text-decoration: none;
}

.sgd-forgot a:hover,
.sgd-forgot a:focus {
    color: #224abe;
    text-decoration: underline;
}

.sgd-submit {
    display: flex;
    width: 100%;
    height: 50px;
    margin-top: 26px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 5.6px;
    background-color: #4e73df;
    box-shadow: 0 6px 16px rgba(78, 115, 223, 0.32);
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.sgd-submit:hover {
    background-color: #224abe;
}

/* La misma pieza como enlace (passwords/new, cuando el token no sirve). */
a.sgd-submit,
a.sgd-submit:hover,
a.sgd-submit:focus {
    color: #ffffff;
    text-decoration: none;
}

.sgd-submit:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3.2px rgba(78, 115, 223, 0.4);
}

.sgd-submit:active {
    box-shadow: 0 2px 8px rgba(78, 115, 223, 0.32);
}

/*--------------------------------------------------------
        Atención al docente

Siempre a la vista, al pie de la tarjeta. El bloque se apoya
en el azul suave del tema (#eef2fd) en vez del .alert con
tabla del login anterior: el dato se lee de un golpe sin
pesar más que el propio formulario.
--------------------------------------------------------*/

.sgd-help {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 26px;
    padding: 18px 20px;
    border: 1px solid #d7e0fb;
    border-radius: 5.6px;
    background-color: #eef2fd;
}

.sgd-help__title {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #224abe;
}

.sgd-help__row {
    display: flex;
    align-items: center;
    gap: 11px;
}

.sgd-help__row--top {
    align-items: flex-start;
}

.sgd-help__row svg {
    flex: 0 0 auto;
}

.sgd-help__row--top svg {
    margin-top: 2px;
}

.sgd-help__phone {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #224abe;
    text-decoration: none;
}

.sgd-help__phone:hover,
.sgd-help__phone:focus {
    color: #16307f;
    text-decoration: underline;
}

.sgd-help__hours {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
    color: #5a5c69;
}

/*--------------------------------------------------------
        Avisos

Un aviso tiene que leerse antes que el formulario que lo
provoca: franja de color, icono en medallón, titular y
detalle. Sustituye al .alert de Bootstrap, que a este tamaño
de tarjeta se confunde con un campo más.
--------------------------------------------------------*/

.sgd-alert {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 22px;
    padding: 15px 17px;
    border: 1px solid;
    border-left-width: 4px;
    border-radius: 5.6px;
}

.sgd-alert__icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 17px;
}

.sgd-alert__body {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 2px;
}

.sgd-alert__title {
    margin: 0 0 3px;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.sgd-alert__text {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
    color: #5a5c69;
}

.sgd-alert--danger {
    border-color: #f3ccc7;
    border-left-color: #e74a3b;
    background-color: #fdf5f4;
}

.sgd-alert--danger .sgd-alert__icon {
    background-color: #f9dedb;
    color: #e74a3b;
}

.sgd-alert--danger .sgd-alert__title {
    color: #c0392b;
}

.sgd-alert--success {
    border-color: #bff0dc;
    border-left-color: #17a673;
    background-color: #f0fbf6;
}

.sgd-alert--success .sgd-alert__icon {
    background-color: #d2f4e8;
    color: #17a673;
}

.sgd-alert--success .sgd-alert__title {
    color: #0f6848;
}

.sgd-alert--warning {
    border-color: #f6e3b4;
    border-left-color: #f6c23e;
    background-color: #fef9ec;
}

.sgd-alert--warning .sgd-alert__icon {
    background-color: #fdf0d0;
    color: #c78a12;
}

.sgd-alert--warning .sgd-alert__title {
    color: #c78a12;
}

/*--------------------------------------------------------
        Contraseñas

El ojo va dentro del campo (no en un input-group) para no
partir el borde de 2px, y el propio componente Vue lo
gobierna: login.js solo actúa sobre el formulario del login,
que se pinta en el servidor.
--------------------------------------------------------*/

.sgd-input--eye {
    padding-right: 46px;
}

.sgd-eye {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background-color: transparent;
    line-height: 0;
    color: #b7b9cc;
    cursor: pointer;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.sgd-eye:hover {
    color: #4e73df;
    background-color: #f8f9fc;
}

.sgd-eye:focus-visible {
    outline: 0;
    color: #4e73df;
    box-shadow: 0 0 0 3.2px rgba(78, 115, 223, 0.25);
}

.sgd-eye--on {
    color: #4e73df;
}

/* Confirmación correcta: el par del .sgd-error, en verde. */
.sgd-ok {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 9px;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.45;
    color: #17a673;
}

.sgd-ok svg {
    flex: 0 0 auto;
}

/*--------------------------------------------------------
        Texto y acciones secundarias
--------------------------------------------------------*/

/* Explica de una línea qué se espera del formulario. */
.sgd-lead {
    margin: 0 0 22px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.6;
    color: #858796;
}

.sgd-back {
    margin: 24px 0 0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #858796;
}

.sgd-back a {
    font-weight: 800;
    color: #4e73df;
    text-decoration: none;
}

.sgd-back a:hover,
.sgd-back a:focus {
    color: #224abe;
    text-decoration: underline;
}

/* El envío se bloquea mientras la contraseña no cumple la
   política: el botón tiene que decirlo sin ambigüedad. */
.sgd-submit:disabled,
.sgd-submit:disabled:hover {
    background-color: #b9c6ee;
    box-shadow: none;
    cursor: not-allowed;
}

.sgd-submit__spinner {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    border-width: 2px;
}

/*--------------------------------------------------------
        Móvil y tableta

Por debajo de 992px el corte deja de ser vertical: el panel
pasa a banda superior y la costura —con su medallón— se
vuelve horizontal.
--------------------------------------------------------*/

@media screen and (max-width: 991.98px) {
    .sgd-login {
        flex-direction: column;
        min-height: 100vh;
    }

    .sgd-login__panel {
        flex: 0 0 auto;
        min-height: 268px;
        padding: 56px 28px 92px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
    }

    .sgd-login__texture {
        left: auto;
        right: -128px;
        bottom: auto;
        top: -96px;
        width: 440px;
        opacity: 0.09;
    }

    .sgd-login__brand {
        gap: 12px;
        max-width: 300px;
    }

    .sgd-login__eyebrow {
        font-size: 10.5px;
        letter-spacing: 0.16em;
    }

    .sgd-login__title {
        font-size: clamp(28px, 8.2vw, 34px);
        line-height: 1.12;
    }

    .sgd-login__rule {
        width: 54px;
        height: 4px;
    }

    .sgd-login__legal {
        position: static;
        flex: 0 0 auto;
        padding: 28px 20px 32px;
        text-align: center;
        color: #b7b9cc;
    }

    .sgd-login__form {
        flex: 1 1 auto;
        display: block;
        padding: 0 20px;
    }

    .sgd-login__card {
        width: 100%;
        max-width: 420px;
        margin: -52px auto 0;
    }

    .sgd-login__seal {
        left: 50%;
        top: -52px;
        transform: translateX(-50%);
    }

    .sgd-login__head {
        padding: 72px 22px 0;
        border-bottom: 0;
        text-align: center;
    }

    .sgd-login__heading {
        font-size: 19px;
    }

    .sgd-login__body {
        padding: 24px 22px 26px;
    }

    .sgd-input {
        height: 48px;
        padding-left: 44px;
    }

    .sgd-field__icon {
        left: 14px;
        top: 14px;
    }

    .sgd-submit {
        height: 52px;
        margin-top: 22px;
    }

    .sgd-eye {
        top: 7px;
    }

    .sgd-alert {
        gap: 11px;
        padding: 13px 14px;
    }

    .sgd-alert__icon {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }
}

@media screen and (max-width: 380px) {
    .sgd-login__panel {
        padding: 44px 20px 88px;
    }

    .sgd-login__form {
        padding: 0 14px;
    }

    .sgd-login__body,
    .sgd-login__head {
        padding-left: 18px;
        padding-right: 18px;
    }
}
