@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../assets/fonts/montserrat-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../assets/fonts/montserrat-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --color-primary: #009966;
    --color-primary-dark: #007a55;
    --color-bg-dark: #0f172a;
    --color-text-dark: #10231f;
    --color-text-secondary: #4c5b64;
    --color-text-muted: #2e403b;
    --color-text-light: #4c5b64;
    --color-placeholder: #97a1af;
    --color-white: #ffffff;
    --color-nav-link: rgba(255, 255, 255, 0.70);
    --color-border: #e1e8e4;
    --color-border-input: #d5dfda;
    --color-input-bg: #ffffff;

    --font-family: 'sofia-pro', 'Inter', sans-serif;
    --display: 'Montserrat', 'Inter', sans-serif;
    --ink: #10231f;
    --text: #2e403b;
    --muted: #4c5b64;
    --line: #e1e8e4;
    --bg-soft: #eef5f1;
    --green: #009966;
    --green-600: #008a5c;
    --green-700: #007a55;
    --green-50: #ecf8f2;
    --green-100: #d3f0e2;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    --shadow-card: 0 1px 2px rgba(16, 35, 31, 0.04), 0 24px 48px -24px rgba(16, 35, 31, 0.18);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--color-white);
    color: var(--ink);
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 64px 40px 96px;
}

.auth-title {
    font-family: var(--display);
    font-size: clamp(36px, 3.2vw, 46px);
    font-weight: 650;
    line-height: 1.12;
    white-space: nowrap;
    letter-spacing: -0.025em;
    color: var(--ink);
}

.auth-title em {
    display: block;
    font-style: normal;
    color: var(--green-600);
}

.register-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--display);
    font-size: 13px;
    font-weight: 650;
    background-color: var(--green);
    color: var(--color-white);
}

.step .step-label {
    font-family: var(--display);
    font-size: 14px;
    font-weight: 650;
    color: var(--ink);
}

.step:not(.active) .step-number {
    background-color: var(--color-white);
    color: var(--muted);
    border: 1px solid var(--color-border-input);
}

.step:not(.active) .step-label {
    font-weight: 500;
    color: var(--muted);
}

.step.done .step-number {
    font-size: 0;
}

.step.done .step-number::before {
    content: "";
    width: 10px;
    height: 6px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-1px) rotate(-45deg);
}

.step-line {
    width: 64px;
    height: 1px;
    background-color: var(--color-border-input);
}

