/* assets/css/auth.css */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --purple-primary: #752C8B;
    --purple-light: #FCF3FF;
    --text-dark: #171717;
    --text-muted: #666666;
    --border-color: #B5B2B2;
    --bg-gray: #A9A9A9;
    --theme-success: #2F8F75;
    --theme-success-dark: #17624F;
    --theme-success-soft: #F1FBF8;
    --theme-success-border: #BFE7DC;
    --theme-alert: #B34074;
    --theme-alert-dark: #81214D;
    --theme-alert-soft: #FFF3F8;
    --theme-alert-border: #F2B8CF;
    --theme-warning: #B88210;
    --theme-warning-dark: #72510D;
    --theme-warning-soft: #FFF8E6;
    --theme-warning-border: #F4D58A;
    --theme-info: #6750C8;
    --theme-info-dark: #463093;
    --theme-info-soft: #F5F1FF;
    --theme-info-border: #D8CCFF;
    /* Gray background from screenshot */
}

.btn:disabled {
    background-color: rgba(0, 0, 0, 0.4) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.4) !important;
    cursor: not-allowed;
    opacity: 1 !important;
}

.alert {
    border-radius: 8px;
    border-width: 1px;
    font-weight: 700;
}

.alert-success {
    --bs-alert-color: var(--theme-success-dark);
    --bs-alert-bg: var(--theme-success-soft);
    --bs-alert-border-color: var(--theme-success-border);
    color: var(--theme-success-dark);
    background-color: var(--theme-success-soft);
    border-color: var(--theme-success-border);
    border-inline-start: 4px solid var(--theme-success);
}

.alert-danger {
    --bs-alert-color: var(--theme-alert-dark);
    --bs-alert-bg: var(--theme-alert-soft);
    --bs-alert-border-color: var(--theme-alert-border);
    color: var(--theme-alert-dark);
    background-color: var(--theme-alert-soft);
    border-color: var(--theme-alert-border);
    border-inline-start: 4px solid var(--theme-alert);
}

.alert-warning {
    --bs-alert-color: var(--theme-warning-dark);
    --bs-alert-bg: var(--theme-warning-soft);
    --bs-alert-border-color: var(--theme-warning-border);
    color: var(--theme-warning-dark);
    background-color: var(--theme-warning-soft);
    border-color: var(--theme-warning-border);
    border-inline-start: 4px solid var(--theme-warning);
}

.alert-info {
    --bs-alert-color: var(--theme-info-dark);
    --bs-alert-bg: var(--theme-info-soft);
    --bs-alert-border-color: var(--theme-info-border);
    color: var(--theme-info-dark);
    background-color: var(--theme-info-soft);
    border-color: var(--theme-info-border);
    border-inline-start: 4px solid var(--theme-info);
}

.text-danger {
    color: var(--theme-alert-dark) !important;
}

.btn-danger {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--theme-alert);
    --bs-btn-border-color: var(--theme-alert);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--theme-alert-dark);
    --bs-btn-hover-border-color: var(--theme-alert-dark);
    --bs-btn-focus-shadow-rgb: 179, 64, 116;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--theme-alert-dark);
    --bs-btn-active-border-color: var(--theme-alert-dark);
}

.btn-outline-danger {
    --bs-btn-color: var(--theme-alert-dark);
    --bs-btn-border-color: var(--theme-alert-border);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--theme-alert);
    --bs-btn-hover-border-color: var(--theme-alert);
    --bs-btn-focus-shadow-rgb: 179, 64, 116;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--theme-alert);
    --bs-btn-active-border-color: var(--theme-alert);
}

body {
    margin: 0;
    min-height: 100vh;
    direction: rtl;
    font-family: 'Tajawal', sans-serif;

}

html,
p,
input,
ul,
li,
a,
span,
button,
div,
label,
::before,
::after {
    direction: rtl !important;
}

html[dir="ltr"],
html[dir="ltr"] body,
html[dir="ltr"] p,
html[dir="ltr"] input,
html[dir="ltr"] ul,
html[dir="ltr"] li,
html[dir="ltr"] a,
html[dir="ltr"] span,
html[dir="ltr"] button,
html[dir="ltr"] div,
html[dir="ltr"] label,
html[dir="ltr"] ::before,
html[dir="ltr"] ::after {
    direction: ltr !important;
}

