/* Custom Styles */
* {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    padding: 0;
}

aside {
    background-color: #002623 !important;
}

/* Print Styles */
@media print {
    .print-header {
        display: block !important;
    }

    aside,
    header,
    button {
        display: none !important;
    }

    main {
        width: 100% !important;
    }

    @page {
        margin: 2cm;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Table Hover Effect */
tbody tr:hover {
    background-color: #f9fafb;
}

/* Modal Animation */
#mosqueModal,
#studentModal,
#testModal,
#supervisorModal,
#associationModal,
#userModal {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Button Styles */
.bg-indigo-600 {
    background-color: #002623!important;
}


.btn-primary {
    background-color: #002623;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #4338ca;
}

.btn-danger {
    background-color: #dc2626;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background-color: #10b981;
    color: white;
}

.badge-danger {
    background-color: #ef4444;
    color: white;
}

.badge-warning {
    background-color: #cdcd2b;
    color: white;
}

.badge-info {
    background-color: #3b82f6;
    color: white;
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

/* Form Checkbox Styling */
.form-checkbox:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
}





/*print button*/
/* تحسينات عامة للجدول */
#printArea table {
    width: 100%;
}

#printArea th,
#printArea td {
    vertical-align: top;
}

/* ====== إعدادات الطباعة ====== */



@media print {

    /* A4 أفقي */
    /* @page {
        size: A4 landscape;
        margin: 10mm;
    } */

    /* إخفاء ما لا نحتاجه في الطباعة */
    aside,
    header,
    .no-print {
        display: none !important;
    }

    /* إظهار رأس الطباعة */
    .print-header {
        display: block !important;
    }

    /* إلغاء قيود الارتفاع/التمرير التي تسبب قص */
    body {
        background: #fff !important;
    }

    main {
        overflow: visible !important;
    }

    .flex.h-screen {
        height: auto !important;
        overflow: visible !important;
        display: block !important;
    }

    /* منطقة الطباعة */
    #printArea {
        overflow: visible !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    #printArea table {
        width: 90% !important;
        font-size: 12px;
        /* لتناسب الأعمدة */
    }

    /* تكرار رأس الجدول بكل صفحة + تقليل تقطيع الصفوف */
    thead {
        display: table-header-group;
    }

    tfoot {
        display: table-footer-group;
    }

    /* table {
        page-break-inside: avoid;
        break-inside: avoid;
    } */

    tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    td {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    th {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    thead {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* tbody {
        page-break-inside: avoid;
        break-inside: avoid;
    } */


    /* الحفاظ على الألوان (Tailwind) */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}