/* Original styles - DO NOT MODIFY */
body {
    font-size: 14px;
    color: #475569;
}

.content-wrapper {
    background: #F9FCFF;
}

.card {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Keep all your original styles here */

/* RTL specific styles - Only applied when body has rtl class */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .main-sidebar {
    right: 0;
    left: auto !important;
}

body.rtl .content-wrapper {
    margin-right: 250px;
    margin-left: 0;
}

body.rtl .main-header {
    margin-right: 250px;
    margin-left: 0;
}

@media (max-width: 991.98px) {
    body.rtl .main-sidebar {
        right: -250px;
        left: auto;
    }

    body.rtl .content-wrapper,
    body.rtl .main-header {
        margin-right: 0;
        margin-left: 0;
    }

    body.rtl.sidebar-open .main-sidebar {
        right: 0;
    }
}

body.rtl .nav-sidebar .nav-link {
    text-align: right;
}

body.rtl .nav-sidebar .nav-icon {
    margin-left: 10px;
    margin-right: 0;
}

body.rtl table.dataTable thead th,
body.rtl table.dataTable tbody td {
    text-align: right;
}

body.rtl .dataTables_filter {
    text-align: left;
}

body.rtl .dropdown-menu {
    text-align: right;
}

/* Keep your existing styles below */

/* Common styles for both LTR and RTL */
body {
    /* font-family: 'Poppins'; */
    font-size: 14px;
    color: #475569;
}

.content-wrapper {
    background: #F9FCFF;
    min-height: 100vh;
    padding: 25px;
}

.main-header {
    background: transparent;
    border: none;
}

.nav-sidebar .nav-link {
    padding: 12px 15px;
    color: #e6e6e6;
}

.nav-sidebar .nav-link.active {
    background-color: #eb5307;
    color: #fff;
}

.nav-sidebar .nav-link:hover:not(.active) {
    color: #eb5307;
    background: transparent;
}

/* RTL specific styles */
body.rtl {
    direction: rtl;
    text-align: right;
    background-color: #f8f9fa;
}

body.rtl .main-sidebar {
    position: fixed !important;
    right: 0 !important;
    left: auto !important;
    top: 0;
    bottom: 0;
    background-color: #343a40;
    width: 250px;
    z-index: 1038;
    transition: all 0.3s ease-in-out;
}

body.rtl .content-wrapper {
    margin-right: 250px !important;
    margin-left: 0 !important;
}

body.rtl .main-header {
    margin-right: 250px !important;
    margin-left: 0 !important;
}

/* Mobile responsive fixes for RTL */
@media (max-width: 991.98px) {
    body.rtl .main-sidebar {
        right: -250px !important;
        transition: right 0.3s ease-in-out;
    }

    body.rtl .content-wrapper,
    body.rtl .main-header {
        margin-right: 0 !important;
        margin-left: 0 !important;
        width: 100% !important;
    }

    body.rtl.sidebar-open .main-sidebar {
        right: 0 !important;
    }
}

/* Sidebar RTL fixes */
body.rtl .nav-sidebar {
    padding: 0;
}

body.rtl .nav-sidebar .nav-item {
    width: 100%;
}

body.rtl .nav-sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #e6e6e6;
    text-align: right;
}

