/* ==========================================================
   SEMOLLINI CORTES
   Autenticação — desktop e mobile
   ========================================================== */

:root {
    color-scheme: light;

    --auth-navy-950: #082847;
    --auth-navy-900: #0b3158;
    --auth-navy-800: #10436f;
    --auth-blue-600: #155eef;
    --auth-blue-100: #e8f0ff;

    --auth-white: #ffffff;
    --auth-background: #f3f7fb;
    --auth-surface-soft: #f8fafc;

    --auth-text: #17212f;
    --auth-muted: #667085;
    --auth-border: #d7e0e9;

    --auth-danger: #b42318;
    --auth-danger-bg: #fff1f0;
    --auth-danger-border: #f3b5ae;

    --auth-success: #166534;
    --auth-success-bg: #effaf3;
    --auth-success-border: #a7d8b7;

    --auth-focus: rgba(21, 94, 239, 0.18);

    --auth-radius-sm: 9px;
    --auth-radius-md: 14px;
    --auth-radius-lg: 22px;

    --auth-shadow:
        0 24px 70px rgba(8, 40, 71, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--auth-background);
}

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(21, 94, 239, 0.10),
            transparent 30rem
        ),
        var(--auth-background);
    color: var(--auth-text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a,
input,
label {
    -webkit-tap-highlight-color: transparent;
}

.auth-page {
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    place-items: center;
    padding: 24px;
}

.auth-shell {
    display: grid;
    width: min(100%, 980px);
    min-height: 610px;
    overflow: hidden;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-lg);
    background: var(--auth-white);
    box-shadow: var(--auth-shadow);
    grid-template-columns: minmax(300px, 0.9fr) minmax(420px, 1.1fr);
}

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 42px;
    background:
        linear-gradient(
            145deg,
            var(--auth-navy-950),
            var(--auth-navy-800)
        );
    color: var(--auth-white);
}

.auth-brand::before,
.auth-brand::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.auth-brand::before {
    width: 330px;
    height: 330px;
    right: -190px;
    top: -150px;
}

.auth-brand::after {
    width: 220px;
    height: 220px;
    left: -140px;
    bottom: -110px;
}

/*
 * Área centralizada do logotipo principal.
 * O tamanho abaixo se aplica ao painel azul do desktop.
 */
.auth-brand__logo-area {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    min-height: 190px;
    align-items: flex-start;
    justify-content: center;
}

/*
 * Logotipo completo da Semollini Plano de Corte.
 * Mantém a proporção original sem esticar a imagem.
 */
.auth-brand__logo {
    display: block;
    width: auto;
    max-width: min(100%, 270px);
    height: auto;
    max-height: 205px;
    object-fit: contain;
}