.form-card {
    background-color: var(--color-white);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.phone-input-wrapper {
    position: relative;
}

.phone-prefix {
    position: absolute;
    left: 1px;
    top: 1px;
    bottom: 1px;
    width: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 11px 0 0 11px;
    border-right: 1px solid var(--color-border);
    background-color: var(--bg-soft);
    color: var(--color-text-dark);
    font-size: 14px;
    font-weight: 700;
    pointer-events: none;
}

.phone-prefix-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.phone-input-wrapper .phone-input {
    padding-left: 102px;
}

.form-step {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-step[hidden] {
    display: none;
}

.form-step > .form-section-title:first-child {
    margin-top: 0;
}

.step-next {
    margin-top: 6px;
}

.step-actions {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.step-actions .submit-btn {
    flex: 1;
}

.step-back {
    height: 52px;
    padding: 0 26px;
    background-color: var(--color-white);
    color: var(--color-text-dark);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid var(--line);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.step-back:hover {
    border-color: var(--ink);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
}

.optional {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-row .form-group {
    flex: 1;
    min-width: 0;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    background-color: var(--color-input-bg);
    border: 1px solid var(--color-border-input);
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px var(--green-50);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-placeholder);
    font-weight: 400;
}

.form-textarea {
    resize: vertical;
    min-height: 68px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20256%20256%27%20fill%3D%27%25234c5b64%27%3E%3Cpath%20d%3D%27M213.66%2C101.66l-80%2C80a8%2C8%2C0%2C0%2C1-11.32%2C0l-80-80A8%2C8%2C0%2C0%2C1%2C53.66%2C90.34L128%2C164.69l74.34-74.35a8%2C8%2C0%2C0%2C1%2C11.32%2C11.32Z%27%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px 14px;
    padding-right: 44px;
    cursor: pointer;
}

.radio-group {
    display: flex;
    gap: 12px;
}

.radio-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 20px;
    background-color: var(--color-white);
    border: 1px solid var(--color-border-input);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.radio-btn:hover {
    border-color: var(--green);
}

.radio-btn:has(input:focus-visible) {
    outline: 3px solid var(--green-100);
    outline-offset: 2px;
}

.radio-btn input {
    display: none;
}

.radio-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.radio-btn.active,
.radio-btn:has(input:checked) {
    border-color: var(--green);
    box-shadow: inset 0 0 0 1px var(--green);
}

.radio-btn.active .radio-label,
.radio-btn:has(input:checked) .radio-label {
    color: var(--green-700);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--color-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label {
    font-size: 15px;
    font-weight: 400;
    color: var(--text);
    line-height: 1.45;
}

.checkbox-label .link-primary {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    color: var(--color-primary-dark);
    text-decoration: underline;
    text-decoration-color: rgba(0, 122, 85, 0.35);
    text-underline-offset: 3px;
    cursor: pointer;
}

.checkbox-label .link-primary:hover {
    text-decoration-color: currentColor;
}

.checkbox-label .link-primary:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
    border-radius: 4px;
}

.agreements-hint {
    margin-top: -6px;
}

.checkbox-group.is-invalid {
    border-color: #f0b4ae;
    background: #fef6f5;
}

.legal-dialog {
    width: min(560px, calc(100vw - 32px));
    max-height: min(72vh, 620px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: var(--color-white);
    color: var(--text);
    box-shadow: 0 32px 80px -24px rgba(16, 35, 31, 0.35);
    overflow: hidden;
}

.legal-dialog[open] {
    display: flex;
    flex-direction: column;
    animation: legal-dialog-in 0.28s var(--ease);
}

.legal-dialog::backdrop {
    background: rgba(16, 35, 31, 0.45);
    backdrop-filter: blur(2px);
}

@keyframes legal-dialog-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
}

.legal-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 16px 24px;
    border-bottom: 1px solid var(--line);
}

.legal-dialog-title {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 650;
    line-height: 1.3;
    color: var(--ink);
}

.legal-dialog-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--ink);
    cursor: pointer;
}

.legal-dialog-close:hover {
    background: var(--green-100);
}

.legal-dialog-close svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.legal-dialog-body {
    flex: 1;
    min-height: 0;
    padding: 4px 24px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    font-size: 15px;
    line-height: 1.6;
}

.legal-dialog-body h3 {
    margin: 20px 0 6px;
    font-family: var(--display);
    font-size: 15px;
    font-weight: 650;
    color: var(--ink);
}

.legal-dialog-body p + p {
    margin-top: 8px;
}

.legal-dialog-body ul {
    padding-left: 20px;
}

.legal-dialog-body li + li {
    margin-top: 4px;
}

.legal-dialog-foot {
    display: flex;
    justify-content: flex-end;
    padding: 14px 24px;
    border-top: 1px solid var(--line);
}

.legal-dialog-accept {
    height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    background: var(--green);
    color: var(--color-white);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.legal-dialog-accept:hover {
    background: var(--green-700);
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    background-color: var(--green);
    color: var(--color-white);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 10px 24px -10px rgba(0, 153, 102, 0.6);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background-color: var(--green-700);
    transform: translateY(-1px);
}

.submit-btn:focus-visible,
.step-back:focus-visible {
    outline: 3px solid var(--green-100);
    outline-offset: 2px;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-btn .btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.submit-btn .spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.submit-btn .spinner circle {
    stroke-dasharray: 50;
    stroke-dashoffset: 20;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.form-section-title {
    margin: 12px 0 0;
    font-family: var(--display);
    font-size: 16px;
    font-weight: 650;
    color: var(--ink);
}

.register-form > .form-section-title:first-child {
    margin-top: 0;
}

.form-hint {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--muted);
    margin-top: 2px;
}

.required {
    color: #b42318;
    font-weight: 400;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.success,
.form-select.success,
.form-textarea.success {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.address-section {
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 18px;
}

.address-section-title {
    font-family: var(--display);
    font-size: 15px;
    font-weight: 650;
    color: var(--ink);
    margin-bottom: 12px;
}

.address-section .form-row {
    margin-bottom: 12px;
}

.address-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.address-section-header .address-section-title {
    margin-bottom: 0;
}

.same-address-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
}

.same-address-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.form-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding-top: 2px;
}

.footer-text {
    font-size: 15px;
    color: var(--muted);
}

.login-link {
    font-size: 15px;
    font-weight: 600;
    color: var(--green-700);
    text-decoration: none;
    transition: color 0.2s;
}

.login-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.footer--site-footer {
    padding-top: 56px;
    overflow: hidden;
}

.footer--main {
    position: relative;
    isolation: isolate;
}

.footer--main::after {
    content: "devvitrin" / "";
    position: absolute;
    inset: auto 0 0;
    z-index: -1;
    font-family: var(--display);
    font-size: clamp(64px, 16vw, 240px);
    font-weight: 800;
    line-height: 0.74;
    letter-spacing: -0.06em;
    text-align: center;
    color: rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 1150px) {
    .main-content {
        padding: 48px 24px 72px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 32px 16px 56px;
    }

    .auth-title {
        font-size: clamp(30px, 8.5vw, 38px);
    }

    .form-card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .form-row {
        flex-direction: column;
        gap: 14px;
    }

    .address-section {
        padding: 14px;
    }

    .address-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .legal-dialog {
        width: 100%;
        max-width: 100%;
        max-height: 88vh;
        margin: auto 0 0;
        border-radius: 20px 20px 0 0;
    }

    .legal-dialog-head,
    .legal-dialog-foot {
        padding-inline: 20px;
    }

    .legal-dialog-body {
        padding-inline: 20px;
    }

    .legal-dialog-accept {
        width: 100%;
    }

    .progress-steps {
        gap: 10px;
    }

    .step .step-label {
        font-size: 13px;
        white-space: nowrap;
    }

    .step-line {
        width: 20px;
    }

    .radio-btn {
        padding: 10px 12px;
    }

    .radio-label {
        font-size: 14px;
        white-space: nowrap;
    }
}

.main-content {
    display: flex;
    padding: 0;
}

.auth-stage {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    min-height: calc(100vh - 90px);
    padding: clamp(32px, 4vw, 64px) 24px clamp(48px, 5vw, 80px);
    background:
        radial-gradient(50% 40% at 50% 20%, rgba(0, 153, 102, 0.06), transparent 70%),
        #f2f4f3;
}

.auth-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
    width: 100%;
    max-width: clamp(960px, 76vw, 1360px);
    padding: 10px;
    border-radius: 24px;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 35, 31, 0.05), 0 30px 70px -30px rgba(16, 35, 31, 0.3);
}

.auth-visual {
    position: sticky;
    top: 24px;
    height: min(calc(100vh - 48px), 860px);
    min-height: 560px;
    overflow: hidden;
    border-radius: 16px;
    background-color: #dfe5df;
}

.auth-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px clamp(28px, 3.5vw, 56px) 28px;
}

