/* إزالة الظل من .timeline-container */
.timeline-container {
    box-shadow: none !important;
}

/* إخفاء عدد الأحداث للمستخدمين غير المسجلين */
.events-count-hidden {
    display: none !important;
}

/* أنيميشن للإشعارات */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* تنسيقات إشعار تغيير التاريخ */
.alert.position-fixed {
    animation: slideInRight 0.5s ease-out;
}

.alert.position-fixed .bi-calendar-check-fill {
    color: #0ea5e9 !important;
}

/* تنسيقات حاوية أزرار المصادقة */
#auth-button-container {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

/* تبسيط أزرار المصادقة */
#auth-button-container .btn {
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#auth-button-container .btn:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#auth-button-container .btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%) !important;
    border: none !important;
}

/* تبسيط تدرج الخلفية */
.header-gradient {
    background: #f8fafc;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-icon {
    width: 64px;
    height: 64px;
    font-size: 2.2rem;
}

.header-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.header-subtitle {
    font-size: 1.1rem;
}

.card-body-min-height {
    min-height: 120px;
}

.event-content-scroll {
    min-height: 150px;
    max-height: 250px;
    overflow-y: auto;
}

.chart-container {
    max-width: 800px;
    margin: auto;
}

.chart-canvas-hidden {
    display: none;
    min-height: 320px;
}

.chart-canvas-visible {
    display: block !important;
    min-height: 320px;
    height: 320px;
}

.events-count-badge {
    font-size: 1rem;
    font-weight: 600;
}

.show-all-events-btn-hidden {
    display: none;
}

.search-group-width {
    width: 300px;
}

.search-group-hidden {
    display: none;
}

.search-year-info-hidden {
    display: none;
}

.events-list-section-hidden {
    display: none;
}

.table-header-date {
    min-width: 120px;
}

.table-header-day {
    min-width: 100px;
}

.load-more-btn-hidden {
    display: none;
}

.about-section-gradient {
    background: repeating-linear-gradient(180deg, #f8fafc, #f8fafc 32px, #ffffff 33px, #f8fafc 34px);
    border-radius: 1.5rem;
    border-right: 6px solid #0075a7;
}

.about-title-color {
    color: #059669;
}

.about-subtitle-size {
    font-size: 1.25rem;
}

.alert-font-size {
    font-size: 1rem;
}

#auth-button-container .btn-primary:hover {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
}

#auth-button-container .btn-outline-danger {
    border: 2px solid #dc3545 !important;
    color: #dc3545 !important;
    background: transparent !important;
}

#auth-button-container .btn-outline-danger:hover {
    background: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

/* تحسين التجاوب مع الشاشات الصغيرة */
@media (max-width: 768px) {
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start !important;
    }
    
    #auth-button-container {
        margin-left: 0;
        align-self: flex-end;
    }
    
    .nav-tabs {
        width: 100%;
    }
}

/* تنسيقات أزرار تسجيل الدخول/الخروج في شريط التبويبات - إزالة القواعد القديمة */
.nav-tabs .nav-item.ms-auto {
    display: none !important;
}

/* تنسيقات قسم إدارة الأحداث */
.card.border-success {
    border-width: 2px !important;
    margin-bottom: 2rem;
}

.card.border-success .card-header {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    border-color: #059669 !important;
}

