:root {
    --auth-ink: #173238;
    --auth-ink-soft: #456064;
    --auth-coral: #e85d3f;
    --auth-coral-dark: #cc462b;
    --auth-teal: #2f7167;
    --auth-cream: #fff8ed;
    --auth-paper: #fffdf9;
    --auth-line: #e8dfd3;
    --auth-muted: #758381;
    --auth-yellow: #f5c65b;
}

body.auth-page {
    min-height: 100vh;
    display: block;
    padding: 32px;
    color: var(--auth-ink);
    background:
        linear-gradient(rgba(23, 50, 56, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 50, 56, 0.028) 1px, transparent 1px),
        var(--auth-cream);
    background-size: 36px 36px;
    font-family: 'DM Sans', 'Inter', sans-serif;
}

.auth-shell {
    width: min(1120px, 100%);
    min-height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: minmax(330px, 0.9fr) minmax(420px, 1.1fr);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(23, 50, 56, 0.1);
    border-radius: 30px 30px 30px 10px;
    background: rgba(255, 253, 249, 0.94);
    box-shadow: 0 28px 80px rgba(47, 74, 73, 0.13);
}

.auth-story {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 46px;
    overflow: hidden;
    border-right: 1px solid rgba(23, 50, 56, 0.08);
    background:
        radial-gradient(circle at 16% 86%, rgba(245, 198, 91, 0.28), transparent 27%),
        #e9f3ee;
}

.auth-story::after {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    top: -150px;
    right: -120px;
    border-radius: 50%;
    background: rgba(232, 93, 63, 0.12);
}

.auth-brand,
.auth-mobile-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    color: var(--auth-ink);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.auth-brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px 12px 12px 4px;
    color: white;
    background: var(--auth-coral);
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    box-shadow: 0 8px 18px rgba(232, 93, 63, 0.2);
}

.auth-brand small,
.auth-mobile-brand small {
    margin-left: -7px;
    color: var(--auth-coral);
    font-size: 12px;
}

.auth-story-copy {
    position: relative;
    z-index: 1;
    margin: auto 0;
    padding: 72px 0 48px;
}

.auth-kicker {
    display: block;
    margin-bottom: 14px;
    color: var(--auth-teal);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.auth-story h2 {
    max-width: 430px;
    margin-bottom: 20px;
    color: var(--auth-ink);
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(40px, 4vw, 54px);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.03;
}

.auth-story h2 em {
    color: var(--auth-coral);
    font-style: italic;
    font-weight: 600;
}

.auth-story-copy > p {
    max-width: 420px;
    color: var(--auth-ink-soft);
    font-size: 16px;
    line-height: 1.75;
}

.auth-benefits {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    list-style: none;
}

.auth-benefits li {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--auth-ink-soft);
    font-size: 14px;
    font-weight: 600;
}

.auth-benefits span {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--auth-teal);
    background: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

body.auth-page .auth-container {
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px clamp(34px, 6vw, 76px);
    border-radius: 0;
    background: var(--auth-paper);
    box-shadow: none;
}

.auth-shell-register .auth-container {
    justify-content: flex-start;
    padding-top: 42px;
    padding-bottom: 42px;
}

body.auth-page .auth-header {
    margin-bottom: 30px;
    text-align: left;
}

body.auth-page .auth-logo {
    display: none;
}

.auth-mobile-brand {
    display: none;
    margin-bottom: 34px;
}

body.auth-page .auth-title {
    margin-bottom: 8px;
    color: var(--auth-ink);
    font-family: 'Fraunces', Georgia, serif;
    font-size: 36px;
    letter-spacing: -0.035em;
}

body.auth-page .auth-subtitle {
    color: var(--auth-muted);
    font-size: 14px;
}

body.auth-page .auth-subtitle a,
body.auth-page .back-home a,
body.auth-page a.auth-text-link,
body.auth-page .terms-link {
    color: var(--auth-coral-dark);
    font-weight: 700;
}

body.auth-page .form-group {
    margin-bottom: 18px;
}

body.auth-page .form-label {
    margin-bottom: 7px;
    color: var(--auth-ink);
    font-size: 14px;
    font-weight: 700;
}

body.auth-page .form-control {
    min-height: 50px;
    padding: 13px 14px;
    border: 1px solid var(--auth-line);
    border-radius: 11px;
    color: var(--auth-ink);
    background: white;
    font-family: 'DM Sans', 'Inter', sans-serif;
    font-size: 15px;
    box-shadow: 0 1px 0 rgba(23, 50, 56, 0.03);
}

body.auth-page .form-control:hover {
    border-color: #d6c7b7;
}

body.auth-page .form-control:focus {
    border-color: var(--auth-coral);
    box-shadow: 0 0 0 4px rgba(232, 93, 63, 0.1);
}

body.auth-page .remember-me label,
body.auth-page .terms-label {
    color: var(--auth-ink-soft);
}

body.auth-page input[type="checkbox"] {
    accent-color: var(--auth-coral);
}

body.auth-page .btn-submit,
body.auth-page .btn-send-code {
    border-radius: 11px;
    color: white;
    background: var(--auth-coral);
    box-shadow: 0 10px 24px rgba(232, 93, 63, 0.2);
}

body.auth-page .btn-submit:hover,
body.auth-page .btn-send-code:hover {
    background: var(--auth-coral-dark);
    box-shadow: 0 13px 28px rgba(232, 93, 63, 0.26);
}

body.auth-page .btn-verify-code {
    background: var(--auth-teal);
}

body.auth-page .form-hint {
    color: var(--auth-muted) !important;
}

body.auth-page .auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

body.auth-page .remember-me {
    margin-bottom: 0;
}

body.auth-page .back-home {
    margin-top: 22px;
}

.client-login {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--auth-line);
    text-align: center;
}

.client-login p {
    margin-bottom: 10px;
    color: var(--auth-muted);
    font-size: 13px;
}

.client-login a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid rgba(47, 113, 103, 0.2);
    border-radius: 10px;
    color: var(--auth-teal);
    background: #edf6f1;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

body.auth-page .terms-modal-overlay {
    background: rgba(23, 50, 56, 0.36);
    backdrop-filter: blur(5px);
}

body.auth-page .terms-modal {
    border: 1px solid var(--auth-line);
    border-radius: 20px 20px 20px 7px;
    box-shadow: 0 24px 70px rgba(23, 50, 56, 0.18);
}

:focus-visible {
    outline: 3px solid var(--auth-yellow);
    outline-offset: 3px;
}

@media (max-width: 840px) {
    body.auth-page {
        padding: 0;
        background: var(--auth-paper);
    }

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

    .auth-story {
        display: none;
    }

    body.auth-page .auth-container,
    .auth-shell-register .auth-container {
        min-height: 100vh;
        padding: 34px max(22px, calc((100vw - 540px) / 2));
    }

    .auth-mobile-brand {
        display: inline-flex;
    }
}

@media (max-width: 520px) {
    body.auth-page .auth-container {
        padding: 28px 20px;
    }

    body.auth-page .auth-title {
        font-size: 30px;
    }

    body.auth-page .auth-options {
        align-items: flex-start;
    }
}
