body {
    min-height: 100vh;
    margin: 0;
    color: #171632;
    background:
        radial-gradient(ellipse at 8% 8%, rgba(229, 222, 255, 0.78), transparent 32%),
        radial-gradient(ellipse at 95% 92%, rgba(213, 243, 123, 0.2), transparent 29%),
        #f8f7fb;
    font-family: "DM Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.auth-page {
    --auth-ink: #171632;
    --auth-muted: #6f6d83;
    --auth-purple: #6747df;
    --auth-purple-dark: #4e31bf;
    --auth-lime: #d5f37b;
    --auth-line: #e8e5f0;
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(28px, 5vw, 72px);
    width: min(1360px, 100%);
    min-height: 100vh;
    margin-inline: auto;
    padding: clamp(24px, 4vw, 54px);
    color: var(--auth-ink);
}

.auth-page,
.auth-page *,
.auth-page *::before,
.auth-page *::after {
    box-sizing: border-box;
}

.auth-page--signup {
    align-items: start;
    grid-template-columns: minmax(0, 0.76fr) minmax(0, 1.24fr);
}

.auth-page > .auth-aside,
.auth-page > .auth-main {
    min-width: 0;
}

.auth-aside {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 620px;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(30px, 4vw, 48px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    color: #fff;
    background: linear-gradient(145deg, #25214a 0%, #191632 58%, #15142c 100%);
    box-shadow: 0 28px 70px rgba(32, 24, 71, 0.18);
}

.auth-aside::before,
.auth-aside::after {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    content: "";
}

.auth-aside::before {
    right: -180px;
    bottom: -205px;
    width: 410px;
    height: 410px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(103, 71, 223, 0.43), rgba(103, 71, 223, 0.08) 57%, transparent 72%);
}

.auth-aside::after {
    inset: 0;
    opacity: 0.2;
    background-image: radial-gradient(rgba(255, 255, 255, 0.36) 0.75px, transparent 0.75px);
    background-size: 21px 21px;
    mask-image: linear-gradient(135deg, #000 0%, transparent 74%);
}

.auth-brand,
.auth-aside-content,
.auth-aside-bottom {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 11px;
    color: #fff;
    font-family: "Manrope", sans-serif;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-decoration: none;
}

.auth-brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(213, 243, 123, 0.28);
    border-radius: 13px;
    color: var(--auth-lime);
    background: rgba(213, 243, 123, 0.12);
    box-shadow: 0 8px 20px rgba(11, 10, 31, 0.18);
}

.auth-aside-content {
    margin-block: auto;
    padding: 58px 0 48px;
}

.auth-aside-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 19px;
    color: #c9c5e1;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.auth-aside-eyebrow span {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--auth-lime);
    box-shadow: 0 0 0 5px rgba(213, 243, 123, 0.12);
}

.auth-aside-content h2 {
    max-width: 520px;
    margin: 0;
    color: #fff;
    font-family: "Manrope", sans-serif;
    font-size: clamp(2.35rem, 4.1vw, 3.65rem);
    font-weight: 800;
    letter-spacing: -0.065em;
    line-height: 1.04;
}

.auth-aside-content h2 span {
    display: block;
    color: var(--auth-lime);
}

.auth-aside-description {
    max-width: 390px;
    margin: 19px 0 0;
    color: #c1bdd6;
    font-size: 0.97rem;
    line-height: 1.75;
}

.auth-aside-features {
    display: grid;
    gap: 13px;
    margin: 27px 0 0;
    padding: 0;
    list-style: none;
}

.auth-aside-features li {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #eeecf7;
    font-size: 0.83rem;
    font-weight: 600;
}

.auth-aside-features i {
    width: 17px;
    color: var(--auth-lime);
    text-align: center;
}

.auth-aside-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 19px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #c2bfd5;
    font-size: 0.74rem;
    line-height: 1.55;
}

.auth-aside-bottom strong {
    color: #fff;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.auth-aside-bottom-mark {
    display: grid;
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
    place-items: center;
    border-radius: 12px;
    color: var(--auth-lime);
    background: rgba(213, 243, 123, 0.12);
}

.auth-aside-visual {
    position: absolute;
    z-index: 0;
    right: 28px;
    bottom: 91px;
    width: 178px;
    height: 178px;
    pointer-events: none;
    opacity: 0.72;
}

.auth-orbit {
    position: absolute;
    display: block;
    border: 1px solid rgba(213, 243, 123, 0.23);
    border-radius: 50%;
}