.card.border-success .card-body {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

/* تأثيرات الأزرار في قسم إدارة الأحداث */
.card.border-success .btn-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #059669;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

.card.border-success .btn-success:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.card.border-success .btn-warning {
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.card.border-success .btn-danger {
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

/* تحسينات الاستجابة للهاتف */
@media (max-width: 768px) {
    .card.border-success .d-flex.gap-2 {
        flex-direction: column;
    }
    
    .card.border-success .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}
/* تحسين الخط الزمني */
.timeline-item {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border-radius: 0.75rem;
    box-shadow: 0 1px 4px rgba(52, 152, 219, 0.05);
    transition: box-shadow 0.2s ease;
    min-height: 56px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(226, 232, 240, 0.3);
}
.timeline-item:hover {
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.08);
    background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
}
/* تبسيط الخط الزمني */
.timeline-item:before {
    content: '';
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    width: 3px;
    height: calc(100% - 1rem);
    background: #60a5fa;
    border-radius: 2px;
    z-index: 1;
}
.timeline-item:last-child:before {
    display: none;
}
/* تبسيط شارات السنة */
.timeline-item .year-badge {
    display: inline-block;
    min-width: 48px;
    padding: 0.3em 0.8em;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 1.5em;
    margin-left: 1rem;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
    border: 1px solid #fff;
    position: relative;
    z-index: 2;
}
.timeline-item p {
    margin: 0;
    color: #2563eb;
    font-size: 1.08rem;
    font-family: 'Cairo', sans-serif;
    line-height: 1.7;
    padding: 0.2em 0.2em 0.2em 0;
    word-break: break-word;
}
/* تحسين البطاقات مع خلفية خفيفة */
.card.h-100 {
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: box-shadow 0.2s;
    padding-bottom: 0.5rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.card.h-100:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 255, 0.98) 100%);
}
.card.h-100 .card-header {
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 1rem 1rem 0 0;
    padding: 1rem;
}
.card.h-100 .card-title {
    font-weight: 600;
    color: #2563eb;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}
.card.h-100 .card-title i {
    font-size: 1.2rem;
}
.card.h-100 .card-body {
    background: rgba(255,255,255,0.5);
    border-radius: 0 0 1rem 1rem;
    padding: 1rem;
    min-height: 120px;
}
/* تحسين ستايل البطاقات في الأعمدة الكاملة */
.col-12 > .card {
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.08);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s;
    padding-bottom: 0.5rem;
}
.col-12 > .card:hover {
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.12);
}
.col-12 > .card .card-header {
    background: transparent;
    border-bottom: none;
    border-radius: 2rem 2rem 0 0;
    padding-top: 1.5rem;
    padding-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.col-12 > .card .card-title {
    font-weight: bold;
    color: #2563eb;
    font-size: 1.22rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}
.col-12 > .card .card-title i {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 6px #e0f2fe);
}
.col-12 > .card .card-body {
    background: rgba(255,255,255,0.65);
    border-radius: 0 0 2rem 2rem;
    padding: 2.2rem 1.5rem 1.5rem 1.5rem;
    min-height: 120px;
    box-shadow: none;
}
/* تحسين ستايل البطاقات في الأعمدة الكبيرة */
.col-lg-6.d-flex.align-items-stretch.mb-3 > .card {
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.08);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s;
    padding-bottom: 0.5rem;
}
.col-lg-6.d-flex.align-items-stretch.mb-3 > .card:hover {
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.12);
}
.col-lg-6.d-flex.align-items-stretch.mb-3 > .card .card-header {
    background: transparent;
    border-bottom: none;
    border-radius: 2rem 2rem 0 0;
    padding-top: 1.5rem;
    padding-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.col-lg-6.d-flex.align-items-stretch.mb-3 > .card .card-title {
    font-weight: bold;
    color: #2563eb;
    font-size: 1.22rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}
.col-lg-6.d-flex.align-items-stretch.mb-3 > .card .card-title i {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 6px #e0f2fe);
}
.col-lg-6.d-flex.align-items-stretch.mb-3 > .card .card-body {
    background: rgba(255,255,255,0.65);
    border-radius: 0 0 2rem 2rem;
    padding: 2.2rem 1.5rem 1.5rem 1.5rem;
    min-height: 120px;
    box-shadow: none;
}
/* توسيط عناوين البطاقات */
.card .card-title {
    text-align: center;
    width: 100%;
    justify-content: center !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
/* تحسين البطاقات الأساسية مع خلفية خفيفة */
.col-md-6.d-flex.align-items-stretch.mb-3 > .card {
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: box-shadow 0.2s;
    padding-bottom: 0.5rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.col-md-6.d-flex.align-items-stretch.mb-3 > .card:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 255, 0.98) 100%);
}
.col-md-6.d-flex.align-items-stretch.mb-3 > .card .card-header {
    background: transparent;
    border-bottom: none;
    border-radius: 2rem 2rem 0 0;
    padding-top: 1.5rem;
    padding-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.col-md-6.d-flex.align-items-stretch.mb-3 > .card .card-title {
    font-weight: bold;
    color: #2563eb;
    font-size: 1.22rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.col-md-6.d-flex.align-items-stretch.mb-3 > .card .card-title i {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 6px #e0f2fe);
}
.col-md-6.d-flex.align-items-stretch.mb-3 > .card .card-body {
    background: rgba(255,255,255,0.65);
    border-radius: 0 0 2rem 2rem;
    padding: 2.2rem 1.5rem 1.5rem 1.5rem;
    min-height: 120px;
    box-shadow: none;
}
.col-md-6.d-flex.align-items-stretch.mb-3 > .card .alert,
.col-md-6.d-flex.align-items-stretch.mb-3 > .card #upcoming-event {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    font-size: 1.18rem;
    color: #2563eb;
    font-family: 'Cairo', sans-serif;
    padding: 0;
}
/* تحسين ستايل البطاقات في الأعمدة الجانبية */
.col-md-6.d-flex.align-items-stretch.mb-3 > .card {
    border-radius: 1.5rem;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.10);
    background: linear-gradient(135deg, #f8fafc 70%, #e0f2fe 100%);
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s, border-color 0.2s;
    padding-bottom: 0.5rem;
}
.col-md-6.d-flex.align-items-stretch.mb-3 > .card:hover {
    box-shadow: 0 8px 32px 0 rgba(52, 152, 219, 0.18);
    border-color: #90cdf4;
}
.col-md-6.d-flex.align-items-stretch.mb-3 > .card .card-header {
    background: transparent;
    border-bottom: none;
    border-radius: 1.5rem 1.5rem 0 0;
    padding-top: 1.2rem;
    padding-bottom: 0.7rem;
}
.col-md-6.d-flex.align-items-stretch.mb-3 > .card .card-title {
    font-weight: bold;
    color: #2563eb;
    font-size: 1.18rem;
}
.col-md-6.d-flex.align-items-stretch.mb-3 > .card .card-body {
    background: transparent;
    border-radius: 0 0 1.5rem 1.5rem;
    padding: 1.5rem 1.2rem;
}
/* تحسين مربعات المحتوى */
.card-body.d-flex.align-items-center.justify-content-center {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 249, 255, 0.9) 100%);
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
    min-height: 120px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}
