body {
    font-family: 'Cairo', sans-serif; /* استخدام خط Cairo */
    overflow-x: hidden; /* لمنع ظهور شريط تمرير أفقي غير ضروري */
    background-color: #fdf6f9; /* لون خلفية بناتي فاتح جداً (وردي باهت) */
}

#wrapper {
    display: flex;
    min-height: calc(100vh - 56px - 56px); /* ارتفاع الشاشة ناقص ارتفاع الهيدر والفوتر التقريبي */
}

#sidebar-wrapper {
    min-height: 100vh; /* ارتفاع كامل للشريط الجانبي */
    margin-left: -15rem; /* إخفاء الشريط الجانبي مبدئيًا */
    transition: margin .25s ease-out; /* حركة سلسة لظهور/إخفاء الشريط */
    width: 15rem;
    background-color: #f8e8ee !important; /* لون وردي فاتح للشريط الجانبي */
}

#sidebar-wrapper .sidebar-heading {
    padding: 0.875rem 1.25rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: #d15a85; /* لون وردي أغمق للنصوص المميزة */
}

#sidebar-wrapper .list-group-item {
    border: none; /* إزالة حدود العناصر */
    color: #7c5c69; /* لون نص عادي في الشريط الجانبي */
    font-weight: 500;
}

#sidebar-wrapper .list-group-item:hover,
#sidebar-wrapper .list-group-item.active-pink {
    background-color: #eecddc !important; /* لون وردي أفتح عند التحويم أو للعنصر النشط */
    color: #a54867 !important; /* لون نص أغمق للعنصر النشط/عند التحويم */
    border-left: 4px solid #d15a85; /* شريط جانبي للعنصر النشط */
}

#sidebar-wrapper .list-group-item-light-pink {
    background-color: #f8e8ee; /* لون أساسي لعناصر القائمة */
}

#sidebar-wrapper .sidebar-section-header {
    font-weight: bold;
    color: #a54867;
    background-color: #f3d9e3 !important; /* لون خلفية مختلف قليلاً لرؤوس الأقسام */
    padding-top: 1rem;
    padding-bottom: 0.5rem;
}

#page-content-wrapper {
    min-width: 100vw; /* عرض كامل لمحتوى الصفحة مبدئيًا */
    flex-grow: 1; /* السماح للمحتوى بالامتداد */
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: 0; /* إظهار الشريط الجانبي */
}

#wrapper.toggled #page-content-wrapper {
    min-width: calc(100vw - 15rem); /* تقليل عرض المحتوى عند ظهور الشريط */
    width: calc(100vw - 15rem);
}

.navbar {
    background-color: #f8e8ee !important; /* لون وردي فاتح للهيدر */
}

.btn-outline-pink {
    color: #d15a85;
    border-color: #d15a85;
}

.btn-outline-pink:hover {
    background-color: #d15a85;
    color: white;
}

.page-title-header {
    color: #a54867;
    font-weight: bold;
}

.footer {
    background-color: #f8e8ee !important; /* لون وردي فاتح للفوتر */
    color: #7c5c69 !important;
    padding: 1rem 0;
}

.footer .text-muted {
    color: #7c5c69 !important;
}

.bg-light-pink {
    background-color: #f8e8ee !important;
}

/* تعديلات لضمان أن الشريط الجانبي يظل فوق المحتوى عند التبديل في شاشات أصغر */
@media (min-width: 768px) { /* Bootstrap md breakpoint */
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: -15rem;
    }
}

/* Tab Styling */
.nav-tabs .nav-link.active {
    color: #a54867; /* Darker pink - same as sidebar active link */
    background-color: #fdf6f9; /* Light page background */
    border-color: #eecddc #eecddc #fdf6f9; /* Borders to match theme */
    font-weight: bold;
}

.nav-tabs .nav-link {
    color: #7c5c69; /* Regular sidebar text color */
}

.nav-tabs .nav-link:hover {
    border-color: #eecddc;
    color: #a54867;
}

/* assets/css/style.css */

/* ... your existing styles ... */

