.auth-page {
    min-height: 100dvh;
    background: #002400;
}

.auth-page .app-shell {
    min-height: 100dvh;
    padding: 0;
}

.auth-page .app-main--auth {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    padding: 0;
}

.auth-screen {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(440px, 0.95fr);
    width: 100%;
    min-height: 100dvh;
    background: #ffffff;
}

.auth-screen__hero {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 28px;
    min-height: 100dvh;
    padding: clamp(28px, 4vw, 54px);
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 196, 0, 0.14), transparent 28%),
        radial-gradient(circle at 88% 92%, rgba(0, 130, 75, 0.34), transparent 30%),
        linear-gradient(145deg, #003000 0%, #001f00 52%, #001600 100%);
    overflow: hidden;
}

.auth-screen__hero::before,
.auth-screen__linework::before,
.auth-screen__linework::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 196, 0, 0.24);
    border-radius: 8px;
    transform: rotate(45deg);
    pointer-events: none;
}

.auth-screen__hero::before {
    right: -120px;
    bottom: -120px;
    width: 260px;
    height: 260px;
}

.auth-screen__linework::before {
    left: -54px;
    bottom: 132px;
    width: 112px;
    height: 112px;
    border-color: rgba(0, 130, 75, 0.5);
}

.auth-screen__linework::after {
    right: 96px;
    bottom: -42px;
    width: 142px;
    height: 142px;
}

.auth-screen__brand,
.auth-screen__copy,
.auth-screen__highlights {
    position: relative;
    z-index: 1;
}

.auth-screen__brand {
    width: clamp(150px, 18vw, 200px);
}

.auth-screen__logo {
    width: 100%;
    height: auto;
}

.auth-screen__copy {
    align-self: center;
    display: grid;
    gap: 14px;
    max-width: 620px;
}

.auth-screen__eyebrow,
.auth-card__eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-screen__eyebrow {
    color: #ffe189;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.08);
}

.auth-screen__copy h1 {
    margin: 0;
    max-width: 12ch;
    color: #ffffff;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 0.96;
    letter-spacing: 0;
}

.auth-screen__copy p {
    margin: 0;
    max-width: 34rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(1rem, 1.2vw, 1.12rem);
    line-height: 1.55;
}

.auth-screen__highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    max-width: 680px;
}

.auth-highlight {
    display: grid;
    gap: 6px;
    min-height: 104px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(14px);
}

.auth-highlight strong {
    color: #ffffff;
    font-size: 0.96rem;
    font-weight: 800;
}

.auth-highlight span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
    line-height: 1.45;
}

.auth-card {
    display: grid;
    align-content: center;
    width: 100%;
    min-height: 100dvh;
    padding: clamp(30px, 5vw, 72px);
    background:
        radial-gradient(circle at 90% 10%, rgba(255, 196, 0, 0.1), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f8faf7 100%);
}

.auth-flow {
    display: grid;
    grid-template-columns: max-content minmax(36px, 1fr) max-content;
    gap: 10px;
    align-items: center;
    width: min(100%, 440px);
    margin-bottom: 34px;
}

.auth-flow__step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b756f;
    font-size: 0.82rem;
    font-weight: 800;
}

.auth-flow__step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #dce4de;
    border-radius: 999px;
    color: #52605a;
    background: #ffffff;
    font-size: 0.78rem;
}

.auth-flow__step.is-complete span,
.auth-flow__step.is-current span {
    color: #ffffff;
    border-color: #00852d;
    background: #00852d;
}

.auth-flow__step.is-complete,
.auth-flow__step.is-current {
    color: #003d12;
}

.auth-flow__line {
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #00852d 0%, #dfe7e1 100%);
}

.auth-card__header {
    display: grid;
    gap: 10px;
    width: min(100%, 440px);
    margin-bottom: 28px;
}

.auth-card__eyebrow {
    color: var(--brand);
    background: #eef6eb;
}

.auth-card__header h2 {
    margin: 0;
    color: #111512;
    font-size: clamp(2rem, 3vw, 2.7rem);
    line-height: 1.03;
    letter-spacing: 0;
}

.auth-card__header p {
    margin: 0;
    color: #56625d;
    font-size: 0.96rem;
    line-height: 1.5;
}

.auth-card .stack-form,
.auth-card .alert {
    width: min(100%, 440px);
}

.auth-card .stack-form {
    display: grid;
    gap: 18px;
}

.auth-card .form-group {
    display: grid;
    gap: 8px;
}

.auth-card .field-label {
    color: #1d2822;
    font-size: 0.84rem;
    font-weight: 800;
}

.field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.field-note {
    color: #6e7974;
    font-size: 0.78rem;
    font-weight: 700;
}