.card-body.d-flex.align-items-center.justify-content-center:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(224, 242, 254, 0.95) 100%);
}
/* تحسين النص داخل المربع */
.card-body.d-flex.align-items-center.justify-content-center .alert,
.card-body.d-flex.align-items-center.justify-content-center #upcoming-event {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    font-size: 1.15rem;
    color: #2563eb;
    font-family: 'Cairo', sans-serif;
}
/* تحسين عرض حدث اليوم القادم */
#upcoming-event > div {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
}
#upcoming-event .gregorian-date {
    background: var(--gradient-primary);
    color: #fff;
    padding: 0.35rem 1.1rem;
    border-radius: 1.2rem;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px 0 rgba(37,99,235,0.10);
    margin-bottom: 0.2rem;
    letter-spacing: 0.5px;
}
#upcoming-event .desc {
    background: #f0f9ff;
    color: var(--text-color);
    border-radius: 0.7rem;
    padding: 0.7rem 1.2rem;
    font-size: 1.05rem;
    font-weight: 500;
    box-shadow: 0 1px 4px 0 rgba(37,99,235,0.06);
    margin-bottom: 0.1rem;
    text-align: right;
    direction: rtl;
    width: 100%;
    line-height: 1.7;
}
#upcoming-event .days-diff {
    color: #059669;
    background: #e0f7ef;
    border-radius: 0.7rem;
    padding: 0.3rem 1.1rem;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 1px 4px 0 rgba(34,197,94,0.08);
    margin-top: 0.1rem;
    letter-spacing: 0.5px;
}
/* تبسيط متغيرات CSS */
:root {
    --primary-color: #2563eb;
    --secondary-color: #0ea5e9;
    --success-color: #22c55e;
    --warning-color: #eab308;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --text-color: #334155;
    --bg-color: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.95);
    --border-color: #e2e8f0;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-success: linear-gradient(135deg, #059669, #10b981);
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    --transition-default: all 0.2s ease;
}

/* تحسين الخلفية العامة */
body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 30%, #e0f2fe 70%, #f0f9ff 100%);
    color: var(--text-color);
    line-height: 1.6;
    transition: all 0.2s ease;
    min-height: 100vh;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* تحسين الهيدر */
header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 249, 255, 0.9) 100%);
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    margin: 1rem 0 2rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
}

header h1, h1, h4, h5, .card-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.card {
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 1rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition-default);
    overflow: hidden;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}
