:root {
    --auth-green: #08764f;
    --auth-green-dark: #075138;
    --auth-green-soft: #eaf5ef;
    --auth-ink: #172922;
    --auth-muted: #607069;
    --auth-border: #dce5e0;
    --auth-header-height: 72px;
}

.auth-body,
.auth-body * {
    box-sizing: border-box;
}

.auth-body {
    min-width: 280px;
    min-height: 100vh;
    margin: 0;
    background: #f8faf9;
    color: var(--auth-ink);
    font-family: var(--eai-font-family-base);
}

.auth-body.auth-contact-open {
    overflow-x: hidden;
}

.auth-page {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    background: #f7f9f8;
}

.auth-symbols {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.auth-header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--auth-header-height);
    border-bottom: 1px solid rgba(16, 63, 46, 0.1);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 5px 20px rgba(15, 49, 37, 0.045);
    backdrop-filter: blur(12px);
}

.auth-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(calc(100% - 64px), 1320px);
    height: 100%;
    margin: 0 auto;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    width: 88px;
    height: 58px;
    overflow: hidden;
}

.auth-brand img {
    display: block;
    width: 88px;
    height: 58px;
    object-fit: contain;
}

.auth-contact {
    position: relative;
}

.auth-contact__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid rgba(8, 118, 79, 0.72);
    border-radius: 8px;
    background: #fff;
    color: #21362e;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.auth-contact__toggle:hover,
.auth-contact__toggle[aria-expanded="true"] {
    background: var(--auth-green-soft);
    color: var(--auth-green-dark);
    box-shadow: 0 5px 16px rgba(18, 61, 44, 0.09);
}

.auth-contact__toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.auth-contact__toggle .auth-contact__chevron {
    width: 15px;
    height: 15px;
    transition: transform 160ms ease;
}

.auth-contact__toggle[aria-expanded="true"] .auth-contact__chevron {
    transform: rotate(180deg);
}

.auth-contact__popover {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    display: grid;
    z-index: 35;
    width: min(290px, calc(100vw - 24px));
    padding: 9px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(18, 55, 42, 0.16);
    animation: authPopoverIn 150ms ease-out;
}

.auth-contact__popover[hidden] {
    display: none;
}

.auth-contact__popover a,
.auth-contact__option {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 8px 9px;
    border-radius: 7px;
    color: #263a32;
    font-size: 0.8rem;
    text-decoration: none;
}

.auth-contact__popover a:hover {
    background: var(--auth-green-soft);
    color: var(--auth-green-dark);
}

.auth-contact__popover svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.auth-contact__option--disabled {
    color: #648078;
    cursor: default;
}

.auth-contact__option--disabled svg {
    color: #11945f;
}

.auth-contact__option small {
    color: #7a8b85;
    font-size: 0.64rem;
    font-weight: 600;
    text-transform: uppercase;
}

.auth-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-height: calc(100vh - var(--auth-header-height));
    min-height: calc(100svh - var(--auth-header-height));
    padding: clamp(16px, 2.25vh, 26px) 0 18px;
}

.auth-shell {
    width: min(calc(100% - 40px), 1040px);
    margin: 0 auto;
}

.auth-feedback {
    position: fixed;
    top: calc(var(--auth-header-height) + 14px);
    left: 50%;
    z-index: 40;
    display: grid;
    width: min(480px, calc(100% - 32px));
    gap: 8px;
    transform: translateX(-50%);
}

.auth-feedback .alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    box-shadow: 0 14px 34px rgba(16, 46, 35, 0.16);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.4;
    transition: opacity 250ms ease, transform 250ms ease;
}

.auth-feedback .alert svg {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.auth-feedback .alert-danger {
    border-color: #efc7c2;
    background: #fff5f3;
    color: #9b3026;
}

.auth-feedback .alert-success {
    border-color: #bfe3cf;
    background: #f0faf4;
    color: #116b42;
}

.auth-feedback .alert-info {
    border-color: #b9dcd0;
    background: #f0f8f5;
    color: #0b6546;
}

.auth-feedback .fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.auth-card {
    display: grid;
    grid-template-columns: minmax(360px, 0.46fr) minmax(470px, 0.54fr);
    min-height: 590px;
    overflow: hidden;
    border: 1px solid rgba(24, 68, 51, 0.12);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(20, 57, 43, 0.12);
}

.auth-intro {
    position: relative;
    display: flex;
    align-items: center;
    padding: clamp(34px, 4vw, 54px);
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(250, 252, 250, 0.2), rgba(238, 247, 241, 0.12)),
        url("/static/img/fundo_login.png") center bottom / cover no-repeat;
}

.auth-intro__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 355px;
    margin: 0 auto;
}

.auth-intro__logo {
    display: block;
    width: 112px;
    height: 68px;
    object-fit: contain;
}

