.auth-page {
    --hero-scale: 1.06;
    --hero-pan-x: 0%;
    --hero-pan-y: 0%;
    --pointer-x: 0px;
    --pointer-y: 0px;

    position: relative;

    min-height: 100svh;

    display: grid;
    grid-template-columns:
        minmax(0, 1.12fr)
        minmax(430px, 0.88fr);

    background: var(--cor-fundo);
}

.auth-page--login {
    --hero-scale: 1.07;
    --hero-pan-x: 2%;
    --hero-pan-y: 0%;
}

.auth-page--cadastro {
    --hero-scale: 1.08;
    --hero-pan-x: 0%;
    --hero-pan-y: -1%;
}

.auth-page--recuperar {
    --hero-scale: 1.08;
    --hero-pan-x: -1.5%;
    --hero-pan-y: 1%;
}

.auth-hero {
    position: relative;
    isolation: isolate;

    min-height: 100svh;
    overflow: hidden;

    padding: clamp(30px, 4.5vw, 64px);

    display: flex;
    flex-direction: column;

    border-right: 1px solid rgba(255, 255, 255, 0.045);

    background: #1D1F1F;
}

.hero-image {
    position: absolute;
    inset: 0;
    z-index: -5;

    background-image: var(--hero-image);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 34%;

    filter:
        saturate(0.90)
        contrast(1.02)
        brightness(0.74);

    opacity: 0.001;

    transform:
        scale(calc(var(--hero-scale) + 0.06))
        translate3d(0%, 2%, 0);

    transition:
        transform 900ms cubic-bezier(.22, .61, .36, 1),
        opacity 700ms ease;
}

.auth-ready .hero-image {
    opacity: 1;

    transform:
        scale(var(--hero-scale))
        translate3d(
            calc(var(--hero-pan-x) + var(--pointer-x)),
            calc(var(--hero-pan-y) + var(--pointer-y)),
            0
        );
}

.hero-shade {
    position: absolute;
    inset: 0;
    z-index: -4;

    background:
        linear-gradient(
            90deg,
            rgba(23, 27, 26, 0.92) 0%,
            rgba(23, 27, 26, 0.78) 34%,
            rgba(23, 27, 26, 0.48) 58%,
            rgba(23, 27, 26, 0.24) 100%
        ),
        linear-gradient(
            180deg,
            rgba(23, 27, 26, 0.15) 0%,
            rgba(23, 27, 26, 0.12) 50%,
            rgba(23, 27, 26, 0.90) 100%
        );
}

.hero-grid {
    position: absolute;
    inset: 0;
    z-index: -3;

    opacity: 0.14;

    background-image:
        linear-gradient(
            rgba(33, 192, 99, 0.06) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(33, 192, 99, 0.06) 1px,
            transparent 1px
        );

    background-size: 80px 80px;

    mask-image:
        linear-gradient(
            90deg,
            rgba(0,0,0,0.85) 0%,
            rgba(0,0,0,0.45) 56%,
            transparent 92%
        );
}

.hero-orb {
    position: absolute;
    z-index: -2;

    width: 420px;
    height: 420px;

    right: -140px;
    top: 12%;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(33, 192, 99, 0.16) 0%,
            rgba(33, 192, 99, 0.08) 28%,
            transparent 70%
        );

    filter: blur(28px);
    pointer-events: none;
}

.brand-logo {
    max-width: 190px;
    max-height: 48px;
}

.hero-content {
    position: relative;
    z-index: 3;

    width: min(680px, 100%);

    margin-block: auto;
    padding-block: clamp(54px, 7vh, 96px);
}

.eyebrow,
.auth-label {
    display: inline-flex;

    color: var(--cor-primaria-clara);

    font-size: 0.72rem;
    font-weight: 800;

    letter-spacing: 0.16em;
}

.hero-content h1 {
    max-width: 650px;

    margin-top: 18px;

    color: #fff;

    font-size:
        clamp(3rem, 5vw, 5.75rem);

    font-weight: 800;

    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-content h1 strong {
    display: block;

    color: var(--cor-primaria);

    font-weight: inherit;
}

.hero-content > p {
    max-width: 590px;

    margin-top: 24px;

    color: rgba(255, 255, 255, 0.68);

    font-size:
        clamp(0.98rem, 1.2vw, 1.08rem);

    line-height: 1.7;
}

.auth-panel {
    min-height: 100svh;

    padding: clamp(24px, 5vw, 72px);

    display: grid;
    place-items: center;

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(33, 192, 99, 0.05),
            transparent 20rem
        ),
        var(--cor-fundo);
}

.auth-card {
    width: min(100%, 470px);
}
.auth-header h2 {
    margin-top: 12px;

    color: var(--cor-texto);

    font-size:
        clamp(1.95rem, 3vw, 2.5rem);

    font-weight: 760;

    line-height: 1.06;
    letter-spacing: -0.045em;
}

.auth-header p {
    max-width: 430px;

    margin-top: 11px;

    color: var(--cor-texto-suave);

    line-height: 1.6;
}

.auth-form {
    margin-top: 32px;
}

.field + .field {
    margin-top: 18px;
}

.field label {
    display: inline-block;

    margin-bottom: 8px;

    color: #E7EBEA;

    font-size: 0.86rem;
    font-weight: 650;
}

.field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;
}

.field-row a {
    margin-bottom: 8px;

    color: var(--cor-primaria-clara);

    font-size: 0.81rem;

    text-decoration: none;
}

.field-row a:hover {
    color: #fff;
}