body.rtl .nav-sidebar .nav-icon {
    margin-left: 10px;
    margin-right: 0;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

body.rtl .nav-sidebar .nav-link.active {
    background-color: #eb5307;
    color: #fff;
}

body.rtl .nav-sidebar .nav-link:hover:not(.active) {
    color: #eb5307;
    background: transparent;
}

body.rtl .nav-sidebar .nav-treeview {
    padding-right: 15px;
    margin-bottom: 15px;
    border-right: 2px solid rgba(255,255,255,0.1);
    margin-right: 15px;
}

body.rtl .user-panel {
    direction: rtl;
    text-align: right;
}

body.rtl .user-panel .image {
    padding-right: 0;
    padding-left: 8px;
}

body.rtl .sidebar-collapse .main-sidebar {
    margin-right: -250px;
    margin-left: 0;
}

body.rtl .sidebar-mini.sidebar-collapse .content-wrapper,
body.rtl .sidebar-mini.sidebar-collapse .main-footer,
body.rtl .sidebar-mini.sidebar-collapse .main-header {
    margin-right: 4.6rem !important;
    margin-left: 0 !important;
}

body.rtl .sidebar-mini.sidebar-collapse .main-sidebar {
    margin-right: 0;
    width: 4.6rem !important;
}

/* DataTables RTL fixes */
body.rtl .dataTables_wrapper .dataTables_filter {
    text-align: left;
}

body.rtl .dataTables_wrapper .dataTables_filter input {
    margin-right: 0.5em;
    margin-left: 0;
}

body.rtl .dataTables_wrapper .dataTables_length {
    float: right;
}

body.rtl table.dataTable thead th,
body.rtl table.dataTable thead td,
body.rtl table.dataTable tbody td {
    text-align: right;
}

/* Form elements RTL fixes */
body.rtl .select2-container--default .select2-selection--single .select2-selection__arrow {
    left: 1px;
    right: auto;
}

body.rtl .form-check-input {
    margin-right: -1.25rem;
    margin-left: 0;
}

/* Card RTL fixes */
body.rtl .card-title {
    float: right;
}

body.rtl .card-tools {
    float: left;
}

/* Utility classes RTL fixes */
body.rtl .mr-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

body.rtl .ml-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

body.rtl .text-right {
    text-align: left !important;
}

body.rtl .text-left {
    text-align: right !important;
}

body.rtl .float-right {
    float: left !important;
}

body.rtl .float-left {
    float: right !important;
}

body.rtl .dropdown-menu-right {
    right: auto !important;
    left: 0 !important;
}

/* Preserve existing styles */
.ck-editor__editable,
textarea {
    min-height: 150px;
}

.datatable {
    width: 100% !important;
}

table.dataTable tbody td.select-checkbox::before,
table.dataTable tbody td.select-checkbox::after,
table.dataTable tbody th.select-checkbox::before,
table.dataTable tbody th.select-checkbox::after {
    top: 50%;
}

.dataTables_length,
.dataTables_filter,
.dt-buttons {
    margin-bottom: 0.475569em;
}

.dt-buttons .btn {
    margin-left: 0.475569em;
    border-radius: 0;
}

.table.datatable {
    box-sizing: border-box;
    border-collapse: collapse;
}

table.dataTable thead th {
    border-bottom: 2px solid #dee2e6;
}

.dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #dee2e6;
}

.select2 {
    max-width: 100%;
    width: 100%;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none;
}

.btn-group-xs > .btn,
.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.searchable-title {
    font-weight: bold;
}
.select2-container--open {
    z-index: 9999;
}
.searchable-fields {
    padding-left:5px;
}
.searchable-link {
    padding:0 5px 0 5px;
}
.searchable-link:hover   {
    cursor: pointer;
    background: #eaeaea;
}
.select2-results__option {
    padding-left: 0px;
    padding-right: 0px;
}

.form-group .required::after {
    content: " *";
    color: rgb(211, 211, 211);
}

.form-check.is-invalid ~ .invalid-feedback {
    display: block;
}

.dataTables_length label select {
    width: 65px!important;
}

div.dt-button-collection {
    padding: 0;
}

.buttons-columnVisibility {
    display: block;
}

.buttons-columnVisibility.active {
    background-color: rgba(203, 191, 191, 0.1);
    font-weight: bolder;
}