.auth-head {
    text-align: center;
}

.auth-mark {
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto 18px;
}

.auth-title {
    font-size: clamp(30px, 2.3vw, 40px);
    font-weight: 600;
    white-space: nowrap;
    color: #1b293b;
}

.register-page {
    max-width: 560px;
    margin-top: 28px;
    gap: 24px;
}

.form-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    scroll-margin-top: 24px;
}

.auth-legal {
    max-width: 460px;
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    color: #60656c;
}

.auth-legal a {
    font-weight: 600;
    color: #1b293b;
    text-decoration: underline;
    text-decoration-color: rgba(16, 35, 31, 0.3);
    text-underline-offset: 3px;
    white-space: nowrap;
}

.auth-legal a:hover {
    color: var(--green-700);
}

@media (max-width: 900px) {
    .auth-stage {
        padding: 24px 16px 48px;
    }

    .auth-card {
        grid-template-columns: minmax(0, 1fr);
        max-width: 640px;
        border-radius: 26px;
    }

    .auth-visual {
        position: relative;
        top: auto;
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
        border-radius: 18px;
    }

    .auth-visual img {
        object-position: 50% 43%;
    }

    .auth-panel {
        padding: 28px 24px 24px;
    }

    .register-page {
        max-width: none;
    }
}

@media (max-width: 600px) {
    .auth-stage {
        padding: 12px 10px 32px;
    }

    .auth-card {
        padding: 8px;
        border-radius: 22px;
    }

    .auth-visual {
        aspect-ratio: 3 / 1;
        border-radius: 15px;
    }

    .auth-panel {
        padding: 20px 12px 18px;
    }

    .auth-mark {
        display: none;
    }

    .auth-title {
        font-size: 27px;
        white-space: normal;
    }
}

.phone-prefix {
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 84px;
    border-right: 1px solid #dcdfe2;
    border-radius: 0;
    background-color: transparent;
    font-size: 15px;
    font-weight: 600;
}

.phone-prefix-flag {
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(16, 35, 31, 0.08);
}