.icon-input,
.password-box {
    position: relative;
}

.field input {
    width: 100%;
    height: 54px;

    padding: 0 16px;

    border: 1px solid var(--cor-borda);
    border-radius: 10px;

    outline: 0;

    color: var(--cor-texto);
    background: rgba(255, 255, 255, 0.018);

    transition:
        border-color 150ms ease,
        background 150ms ease,
        box-shadow 150ms ease;
}

.icon-input input,
.password-box input {
    padding-left: 46px;
}

.field input::placeholder {
    color: #6F7372;
}

.field input:hover {
    border-color: #3F4342;
}

.field input:focus {
    border-color: var(--cor-primaria);

    background: rgba(33, 192, 99, 0.025);

    box-shadow:
        0 0 0 3px rgba(33, 192, 99, 0.09);
}

.field-lucide {
    position: absolute;

    left: 16px;
    top: 50%;
    z-index: 2;

    width: 17px;
    height: 17px;

    color: #767A79;

    stroke-width: 1.8;

    transform: translateY(-50%);

    pointer-events: none;
}

.password-box input {
    padding-right: 54px;
}

.password-toggle {
    position: absolute;

    right: 8px;
    top: 50%;

    width: 36px;
    height: 36px;

    display: grid;
    place-items: center;

    border-radius: 8px;

    color: #797D7C;
    background: transparent;

    transform: translateY(-50%);

    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: #fff;

    background: rgba(255, 255, 255, 0.04);

    outline: none;
}

.password-toggle svg {
    width: 17px;
    height: 17px;

    stroke-width: 1.8;
}

.checkbox-line {
    margin-top: 17px;

    display: inline-flex;
    align-items: center;

    gap: 8px;

    color: #B8BCBB;

    font-size: 0.83rem;

    cursor: pointer;
}

.checkbox-line input {
    width: 16px;
    height: 16px;

    accent-color: var(--cor-primaria);
}

.primary-button {
    width: 100%;
    min-height: 54px;

    margin-top: 23px;
    padding: 0 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    border-radius: 10px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #3DD77B,
            #21C063 46%,
            #159C50
        );

    font-weight: 760;

    cursor: pointer;

    box-shadow:
        0 14px 38px rgba(33, 192, 99, 0.12);

    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        filter 150ms ease;
}

.primary-button:hover {
    filter: brightness(1.04);

    box-shadow:
        0 16px 42px rgba(33, 192, 99, 0.18);
}

.primary-button:active {
    transform: translateY(1px);
}

.primary-button svg {
    width: 17px;
    height: 17px;

    stroke-width: 1.9;

    transition: transform 150ms ease;
}

.primary-button:hover svg {
    transform: translateX(3px);
}

.auth-footer {
    margin-top: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    color: #727675;

    font-size: 0.83rem;

    text-align: center;
}

.auth-footer a {
    color: var(--cor-primaria-clara);

    font-weight: 650;

    text-decoration: none;
}

.auth-footer a:hover {
    color: #fff;
}

/* Chrome / Edge / Safari autofill */
.icon-input input:-webkit-autofill,
.icon-input input:-webkit-autofill:hover,
.icon-input input:-webkit-autofill:focus,
.icon-input input:-webkit-autofill:active,
.password-box input:-webkit-autofill,
.password-box input:-webkit-autofill:hover,
.password-box input:-webkit-autofill:focus,
.password-box input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--cor-texto) !important;
    caret-color: var(--cor-texto);

    -webkit-box-shadow:
        0 0 0 1000px var(--cor-superficie) inset !important;

    box-shadow:
        0 0 0 1000px var(--cor-superficie) inset !important;

    border-color: var(--cor-borda);

    transition: background-color 9999s ease-out 0s;
}


@media (max-width: 980px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        display: none;
    }

    .auth-panel {
        min-height: 100svh;

        padding:
            28px
            24px
            42px;
    }

    .auth-card {
        width: min(100%, 470px);
    }
}

@media (max-width: 560px) {
    .auth-panel {
        padding:
            24px
            18px
            36px;
    }

    .auth-header h2 {
        font-size: 2rem;
    }

    .auth-form {
        margin-top: 28px;
    }

    .auth-footer {
        flex-wrap: wrap;
    }
}

@media (max-width: 380px) {
    .field-row {
        align-items: flex-start;
        flex-direction: column;

        gap: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* Evita arrastar imagens da interface para outra aba do navegador. */
img,
.brand-logo {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

.hero-image {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}




/* Validação de formulário: erro local, sem toast para campo inválido. */
.icon-input.is-invalid input,
.password-box.is-invalid input {
    border-color: rgba(223, 109, 114, 0.56);
    background: rgba(223, 109, 114, 0.025);
}

.icon-input.is-invalid input:focus,
.password-box.is-invalid input:focus {
    border-color: #DF6D72;

    box-shadow:
        0 0 0 3px rgba(223, 109, 114, 0.08);
}

.icon-input.is-invalid .field-lucide,
.password-box.is-invalid .field-lucide {
    color: #DF6D72;
}

.field-error {
    display: block;

    margin-top: 7px;

    color: rgba(231, 134, 138, 0.88);

    font-size: 0.74rem;
    font-weight: 560;

    line-height: 1.35;
}

.checkbox-line.is-invalid {
    color: rgba(231, 134, 138, 0.90);
}

.checkbox-line.is-invalid input {
    outline: 1px solid rgba(223, 109, 114, 0.58);
    outline-offset: 2px;
}

.checkbox-error {
    margin-top: 7px;
}