.auth-intro h1 {
    max-width: 330px;
    margin: 14px 0 0;
    color: var(--auth-green-dark);
    font-family: var(--eai-font-family-heading);
    font-size: clamp(1.85rem, 3vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.auth-intro__content > p {
    max-width: 42ch;
    margin: 14px 0 0;
    color: #43564f;
    font-size: 0.82rem;
    line-height: 1.55;
}

.auth-intro__features {
    display: grid;
    gap: 15px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.auth-intro__features li {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.auth-intro__features li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(224, 241, 231, 0.88);
    color: var(--auth-green);
}

.auth-intro__features svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.auth-intro__features strong,
.auth-intro__features small {
    display: block;
}

.auth-intro__features strong {
    color: #244238;
    font-size: 0.78rem;
    font-weight: 700;
}

.auth-intro__features small {
    margin-top: 2px;
    color: #566861;
    font-size: 0.68rem;
    line-height: 1.35;
}

.auth-forms {
    display: flex;
    min-width: 0;
    padding: clamp(34px, 4vw, 52px) clamp(36px, 4.5vw, 58px);
    flex-direction: column;
    justify-content: center;
}

.auth-forms--recovery {
    align-items: center;
}

.auth-recovery {
    width: 100%;
    max-width: 445px;
}

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

.auth-recovery__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 13px;
    border: 1px solid rgba(8, 118, 79, 0.12);
    border-radius: 50%;
    background: var(--auth-green-soft);
    color: var(--auth-green);
}

.auth-recovery__icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.auth-recovery__eyebrow {
    display: block;
    color: var(--auth-green);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.auth-recovery h2 {
    margin: 8px 0 0;
    color: var(--auth-green-dark);
    font-family: "Urbanist", "Outfit", sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.2rem);
    line-height: 1.08;
}

.auth-recovery__heading p {
    max-width: 40ch;
    margin: 12px auto 0;
    color: var(--auth-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.auth-form--recovery {
    gap: 18px;
}

.auth-recovery__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin-top: 20px;
    color: var(--auth-green);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}

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

.auth-recovery__back svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 48px;
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    background: #f5f7f6;
}

.auth-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: #687670;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.auth-tab + .auth-tab {
    border-left: 1px solid var(--auth-border);
}

.auth-tab svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.auth-tab:hover {
    color: var(--auth-green-dark);
}

.auth-tab:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 2px rgba(8, 118, 79, 0.62);
}

.auth-tab[aria-selected="true"] {
    background: #fff;
    color: var(--auth-green);
    box-shadow: inset 0 -3px 0 var(--auth-green), 0 4px 12px rgba(17, 63, 45, 0.06);
}

.auth-tab[aria-selected="true"]:focus-visible {
    box-shadow:
        inset 0 0 0 2px rgba(8, 118, 79, 0.62),
        inset 0 -3px 0 var(--auth-green),
        0 4px 12px rgba(17, 63, 45, 0.06);
}

.auth-form-panel[hidden] {
    display: none;
}

.auth-form-panel:not([hidden]) {
    animation: authPanelIn 190ms ease-out;
}

.auth-form {
    display: grid;
    gap: 17px;
    margin: 0;
}

.auth-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.auth-field label {
    color: #21342d;
    font-size: 0.78rem;
    font-weight: 700;
}

.auth-field input,
.auth-field select {
    width: 100%;
    min-width: 0;
    height: 47px;
    padding: 10px 13px;
    border: 1px solid #cfd9d4;
    border-radius: 8px;
    background: #fff;
    color: #23372f;
    font: inherit;
    font-size: 0.84rem;
    outline: 0;
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.auth-field input::placeholder {
    color: #8a9691;
}

.auth-field input:hover,
.auth-field select:hover {
    border-color: #aebfb7;
}

.auth-field input:focus,
.auth-field select:focus {
    border-color: var(--auth-green);
    box-shadow: 0 0 0 3px rgba(8, 118, 79, 0.13);
}

.auth-password {
    position: relative;
}

.auth-password input {
    padding-right: 48px;
}

.auth-password button {
    position: absolute;
    top: 50%;
    right: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #71817a;
    cursor: pointer;
    transform: translateY(-50%);
}

.auth-password button:hover {
    background: var(--auth-green-soft);
    color: var(--auth-green-dark);
}

.auth-password svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.auth-password__hide,
.auth-password button[aria-pressed="true"] .auth-password__show {
    display: none;
}

.auth-password button[aria-pressed="true"] .auth-password__hide {
    display: block;
}

.auth-forgot-link {
    justify-self: end;
    margin-top: -3px;
    color: var(--auth-green);
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
}

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

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    margin-top: 4px;
    padding: 11px 18px;
    border: 1px solid var(--auth-green);
    border-radius: 8px;
    background: linear-gradient(90deg, #08744e, #07965f);
    color: #fff;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(8, 118, 79, 0.14);
    transition: filter 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.auth-submit:hover {
    filter: brightness(0.96);
    box-shadow: 0 11px 24px rgba(8, 118, 79, 0.2);
    transform: translateY(-1px);
}

.auth-submit svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.auth-register-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.auth-field--wide {
    grid-column: 1 / -1;
}

.auth-trust-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(92%, 900px);
    margin: 22px auto 0;
    padding: 0;
    list-style: none;
}

.auth-trust-strip li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 8px 24px;
}

.auth-trust-strip li + li {
    border-left: 1px solid #d8e1dd;
}