html[dir="rtl"],
html[dir="rtl"] body {
    direction: rtl;
}

/* Main White Container */
.auth-section {
    min-height: 100vh;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.registration-page {
    background: #f8f4fa;
    padding: 32px 16px;
}

.section-padding {
    width: 90% !important;
}

.auth-container {
    background-color: #FFFFFF;
    border-radius: 8px;
    width: 100%;

    padding: 3rem 4rem;

}

.auth-container.wide {
    max-width: 1120px;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 18px 50px rgba(50, 18, 64, 0.12);
}

/* Header & Logos */
.auth-header {
    position: absolute;
    right: 82px;
    top: 32px;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.auth-logo {
    width: auto;
    max-width: 240px;
    height: auto;
    object-fit: contain;
}

.auth-title-container {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-title {
    font-size: 2.625rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.auth-title i {
    color: var(--purple-primary);
    font-size: 1.2rem;
}

.auth-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.registration-page .auth-title-container {
    margin-bottom: 1.5rem;
    text-align: start;
}

.registration-page .auth-title {
    font-size: clamp(1.85rem, 3vw, 2.625rem);
}

.registration-page .auth-subtitle {
    max-width: 760px;
    line-height: 1.8;
}

.entity-registration-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.entity-home-link {
    border: 1px solid #e6d8ec;
    border-radius: 999px;
    color: var(--purple-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    padding: 0.65rem 1rem;
    text-decoration: none;
    white-space: nowrap;
}

.entity-home-link:hover {
    background: var(--purple-light);
    color: var(--purple-primary);
}

.required-indicator {
    color: #c0185b;
    font-weight: 800;
    margin-inline-start: 0.25rem;
}

.wizard-required-note {
    color: #7a577f;
    display: inline-flex;
    font-size: 0.84rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

/* Account Selection Cards */
.account-type-card {
    background-color: var(--purple-light);
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    text-decoration: none;
    color: inherit;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.account-type-card:hover,
.account-type-card.active {
    border-color: var(--purple-primary);
    background-color: #F1E6F5;
}

.account-type-card .card-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.account-type-card .icon-box {
    background-color: var(--purple-primary);
    color: #FCFCFC;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.account-type-card h5 {
    color: var(--purple-primary);
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.account-type-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.account-type-card .arrow-icon {
    color: #FCFCFC;
    background-color: var(--purple-primary);
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

html[dir="ltr"] .arrow-icon {
    transform: rotate(180deg);
}

.login-link {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.login-link a {
    color: var(--purple-primary);
    font-weight: 700;
    text-decoration: none;
}

/* Form Styles */
.form-label {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.form-label .text-danger {
    color: var(--theme-alert-dark);
    /* Red asterisk */
}

.input-icon-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.registration-page .input-icon-wrapper {
    margin-bottom: 0;
}

.auth-form .form-control {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-dark);
    font-size: 0.95rem;
    min-height: 48px;
}

.auth-form textarea.form-control {
    min-height: 120px;
    padding-top: 0.85rem;
    resize: vertical;
}

.input-icon-wrapper .form-control {
    padding-right: 2.8rem;
    padding-left: 1rem;
    border-radius: 16px;
    height: 48px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.input-icon-wrapper textarea.form-control {
    height: auto;
    padding-top: 0.75rem;
    padding-right: 2.8rem;
    resize: none;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.input-icon-wrapper.has-password-toggle .form-control {
    padding-left: 3rem;
}

.password-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: var(--text-muted);
    display: inline-flex;
    height: 36px;
    justify-content: center;
    left: 0.6rem;
    padding: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    width: 36px;
}

.password-toggle:hover,
.password-toggle:focus {
    background: var(--purple-light);
    color: var(--purple-primary);
    outline: 0;
}

.password-toggle:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(115, 43, 140, 0.18);
}

.input-icon-wrapper img.input-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.input-icon-wrapper textarea+.input-icon {
    top: 1.5rem;
}

.form-control:focus {
    border-color: var(--purple-primary);
    box-shadow: 0 0 0 0.2rem rgba(115, 43, 140, 0.25);
}

.enhanced-select-native {
    height: 1px !important;
    opacity: 0;
    pointer-events: none;
    position: absolute !important;
    width: 1px !important;
}

.enhanced-select {
    position: relative;
}

.enhanced-select-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-muted);
    display: flex;
    font-size: 0.95rem;
    gap: 0.75rem;
    justify-content: space-between;
    min-height: 48px;
    padding: 0.7rem 1rem;
    text-align: start;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    width: 100%;
}

.enhanced-select.has-value .enhanced-select-toggle {
    color: var(--text-dark);
}

.enhanced-select-toggle:hover,
.enhanced-select.is-open .enhanced-select-toggle {
    border-color: var(--purple-primary);
}

.enhanced-select-toggle:focus {
    border-color: var(--purple-primary);
    box-shadow: 0 0 0 0.2rem rgba(115, 43, 140, 0.25);
    outline: 0;
}

.enhanced-select-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.enhanced-select-icon {
    color: var(--purple-primary);
    flex-shrink: 0;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.enhanced-select.is-open .enhanced-select-icon {
    transform: rotate(180deg);
}

.enhanced-select-dropdown {
    background: #fff;
    border: 1px solid #eadcef;
    border-radius: 16px;
    box-shadow: 0 18px 36px rgba(50, 18, 64, 0.14);
    display: none;
    inset-inline: 0;
    margin-top: 0.4rem;
    overflow: hidden;
    padding: 0.65rem;
    position: absolute;
    top: 100%;
    z-index: 30;
}

.enhanced-select.is-open .enhanced-select-dropdown {
    display: block;
}

.enhanced-select-search {
    border-radius: 12px !important;
    margin-bottom: 0.5rem;
    min-height: 42px !important;
}

.enhanced-select-options {
    display: grid;
    gap: 0.25rem;
    max-height: 240px;
    overflow-y: auto;
    padding-inline-end: 0.15rem;
}

.enhanced-select-option {
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.5;
    min-height: 40px;
    padding: 0.55rem 0.75rem;
    text-align: start;
    width: 100%;
}

.enhanced-select-option:hover,
.enhanced-select-option:focus {
    background: var(--purple-light);
    color: var(--purple-primary);
    outline: 0;
}

.enhanced-select-option[aria-selected="true"] {
    background: var(--purple-primary);
    color: #fff;
}

.enhanced-select-empty {
    color: var(--text-muted);
    font-weight: 700;
    padding: 0.75rem;
    text-align: center;
}

.enhanced-select-native.is-invalid + .enhanced-select .enhanced-select-toggle,
.was-validated .enhanced-select-native:invalid + .enhanced-select .enhanced-select-toggle {
    border-color: var(--theme-alert);
}

.enhanced-select-native.is-invalid + .enhanced-select .enhanced-select-toggle:focus,
.was-validated .enhanced-select-native:invalid + .enhanced-select .enhanced-select-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(179, 64, 116, 0.2);
}

/* File Upload Box */
.file-upload-box {
    border: 2px dashed var(--purple-primary);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    background-color: var(--purple-light);
    color: var(--purple-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 1.5rem;
}

.file-upload-box:hover {
    border-color: var(--purple-primary);
    background-color: #F1E6F5;
}

.file-upload-box i {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.file-upload-box span {
    font-size: 1rem;
    font-weight: 500;
}

.file-upload-box input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.registration-page .file-upload-box {
    min-height: 48px;
    height: auto;
    margin-bottom: 0;
    padding: 0.85rem 1rem;
    flex-direction: row;
    gap: 0.6rem;
}

.registration-page .file-upload-box i {
    margin-bottom: 0;
}

.registration-page .file-upload-box span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Radio Buttons Styling */
.radio-options-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.registration-page .radio-options-group {
    margin-bottom: 0;
}

.radio-option {
    flex: 1;
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-option label {

    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: start;
    flex-direction: row-reverse;
    gap: 0.5rem;
}

.radio-option label::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--purple-primary);
    margin-right: 0.5rem;
}

.radio-option input[type="radio"]:checked+label {
    border-color: var(--purple-primary);
    color: var(--purple-primary);
}

.radio-option input[type="radio"]:checked+label::after {
    border-color: var(--purple-primary);
    background-color: var(--purple-light);
    border-width: 5px;
}

/* Checkbox Styling */
.form-check {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0;
    border-color: var(--border-color);
    cursor: pointer;
}

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

.form-check-label {
    font-size: 0.85rem;
    color: var(--text-dark);
    cursor: pointer;
}

/* Buttons */
.btn-primary-purple {
    background-color: var(--purple-primary);
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 0.75rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    width: auto;
    min-width: 180px;
    transition: opacity 0.3s ease;
}

.btn-primary-purple:hover {
    background-color: #5D2371;
    /* Slightly darker */
    color: #fff;
    opacity: 0.9;
}

.btn-outline-purple {
    background: #fff;
    border: 1px solid var(--purple-primary);
    border-radius: 16px;
    color: var(--purple-primary);
    font-weight: 800;
    min-height: 48px;
}

.btn-outline-purple:hover {
    background: var(--purple-light);
    border-color: var(--purple-primary);
    color: var(--purple-primary);
}

.forgot-password-link {
    color: var(--purple-primary);
    font-weight: 800;
    padding: 0;
    text-decoration: none;
}

.forgot-password-link:hover {
    color: #5D2371;
    text-decoration: underline;
}

.registration-otp-summary {
    background: #fbf7fd;
    border: 1px solid #eadcef;
    border-radius: 12px;
    color: var(--text-muted);
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
    text-align: start;
}

.registration-otp-summary strong {
    color: var(--text-dark);
    overflow-wrap: anywhere;
}

.registration-otp-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.registration-otp-actions .forgot-password-link {
    background: transparent;
    border: 0;
}

.registration-otp-countdown {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0.45rem 0 0;
    text-align: center;
}

.auth-reset-card {
    border-radius: 20px;
    max-width: 560px;
    padding: 2.75rem 3rem;
}

.password-reset-progress {
    align-items: center;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
    margin: 0 0 1.25rem;
}

.reset-progress-step {
    align-items: center;
    color: var(--text-muted);
    display: flex;
    gap: 0.65rem;
    min-width: 0;
}

.reset-progress-step span,
.password-reset-step-icon {
    align-items: center;
    background: #f4e7f8;
    border-radius: 50%;
    color: var(--purple-primary);
    display: inline-flex;
    flex-shrink: 0;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.reset-progress-step strong {
    font-size: 0.9rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.reset-progress-step.done {
    color: var(--purple-primary);
}

.reset-progress-step.done span {
    background: var(--purple-primary);
    color: #fff;
}

.reset-progress-line {
    background: #eadcef;
    border-radius: 999px;
    height: 3px;
}

.password-reset-flow {
    display: grid;
    gap: 1rem;
}

.password-reset-panel {
    background: #fbf7fd;
    border: 1px solid #eadcef;
    border-radius: 18px;
    padding: 1.25rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.password-reset-panel.is-active {
    background: #fff;
    border-color: var(--purple-primary);
    box-shadow: 0 14px 34px rgba(93, 3, 120, 0.12);
}

.password-reset-panel.is-complete {
    border-color: #d9c6e0;
}

.password-reset-panel-header {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.password-reset-panel h2 {
    color: var(--text-dark);
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
}

.password-reset-panel .btn {
    align-items: center;
    display: inline-flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn-primary-purple .fa-arrow-left {
    margin-left: 0.5rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.registration-page .form-actions {
    margin-top: 0.5rem;
}

.wizard-progress {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0 2rem;
}

.wizard-step {
    border: 1px solid #e6d8ec;
    background: #fff;
    color: var(--text-muted);
    border-radius: 14px;
    min-height: 74px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-align: start;
    transition: all 0.2s ease;
}

.wizard-step-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--purple-light);
    color: var(--purple-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.wizard-step-label {
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.35;
}

.wizard-step.active,
.wizard-step.done {
    border-color: var(--purple-primary);
    background: #fcf3ff;
    color: var(--purple-primary);
}

.wizard-step.active .wizard-step-number,
.wizard-step.done .wizard-step-number {
    background: var(--purple-primary);
    color: #fff;
}

.wizard-panel {
    display: none;
}

.wizard-panel.active {
    display: block;
}

.wizard-panel-header {
    border-bottom: 1px solid #efe6f2;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.wizard-panel-header h2 {
    color: var(--text-dark);
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
}

.wizard-panel-header p {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.7;
}

.wizard-choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.wizard-check {
    border: 1px solid #e2d8e8;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    cursor: pointer;
    background: #fff;
    min-height: 50px;
}

.wizard-check:hover {
    border-color: var(--purple-primary);
    background: var(--purple-light);
}

.wizard-track,
.wizard-pledge {
    height: 100%;
}

.wizard-subsection {
    background: #fbf7fd;
    border: 1px solid #eadcef;
    border-radius: 18px;
    padding: 1.25rem;
}

.wizard-subsection h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--purple-primary);
    margin: 0 0 1rem;
}

.participation-field.is-hidden,
.private-sector-fields.is-hidden {
    display: none;
}

.wizard-actions {
    border-top: 1px solid #efe6f2;
    margin-top: 2rem;
    padding-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wizard-review {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.wizard-review-item {
    background: #fbf7fd;
    border: 1px solid #eadcef;
    border-radius: 14px;
    padding: 1rem;
    min-height: 84px;
}

.wizard-review-label {
    display: block;
    color: var(--purple-primary);
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.wizard-review-value {
    color: var(--text-dark);
    overflow-wrap: anywhere;
}

.wizard-account-card {
    background: #fbf7fd;
    border: 1px solid #eadcef;
    border-radius: 18px;
    padding: 1.25rem;
}

.wizard-account-copy h3 {
    color: var(--text-dark);
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
}

.wizard-account-copy p,
.wizard-local-otp {
    color: var(--text-muted);
    line-height: 1.7;
}

.otp-input {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.18rem;
    text-align: center;
}

.profile-tabs-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: flex-start;
}

.profile-tabs-sidebar {
    background: #fbf7fd;
    border: 1px solid #eadcef;
    border-radius: 18px;
    padding: 0.75rem;
    position: sticky;
    top: 1rem;
}

.profile-tab-link {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text-dark);
    border-radius: 14px;
    min-height: 50px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    text-align: start;
    transition: all 0.2s ease;
}

.profile-tab-link i {
    width: 20px;
    color: var(--purple-primary);
    text-align: center;
}

.profile-tab-link:hover,
.profile-tab-link:focus {
    background: #f1e6f5;
    color: var(--purple-primary);
}

.profile-tab-link.active {
    background: var(--purple-primary);
    color: #fff;
}

.profile-tab-link.active i {
    color: #fff;
}

.profile-tabs-content {
    min-width: 0;
}

.profile-panel {
    border: 1px solid #eadcef;
    border-radius: 18px;
    background: #fff;
    padding: 1.5rem;
}

.profile-danger-panel {
    border-color: var(--theme-alert-border);
    background: var(--theme-alert-soft);
}

.profile-panel-header {
    border-bottom: 1px solid #efe6f2;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.profile-panel-header h2 {
    color: var(--text-dark);
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
}

.profile-panel-header p {
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.profile-list {
    display: grid;
    gap: 0.75rem;
}

.profile-list-item {
    border: 1px solid #efe6f2;
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    background: #fbf7fd;
}

.profile-list-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--purple-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-list-item h3 {
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.45;
    margin: 0 0 0.25rem;
}

.profile-list-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.profile-full-page {
    background: #f8f4fa;
    min-height: 70vh;
    padding: 32px 0 48px;
    color: var(--text-dark);
}

.profile-full-page .profile-tabs-layout {
    margin-top: 0;
}

.profile-full-page .profile-tabs-sidebar,
.profile-full-page .profile-panel {
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(50, 18, 64, 0.08);
}

.profile-list-link {
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.profile-list-link:hover,
.profile-list-link:focus {
    color: inherit;
    border-color: var(--purple-primary);
    background: #fff;
    transform: translateY(-1px);
}

.portal-page-shell {
    background: #f8f4fa;
    color: var(--text-dark);
}

.portal-shell {
    background: #f8f4fa;
    min-height: 70vh;
    padding: 32px 0 48px;
}

.portal-shell-inner {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 24px;
    align-items: flex-start;
}

.portal-sidebar {
    background: #fff;
    border: 1px solid #eadcef;
    border-radius: 8px;
    padding: 12px;
    position: sticky;
    top: 18px;
    min-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 14px 36px rgba(50, 18, 64, 0.08);
}

.portal-sidebar-link {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    min-height: 46px;
    padding: 0.75rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 800;
    text-align: start;
}

.portal-sidebar-link i {
    width: 20px;
    color: var(--purple-primary);
    text-align: center;
}

.portal-sidebar-link:hover,
.portal-sidebar-link.active {
    background: var(--purple-primary);
    color: #fff;
}

.portal-sidebar-link:hover i,
.portal-sidebar-link.active i {
    color: #fff;
}

.portal-sidebar-logout {
    margin-top: auto;
}

.portal-main {
    min-width: 0;
}

.portal-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.portal-page-header h1 {
    color: var(--text-dark);
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.4rem;
}

.portal-page-header p {
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.portal-summary-list {
    display: grid;
    gap: 10px;
}

.portal-summary-list div {
    border: 1px solid #efe6f2;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    background: #fbf7fd;
    display: grid;
    gap: 0.25rem;
}

.portal-summary-list span {
    color: var(--purple-primary);
    font-size: 0.85rem;
    font-weight: 800;
}

.portal-summary-list strong {
    color: var(--text-dark);
    overflow-wrap: anywhere;
}

.portal-modal .modal-body {
    background: #fff;
    display: block;
    height: auto;
}

html[dir="ltr"] body,
html[dir="ltr"] p,
html[dir="ltr"] input,
html[dir="ltr"] ul,
html[dir="ltr"] li,
html[dir="ltr"] a,
html[dir="ltr"] span,
html[dir="ltr"] button,
html[dir="ltr"] div,
html[dir="ltr"] label,
html[dir="ltr"] ::before,
html[dir="ltr"] ::after {
    direction: ltr !important;
}

/* Success Page Specific */
.success-icon-container {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 14px solid var(--theme-success-border);
    background-color: var(--theme-success-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}


.success-icon-container i {
    font-size: 6rem;
    color: var(--theme-success);
}

.success-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 3rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-title {
        font-size: 1.75rem;
    }

    .section-padding {
        width: 100% !important;
    }

    .auth-container {
        padding: 2rem 1.5rem;
    }

    .auth-reset-card {
        padding: 2rem 1.5rem !important;
    }

    .registration-page {
        align-items: flex-start;
        padding: 16px;
    }

    .auth-container.wide {
        border-radius: 16px;
        box-shadow: 0 12px 34px rgba(50, 18, 64, 0.1);
    }

    .registration-page .auth-title-container {
        margin-bottom: 1rem;
    }

    .entity-registration-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .entity-home-link {
        justify-content: center;
        width: fit-content;
    }

    .registration-page .auth-subtitle {
        font-size: 1rem;
    }

    .account-type-card .card-content {
        gap: 0.75rem;
    }

    .account-type-card {
        padding: 1.25rem 1rem;
    }

    .radio-options-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-actions {
        justify-content: center;
    }

    .wizard-progress {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .wizard-step {
        min-height: 54px;
    }

    .wizard-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .wizard-actions .d-flex {
        flex-direction: column;
    }

    .wizard-review {
        grid-template-columns: 1fr;
    }

    .profile-tabs-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .profile-tabs-sidebar {
        position: static;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 0.5rem;
        scrollbar-width: none;
    }

    .profile-tabs-sidebar::-webkit-scrollbar {
        display: none;
    }

    .profile-tab-link {
        width: auto;
        min-width: max-content;
        min-height: 44px;
        padding: 0.7rem 0.9rem;
        white-space: nowrap;
    }

    .profile-panel {
        padding: 1.1rem;
    }

    .btn-primary-purple {
        width: 100%;
    }

    .auth-header {
        right: 20px;
    }

    .auth-logo {
        max-width: 190px;
        height: auto;
    }

    .account-type-card .arrow-icon {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        font-size: 0.75rem;
    }

    .account-type-card .icon-box {
        flex-shrink: 0;
        width: 45px;
        height: 45px;

    }

    .account-type-card .icon-box img {
        height: 24px;
    }

    .success-icon-container {
        width: 140px;
        height: 140px;
        border: 8px solid var(--theme-success-border);
        margin-top: 3rem;
    }

    .success-icon-container i {
        font-size: 4rem;
    }



}

@media (max-width: 520px) {
    .password-reset-progress {
        grid-template-columns: 1fr;
    }

    .reset-progress-line {
        display: none;
    }
}

/* Index.html Modals */
.btn-close-circle {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 32px;
    height: 32px;
    background-color: var(--purple-primary);
    color: #fff;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-close-circle:hover {
    background-color: #5D2371;
}

.btn-google {
    background-color: #F2F2F2;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    color: var(--text-dark);
    padding: 0.75rem 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.btn-google:hover {
    background-color: var(--purple-light);
    color: var(--text-dark);
}

.separator-or {
    display: flex;
    align-items: center;
    text-align: center;
}

.separator-or::before,
.separator-or::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.separator-or:not(:empty)::before {
    margin-left: 1rem;
}

.separator-or:not(:empty)::after {
    margin-right: 1rem;
}

.modal-content {
    min-height: 0;
}

.modal-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-dialog-centered {
    align-items: normal;
}

html[dir="ltr"],
html[dir="ltr"] body,
html[dir="ltr"] p,
html[dir="ltr"] input,
html[dir="ltr"] ul,
html[dir="ltr"] li,
html[dir="ltr"] a,
html[dir="ltr"] span,
html[dir="ltr"] button,
html[dir="ltr"] div,
html[dir="ltr"] label,
html[dir="ltr"] ::before,
html[dir="ltr"] ::after {
    direction: ltr !important;
}

html[dir="ltr"] .auth-header {
    right: auto;
    left: 82px;
    justify-content: flex-start;
}

html[dir="ltr"] .auth-title {
    justify-content: flex-start;
}

html[dir="ltr"] .account-type-card .card-content,
html[dir="ltr"] .form-check {
    flex-direction: row;
}

html[dir="ltr"] .input-icon-wrapper .form-control {
    padding-right: 1rem;
    padding-left: 2.8rem;
}

html[dir="ltr"] .input-icon-wrapper.has-password-toggle .form-control {
    padding-right: 3rem;
    padding-left: 2.8rem;
}

html[dir="ltr"] .input-icon-wrapper textarea.form-control {
    padding-right: 1rem;
    padding-left: 2.8rem;
}

html[dir="ltr"] .input-icon-wrapper .input-icon {
    right: auto;
    left: 1rem;
}

html[dir="ltr"] .password-toggle {
    right: 0.6rem;
    left: auto;
}

html[dir="ltr"] .btn-close-circle {
    left: auto;
    right: 24px;
}

html[dir="ltr"] .separator-or:not(:empty)::before {
    margin-left: 0;
    margin-right: 1rem;
}

html[dir="ltr"] .separator-or:not(:empty)::after {
    margin-right: 0;
    margin-left: 1rem;
}

@media (max-width: 768px) {
    html[dir="ltr"] .auth-header {
        left: 20px;
    }
}

@media (max-width: 992px) {
    .portal-shell-inner {
        grid-template-columns: 1fr;
    }

    .portal-sidebar {
        position: static;
        min-height: 0;
        flex-direction: row;
        overflow-x: auto;
    }

    .portal-sidebar-link {
        white-space: nowrap;
    }

    .portal-grid {
        grid-template-columns: 1fr;
    }

    .portal-page-header {
        flex-direction: column;
    }
}
