/* ONSE Admin - Clean Light Theme (Based on Screenshots) */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

:root {
    --bg-body: #f8f9fa;       /* خلفية رمادية فاتحة جداً */
    --bg-header: #1f2937;     /* الشريط العلوي الداكن */
    --text-main: #111827;
    --text-muted: #6b7280;
    
    /* ألوان الكروت من الصور */
    --card-green-bg: #d1fae5; /* خلفية زر إضافة نشاط */
    --card-green-text: #065f46;
    --card-blue-bg: #1e3a8a;  /* خلفية كرت الأعضاء */
    --card-blue-text: #ffffff;
    
    --sidebar-width: 250px;
    --header-height: 65px;
}

body {
    margin: 0; padding: 0;
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    direction: rtl;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
button { font-family: inherit; cursor: pointer; border: none; }

/* --- الهيكل --- */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-main { flex: 1; margin-right: 0; transition: margin-right 0.3s; width: 100%; }

/* --- الشريط العلوي (مطابق للصورة) --- */
.admin-topbar {
    height: var(--header-height);
    background-color: var(--bg-header);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.brand-area { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* أزرار الشريط العلوي */
.btn-top {
    padding: 6px 15px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}
.btn-public { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.btn-logout { background: #dc2626; color: #fff; } /* أحمر للخروج */

/* --- القائمة الجانبية (Sidebar) --- */
.admin-sidebar {
    position: fixed; top: 0; right: 0; height: 100vh;
    width: var(--sidebar-width);
    background: #fff;
    border-left: 1px solid #e5e7eb;
    z-index: 1000;
    transform: translateX(100%); /* مخفية افتراضياً في الموبايل */
    transition: transform 0.3s ease;
    padding-top: var(--header-height);
}
.admin-sidebar.open { transform: translateX(0); box-shadow: -5px 0 20px rgba(0,0,0,0.1); }

.sidebar-nav { padding: 20px; display: flex; flex-direction: column; gap: 5px; }
.nav-item {
    padding: 12px 15px;
    border-radius: 8px;
    display: flex; align-items: center; gap: 10px;
    color: #374151;
    font-weight: 600;
}
.nav-item:hover { background: #f3f4f6; color: #000; }
.nav-item.active { background: #eff6ff; color: #2563eb; }

/* --- المحتوى الرئيسي --- */
.admin-content { padding: 20px; max-width: 1200px; margin: 0 auto; }
.page-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 25px; color: #111827; }

/* --- الكروت الخاصة (مطابقة للصور) --- */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 1. كرت إضافة نشاط (أخضر فاتح) */
.card-add-activity {
    background-color: var(--card-green-bg);
    color: var(--card-green-text);
    padding: 30px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 140px;
    border: 1px solid #a7f3d0;
    transition: transform 0.2s;
}
.card-add-activity:hover { transform: translateY(-3px); }
.card-add-activity h3 { margin: 0 0 10px 0; font-size: 1.3rem; }
.add-icon { font-size: 1.5rem; font-weight: bold; }

/* 2. كرت الإحصائيات (كحلي غامق) */
.card-stats-dark {
    background-color: var(--card-blue-bg);
    color: var(--card-blue-text);
    padding: 30px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 140px;
}
.stats-number { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.stats-label { font-size: 0.9rem; opacity: 0.8; }
.stats-icon-box { 
    background: rgba(255,255,255,0.1); 
    padding: 15px; border-radius: 12px;
}

/* --- جدول الطلبات (للحفاظ على الوظيفة) --- */
.requests-section { background: #fff; border-radius: 12px; border: 1px solid #e5e7eb; overflow: hidden; padding: 20px; }
.section-head { display: flex; justify-content: space-between; margin-bottom: 15px; }
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: right; padding: 12px; background: #f9fafb; color: #6b7280; font-size: 0.85rem; }
.table td { padding: 12px; border-bottom: 1px solid #f3f4f6; }

/* الموبايل */
@media (max-width: 900px) {
    .menu-btn { display: block; background: transparent; color: #fff; padding: 5px; }
    .admin-sidebar { padding-top: 0; width: 260px; z-index: 2000; }
    .brand-text-mobile { display: none; }
}
@media (min-width: 901px) {
    .menu-btn { display: none; }
    .admin-main { margin-right: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); }
    .admin-sidebar { transform: translateX(0); border-left: 1px solid #374151; }
}