body, h1, h2, h3, h4, h5, h6, p, a, span, div, li, td, th, input, button, select, textarea {
    font-family: 'Cairo', sans-serif !important;
}

body {
    direction: rtl;
    text-align: right;
}

/* Ensure logo text in new header keeps its explicit font */
.ecb-brand-name {
    font-family: 'Poppins', sans-serif !important;
}

/* Ensure logo text in ERP/legacy header and footers revert to their original body font */
.navbar-brand span, 
footer .h4.text-white,
.footer .h4.text-white {
    font-family: 'Inter', sans-serif !important;
}

/* Fix spacing for unstyled lists in RTL */
.list-unstyled {
    padding-right: 0 !important;
}

/* Flip arrows in RTL */
.fa-arrow-right,
.fa-arrow-left,
.fa-chevron-right,
.fa-chevron-left {
    transform: scaleX(-1);
    display: inline-block;
}

/* Keep stats like 200+ ordered correctly (LTR) so the plus stays on the right */
.hp-stat-num {
    direction: ltr;
    unicode-bidi: isolate;
}

/* Fix hardcoded text-aligns in auth pages */
.input-group label,
.form-options,
.role-option,
.verify-notice,
.js-error,
.otp-status,
.error-msg,
.pw-hint,
.alert-error,
.alert-success,
.alert-info,
.alert-warning,
.form-label,
.form-control,
.text-start {
    text-align: right !important;
}


/* Flip Bootstrap margin utilities for RTL */
.ms-1 { margin-left: 0 !important; margin-right: 0.25rem !important; }
.ms-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
.ms-3 { margin-left: 0 !important; margin-right: 1rem !important; }
.ms-4 { margin-left: 0 !important; margin-right: 1.5rem !important; }
.ms-5 { margin-left: 0 !important; margin-right: 3rem !important; }
.ms-auto { margin-left: 0 !important; margin-right: auto !important; }

.me-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
.me-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
.me-3 { margin-right: 0 !important; margin-left: 1rem !important; }
.me-4 { margin-right: 0 !important; margin-left: 1.5rem !important; }
.me-5 { margin-right: 0 !important; margin-left: 3rem !important; }
.me-auto { margin-right: 0 !important; margin-left: auto !important; }

/* Also fix that hardcoded margin-left for inline chevron down */
.fa-chevron-down {
    margin-left: 0 !important;
    margin-right: 2px !important;
}


/* Swap Carousel Next/Prev button positions in RTL */
.hp-btn-prev {
    left: auto !important;
    right: 0 !important;
}
.hp-btn-next {
    right: auto !important;
    left: 0 !important;
}

