:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --sidebar-width: 280px;
    --sidebar-bg: linear-gradient(to bottom, #1e293b, #334155);
    --sidebar-hover: rgba(255, 255, 255, 0.1);
    --sidebar-active: rgba(255, 255, 255, 0.2);
    --sidebar-border: rgba(255, 255, 255, 0.05);
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #f5f8fa;
    color: #333;
    margin: 0;
    padding: 0;
}

/* تنسيق صفحة تسجيل الدخول */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.login-card {
    width: 400px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
}

.login-body {
    padding: 30px;
    background-color: white;
}

/* تنسيق القائمة الجانبية */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: white;
    padding: 0;
    z-index: 1000;
    transition: all 0.3s;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
}

/* زر إظهار/إخفاء القائمة الجانبية */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    z-index: 1100;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.sidebar-header {
    padding: 25px 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.sidebar-header h3 i {
    margin-left: 10px;
    color: var(--primary-color);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 5px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 5px;
    margin: 0 10px;
}

.sidebar-menu a:hover {
    background-color: var(--sidebar-hover);
    color: white;
    transform: translateX(-5px);
}

.sidebar-menu a.active {
    background-color: var(--sidebar-active);
    color: white;
    font-weight: 600;
}

.sidebar-menu a i {
    margin-left: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-menu .badge {
    margin-right: auto;
}

/* تنسيق المحتوى الرئيسي */
.main-content {
    margin-right: var(--sidebar-width);
    padding: 20px;
    min-height: 100vh;
    background-color: #f5f8fa;
    transition: all 0.3s;
}

.content-header {
    margin-bottom: 25px;
}

.user-info {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 8px 15px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.user-info span {
    font-weight: 500;
}

.user-info .btn {
    padding: 5px 10px;
}

/* تنسيقات للأجهزة المحمولة */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        width: 250px;
    }
    
    .sidebar-mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
        width: 100%;
    }
    
    .main-content-shifted {
        filter: blur(2px);
        pointer-events: none;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .user-info {
        margin-top: 15px;
        align-self: flex-start;
    }
    
    .card {
        overflow-x: auto;
    }
    
    .table-responsive {
        min-width: 100%;
    }
}

/* تنسيق البطاقات */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
    font-weight: bold;
}

.card-body {
    padding: 20px;
}

/* تنسيق الجداول */
.table {
    width: 100%;
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
}

/* تنسيق الأزرار */
.btn {
    border-radius: 5px;
    padding: 8px 15px;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

/* تنسيق البطاقات الإحصائية */
.stats-card {
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.stats-card.primary {
    background-color: var(--primary-color);
}

.stats-card.success {
    background-color: var(--secondary-color);
}

.stats-card.warning {
    background-color: var(--warning-color);
}

.stats-card.danger {
    background-color: var(--danger-color);
}

.stats-card .icon {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 40px;
    opacity: 0.3;
}

.stats-card .number {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stats-card .title {
    font-size: 16px;
    opacity: 0.8;
}

/* تنسيق النماذج */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    border-radius: 5px;
    padding: 10px 15px;
    border: 1px solid #ddd;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* تنسيق التنبيهات */
.alert {
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
}

/* تنسيق الصفحات */
.pagination {
    margin-top: 20px;
}

.pagination .page-item .page-link {
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* تنسيق للشاشات الصغيرة */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        padding: 0;
    }
    
    .sidebar.active {
        width: var(--sidebar-width);
        padding: 20px 0;
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .main-content.sidebar-active {
        margin-right: var(--sidebar-width);
    }
    
    .toggle-sidebar {
        display: block;
    }
}

/* تنسيق الفورم */
.form-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.form-section h4 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* تنسيق الملف الشخصي */
.profile-header {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

/* تنسيق التنبيهات */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}