.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active{
    background-color: #eb5307;
    color: #fff;
}
.sidebar-dark-primary .nav-sidebar>.nav-item.menu-open>.nav-link, .sidebar-dark-primary .nav-sidebar>.nav-item:hover>.nav-link{
    color:#eb5307;
}
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-treeview{
    margin-bottom: 15px;
}
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link{
    color:#e6e6e6;
    padding: 12px 10px ;
    border-radius: 8px;
    font-weight: 500;
    font-size: 15px;
}
.sidebar-dark-primary .nav-treeview > .nav-item > .nav-link{
    color: #e6e7e8;
}
.sidebar-dark-primary .nav-treeview > .nav-item > .nav-link:hover{
    color: #eb5307;
}
.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active{
    color: #eb5307;
    background: #e6e6e6;
    box-shadow: none;
    border-radius: 0px;
}
.nav-sidebar > .nav-item .nav-icon{
    margin-right: 8px;
}
.main-header{
    padding: 15px 0px;
    border: none !important;
}
.main-sidebar{
    border-right: 1px solid #feffff;
    box-shadow: none !important;
}
.sidebar{
    scrollbar-width: none; /* For Firefox */
    -ms-overflow-style: none; /* For Internet Explorer and Edge */
    padding-bottom: 20px;
}
.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active::before{
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background-color: #eb5307;
    border-radius: 0 5px 5px 0;
}
.logoic{
    display: none;
    opacity: 0;
    visibility: hidden;
}
.logoic{
    display: none;
    opacity: 0;
    visibility: hidden;
}
.sidebar-collapse .logoic{
    display: block;
    opacity: 1;
    visibility: visible;
}
.login-wrap{
    box-shadow: none;
    border: 2px solid #E9EBEA;
    border-radius: 8px;
    background: #fff;
    padding: 25px;
}
.form-control{
    border: 1px solid #E2E8F0;
    min-height: 48px;
    font-size: 14px;
    box-shadow: none !important;
    border-radius: 5px;
    color: #475569;
}
.form-control::placeholder{
    color: #999999;
}
[class*=icheck-]>input:first-child+input[type=hidden]+label::before, [class*=icheck-]>input:first-child+label::before{
    width: 18px;
    height: 18px;
    border: 1px solid #D1D7D5;
    border-radius: 4px;
}
.btn-theme{
    background: #eb5307;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px !important;
    font-size: 15px;
    font-weight: 600;
    height: 38px;
    line-height: 1.2;
}
.btn-theme:hover,
.btn-theme:active
.btn-theme:focus{
    background: #eb5307;
    color: #fff;
}
button[type="submit"].btn-theme{
    padding: 10px 40px;
    font-size: 16px;
    font-weight: 600;
    height: 47px;
    line-height: 1.2;
}
.btn.btn-success{
    padding: 10px 20px;
    border-radius: 4px !important;
    font-size: 15px;
    font-weight: 400;
    height: 38px;
    line-height: 1.1;
}
.text-theme{
    color: #eb5307;
}
.font-weight-300{
    font-weight: 300;
}
.font-weight-400{
    font-weight: 400;
}
.font-weight-500{
    font-weight: 500;
}
.font-weight-600{
    font-weight: 600;
}
.font-weight-700{
    font-weight: 700;
}
.font-weight-800{
    font-weight: 800;
}
.form-control:focus{
    border-color: #eb5307;
    box-shadow: inset 0 0 0 transparent, 0 0 0 0.2rem rgb(219 29 74 / 16%) !important;
}
.icheck-primary>input:first-child:checked+input[type=hidden]+label::before, .icheck-primary>input:first-child:checked+label::before{
    background-color: #eb5307;
    border-color: #eb5307;
}
[class*=icheck-]>input:first-child:checked+input[type=hidden]+label::after, [class*=icheck-]>input:first-child:checked+label::after{
    width: 6px;
    height: 9px;
    transform: translate(6.75px, 3.5px) rotate(45deg);
    -ms-transform:  translate(6.75px, 3.5px) rotate(45deg);
}
.page-link, .page-link:hover{
    color: #eb5307;
}
.after-none::after{
    display: none;
}
.user-dropdown button{
    background: transparent;
    border: 1px solid #EEEEEE;
    padding: 8px 14px 8px 8px;
    border-radius: 100px;
    color: #F6FCF9;
    box-shadow: none;
    font-weight: 600;
    box-shadow: none !important;
}
.user-dropdown button:hover,
.user-dropdown button:focus,
.user-dropdown button:active{
    color: #009849 !important;
    background: #F6FCF9 !important;
    color: #ddd5d5 !important;
    border-color: #009849 !important;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #374151;
    flex: 1;
}

.card-header .btn-add {
    margin-left: auto;
}

.card-body {
    padding: 1.5rem;
}

.login-page, .register-page {
    background: #1e293b;
}

a:hover {
    color: #F6FCF9;
    text-decoration: none;
}

.brand-link{
    padding: 25px 0px 20px 0px;
}

.content-wrapper > .content{
    padding: 25px 25px !important;
}

.main-footer{
    border-top: 1px solid #e4eef7;
}

.dt-buttons .btn{
    border-radius: 3px;
    font-size: 13px;
    padding: 5px 12px;
}

