
@font-face {
    font-family: 'Tajawal';
    src: url('font-2025.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    background-color: #46a04650; /* الخلفية الفاتحة المعتمدة من الملف الثاني */
    color: #2c3e50;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0.5rem;
    overflow-x: hidden;
    direction: rtl;
}
.app_container {
    background: #f3f1f162; /* تحويلها للون الأبيض الثابت ليلائم الثيم الفاتح */
    border: 1px solid #e2e8f0; /* حدود ناعمة ومحسوسة متوافقة مع الثيم الفاتح */
    border-radius: 24px; /* الحفاظ على الزوايا المنحنية الفخمة من الملف الأول */
    text-align: center;
    width: 100%;
    max-width: 650px; /* العرض المثالي المحكوم الذي يمنع تشتت الشاشة */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* ظل خفيف جداً وأنيق يناسب الخلفية الفاتحة */
    padding: 3% 5%;
    margin-bottom: 2%;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
/* قسم الترحيب الرئيسي */
.welcome_hero {
    margin-bottom: 2rem;
}

/* العنوان الرئيسي المنحوت بلون داكن فخم */
.main_title {
    font-size: clamp(0.8rem, 2vw, 1.5rem);
    font-weight: 900;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #1a252f; /* كحلي داكن يتناسب مع الثيم الفاتح الجديد */
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15)); /* ظل ناعم وخفيف جداً يناسب الخلفية الفاتحة */
}

/* تسمية العنوان الفرعي */
.bar_label {
    color: #372d47; /* رمادي ناصع مناسب للقراءة */
    font-size: clamp(0.85rem, 1.90vw, 0.7rem);
    font-weight: 600;
}

/* عناوين الأقسام الرئيسية */
.section_title {
    font-size: clamp(1.0rem, 2.9vw, 1.2rem);
    font-weight: 700;
    color: #3498db; /* لون أزرق حيوي ومريح للمنصة */
    text-align: right;
    margin-bottom: 1.2rem;
    margin-top: 1.5rem;
    padding-right: 0.5rem;
    border-right: 4px solid #3498db; /* خط جانبي يعطي طابعاً منظماً */
}
/* الخط الفاصل المقطع البسيط */
.visual_divider_dashed {
    width: 100%;
    height: 1px;
    border-top: 2px dashed rgba(52, 152, 219, 0.25); /* نقاط ناعمة بلون أزرق خفيف يناسب الثيم الفاتح */
    margin: 4% 0; /* هامش عمودي مرن بنسبة مئوية */
}
/* حاوية الإعلان المتجاوبة والنظيفة */
.app_ads_banner {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); /* ظل ناعم وخفيف يناسب الوضع الفاتح */
    border: 1px solid #e2e8f0;
    margin: 3% 0;
}

.app_ads_banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
/* شريط أو حاوية التجميع للأزرار (إذا استخدمت أفقياً) */
.nav_pills_wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* 1. الكلاس الأساسي المشترك لكل الأزرار */
.pill_btn {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 50px; /* المظهر البيضاوي المعتمد */
    transition: all 0.25s ease;
    box-sizing: border-box;
    cursor: pointer;
}

/* 2. الزر الرمادي الافتراضي (بديل الأزرار العادية) */
.pill_btn_default {
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
}
.pill_btn_default:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #94a3b8;
}

