html.auth-page {
    overflow: hidden;
}

body.auth-page {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    font-family: var(--auth-new-font, Inter, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    font-size: 15px;
    line-height: 1.2;
    color: var(--auth-new-text, #333333);
}

body.auth-page .wrapper,
body.auth-page .auth-page__wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body.auth-page .content {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0 !important;
    overflow: hidden;
}

.auth-new {
    --auth-new-text: #333333;
    --auth-new-font: Inter, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-family: var(--auth-new-font);
    flex: 0 0 auto;
    width: min(1440px, 100vw, calc(100dvh * 1.6));
    aspect-ratio: 16 / 10;
    box-sizing: border-box;
    background: #fff;
    overflow: hidden;
    color: var(--auth-new-text);
}

.auth-new__layout {
    display: grid;
    grid-template-columns: 563px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 32px 32px 32px 0;
}

.auth-new__form-slot {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 24px 96px 0 96px;
    overflow: visible;
}

.auth-new:has(.auth-new__field--phone) {
    overflow: visible;
}

.auth-new__form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-width: 371px;
}

.auth-new__restore {
    width: 100%;
    max-width: 450px;
}

.auth-new__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 56px;
}

.auth-new__logo {
    display: block;
    flex-shrink: 0;
    line-height: 0;
}

.auth-new__logo img {
    display: block;
    width: 161px;
    height: auto;
}

.auth-new__support {
    margin: 4px 0 0;
    max-width: 200px;
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0;
    color: #999999;
    text-align: right;
}

.auth-new__support-phone {
    color: #333333;
    white-space: nowrap;
}

.auth-new__title {
    margin: 0 0 24px;
    font-size: 36px;
    font-weight: 600;
    line-height: 40px;
    letter-spacing: 0;
}

.auth-new__tabs {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 371px;
    height: 56px;
    margin-bottom: 16px;
    padding: 2px;
    border-radius: 12px;
    background: #0123450D;
    box-sizing: border-box;
    overflow: hidden;
}

.auth-new__tabs:has(.auth-new__tab:first-child.auth-new__tab--active) {
    border-radius: 6px 12px 12px 6px;
}

.auth-new__tabs:has(.auth-new__tab:last-child.auth-new__tab--active) {
    border-radius: 12px 6px 6px 12px;
}