.auth-orbit--outer {
    inset: 0;
    transform: rotate(-22deg) scaleY(0.72);
}

.auth-orbit--inner {
    inset: 24px;
    border-color: rgba(255, 255, 255, 0.17);
    transform: rotate(38deg) scaleY(0.72);
}

.auth-orbit-star {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(213, 243, 123, 0.3);
    border-radius: 19px;
    color: var(--auth-lime);
    background: rgba(213, 243, 123, 0.11);
    font-size: 1.25rem;
    box-shadow: 0 0 40px rgba(213, 243, 123, 0.12);
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.auth-main-brand {
    display: none;
}

.auth-container {
    width: 100%;
    max-width: 510px;
    padding: clamp(28px, 4vw, 46px);
    border: 1px solid rgba(232, 229, 240, 0.95);
    border-radius: 27px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 28px 80px rgba(32, 24, 71, 0.1), 0 3px 12px rgba(32, 24, 71, 0.035);
}

.auth-container--signup {
    max-width: 820px;
    padding: clamp(25px, 3.25vw, 42px);
}

.auth-header {
    margin: 0 0 27px;
    text-align: left;
}

.auth-kicker {
    margin: 0 0 10px;
    color: var(--auth-purple);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.auth-header h1 {
    margin: 0;
    color: var(--auth-ink);
    font-family: "Manrope", sans-serif;
    font-size: clamp(1.9rem, 3vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1.12;
}

.auth-header > p:last-child {
    margin: 10px 0 0;
    color: var(--auth-muted);
    font-size: 0.91rem;
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 17px;
    margin: 0;
}

.auth-container .form-group {
    min-width: 0;
    margin: 0;
}

.auth-container .form-group label {
    display: block;
    margin: 0 0 8px;
    color: #38354e;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.4;
}

.auth-container .form-group label i {
    width: 17px;
    margin-right: 3px;
    color: var(--auth-purple);
    text-align: center;
}

.auth-container .form-group input:not([type="checkbox"]):not([type="hidden"]),
.auth-container .form-group select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 51px;
    padding: 0 14px;
    border: 1px solid #e4e1ef;
    border-radius: 13px;
    outline: none;
    color: var(--auth-ink);
    background: #fbfaff;
    font: 500 0.91rem "DM Sans", sans-serif;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.auth-container .form-group select {
    cursor: pointer;
}

.auth-container .form-group input::placeholder {
    color: #a09daf;
    opacity: 1;
}

.auth-container .form-group input:focus,
.auth-container .form-group select:focus {
    border-color: #8d76ec;
    outline: 3px solid rgba(103, 71, 223, 0.16);
    outline-offset: 1px;
    background: #fff;
}

.auth-container .form-group small {
    display: block;
    margin-top: 7px;
    color: #7b788c;
    font-size: 0.72rem;
    line-height: 1.55;
}

.auth-container .alert-error,
.auth-container .alert-success {
    margin: 0 0 19px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: 0.84rem;
    line-height: 1.5;
}

.auth-container .alert-error {
    border-color: #f3d5d9;
    color: #9c3447;
    background: #fff6f7;
}

.auth-container .alert-success {
    border-color: #d5ecd9;
    color: #246a3b;
    background: #f2fbf4;
}

.auth-container .alert-success a {
    display: inline-block;
    margin-left: 4px;
    color: #246a3b;
    font-weight: 800;
}

.auth-container .btn-block {
    width: 100%;
}

.auth-container .auth-form > .btn,
.auth-container .auth-form > button[type="submit"] {
    display: inline-flex;
    min-height: 53px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 3px;
    padding: 0 20px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--auth-purple), var(--auth-purple-dark));
    box-shadow: 0 11px 23px rgba(103, 71, 223, 0.22);
    cursor: pointer;
    font: 800 0.92rem "DM Sans", sans-serif;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.auth-container .auth-form > .btn:hover,
.auth-container .auth-form > button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 29px rgba(103, 71, 223, 0.29);
    filter: brightness(1.04);
}

.auth-container .auth-form > .btn:focus-visible,
.auth-container .auth-form > button[type="submit"]:focus-visible,
.auth-page a:focus-visible {
    outline: 3px solid #9b89f3;
    outline-offset: 3px;
}

.auth-footer {
    display: grid;
    gap: 11px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #efedf5;
    color: #777487;
    text-align: center;
}

.auth-footer p {
    margin: 0;
    font-size: 0.81rem;
    line-height: 1.55;
}

.auth-footer a {
    color: var(--auth-purple-dark);
    font-weight: 800;
    text-decoration: none;
}

.auth-footer a:hover {
    color: var(--auth-purple);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-container--signup .auth-header {
    margin-bottom: 24px;
}

.auth-container--signup .auth-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    column-gap: 18px;
    row-gap: 15px;
}

.auth-container--signup .terms-section,
.auth-container--signup .auth-form > .btn,
.auth-container--signup .auth-form > button[type="submit"] {
    grid-column: 1 / -1;
}

.auth-container--signup .terms-section {
    margin: 3px 0 0;
    padding: 14px 15px;
    border: 1px solid #e7e0ff;
    border-radius: 14px;
    background: #f8f6ff;
    box-shadow: none;
    backdrop-filter: none;
}

.auth-container--signup .checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.auth-container--signup .checkbox-wrapper input[type="checkbox"] {
    width: 19px;
    height: 19px;
    min-width: 19px;
    margin: 1px 0 0;
    accent-color: var(--auth-purple);
    cursor: pointer;
}

.auth-container--signup .checkbox-wrapper label {
    flex: 1;
    color: #514e67;
    font-size: 0.8rem;
    line-height: 1.55;
    cursor: pointer;
}

.auth-container--signup .checkbox-wrapper label a {
    color: var(--auth-purple-dark);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-container--signup .checkbox-wrapper label a:hover {
    color: var(--auth-purple);
}

@media (max-width: 980px) {
    .auth-page,
    .auth-page--signup {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 22px;
        width: min(820px, 100%);
        padding: 24px;
    }

    .auth-main {
        order: -1;
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-main-brand {
        display: inline-flex;
        margin: 0 0 14px 2px;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(32, 24, 71, 0.1);
    }

    .auth-main-brand img {
        display: block;
        width: 70px;
        height: 70px;
        border-radius: inherit;
        object-fit: contain;
    }

    .auth-aside {
        order: 1;
        min-height: 0;
        padding: 28px 32px;
        border-radius: 25px;
    }

    .auth-aside-content {
        margin: 0;
        padding: 35px 0 24px;
    }

    .auth-aside-content h2 {
        max-width: 640px;
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .auth-aside-description {
        max-width: 540px;
    }

    .auth-aside-features {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 20px;
        margin-top: 21px;
    }

    .auth-aside-visual {
        right: 22px;
        bottom: 24px;
        opacity: 0.34;
    }

    .auth-main {
        align-items: flex-start;
    }

    .auth-container,
    .auth-container--signup {
        max-width: none;
    }
}

@media (max-width: 620px) {
    .auth-page,
    .auth-page--signup {
        gap: 15px;
        padding: 14px;
    }

    .auth-aside {
        padding: 20px;
        border-radius: 21px;
    }

    .auth-aside > .auth-brand,
    .auth-aside-bottom,
    .auth-aside-visual {
        display: none;
    }

    .auth-brand {
        font-size: 0.94rem;
    }

    .auth-brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }

    .auth-aside-content {
        padding: 14px 0 0;
    }

    .auth-aside-eyebrow {
        margin-bottom: 13px;
        font-size: 0.62rem;
    }

    .auth-aside-content h2 {
        max-width: 420px;
        font-size: clamp(1.9rem, 8vw, 2.55rem);
    }

    .auth-aside-description {
        margin-top: 12px;
        font-size: 0.86rem;
    }

    .auth-aside-features {
        display: grid;
        gap: 9px;
        margin-top: 17px;
    }

    .auth-aside-features li {
        font-size: 0.76rem;
    }

    .auth-aside-visual {
        right: -45px;
        bottom: 31px;
        opacity: 0.22;
    }

    .auth-aside-bottom {
        padding-top: 14px;
        font-size: 0.69rem;
    }

    .auth-container,
    .auth-container--signup {
        padding: 25px 21px;
        border-radius: 22px;
    }

    .auth-header {
        margin-bottom: 22px;
    }

    .auth-header h1 {
        font-size: 1.85rem;
    }

    .auth-form {
        gap: 15px;
    }

    .auth-container--signup .auth-form {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }

    .auth-container--signup .terms-section,
    .auth-container--signup .auth-form > .btn,
    .auth-container--signup .auth-form > button[type="submit"] {
        grid-column: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page *,
    .auth-page *::before,
    .auth-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
