/* ============ صفحة التسجيل ============ */
.reg-page {
    padding-bottom: 60px;
}

/* ---- اللوحة التعريفية ---- */
.reg-aside {
    position: sticky;
    top: 100px;
    overflow: hidden;
    border-radius: 22px;
    padding: 40px 34px;
    background: linear-gradient(150deg, var(--fx-primary), var(--fx-primary-dark));
    color: var(--fx-on-primary);
}

.reg-aside::before,
.reg-aside::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .09);
    pointer-events: none;
}

.reg-aside::before {
    width: 260px;
    height: 260px;
    top: -90px;
    inset-inline-end: -80px;
}

.reg-aside::after {
    width: 200px;
    height: 200px;
    bottom: -70px;
    inset-inline-start: -60px;
}

.reg-aside>* {
    position: relative;
    z-index: 1;
}

.reg-logo {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 26px;
}

.reg-logo img {
    display: block;
    width: auto;
    height: auto;
    max-height: 40px;
    max-width: 170px;
    object-fit: contain;
}

.reg-aside h2 {
    color: inherit;
    font-size: 26px;
    line-height: 1.5;
    font-weight: 700;
    margin: 0 0 10px;
}

.reg-lead {
    color: inherit;
    opacity: .9;
    margin: 0 0 26px;
    line-height: 1.8;
}

.reg-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
}

.reg-benefits li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.reg-benefits li:last-child {
    margin-bottom: 0;
}

.reg-benefits i {
    flex: 0 0 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(255, 255, 255, .18);
    background: color-mix(in srgb, currentColor 16%, transparent);
}

.reg-benefits strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}

.reg-benefits span {
    display: block;
    font-size: 13px;
    opacity: .85;
    line-height: 1.6;
}

/* ---- كارت النموذج ---- */
.reg-card {
    background: #fff;
    border-radius: 22px;
    padding: 38px;
    box-shadow: 0 12px 44px rgba(20, 20, 43, .08);
}

.reg-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 6px;
}

.reg-sub {
    color: #777;
    margin: 0 0 22px;
}

.reg-team {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: var(--fx-primary-soft);
    color: #333;
    border: 1px solid var(--fx-primary-a20);
}

.reg-team i {
    color: var(--fx-primary);
    font-size: 20px;
}

.reg-sec {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 16px;
    font-weight: 700;
    font-size: 15px;
    color: #222;
}

.reg-sec:first-of-type {
    margin-top: 14px;
}

.reg-sec span {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background: var(--fx-primary-soft);
    color: var(--fx-primary-dark);
}

/* ---- الحقول ---- */
.reg-page .form-label {
    font-weight: 600;
    font-size: 13.5px;
    color: #444;
    margin-bottom: 7px;
}

.reg-page .auth-input {
    height: 50px;
    border: 1.5px solid #e4e4ec;
    border-radius: 12px;
    background: #fff;
    padding: 0 14px;
    font-size: 15px;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}

.reg-page .auth-input:focus {
    border-color: var(--fx-primary);
    box-shadow: 0 0 0 4px var(--fx-primary-a20);
    outline: 0;
}

.reg-page .auth-input.is-invalid {
    border-color: #dc3545;
    box-shadow: none;
}

.reg-page .auth-input::placeholder {
    color: #a0a0b2;
}

.reg-page .invalid-feedback:not(:empty) {
    display: block;
    font-size: 12.5px;
    margin-top: 6px;
}

.fx-field {
    position: relative;
}

.fx-field>i {
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a0b2;
    pointer-events: none;
    transition: color .15s;
}

.fx-field:focus-within>i {
    color: var(--fx-primary);
}

.fx-field .auth-input {
    padding-inline: 44px 14px;
}

.fx-field .auth-input.ltr {
    padding-inline: 14px 44px;
}

/* رقم الهاتف الدولي */
.reg-page .iti {
    width: 100%;
    display: block;
}

.reg-page .iti input.auth-input {
    direction: ltr;
    text-align: left;
}

.iti__country-list {
    direction: ltr;
    text-align: left;
    border-radius: 12px;
    border: 1px solid #e4e4ec;
    box-shadow: 0 12px 32px rgba(20, 20, 40, .12);
    z-index: 1100;
}