div.dataTables_wrapper div.dataTables_length label{
    font-size: 13px;
}

.input-group-sm > .input-group-append > select.btn:not([size]):not([multiple]), .input-group-sm > .input-group-append > select.input-group-text:not([size]):not([multiple]), .input-group-sm > .input-group-prepend > select.btn:not([size]):not([multiple]), .input-group-sm > .input-group-prepend > select.input-group-text:not([size]):not([multiple]), .input-group-sm > select.form-control:not([size]):not([multiple]), select.form-control-sm:not([size]):not([multiple]){
    height: 35px;
    min-height: 35px;
    font-size: 13px;
    line-height: 1;
}

div.dataTables_wrapper div.dataTables_filter input{
    min-height: 35px;
    font-size: 13px;
}

.search-input-id input{
    width: 60px !important;
}

.search-input-name input{
    width: 100px !important;
}

.pagination li:first-child a{
    border-radius: 3px 0px 0px 3px;
}

.pagination li:last-child a{
    border-radius: 0px 3px 3px 0px;
}

.table.datatable tr td,
.table.datatable  th{
    padding: 15px 15px 15px 20px;
    border-color: #F1F5F9;
    font-size: 15px;
    color: #64748B;
}

.table.datatable tr td:last-child{
    white-space: nowrap;
}

.btn-xs {
    border-radius: 3px !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple{
    border-color: #e2e8f0;
}

.select2-container .select2-selection--multiple{
    min-height: 48px;
}

.table-striped tbody tr:nth-of-type(odd){
    background: #fff;
}

.table-hover tbody tr:hover{
    background: #fff;
}

.badge{
    font-weight: 400;
}

.dropzone{
    border: 1px solid #E2E8F0 !important;
    border-radius: 4px !important;
}

.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){
    border-color: #E2E8F0 !important;
}

.ck.ck-toolbar.ck-toolbar_grouping{
    border-color: #E2E8F0 !important;
}

.label.label-info{
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 3px;
    display: inline-block;
    font-size: 12px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice{
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    background-color: #585252;
}

.logo-small{
    display: none;
}

.logo-small{
    display: none;
    margin: auto;
}

.sidebar-collapse .logo-small{
    display: block;
}

.sidebar-collapse .logo-large{
    display: none;
}

table.dataTable .select-checkbox:before{
    border: 1px solid #dee2e6 !important;
    width: 16px !important;
    height: 16px !important;
}

/* dashboard page css start  */
.dash-box{
    background: #fff;
    border-radius: 6px;
    padding: 20px 18px;
    display: flex;
    gap: 20px;
    border: 1px solid #e4eef7;
}

.dash-box i{
    width: 46px;
    height: 46px;
    border-radius: 100px;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #7bd0e829;
    color: #219cd3;
}

.dash-box-value{
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
}

.page-title,
.page-title h2{
    font-size: 28px;
    font-size: 400;
}

/* Theme Color Fixes */
body.rtl .sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active {
    background-color: #eb5307;
    color: #fff;
    border-radius: 8px;
}

body.rtl .sidebar-dark-primary .nav-sidebar>.nav-item:hover>.nav-link {
    color: #eb5307;
}

body.rtl .sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link {
    color: #e6e6e6;
    padding: 12px 10px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 15px;
}

body.rtl .sidebar-dark-primary .nav-treeview>.nav-item>.nav-link {
    color: #e6e7e8;
}

body.rtl .sidebar-dark-primary .nav-treeview>.nav-item>.nav-link:hover {
    color: #eb5307;
}

/* Content area RTL fixes */
body.rtl .main-header {
    position: relative;
    margin-right: 250px !important;
    margin-left: 0 !important;
    background: transparent;
    border: none;
    transition: margin-right 0.3s ease-in-out;
}

/* Table styling */
body.rtl .table {
    text-align: right;
}

body.rtl .dt-buttons {
    float: right;
    margin-right: 0;
    margin-left: 10px;
}

/* Action buttons */
body.rtl .btn-group {
    direction: ltr;
}

/* Search fields */
body.rtl .search-row input,
body.rtl .search-row select {
    text-align: right;
}

/* Pagination */
body.rtl .dataTables_paginate {
    float: left;
}

/* Header elements */
body.rtl .page-title {
    margin-bottom: 20px;
}

body.rtl .add-new-button {
    float: left;
}

/* Existing styles */
body {
    font-size: 14px;
    color: #475569;
}

/* RTL Styles */
body.rtl {
    direction: rtl;
    text-align: right;
    background-color: #f8f9fa;
}

/* Sidebar RTL fixes */
body.rtl .main-sidebar {
    position: fixed !important;
    right: 0 !important;
    left: auto !important;
    top: 0;
    bottom: 0;
    background-color: #343a40;
    width: 250px;
    z-index: 1038;
    transition: all 0.3s ease-in-out;
}

/* Content wrapper RTL fixes */
body.rtl .content-wrapper {
    position: relative;
    margin-right: 250px !important;
    margin-left: 0 !important;
    min-height: 100vh;
    transition: margin-right 0.3s ease-in-out;
}

/* Header RTL fixes */
body.rtl .main-header {
    position: relative;
    margin-right: 250px !important;
    margin-left: 0 !important;
    background: transparent;
    border: none;
    transition: margin-right 0.3s ease-in-out;
}

/* Navigation RTL fixes */
body.rtl .nav-sidebar {
    padding: 0;
}

body.rtl .nav-sidebar .nav-item {
    width: 100%;
}

body.rtl .nav-sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #e6e6e6;
    text-align: right;
}

