:root {
    --register-text: #4d566b;
    --register-muted: #667085;
    --register-input: #fff;
    --register-border: #dce2ec;
    --register-soft: #f2f5fb;
    --register-error: #b42318;
    --register-success: #187347;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --register-text: #d2d5e3;
    --register-muted: #a7adbf;
    --register-input: #202031;
    --register-border: #42445a;
    --register-soft: #252638;
    --register-error: #ffaaa2;
    --register-success: #83d9ae;
}

.register-page {
    color: var(--register-text);
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}
.register-page .fxt-content-wrap { height: 100%; min-height: 0; }
.register-page [hidden] { display: none !important; }
.register-page .fxt-heading-content { height: 100%; align-items: flex-start; }
.register-page .fxt-heading-content > .fxt-inner-wrap {
    height: min(680px, calc(100vh - 60px));
    height: min(680px, calc(100dvh - 60px));
    min-height: 0;
}
.register-page .fxt-form-content { height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
.register-page .fxt-heading-content .fxt-switcher-description .fxt-switcher-text { color: #9ccc64; }
.register-page .fxt-logo img { width: 100%; max-width: 330px; }
.register-page .fxt-form-content .fxt-main-form {
    height: auto;
    min-height: 100%;
    padding: 44px clamp(24px, 4vw, 65px);
    align-items: flex-start;
    justify-content: center;
}
.register-page .fxt-form-content .fxt-inner-wrap { max-width: 580px; }
.register-page .fxt-form-content .fxt-page-title { margin-bottom: 8px; }
.register-page .fxt-form-content .fxt-description {
    color: var(--register-muted);
    font-size: 15px;
    margin-bottom: 24px;
}
.register-page fieldset { min-width: 0; padding: 0; border: 0; margin: 0; }
.register-page .register-type {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 5px;
    gap: 5px;
    background: var(--register-soft);
    border: 1px solid var(--register-border);
    border-radius: 12px;
    margin-bottom: 28px;
}
.register-type label { position: relative; cursor: pointer; }
.register-type input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.register-type span {
    display: block;
    text-align: center;
    border-radius: 8px;
    padding: 9px 12px;
    color: var(--register-muted);
}
.register-type input:checked + span { background: var(--register-input); color: var(--title-color); font-weight: 700; }
.register-page :focus-visible { outline: 3px solid #688aff; outline-offset: 3px; }
.register-type input:focus-visible + span { outline: 3px solid #688aff; outline-offset: 1px; }
.register-page .register-section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--title-color);
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--register-border);
}
.register-page .register-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; }
.register-page .register-full { grid-column: 1 / -1; }
.register-page .fxt-form-content .form-group { margin-bottom: 18px; min-width: 0; }
.register-page .fxt-form-content .fxt-label { font-size: 14px; margin-bottom: 7px; }
.register-page .fxt-form-content .form-control {
    width: 100%;
    min-height: 46px;
    background-color: var(--register-input);
    color: var(--register-text);
    border-color: var(--register-border);
    box-shadow: none;
    font-size: 14px;
    border-radius: 8px;
}
.register-page .fxt-form-content .form-control::placeholder { color: var(--register-muted); }
.register-page .fxt-form-content .form-control:focus { border-color: #688aff; box-shadow: 0 0 0 3px #688aff22; }
.register-page .fxt-form-content .form-control[aria-invalid="true"] { border-color: var(--register-error); }
.register-page textarea.form-control { min-height: 88px; resize: vertical; }
.register-page .field-help, .register-page .field-error { font-size: 12px; line-height: 1.6; margin: 5px 0 0; }
.register-page .field-help { color: var(--register-muted); }
.register-page .field-error { color: var(--register-error); }
.register-page .verification-row { display: flex; gap: 10px; align-items: stretch; }
.register-page .verification-row .form-control { flex: 1; min-width: 0; }
.register-page .captcha-refresh {
    width: 136px;
    flex-shrink: 0;
    border: 1px solid var(--register-border);
    border-radius: 8px;
    background: #fff;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}
.register-page .captcha-refresh img { display: block; width: 100%; height: 44px; object-fit: contain; color: #444; font-size: 12px; }
.register-page .sms-button {
    width: 136px;
    flex-shrink: 0;
    border: 1px solid var(--color-primary);
    background: var(--register-input);
    color: var(--title-color);
    border-radius: 8px;
    padding: 8px;
    font-size: 13px;
    cursor: pointer;
}
.register-page button:disabled, .register-page fieldset:disabled { opacity: .65; }
.register-page button:disabled { cursor: not-allowed; }
.register-page .register-agreement { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.register-agreement input { margin-top: 5px; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--color-primary); }
.register-page .register-status {
    border: 1px solid var(--register-border);
    background: var(--register-soft);
    padding: 10px 12px;
    border-radius: 8px;
    margin: 0 0 18px;
    font-size: 14px;
    overflow-wrap: anywhere;
}
.register-status[data-kind="error"] { color: var(--register-error); }
.register-status[data-kind="success"] { color: var(--register-success); }
.register-page .register-actions { display: flex; align-items: center; gap: 16px; }
.register-page .reset-button { padding: 10px 0; border: 0; background: transparent; color: var(--register-muted); flex-shrink: 0; cursor: pointer; }
.register-page .register-login { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--register-muted); }
.register-login a { color: var(--title-color); }
.register-page .register-form-wrap { animation: register-enter .5s ease-out; }
@keyframes register-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1199px) and (min-width: 992px) {
    .register-page .fxt-heading-content .fxt-inner-wrap { padding: 40px 28px; }
    .register-page .fxt-heading-content .fxt-main-title { font-size: 30px; }
    .register-page .register-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 992px) and (max-height: 700px) {
    .register-page .fxt-heading-content > .fxt-inner-wrap { padding: 24px 28px; gap: 16px; }
    .register-page .fxt-heading-content .fxt-logo { margin-bottom: 0; }
    .register-page .fxt-heading-content .fxt-description:last-child { display: none; }
}
@media (min-width: 992px) and (max-height: 550px) {
    .register-page .fxt-heading-content .fxt-description { display: none; }
}
@media (max-width: 991px) {
    .register-page { height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; }
    .register-page .fxt-content-wrap { height: auto; }
    .register-page .fxt-heading-content { height: auto; }
    .register-page .fxt-form-content { height: auto; overflow: visible; }
    .register-page .fxt-form-content .fxt-main-form { min-height: 0; }
    .register-page .fxt-heading-content > .fxt-inner-wrap { position: static; height: auto; min-height: 0; max-width: 580px; padding: 24px 30px; }
    .register-page .fxt-heading-content .fxt-logo { margin-bottom: 16px; max-width: 270px; }
    .register-page .fxt-heading-content .fxt-sub-title,
    .register-page .fxt-heading-content .fxt-description { display: none; }
    .register-page .fxt-heading-content .fxt-main-title { font-size: 24px; margin-bottom: 12px; }
    .register-page .fxt-form-content .fxt-description { display: block; }
    .register-page .fxt-form-content .fxt-main-form { padding: 32px 24px; }
}
@media (max-width: 575px) {
    .register-page .register-grid { grid-template-columns: minmax(0, 1fr); }
    .register-page .fxt-form-content .fxt-main-form { padding: 28px 20px; }
    .register-page .fxt-heading-content .fxt-inner-wrap { padding: 22px; }
    .register-page .captcha-refresh, .register-page .sms-button { width: 118px; }
}
@media (prefers-reduced-motion: reduce) { .register-page .register-form-wrap { animation: none; } }