/* مربع الموافقة والزر */
.reg-page .form-check-input {
    width: 1.15em;
    height: 1.15em;
    border: 1.5px solid #c9c9d6;
    cursor: pointer;
}

.reg-page .form-check-input:checked {
    background-color: var(--fx-primary);
    border-color: var(--fx-primary);
}

.reg-page .form-check-input:focus {
    box-shadow: 0 0 0 4px var(--fx-primary-a20);
    border-color: var(--fx-primary);
}

.reg-page .form-check-label {
    color: #555;
    line-height: 1.8;
}

.reg-submit {
    height: 52px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 8px 22px var(--fx-primary-a20);
}

.reg-secure {
    text-align: center;
    color: #9a9aab;
    font-size: 12.5px;
    margin-top: 14px;
}

.reg-secure i {
    margin-inline-end: 4px;
}

.reg-login {
    text-align: center;
    margin: 22px 0 0;
    color: #666;
}

.reg-login a {
    color: var(--fx-primary);
    font-weight: 700;
}

/* مقياس كلمة المرور */
.pw-meter {
    height: 5px;
    border-radius: 4px;
    background: #ececf3;
    margin-top: 8px;
    overflow: hidden;
}

.pw-meter span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width .25s, background .25s;
}

.pw-meter span.weak {
    background: #ef4444;
}

.pw-meter span.mid {
    background: #f59e0b;
}

.pw-meter span.strong {
    background: #22c55e;
}

.pw-hint,
.pw-match {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #8b8ba0;
}

.pw-hint.weak,
.pw-match.weak {
    color: #ef4444;
}

.pw-hint.mid {
    color: #d97706;
}

.pw-hint.strong,
.pw-match.strong {
    color: #16a34a;
}

/* ============ Select2 (تصميم حديث) ============ */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 50px;
    border: 1.5px solid #e4e4ec;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    transition: border-color .15s, box-shadow .15s;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    width: 100%;
    line-height: normal;
    padding-inline: 14px 38px;
    color: #222;
    font-size: 15px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #a0a0b2;
}

/* السهم: شيفرون يدور عند الفتح */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 0;
    height: 100%;
    width: 38px;
    right: auto;
    left: auto;
    inset-inline-end: 0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none;
}

.select2-container--default .select2-selection--single .select2-selection__arrow::after {
    content: '';
    position: absolute;
    top: calc(50% - 6px);
    left: 50%;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    border: solid #8b8ba0;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: transform .2s, border-color .2s, top .2s;
}

.select2-container--open .select2-selection--single .select2-selection__arrow::after {
    transform: rotate(225deg);
    top: calc(50% - 2px);
    border-color: var(--fx-primary);
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--fx-primary);
    box-shadow: 0 0 0 4px var(--fx-primary-a20);
}

.select2-container--default.select2-container--disabled .select2-selection--single {
    background: #f6f6fa;
    opacity: .8;
    cursor: not-allowed;
}

.is-invalid+.select2-container--default .select2-selection--single {
    border-color: #dc3545;
    box-shadow: none;
}

/* القائمة المنسدلة */
.select2-dropdown {
    border: 1px solid #e4e4ec;
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(20, 20, 40, .14);
    overflow: hidden;
    margin-top: 6px;
}

.select2-container--default .select2-search--dropdown {
    padding: 10px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1.5px solid #e4e4ec;
    border-radius: 8px;
    padding: 9px 12px;
    outline: 0;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--fx-primary);
}

.select2-results__options {
    max-height: 260px;
}

.select2-container--default .select2-results__option {
    padding: 10px 16px;
    font-size: 14.5px;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background: var(--fx-primary-soft);
    color: #222;
    font-weight: 600;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--fx-primary);
    color: var(--fx-on-primary);
}

/* ============ الموبايل ============ */
@media (max-width: 991px) {
    .reg-aside {
        position: relative;
        top: 0;
        padding: 26px 22px;
    }

    .reg-aside h2 {
        font-size: 20px;
    }

    .reg-lead {
        margin-bottom: 0;
    }

    .reg-logo {
        margin-bottom: 16px;
    }

    .reg-benefits {
        display: none;
    }
}

@media (max-width: 575px) {
    .reg-card {
        padding: 26px 18px;
        border-radius: 18px;
    }

    .reg-title {
        font-size: 22px;
    }
}