body.rtl .nav-sidebar .nav-icon {
    margin-left: 10px;
    margin-right: 0;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

body.rtl .nav-sidebar .nav-link.active {
    background-color: #eb5307;
    color: #fff;
}

body.rtl .nav-sidebar .nav-link:hover:not(.active) {
    color: #eb5307;
    background: transparent;
}

/* Brand/Logo RTL fixes */
body.rtl .brand-link {
    display: flex;
    align-items: center;
    padding: 15px;
    border: none;
    justify-content: flex-start;
}

body.rtl .brand-image {
    float: right;
    max-height: 33px;
    margin-left: 10px;
    margin-right: 0;
}

/* Table RTL fixes */
body.rtl .table {
    text-align: right;
}

body.rtl .table th,
body.rtl .table td {
    text-align: right;
}

/* DataTables RTL fixes */
body.rtl .dt-buttons {
    float: right;
    margin-left: 10px;
}

body.rtl .dataTables_filter {
    text-align: left;
    float: left;
}

body.rtl .dataTables_wrapper .dataTables_filter input {
    margin-right: 0.5em;
    margin-left: 0;
}

/* Dropdown RTL fixes */
body.rtl .dropdown-menu {
    text-align: right;
    right: auto !important;
    left: 0 !important;
}

/* Margin utilities RTL fixes */
body.rtl .mr-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

body.rtl .ml-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* Mobile responsive fixes */
@media (max-width: 991.98px) {
    body.rtl .main-sidebar {
        position: fixed !important;
        right: -250px !important;
        left: auto !important;
        transition: right 0.3s ease-in-out;
    }

    body.rtl .content-wrapper,
    body.rtl .main-header {
        position: relative;
        margin-right: 0 !important;
        margin-left: 0 !important;
        width: 100% !important;
    }

    body.rtl.sidebar-open .main-sidebar {
        right: 0 !important;
    }

    body.rtl.sidebar-open .content-wrapper,
    body.rtl.sidebar-open .main-header {
        margin-right: 0 !important;
    }

    body.rtl .nav-item {
        text-align: right;
    }

    body.rtl .navbar-nav {
        padding-right: 0;
    }

    body.rtl .nav-sidebar .nav-link {
        padding: 12px 15px;
    }
}

/* Collapsed sidebar fixes */
body.rtl.sidebar-mini.sidebar-collapse .main-sidebar {
    margin-right: 0 !important;
    width: 4.6rem !important;
}

body.rtl.sidebar-mini.sidebar-collapse .content-wrapper,
body.rtl.sidebar-mini.sidebar-collapse .main-footer,
body.rtl.sidebar-mini.sidebar-collapse .main-header {
    margin-right: 4.6rem !important;
    margin-left: 0 !important;
    width: calc(100% - 4.6rem) !important;
}

body.rtl.sidebar-mini.sidebar-collapse .nav-sidebar .nav-link {
    padding-right: 15px;
}

/* Treeview menu RTL fixes */
body.rtl .nav-sidebar .nav-treeview {
    padding-right: 15px;
    margin-bottom: 15px;
    border-right: 2px solid rgba(255,255,255,0.1);
    margin-right: 15px;
}

/* Form elements RTL fixes */
body.rtl .form-control {
    text-align: right;
}

body.rtl .input-group .input-group-append {
    margin-right: -1px;
    margin-left: 0;
}

body.rtl .input-group .input-group-prepend {
    margin-left: -1px;
    margin-right: 0;
}

/* Card RTL fixes */
body.rtl .card-header {
    text-align: right;
}

body.rtl .card-title {
    float: right;
}

body.rtl .card-tools {
    float: left;
}

/* RTL Sidebar Collapse Fixes */
body.rtl.sidebar-collapse .main-sidebar {
    margin-right: 0 !important;
    width: 4.6rem !important;
}

body.rtl.sidebar-collapse .main-sidebar .brand-text,
body.rtl.sidebar-collapse .main-sidebar .nav-sidebar .nav-link p {
    display: none !important;
}

body.rtl.sidebar-collapse .main-sidebar:hover {
    width: 250px !important;
}

body.rtl.sidebar-collapse .main-sidebar:hover .brand-text,
body.rtl.sidebar-collapse .main-sidebar:hover .nav-sidebar .nav-link p {
    display: inline-block !important;
}

/* RTL Language Dropdown Fix */
body.rtl .navbar-nav .dropdown-menu {
    position: absolute !important;
    right: auto !important;
    left: 0 !important;
    z-index: 1040 !important;
}

/* RTL Mobile Sidebar Button Fix */
@media (max-width: 991.98px) {
    body.rtl .main-header {
        z-index: 1039 !important;
    }

    body.rtl .nav-item .nav-link[data-widget="pushmenu"] {
        z-index: 1040 !important;
        position: relative !important;
    }

    body.rtl.sidebar-open .main-sidebar {
        right: 0 !important;
        z-index: 1038 !important;
    }

    body.rtl .navbar-nav .nav-item:first-child {
        position: fixed !important;
        right: 0 !important;
        z-index: 1040 !important;
        background: white !important;
        padding: 10px !important;
        margin: 5px !important;
        border-radius: 4px !important;
    }
}

/* Mobile RTL Sidebar Button Fix */
@media (max-width: 991.98px) {
    body.rtl .main-header .navbar-nav {
        margin-right: 5px;
    }

    body.rtl .nav-item .nav-link[data-widget="pushmenu"] {
        position: fixed;
        top: 15px;
        right: 15px;
        background: white;
        padding: 8px 12px;
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        z-index: 1041;
    }
}

/* Button Styles */
.btn-add {
    background-color: #e74d07;
    border-color: #e74d07;
    color: #fff;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-add:hover {
    background-color: #e74d07;
    border-color: #e74d07;
    color: #fff;
    text-decoration: none;
}

.btn-add i {
    font-size: 0.875rem;
}

/* Table Styles */
.table thead th {
    background-color: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    color: #374151;
    font-size: 0.875rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Info Display Styles */
.info-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-icon {
    width: 40px;
    height: 40px;
    background-color: #e5e7eb;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
}

.info-details {
    display: flex;
    flex-direction: column;
}

.info-title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.info-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Status Switch */
.status-switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 24px;
}

.status-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.status-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: .4s;
    border-radius: 24px;
}

