/* =================================================
   🌐 الواجهة العامة
================================================= */
body {
    font-family: "Cairo", "Tajawal", sans-serif;
}

.content-wrapper .content {
    max-width: 100% !important;
    padding: 20px !important;
}

.table-responsive {
    overflow-x: auto;
}

.btn {
    padding: 6px 12px;
    font-size: 14px;
}

/* =================================================
   🧱 الكروت
================================================= */
.card {
    border-radius: 15px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    border: none !important;
    margin-bottom: 20px !important;
}

.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

/* =================================================
   📱 تحسين الجوال العام
================================================= */
@media (max-width: 768px) {
    .card {
        margin-bottom: 14px !important;
    }

    table {
        font-size: 13px;
    }
}

/* =================================================
   🎯 زر Excel (نبض)
================================================= */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(40,167,69,0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 12px rgba(40,167,69,0.8); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(40,167,69,0.4); }
}

/* =================================================
   🧭 سلاسة التمرير
================================================= */
html {
    scroll-behavior: smooth;
}

/* =================================================
   🤖 المساعد (موجود لكن غير مؤثر)
================================================= */
#assistant-toggle,
#assistant-box {
    display: none !important;
}

/* =================================================
   🧾 الفوتر (White Label)
================================================= */
footer,
.footer {
    display: none !important;
}

.main-footer > strong,
.main-footer > div,
.main-footer span,
.main-footer a {
    display: none !important;
}

.main-footer {
    display: block !important;
    background: transparent !important;
    border-top: none !important;
    text-align: center;
    padding: 0 !important;
    margin-top: 25px;
}

body:not([class*="theme-dark"]) .main-footer::after {
    content: "© 2026 –  Systems | Developed by Ashraf Omer";
    display: block;
    color: #4624c0;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 0;
}

body[class*="theme-dark"] .main-footer::after {
    content: "© 2026 –  Systems | Developed by Ashraf Omer";
    display: block;
    color: #ddd;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 0;
}

/* =================================================
   🧭 القائمة الجانبية – الإصلاح النهائي (RTL + Jazzmin)
================================================= */

/* ===== Desktop ===== */
@media (min-width: 992px) {

    .main-sidebar {
        position: fixed;
        right: 0;
        width: 250px;
        height: 100vh;
        z-index: 1030;
    }

    .content-wrapper {
        margin-right: 250px !important;
        transition: margin-right 0.3s ease;
    }

    body.sidebar-collapse .content-wrapper {
        margin-right: 0 !important;
    }
}

/* ===== Mobile ===== */
@media (max-width: 991px) {

    .content-wrapper {
        margin-right: 0 !important;
        padding-right: 0 !important;
    }

    .main-sidebar {
        position: fixed;
        right: 0;
        top: 0;
        width: 250px;
        height: 100vh;
        z-index: 1050;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    body.sidebar-open .main-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

/* =================================================
   📱 إصلاح "آخر الإجراءات" في الجوال فقط
================================================= */
@media (max-width: 991px) {

    .dashboard,
    .dashboard * {
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .dashboard .row {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    .dashboard [class*="col-"] {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    .timeline,
    .timeline-item {
        width: 100% !important;
        overflow-x: hidden;
    }

    .timeline-item * {
        word-break: break-word;
        white-space: normal !important;
    }
}


/* 🧨 إصلاح الفراغ الأبيض الجانبي نهائيًا */
html, body {
    width: 100%;
    overflow-x: hidden !important;
}

.content-wrapper {
    width: 100% !important;
    margin-right: 0 !important;
}


/* ===============================
   🧱 تثبيت الفوتر وعدم تحركه مع القائمة
=============================== */

/* منع الفوتر من اتباع content-wrapper */
.main-footer {
    position: relative !important;
    margin-right: 0 !important;
    width: 100% !important;
    right: 0 !important;
    left: 0 !important;
}

/* إلغاء أي تأثير من القائمة الجانبية */
body:not(.sidebar-collapse) .main-footer,
body.sidebar-collapse .main-footer {
    margin-right: 0 !important;
}

/* في الجوال */
@media (max-width: 991px) {
    .main-footer {
        margin-right: 0 !important;
        width: 100% !important;
    }
}


/* =========================================
   🟣 إصلاح الهيدر (Navbar) – RTL + Jazzmin
========================================= */

/* الهيدر دائمًا بعرض الشاشة */
.main-header,
.navbar {
    margin-right: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
}

/* منع الهيدر من التأثر بالقائمة */
body:not(.sidebar-collapse) .main-header,
body.sidebar-collapse .main-header {
    margin-right: 0 !important;
}

/* الجوال */
@media (max-width: 991px) {
    .main-header,
    .navbar {
        margin-right: 0 !important;
        width: 100% !important;
    }
}


/* =========================================
   📱 إصلاح "آخر الإجراءات" في الجوال (Timeline)
========================================= */
@media (max-width: 768px) {

    /* الحاوية كاملة */
    .timeline {
        padding-right: 0 !important;
        margin-right: 0 !important;
    }

    /* كل عنصر في التايملاين */
    .timeline-item {
        margin-right: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }

    /* كرت الحدث نفسه */
    .timeline-item .card,
    .timeline-item .timeline-item-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 12px auto !important;
        box-sizing: border-box !important;
    }

    /* النص داخل الكرت */
    .timeline-item .card-body {
        padding: 12px !important;
        text-align: right;
        word-break: break-word;
        white-space: normal;
    }

    /* أيقونة الساعة والدائرة */
    .timeline-item .timeline-icon,
    .timeline > li > i {
        right: 0 !important;
        left: auto !important;
    }

    /* إزالة أي إزاحة غبية */
    .timeline::before {
        right: 10px !important;
        left: auto !important;
    }
}



