* {
    box-sizing: border-box;
}

body {
    background-color: #f0f2f5;
    padding: 0px;
}

.dashboard-container {
    display: grid;
    grid-template-columns: 300px 1fr 280px;
    /* تقسيم 3 أعمدة رئيسية */
    gap: 20px;
    max-width: 1500px;
    margin: 0 auto;
    margin-top: 16px;
}

/* الكروت البيضاء بتنسيق Card View */
.white-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0f0f0;
}

/* تنسيق الإحصائيات العلوي */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: #fff;
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.stat-box .num {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: #00a651;
}

.stat-box .label {
    font-size: 12px;
    color: #888;
}

/* هيدر الكروت */
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.header-flex h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.subtitle {
    margin: 0;
    font-size: 10px;
    color: #aaa;
}

/* إزالة التنسيق الافتراضي للروابط داخل الإعلانات */
.ad-details h5 a {
    text-decoration: none;
    /* إزالة الخط السفلي */
    color: inherit;
    /* جعل الرابط يأخذ نفس لون العنوان الأصلي */
    display: block;
    /* لجعل منطقة النقر تشمل السطر بالكامل */
}

.ad-details h5 a:hover {
    color: #00a651;
    /* اختياري: تغيير اللون للأخضر عند تمرير الماوس */
}

/* لجعل منطقة النقر على الصورة واضحة */
.ad-img-box a {
    display: block;
    line-height: 0;
    /* لمنع وجود مسافات غريبة أسفل الصورة */
}

.view-all-btn {
    text-decoration: none;
    font-size: 11px;
    color: #00a651;
    border: 1px solid #00a651;
    padding: 4px 12px;
    border-radius: 20px;
    transition: 0.3s;
}

.view-all-btn:hover {
    background: #00a651;
    color: #fff;
}

/* تنسيق صف الراعي */
.list-row.sponsor-item {
    display: flex;
    align-items: center;
    gap: 15px;
    /* المسافة بين اللوجو والنص */
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    transition: 0.3s ease;
}

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

/* تنسيق النصوص */
/* تنسيق النصوص لتكون بجانب اللوجو مباشرة */
.list-row .info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.list-row .info h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.list-row .info p {
    margin: 3px 0 0;
    font-size: 11px;
    color: #999;
}

/* حاوية اللوجو - دائرية أو بزوايا ناعمة كما في الصور */
.logo-thumb {
    width: 60px;
    /* حجم متوسط ومناسب للرؤية */
    height: 60px;
    background: #ffffff;
    /* خلفية بيضاء نقية */
    border: 1px solid #f0f0f0;
    /* إطار خفيف جداً يحدد الحواف */
    border-radius: 12px;
    /* زوايا منحنية متناسقة مع روح التصميم */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* لضمان عدم خروج الصورة عن حدود الزوايا */
    flex-shrink: 0;
    /* يمنع صغر الحجم عند وجود نصوص طويلة بجانبه */
    transition: transform 0.3s ease;
    /* إضافة حركة ناعمة عند التفاعل */
}

/* تنسيق الصورة داخل حاوية الشعار */
.logo-thumb img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    /* لضمان عدم تمدد الصورة بشكل سيء وضهورها بالكامل */
}

/* تنسيق زر "إظهار الكل" (اللون الأخضر المحدث) */


.view-all-btn:hover {
    background: #00a651;
    color: #fff;
}

/* قائمة الرعاة - خط فاصل رقيق */
.list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.list-row:last-child {
    border: none;
}

.blue-bg {
    background: #0077b5;
}

.black-bg {
    background: #000;
}

/* قسم الإعلانات - كما في الصورة */
.ad-card-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: #fcfcfc;
    border-radius: 12px;
}

.ad-img-box img {
    width: 65px;
    height: 65px;
    border-radius: 10px;
    object-fit: cover;
}

.ad-details h5 {
    margin: 5px 0;
    font-size: 12px;
    line-height: 1.4;
}

.ad-time {
    font-size: 9px;
    color: #bbb;
}

.ad-meta {
    font-size: 9px;
    color: #999;
    margin: 0;
}

.ad-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 5px;
    color: #ddd;
}

.ad-actions i:hover {
    color: #00a651;
    cursor: pointer;
}

/* المحتوى الأوسط */
.hero-banner {
    width: 100%;
    height: 250px;
    border-radius: 25px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 50px;
    /* ضع رابط صورتك هنا */
    background-image: url('header-bg.png');
    background-size: cover;
    background-position: center;
    background-color: #e9eaff;
    /* لون احتياطي */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* لجعل الصورة تملأ الخلفية تحت النص */
.banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* لضمان عدم تمدد الصورة بشكل سيء */
    z-index: 0;
}

.banner-text,
.header-controls,
.banner-dots {
    position: relative;
    z-index: 2;
    /* لضمان ظهور المحتوى فوق الصورة */
}

