/* نظام الحجوزات - لوحة التحكم الإدارية - CSS الرئيسي بالعربية */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}

body {
    background-color: #f8f9fa;
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
}

/* أنماط الشريط الجانبي */
.sidebar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    position: fixed;
    top: 0;
    right: 0; /* تغيير من left إلى right للعربية */
    width: 250px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    margin: 2px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: right;
    direction: rtl;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(-5px); /* تغيير الاتجاه للعربية */
}

.sidebar-text {
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-text {
    opacity: 0;
    pointer-events: none;
}

/* أنماط المحتوى الرئيسي */
.main-content {
    margin-right: 250px; /* تغيير من margin-left إلى margin-right */
    margin-left: 0;
    padding: 20px;
    transition: all 0.3s ease;
    direction: rtl;
}

.main-content.expanded {
    margin-right: 70px; /* تغيير من margin-left إلى margin-right */
    margin-left: 0;
}

/* أنماط البطاقات */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    direction: rtl;
    text-align: right;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.25rem;
    text-align: right;
    direction: rtl;
}

/* أنماط الأزرار */
.btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
}

.btn-group .btn {
    margin-left: 5px; /* تغيير من margin-right إلى margin-left */
    margin-right: 0;
}

.btn-group .btn:last-child {
    margin-left: 0;
}

.btn-group .btn:first-child {
    margin-right: 0;
}

/* أنماط الجداول */
.table {
    border-radius: 8px;
    overflow: hidden;
    direction: rtl;
    text-align: right;
}

.table th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    padding: 12px 15px;
    text-align: right;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

.table td {
    padding: 12px 15px;
    vertical-align: middle;
    text-align: right;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(0, 0, 0, 0.02);
}

/* أنماط النوافذ المنبثقة */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    direction: rtl;
    text-align: right;
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
    text-align: right;
    direction: rtl;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
    direction: rtl;
}

.modal-footer .btn:not(:last-child) {
    margin-left: 10px;
    margin-right: 0;
}

/* أنماط النماذج */
.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
    padding: 10px 12px;
    text-align: right;
    direction: rtl;
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
}

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

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    text-align: right;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

.form-text {
    text-align: right;
    direction: rtl;
}

/* أنماط التنبيهات */
.toast-container {
    position: fixed;
    top: 20px;
    left: 20px; /* تغيير من right إلى left للعربية */
    z-index: 1055;
}

.toast {
    min-width: 300px;
    direction: rtl;
    text-align: right;
}

/* عجلة التحميل */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 20px;
    color: var(--accent-color);
}

.loading-spinner.show {
    display: block;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* أنماط معاينة الصور */
.image-preview {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    margin: 5px;
    border: 2px solid #e9ecef;
    object-fit: cover;
}

/* أنماط بطاقات الإحصائيات */
.stats-card {
    background: linear-gradient(135deg, var(--accent-color), #5dade2);
    color: white;
}

.stats-card .card-body {
    padding: 1.5rem;
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

.stats-card h6 {
    opacity: 0.9;
    margin-bottom: 0.5rem;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

/* أنماط رأس الصفحة */
.page-header {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: right;
    direction: rtl;
}

.page-header h2 {
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

.page-header p {
    color: #6c757d;
    margin: 5px 0 0 0;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

/* زر تبديل الشريط الجانبي */
.sidebar-toggle {
    position: fixed;
    top: 15px;
    right: 15px; /* تغيير من left إلى right */
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.sidebar-toggle:hover {
    background: var(--secondary-color);
    color: white;
}

/* أنماط الشارات */
.badge {
    font-size: 0.75em;
    padding: 0.5em 0.75em;
    border-radius: 6px;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

/* أنماط التنبيهات */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
    text-align: right;
    direction: rtl;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

.alert-success {
    background-color: rgba(39, 174, 96, 0.1);
    border-right: 4px solid var(--success-color); /* تغيير من border-left إلى border-right */
    color: var(--success-color);
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.1);
    border-right: 4px solid var(--warning-color);
    color: var(--warning-color);
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    border-right: 4px solid var(--danger-color);
    color: var(--danger-color);
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    border-right: 4px solid var(--accent-color);
    color: var(--accent-color);
}

/* أنماط مجموعة القائمة */
.list-group-item {
    border: none;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem;
    text-align: right;
    direction: rtl;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item h6 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

.list-group-item p {
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

.list-group-item small {
    color: #adb5bd;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

/* أنماط قسم المحتوى */
.content-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* أنماط النموذج */
.form-check {
    padding: 0.5rem 0;
    text-align: right;
    direction: rtl;
}

.form-check-input {
    margin-top: 0.25rem;
    margin-left: 0.25rem; /* تغيير من margin-right إلى margin-left */
    float: right;
}

.form-check-label {
    font-weight: 500;
    color: var(--primary-color);
    font-family: 'Cairo', 'Tajawal', sans-serif;
    padding-right: 0.25rem;
}

/* جدول متجاوب */
.table-responsive {
    border-radius: 8px;
    direction: rtl;
}

/* شريط التمرير المخصص */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* تأثيرات التمرير */
.table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* مؤشرات الحالة */
.table-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

/* أنماط متجاوبة للجوال */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%); /* تغيير الاتجاه للعربية */
        width: 280px;
        right: -280px;
    }
    
    .sidebar.show {
        transform: translateX(0);
        right: 0;
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-end !important; /* تغيير من flex-start إلى flex-end */
    }
    
    .page-header .btn {
        margin-top: 10px;
        width: 100%;
    }
    
    .stats-card h3 {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        margin-left: 0;
        margin-bottom: 5px;
    }

    .toast-container {
        right: 20px;
        left: 20px;
    }

    .sidebar-toggle {
        right: 15px;
        left: auto;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 15px;
    }
    
    .page-header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .page-header h2 {
        font-size: 1.25rem;
    }
    
    .stats-card .card-body {
        padding: 1rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .table th,
    .table td {
        padding: 8px;
    }
}

/* أنماط الطباعة */
@media print {
    .sidebar,
    .sidebar-toggle,
    .toast-container,
    .btn,
    .modal {
        display: none !important;
    }
    
    .main-content {
        margin-right: 0;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* تحسينات إضافية للعربية */
.input-group-text {
    border-radius: 0 8px 8px 0; /* تعديل لاتجاه RTL */
}

.input-group .form-control:not(:last-child) {
    border-radius: 8px 0 0 8px;
}

/* تحسين عرض الأرقام العربية */
.arabic-numbers {
    font-feature-settings: "lnum";
    font-variant-numeric: lining-nums;
}

/* إخفاء الأيقونات غير الضرورية في RTL */
.fa-chevron-left::before { content: "\f054"; } /* chevron-right */
.fa-chevron-right::before { content: "\f053"; } /* chevron-left */

/* تحسين التباعد للأيقونات */
.fa {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* تخصيص الخطوط العربية */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Tajawal:wght@300;400;500;700&display=swap');

/* تحسين عرض المحتوى العربي */
.arabic-content {
    line-height: 1.8;
    font-size: 1.1em;
}

/* تحسين عرض التواريخ العربية */
.date-arabic {
    font-family: 'Cairo', sans-serif;
    direction: ltr;
    text-align: center;
    display: inline-block;
}

/* تحسين عرض الأرقام في الجداول */
.table .numeric {
    text-align: center;
    font-family: 'Cairo', monospace;
}
i, .me-2{
    margin-left: 5px !important;
}