:root {
    --auth-blue: #0665f5;
    --auth-blue-dark: #0052d6;
    --auth-navy: #101828;
    --auth-copy: #344054;
    --auth-muted: #667085;
    --auth-line: #dbe5f4;
    --auth-soft: #f5f8ff;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    color: var(--auth-navy);
    background: #ffffff;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-page {
    min-height: 100vh;
    background: #ffffff;
}

.auth-layout {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(430px, 45.6%) minmax(0, 1fr);
}

.auth-form-side {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 36px clamp(40px, 6.9vw, 106px) 44px;
    overflow-y: auto;
    background: #ffffff;
}

.auth-form-card {
    width: min(100%, 490px);
    margin-block: auto;
    animation: authEnter 480ms cubic-bezier(.2, .75, .25, 1) both;
}

.auth-heading {
    margin-bottom: 35px;
}

.auth-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 38px;
}

.auth-lockup img {
    width: 40px;
    height: 40px;
    display: block;
    border-radius: 11px;
    box-shadow: 0 7px 18px rgba(6, 101, 245, 0.18);
}

.auth-lockup span {
    color: #0b1020;
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -0.035em;
}

.auth-heading h1 {
    margin: 0 0 11px;
    color: #101219;
    font-size: clamp(34px, 3vw, 44px);
    line-height: 1.08;
    font-weight: 750;
    letter-spacing: -0.045em;
}

.auth-heading p {
    margin: 0;
    color: #415172;
    font-size: 16px;
    line-height: 1.6;
}

.auth-google {
    width: 100%;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 1.5px solid #9ebdff;
    border-radius: 12px;
    background: #ffffff;
    color: #101219;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease,
        box-shadow 150ms ease, transform 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .auth-google:not(:disabled):not([aria-disabled="true"]):hover {
        background-color: #f2f7ff;
        border-color: #0665f5;
        box-shadow: 0 5px 14px rgba(6, 101, 245, 0.12);
        transform: translateY(-1px);
    }
}

.auth-google:not(:disabled):not([aria-disabled="true"]):active {
    background-color: #e5efff;
    border-color: #0050cf;
    box-shadow: inset 0 2px 4px rgba(6, 101, 245, 0.12);
    transform: scale(0.985);
    transition-duration: 60ms;
}

.auth-google img {
    width: 28px;
    height: 28px;
    mix-blend-mode: multiply;
}

.auth-google:disabled,
.auth-google[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.62;
}

.auth-google-note {
    margin: 8px 0 0;
    color: var(--auth-muted);
    font-size: 12px;
    text-align: center;
}

.auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    margin: 27px 0 31px;
    color: #61708b;
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    background: #dbe3ef;
}

.auth-field {
    margin-bottom: 24px;
}

.auth-label {
    display: block;
    margin-bottom: 10px;
    color: #101219;
    font-size: 14px;
    font-weight: 500;
}

.auth-input-wrap,
.password-input-container {
    position: relative;
}

.auth-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 18px;
    z-index: 1;
    transform: translateY(-50%);
    color: #7c8da9;
    font-size: 18px;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    height: 58px;
    padding: 0 52px 0 54px;
    border: 1.5px solid #a9c3ff;
    border-radius: 11px;
    outline: none;
    background: #ffffff;
    color: var(--auth-navy);
    font: inherit;
    font-size: 16px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.auth-input::placeholder {
    color: #8593ad;
}

.auth-input:hover {
    border-color: #7fa7ff;
}

.auth-input:focus {
    border-color: var(--auth-blue);
    box-shadow: 0 0 0 4px rgba(6, 101, 245, 0.1);
}

.auth-input.error {
    border-color: #e5484d;
}

.password-toggle.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    color: #71819e;
    border-radius: 9px;
    cursor: pointer;
    font-size: 18px;
    transition: color 160ms ease;
}

.password-toggle.auth-password-toggle:hover {
    color: #3d4d6b;
}

.password-toggle.auth-password-toggle:focus-visible,
.auth-google:focus-visible,
.auth-submit:focus-visible,
.auth-link:focus-visible {
    outline: 3px solid rgba(6, 101, 245, 0.28);
    outline-offset: 3px;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 2px 0 29px;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #202a3d;
    font-size: 14px;
}

.auth-remember input {
    width: 19px;
    height: 19px;
    margin: 0;
    accent-color: var(--auth-blue);
}

.auth-link {
    color: #005df0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 550;
}

