:root {
    --auth-bg: #f5f2ec;
    --auth-panel: #fbfaf7;
    --auth-ink: #24231f;
    --auth-muted: #7b766e;
    --auth-line: #d9d4cb;
    --auth-soft: #ece8e0;
    --auth-error: #9b3838;
    --auth-success: #4f6756;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background: var(--auth-bg);
    color: var(--auth-ink);
    font-family: Tahoma, Arial, sans-serif;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(520px, .92fr);
    background: #d2ccc1;
}


/* ============================================================
   VISUAL
   ============================================================ */

.auth-visual {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: url('/assets/img/auth/auth-cover.jpg') center center / cover no-repeat, #81796e;
    color: #fff;
}

.auth-visual__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( 180deg, rgba(10, 10, 9, .18), rgba(10, 10, 9, .06) 38%, rgba(10, 10, 9, .54) );
}

.auth-visual__brand {
    position: absolute;
    z-index: 2;
    top: 42px;
    left: 48px;
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-logo,
.mobile-logo__mark {
    width: 42px;
    height: 42px;
    border: 1px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-size: 26px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .brand-text strong,
    .mobile-logo strong {
        font: 500 11px/1 Arial, sans-serif;
        letter-spacing: .26em;
    }

    .brand-text span,
    .mobile-logo span {
        font: 400 7px/1 Arial, sans-serif;
        letter-spacing: .22em;
        opacity: .72;
    }

.auth-visual__content {
    position: absolute;
    z-index: 2;
    left: 7vw;
    bottom: 9vh;
    max-width: 600px;
}

.visual-caption {
    display: block;
    margin-bottom: 18px;
    font: 500 9px/1 Arial, sans-serif;
    letter-spacing: .34em;
}

.auth-visual__content h1 {
    margin: 0 0 20px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(58px, 6vw, 105px);
    line-height: .94;
    font-weight: 400;
    letter-spacing: -.035em;
}

.auth-visual__content p {
    margin: 0;
    font-size: 12px;
    line-height: 2;
    opacity: .84;
}


/* ============================================================
   PANEL
   ============================================================ */

.auth-panel {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    background: var(--auth-panel);
    display: flex;
    flex-direction: column;
}

.auth-panel__content {
    width: min(560px, calc(100% - 80px));
    margin: auto;
    padding: 90px 0 70px;
}

.desktop-close {
    position: absolute;
    top: 36px;
    left: 38px;
    width: 38px;
    height: 38px;
}

    .desktop-close span {
        position: absolute;
        top: 18px;
        left: 7px;
        width: 24px;
        height: 1px;
        background: #34312c;
    }

        .desktop-close span:first-child {
            transform: rotate(45deg);
        }

        .desktop-close span:last-child {
            transform: rotate(-45deg);
        }

.mobile-header {
    display: none;
}


/* ============================================================
   STEPS
   ============================================================ */

.auth-step {
    display: none;
}

    .auth-step.is-active {
        display: block;
        animation: authStepIn .3s ease;
    }

@keyframes authStepIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.auth-heading {
    margin-bottom: 42px;
}

.auth-heading__eyebrow {
    display: block;
    margin-bottom: 14px;
    color: #8e887f;
    direction: ltr;
    text-align: right;
    font: 500 8px/1 Arial, sans-serif;
    letter-spacing: .3em;
}

.auth-heading h2,
.auth-success h2 {
    margin: 0 0 15px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(36px, 4vw, 54px);
    line-height: 1.2;
    font-weight: 400;
}

.auth-heading p {
    max-width: 480px;
    margin: 0;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 2;
}

.auth-heading strong {
    color: var(--auth-ink);
    font-weight: 500;
}


/* ============================================================
   FORM
   ============================================================ */

.field {
    margin-bottom: 28px;
}

    .field label {
        display: block;
        margin-bottom: 10px;
        color: #5f5b54;
        font-size: 10px;
    }

    .field input {
        width: 100%;
        height: 56px;
        padding: 0 15px;
        border: 0;
        border-bottom: 1px solid #aaa59c;
        border-radius: 0;
        outline: none;
        background: transparent;
        color: var(--auth-ink);
        font-size: 14px;
        transition: border-color .2s ease;
    }

        .field input:focus {
            border-bottom-color: #111;
        }

.input-wrapper {
    position: relative;
}
/*
.input-wrapper--phone input {
    padding-left: 62px;
    text-align: left;
}*/

.input-prefix {
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    padding-right: 15px;
    border-right: 1px solid var(--auth-line);
    color: #8b867e;
    direction: ltr;
    font-size: 11px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-message {
    min-height: 22px;
    margin-top: -11px;
    margin-bottom: 11px;
    color: var(--auth-error);
    font-size: 10px;
    line-height: 1.8;
}

    .form-message.is-success {
        color: var(--auth-success);
    }

.auth-submit {
    position: relative;
    width: 100%;
    height: 55px;
    padding: 0 22px;
    border: 0;
    border-radius: 0;
    background: #242320;
    color: #fff;
    cursor: pointer;
    font-size: 11px;
    transition: background .2s ease, opacity .2s ease;
}

    .auth-submit:hover {
        background: #000;
    }

    .auth-submit:disabled {
        opacity: .62;
        cursor: default;
    }

.button-loader {
    display: none;
    width: 17px;
    height: 17px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.auth-submit.is-loading > span:first-child {
    display: none;
}

.auth-submit.is-loading .button-loader {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-terms {
    margin-top: 25px;
    color: #8a857d;
    text-align: center;
    font-size: 9px;
    line-height: 2;
}

    .auth-terms a {
        color: #44413c;
        text-underline-offset: 4px;
    }


/* ============================================================
   OTP
   ============================================================ */

.otp-code-input {
    letter-spacing: .55em;
    text-align: center;
    font-size: 25px !important;
    direction: ltr;
}

.otp-options {
    margin: -5px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #68635d;
    cursor: pointer;
    font-size: 9px;
}

    .link-button:disabled {
        color: #aaa69f;
        cursor: default;
    }


/* ============================================================
   PROFILE
   ============================================================ */

.gender-options {
    min-height: 56px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.gender-option {
    margin: 0 !important;
    position: relative;
}

    .gender-option input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .gender-option span {
        height: 52px;
        border: 1px solid var(--auth-line);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #6e6961;
        cursor: pointer;
        font-weight: bold;
        font-size: 17px;
        transition: border-color .2s ease, background .2s ease, color .2s ease;
    }

    .gender-option input:checked + span {
        border-color: #242320;
        background: #242320;
        color: #fff;
    }

.skip-profile-button {
    width: 100%;
    margin-top: 14px;
    padding: 13px;
    border: 0;
    background: transparent;
    color: #77726b;
    cursor: pointer;
    font-size: 10px;
}

    .skip-profile-button:hover {
        color: #111;
    }


/* ============================================================
   SUCCESS
   ============================================================ */

.auth-success {
    text-align: center;
    padding: 50px 0;
}

.success-mark {
    width: 66px;
    height: 66px;
    margin: 0 auto 28px;
    border: 1px solid var(--auth-ink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .success-mark svg {
        width: 27px;
        height: 27px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.5;
    }

.auth-success .auth-heading__eyebrow {
    text-align: center;
}

.auth-success p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 12px;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 1050px) {

    .auth-page {
        grid-template-columns: .8fr 1.2fr;
    }

    .auth-panel__content {
        width: min(520px, calc(100% - 54px));
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 767px) {

    body {
        background: var(--auth-panel);
    }

    .auth-page {
        display: block;
        min-height: 100svh;
        background: var(--auth-panel);
    }

    .auth-visual {
        display: none;
    }

    .auth-panel {
        min-height: 100svh;
    }

    .desktop-close {
        display: none;
    }

    .mobile-header {
        min-height: 75px;
        padding: 0 16px;
        border-bottom: 1px solid #e5e1da;
        display: grid;
        grid-template-columns: 40px 1fr 40px;
        align-items: center;
    }

    .header-action {
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--auth-ink);
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
    }

        .header-action svg {
            width: 19px;
            height: 19px;
            fill: none;
            stroke: currentColor;
            stroke-width: 1.5;
        }

    .mobile-logo {
        justify-self: center;
        color: var(--auth-ink);
        display: flex;
        align-items: center;
        gap: 9px;
        text-decoration: none;
        direction: ltr;
    }

    .mobile-logo__mark {
        width: 34px;
        height: 34px;
        font-size: 21px;
    }

    .mobile-logo > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .mobile-logo strong {
        font-size: 8px;
    }

    .mobile-logo span {
        font-size: 6px;
    }

    .auth-panel__content {
        width: calc(100% - 36px);
        padding: 54px 0 45px;
    }

    .auth-heading {
        margin-bottom: 34px;
    }

        .auth-heading h2,
        .auth-success h2 {
            font-size: 36px;
        }

        .auth-heading p {
            font-size: 11px;
        }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .field {
        margin-bottom: 24px;
    }

        .field input {
            height: 53px;
        }

    .gender-options {
        min-height: 52px;
    }

    .gender-option span {
        height: 49px;
    }

    .auth-submit {
        height: 53px;
    }
}

@media (max-width: 390px) {

    .auth-panel__content {
        width: calc(100% - 28px);
    }

    .auth-heading h2,
    .auth-success h2 {
        font-size: 32px;
    }
}