.form-input {
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-input:hover:not(:focus) {
    border-color: #b9c0c7;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--green-700);
    box-shadow: 0 0 0 3px rgba(0, 153, 102, 0.1);
}

.auth-card {
    grid-template-columns: minmax(0, 1fr);
    max-width: 720px;
    padding: 0;
    border-radius: 24px;
}

.auth-panel {
    padding: 48px clamp(28px, 6vw, 72px) 36px;
}

.register-page {
    max-width: none;
    width: 100%;
}

@media (max-width: 900px) {
    .auth-card {
        max-width: 640px;
    }

    .auth-panel {
        padding: 36px 28px 28px;
    }
}

@media (max-width: 600px) {
    .auth-card {
        padding: 0;
        border-radius: 20px;
    }

    .auth-panel {
        padding: 28px 18px 22px;
    }

    .auth-mark {
        display: block;
        width: 32px;
        height: 32px;
        margin-bottom: 14px;
    }
}

.auth-card--split .auth-visual {
    position: relative;
    top: auto;
    align-self: stretch;
    height: auto;
    min-height: 0;
    overflow: clip;
    padding: 0;
}

@media (min-width: 901px) {
    .auth-card.auth-card--split {
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
        align-items: stretch;
        max-width: clamp(960px, 76vw, 1280px);
        padding: 10px;
    }

    .auth-card--split .auth-mark {
        display: none;
    }

    .auth-card--split .auth-panel {
        padding: 44px clamp(28px, 3.5vw, 56px) 32px;
    }
}

.auth-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: none;
    margin-top: 18px;
    font-size: 14px;
    color: #5b6773;
}

.auth-legal svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    fill: var(--green);
}

.auth-legal a,
.link-btn {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    color: #1b293b;
    text-decoration: underline;
    text-decoration-color: rgba(16, 35, 31, 0.3);
    text-underline-offset: 3px;
    cursor: pointer;
}

.auth-legal a:hover,
.link-btn:hover {
    color: var(--green-700);
}

.auth-title {
    font-weight: 650;
}

.form-group.has-error .form-input,
.form-group.has-error .form-select,
.form-group.has-error .form-textarea,
.form-group.has-error .form-input:focus,
.form-group.has-error .form-select:focus,
.form-group.has-error .form-textarea:focus {
    border-color: #d92d20;
    box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.1);
}

.form-group.has-error .form-hint {
    display: none;
}

.checkbox-group.has-error {
    border-color: #fda29b;
    background: #fef3f2;
}

.field-error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: #b42318;
    animation: field-error-in 0.2s var(--ease) both;
}

.checkbox-group + .field-error {
    margin-top: -6px;
}

.field-error svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    fill: currentColor;
}

@keyframes field-error-in {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }
}

.submit-btn {
    gap: 10px;
}

.submit-btn:disabled {
    cursor: default;
    opacity: 0.85;
}

.btn-loader .spinner {
    width: 18px;
    height: 18px;
    animation: btn-spin 0.8s linear infinite;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-card.auth-card--split .su-panel {
    position: relative;
    align-self: stretch;
    min-height: 0;
    height: auto;
    padding: 0;
    overflow: clip;
    border-radius: 16px;
    background:
        radial-gradient(70% 40% at 20% 100%, rgba(0, 188, 125, 0.22), transparent 70%),
        radial-gradient(50% 35% at 90% 5%, rgba(56, 120, 255, 0.12), transparent 70%),
        linear-gradient(160deg, #13203a 0%, #0f172a 55%, #0b1324 100%);
}

.su-sticky {
    position: sticky;
    top: 10px;
    display: flex;
    flex-direction: column;
    height: min(calc(100vh - 20px), 820px);
    padding: clamp(36px, 3.4vw, 56px);
    color: #ffffff;
}

.su-steps-panel .brand-title {
    max-width: 12ch;
    font-family: var(--display);
    font-size: clamp(32px, 2.8vw, 44px);
    font-weight: 650;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.su-steps-panel .brand-title span {
    display: block;
    color: #34d399;
}

.su-steps {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 34px;
    margin-top: auto;
    list-style: none;
}

.su-steps::before {
    content: "";
    position: absolute;
    top: 24px;
    bottom: 24px;
    left: 23px;
    width: 2px;
    background: rgba(255, 255, 255, 0.12);
}

.su-step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    opacity: 0.5;
    transition: opacity 0.4s var(--ease);
}

.su-step.active {
    opacity: 1;
}

.su-step-no {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: #0f172a;
    font-family: var(--display);
    font-size: 17px;
    font-weight: 650;
    transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.su-step-no b,
.su-step-no svg {
    grid-area: 1 / 1;
}

.su-step-no svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    opacity: 0;
}

.su-step-no .su-end {
    opacity: 1;
}

.su-step.active .su-step-no {
    border-color: #34d399;
    box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.14);
}

.su-step.done .su-step-no {
    border-color: var(--green);
    background: var(--green);
    box-shadow: none;
}

.su-step.done .su-step-no b {
    opacity: 0;
}

.su-step.done .su-step-no svg {
    opacity: 1;
}

.su-step-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.su-step-body strong {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 650;
}

.su-step-body small {
    font-size: 15px;
    color: #a9b6c6;
}

.su-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 32px;
    font-size: 14px;
    color: #a9b6c6;
}

