:root {
    --primary-color: #6D214F; /* لون البرقوق */
    --secondary-color: #182C61; /* كحلي */
    --accent-color: #EAB543; /* ذهبي */
    --bg-light: #f1f2f6;
    --bg-white: #ffffff;
    --text-dark: #2f3542;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    direction: rtl;
    text-align: right;
    padding-top: 70px;
}

/* === 1. تنسيقات الصفحة الرئيسية (الشبكة) === */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    padding: 20px 0;
}
.dash-card {
    background: var(--bg-white);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px;
}
.dash-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}
.dash-icon { font-size: 3.5rem; margin-bottom: 15px; transition: 0.3s; }
.dash-title { font-weight: 700; font-size: 1.2rem; color: #2f3542; }

/* ألوان الأيقونات */
.icon-volunteers { color: #3B3B98; }
.icon-attendance { color: #B33771; }
.icon-services { color: #F97F51; }
.icon-subs { color: #25CCF7; }
.icon-guests { color: #55E6C1; }
.icon-badges { color: #D6A2E8; }
.icon-settings { color: #2C3A47; }
.icon-users { color: #FD7272; }

/* === 2. تنسيقات صفحة المتطوعين (الجداول) === */
.table-professional {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #dfe4ea;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    margin-bottom: 20px;
}
.table-professional thead {
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    color: var(--secondary-color);
}
.table-professional th {
    font-weight: 700;
    padding: 12px 15px;
    border-bottom: 2px solid #ced6e0;
    text-align: center;
    font-size: 0.95rem;
    vertical-align: middle;
}
.table-professional td {
    padding: 10px 15px;
    border-bottom: 1px solid #f1f2f6;
    text-align: center;
    vertical-align: middle;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2f3542;
}
.table-professional tbody tr:hover { background-color: #f1f2f6; }

/* إصلاح الصور في الجدول (الحجم الثابت) */
.table-img {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
}

/* أزرار الإجراءات */
.action-btn {
    width: 32px; height: 32px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; transition: 0.2s; margin: 0 2px; color: white;
}
.btn-whatsapp { background-color: #25D366; }
.btn-print { background-color: #34495e; }
.btn-edit { background-color: #3498db; }
.btn-delete { background-color: #e74c3c; }

/* === 3. العناصر المشتركة (Navbar, Action Bar) === */
.main-navbar {
    background: white; border-bottom: 1px solid #dfe4ea;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02); height: 65px;
}
.navbar-brand { font-weight: 800; color: var(--primary-color) !important; font-size: 1.4rem; }
.nav-link { font-weight: 600; color: #57606f !important; }

.action-bar {
    padding: 10px 30px; display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 20px;
}
.page-title { font-size: 1.5rem; font-weight: 800; color: var(--secondary-color); margin: 0; }
.btn-primary-custom { background-color: var(--primary-color); color: white; border: none; font-weight: bold; padding: 8px 20px; border-radius: 6px;}

.prayer-ticker-container {
    background: linear-gradient(90deg, #6D214F, #B33771); color: white;
    border-radius: 50px; padding: 5px 20px; font-size: 0.9rem; max-width: 400px;
    overflow: hidden; white-space: nowrap; display: flex; align-items: center;
}
.prayer-text { display: inline-block; animation: scrollText 15s linear infinite; }
@keyframes scrollText { 0% { transform: translateX(-100%); } 100% { transform: translateX(120%); } }

.card-custom { background: white; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); overflow: hidden; }
.mini-stat { background: white; padding: 8px 15px; border-radius: 20px; border: 1px solid #eee; display: flex; align-items: center; gap: 8px; font-weight: bold; color: #555; }

/* === 4. تنسيقات الطباعة === */
@media print {
    .no-print, .main-navbar, .action-bar, .modal, .btn { display: none !important; }
    body { background: white; padding: 0; }
    
    .print-page-container { width: 100%; max-width: 210mm; margin: 0 auto; padding: 20px; }
    .print-header { text-align: center; border-bottom: 3px double #333; padding-bottom: 15px; margin-bottom: 20px; }
    .print-page-break { page-break-before: always; }
    
    .print-list-table { width: 100%; border-collapse: collapse; font-size: 12px; direction: rtl; }
    .print-list-table th, .print-list-table td { border: 1px solid #000; padding: 5px; text-align: center; }
    .print-list-table th { background-color: #f0f0f0 !important; }
    
    .print-table-info { width: 100%; border-collapse: collapse; direction: rtl; margin-bottom: 20px; }
    .print-table-info td { border: 1px solid #333; padding: 8px; }
}