/* لضمان أن النص فوق الصورة دائماً وقابل للقراءة */
/* .hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(233, 234, 255, 0.9), transparent);
    z-index: 1;
} */
/* 2. أيقونات الإضافة والتعديل */
.header-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.control-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #00a651;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
}

.control-btn:hover {
    background: #00a651;
    color: white;
    transform: scale(1.1);
}

.banner-text h1 {
    font-size: 24px;
    color: #1a1a1a;
    margin: 0;
}

/* 3. تنسيق زر "التفاصيل" */
/* .cta-btn {
    background: white;
    color: #1a1a1a;
    border: none;
    padding: 12px 35px;
    border-radius: 12px;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-top: 15px;
}
.cta-btn:hover {
    background: #00a651;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 91, 255, 0.3);
} */
/* 4. تنسيق أزرار التابس (التبويبات) */
.tabs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;

    /* إضافة الخلفية والتنسيق من الجوانب الأربعة */
    background-color: #fcfcfc;
    /* خلفية رمادية فاتحة جداً أو بيضاء */
    padding: 12px 20px;
    /* مسافة داخلية من جميع الجهات */
    border: 1px solid #eee;
    /* إطار خفيف يحيط بالشريط */
    border-radius: 15px;
    /* زوايا دائرية ناعمة للشريط بالكامل */

    margin: 16px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    /* ظل خفيف جداً لإعطاء عمق */
}

.tabs-buttons,
.tabs-actions {
    display: flex;
    gap: 12px;
}

