/* تطبيق خط Cairo على كامل الصفحة - تجاوز جميع الخطوط الافتراضية */
*,
*::before,
*::after,
body,
html,
h1, h2, h3, h4, h5, h6,
p, span, div, a, label, input, button, select, textarea,
.form-control, .form-select, .form-label,
.btn, .badge, .card, .modal, .table,
.stat-card-value, .stat-card-label,
.dropdown-menu, .dropdown-item,
.list-group-item, .pagination,
.alert, .progress, small, .text-muted,
.fw-bold, .fw-normal, .fw-light {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

body {
    background-color: #f8f9fa;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* تجاوز خطوط Bootstrap الافتراضية */
.btn, .form-control, .form-select, .form-label,
input, button, select, textarea {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* تطبيق خط Cairo على placeholder */
::placeholder,
::-webkit-input-placeholder,
::-moz-placeholder,
:-ms-input-placeholder,
:-moz-placeholder {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

input::placeholder,
textarea::placeholder,
.form-control::placeholder {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* تحسين الأزرار */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* تحسين البطاقات */
.card {
    transition: all 0.3s ease;
    border: none;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
}

/* تحسين الجداول */
.table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f1f3f5;
}

/* تحسين النماذج */
.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

/* الشريط الجانبي */
#sidebar-wrapper {
    background: linear-gradient(180deg, #1a1f36 0%, #2d3561 100%);
}

/* تحسين بطاقات الإحصائيات */
.stat-card {
    border-radius: 12px;
    overflow: hidden;
}

/* تحسين بطاقات الصفوف */
.class-card {
    border-radius: 12px;
    transition: all 0.3s ease;
}

.class-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* تحسين الأيقونات */
.bi {
    vertical-align: middle;
}

/* تحسين الـ Modal */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* تحسين الـ Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

/* تحسين الـ Badges */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 500;
}

/* تحسين Progress Bars */
.progress {
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
}

/* 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;
}

/* تحسين الصور الدائرية */
.rounded-circle {
    object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
    .table {
        font-size: 0.875rem;
    }
    
    .btn {
        font-size: 0.875rem;
    }
}

/* Animation للتحميل */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease;
}

/* تحسين القوائم المنسدلة */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    padding-right: 1.5rem;
}

/* تحسين Pagination */
.pagination .page-link {
    border: none;
    margin: 0 2px;
    border-radius: 6px;
    color: #667eea;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

/* تحسين List Group */
.list-group-item {
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

/* Print Styles */
@media print {
    #sidebar-wrapper,
    .navbar,
    .btn,
    .pagination {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}