.card-title {
    color: var(--dark-color);
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.card-body {
    padding: 1.5rem;
    max-height: 450px;
    overflow-y: auto;
}

/* تحسين تأثيرات الأزرار */
.btn-group .btn {
    border-radius: 0.5rem !important;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--primary-color);
}
.btn-group .btn:hover {
    transform: translateY(-1px);
}
.btn-group .btn.active {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* تحسين الجداول */
.events-table-wrapper {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;
    overflow: hidden;
}
.table.events-table {
    margin: 0;
}
.table.events-table thead th {
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    padding: 1rem;
    border: none;
}
.table.events-table tbody tr {
    transition: all 0.2s ease;
}
.table.events-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

/* تحسين البطاقات الإحصائية */
.stat-card {
    background: var(--gradient-primary) !important;
    color: white;
    border-radius: 0.75rem;
    padding: 1.2rem;
    height: 100%;
    transition: transform 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
}
.stat-card h6 {
    opacity: 0.9;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}
.stat-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

/* تحسين أزرار البحث */
.search-container {
    position: relative;
    max-width: 400px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}
#search-input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    width: 100%;
    transition: all 0.2s ease;
    flex: 1 1 0%;
    min-width: 0;
}
#search-input:focus {
    background: white;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
    outline: none;
}
#search-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-inline-start: 0.5rem;
    white-space: nowrap;
}
#search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* تحسين عرض الرسائل */
.message-card {
    background: var(--gradient-success);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}
.message-card h6 {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}
.message-card p {
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.6;
}

/* تحسين الرسوم البيانية */
canvas {
    border-radius: 0.5rem;
    background: white;
    width: 100% !important;
    height: auto;
    display: block;
    margin: 0;
}

@media (max-width: 768px) {
  canvas {
    width: 100% !important;
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
  }
  #weather-events-content {
    max-height: none !important;
    overflow-y: visible !important;
  }
}

/* تبسيط أنيميشن التحميل */
.loading-spinner {
    width: 30px;
    height: 30px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* تحسين الأنيميشن - إزالة التأثيرات الثقيلة */
.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* تحسين عرض التواريخ */
.date-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    display: inline-block;
}

/* تبسيط الخط الزمني */
.timeline-item {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}
.timeline-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* تحسين التوافقية مع الشاشات الصغيرة */
@media (max-width: 768px) {
    .container-fluid {
        padding: 1rem;
    }
    .card {
        margin-bottom: 1rem;
    }
    .btn-group {
        flex-wrap: wrap;
    }
    .btn-group .btn {
        margin: 0.25rem;
    }
    .date-time-display {
        font-size: 0.8rem;
    }
    .date-value, .time-value, .day-value {
        font-size: 0.9rem;
    }
}
/* تحسين حاوية التاريخ */
.current-date-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 249, 255, 0.9) 100%);
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    color: var(--dark-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.5);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}
.date-time-display {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.date-time-display > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.date-label, .time-label {
    font-weight: 500;
    opacity: 0.9;
}
.date-value, .time-value, .day-value {
    font-weight: 700;
    font-size: 1rem;
}
.current-time {
    color: var(--primary-color);
    font-weight: bold;
}
.current-day {
    color: #059669;
}
.date-time-display i {
    font-size: 1rem;
    opacity: 0.9;
    color: var(--primary-color);
}
.hijri-date {
    color: #8b5cf6;
}
@media (max-width: 992px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    .current-date-container {
        width: 100%;
        justify-content: center;
    }
    .date-time-display {
        align-items: center;
    }
}

/* تبسيط تنسيق الأزرار */
.btn-logout {
    transition: all 0.2s ease;
}

.btn-logout:hover {
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

/* تحسين أزرار إدارة الأحداث */
.btn-success {
    background: #198754;
    border: none;
    transition: all 0.2s ease;
}

.btn-success:hover {
    background: #157347;
    box-shadow: 0 2px 6px rgba(25, 135, 84, 0.3);
}

.btn-warning {
    background: #ffc107;
    border: none;
    color: #212529;
    transition: all 0.2s ease;
}

.btn-warning:hover {
    background: #ffca2c;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3);
    color: #212529;
}

.btn-danger {
    background: #dc3545;
    border: none;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #bb2d3b;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

/* تحسينات للأجهزة المحمولة */
@media (max-width: 768px) {
    .d-flex.gap-2.flex-wrap {
        flex-direction: column;
    }
    
    .d-flex.gap-2.flex-wrap .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-header .w-100 {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }
}

/* تحسينات للجدول في وضع التعديل */
.table-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
    border-left: 4px solid #ffc107;
}

.table-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border-left: 4px solid #dc3545;
}

.table-info {
    background-color: rgba(13, 202, 240, 0.1) !important;
    border-left: 4px solid #0dcaf0;
}

/* تحسينات للأجهزة المحمولة */
@media (max-width: 768px) {
    .btn-logout {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 10px;
        width: 100%;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
    
    .form-control, .btn {
        font-size: 0.9rem;
    }
}