/* 3. الزر الأزرق الرئيسي (تطبيق الرفاقه / التفاصيل) */
.pill_btn_primary {
    background: rgba(52, 152, 219, 0.12); /* أزرق خفيف وناعم */
    color: #2980b9;
    border: 1px solid rgba(52, 152, 219, 0.35);
}
.pill_btn_primary:hover {
    background: #3498db;
    color: #ffffff;
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

/* 4. الزر الأخضر (واتساب / تأكيد بنجاح) */
.pill_btn_success {
    background: rgba(37, 211, 102, 0.12); /* أخضر واتساب ناعم */
    color: #1e7e34;
    border: 1px solid rgba(37, 211, 102, 0.35);
}
.pill_btn_success:hover {
    background: #25d366;
    color: #ffffff;
    border-color: #25d366;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

/* 5. زر هوية جديدة ومشاركة الموقع (كان أبيض داكن والآن أصبح كحلياً فخماً ليبرز) */
.pill_btn_new_identity {
    background: #1a252f; /* كحلي رسمي مأخوذ من أرضية الملف الثاني */
    color: #ffffff;
    border: 1px solid #1a252f;
}
.pill_btn_new_identity:hover {
    background: #34495e;
    color: #ffffff;
    border-color: #34495e;
    box-shadow: 0 4px 12px rgba(26, 37, 47, 0.2);
}

/* 6. زر تسجيل الخروج أو البلاغات (الأحمر) */
.pill_btn_logout {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.3);
}
.pill_btn_logout:hover {
    background: #e74c3c;
    color: #ffffff;
    border-color: #e74c3c;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}
/* حاوية الهيدر الكاملة والتنقل السريع */
.compact_header_wrapper {
    width: 100%;
    text-align: right;
    margin-bottom: 0.5rem;
}

/* شريط صندوق هوية المستخدم */
.compact_hero {
    background: #f8fafc; /* رمادي خفيف جداً وناعم ومريح للعين بدلاً من الداكن */
    border: 1px solid #e2e8f0; /* حدود ناعمة تحدد الصندوق */
    padding: 1rem;
    border-radius: 16px; /* الحفاظ على الانحناءات المتناسقة مع الحاوية */
    margin-bottom: 1rem;
}

/* صندوق ترتيب الصورة والنصوص أفقياً */
.user_info_box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* دائرة الإيموجي المستعار للمستخدم */
.user_avatar_circle {
    font-size: 1.8rem;
    background: #ffffff; /* خلفية بيضاء لتبرز الدائرة */
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 1px solid rgba(52, 152, 219, 0.25); /* إطار أزرق خفيف جداً يطابق هوية المنصة */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

/* تصغير عنوان الرأس داخل الهيدر لمنع التضارب وحجم مرن */
.header_title_compact {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem) !important;
    margin-bottom: 0.2rem !important;
    text-align: right;
    color: #1a252f; /* لون كحلي داكن متناسق مع العناوين الجديدة */
}

/* النصوص الفرعية للمعرف والوقت (أهلاً بك زائرنا الكريم أو الـ ID) */
.cap_label {
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: #7f8c8d; /* لون رمادي هادئ وواضح بالقراءة */
    font-weight: 600;
}
/* 1. شبكة العرض والبطاقات للمنشورات النشطة */
.stores-grid { 
    display: flex; 
    flex-direction: column; /* [تم التحديث] جعل الكروت تترتب عمودياً لتأخذ عرض الشاشة بالكامل */
    gap: 12px; 
    width: 100%;
    margin: 1rem 0 1.5rem 0; 
    padding: 0; 
}

/* الرابط المحيط بالكارت لإلغاء التنسيق الافتراضي للروابط */
.store-card-link { 
    text-decoration: none; 
    color: inherit; 
    display: block; 
    width: 100%; /* [تم التحديث] ضمان تمدد الرابط بكامل العرض */
}

/* 2. كارت المنشور النشط */
.store-card { 
    background: #ffffff; 
    border-radius: 16px; /* زوايا منحنية متناسقة مع الهوية الجديدة */
    padding: 14px 16px; /* [تم التحديث] تعديل الحشوة لتناسب الشكل الجديد الممتد */
    text-align: right; /* [تم التحديث] محاذاة النص لليمين لسهولة القراءة العربية */
    border: 1px solid #e2e8f0; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02); 
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; /* [تم التحديث] محاذاة العناصر لليمين لتسهيل قراءة الأسطر */
    justify-content: flex-start; 
    height: 130px; /* [تم التحديث] تحديد ارتفاع ثابت ومتناسق هندسياً لكافة الكروت */
    box-sizing: border-box;
    overflow: hidden; /* [تم التحديث] إخفاء أي محتوى زائد لضمان ثبات الارتفاع */
}

/* تفاعل الكارت عند التمرير */
.store-card:hover { 
    transform: translateY(-2px); /* [تم التحديث] تقليل الارتفاع ليناسب شاشات الهواتف واللمس */
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.08); /* ظل أزرق خفيف جداً يطابق الهوية */
    border-color: #3498db; 
}

/* [تم التحديث] تم حذف كود .store-avatar المهمل تماماً من هنا لنظافة الملف */

/* [تم التحديث] تنسيق الفقرة النصية للمنشور لضمان ثبات الارتفاع وإزالة تنبيه المحرر */
.store-card p { 
    margin: 0; 
    font-size: 0.95rem; 
    line-height: 1.4;
    color: #2c3e50;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* عرض سطرين كحد أقصى للنص قبل القص */
    line-clamp: 2; /* [تم التحديث] الخاصية القياسية لمنع ظهور الخط الأصفر المزعج */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* 4. النص الافتراضي في حال عدم وجود منشورات */
.grid-empty-text {
    text-align: center;
    color: #7f8c8d;
    padding: 30px 0;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
}


/* حاوية كروت المنتجات العمودية */
.products-grid {
    display: flex;
    flex-direction: column; 
    gap: 20px; 
    width: 100%;
    margin: 1.5rem 0;
}

/* كارت المنشور الأبيض النظيف */
.product-card {
    background: #ffffff; 
    border-radius: 16px; /* زوايا منحنية متناسقة مع الهوية */
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03); 
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    width: 100%;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.product-card:hover {
    transform: translateY(-3px);
    border-color: #3498db; 
}

.product-img-wrapper {
    width: 100%;
    height: auto; 
    border-bottom: 1px solid #f1f5f9;
}
.product-img {
    width: 100%;
    height: auto; 
    display: block;
    object-fit: cover;
}

.product-info {
    padding: 15px;
    text-align: right;
}
.product-title {
    font-size: 1.2rem; 
    color: #1a252f;
    font-weight: 700;
    margin-bottom: 8px;
}
.product-desc {
    font-size: 0.75rem;
    color: #5a738e; 
    white-space: pre-line; 
}

/* شريط التحكم أسفل الكارت */
.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8fafc; 
    border-top: 1px solid #f1f5f9;
}

.product-date {
    font-size: 0.75rem;
    color: #5a738e; 
    white-space: pre-line; 
}
/* رابط الإبلاغ المباشر الأحمر */
.report-link {
    color: #e74c3c; 
    text-decoration: none; 
    font-size: 10px; 
    font-weight: bold;
}
.report-link:hover {
    text-decoration: underline;
}
/* النصوص الفرعية المساعدة في صفحات النماذج */
.setup-hint-text {
    color: #7f8c8d; 
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    line-height: 1.6;
    margin-top: 0.5rem;
}

/* نص كلمة "أو" الفاصلة بين الخيارات */
.divider-title {
    margin: 1.5rem 0;
    color: #7f8c8d;
    font-size: 1.1rem;
    font-weight: bold;
}
/* الأيقونات الكبيرة التعبيرية داخل الحاويات */
.large_visual_emoji {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 1rem;
    display: inline-block;
}

/* نصوص الشرح والأوصاف الطويلة داخل حاويات التنبيه */
.announcement_long_desc {
    color: #2c3e50;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   بوابة النماذج والمدخلات الموحدة 
   ========================================================================== */

/* حاوية الحقل المتباعد */
.form_group {
    width: 100%;
    margin-bottom: 1.2rem;
    text-align: right;
}

/* تسمية ونصوص الحقول العلوية */
.form_label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: bold;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    color: #34495e;
}

/* نمط حقول المدخلات الموحد النظيف للفاتح */
.app_form_input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px; /* زوايا دائرية ناعمة متناسقة */
    font-size: 0.95rem;
    color: #2c3e50;
    background-color: #f8fafc; /* خلفية هادئة تميز الحقل */
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* تأثير التوهج والتركيز الأزرق الاحترافي عند كتابة المستخدم */
.app_form_input:focus {
    border-color: #3498db;
    background-color: #ffffff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.12); /* هالة زرقاء ناعمة */
}
/* روابط التوجيه والتحكم الفرعية داخل النماذج */
.auth-forgot-link-wrapper {
    text-align: left; 
    margin: -5px 0 1.2rem 0;
}
.auth-forgot-link {
    color: #e74c3c; 
    text-decoration: none; 
    font-size: 13px;
    font-weight: bold;
}
.auth-forgot-link:hover {
    text-decoration: underline;
}

/* منطقة الدعوة السفلية في النماذج */
.auth-footer-prompt {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px dashed #e2e8f0;
}
.auth-footer-prompt h5 {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 12px;
    font-weight: normal;
}

/* صناديق التنبيهات الموحدة للنجاح والأخطاء بداخل النماذج */
.app_alert {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 1.2rem;
    font-size: 14px;
    font-weight: bold;
    text-align: right;
    line-height: 1.5;
}
.alert_success {
    background-color: #e2fbe8;
    color: #1e7e34;
    border: 1px solid #c3e6cb;
}
.alert_danger {
    background-color: #fce8e6;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}
/* كلاس مساعد لجافاسكريبت الفحص والتحميل لتأمين تقليل الشفافية بنقاء */
.auth-btn-sending {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}
/* بطاقة الهوية الرقمية الذكية الجاهزة للتصوير */
.digital-id-card {
    background: #f8fafc;
    border: 2px solid #3498db;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    max-width: 450px;
    margin: 1.5rem auto;
    border-right: 6px solid #3498db; /* خط جانبي يطابق الهوية الزرقاء للمنصة */
    text-align: right;
}

/* مجموعات البيانات وعرض المعرفات والأرقام الكبيرة */
.auth-data-group {
    margin-bottom: 1rem;
}
.auth-data-group label {
    color: #7f8c8d;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
}
.auth-id-display {
    font-size: 1.3rem;
    font-weight: bold;
    color: #1a252f;
}
.auth-pass-display {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e74c3c; /* لون أحمر واضح ومميز لكلمة المرور */
    font-family: monospace;
    letter-spacing: 1px;
}

/* تنسيق موحد للحقول المقفلة وغير القابلة للتعديل داخل النماذج */
.app_form_input:disabled,
.app_form_input[readonly] {
    background-color: #f1f5f9 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

/* نص تنبيهي صغير وبارز للحقول المقفلة */
.form_hint_error {
    color: #e74c3c;
    display: block;
    margin-top: 5px;
    font-weight: bold;
    font-size: 0.8rem;
    text-align: right;
}


/* ==========================================================================
   9. جدول المتاجر ونظام الترقيم الرقمي (Stores Table & Pagination)
   ========================================================================== */
.stores_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    text-align: center;
}

.stores_table th {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 2px solid #e2e8f0;
    padding: 12px 10px;
    color: #1a252f;
    font-weight: 700;
}

.stores_table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
}

.store_view_link {
    text-decoration: none;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
    display: inline-block;
}

.store_view_link:hover {
    transform: scale(1.2);
}

.pagination_container {
    text-align: center;
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page_num_link {
    background-color: #f8fafc;
    color: #475569;
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    transition: all 0.2s ease;
}

.page_num_link:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.page_num_active {
    background-color: #25d366; /* اللون الأخضر المعتمد في الثيم الخاص بك */
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.2);
}