.su-note svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: #34d399;
}

@media (min-width: 901px) {
    .su-steps-variant .progress-steps {
        display: none;
    }
}

@media (max-width: 900px) {
    .auth-card.auth-card--split .su-panel {
        display: none;
    }
}

.su-steps {
    gap: 40px;
}

.su-steps::before {
    display: none;
}

.su-step {
    opacity: 0.45;
    animation: su-step-in 0.7s var(--ease) both;
}

.su-step:nth-child(2) { animation-delay: 0.12s; }
.su-step:nth-child(3) { animation-delay: 0.24s; }

@keyframes su-step-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

.su-step:not(:last-child)::before,
.su-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 52px;
    left: 23px;
    width: 2px;
    height: calc(100% - 56px + 40px);
    border-radius: 2px;
}

.su-step:not(:last-child)::before {
    background: rgba(255, 255, 255, 0.12);
}

.su-step:not(:last-child)::after {
    background: #34d399;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.6s var(--ease) 0.1s;
}

.su-step.done::after {
    transform: scaleY(1);
}

.su-step.done .su-step-no svg {
    animation: su-check 0.45s var(--ease) both;
}

@keyframes su-check {
    0% { opacity: 0; transform: scale(0.3) rotate(-20deg); }
    100% { opacity: 1; transform: none; }
}

.su-step.active:not(.done) .su-step-no {
    animation: su-pulse 2.4s ease-in-out infinite;
}

@keyframes su-pulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.14); }
    50% { box-shadow: 0 0 0 11px rgba(52, 211, 153, 0.06); }
}

.su-step.done .su-step-body small {
    color: #34d399;
}

.su-note strong {
    margin-left: 4px;
    color: #ffffff;
    font-weight: 600;
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    .su-step,
    .su-step.done .su-step-no svg,
    .su-step.active:not(.done) .su-step-no {
        animation: none;
    }

    .su-step:not(:last-child)::after {
        transition: none;
    }
}

.su-steps {
    margin: auto 0;
}

.form-step[data-step="2"] > .form-section-title,
.form-step[data-step="2"] .agreements-hint {
    display: none;
}

.form-step[data-step="2"] .address-section {
    gap: 12px;
    padding: 0;
    border: 0;
    background: none;
}

.form-step[data-step="2"] .address-section-title {
    font-size: 14px;
}

.form-step[data-step="2"] .form-textarea {
    min-height: 0;
    height: 48px;
    resize: vertical;
}

.form-step[data-step="2"] .checkbox-group {
    padding: 2px 0;
    border: 0;
    background: none;
}

.form-step[data-step="2"] .checkbox-group.has-error {
    background: none;
}

@media (min-width: 901px) {
    .register-form {
        display: grid;
    }

    .register-form > .form-step {
        grid-area: 1 / 1;
    }

    .register-form > .form-step[hidden] {
        display: flex !important;
        visibility: hidden;
    }

    .register-form > .form-step[data-step="1"] .step-next,
    .register-form > .form-step[data-step="2"] .step-actions {
        margin-top: auto;
    }

    .register-form > .form-footer {
        grid-area: 2 / 1;
    }
}

.radio-group {
    gap: 10px;
}

.radio-btn {
    min-height: 46px;
    border: 1px solid #dedfdf;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: none;
}

.radio-btn:hover {
    border-color: #c9ced2;
}

.radio-label {
    font-size: 15px;
    color: #1b293b;
}

.radio-btn.active,
.radio-btn:has(input:checked) {
    border-color: var(--green);
    box-shadow: inset 0 -2px var(--green);
}

.auth-card--split .auth-mark,
.auth-mark {
    display: block;
    width: 36px;
    height: 36px;
    margin: 0 auto 16px;
}

.su-step {
    --p: 0;
}

.su-ring {
    position: absolute;
    inset: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    transform: rotate(-90deg);
    pointer-events: none;
}

