/* Estetica de las pantallas sueltas de Beasir: las que se pintan sin la
   aplicacion alrededor (login, registro, recuperar contrasena, verificar
   correo y el cartel de fuera de servicio). Todas cuelgan de layouts/app.

   Lo comun con el resto de la aplicacion (paleta, botones, campos, tarjetas)
   esta en css/beasir.css, que se carga justo antes: aqui solo va lo propio de
   estas pantallas.

   CSS plano servido desde public/ con asset(): no hay build step, asi que
   aqui no entra nada que haya que compilar. */

/* Los valores viven en css/beasir.css, que carga antes que esta hoja: la
   paleta es una sola para toda la aplicacion. Aqui solo se les pone el
   nombre con el que los llama el resto del fichero. */
:root {
    --auth-ink: var(--dbx-ink);
    --auth-text: var(--dbx-text);
    --auth-muted: var(--dbx-muted);
    --auth-line: var(--dbx-line);
    --auth-field: var(--dbx-field);
    --auth-primary: var(--dbx-primary);
    --auth-primary-dark: var(--dbx-primary-dark);
    --auth-radius: var(--dbx-radius);
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    color: var(--auth-text);
    background-color: #101828;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* La foto va en una capa fija aparte, no en el fondo del body con
   background-attachment: fixed, que en los navegadores de movil se ignora o
   se dibuja ampliada. Encima lleva el velo, que es lo que deja legible la
   tarjeta: la foto es clara y con mucho detalle. */
body::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background:
        linear-gradient(135deg, rgba(9, 17, 31, .86), rgba(9, 17, 31, .55)),
        url(../images/loginwall.jpg) no-repeat center center;
    background-size: cover;
    pointer-events: none;
}

/* Centrado: flex + margin auto en la tarjeta en lugar de align-items, que
   recorta por arriba cuando el formulario es mas alto que la ventana. */
.auth-shell {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    padding: 40px 16px;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    margin: auto;
    background: #fff;
    border-radius: var(--auth-radius);
    box-shadow: 0 24px 60px rgba(9, 17, 31, .38);
    overflow: hidden;
}

.auth-card--wide {
    max-width: 520px;
}

/* Cabecera: marca, titulo de la pantalla y una linea de contexto */
.auth-head {
    padding: 34px 36px 0;
    text-align: center;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--auth-primary), #7c3aed);
    color: #fff;
    font-size: 1.6rem;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .32);
}

.auth-brand {
    margin: 14px 0 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--auth-ink);
}

.auth-title {
    margin: 16px 0 4px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--auth-ink);
}

.auth-subtitle {
    margin: 0;
    font-size: .9rem;
    color: var(--auth-muted);
}

.auth-body {
    padding: 24px 36px 30px;
}

.auth-body .alert {
    border: 0;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: .88rem;
}

/* Campos */
.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form label {
    margin-bottom: 6px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--auth-muted);
}

.auth-form .form-control {
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    background-color: var(--auth-field);
    background-image: none;
    color: var(--auth-ink);
    font-size: .95rem;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.auth-form .form-control:focus {
    border-color: var(--auth-primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
}

.auth-form .form-control.is-invalid {
    border-color: #dc3545;
    padding-right: 14px;
}

.auth-form .form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .16);
}

.auth-form .invalid-feedback {
    font-size: .82rem;
}

.auth-form .form-text {
    font-size: .8rem;
}

/* Etiqueta con enlace a la derecha (la contrasena olvidada) */
.auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.auth-link {
    font-size: .78rem;
    font-weight: 600;
    color: var(--auth-primary);
    text-transform: none;
    letter-spacing: 0;
}

.auth-link:hover,
.auth-link:focus {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.auth-options {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.auth-options .form-check-label {
    font-size: .88rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--auth-text);
    margin-bottom: 0;
}

/* Botones */
.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-btn {
    flex: 1 1 160px;
    height: 46px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--auth-primary);
    transition: background-color .15s ease, box-shadow .15s ease, color .15s ease;
}

.auth-btn:hover,
.auth-btn:focus {
    background-color: var(--auth-primary-dark);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}

.auth-btn--ghost {
    background-color: #fff;
    border-color: var(--auth-line);
    color: var(--auth-text);
}

.auth-btn--ghost:hover,
.auth-btn--ghost:focus {
    background-color: var(--auth-field);
    border-color: #cbd4e1;
    color: var(--auth-ink);
    box-shadow: none;
}

/* El codigo de acceso del segundo factor: seis caracteres que se leen de un
   correo y se copian a mano, asi que van sueltos y en monoespaciada */
.auth-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: .35em;
    text-align: center;
    text-transform: uppercase;
}

/* Captcha: la imagen y el boton de repintarla, encima del campo */
.auth-captcha {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.auth-captcha img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    background: #fff;
}

.auth-captcha-reload {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    margin-left: 10px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    background: #fff;
    color: var(--auth-muted);
    font-size: 1.25rem;
    line-height: 1;
}

.auth-captcha-reload:hover,
.auth-captcha-reload:focus {
    border-color: var(--auth-primary);
    color: var(--auth-primary);
}

/* Pie de la tarjeta */
.auth-foot {
    padding: 18px 36px;
    border-top: 1px solid var(--auth-line);
    background: var(--auth-field);
    text-align: center;
    font-size: .88rem;
    color: var(--auth-muted);
}

.auth-foot a {
    font-weight: 600;
    color: var(--auth-primary);
}

.auth-foot a:hover,
.auth-foot a:focus {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

/* Las pantallas de este layout que todavia van con la tarjeta de Bootstrap
   (verificar correo, confirmar contrasena, el cartel de fuera de servicio):
   que al menos compartan el acabado. */
.auth-shell .card {
    border: 0;
    border-radius: var(--auth-radius);
    box-shadow: 0 24px 60px rgba(9, 17, 31, .38);
}

.auth-shell .card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--auth-line);
    background: #fff;
    font-weight: 600;
    color: var(--auth-ink);
}

.auth-shell .card-body {
    padding: 24px;
}

.auth-shell .card-footer {
    border-top: 1px solid var(--auth-line);
    background: var(--auth-field);
}

@media (max-width: 575.98px) {
    .auth-shell {
        padding: 24px 14px;
    }

    .auth-card {
        border-radius: 12px;
    }

    .auth-head {
        padding: 28px 22px 0;
    }

    .auth-body {
        padding: 22px 22px 26px;
    }

    .auth-foot {
        padding: 16px 22px;
    }

    .auth-btn {
        flex: 1 1 100%;
    }
}

/* Las pantallas de este layout que todavia traen su propia rejilla de
   Bootstrap (verificar correo, confirmar contrasena, recuperar contrasena):
   el contenedor ya centra, asi que aqui solo se anula el desplazamiento
   lateral que traian de antes. */
.auth-shell > .container {
    width: 100%;
    margin: auto;
}

.auth-shell .row {
    justify-content: center;
}

.auth-shell [class*="offset-"] {
    margin-left: 0;
}