.input-shell {
    position: relative;
}

.input-shell::before {
    position: absolute;
    left: 14px;
    top: 50%;
    z-index: 1;
    width: 18px;
    color: #82908a;
    font-size: 0.92rem;
    line-height: 1;
    text-align: center;
    transform: translateY(-50%);
    pointer-events: none;
}

.input-shell--email::before {
    content: "@";
    font-weight: 800;
}

.input-shell--password::before {
    content: "";
    width: 16px;
    height: 11px;
    border: 1.8px solid #82908a;
    border-radius: 3px;
}

.input-shell--password::after {
    content: "";
    position: absolute;
    left: 18px;
    top: 13px;
    width: 8px;
    height: 8px;
    border: 1.8px solid #82908a;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    pointer-events: none;
}

.auth-card .form-input {
    min-height: 52px;
    border: 1px solid #d7dfda;
    border-radius: 8px;
    background: #ffffff;
    color: #111512;
    font-size: 1rem;
    box-shadow: 0 1px 0 rgba(0, 18, 0, 0.02);
}

.input-shell .form-input {
    padding-left: 44px;
}

.auth-card .form-input:focus {
    outline: none;
    border-color: #00852d;
    box-shadow: 0 0 0 4px rgba(0, 133, 45, 0.12);
}

.field-label--sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-card .button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    border-radius: 8px;
    font-size: 0.98rem;
    font-weight: 850;
}

.auth-card .button.is-loading {
    position: relative;
    pointer-events: none;
    cursor: wait;
}

.auth-card .button.is-loading > * {
    visibility: hidden;
}

.auth-card .button.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2.5px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: auth-button-spin 0.65s linear infinite;
}

@keyframes auth-button-spin {
    to { transform: rotate(360deg); }
}

.auth-button__icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.otp-group {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.form-input--otp-box {
    min-width: 0;
    min-height: 58px;
    padding: 0;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 850;
}

.text-link--back {
    justify-self: center;
    margin-top: 2px;
    color: var(--brand);
    font-size: 0.9rem;
    font-weight: 800;
}

.alert {
    margin-bottom: 18px;
}

@media (max-width: 1080px) {
    .auth-screen {
        grid-template-columns: minmax(0, 0.9fr) minmax(400px, 1fr);
    }

    .auth-screen__copy h1 {
        font-size: clamp(2.1rem, 5vw, 3.3rem);
    }

    .auth-screen__highlights {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

}

@media (max-width: 820px) {
    .auth-screen {
        display: flex;
        flex-direction: column;
        min-height: 100dvh;
        background: #f8faf7;
    }

    .auth-screen__hero {
        grid-template-rows: auto auto;
        gap: 18px;
        min-height: 0;
        padding: 22px 18px 42px;
        border-radius: 0 0 24px 24px;
    }

    .auth-screen__brand {
        width: 142px;
    }

    .auth-screen__copy {
        align-self: start;
        max-width: 28rem;
    }

    .auth-screen__copy h1 {
        max-width: 14ch;
        font-size: 2rem;
        line-height: 1.02;
    }

    .auth-screen__copy p {
        max-width: 28rem;
        font-size: 0.94rem;
    }

    .auth-screen__highlights {
        display: none;
    }

    .auth-card {
        flex: 1 1 auto;
        align-content: start;
        min-height: 0;
        margin-top: 0;
        padding: 22px 18px max(28px, env(safe-area-inset-bottom));
        border-radius: 18px 18px 0 0;
        background: #ffffff;
        box-shadow: 0 -8px 26px rgba(0, 22, 0, 0.1);
    }

    .auth-flow,
    .auth-card__header,
    .auth-card .stack-form,
    .auth-card .alert {
        width: 100%;
    }

    .auth-flow {
        margin-bottom: 22px;
    }

    .auth-card__header {
        margin-bottom: 22px;
    }

    .auth-card__header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 520px) {
    .auth-screen__hero {
        padding: 20px 16px 38px;
    }

    .auth-screen__copy h1 {
        font-size: 1.7rem;
    }

    .auth-screen__copy p {
        font-size: 0.88rem;
    }

    .auth-card {
        padding: 20px 16px max(24px, env(safe-area-inset-bottom));
    }

    .auth-flow__step {
        font-size: 0.76rem;
    }

    .auth-flow__step span {
        width: 24px;
        height: 24px;
    }

    .auth-card__header h2 {
        font-size: 1.55rem;
    }

    .auth-card__header p {
        font-size: 0.88rem;
    }

    .otp-group {
        gap: 7px;
    }

    .form-input--otp-box {
        min-height: 50px;
        font-size: 1.12rem;
    }
}
