.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 18%, rgba(95, 168, 171, .16), transparent 26%),
        radial-gradient(circle at 86% 86%, rgba(50, 52, 143, .12), transparent 30%),
        #f7f9fc;
}

.auth-page button,
.auth-page input {
    font-family: var(--ava-font);
}

.auth-shell {
    width: min(1180px, calc(100% - 48px));
    min-height: min(720px, calc(100vh - 64px));
    display: grid;
    grid-template-columns: minmax(440px, 1fr) minmax(420px, .9fr);
    margin: 32px auto;
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, .72);
    border-radius: 36px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(15, 23, 43, .11);
}

.auth-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 62px clamp(48px, 6vw, 86px);
}

.auth-back {
    position: absolute;
    inset-block-start: 30px;
    inset-inline-start: 34px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ava-neutral-500);
    font-weight: 600;
}

.auth-back svg {
    transform: rotate(180deg);
}

.auth-logo {
    width: 189px;
    height: 56px;
    display: block;
    margin: 0 auto 36px;
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-block-end: 42px;
}

.auth-progress__item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    white-space: nowrap;
}

.auth-progress__item i {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #dbe2ea;
    border-radius: 50%;
    background: #fff;
    font-size: 12px;
    font-style: normal;
    line-height: 1;
}

.auth-progress__item b {
    font-size: 13px;
    font-weight: 600;
}

.auth-progress__item.is-active,
.auth-progress__item.is-complete {
    color: var(--ava-primary-1000);
}

.auth-progress__item.is-active i,
.auth-progress__item.is-complete i {
    border-color: var(--ava-primary-1000);
    background: var(--ava-primary-1000);
    color: #fff;
}

.auth-progress__line {
    width: 54px;
    height: 1px;
    margin-inline: 12px;
    background: #dbe2ea;
}

.auth-step[hidden] {
    display: none !important;
}

.auth-step.is-entering {
    animation: auth-step-in .32s ease both;
}

.auth-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-block-end: 30px;
}

.auth-heading__icon {
    width: 52px;
    height: 52px;
    display: grid;
    flex: 0 0 52px;
    place-items: center;
    border-radius: 17px;
    background: #eff7f7;
    color: var(--ava-secondary-900);
}

.auth-heading h1 {
    margin: 0 0 5px;
    color: #1d1e61;
    font-size: clamp(23px, 2.2vw, 29px);
    line-height: 40px;
    font-weight: 800;
    letter-spacing: -.8px;
}

.auth-heading p {
    margin: 0;
    color: var(--ava-neutral-500);
    font-size: 14px;
    line-height: 26px;
}

.auth-heading p b {
    color: var(--ava-neutral-800);
    font-weight: 700;
}