.auth-trust-strip svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: var(--auth-green);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.auth-trust-strip strong,
.auth-trust-strip span {
    display: block;
}

.auth-trust-strip strong {
    color: #263a32;
    font-size: 0.72rem;
    font-weight: 700;
}

.auth-trust-strip span {
    margin-top: 2px;
    color: #67766f;
    font-size: 0.64rem;
    line-height: 1.35;
}

@keyframes authPopoverIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 1050px) {
    .auth-card {
        grid-template-columns: minmax(330px, 0.43fr) minmax(430px, 0.57fr);
        min-height: 560px;
    }

    .auth-intro {
        padding: 34px;
    }

    .auth-forms {
        padding: 34px 40px;
    }
}

@media (max-width: 900px) {
    .auth-main {
        align-items: flex-start;
    }

    .auth-shell {
        width: min(calc(100% - 32px), 720px);
    }

    .auth-card {
        grid-template-columns: 1fr;
    }

    .auth-intro {
        min-height: 310px;
        background-position: center 72%;
    }

    .auth-intro__content {
        max-width: none;
    }

    .auth-intro__logo {
        width: 96px;
        height: 60px;
    }

    .auth-intro h1 {
        max-width: 520px;
        font-size: clamp(1.75rem, 5vw, 2.2rem);
    }

    .auth-intro__content > p {
        max-width: 62ch;
    }

    .auth-intro__features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .auth-intro__features li {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 9px;
    }

    .auth-intro__features li > span {
        width: 38px;
        height: 38px;
    }

    .auth-forms {
        padding: 36px clamp(28px, 6vw, 52px) 42px;
    }

    .auth-trust-strip {
        width: 100%;
    }
}

@media (max-width: 620px) {
    :root {
        --auth-header-height: 66px;
    }

    .auth-header__inner {
        width: calc(100% - 28px);
    }

    .auth-brand,
    .auth-brand img {
        width: 76px;
        height: 50px;
    }

    .auth-contact__toggle {
        min-height: 40px;
        padding: 7px 10px;
        font-size: 0.76rem;
    }

    .auth-contact__toggle .auth-contact__chevron {
        display: none;
    }

    .auth-main {
        padding: 18px 0 24px;
    }

    .auth-shell {
        width: calc(100% - 24px);
    }

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

    .auth-intro {
        min-height: 350px;
        padding: 28px 24px;
        background-position: center bottom;
    }

    .auth-intro__logo {
        width: 92px;
        height: 58px;
    }

    .auth-intro h1 {
        margin-top: 10px;
        font-size: clamp(1.65rem, 8vw, 2rem);
    }

    .auth-intro__content > p {
        font-size: 0.79rem;
    }

    .auth-intro__features {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 20px;
    }

    .auth-intro__features li {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .auth-intro__features li > span {
        width: 36px;
        height: 36px;
    }

    .auth-intro__features svg {
        width: 19px;
        height: 19px;
    }

    .auth-forms {
        padding: 28px 20px 32px;
    }

    .auth-tabs {
        margin-bottom: 22px;
    }

    .auth-tab {
        padding: 9px 8px;
        font-size: 0.76rem;
    }

    .auth-register-grid {
        grid-template-columns: 1fr;
    }

    .auth-field--wide {
        grid-column: auto;
    }

    .auth-trust-strip {
        grid-template-columns: 1fr;
        margin-top: 18px;
    }

    .auth-trust-strip li {
        padding: 10px 18px;
    }

    .auth-trust-strip li + li {
        border-top: 1px solid #d8e1dd;
        border-left: 0;
    }
}

@media (max-width: 390px) {
    .auth-contact__toggle span {
        max-width: 88px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .auth-contact__popover {
        right: -2px;
    }

    .auth-intro {
        padding-right: 20px;
        padding-left: 20px;
    }

    .auth-forms {
        padding-right: 16px;
        padding-left: 16px;
    }
}

@media (min-width: 901px) and (max-height: 760px) {
    .auth-main {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .auth-card {
        min-height: 465px;
    }

    .auth-intro {
        padding: 28px 38px;
    }

    .auth-intro__logo {
        width: 92px;
        height: 56px;
    }

    .auth-intro h1 {
        margin-top: 9px;
        font-size: 1.8rem;
    }

    .auth-intro__content > p {
        margin-top: 9px;
    }

    .auth-intro__features {
        gap: 10px;
        margin-top: 17px;
    }

    .auth-intro__features li > span {
        width: 37px;
        height: 37px;
    }

    .auth-forms {
        padding-top: 27px;
        padding-bottom: 27px;
    }

    .auth-tabs {
        min-height: 44px;
        margin-bottom: 18px;
    }

    .auth-form {
        gap: 13px;
    }

    .auth-register-grid {
        gap: 11px 14px;
    }

    .auth-field {
        gap: 5px;
    }

    .auth-field input,
    .auth-field select {
        height: 43px;
    }

    .auth-submit {
        min-height: 46px;
    }

    .auth-trust-strip {
        margin-top: 12px;
    }

    .auth-trust-strip li {
        padding-top: 5px;
        padding-bottom: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
