/* Регистрация — компактная двухколоночная форма в цветах ЕДС */
.reg-page {
    --reg-blue: #365d9a;
    --reg-blue-deep: #003e7e;
    --reg-green: #2e8b6a;
    --reg-green-hover: #247a5c;
    --reg-border: #d8dee8;
    --reg-bg: #f5f7fb;
    --reg-card: #ffffff;
    --reg-text: #1d2433;
    --reg-muted: #6b7280;
    --reg-danger: #c62828;
    --reg-radius: 14px;
    --reg-focus: rgba(54, 93, 154, 0.22);
    width: 100%;
    max-width: 1040px;
    margin: 0 auto 48px;
    color: var(--reg-text);
    clear: both;
    float: none;
}

.reg-page__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 30px 0 28px;
    flex-wrap: wrap;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    flex: none;
    clear: both;
    float: none;
    box-sizing: border-box;
}

.reg-page__head h1 {
    margin: 0;
    padding-top: 0;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--reg-blue-deep);
    line-height: 1.15;
}

.reg-page__switch {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: #eef3fa;
    color: var(--reg-blue);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    border: 1px solid transparent;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.reg-page__switch:hover {
    background: #fff;
    border-color: var(--reg-border);
    color: var(--reg-blue-deep);
}

.registration_form.reg-form {
    overflow: visible;
    padding-bottom: 0;
    font-size: 15px;
    width: 100%;
    max-width: 100%;
    clear: both;
    float: none;
}

/* Сброс float/half_size из legacy footer.css на страницах регистрации */
.reg-page .registration_form.reg-form .half_size,
.reg-page .registration_form.reg-form .left_side,
.reg-page .registration_form.reg-form .right_side {
    float: none !important;
    width: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.reg-page .registration_form.reg-form section.reg-card {
    float: none;
    width: auto;
}

.reg-form .errorSummary {
    margin: 0 0 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff5f5;
    border: 1px solid #f0c4c4;
    color: var(--reg-danger);
}

.reg-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.reg-card {
    background: var(--reg-card);
    border: 1px solid var(--reg-border);
    border-radius: var(--reg-radius);
    padding: 22px 22px 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.04);
}

.reg-card__title {
    margin: 0 0 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--reg-blue);
}

.reg-field {
    margin-bottom: 14px;
}

.reg-field__label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--reg-muted);
}

.reg-field__label .important,
.reg-form .important {
    color: var(--reg-danger);
    font-weight: 600;
}

.reg-form input.inp,
.reg-form input[type="text"],
.reg-form input[type="password"],
.reg-form input[type="email"],
.reg-form #UserProfile_birthday,
.reg-form #User_verifyCode {
    width: 100% !important;
    max-width: 100% !important;
    height: 46px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 1px solid var(--reg-border) !important;
    border-radius: 12px !important;
    background: var(--reg-bg) !important;
    color: var(--reg-text) !important;
    font-size: 15px !important;
    line-height: 46px !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.reg-form input.inp:focus,
.reg-form input[type="text"]:focus,
.reg-form input[type="password"]:focus,
.reg-form #UserProfile_birthday:focus,
.reg-form #User_verifyCode:focus {
    background: #fff !important;
    border-color: var(--reg-blue) !important;
    box-shadow: 0 0 0 4px var(--reg-focus) !important;
}

.reg-form .registration-fields-login {
    background: var(--reg-bg) !important;
}

.reg-form .reg-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.reg-form .reg-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.reg-gender {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.reg-form #UserProfile_gender input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.reg-form #UserProfile_gender {
    display: flex;
    gap: 8px;
}

.reg-form #UserProfile_gender label,
.reg-form #UserProfile_gender span label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    width: 52px;
    height: 42px;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 999px;
    border: 1px solid var(--reg-border);
    background: var(--reg-bg);
    color: var(--reg-text);
    font-size: 15px;
    font-weight: 600;
    line-height: 42px !important;
    cursor: pointer;
    transition: all .18s ease;
}

.reg-form #UserProfile_gender input[type="radio"]:checked + label,
.reg-form #UserProfile_gender label:has(input:checked) {
    background: #e8f0fb;
    border-color: var(--reg-blue);
    color: var(--reg-blue-deep);
    box-shadow: 0 0 0 3px var(--reg-focus);
}

.reg-email-verify-wrap {
    margin-top: 10px !important;
}

.reg-email-verify-wrap #reg-email-confirm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px !important;
    border: 0;
    border-radius: 999px;
    background: var(--reg-blue) !important;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: none !important;
    transition: background .18s ease, transform .18s ease;
}

.reg-email-verify-wrap #reg-email-confirm-btn:hover:not(:disabled) {
    background: var(--reg-blue-deep) !important;
}

.reg-email-verify-wrap #reg-email-confirm-btn:disabled {
    opacity: 0.75;
    cursor: default;
}

#reg-email-verified-status {
    margin-top: 8px !important;
    font-size: 13px !important;
}

#reg-email-verify-modal > div {
    border-radius: 16px !important;
    padding: 28px !important;
}

#reg-email-verify-modal h3 {
    color: var(--reg-blue-deep);
    font-weight: 600;
}

#reg-email-verify-ok {
    background: var(--reg-green) !important;
    border: 0;
    border-radius: 999px;
    color: #fff !important;
    padding: 8px 18px !important;
}

#reg-email-verify-cancel {
    border-radius: 999px;
    background: #eef2f7 !important;
    border: 0;
    color: var(--reg-text) !important;
    padding: 8px 18px !important;
}

.reg-form__footer {
    margin-top: 20px;
    padding: 22px 24px;
    border-radius: var(--reg-radius);
    background: var(--reg-card);
    border: 1px solid var(--reg-border);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.04);
}

.reg-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
}

.reg-consent input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.reg-consent label,
.reg-consent .ico-h {
    margin: 0 !important;
    line-height: 1.45 !important;
    font-size: 14px;
    color: var(--reg-text);
}

.reg-consent a {
    color: var(--reg-blue);
    text-decoration: underline;
}

.reg-captcha {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.reg-captcha__image {
    flex: 0 0 auto;
}

.reg-captcha__image img {
    display: block;
    border-radius: 10px;
    border: 1px solid var(--reg-border);
    background: #fff;
}

.reg-captcha__field {
    flex: 1 1 220px;
    min-width: 180px;
    max-width: 280px;
}

.reg-form__hint {
    display: block;
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--reg-muted);
}

.reg-form__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reg-form__submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    height: 50px !important;
    padding: 0 28px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--reg-green) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
    box-shadow: 0 8px 20px rgba(46, 139, 106, 0.28) !important;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.reg-form__submit:hover:not(:disabled) {
    background: var(--reg-green-hover) !important;
    transform: translateY(-1px);
}

.reg-form__submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none;
}

.reg-form .tooltip {
    display: none !important;
}

@media (max-width: 900px) {
    .reg-form__grid {
        grid-template-columns: 1fr;
    }

    .reg-page__head h1 {
        font-size: 26px;
    }
}

@media (max-width: 560px) {
    .reg-card {
        padding: 18px 16px 6px;
    }

    .reg-form .reg-row-2,
    .reg-form .reg-row-3 {
        grid-template-columns: 1fr;
    }

    .reg-form__footer {
        padding: 18px 16px;
    }

    .reg-form__submit {
        width: 100%;
        min-width: 0;
    }
}
