:root {
    --primary-color: #27ae60;
    --secondary-color: #2980b9;
    --sidebar-width: 260px;
    --bg-light: #f4f7f6;
}

body {
    margin: 0;
    display: flex;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--bg-light);
    direction: rtl;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: #2c3e50;
    color: white;
    height: 100vh;
    position: fixed;
    overflow-y: auto;
}

.sidebar .logo {
    padding: 20px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    background: #1a252f;
    color: var(--primary-color);
}

.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar ul li { border-bottom: 1px solid #34495e; }
.sidebar ul li a {
    display: block;
    padding: 15px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: 0.3s;
}

.sidebar ul li a:hover, .sidebar ul li.active a {
    background: #34495e;
    color: white;
    border-right: 4px solid var(--primary-color);
}

/* Main Content */
.main-content {
    margin-right: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.salary-filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-group { display: flex; flex-direction: column; gap: 8px; }
select, input { padding: 10px; border: 1px solid #ddd; border-radius: 5px; }

/* Table Styling */
table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; }
th { background: var(--primary-color); color: white; padding: 15px; }
td { padding: 12px; border-bottom: 1px solid #eee; text-align: center; }

.btn { padding: 8px 15px; border-radius: 4px; border: none; cursor: pointer; color: white; }
.btn-success { background: var(--primary-color); }
.btn-danger { background: #e74c3c; }
.btn-add { background: var(--secondary-color); color: white; padding: 12px 25px; border: none; border-radius: 5px; cursor: pointer; margin-top: 15px; }
/* تنسيق التبويبات */
.tabs-container {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
}
.tab-link {
    background: #e0e0e0;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    transition: 0.3s;
}
.tab-link.active {
    background: var(--primary-color);
    color: white;
}
.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}
.tab-content.active { display: block; }

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* تمييز حالة الحضور والغياب */
.attendance-status {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.status-present { color: var(--primary-color); font-weight: bold; }
.status-absent { color: #e74c3c; font-weight: bold; }

/* تحسين شكل الكروت في التبويبات */
.card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 10px;
}

.table-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}
#teacherSalaryTable td:nth-child(6) {
    background-color: #f9fdfa;
    font-weight: bold;
}
.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
    padding: 15px 0;
}

.data-table th {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
    padding: 12px;
}

.data-table td {
    border: 1px solid #dee2e6;
    padding: 10px;
    text-align: center;
}
/* تنسيق زر الاعتماد الجماعي المميز */
.btn-bulk-commit {
    background-color: #219150 !important; /* درجة خضراء داكنة مميزة */
    color: white !important;
    border: 1px solid #1a7440 !important;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.btn-bulk-commit:hover {
    background-color: #1a7440 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn-bulk-commit i {
    margin-left: 8px;
}

/* زر خاص لرواتب المدرسين بلون مختلف قليلاً إذا أردت التمييز بينهما */
#bulkCommitTeachersBtn {
    background-color: #2c3e50 !important; /* لون كحلي وقور للعمليات الكبيرة */
    border-color: #1a252f !important;
}

#bulkCommitTeachersBtn:hover {
    background-color: #1a252f !important;
}
.btn-secondary {
    color: black !important;
    font-weight: bold;
}
/* تغيير لون خط زر حساب الرواتب إلى الأسود العريض */
#generateTeacherPayrollBtn {
    color: black !important; /* استخدام !important لضمان تجاوز ألوان Bootstrap الافتراضية */
    font-weight: bold;      /* جعل الخط عريضاً */
}