.auth-link:hover {
    color: var(--auth-blue-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-submit {
    width: 100%;
    min-height: 66px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    border: 0;
    border-radius: 12px;
    background: var(--auth-blue);
    color: #ffffff;
    box-shadow: 0 13px 28px rgba(6, 101, 245, 0.24);
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    font-weight: 600;
    transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.auth-submit:hover {
    background: var(--auth-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(6, 101, 245, 0.28);
}

.auth-submit:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.auth-signup {
    margin: 46px 0 0;
    padding-top: 35px;
    border-top: 1px solid #dbe3ef;
    color: #202534;
    text-align: center;
    font-size: 16px;
}

.auth-signup .auth-link {
    margin-left: 8px;
    font-size: 16px;
}

.auth-signup i {
    margin-left: 8px;
    font-size: 12px;
}

.auth-message {
    margin-bottom: 22px;
    padding: 13px 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
}

.auth-message.error-message {
    border: 1px solid #f2b8ba;
    background: #fff5f5;
    color: #9b1c1f;
}

.auth-message.success-message {
    border: 1px solid #9bd7bd;
    background: #f0fbf6;
    color: #12633f;
}

.auth-showcase {
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 43px clamp(42px, 6.6vw, 102px) 0;
    border-left: 1px solid #dce6f4;
    background: #f7faff;
}

.auth-showcase-content {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    max-width: 620px;
    animation: authEnter 580ms 90ms cubic-bezier(.2, .75, .25, 1) both;
}

.auth-eyebrow {
    width: fit-content;
    margin: 0 0 19px;
    padding: 7px 17px;
    border-radius: 999px;
    background: #e8f0ff;
    color: #005df0;
    font-size: 14px;
    font-weight: 500;
}

.auth-showcase h2 {
    margin: 0;
    max-width: 600px;
    color: #101219;
    font-size: clamp(36px, 3.45vw, 50px);
    line-height: 1.05;
    font-weight: 760;
    letter-spacing: -0.048em;
}

.auth-showcase h2 strong {
    display: block;
    color: var(--auth-blue);
    font-weight: inherit;
}

.auth-showcase-copy {
    max-width: 565px;
    margin: 20px 0 24px;
    color: #364666;
    font-size: 17px;
    line-height: 1.65;
}

.auth-benefits {
    display: flex;
    align-items: center;
    gap: 22px;
    padding-bottom: 14px;
}

.auth-benefit {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    color: #111827;
    font-size: 14px;
    line-height: 1.25;
}

.auth-benefit + .auth-benefit {
    padding-left: 22px;
    border-left: 1px solid #7ea6ee;
}

.auth-benefit-icon {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--auth-blue);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(6, 101, 245, 0.2);
}

.auth-showcase-visual {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    margin: 0;
    pointer-events: none;
}

.auth-showcase-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.auth-google-feedback {
    margin: 10px 0 0;
    color: #53627d;
    font-size: 13px;
    text-align: center;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}

@keyframes authEnter {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes authFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@media (max-width: 1180px) {
    .auth-layout {
        grid-template-columns: minmax(410px, 48%) minmax(0, 1fr);
    }

    .auth-form-side {
        padding-inline: 54px;
    }

    .auth-showcase {
        padding-inline: 48px;
    }

    .auth-benefits {
        gap: 14px;
    }

    .auth-benefit + .auth-benefit {
        padding-left: 14px;
    }
}

@media (min-width: 901px) and (max-height: 780px) {
    .auth-showcase-visual {
        transform: translateY(60px);
    }
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: minmax(390px, 52%) minmax(0, 1fr);
    }

    .auth-form-side {
        padding: 38px 34px 46px;
    }

    .auth-showcase {
        padding: 42px 30px 0;
    }

    .auth-showcase h2 {
        font-size: 36px;
    }

    .auth-showcase-copy {
        font-size: 15px;
    }

    .auth-benefits {
        display: grid;
        gap: 10px;
    }

    .auth-benefit + .auth-benefit {
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 720px) {
    .auth-layout {
        height: auto;
        min-height: 100svh;
        display: block;
    }

    .auth-form-side {
        min-height: 100svh;
        align-items: flex-start;
        padding: 36px 22px 38px;
    }

    .auth-form-card {
        max-width: 470px;
        margin: auto;
    }

    .auth-lockup {
        justify-content: center;
        margin-bottom: 34px;
    }

    .auth-lockup img {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .auth-lockup span {
        font-size: 20px;
    }

    .auth-heading {
        margin-bottom: 28px;
        text-align: center;
    }

    .auth-heading h1 {
        font-size: 34px;
    }

    .auth-heading p {
        font-size: 15px;
    }

    .auth-google {
        min-height: 58px;
    }

    .auth-divider {
        margin-block: 23px 26px;
    }

    .auth-field {
        margin-bottom: 20px;
    }

    .auth-input {
        height: 56px;
    }

    .auth-options {
        margin-bottom: 25px;
    }

    .auth-submit {
        min-height: 58px;
        font-size: 17px;
    }

    .auth-signup {
        margin-top: 32px;
        padding-top: 27px;
    }

    .auth-showcase {
        display: none;
    }
}

@media (max-width: 390px) {
    .auth-form-side {
        padding-inline: 17px;
    }

    .auth-heading h1 {
        font-size: 31px;
    }

    .auth-options {
        gap: 12px;
    }

    .auth-remember,
    .auth-link {
        font-size: 13px;
    }

    .auth-signup,
    .auth-signup .auth-link {
        font-size: 14px;
    }
}

/* ===== Componentes compartilhados: seletor mobile, recuperar senha, cadastro ===== */

.auth-email-cta {
    width: 100%;
    min-height: 58px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    border: 0;
    border-radius: 12px;
    background: var(--auth-blue);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(6, 101, 245, 0.22);
    cursor: pointer;
    font: inherit;
    font-size: 17px;
    font-weight: 600;
}

.auth-email-cta:active {
    background: var(--auth-blue-dark);
}

.auth-terms {
    display: none;
    margin: 18px 0 0;
    color: #61708b;
    font-size: 12.5px;
    line-height: 1.55;
    text-align: center;
}

.auth-terms a {
    color: #005df0;
    font-weight: 550;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-solo {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 22px;
    background: #ffffff;
}

.auth-solo .auth-form-card {
    width: min(100%, 440px);
    margin: 0;
}

.auth-solo .auth-lockup {
    justify-content: center;
}

.auth-solo .auth-heading {
    text-align: center;
}

.auth-solo .auth-heading h1 {
    font-size: clamp(28px, 4vw, 34px);
}

.auth-back {
    margin: 30px 0 0;
    text-align: center;
    font-size: 15px;
    color: #202534;
}

.auth-terms-check {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 4px 0 26px;
    color: #202a3d;
    font-size: 13.5px;
    line-height: 1.55;
}

.auth-terms-check input {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    margin: 2px 0 0;
    accent-color: var(--auth-blue);
}

.auth-terms-check a {
    color: #005df0;
    font-weight: 550;
    text-decoration: none;
}

.auth-terms-check a:hover {
    text-decoration: underline;
}

.auth-strength {
    margin-top: 9px;
    font-size: 12.5px;
    color: #61708b;
}

.auth-strength-bar {
    height: 4px;
    margin-bottom: 6px;
    border-radius: 999px;
    background: #e3ebf7;
    overflow: hidden;
}

.auth-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 200ms ease, background-color 200ms ease;
}

.auth-strength-fill.strength-weak { background: #e5484d; width: 25%; }
.auth-strength-fill.strength-fair { background: #f5a524; width: 50%; }
.auth-strength-fill.strength-good { background: #0665f5; width: 75%; }
.auth-strength-fill.strength-strong { background: #17a56b; width: 100%; }

.auth-input.success {
    border-color: #17a56b;
}

@media (max-width: 720px) {
    html.js .auth-heading {
        margin-bottom: 34px;
    }

    html.js .auth-google-note {
        margin-top: 10px;
    }

    html.js .auth-email-cta {
        min-height: 60px;
        margin-top: 18px;
    }

    html.js .auth-terms {
        margin-top: 26px;
    }

    html.js .auth-signup {
        margin-top: 38px;
        padding-top: 30px;
    }

    html.js .auth-email-area {
        display: none;
    }

    html.js .auth-email-area.is-open {
        display: block;
        animation: authEnter 340ms cubic-bezier(.2, .75, .25, 1) both;
    }

    html.js .auth-email-cta {
        display: inline-flex;
    }

    html.js .auth-email-cta.is-hidden,
    html.js .auth-terms.is-hidden {
        display: none;
    }

    html.js .auth-terms {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-google:not(:disabled):not([aria-disabled="true"]):is(:hover, :active) {
        transform: none;
    }

    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
