/* Sign in and registration. This page owns its form styling without changing other flows. */
.auth-page {
    padding-block: clamp(32px, 5vw, 72px);
    background: #f3f5f7;
    color: var(--site-ink, #12243a);
}

.auth-page__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
    min-height: 650px;
    overflow: hidden;
    border: 1px solid var(--site-line, #dce2e8);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 22px 60px rgb(18 36 58 / 5%);
}

.auth-page--register .auth-page__grid {
    min-height: 820px;
}

.auth-page__form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: clamp(36px, 5vw, 74px);
}

.auth-page__form-inner {
    width: min(100%, 470px);
}

.auth-page__eyebrow {
    display: block;
    margin-block-end: 17px;
    color: var(--site-blue, #244a80);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.auth-page__form-inner h1 {
    margin: 0;
    color: var(--site-ink, #12243a);
    font-size: clamp(32px, 3.7vw, 48px);
    font-weight: 800;
    line-height: 1.2;
}

.auth-page__intro {
    margin: 16px 0 32px;
    color: var(--site-muted, #536276);
    font-size: 16px;
    line-height: 1.7;
}

.auth-page__alert {
    margin-block-end: 22px;
    padding: 13px 16px;
    border-inline-start: 3px solid var(--site-danger, #a63139);
    border-radius: 6px;
    background: #fff1f2;
    color: #8d2930;
    font-size: 14px;
    line-height: 1.6;
}

.auth-page__alert--success {
    border-color: var(--site-success, #276749);
    background: #eef7f1;
    color: #245b3f;
}

.auth-form {
    display: grid;
    gap: 20px;
}

.auth-form__field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.auth-form__field > label,
.auth-form__country > label {
    color: var(--site-ink, #12243a);
    font-size: 14px;
    font-weight: 800;
}

body.site-page
    .site-main
    .auth-form
    :is(
        input[type="text"],
        input[type="email"],
        input[type="password"],
        input[type="tel"],
        select
    ) {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 11px 15px;
    border: 1px solid #c7d0d9;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    color: var(--site-ink, #12243a);
    font-size: 16px;
    line-height: 1.4;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}

body.site-page
    .site-main
    .auth-form
    :is(
        input[type="text"],
        input[type="email"],
        input[type="password"],
        input[type="tel"],
        select
    ):focus {
    border-color: var(--site-blue, #244a80);
    box-shadow: 0 0 0 3px rgb(36 74 128 / 12%);
}

body.site-page .site-main .auth-form [aria-invalid="true"] {
    border-color: var(--site-danger, #a63139) !important;
}

.auth-form__password {
    position: relative;
}

body.site-page .site-main .auth-form .auth-form__password input {
    padding-inline-end: 58px;
}

.auth-form__password button {
    position: absolute;
    inset-block-start: 6px;
    inset-inline-end: 6px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--site-muted, #536276);
    cursor: pointer;
}

.auth-form__password button:hover {
    background: var(--site-blue-soft, #edf2f8);
    color: var(--site-blue, #244a80);
}

.auth-form__options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    margin-block: 2px 5px;
    font-size: 14px;
}

.auth-form__remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 36px;
    color: var(--site-text, #25384c);
    cursor: pointer;
}

body.site-page .site-main .auth-form .auth-form__remember input {
    width: 17px;
    height: 17px;
    min-height: 0;
    margin: 0;
    accent-color: var(--site-blue, #244a80);
}

.auth-form__options a,
.auth-page__switch a {
    color: var(--site-blue, #244a80);
    font-weight: 800;
    text-decoration: none;
}

.auth-form__options a:hover,
.auth-page__switch a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.auth-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 12px 20px;
    border: 1px solid var(--site-blue, #244a80);
    border-radius: 8px;
    background: var(--site-blue, #244a80);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition:
        background-color 160ms ease,
        transform 160ms ease;
}

.auth-form__submit:hover {
    background: var(--site-blue-hover, #1b3c6c);
    transform: translateY(-1px);
}

.auth-page__switch {
    margin: 26px 0 0;
    padding-block-start: 22px;
    border-block-start: 1px solid var(--site-line, #dce2e8);
    color: var(--site-muted, #536276);
    font-size: 15px;
}

.auth-page__switch a {
    margin-inline-start: 3px;
}

.auth-form__hint,
.auth-form__error {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.auth-form__hint {
    color: var(--site-muted, #536276);
}

.auth-form__error {
    color: var(--site-danger, #a63139);
    font-weight: 700;
}

.auth-form__phone {
    display: grid;
    grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1fr);
    gap: 10px;
    align-items: end;
}

.auth-form__country {
    min-width: 0;
}

.auth-form__country > label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

body.site-page .site-main .auth-form .auth-form__country select {
    padding-inline-end: 30px;
    text-overflow: ellipsis;
    cursor: pointer;
}

.auth-form__country-fallback {
    display: grid;
    place-items: center;
    min-height: 52px;
    border: 1px solid #c7d0d9;
    border-radius: 8px;
    background: #f7f9fb;
    font-weight: 800;
}

body.site-page .site-main .auth-form__phone input[dir="ltr"] {
    text-align: start;
}

.auth-page__story {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    overflow: hidden;
    padding: clamp(36px, 5vw, 68px);
    background: #172f4c;
    color: #fff;
}

.auth-page__story::before {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    width: 96px;
    height: 4px;
    background: var(--site-gold, #b58a3b);
    content: "";
}

.auth-page__story-top,
.auth-page__story-copy,
.auth-page__story-link {
    position: relative;
    z-index: 1;
}

.auth-page__story-top {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d4dce5;
    font-size: 14px;
    font-weight: 800;
}

.auth-page__story-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgb(255 255 255 / 30%);
    border-radius: 50%;
    color: #dfc587;
    font-size: 16px;
}

.auth-page__story-mark img {
    width: 18px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.auth-page__story-copy {
    max-width: 430px;
    margin-block: 70px;
}

.auth-page__story-rule {
    display: block;
    width: 58px;
    height: 2px;
    margin-block-end: 24px;
    background: var(--site-gold, #b58a3b);
}

.auth-page__story h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(34px, 3.6vw, 54px);
    font-weight: 800;
    line-height: 1.22;
}

.auth-page__story p {
    max-width: 390px;
    margin: 22px 0 0;
    color: #d4dce5;
    font-size: 17px;
    line-height: 1.8;
}

.auth-page__story-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    max-width: 100%;
    color: #f1d393;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

.auth-page__story-link:hover {
    color: #fff;
}

[dir="ltr"] .auth-form__submit i,
[dir="ltr"] .auth-page__story-link i {
    transform: scaleX(-1);
}

@media (max-width: 900px) {
    .auth-page__grid,
    .auth-page--register .auth-page__grid {
        display: block;
        width: min(100% - 48px, 620px);
        min-height: 0;
    }

    .auth-page__form-panel {
        padding: clamp(32px, 6vw, 56px);
    }

    .auth-page__story {
        display: none;
    }
}

@media (max-width: 640px) {
    .auth-page {
        padding-block: 20px 32px;
    }

    .auth-page__grid,
    .auth-page--register .auth-page__grid {
        width: min(100% - 32px, 620px);
        border-radius: 10px;
        box-shadow: none;
    }

    .auth-page__form-panel {
        padding: 32px 20px 36px;
    }

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

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

    .auth-form__options {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page * {
        transition-duration: 0.01ms !important;
    }
}