/* 2. تنسيق أزرار التابس الموحد */
.tab-item {
    background: #fff;
    color: #00a651;
    padding: 8px 25px;
    border-radius: 10px;
    border: 1px solid #fdc83d;
    /* الإطار الأصفر */
    font-size: 14px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 3. حالة الهوفر (Hover) للتابس والأيقونات */
.tab-item:hover,
.tabs-actions i:hover {
    background: #f9f9f9;
    color: #b0b0b0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #00a651;
}

/* 4. الحالة النشطة (Active) - تم دمجها وإلغاء الـ After القديم */
.tab-item.active {
    background: #00a651 !important;
    color: #fff !important;
    border-color: #00a651;
    box-shadow: 0 4px 12px rgba(0, 166, 81, 0.3);
    transform: translateY(0);
}

/* 5. تنسيق الأيقونات في نهاية الشريط */
.tabs-actions i {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #00a651;
    border: 1px solid #eee;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
    /* لمنع تحديد الأيقونة كنص عند الضغط المتكرر */
}

.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    /* تظهر أقصى اليمين من الأسفل */
    background: rgba(0, 166, 81, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;

    /* الحركة والاختفاء */
    visibility: hidden;
    /* مخفي تماماً */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

/* الكلاس الذي يضيفه الجافا سكريبت عند النقر */
.toast-notification.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* شبكة الـ 4 أعمدة للمنتجات */
.items-grid-4 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
    margin-bottom: 16px;
}

.product-item {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    transition: 0.3s ease;
    border: 1px solid transparent;
}

.product-item:hover {
    transform: translateY(-5px);
    border-color: #00a651;
}

.img-container {
    position: relative;
    height: 130px;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.floating-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #00a651;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: bold;
}

.item-body {
    padding: 15px;
}

.item-body h4 {
    margin: 0;
    font-size: 14px;
}

.author {
    font-size: 11px;
    color: #aaa;
    margin: 5px 0;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
    margin-top: 10px;
}

/* تنسيق زر "إظهار التفاصيل" ليكون مطابقاً للصور */
.more-link {
    text-decoration: none;
    color: #00a651;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 8px;
    background: #f4f3ff;
    /* خلفية ناعمة جداً */
    transition: 0.3s;
}

.more-link:hover {
    background: #00a651;
    color: #fff;
}

/* السيدبار الأيمن */
.profile-card {
    text-align: center;
    background: #fff;
    padding: 30px 20px;
    border-radius: 20px;
}

.profile-card p {
    margin: 0 0 10px;
}

/* أهم تعديل */
.avatar-box {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.avatar-box img {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    border: 4px solid #f0f2f5;
    object-fit: cover;
    display: block;
}

.btn-primary {
    width: 100%;
    background: #111b21;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    margin-top: 15px;
    cursor: pointer;
}

.vertical-menu {
    background: #fff;
    border-radius: 20px;
    padding: 10px;
    margin: 20px 0;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #444;
    font-weight: 600;
    border-radius: 12px;
    transition: 0.3s;
}

.nav-item.active,
.nav-item:hover {
    background: #f4f3ff;
    color: #00a651;
}

/* الحاوية الرئيسية للكارت - تحويلها للون الأبيض */
/* --- تنسيق كارت التواصل النهائي --- */

.purple-contact-card {
    background: #ffffff !important;
    color: #444;
    padding: 25px;
    border-radius: 25px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    direction: rtl;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

/* أيقونات البيانات الأساسية (الهاتف/الايميل) - ثابتة دائماً */
.contact-row i {
    color: #00a651 !important;
    font-size: 16px;
    background: none !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
}

.social-bar {
    display: flex;
    justify-content: center;
    /* توسيط الأيقونات */
    padding-top: 15px;
    border-top: 1px solid #f1f1f1;
    margin-top: 10px;
}

.icons {
    display: flex;
    gap: 10px;
}

/* أيقونات السوشيال ميديا - الحالة العادية */
.icons i {
    width: 35px !important;
    height: 35px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #f8f9fa !important;
    color: #888 !important;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    border: 1px solid #eee;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* أيقونات السوشيال ميديا - عند تمرير الماوس (الهوفر) */
.icons i:hover {
    background: #00a651 !important;
    /* خلفية خضراء */
    color: #ffffff !important;
    /* أيقونة بيضاء */
    border-color: #00a651 !important;
    transform: translateY(-5px) !important;
    /* رفعة للأعلى */
    box-shadow: 0 6px 15px rgba(0, 166, 81, 0.3) !important;
}

/* تنسيق شريط التنقل */
/* تنسيقات أساسية للنافبار */
/* تنسيق الحاوية الرئيسية للشريط */
.main-navbar {
    background: #fff;
    border: 1px solid #eee;
    /* تغيير من border-bottom إلى border كامل ليظهر الريديوس */
    min-height: 100px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    /* التحديث الجديد */
    border-radius: 15px;
    /* إضافة الريديوس المطلوبة */
    margin: 16px 0px;
    /* إضافة مسافة خارجية ليظهر شكل الكارت الدائري */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* ظل خفيف لتعزيز المظهر الجمالي */
}


.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

/* رص العناصر في مجموعات */
.nav-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* تنسيق البحث وزر X */
.search-wrapper {
    background: #f1f3f4;
    border-radius: 12px;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    width: 350px;
    height: 40px;
}

.search-clear-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.search-field {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    padding: 0 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
}

/* تنسيق القوائم المنسدلة المظلمة بالأزرق في الصورة */
.menu-header {
    position: relative;
}

.menu-header {
    display: none;
    position: absolute;
    top: calc(100% + 15px);
    /* تظهر تحت الشريط بمسافة بسيطة */
    right: 0;
    background: #fff;
    border-radius: 15px;
    border: 1px solid #f0f0f0;
    min-width: 260px;
    z-index: 1000;
}

.menu-header.active {
    display: block;
    animation: slideUp 0.3s ease;
}

/* تنسيق قائمة الإشعارات الداخلي */
/* تنسيق قائمة الإشعارات (مطابقة للـ HTML الخاص بك) */
.notify-box {
    padding: 0;
    /* إزالة البادينج من الحاوية لضبط العناصر بالداخل */
    min-width: 280px;
}

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

.notify-list li {
    padding: 12px 15px;
    font-size: 13px;
    border-bottom: 1px solid #fcfcfc;
    color: #666;
    transition: 0.3s;
}

.notify-list li:hover {
    background-color: #f4fff9;
}

.all-link {
    display: block;
    text-align: center;
    padding: 12px;
    color: #007bff;
    /* اللون الأزرق للرابط */
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* رص الأيقونات على اليسار */
.nav-left-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    /* المسافة بين الأيقونات */
}

.dropdown-wrapper {
    position: relative;
    /* ضروري لضبط مكان القائمة */
    display: flex;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 19px;
    color: #444;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: 0.2s;
}

.icon-btn:hover {
    color: #00a651;
}

.notify-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff4d4d;
    color: white;
    font-size: 10px;
    min-width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* تنسيق القوائم المنسدلة (الحل النهائي للظهور تحت الأيقونة) */
.custom-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    /* تظهر مباشرة تحت الأب */
    left: 0;
    /* تفتح لليسار */
    background: white;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid #eee;
    z-index: 9999;
    padding: 10px 0;
    margin-top: 10px;
}

.custom-dropdown-menu.active {
    display: block;
}

.custom-dropdown-menu li {
    list-style: none;
}

.custom-dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    text-align: right;
}

.custom-dropdown-menu a:hover {
    background: #f9f9f9;
    color: #00a651;
}

/* تنسيق البحث */
.search-bar {
    display: flex;
    align-items: center;
    background: #f1f3f4;
    border-radius: 10px;
    padding: 2px 10px;
    width: 300px;
}

.x-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-weight: bold;
}

.s-input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    padding: 8px;
    text-align: right;
}

/* روابط اليمين */
.nav-right-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: bold;
    font-size: 14px;
}

.nav-link.active {
    color: #00a651;
    border-bottom: 2px solid #00a651;
}