body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
span,
div,
input,
textarea,
.sidebar,
.main-content {
    font-family: 'Tajawal', sans-serif, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

body {
    background-color: #f6f7fb;
    /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
    margin: 0;
    padding: 0;
}

.sidebar {
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    background-color: #FF8C00;
    color: white;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-header img {
    opacity: 0;
    height: 0;
    overflow: hidden;
    padding: 0;
}

.sidebar-header img {
    max-height: 40px;
    margin-bottom: 10px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar-menu li.parent {
    cursor: pointer;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.sidebar-menu li.parent:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-menu li.parent a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    gap: 10px;
}

.sidebar-menu li.parent a i {
    font-size: 1.2em;
}

.sidebar-menu li.parent .submenu-toggle {
    transition: transform 0.3s ease;
}

.sidebar-menu li.parent.expanded .submenu-toggle {
    transform: rotate(90deg);
}


.sidebar-menu li.parent a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    gap: 10px;
}




.sidebar-menu .label {
    display: block;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .label {
    display: none;
}

.submenu {
    list-style: none;
    padding-right: 15px;
    margin: 5px 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.submenu.expanded {
    max-height: 500px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.submenu li {
    padding: 8px 10px;
    border-radius: 4px;
    margin: 4px 0;
    font-size: 0.9em;
}

.submenu a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.submenu a:hover {
    color: #fff;
}

.main-content {
    margin-right: 250px;
    padding: 20px;
    min-height: 100vh;
    transition: margin-right 0.3s ease;
}

.main-content.collapsed {
    margin-right: 60px;
}

/* Fixed Toggle Button in Top-Right */
.toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    color: #FF8C00;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.toggle-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.footer-logo {
    padding: 15px;
    text-align: center;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .footer-logo {
    opacity: 0;
    height: 0;
    overflow: hidden;
    padding: 0;
}

.footer-logo img {
    max-height: 60px;
}

/* .fa-plus {
    font-size: 1.6em !important;
} */

.p-2 {
    padding: 1.8rem !important;
}

.text-white:not(.card-header) {
    font-size: 35px;
}

.sidebar.collapsed {
    width: 75px;
}




/* Animated Logos - Pure CSS, No JS Class Toggle */

/* Top Logo Animation */
.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: opacity 0.3s ease;
}

.sidebar-header img {
    max-height: 40px;
    margin-bottom: 10px;

    /* Smooth transition for opacity and scale */
    transition: all 0.4s ease;
    transform: scale(1);
    opacity: 1;
}

/* Collapse: Fade out + shrink */
.sidebar.collapsed .sidebar-header img {
    opacity: 0;
    transform: scale(0.7) rotate(180deg);
}

/* Footer Logo Animation */
.footer-logo {
    padding: 15px;
    text-align: center;
    transition: opacity 0.3s ease;
}

.footer-logo img {
    max-height: 60px;

    /* Smooth transition */
    transition: all 0.4s ease;
    transform: scale(1);
    opacity: 1;
}

.sidebar.collapsed .footer-logo img {
    opacity: 0;
    transform: scale(0.6) rotate(180deg);
}

/* Hover Effect (only when visible) */
.sidebar-header img:hover,
.footer-logo img:hover {
    transform: scale(1.1) rotate(6deg);
    filter: brightness(1.2);
    cursor: pointer;
}

.viewLables {
    text-decoration: none !important;
    font-weight: bold;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.5rem;
    /* Slightly rounded */
    white-space: nowrap;
}


/* ////////////////////////////////////////////////////////// */
/* أساسيات التخطيط */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    /* RTL */
    width: 280px;
    /* background: #0f172a; */
    /* عدّل حسب تصميمك */
    color: #fff;
    z-index: 1040;
    /* فوق المحتوى وتحت الـ overlay */
    transition: transform .25s ease-in-out;
}

/* الزر العائم */
.toggle-btn {
    position: fixed;
    top: 14px;
    right: 14px;
    /* RTL */
    z-index: 1052;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 10px;

    display: grid;
    place-items: center;
}

/* الـ Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    visibility: hidden;
    z-index: 1041;
    transition: opacity .2s ease, visibility .2s ease;
}

/* الحالة الافتراضية على الشاشات الصغيرة: مغلق */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(100%);
        /* خارج الشاشة (يمين) في RTL */
    }

    .sidebar.open {
        transform: translateX(0);
        /* يدخل الشاشة */
    }

    .sidebar-overlay.show {
        opacity: 1;
        /* visibility: visible; */
    }

    /* لا نحتاج مسافة للمحتوى على الجوال */
    .main-content {
        margin-right: 0 !important;
        /* RTL */
    }
}

/* على الشاشات الكبيرة: يظهر ثابت (مفتوح) والمساحة محفوظة للمحتوى */
@media (min-width: 992px) {
    .sidebar {
        transform: none;
    }

    .sidebar-overlay {
        display: none;
    }

    .main-content {
        margin-right: 280px;
        /* RTL: اترك مساحة للجانب */
        transition: margin .25s ease;
    }
}


/* تمرير عمودي دائم + أفقي عند الشاشات الصغيرة */
.sidebar {
    max-height: 100dvh;
    /* يغطي ارتفاع الشاشة */
    overflow-y: auto;
    /* تمرير عمودي */
    overscroll-behavior: contain;
    /* منع سحب-تحديث مزعج على الموبايل */
    -webkit-overflow-scrolling: touch;
    /* سلاسة على iOS */
    scrollbar-gutter: stable both-edges;
}

/* تفعيل التمرير الأفقي عندما تكون الشاشة صغيرة */
@media (max-width: 576px) {
    .sidebar {
        overflow-x: auto;
        /* تمرير أفقي */
    }

    /* اجعل المحتوى أوسع قليلًا ليظهر الـ h-scroll عند الحاجة */
    .sidebar .sidebar-menu {
        display: inline-block;
        min-width: 320px;
        /* زِد/قلّل حسب طول العناوين */
        white-space: nowrap;
        /* لا يلف السطر -> يسمح بالتمرير الأفقي */
    }

    /* إن كانت القوائم الفرعية طويلة أفقيًا */
    .sidebar .submenu {
        white-space: nowrap;
        overflow-x: auto;
    }

    .sidebar .submenu li {
        display: inline-block;
        /* عناصر فرعية بجانب بعض */
    }
}

/* (اختياري) تحسين مظهر الشريط للمتصفحات المبنية على WebKit */
.sidebar::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .35);
    border-radius: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

/* (اختياري) اجعل هيدر الشريط ثابتًا عند التمرير */
.sidebar .sidebar-header {
    position: sticky;
    top: 0;
    z-index: 1;
    background: inherit;
}

#signature-pad {
    border: 1px dashed #cbd5e1;
    background: white;
    border-radius: 0.5rem;
}


.dt-buttons .btn {
    margin-left: 0.1rem !important;
    /* مسافة بين الأزرار */
    margin-right: 0.1rem !important;
}

.dataTables_filter {
    margin-top: 3px;
}