.auth-new__tab {
    flex: 1;
    margin: 0;
    height: 52px;
    padding: 0 24px;
    border: none;
    border-radius: 0;
    background: transparent;
    font-family: var(--auth-new-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0;
    color: var(--auth-new-text);
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.auth-new__tab--active {
    border-radius: 6px;
    background: #fff;
    box-shadow:
        0 1px 4px 0 #00203329,
        0 2px 4px 0 #0020330F;
}

.auth-new__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 0 0 auto;
    min-height: 0;
}

.auth-new__panel {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.auth-new__panel--active {
    display: flex;
}

.auth-new__field {
    display: block;
    width: 100%;
    margin: 0;
}

.auth-new__field--password {
    display: grid;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.auth-new__field--password .auth-new__input,
.auth-new__field--password .auth-new__password-toggle {
    grid-area: 1 / 1;
}

.auth-new__field--password .auth-new__input {
    padding-right: 36px;
}

.auth-new .g-input {
    width: 100%;
    max-width: none;
}

.auth-new__input {
    width: 100%;
    height: 56px;
    margin: 0;
    padding: 15px 12px;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    background: #fff;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0;
    box-sizing: border-box;
}

.auth-new__input::placeholder {
    color: #999999;
    font-weight: 500;
}

.auth-new__input:focus {
    outline: none;
}

.auth-new__field-error,
.auth-new__code-error {
    display: none;
    margin: 8px 0 0;
    padding: 0;
    font-family: var(--auth-new-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0;
    color: #EB5757;
}

.auth-new__field--error .auth-new__input {
    border-color: #EB5757;
}

.auth-new__field--error .auth-new__field-error:not(:empty) {
    display: block;
}

.auth-new__field--password .auth-new__field-error {
    grid-column: 1 / -1;
}

.auth-new__password-toggle {
    position: relative;
    justify-self: end;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.auth-new__password-toggle img {
    display: block;
    width: 24px;
    height: 24px;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.auth-new__password-toggle img.auth-new__password-icon--open {
    display: block;
}

.auth-new__password-toggle img.auth-new__password-icon--slash {
    display: none;
}

.auth-new__password-toggle--revealed img.auth-new__password-icon--open {
    display: none;
}

.auth-new__password-toggle--revealed img.auth-new__password-icon--slash {
    display: block;
}

.auth-new__forgot {
    margin: -4px 0 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0;
}

.auth-new__link {
    color: #8759F2;
    font-size: 13px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 0;
    text-decoration: none;
}

.auth-new__link:hover {
    text-decoration: underline;
}

.auth-new__submit {
    width: 100%;
    height: 56px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: rgba(135, 89, 242, 0.5) !important;
    font-family: var(--auth-new-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0;
    text-align: center;
    color: #fff !important;
    text-transform: none;
    cursor: pointer;
}

a.auth-new__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-decoration: none;
}

a.auth-new__submit:not(.auth-new__submit--ready) {
    pointer-events: none;
}

.auth-new__submit--ready {
    background: #8759F2 !important;
}

.auth-new__register {
    margin: 12px 0 0;
    padding-top: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0;
}

.auth-new__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    margin: 0;
    color: var(--auth-new-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0;
    cursor: pointer;
    box-sizing: border-box;
}

.auth-new__checkbox-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-new__checkbox-box {
    position: relative;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border: 1px solid #ECECEC;
    border-radius: 3.2px;
    background: #fff;
    box-sizing: border-box;
}

.auth-new__checkbox-input:checked + .auth-new__checkbox-box {
    border-color: #8759F2;
    background: #8759F2;
}

.auth-new__checkbox-input:checked + .auth-new__checkbox-box::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7.84px;
    height: 5.68px;
    background: #fff;
    clip-path: polygon(0 44%, 16% 28%, 40% 52%, 84% 0, 100% 16%, 41% 100%);
    transform: translate(-50%, -50%);
}


.auth-new__registration-submit {
    margin-top: 8px;
}

.auth-new__registration-fields > .auth-new__checkbox:first-of-type {
    margin-top: 8px;
}

.auth-new__registration-login {
    margin-top: 12px;
}

@media (min-width: 1100px) {
    html.auth-page:has(.auth-new__registration) {
        overflow-x: hidden;
        overflow-y: auto;
    }

    body.auth-page:has(.auth-new__registration) {
        align-items: flex-start;
        justify-content: flex-start;
        height: auto;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: visible;
    }

    body.auth-page:has(.auth-new__registration) .content {
        align-items: flex-start;
        justify-content: center;
        overflow: visible;
    }

    .auth-new:has(.auth-new__registration) {
        width: min(1440px, 100vw);
        aspect-ratio: auto;
        height: auto;
        overflow: visible;
    }

    .auth-new:has(.auth-new__registration) .auth-new__layout {
        align-items: start;
        height: auto;
    }

    .auth-new:has(.auth-new__registration) .auth-new__form-slot {
        overflow: visible;
        padding-bottom: 32px;
    }

    .auth-new:has(.auth-new__registration) .auth-new__form {
        flex: 0 0 auto;
        overflow: visible;
    }

    /* Высота как на логине — не тянется за длинной формой */
    .auth-new:has(.auth-new__registration) .auth-new__promo {
        align-self: start;
        height: calc(min(1440px, 100vw, calc(100dvh * 1.6)) * 10 / 16 - 64px);
        max-height: calc(100dvh - 64px);
    }

    .auth-new:has(.auth-new__registration) .auth-new__carousel {
        flex: none;
        height: 100%;
    }
}

.auth-new__back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    margin: 0 0 16px;
    color: var(--auth-new-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0;
    text-decoration: none;
}

.auth-new__back:hover {
    text-decoration: none;
}

.auth-new__back-icon {
    display: block;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.auth-new__title--restore {
    margin-bottom: 16px;
    white-space: nowrap;
}

.auth-new__title--success {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    max-width: 360px;
    margin-bottom: 24px;
    line-height: 40px;
}

.auth-new__restore-fields {
    gap: 0;
}

.auth-new__restore-submit {
    margin-top: 24px;
}

.auth-new__password-reset .auth-new__title--restore {
    margin-bottom: 24px;
}

.auth-new__password-reset .auth-new__restore-password-submit {
    margin-top: 8px;
}

.auth-new__field--phone .intl-tel-input {
    display: block;
    width: 100%;
    overflow: visible;
}

.auth-new__field--phone .intl-tel-input input.auth-new__input {
    width: 100%;
    padding-left: 78px;
}

.auth-new__field--phone .intl-tel-input .flag-dropdown {
    top: 0;
    bottom: 0;
    left: 0;
    width: 66px;
    padding: 0;
    border-right: 1px solid #e7e7e7;
}

.auth-new__field--phone .intl-tel-input .flag-dropdown:hover .selected-flag {
    background: transparent;
}

.auth-new__field--phone .intl-tel-input .selected-flag {
    width: 66px;
    padding-left: 16px;
}

.auth-new__field--phone .intl-tel-input .selected-flag .flag {
    margin-top: -6px;
}

.auth-new__field--phone .intl-tel-input .selected-flag .arrow {
    left: 28px;
    border-top-color: #999999;
}

.auth-new__field--phone .intl-tel-input .selected-flag .arrow.up {
    border-bottom-color: #999999;
}

.auth-new__field--phone .intl-tel-input .country-list {
    left: 0;
    width: 371px;
    max-height: 200px;
    margin-top: 6px;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 100;
}

.auth-new__code-note {
    margin: 0 0 32px;
    color: var(--auth-new-text);
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0;
}

.auth-new__code-phone {
    font-weight: 600;
}

.auth-new__code-form {
    gap: 0;
    margin-bottom: 24px;
}

.auth-new__code-form--error .auth-new__code-error:not(:empty) {
    display: block;
}

.auth-new__code-form--error .auth-new__code-cell {
    border-color: #EB5757;
}

.auth-new__code-form--error .auth-new__code-cell--filled,
.auth-new__code-form--error .auth-new__code-cell--filled:focus {
    border-color: #EB5757;
    background: #fff;
    color: #EB5757;
}

.auth-new__code {
    display: flex;
    width: 100%;
    max-width: 328px;
    height: 64px;
    gap: 12px;
}

.auth-new__code-cell {
    flex: 0 0 56px;
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    height: 64px;
    padding: 22px 0;
    border: 1px solid #ECECEC;
    border-radius: 12px;
    background: #F5F5F5;
    color: var(--auth-new-text);
    font-family: var(--auth-new-font);
    font-size: 20px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0;
    text-align: center;
    box-sizing: border-box;
}

.auth-new__code-cell:focus {
    border-color: #ECECEC;
    background: #fff;
    outline: none;
}

.auth-new__code-cell--filled,
.auth-new__code-cell--filled:focus {
    border-color: #8759F2;
    background: #fff;
    color: #8759F2;
    padding: 22px 0;
    font-size: 44px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0;
}

.auth-new__resend {
    margin: 0;
    color: var(--auth-new-text);
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0;
}

.auth-new__resend-time {
    color: #8759F2;
    font-weight: 600;
}

.auth-new__promo {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.auth-new__carousel {
    position: relative;
    flex: 1;
    min-height: 0;
    border-radius: 40px;
    overflow: hidden;
}

.auth-new__slides {
    display: grid;
    width: 100%;
    height: 100%;
}

.auth-new__slide {
    grid-area: 1 / 1;
    position: relative;
    display: none;
    height: 100%;
    min-height: 0;
}

.auth-new__slide--active {
    display: block;
}

.auth-new__slide-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    user-select: none;
}

.auth-new__slide::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: 0 -250px 40px 0 #6C66A68C inset;
    pointer-events: none;
    z-index: 1;
}

.auth-new__slide-copy {
    position: absolute;
    left: 64px;
    right: 64px;
    bottom: 72px;
    z-index: 2;
    color: #fff;
}

.auth-new__slide-title {
    margin: 0 0 16px;
    color: #fff;
    font-size: 40px;
    font-weight: 600;
    line-height: 56px;
    letter-spacing: 0;
}

.auth-new__slide-text {
    max-width: 660px;
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0;
}

.auth-new__pagination {
    position: absolute;
    left: 64px;
    bottom: 36px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-new__pagination-bullet {
    display: block;
    width: 16px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.auth-new__pagination-bullet--active {
    width: 52px;
    background: #fff;
}

@media (max-width: 1099px) {
    html.auth-page {
        overflow-x: hidden;
        overflow-y: auto;
    }

    body.auth-page {
        align-items: flex-start;
        justify-content: flex-start;
        height: auto;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    body.auth-page .wrapper,
    body.auth-page .auth-page__wrapper {
        height: auto;
        min-height: 100dvh;
        max-height: none;
        overflow: visible;
    }

    body.auth-page .content {
        align-items: flex-start;
        justify-content: flex-start;
        overflow: visible;
    }

    .auth-new {
        width: 100%;
        aspect-ratio: auto;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .auth-new__layout {
        grid-template-columns: 1fr;
        justify-items: center;
        align-content: start;
        padding: 32px 24px;
    }

    .auth-new__promo {
        display: none;
    }

    .auth-new__form-slot {
        width: 100%;
        max-width: 371px;
        padding: 24px 0;
        align-items: center;
        overflow: visible;
    }

    .auth-new__form {
        width: 100%;
        margin: 0 auto;
    }

    .auth-new__restore {
        max-width: 100%;
    }

    .auth-new__tabs {
        max-width: 100%;
    }

    .auth-new__tab {
        padding: 0 12px;
        min-width: 0;
    }

    .auth-new__code {
        max-width: 100%;
        gap: min(12px, 2.5vw);
    }

    .auth-new__title--restore {
        white-space: normal;
    }

    .auth-new__code-note {
        white-space: normal;
    }

    .auth-new__field--phone .intl-tel-input .country-list {
        width: min(371px, calc(100vw - 48px));
        max-height: min(200px, calc(100dvh - 200px));
    }
}