.auth-form > label,
.otp-fieldset legend {
    display: block;
    margin-block-end: 8px;
    color: var(--ava-neutral-700);
    font-size: 14px;
    font-weight: 650;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap input {
    width: 100%;
    height: 58px;
    padding: 0 18px;
    border: 1px solid #d9e1ea;
    border-radius: 17px;
    background: #fbfcfe;
    color: var(--ava-neutral-900);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-align: left;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-input-wrap input:focus {
    border-color: var(--ava-primary-1000);
    background: #fff;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(50, 52, 143, .09);
}

.auth-input-wrap input.is-invalid {
    border-color: #dc5262;
    box-shadow: 0 0 0 4px rgba(220, 82, 98, .08);
}

.auth-hint {
    display: block;
    margin-block-start: 7px;
    color: var(--ava-neutral-400);
    font-size: 12px;
}

.auth-error,
.auth-success {
    margin: 10px 0 0;
    padding: 8px 11px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 22px;
}

.auth-error {
    background: #fff1f2;
    color: #be3042;
}

.auth-success {
    background: #ecfdf5;
    color: #047857;
}

.auth-error[hidden],
.auth-success[hidden] {
    display: none;
}

.auth-submit {
    width: 100%;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-block-start: 24px;
    border: 0;
    border-radius: 17px;
    background: var(--ava-primary-1000);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 13px 28px rgba(50, 52, 143, .22);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    color: #fff;
    box-shadow: 0 16px 32px rgba(50, 52, 143, .28);
}

.auth-submit:disabled {
    cursor: wait;
    opacity: .65;
}

.auth-submit.is-loading span::after {
    content: "";
    width: 15px;
    height: 15px;
    display: inline-block;
    margin-inline-start: 8px;
    vertical-align: -3px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-block-start-color: #fff;
    border-radius: 50%;
    animation: auth-spin .7s linear infinite;
}

.auth-legal {
    margin: 26px 0 0;
    color: var(--ava-neutral-400);
    font-size: 11.5px;
    line-height: 22px;
    text-align: center;
}

.auth-legal a {
    color: var(--ava-primary-1000);
    font-weight: 650;
}

.otp-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.otp-boxes {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.otp-input {
    width: 100%;
    min-width: 0;
    height: 60px;
    padding: 0;
    border: 1px solid #d9e1ea;
    border-radius: 15px;
    background: #fbfcfe;
    color: var(--ava-neutral-900);
    font-size: 23px;
    font-weight: 700;
    line-height: 60px;
    text-align: center;
    caret-color: var(--ava-primary-1000);
}

.otp-input:focus {
    border-color: var(--ava-primary-1000);
    background: #fff;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(50, 52, 143, .09);
}

.auth-otp-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-block-start: 22px;
}

.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ava-primary-1000);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.auth-link--resend {
    color: var(--ava-neutral-500);
}

.auth-link--resend:not(:disabled) {
    color: var(--ava-secondary-900);
}

.auth-link:disabled {
    cursor: default;
    opacity: .8;
}

.auth-link--resend b {
    min-width: 38px;
    direction: ltr;
    font-weight: 700;
}

.auth-visual {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(29, 30, 97, .94), rgba(50, 52, 143, .86)),
        url("../images/hero-medical.jpg") center / cover;
    color: #fff;
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 24px;
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: 27px;
}

.auth-visual__content {
    position: absolute;
    z-index: 2;
    inset-inline: clamp(48px, 5vw, 76px);
    inset-block-end: 96px;
}

.auth-visual__content span {
    display: inline-flex;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    font-size: 12px;
    backdrop-filter: blur(8px);
}

.auth-visual__content h2 {
    margin: 20px 0 10px;
    font-size: clamp(36px, 4.2vw, 55px);
    line-height: 1.45;
    font-weight: 900;
    letter-spacing: -1.8px;
}

.auth-visual__content p {
    margin: 0;
    color: rgba(255, 255, 255, .7);
    font-size: 14px;
}

.auth-visual__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
}

.auth-visual__orb--one {
    width: 240px;
    height: 240px;
    inset-block-start: -70px;
    inset-inline-end: -45px;
    background: rgba(95, 168, 171, .38);
}

.auth-visual__orb--two {
    width: 130px;
    height: 130px;
    inset-block-start: 100px;
    inset-inline-start: -35px;
    border: 28px solid rgba(255, 255, 255, .06);
}

.auth-visual__pulse {
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 37%;
    width: 100%;
}

@keyframes auth-step-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1fr) 320px;
    }

    .auth-card {
        padding-inline: 42px;
    }

    .auth-visual__content {
        inset-inline: 40px;
    }
}

@media (max-width: 720px) {
    .auth-page {
        background: #fff;
    }

    .auth-shell {
        width: 100%;
        min-height: 100vh;
        display: block;
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-card {
        min-height: 100vh;
        justify-content: flex-start;
        padding: 86px 24px 38px;
    }

    .auth-back {
        inset-block-start: 25px;
        inset-inline-start: 22px;
    }

    .auth-logo {
        margin-block-end: 30px;
    }

    .auth-progress {
        margin-block-end: 38px;
    }

    .auth-progress__item b {
        display: none;
    }

    .auth-progress__line {
        width: 100px;
    }

    .auth-heading {
        margin-block-end: 26px;
    }

    .auth-heading h1 {
        font-size: 23px;
        line-height: 36px;
    }

    .auth-visual {
        display: none;
    }
}

@media (max-width: 374px) {
    .auth-card {
        padding-inline: 18px;
    }

    .otp-boxes {
        gap: 7px;
    }

    .otp-input {
        height: 54px;
        border-radius: 13px;
        font-size: 21px;
    }

    .auth-otp-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-step.is-entering,
    .auth-submit.is-loading span::after {
        animation: none;
    }
}