.status-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.status-switch input:checked + .status-slider {
    background-color: #eb4e08;
}

.status-switch input:checked + .status-slider:before {
    transform: translateX(21px);
}

/* Badge Styles */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background-color: #dcfce7;
    color: #059669;
}

.badge-warning {
    background-color: #fef3c7;
    color: #d97706;
}

/* Action Buttons */
.actions-column {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-action {
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: none;
    background-color: transparent;
    color: #6b7280;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-action:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.btn-action.view-btn:hover {
    color: #3b82f6;
}

.btn-action.edit-btn:hover {
    color: #059669;
}

.btn-action.delete-btn:hover {
    color: #dc2626;
}

.btn-action.cancel-btn:hover {
    color: #f59e0b;
}

/* Search Filters */
.search-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-filters input,
.search-filters select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    min-width: 200px;
}

.search-filters input:focus,
.search-filters select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 1px #0ea5e9;
}

/* Schedule List */
.schedule-list {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 0.5rem;
}

.schedule-item {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.schedule-item:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.schedule-item.selected {
    background-color: #f0f9ff;
    border-color: #0ea5e9;
}

/* Select2 Customization */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 38px;
    padding: 5px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    color: #212529;
    padding-left: 5px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
    right: 5px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #eb5307 !important;
    color: #ffffff !important;
}