.su-ring circle {
    fill: none;
    stroke: #34d399;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: calc(100 - var(--p) * 100);
    transition: stroke-dashoffset 0.5s var(--ease);
}

.su-step.done .su-ring {
    opacity: 0;
}

.su-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-style: normal;
    font-size: 13px;
    font-weight: 600;
    color: #34d399;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.su-step.active:not(.done) .su-count {
    opacity: 1;
    transform: none;
}

.su-step.is-complete:not(.done) .su-step-no {
    border-color: #34d399;
    color: #34d399;
}

.su-step.is-complete:not(.done) .su-count::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}

.su-step-no .su-ring {
    position: absolute;
    inset: -3px;
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    opacity: 1;
    animation: none;
}

.su-step.done .su-step-no .su-ring {
    opacity: 0;
}

.su-steps {
    gap: 10px;
}

.su-step {
    align-items: flex-start;
    padding: 16px;
    border: 1px solid transparent;
    border-radius: 16px;
    opacity: 0.55;
    transition: opacity 0.4s var(--ease), background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.su-step.active {
    opacity: 1;
}

.su-step.active:not(.done) {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
}

.su-step:not(:last-child)::before,
.su-step:not(:last-child)::after {
    top: 62px;
    left: 39px;
    height: calc(100% - 48px);
}

.su-step-no,
.su-step.active .su-step-no,
.su-step.active:not(.done) .su-step-no,
.su-step.is-complete:not(.done) .su-step-no {
    width: 46px;
    height: 46px;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    background: #0f172a;
    color: #ffffff;
    box-shadow: none;
    animation: none;
}

.su-step.active:not(.done) .su-step-no {
    border-color: #ffffff;
}

.su-step.done .su-step-no {
    border-color: var(--green);
    background: var(--green);
}

.su-step.done .su-step-no svg {
    animation: su-check 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.su-step-no .su-ring {
    display: none;
}

.su-step-body {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.su-step.done .su-step-body small {
    color: #a9b6c6;
}

.su-count {
    display: none;
    flex-direction: column;
    gap: 7px;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #a9b6c6;
    opacity: 1;
    transform: none;
}

.su-count::before {
    content: "";
    height: 4px;
    border-radius: 4px;
    background:
        linear-gradient(90deg, #00bc7d, #34d399) 0 0 / calc(var(--p) * 100%) 100% no-repeat,
        rgba(255, 255, 255, 0.1);
    transition: background-size 0.5s var(--ease);
}

.su-step.active:not(.done) .su-count {
    display: flex;
    animation: su-count-in 0.4s var(--ease) both;
}

.su-step.is-complete:not(.done) .su-count {
    color: #34d399;
}

.su-step.is-complete:not(.done) .su-count::before {
    box-shadow: none;
    width: auto;
    border-radius: 4px;
}

@keyframes su-count-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
}

.su-step.active:not(.done) .su-count {
    align-items: stretch;
    text-align: left;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: row;
        gap: 12px;
    }

    .form-row > .form-group {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 600px) {
    .form-row:has(#phone) {
        flex-direction: column;
        gap: 14px;
    }

    .progress-steps .step-label {
        font-size: 13px;
    }
}

@media (min-width: 901px) and (max-width: 1150px) {
    .su-sticky {
        padding: 32px 24px;
    }

    .su-steps-panel .brand-title {
        font-size: 30px;
    }

    .su-step {
        padding: 12px;
    }

    .su-step:not(:last-child)::before,
    .su-step:not(:last-child)::after {
        top: 58px;
        left: 35px;
    }

    .su-step-body strong {
        font-size: 16px;
    }

    .su-step-body small {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .auth-legal {
        display: block;
        text-align: center;
        line-height: 1.7;
    }

    .auth-legal svg {
        display: inline-block;
        margin-right: 6px;
        vertical-align: -2px;
    }
}

@media (max-width: 900px) {
    .auth-card.auth-card--split .su-panel {
        display: block;
        height: auto;
        aspect-ratio: auto;
        border-radius: 18px;
    }

    .su-sticky {
        position: relative;
        top: 0;
        height: auto;
        padding: 24px 24px 20px;
    }

    .su-steps-panel .brand-title {
        max-width: none;
        font-size: 24px;
    }

    .su-steps-panel .brand-title span {
        display: inline;
    }

    .su-steps {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin: 18px 0 0;
    }

    .su-step,
    .su-step.active:not(.done) {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px;
        border-radius: 12px;
    }

    .su-step:not(:last-child)::before,
    .su-step:not(:last-child)::after {
        display: none;
    }

    .su-step-no,
    .su-step.active .su-step-no,
    .su-step.active:not(.done) .su-step-no,
    .su-step.is-complete:not(.done) .su-step-no {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .su-step-no svg {
        width: 16px;
        height: 16px;
    }

    .su-step-body strong {
        font-size: 13px;
        line-height: 1.3;
    }

    .su-step-body small,
    .su-note {
        display: none;
    }

    .su-count {
        margin-top: 8px;
        font-size: 11px;
    }

    .su-steps-variant .progress-steps {
        display: none;
    }
}

@media (max-width: 600px) {
    .auth-card--split .auth-mark {
        display: none;
    }

    .su-sticky {
        padding: 20px 16px 16px;
    }

    .su-steps-panel .brand-title {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .su-count {
        font-size: 0;
        gap: 0;
    }
}

@media (max-width: 900px) {
    .auth-card.auth-card--split {
        gap: 12px;
        padding: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .auth-card.auth-card--split .auth-panel {
        border-radius: 22px;
        background: #ffffff;
        box-shadow: 0 1px 2px rgba(16, 35, 31, 0.05), 0 24px 60px -30px rgba(16, 35, 31, 0.3);
    }

    .auth-card.auth-card--split .su-panel {
        border-radius: 18px;
    }

    .su-sticky {
        padding: 16px;
    }

    .su-steps-panel .brand-title {
        font-size: 18px;
        line-height: 1.2;
    }

    .su-steps {
        gap: 6px;
        margin-top: 12px;
    }

    .su-step,
    .su-step.active:not(.done) {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 8px;
        border-radius: 10px;
    }

    .su-step-no,
    .su-step.active .su-step-no,
    .su-step.active:not(.done) .su-step-no,
    .su-step.is-complete:not(.done) .su-step-no {
        width: 24px;
        height: 24px;
        border-width: 1.5px;
        font-size: 11px;
    }

    .su-step-no svg {
        width: 13px;
        height: 13px;
    }

    .su-step-body {
        padding-top: 0;
    }

    .su-step-body strong {
        font-size: 12px;
        line-height: 1.25;
    }

    .su-count {
        margin-top: 5px;
        font-size: 0;
        gap: 0;
    }

    .su-count::before {
        height: 3px;
    }
}

@media (max-width: 600px) {
    .auth-card.auth-card--split .auth-panel {
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    .su-steps {
        display: flex;
    }

    .su-step {
        flex: 0 0 auto;
    }

    .su-step.active:not(.done) {
        flex: 1;
    }

    .su-step:not(.active) .su-step-body,
    .su-step.done .su-step-body {
        display: none;
    }
}

@media (max-width: 480px) {
    .su-steps {
        flex-direction: row;
        align-items: stretch;
    }
}

@media (max-width: 900px) {
    .auth-stage {
        align-items: flex-start;
        padding: 0;
        background: #ffffff;
    }

    .auth-card.auth-card--split {
        gap: 0;
        max-width: none;
    }

    .auth-card.auth-card--split .su-panel {
        border-radius: 0;
    }

    .su-sticky {
        padding: 22px 24px 44px;
    }

    .auth-card.auth-card--split .auth-panel {
        position: relative;
        z-index: 1;
        margin-top: -24px;
        border-radius: 24px 24px 0 0;
        box-shadow: none;
    }
}

@media (max-width: 600px) {
    .su-sticky {
        padding: 20px 16px 40px;
    }

    .auth-card.auth-card--split .auth-panel {
        border-radius: 24px 24px 0 0;
    }
}

@media (max-width: 600px) {
    .auth-card--split .auth-mark {
        display: block;
        width: 36px;
        height: 36px;
        margin-bottom: 14px;
    }
}

@media (max-width: 600px) {
    .auth-card.auth-card--split .auth-panel {
        padding: 22px 18px 20px;
    }

    .auth-card--split .auth-mark {
        width: 30px;
        height: 30px;
        margin-bottom: 10px;
    }

    .auth-title {
        font-size: 24px;
    }

    .register-page {
        margin-top: 18px;
    }

    .register-form,
    .form-step {
        gap: 10px;
    }

    .form-group {
        gap: 4px;
    }

    .form-label {
        font-size: 13px;
    }

    .form-input,
    .form-select {
        height: 44px;
        font-size: 15px;
    }

    .form-textarea {
        font-size: 15px;
    }

    .form-row {
        gap: 10px;
    }

    .form-section-title {
        margin-top: 4px;
        font-size: 15px;
    }

    .form-hint {
        font-size: 12px;
    }

    .radio-btn {
        min-height: 42px;
    }

    .radio-label {
        font-size: 14px;
    }

    .submit-btn,
    .step-back {
        height: 46px;
    }

    .auth-legal {
        margin-top: 12px;
    }
}

@media (max-width: 600px) {
    .auth-card--split .submit-btn,
    .auth-card--split .step-back {
        height: 44px;
        min-height: 0;
        font-size: 15px;
    }

    .auth-card--split .radio-btn {
        min-height: 40px;
        padding-block: 6px;
    }
}

@media (max-width: 900px) {
    .su-sticky {
        padding: 28px 24px 52px;
    }

    .su-steps-panel .brand-title {
        font-size: 24px;
    }

    .su-steps {
        gap: 8px;
        margin-top: 18px;
    }

    .su-step,
    .su-step.active:not(.done) {
        gap: 10px;
        padding: 10px 12px;
        border-radius: 12px;
    }

    .su-step-no,
    .su-step.active .su-step-no,
    .su-step.active:not(.done) .su-step-no,
    .su-step.is-complete:not(.done) .su-step-no {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .su-step-no svg {
        width: 15px;
        height: 15px;
    }

    .su-step-body strong {
        font-size: 14px;
    }

    .su-count {
        margin-top: 7px;
        font-size: 11px;
        gap: 5px;
    }

    .su-count::before {
        height: 4px;
    }
}

@media (max-width: 600px) {
    .su-sticky {
        padding: 26px 18px 50px;
    }

    .su-steps-panel .brand-title {
        font-size: 23px;
    }
}

@media (max-width: 600px) {
    .auth-panel:has(.form-step[data-step="2"]:not([hidden])) .auth-head {
        display: none;
    }

    .auth-panel:has(.form-step[data-step="2"]:not([hidden])) .register-page {
        margin-top: 0;
    }
}

@media (max-width: 600px) and (max-height: 880px) {
    .su-sticky {
        padding: 18px 16px 40px;
    }

    .su-steps-panel .brand-title {
        font-size: 20px;
    }

    .su-steps {
        margin-top: 12px;
    }

    .su-step,
    .su-step.active:not(.done) {
        padding: 8px 10px;
    }

    .su-step-no,
    .su-step.active .su-step-no,
    .su-step.active:not(.done) .su-step-no,
    .su-step.is-complete:not(.done) .su-step-no {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .su-step-body strong {
        font-size: 13px;
    }

    .su-count {
        margin-top: 6px;
        font-size: 0;
        gap: 0;
    }

    .auth-card.auth-card--split .auth-panel {
        padding-top: 18px;
    }

    .auth-card--split .auth-mark {
        width: 26px;
        height: 26px;
        margin-bottom: 8px;
    }

    .auth-title {
        font-size: 22px;
    }

    .register-page {
        margin-top: 14px;
    }
}

@media (max-width: 600px) {
    .form-input,
    .form-select {
        min-height: 0;
        height: 44px;
    }

    .phone-input-wrapper .form-input {
        height: 44px;
    }
}

@media (max-width: 600px) and (max-height: 700px) {
    .form-input,
    .form-select,
    .phone-input-wrapper .form-input {
        height: 42px;
    }

    .form-step[data-step="2"] .form-textarea {
        height: 42px;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .su-sticky {
        padding-inline: max(32px, calc((100% - 600px) / 2));
    }

    .auth-card.auth-card--split .auth-panel {
        padding-inline: max(32px, calc((100% - 600px) / 2));
        padding-top: 36px;
        padding-bottom: 40px;
    }

    .su-steps-panel .brand-title {
        font-size: 28px;
    }

    .su-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .auth-stage {
        align-items: center;
        padding: 40px 32px 56px;
        background: #f2f4f3;
    }

    .auth-card.auth-card--split {
        gap: 0;
        max-width: 640px;
        margin: 0 auto;
        padding: 10px;
        border-radius: 24px;
        background: #ffffff;
        box-shadow: 0 1px 2px rgba(16, 35, 31, 0.05), 0 30px 70px -30px rgba(16, 35, 31, 0.3);
    }

    .auth-card.auth-card--split .su-panel {
        border-radius: 16px;
    }

    .su-sticky {
        padding: 26px 24px 24px;
    }

    .auth-card.auth-card--split .auth-panel {
        margin-top: 0;
        padding: 32px 30px 26px;
        border-radius: 0;
        box-shadow: none;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .su-step-body strong {
        white-space: nowrap;
    }

    .su-steps {
        grid-template-columns: auto auto auto;
        justify-content: start;
    }
}
