    /* Base LTR styles (default) */
body.ltr {
  direction: ltr;
  text-align: left !important;
  overflow-x: hidden;
}

/* RTL overrides */
body.rtl {
  direction: rtl;
  text-align: right !important;
  overflow-x: hidden;
}

/* Sidebar positioning */
body.ltr #layout-wrapper .sidebar {
  float: left !important; /* or your existing LTR sidebar style */
}

body.rtl #layout-wrapper .sidebar {
  float: right !important;
}



/* Breadcrumb and nav alignment */
body.ltr nav.breadcrumb {
  text-align: left !important;
}

body.rtl nav.breadcrumb {
  text-align: right !important;
}

/* Flip icons if needed (example: arrow icons) */
body.rtl .fa-arrow-left {
  transform: rotate(180deg);
}

/* Any other UI elements you want flipped */

/* Ensure form inputs and text align correctly */
body.rtl input, 
body.rtl textarea, 
body.rtl select {
  direction: rtl;
  text-align: right !important;
}

body.rtl .navbar-nav {
    float: right !important;
    text-align: right !important;
    width: 100% !important;
}

body.rtl .navbar-toggler {
    float: left !important;
}

body.rtl .navbar-menu .navbar-nav .nav-link[data-bs-toggle=collapse]:after {
    position: absolute;
    left: 18px !important;
    right: inherit !important;
}
body.ltr .navbar-menu .navbar-nav .nav-link[data-bs-toggle=collapse]:after {
    position: absolute;
    right: 18px !important;
    left: inherit !important;

}

body.rtl .simplebar-wrapper {
    overflow: auto !important;
}

body.ltr div.dataTables_wrapper div.dataTables_filter {
    text-align: right;
}
body.rtl div.dataTables_wrapper div.dataTables_filter {
    text-align: left;
}

body.ltr table.dataTable thead th, table.dataTable thead td, table.dataTable tfoot th, table.dataTable tfoot td {
    text-align: left;
}

body.rtl table.dataTable thead th, table.dataTable thead td, table.dataTable tfoot th, table.dataTable tfoot td {
    text-align: right;
}
body.ltr input::placeholder {
    text-align: left;
}
body.rtl input::placeholder {
    text-align: right;
}

a {
    text-decoration: none !important
}


#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(255, 255, 255);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
    opacity: 1;
    pointer-events: auto;
}

#page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Creative bouncing dots loader */
.loader-spinner {
    display: flex;
    gap: 10px;
}

.loader-spinner span {
    width: 15px;
    height: 15px;
    background-color: #3498db;
    border-radius: 50%;
    animation: bounce 1.2s infinite ease-in-out;
    -webkit-animation: bounce 1.2s infinite ease-in-out;
}

.loader-spinner span:nth-child(2) {
    animation-delay: 0.2s;
    background-color: #e67e22;
}

.loader-spinner span:nth-child(3) {
    animation-delay: 0.4s;
    background-color: #9b59b6;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.3;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}


/* Custom CSS for Creative Sidebar (Refined) */

/* Overall Sidebar Background & Styling */
/* Keyframe for the subtle glow animation */
@keyframes pulseGlow {
    0% { opacity: 0.4; transform: scale(1); -webkit-transform: scale(1); -moz-transform: scale(1); -ms-transform: scale(1); -o-transform: scale(1); }
    100% { opacity: 0.6; transform: scale(1.05); -webkit-transform: scale(1.05); -moz-transform: scale(1.05); -ms-transform: scale(1.05); -o-transform: scale(1.05); }
}
.app-menu {
    background: linear-gradient(to bottom, #2c3e50, #34495e) !important;
}
/* 🔶 Custom Primary Color */
.text-primary {
    color: #ff6600 !important;
}
.btn-primary {
    background-color: #ff6600 !important;
    border-color: #ff6600 !important;
    color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: #ff6600 !important; /* slightly darker on hover */
    border-color: #ff6600 !important;
}
.bg-primary {
    background-color: #ff6600 !important;
}
.border-primary {
    border-color: #ff6600 !important;
}
.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
    background-color: #ff6600 !important;
}

/* General Table Style */
table.dataTable {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Header Styling */
table.dataTable thead {
    font-weight: bold;
    font-size: 14px;
    border-bottom: 2px solid #dee2e6;
}

table.dataTable thead th {
    padding: 12px 15px;
    background: #ff6600;
    color: white;
}

table.dataTable thead th:last-child {
    border-right: none;
}

/* Row Styling */
table.dataTable tbody tr {
    transition: background-color 0.3s ease;
}

table.dataTable tbody tr:hover {
    background-color: #f1f3ff;
}

/* Cell Padding */
table.dataTable tbody td {
    padding: 10px 15px;
}

/* Striped Row Colors */
table.dataTable.stripe tbody tr:nth-of-type(odd) {
    background-color: #f9f9fc;
}

/* Pagination Styling */

/* Search Box Styling */
/* تغليف صندوق البحث */
/* اجبري عنصر البحث يكون بمحاذاة الجدول */
.dataTables_filter {
    background-color: rgba(239, 239, 239, 0.841);
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
    padding: 0.2rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 40% !important;
   
    float: none !important;
}

/* تنسيق الـ label داخليًا */
.dataTables_filter label {
    display: flex;
    align-items: center;
    flex: 1;
    margin-bottom: 0;
    width: 100%;
}

/* أيقونة البحث */
.dataTables_filter label::before {
    content: "\f002"; /* Font Awesome أيقونة */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: #6c757d;
    margin-left: 0.6rem;
}

/* تنسيق input */
.dataTables_filter input {
    flex: 1;
    border: none;
    background-color: transparent;
    box-shadow: none;
    padding: 0.5rem 0;
    outline: none;
}



/* Length & Info */
.dataTables_length,
.dataTables_info {
    font-size: 14px;
    color: #4b5563; /* رمادي أنيق */
    font-weight: 500;
    padding-top: 10px;
}


/* Responsive Fixes */
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before {
    background-color: #4e54c8;
    border-radius: 50%;
}

/* Optional: Shadow for fixed header */
table.dataTable thead th {
    position: sticky;
    top: 0;
    z-index: 10;
}