.select2-results__option[aria-selected=true] {
    background-color: #f8f9fa !important;
    color: #eb5307 !important;
}

.select2-results__option {
    padding: 8px 12px;
    color: #475569;
}

.select2-results__option:hover {
    background-color: #f8f9fa !important;
    color: #eb5307 !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #0a0a0a;
    border-radius: 4px;
}

.select2-dropdown {
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #eb5307;
    box-shadow: 0 0 0 0.2rem rgba(235, 83, 7, 0.25);
}

/* Form Control Consistency */
.form-control,
.select2-container--default .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #6c757d;
    background-color: transparent;
    border: 1px solid #6c757d;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.btn-back:hover {
    color: #fff;
    background-color: #6c757d;
    text-decoration: none;
}

.btn-back i {
    margin-right: 0.5rem;
}

/* Language Selector Positioning */
.language-nav {
    margin-left: auto !important;
    margin-right: 0 !important;
    padding-right: 15px;
}

body.rtl .language-nav {
    margin-right: auto !important;
    margin-left: 0 !important;
    padding-right: 0;
    padding-left: 15px;
}

/* Language Selector Styles */
.language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    color: #6c757d;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    min-width: 100px;
    justify-content: center;
}

.language-selector:hover {
    background: #e9ecef;
    color: #333;
    border-color: #ced4da;
}

/* Flag Icons */
.language-flag {
    width: 20px;
    height: 15px;
    display: inline-block;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.flag-en {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3CclipPath id='a'%3E%3Cpath d='M0 0v30h60V0z'/%3E%3C/clipPath%3E%3CclipPath id='b'%3E%3Cpath d='M30 15h30v15zv15H0zH0V0zV0h30z'/%3E%3C/clipPath%3E%3Cpath fill='%23012169' d='M0 0v30h60V0z'/%3E%3Cpath stroke='%23fff' stroke-width='6' d='M0 0l60 30m0-30L0 30' clip-path='url(%23a)'/%3E%3Cpath stroke='%23C8102E' stroke-width='4' d='M0 0l60 30m0-30L0 30' clip-path='url(%23b)'/%3E%3Cpath stroke='%23fff' stroke-width='10' d='M30 0v30M0 15h60' clip-path='url(%23a)'/%3E%3Cpath stroke='%23C8102E' stroke-width='6' d='M30 0v30M0 15h60' clip-path='url(%23a)'/%3E%3C/svg%3E");
}

.flag-he {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1100 800'%3E%3Cpath fill='%23fff' d='M0 0h1100v800H0z'/%3E%3Cpath fill='%230038b8' d='M0 100h1100v600H0z'/%3E%3Cpath fill='none' stroke='%230038b8' stroke-width='50' d='M550 400L100 700 550 100l450 600z'/%3E%3C/svg%3E");
}

/* Language Dropdown Menu */
.language-dropdown {
    min-width: 160px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
    padding: 0;
    margin-top: 4px;
}

.language-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    transition: all 0.2s;
    border-bottom: 1px solid #f1f1f1;
}

.language-item:last-child {
    border-bottom: none;
}

.language-item:hover {
    background: #f8f9fa;
}

.language-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* RTL specific adjustments */
body.rtl .language-selector {
    flex-direction: row-reverse;
}

body.rtl .language-item {
    flex-direction: row-reverse;
}

body.rtl .language-dropdown {
    left: 0;
    right: auto;
}

/* Roles List Page Styles */
.datatable-Role thead tr th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    background-color: #f8f9fa;
    border-top: none;
    padding: 0.75rem;
}

.datatable-Role tbody tr td {
    vertical-align: middle;
    padding: 0.75rem;
}

.role-badge {
    display: inline-block;
    padding: 0.4em 0.8em;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
    background-color: #e3f2fd;
    color: #1976d2;
    margin: 0.125rem;
}
