/* ==========================================================================
   1. الإعدادات العامة والخطوط (Global Styles & Fonts)
   ========================================================================== */
@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;
}

/* ==========================================================================
   2. الحاوية الرئيسية والهيكل (App Container & Animations)
   ========================================================================== */
.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); }
}

/* ==========================================================================
   3. العناوين والنصوص الموحدة (Typography & Labels)
   ========================================================================== */
.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; /* خط جانبي يعطي طابعاً منظماً */
}

.cap_label {
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: #7f8c8d; /* لون رمادي هادئ وواضح بالقراءة */
    font-weight: 600;
}

.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;
}

.announcement_long_desc {
    color: #2c3e50;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    line-height: 1.8;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   4. ترويسة المستخدم والتنقل العلوي (Header & Identity Wrapper)
   ========================================================================== */
.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; /* لون كحلي داكن متناسق مع العناوين الجديدة */
}

/* ==========================================================================
   5. نظام الأزرار والشارات البيضاوية (Pills Buttons System)
   ========================================================================== */
.nav_pills_wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.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;
}

.pill_btn_default {
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
}
.pill_btn_default:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #94a3b8;
}

.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);
}

.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);
}

.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);
}

/* ==========================================================================
   6. بطاقات وشبكة كروت المنتجات (Products Display Grid)
   ========================================================================== */
.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; 
}

/* ==========================================================================
   7. كلاسات تخصيص المتجر والأسعار (Store Profile & Pricing)
   ========================================================================== */
.store_avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.store_avatar_placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 15px;
}

.badge_sale {
    background-color: #e53e3e;
    color: white;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
    margin-right: 5px;
    display: inline-block;
    vertical-align: middle;
}

.product_price_wrapper {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product_price_current {
    font-size: 1.1rem;
    color: #000000;
    font-weight: bold;
}

.product_price_old {
    font-size: 0.9rem;
    color: #000000;
    text-decoration: line-through;
    font-weight: bold;
    opacity: 0.5;
}

/* ==========================================================================
   8. العناصر البصرية والتذييل (Visuals & Footer)
   ========================================================================== */
.visual_divider_dashed {
    width: 100%;
    height: 1px;
    border-top: 2px dashed rgba(52, 152, 219, 0.25); /* نقاط ناعمة بلون أزرق خفيف يناسب الثيم الفاتح */
    margin: 4% 0; /* هامش عمودي مرن بنسبة مئوية */
}

.large_visual_emoji {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 1rem;
    display: inline-block;
}

.report-link {
    color: #e74c3c; 
    text-decoration: none; 
    font-size: 10px; 
    font-weight: bold;
}
.report-link:hover {
    text-decoration: underline;
}

.app_footer {
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid #e2e8f0;
    width: 100%;
}

/* ==========================================================================
   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);
}