@media print {
    body {
        font-family: 'Arial', sans-serif; /* Common print font */
        font-size: 10pt; /* Adjust as needed for fitting */
        margin: 0;
        padding: 0;
        -webkit-print-color-adjust: exact !important; /* Chrome, Safari */
        color-adjust: exact !important; /* Firefox, Edge */
    }

    /* Hide elements not needed for print */
    #sidebar-wrapper, 
    .navbar, /* Your top navigation bar */
    .footer, /* Your screen footer */
    .card-header .btn, /* Hide export buttons in card header for print */
    .bg-light-pink .btn, /* General buttons in light pink headers */
    .btn-success, /* Hide save button if it's part of the report page inadvertently */
    .btn-secondary, /* Hide cancel button if it's part of the report page inadvertently */
    #schoolSelectForm { /* Hide the school selection dropdown for print */
        display: none !important;
    }
    
    .container-fluid {
        width: 100% !important;
        padding: 10mm 5mm !important; /* Adjust print margins */
        margin: 0 !important;
    }

    .print-header, .print-footer {
        display: block !important; /* Ensure they are visible for print */
    }
    .print-header strong, .print-footer strong { font-weight: bold; }


    .card {
        border: none !important;
        box-shadow: none !important;
        margin-bottom: 0.5cm !important;
    }
    .card-header { /* For the main report card header */
        background-color: transparent !important;
        border-bottom: 2px solid black !important;
        padding-bottom: 5px !important;
        text-align: center; /* Center title if needed */
    }
    .card-body {
        padding: 0 !important;
    }

    .table-responsive {
        overflow-x: visible !important; /* Allow table to use full width */
    }

    #summaryReportTable {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 8pt !important; /* May need to be smaller to fit */
        margin-top: 0.5cm;
    }

    #summaryReportTable th,
    #summaryReportTable td {
        border: 1px solid black !important; /* Essential for print table lines */
        padding: 2px 4px !important; /* Reduce padding for print */
        text-align: center !important;
        vertical-align: middle !important;
        white-space: nowrap; /* Keep for consistency unless it breaks layout */
    }
    #summaryReportTable thead th {
        background-color: #E0E0E0 !important; /* Light grey for header, adjust as needed */
        font-weight: bold;
        color: black !important;
    }
    /* Specific background colors from your image for headers */
    #summaryReportTable thead th[style*="background-color: #FFFFE0"] { background-color: #FFFFE0 !important; color: black !important; } /* Yellow */
    #summaryReportTable thead th[style*="background-color: #e9d8f0"], /* Maqid sub-cols */
    #summaryReportTable thead th[style*="background-color: #e6ffe6"] { background-color: #e6ffe6 !important; } /* Light green for Maqid sub-cols */
    
    #summaryReportTable thead th[style*="background-color: #ffcccb"] { background-color: #ffcccb !important; } /* Electroni header */
    #summaryReportTable thead th[style*="background-color: #add8e6"] { background-color: #add8e6 !important; } /* Waraqi header */
    #summaryReportTable thead th[style*="background-color: #f0f0f0"] { background-color: #f0f0f0 !important; } /* Group headers */


    /* Data cell styling from your PHP, ensure they print */
    #summaryReportTable tbody td[style*="background-color: #FFFFE0"] { background-color: #FFFFE0 !important; color: black !important; }
    #summaryReportTable tbody td[style*="background-color: #FFC0CB"] { background-color: #FFC0CB !important; color: #A52A2A !important; }
    #summaryReportTable tbody td[style*="background-color: #E0FFE0"] { background-color: #E0FFE0 !important; }
    #summaryReportTable tbody td[style*="background-color: #f0f0f0"] { background-color: #f0f0f0 !important; }


    #summaryReportTable tfoot td {
        background-color: #E0E0E0 !important;
        font-weight: bold;
        color: black !important;
    }
     #summaryReportTable tfoot td[style*="background-color: #FFFFE0"] { background-color: #FFFFE0 !important; color: black !important;}


    /* Attempt to fit on one page - this is the trickiest part */
    @page {
        size: A4 landscape; /* Or letter landscape, adjust as needed */
        margin: 1cm; /* Adjust margins for your printer */
    }
}