/* Texto alternativo exibido somente se não houver logo. */
.auth-brand__name {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.auth-brand__content {
    position: relative;
    z-index: 1;
    margin: auto 0;
}

.auth-brand__eyebrow {
    margin: 0 0 15px;
    color: #bcd2f5;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-brand__title {
    max-width: 330px;
    margin: 0;
    font-size: clamp(31px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.auth-brand__description {
    max-width: 340px;
    margin: 20px 0 0;
    color: #d8e4f2;
    font-size: 16px;
    line-height: 1.65;
}

.auth-brand__footer {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #bcd0e6;
    font-size: 13px;
    line-height: 1.5;
}

.auth-content {
    display: flex;
    align-items: center;
    padding: 54px 62px;
}

.auth-content__inner {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-mobile-brand {
    display: none;
}

.auth-mobile-brand__logo {
    display: block;
    width: auto;
    max-width: 165px;
    height: auto;
    max-height: 105px;
    object-fit: contain;
}

.auth-mobile-brand__name {
    margin: 0;
    color: var(--auth-white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.auth-heading {
    margin-bottom: 30px;
}

.auth-heading__eyebrow {
    margin: 0 0 9px;
    color: var(--auth-blue-600);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-heading h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.auth-heading p {
    margin: 10px 0 0;
    color: var(--auth-muted);
    font-size: 15px;
    line-height: 1.6;
}

.auth-message {
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: var(--auth-radius-sm);
    font-size: 14px;
    line-height: 1.5;
}

.auth-message--error {
    border-color: var(--auth-danger-border);
    background: var(--auth-danger-bg);
    color: var(--auth-danger);
}

.auth-message--success {
    border-color: var(--auth-success-border);
    background: var(--auth-success-bg);
    color: var(--auth-success);
}

.auth-field {
    margin-bottom: 19px;
}

/* Espaçamento dos títulos posicionados diretamente acima dos campos. */
.auth-field > .auth-label {
    display: block;
    margin-bottom: 7px;
}

.auth-field__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 7px;
}

.auth-label {
    display: block;
    color: var(--auth-text);
    font-size: 14px;
    font-weight: 700;
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #b8c5d2;
    border-radius: var(--auth-radius-sm);
    outline: 0;
    background: var(--auth-white);
    color: var(--auth-text);
    font-size: 16px;
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.auth-input--password {
    padding-right: 54px;
}

.auth-input:focus {
    border-color: var(--auth-blue-600);
    box-shadow: 0 0 0 4px var(--auth-focus);
}

.auth-input::placeholder {
    color: #98a2b3;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    width: 42px;
    height: 38px;
    padding: 0;
    transform: translateY(-50%);
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    background: var(--auth-surface-soft);
    color: var(--auth-navy-900);
    outline: 0;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 2px 0 24px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--auth-muted);
    font-size: 14px;
    cursor: pointer;
}

.auth-check input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--auth-blue-600);
}

.auth-link {
    color: var(--auth-blue-600);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-button {
    display: inline-flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 20px;
    border: 0;
    border-radius: var(--auth-radius-sm);
    background: var(--auth-navy-900);
    color: var(--auth-white);
    font-weight: 750;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        background 150ms ease,
        transform 150ms ease;
}

.auth-button:hover {
    background: var(--auth-navy-800);
}

.auth-button:active {
    transform: translateY(1px);
}

.auth-button:focus-visible {
    outline: 4px solid var(--auth-focus);
    outline-offset: 2px;
}

.auth-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.auth-register {
    margin: 25px 0 0;
    text-align: center;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.5;
}

.auth-development {
    margin: 28px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--auth-border);
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
}

/* ==========================================================
   REGRAS DA NOVA SENHA
   ========================================================== */

.auth-password-rules {
    margin: 2px 0 24px;
    padding: 16px 18px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    background: var(--auth-surface-soft);
}

.auth-password-rules__title {
    margin: 0 0 10px;
    color: var(--auth-text);
    font-size: 13px;
    font-weight: 700;
}

.auth-password-rules__list {
    display: grid;
    margin: 0;
    padding-left: 18px;
    grid-template-columns:
        repeat(auto-fit, minmax(155px, 1fr));
    gap: 7px 24px;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.5;
}

.auth-password-rules__list li::marker {
    color: var(--auth-blue-600);
}

@media (max-width: 820px) {
    .auth-page {
        padding: 18px;
    }

    .auth-shell {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-content {
        padding: 38px 32px 34px;
    }

    .auth-content__inner {
        max-width: 470px;
    }

    .auth-mobile-brand {
        display: flex;
        min-height: 122px;
        align-items: center;
        justify-content: center;
        margin: 0 0 32px;
        padding: 12px 22px;
        border-radius: 14px;
        background:
            linear-gradient(
                145deg,
                var(--auth-navy-950),
                var(--auth-navy-800)
            );
    }
}

@media (max-width: 520px) {
    body {
        background:
            linear-gradient(
                180deg,
                #eaf2fb 0,
                var(--auth-background) 240px
            );
    }

    .auth-page {
        display: block;
        padding:
            max(16px, env(safe-area-inset-top))
            12px
            max(16px, env(safe-area-inset-bottom));
    }

    .auth-shell {
        width: 100%;
        border-radius: 18px;
        box-shadow:
            0 14px 38px rgba(8, 40, 71, 0.12);
    }

    .auth-content {
        padding: 29px 20px 25px;
    }

    .auth-mobile-brand {
        min-height: 108px;
        margin-bottom: 27px;
        padding: 10px 18px;
    }

    .auth-mobile-brand__logo {
        max-width: 145px;
        max-height: 90px;
    }

    .auth-mobile-brand__name {
        font-size: 18px;
    }

    .auth-heading {
        margin-bottom: 25px;
    }

    .auth-heading h1 {
        font-size: 30px;
    }

    .auth-input,
    .auth-button {
        min-height: 54px;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .auth-check,
    .auth-link {
        min-height: 26px;
        align-items: center;
    }

    .auth-development {
        margin-top: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/*
 * =========================================================
 * LINK DE SUPORTE DENTRO DO AVISO
 * =========================================================
 *
 * Permanece no fluxo do texto e herda seu tamanho.
 */

.auth-message a.auth-message__support-link {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0057d9;
    font-size: inherit;
    line-height: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-message a.auth-message__support-link:hover {
    color: #003f9e;
}

.auth-message a.auth-message__support-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}