/* ملف profile.css - نسخة محدثة ومحسنة */
:root {
    --pink: #e5a9b4;
    --blue: #a9d4e5;
    --beige: #e5dcd2;
    --off-white: #fff9f7;
    --text-color: #5d5d5d;
    --heading-color: #5d5d5d;
    --price-color: #e74c3c;
    --border-color: #EAE0D7;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --light-gray: #f9fafb;
}

/* ✨ تحويل البروفايل بالكامل إلى تطبيق حقيقي (منع القوائم المزعجة عند الضغط المطول) ✨ */
*, *::before, *::after {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important; /* يمنع قائمة الآيفون وسفاري المنبثقة */
    -webkit-user-select: none !important;   /* يمنع تحديد النصوص كصفحات الويب */
    user-select: none !important;
}

/* 👈 استثناء حقول الإدخال لتمكين الزبون من كتابة ولصق البيانات */
input, 
textarea, 
[contenteditable="true"] {
    -webkit-user-select: text !important;
    user-select: text !important;
}

/* منع سحب الروابط والصور كملفات خارجية */
a, img, button {
    -webkit-user-drag: none !important;
}

body {
    background-color: var(--light-gray);
}

.profile-page-header {
    background-color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 999;
}

.back-to-store-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-to-store-link:hover {
    color: var(--pink);
}

.profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    direction: rtl;
}

.profile-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.profile-header h1 {
    color: var(--heading-color);
    margin-bottom: 10px;
}

.profile-header p {
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
    overflow-x: auto;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.profile-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn .icon {
    font-size: 1.2rem;
}

.tab-btn.active {
    color: var(--pink);
    border-bottom-color: var(--pink);
}

.tab-btn:hover:not(.active) {
    background-color: #f5f5f5;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.profile-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.profile-card h2 {
    color: var(--heading-color);
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.4rem;
}

.form-group {
    margin-bottom: 20px;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Tajawal', sans-serif;
    box-sizing: border-box;
    transition: all 0.3s;
    direction: rtl;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(229, 169, 180, 0.3);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-with-icon input[type="password"],
.input-with-icon input[type="text"] {
    width: 100%;
    padding-right: 45px !important;
    padding-left: 45px !important;
    text-align: right;
    box-sizing: border-box;
}

.toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: color 0.2s ease, transform 0.2s ease;
}

.toggle-password:hover {
    color: var(--pink);
    transform: translateY(-50%) scale(1.1);
}

.toggle-password svg {
    display: block;
    width: 20px;
    height: 20px;
}

html[dir="ltr"] .toggle-password {
    left: auto;
    right: 12px;
}

html[dir="ltr"] .input-with-icon input {
    padding-left: 45px !important;
    padding-right: 45px !important;
    text-align: left;
}

.form-actions {
    margin-top: 25px;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}

.save-btn, .cancel-btn {
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.save-btn {
    background-color: var(--pink);
    color: white;
}

.save-btn:hover {
    background-color: #d698a4;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.cancel-btn {
    background-color: #f0f0f0;
    color: var(--text-color);
}

.cancel-btn:hover {
    background-color: #e0e0e0;
}

.change-password-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.change-password-section h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--heading-color);
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item {
    background: #ffffff;      /* لون أبيض للكارت ليكون منفصلاً */
    border: 1px solid #e0e0e0; 
    border-radius: 16px;       
    padding: 20px;
    
    /* الفراغ والظل */
    margin-bottom: 25px;       
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    
    position: relative;
    cursor: pointer;

    /* الحركة الناعمة */
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

/* تأثير عند الضغط (للموبايل) */
.order-item:active {
    transform: scale(0.98); /* تصغير بسيط يعطي شعور الاستجابة */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* تحسين شكل الفواصل الداخلية */
.order-item hr {
    border: 0;
    border-top: 1px dashed #eee;
    margin: 15px 0;
}

/* تأثير التحويم (للكمبيوتر) */
.order-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.order-id {
    font-weight: bold;
    color: var(--heading-color);
}

.order-date {
    color: #777;
    font-size: 0.9rem;
}

.order-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: capitalize;
}

.status-pending { background-color: #fff3cd; color: #856404; }
.status-confirmed { background-color: #d1ecf1; color: #0c5460; }
.status-shipped { background-color: #d4edda; color: #155724; }
.status-delivered { background-color: #c8e6c9; color: #1e4620; }
.status-cancelled { background-color: #f8d7da; color: #721c24; }

.order-details {
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.order-items, .order-total {
    margin-bottom: 10px;
}

.order-items strong, .order-total strong {
    display: block;
    margin-bottom: 5px;
    color: var(--heading-color);
}

.order-total {
    text-align: left;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--price-color);
}

/* ==========================================================
   ✨ التصميم الفخم المطور لتتبع الطلبات (Order Tracking Pro) ✨
   ========================================================== */

.tracking-orders {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* كارت التتبع الرئيسي */
.tracking-item {
    background: #ffffff;
    border: 1.5px solid #edf0f2;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tracking-item:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
    border-color: #e2e8f0;
}

/* رأس بطاقة التتبع */
.tracking-header {
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.tracking-id-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tracking-order-num {
    font-size: 1.05rem;
    font-weight: 800;
    color: #2d3436;
}

.tracking-order-date {
    font-size: 0.8rem;
    color: #888;
    margin-top: 3px;
}

/* شريط مصغر لمعاينة صور منتجات الطلب */
.tracking-items-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: #fff9fa;
    border-bottom: 1px dashed #ffd8e0;
    overflow-x: auto;
}

.tracking-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #eee;
    background: #fff;
    flex-shrink: 0;
}

.tracking-items-count {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--pink);
    background: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #ffd8e0;
}

/* حاوية الخطوات الرأسية */
.tracking-steps {
    padding: 26px 24px;
    position: relative;
}

.step {
    display: flex;
    position: relative;
    padding-right: 48px;
    align-items: flex-start;
}

.step:not(:last-child) {
    padding-bottom: 34px;
}

/* خط التوصيل بين الخطوات */
.step:not(:last-child)::before {
    content: '';
    position: absolute;
    right: 15px;
    top: 32px;
    width: 3px;
    height: calc(100% - 24px);
    background-color: #e9ecef;
    border-radius: 2px;
    transition: background-color 0.4s ease;
}

.step.completed:not(:last-child)::before {
    background: linear-gradient(180deg, var(--pink, #e5a9b4) 0%, #d88c9a 100%);
}

.step.completed .step-icon {
    background-color: var(--pink, #e5a9b4);
    border-color: var(--pink, #e5a9b4);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(229, 169, 180, 0.35);
}
/* أيقونة الخطوة (الدائرة) */
.step-icon {
    position: absolute;
    right: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f1f3f5;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #868e96;
    z-index: 2;
    transition: all 0.3s ease;
}

/* الخطوة المكتملة: وردي ناعم مع علامة صح بيضاء بدلاً من الأخضر */
.step.completed .step-icon {
    background-color: var(--pink, #e5a9b4) !important;
    border-color: var(--pink, #e5a9b4) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(229, 169, 180, 0.35) !important;
}

/* الخطوة النشطة الحالية: دائرة بيضاء بإطار وردي ونبض هادئ مطابق للموقع */
.step.active .step-icon {
    background-color: #ffffff !important;
    border-color: var(--pink, #e5a9b4) !important;
    color: var(--pink, #e5a9b4) !important;
    box-shadow: 0 0 0 4px rgba(229, 169, 180, 0.25) !important;
    animation: trackingPulse 2s infinite;
}

/* خط التوصيل بين الخطوات المكتملة */
.step.completed:not(:last-child)::before {
    background: linear-gradient(180deg, var(--pink, #e5a9b4) 0%, #d88c9a 100%) !important;
}

/* تمييز نص المرحلة النشطة بالوردي */
.step.active .step-title {
    color: var(--pink, #e5a9b4) !important;
    font-weight: 800;
}

/* زر عرض التفاصيل أسفل الكارت بلون وردي ناعم */
.tracking-item .view-details-btn {
    background: #fff0f3 !important;
    color: #d63031 !important;
    border: 1px solid #ffd1dc !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
}
.tracking-item .view-details-btn:hover {
    background: #ffe4ea !important;
    transform: translateY(-1px) !important;
}

.step-content {
    margin-top: 5px;
}

.step-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #adb5bd;
    margin: 0;
    transition: color 0.3s ease;
}

.step.active .step-title {
    color: var(--pink);
    font-weight: 800;
    font-size: 1rem;
}

.step.completed .step-title {
    color: #2d3436;
}

/* Addresses List */
.addresses-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 30px; }
.address-item { background: var(--light-gray); border-radius: 10px; padding: 20px; position: relative; border: 1px solid var(--border-color); transition: all 0.3s ease; }
.address-item:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.address-default { border-color: var(--pink); background: #fff9f9; }
.address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    /* هذا السطر مهم لمنع النص الطويل من دفع الأزرار */
    padding-left: 120px; 
}
.address-name { font-weight: bold; color: var(--heading-color); }
.default-badge { background: var(--pink); color: white; padding: 3px 10px; border-radius: 20px; font-size: 0.7rem; }
.address-actions {
    position: absolute;
    top: 20px;
    left: 15px;
    display: flex;
    gap: 8px;
    /* هذا السطر يضمن بقاء الأزرار فوق كل شيء */
    z-index: 2;
}
.address-action-btn { background: white; border: 1px solid var(--border-color); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; }
.address-action-btn:hover { background: #f0f0f0; transform: scale(1.1); }
.address-details {
    color: #555;
    line-height: 1.7;
}

.address-details div {
    margin-bottom: 5px;
}

.add-address-wrapper { text-align: center; }
.add-address-btn { background: var(--blue); color: white; border: none; padding: 12px 25px; border-radius: 8px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: all 0.3s; }
.add-address-btn:hover { background: #8bc4d9; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.address-form-container { margin-top: 20px; padding: 25px; background: var(--light-gray); border-radius: 10px; border: 1px solid var(--border-color);  }

/* Responsive */
/* Responsive & Mobile UX Improvements */
@media (max-width: 768px) {
    .profile-tabs { justify-content: flex-start; }
    .tab-btn { padding: 12px 15px; font-size: 0.9rem; }
    .profile-card { padding: 20px; }
    .order-header, .tracking-header { flex-direction: column; align-items: flex-start; }
    .form-actions { flex-direction: column; }
    .form-actions button { width: 100%; }
    .addresses-list { grid-template-columns: 1fr; }
    
 


    
    /* تعديل خاص لنافذة التأكيد الصغيرة */
    .confirm-modal-content {
        padding: 30px 20px 40px 20px;
    }

    /* تعديل خاص لنافذة الولاء */
    #loyalty-modal .modal-content {
        /* ضمان أن نافذة الولاء أيضاً تتبع نفس النمط */
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* ✨ تحويل شريط التبويبات إلى "شريط تنقل سفلي" (Bottom Navigation Bar) ✨ */
    
    /* إضافة مسافة في أسفل الصفحة لكي لا يغطي الشريط المحتوى */
    .profile-container {
        padding-bottom: 90px; 
    }

.profile-tabs {
    position: fixed;
    bottom: env(safe-area-inset-bottom, 0px);
    left: 0;
    right: 0; /* (1) هذا يضمن أن الشريط يلتزم بحدود الشاشة يمين ويسار */
    width: 100%;
    z-index: 990;
    background-color: #ffffff;
    
    border-bottom: none !important;
    border-top: 1px solid #eee;
    margin-bottom: 0 !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05); /* ظل خفيف للأعلى */
    
    /* (2) الخصائص المهمة لمنع الخروج عن الشاشة */
    box-sizing: border-box; /* ضروري جداً لاحتساب المسافات داخل العرض */
    
    display: flex;
    justify-content: flex-start; /* يبدأ الترتيب من البداية (يمين في العربي) */
    flex-wrap: nowrap; /* يمنع نزول الأزرار سطر جديد */
    overflow-x: auto; /* يسمح بالسحب يمين ويسار */
    
    /* (3) مسافات مريحة */
    padding: 10px 15px; /* 15px من الجوانب لضمان عدم التصاق أول زر بالحافة */
    gap: 15px; /* مسافة بين الأزرار */
    
    /* إخفاء شريط التمرير */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}

/* لإخفاء شريط التمرير في كروم وسفاري */
.profile-tabs::-webkit-scrollbar {
    display: none;
}

    /* تنسيق شكل الشريط (البار الوردي) */
    .profile-tabs::-webkit-scrollbar {
        display: block !important;  /* إجبار الظهور */
        height: 4px;                /* سمك الشريط */
    }
    
    .profile-tabs::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .profile-tabs::-webkit-scrollbar-thumb {
        background-color: var(--pink);
        border-radius: 10px;
    }

  .tab-btn {
    flex-direction: column;
    gap: 4px;
    padding: 8px 5px;
    
    /* التعديل: إلغاء التمدد والسماح بالسكرول */
    min-width: 75px; /* عرض أدنى */
    max-width: 100px; /* عرض أقصى لعدم تشويه الشكل */
    width: auto;
    flex: 0 0 auto; /* يمنع الانكماش ويجبر الشريط على التمرير */
    
    font-size: 0.7rem;
    border-bottom: none;
    border-radius: 8px;
    color: #aaa;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
}

    .tab-btn .icon {
        font-size: 1.4rem; /* تكبير الأيقونة لتكون هي العنصر البارز */
        margin-bottom: 0;
        display: block;
    }

    /* الحالة النشطة في الموبايل */
    .tab-btn.active {
        color: var(--pink); /* تلوين الأيقونة والنص */
        background-color: transparent; /* إلغاء الخلفية الرمادية */
        border-bottom: none;
        font-weight: 700;
        position: relative;
    }
    
    /* نقطة صغيرة فوق العنصر النشط للدلالة عليه */
    .tab-btn.active::after {
        content: '';
        position: absolute;
        top: 5px;
        width: 6px;
        height: 6px;
        background-color: var(--pink);
        border-radius: 50%;
    }
    
    /* إخفاء شريط التمرير (Scrollbar) لجمالية أكثر */
    .profile-tabs::-webkit-scrollbar {
        display: none;
    }

    /* ✨ الجزء الثالث: تحسين حقل البحث والأزرار للمس ✨ */

    /* تكبير حقل البحث وتوضيحه */
    .order-search-container {
        margin-top: 10px;
        margin-bottom: 20px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.03); /* ظل خفيف للبروز */
        border-radius: 12px;
    }
    
    .search-input {
        height: 50px; /* زيادة الارتفاع ليسهل الضغط عليه */
        font-size: 1rem;
        border: 1px solid #eee; /* تخفيف الحدود */
        background-color: #fff;
    }

    /* جعل الأزرار الرئيسية بعرض الشاشة (Full Width) */
    .add-address-btn, 
    .add-kid-btn, /* زر إضافة طفل */
    .save-btn, 
    .cancel-btn,
    .settings-btn {
        width: 100%; /* تأخذ العرض بالكامل */
        padding: 14px; /* مساحة داخلية أكبر للإبهام */
        font-size: 1rem;
        margin-bottom: 10px; /* مسافة بين الأزرار */
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 12px; /* زوايا أكثر دائرية */
    }

    /* تحسين شبكة أزرار الإعدادات لتكون تحت بعضها */
    .settings-buttons-grid {
        grid-template-columns: 1fr; /* عمود واحد بدلاً من اثنين */
        gap: 12px;
    }

    /* تحسين رأس الصفحة (Header) للموبايل */
    .profile-page-header {
        padding: 15px;
        flex-direction: column; /* ترتيب العناصر عمودياً */
        gap: 15px;
    }
    
    .profile-nav {
        width: 100%;
        justify-content: space-between; /* توزيع المسافة بين زر اللغة وزر الرجوع */
    }

    /* تحسين كروت القوائم (عناوين، أطفال، طلبات) */
    .address-item, .kid-item, .order-item {
        margin-bottom: 15px;
        border: none; /* إزالة الحدود القاسية */
        box-shadow: 0 2px 12px rgba(0,0,0,0.04); /* الاعتماد على الظل */
    }
    
}

/* Placeholders & Toasts */
.loading-placeholder, .no-orders-placeholder, .no-addresses-placeholder { text-align: center; padding: 50px 20px; color: #999; font-size: 1.1rem; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #333; color: white; padding: 15px 25px; border-radius: 8px; z-index: 2500; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); opacity: 0; transition: all 0.4s ease; transform: translate(-50%, 20px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { background: var(--success-color); }
.toast.error { background: var(--error-color); }

/* ✨✨ تنسيقات نافذة التأكيد المخصصة ✨✨ */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.confirm-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.confirm-modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.confirm-modal-overlay.is-open .confirm-modal-content {
    transform: scale(1);
}

.confirm-modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--heading-color);
}

.confirm-modal-content p {
    margin-bottom: 25px;
    color: var(--text-color);
    line-height: 1.6;
}

.confirm-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-btn {
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn.cancel {
    background-color: #f0f0f0;
    color: var(--text-color);
}
.modal-btn.cancel:hover {
    background-color: #e0e0e0;
}

.modal-btn.ok {
    background-color: var(--error-color); /* لون أحمر مناسب لعملية الحذف */
    color: white;
}
.modal-btn.ok:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* تنسيق حاوية الأزرار الجديدة */
.info-buttons-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
}

@media (min-width: 768px) {
    .info-buttons-container {
        grid-template-columns: 1fr 1fr;
    }
}

/* تنسيق الأزرار الجديدة */
.info-btn {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Tajawal', sans-serif;
}

.info-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--pink);
}

.info-btn-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 15px;
}

.info-btn-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--heading-color);
}

/* تنسيقات النوافذ المنبثقة للنماذج */
.form-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 1500; opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
}

.form-modal-overlay.is-open { opacity: 1; visibility: visible; }

.form-modal-content {
    background: white; padding: 0; border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%; max-width: 500px;
    transform: scale(0.9); transition: transform 0.3s ease;
    max-height: 90vh; /* 90% من ارتفاع الشاشة */
    overflow-y: auto;   /* إضافة سكرول داخلي عند الحاجة */
}

.form-modal-overlay.is-open .form-modal-content { transform: scale(1); }

/* إخفاء الخط الرمادي المزعج */
.modal-header::before,
.form-modal-content::before {
    display: none !important;
}

/* ضبط الهيدر: العنوان على اليمين تماماً والزر على اليسار تماماً */
.modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    direction: rtl !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 15px 20px !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.modal-header h3 { 
    margin: 0 !important; 
    font-size: 1.2rem !important; 
    font-weight: 800 !important; 
    color: var(--heading-color) !important; 
    text-align: right !important;
}

/* زر X باللون الأحمر المستقل في أقصى اليسار */
.close-modal-btn {
    background: #fdedec !important; 
    border: 1px solid #f5c6cb !important; 
    font-size: 1.3rem !important;
    font-weight: bold !important; 
    color: #e74c3c !important; 
    cursor: pointer !important; 
    line-height: 1 !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    transition: all 0.2s ease !important;
}

.close-modal-btn:hover {
    background: #e74c3c !important;
    color: #ffffff !important;
    transform: scale(1.05);
}

.modal-body { padding: 25px; }

/* تنسيق عرض المعلومات الشخصية */
#info-display-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.info-display-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.info-label { font-weight: 500; color: #555; }
.info-value { font-size: 1.1rem; font-weight: 700; color: var(--heading-color); }
.edit-btn {
    background: none; border: 1px solid var(--border-color); color: var(--text-color);
    padding: 8px 15px; border-radius: 8px; cursor: pointer;
    font-weight: 500; transition: all 0.2s ease;
}
.edit-btn:hover { background-color: var(--pink); color: white; border-color: var(--pink); }

/* تنسيق حقل إدخال كود التحقق */
#otp-input { text-align: center; font-size: 1.8rem; letter-spacing: 10px; font-family: monospace; }
.verify-instructions { text-align: center; margin-bottom: 20px; line-height: 1.6; }
#new-phone-display { font-weight: bold; color: var(--pink); }


/* تنسيق رقم الهاتف في نافذة التحقق من الرمز */
.otp-phone-display {
    font-size: 1.5rem; /* حجم الخط أكبر */
    font-weight: bold; /* خط سميك */
    color: var(--primary-color); /* لون مميز، يمكنك تغيير var(--primary-color) إلى لون آخر مثل #333 أو #007bff إذا لم يكن هذا اللون يناسبك */
    display: block; /* لجعل الرقم يظهر في سطر خاص به */
    margin-top: 5px; /* مسافة بسيطة من الأعلى */
    direction: ltr; /* لضمان عرض الرقم من اليسار إلى اليمين حتى في النصوص العربية */
    text-align: center; /* توسيط الرقم */
}

/* تعديل حجم الخط للنص الأساسي في المودال إذا لزم الأمر */
#phone-otp-modal p {
    font-size: 1.1rem; /* حجم الخط العادي للنص */
    line-height: 1.6;
}



/* ✨✨ حل مشكلة ظهور النوافذ خلف بعضها ✨✨ */

/* نعطي النافذة الرئيسية أولوية أقل */
#display-info-modal {
    z-index: 1490;
}

/* نتأكد أن بقية النوافذ لها أولوية أعلى */
#password-modal,
#change-name-modal,
#request-phone-modal,
#verify-phone-modal {
    z-index: 1500;
}


/* ==== تصميم جديد لزر تفعيل الإشعارات ==== */

/* جعل الزر يأخذ كامل عرض الحاوية ليبرز أكثر */
#enable-notifications-btn {
    grid-column: 1 / -1; 
    background-color: var(--blue); /* استخدام اللون الأزرق لتمييزه */
    border-color: var(--blue);
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(169, 212, 229, 0.5);
}

/* تغيير لون الأيقونة والنص إلى الأبيض ليتناسب مع الخلفية الجديدة */
#enable-notifications-btn .info-btn-icon,
#enable-notifications-btn .info-btn-text {
    color: white;
    transition: color 0.3s ease;
}

/* تأثير جميل عند مرور الماوس */
#enable-notifications-btn:hover {
    background-color: #8bc4d9;
    border-color: #8bc4d9;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(169, 212, 229, 0.7);
}

/* تكبير حجم الأيقونة */
#enable-notifications-btn .info-btn-icon {
    font-size: 3rem; 
}

/* تكبير حجم النص */
#enable-notifications-btn .info-btn-text {
    font-size: 1.3rem; 
}

/* تصميم الزر عندما يكون معطلاً */
#enable-notifications-btn:disabled {
    background-color: #bdc3c7;
    border-color: #bdc3c7;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* إخفاء النص والأيقونة بشكل جميل عند تعطيل الزر */
#enable-notifications-btn:disabled .info-btn-text,
#enable-notifications-btn:disabled .info-btn-icon {
    color: #e9ecef;
}

/* ==== تنسيقات فلاتر الطلبات - شبكة ثنائية (Grid 2 Columns) ==== */

/* الحاوية الرئيسية */
.order-filters {
    display: flex;
    flex-direction: column; /* ترتيب المجموعات تحت بعضها */
    gap: 15px;
    padding: 5px;
    margin-bottom: 25px;
    background: transparent;
    border: none;
}

/* مجموعة أزرار الحالات - هنا يكمن التغيير لشبكة عمودين */
.filter-preset-group {
    display: grid;
    grid-template-columns: 1fr 1fr; /* تقسيم العرض إلى عمودين متساويين (50% - 50%) */
    gap: 12px; /* المسافة بين الأزرار */
    width: 100%;
}

/* تصميم الزر نفسه */
.filter-btn {
    width: 100%; /* الزر يأخذ كامل مساحة العمود المخصص له */
    padding: 12px 10px; /* حشوة مريحة للإصبع */
    
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 12px; /* حواف دائرية ناعمة (ليست كبسولة كاملة لتناسب الشبكة) */
    
    font-family: 'Noto Sans Arabic', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03); /* ظل خفيف */
    
    /* لضمان توسيط النص */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* تأثير عند الضغط أو مرور الماوس */
.filter-btn:hover {
    background-color: #f9fafb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* الحالة النشطة (الزر المختار) */
.filter-btn.active {
    background-color: var(--pink); /* اللون الوردي الخاص بموقعك */
    color: white;
    border-color: var(--pink);
    box-shadow: 0 4px 12px rgba(229, 169, 180, 0.4); /* ظل ملون */
    font-weight: 700;
}

/* ==== تنسيقات صندوق تصفية تاريخ الطلبات المخصص (باللون الوردي الموحد) ==== */
/* ==== تنسيقات صندوق تصفية تاريخ الطلبات المخصص (من تاريخ إلى تاريخ باللون الوردي) ==== */

.filter-custom-date-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#toggle-date-range-btn {
    margin-bottom: 10px;
}

/* الصندوق الحاوي لقوائم التاريخ وأزرار الإجراءات */
.order-date-filter-box {
    width: 100%;
    background-color: #fff9fa;
    border: 1.5px dashed #ffd1dc;
    border-radius: 16px;
    padding: 16px;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(229, 169, 180, 0.12);
    animation: fadeIn 0.3s ease-out;
}

/* عناوين أقسام التاريخ (من تاريخ / إلى تاريخ) */
.date-section-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 800;
    color: #444;
    margin-bottom: 6px;
    text-align: right;
}

/* شبكة القوائم الثلاث (يوم - شهر - سنة) */
.custom-order-date-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

/* أزرار القوائم المنسدلة لتاريخ الطلبات */
.order-date-btn {
    background-color: #ffffff;
    border: 1.5px solid #eae0d7;
    border-radius: 12px;
    font-weight: 700;
}

.order-date-btn:hover,
.order-date-btn.is-open {
    border-color: var(--pink, #e5a9b4);
    background-color: #fff9fa;
    box-shadow: 0 3px 10px rgba(229, 169, 180, 0.25);
}

.order-date-btn.is-open .sort-chevron-icon {
    color: #d63031;
}

/* عناصر القائمة المنسدلة لكافة حقول التاريخ (وردي موحد) */
.order-date-filter-box .custom-date-item:hover {
    background-color: #fff0f3;
    color: #d63031;
}

.order-date-filter-box .custom-date-item.active {
    background-color: #ffe4ea;
    color: #d63031;
    font-weight: 800;
}

.order-date-filter-box .custom-date-item.active::after {
    content: '✓';
    font-weight: 900;
    color: #d63031;
    font-size: 0.95rem;
}

/* أزرار الإجراءات (تطبيق وإلغاء الفلتر) */
.order-date-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
}

.filter-btn.apply {
    background-color: var(--pink);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(229, 169, 180, 0.35);
    transition: all 0.2s ease;
}

.filter-btn.apply:hover {
    background-color: #d698a4;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(229, 169, 180, 0.45);
}

.filter-btn.reset-date {
    background-color: #f5f5f5 !important;
    color: #666 !important;
    border: 1px solid #ddd !important;
    padding: 10px 18px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease;
}

.filter-btn.reset-date:hover {
    background-color: #eaeaea !important;
    color: #333 !important;
}

/* استجابة الموبايل والشاشات الصغيرة */
@media (max-width: 480px) {
    .custom-order-date-wrapper {
        gap: 6px;
    }
    .order-date-btn {
        padding: 0 6px;
        font-size: 0.8rem;
    }
    .order-date-actions {
        flex-direction: row;
    }
    .filter-btn.apply,
    .filter-btn.reset-date {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
}
/* New styles for Info Display Card */
.info-display-card {
    padding: 0;
}
.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.card-header h2 {
    margin: 0;
    font-size: 1.1rem;
}
.info-row {
    display: grid;
   grid-template-columns: auto 1fr;
    gap: 15px;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.info-row:last-child {
    border-bottom: none;
}
.info-label {
    font-weight: 500;
    color: #888;
}
.info-value {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
    text-align: right;
}
.edit-info-btn {
    background: none;
    border: none;
    color: var(--pink);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
}
.edit-info-btn:hover {
    background-color: #fdeef2;
}
.no-edit-placeholder {
    width: 30px; /* Same space as the button */
}

/* New styles for Settings Buttons */
.settings-buttons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 20px;
}
@media (min-width: 600px) {
    .settings-buttons-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #eee;
    background-color: #f9f9f9;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.settings-btn:hover:not(:disabled) {
    border-color: var(--pink);
    background-color: #fff;
    color: var(--pink);
}
.settings-btn:disabled {
    color: #aaa;
    cursor: not-allowed;
}

/* Wishlist Tab Styles */
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.wishlist-product-card {
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    text-align: right;
    overflow: hidden;
    transition: box-shadow 0.3s;
}
.wishlist-product-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.wishlist-product-card img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
}
.wishlist-product-card-info {
    padding: 10px;
}
.wishlist-product-card-info h3 {
    font-size: 1rem;
    margin: 0 0 5px 0;
}
.wishlist-product-card-info p {
    font-size: 0.9rem;
    color: var(--pink);
    font-weight: 700;
    margin: 0;
}

.orders-summary-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
}
.summary-card {
    background-color: #f8f9fa;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}
.summary-card span {
    display: block;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
}
.summary-card strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pink);
}
/* تحسين لموضع زر التعديل الرئيسي في بطاقة المعلومات */
.info-display-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-desc { color: #777; margin-top: -15px; margin-bottom: 25px; }

/* ==== تصميم قسم أطفالي ==== */
.kids-list {
    display: grid;
    /* سنستخدم نفس تصميم قائمة العناوين */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kid-item {
    background: var(--light-gray);
    border-radius: 10px;
    padding: 20px;
    position: relative;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.kid-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
    color: var(--pink);
}

.kid-details {
    display: grid;
    grid-template-columns: auto 1fr; /* العمود 1 (العناوين) بحجم تلقائي، العمود 2 (القيم) يأخذ باقي المساحة */
    gap: 12px; /* مسافة بين الأسطر والأعمدة */
    align-items: center; /* توسيط عمودي للنص في كل سطر */
}

.kid-details strong {
    color: var(--heading-color); /* لون العناوين */
    font-weight: 500;
    text-align: right;
}

.kid-details span {
    font-size: 1rem;
    color: #333; /* لون القيم (أغمق قليلاً) */
    font-weight: 700; /* خط عريض للقيمة */
    text-align: right; /* ✨✨ هذا هو السطر الجديد ✨✨ */
}

/* سنعيد استخدام نفس تصميم أزرار العناوين */
.kid-actions {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
}
.form-helper-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #777;
}

/* ==== تصميم لوحة التحكم (Dashboard) في التبويب الأول ==== */

/* إخفاء العنوان H1 الرئيسي للصفحة لعدم التكرار مع الترحيب */
.profile-header {
    display: none;
}

.welcome-card {
    /* يمكنك استخدام تدرج لوني أو لون واحد */
    background: linear-gradient(135deg, var(--blue), var(--pink));
    /* أو استخدم لون واحد: background: var(--pink); */
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px -10px rgba(229, 169, 180, 0.7);
}
.welcome-card h2 {
    color: white;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    border-bottom: none; /* إزالة الخط السفلي من العنوان */
}
.welcome-card p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* تصميم شبكة الملخص */
.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.summary-box {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
}
.summary-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--pink);
}
.summary-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.summary-text {
    font-weight: 500;
    color: #777;
    font-size: 0.9rem;
}
.summary-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-top: 5px;
}

/* ==========================================================
   ✨ التصميم المحسن والشامل لتقييم المنتجات ✨
   ========================================================== */

/* 1. هيكل النافذة وحل مشكلة السكرول على الموبايل واللابتوب */
.review-modal-pro {
    max-width: 480px !important;
    width: 95% !important;
    max-height: 88vh !important;
    border-radius: 22px !important;
    background: #ffffff !important;
    border: 1px solid rgba(229, 169, 180, 0.4) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* الرأس ثابت */
.review-modal-header {
    background: linear-gradient(135deg, #fff5f7 0%, #ffffff 100%) !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid #f2e2e6 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    gap: 12px;
}

/* حل مشكلة النص الطويل لاسم المنتج */
.review-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0; /* ضروري جداً لمنع تمدد الفليكس وخروج النص */
    flex: 1;
}

.review-modal-title-text {
    min-width: 0;
    flex: 1;
    text-align: right;
}

.review-badge-icon {
    width: 42px;
    height: 42px;
    background: #fff0f3;
    border: 1px solid #ffd1dc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.review-modal-title-wrap h3 {
    margin: 0 !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #2d3436 !important;
}

/* إخفاء الزيادة مع نقط (...) حتى لا تخرج عن الواجهة */
.review-product-subtitle {
    margin: 3px 0 0 0;
    font-size: 0.85rem;
    color: #636e72;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 1; /* سطر واحد أنيق */
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    max-width: 100%;
}

/* ✅ الكود الجديد: يخفي خط السكرول نهائياً في الموبايل والكمبيوتر مع بقاء التمرير شغال بسلاسة */
.review-modal-body {
    padding: 20px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    flex: 1 1 auto !important;
    overscroll-behavior-y: contain;
    scrollbar-width: none !important; /* فايرفوكس */
    -ms-overflow-style: none !important; /* إيدج */
}

/* إخفاء السكرول في كروم وسفاري وأجهزة الأندرويد والآيفون */
.review-modal-body::-webkit-scrollbar,
.review-modal-pro::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* شريط مكافأة النقاط */
.review-loyalty-incentive {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fffdf5;
    border: 1.5px dashed #f1c40f;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: 0.85rem;
    color: #b7791f;
    font-weight: 700;
    line-height: 1.4;
    text-align: right;
}

.review-loyalty-incentive .incentive-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.review-section-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: #2d3436;
    margin-bottom: 8px;
    text-align: right;
}

/* 3. النجوم التفاعلية: تبدأ من اليمين لليسار */
.review-stars-group {
    text-align: center;
    background: #fafbfc;
    border: 1px solid #f0f2f5;
    border-radius: 14px;
    padding: 16px 12px;
    margin-bottom: 18px;
}

.review-stars-interactive {
    display: flex !important;
    flex-direction: row !important;
    direction: rtl !important; /* النجمة الأولى على اليمين والخامسة على اليسار */
    justify-content: center;
    gap: 10px;
    margin: 6px 0;
}

.star-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    outline: none;
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

.star-btn svg {
    width: 38px;
    height: 38px;
    fill: #e2e8f0;
    transition: fill 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.star-btn:hover svg,
.star-btn.hovered svg,
.star-btn.active svg {
    fill: #f59e0b;
    filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.45));
}

.star-btn.active {
    transform: scale(1.1);
}

.star-btn:active {
    transform: scale(0.9);
}

.review-rating-hint {
    margin-top: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #8a8d91;
    min-height: 22px;
}

.review-rating-hint.has-rating {
    color: #d97706;
    font-weight: 800;
}

/* حقل التعليق */
#review-comment {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid var(--border-color, #eae0d7);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    line-height: 1.5;
    background: #fff;
    resize: vertical;
    direction: rtl;
    text-align: right;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#review-comment:focus {
    border-color: var(--pink, #e5a9b4);
    box-shadow: 0 0 0 3px rgba(229, 169, 180, 0.25);
    outline: none;
}

/* رفع ومعاينة الصور */
.review-upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.review-max-photos-note {
    font-size: 0.78rem;
    color: #999;
    font-weight: 600;
}

.review-image-dropzone {
    border: 2px dashed #ffd1dc;
    border-radius: 14px;
    padding: 12px;
    background: #fffdfd;
    transition: all 0.25s ease;
    cursor: pointer;
}

.review-image-dropzone:hover,
.review-image-dropzone.drag-over {
    border-color: var(--pink, #e5a9b4);
    background-color: #fff5f7;
}

.review-uploader-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px;
}

.upload-dropzone-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff0f3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.upload-dropzone-texts {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.upload-dropzone-texts strong {
    font-size: 0.88rem;
    color: #2d3436;
}

.upload-dropzone-texts span {
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
}

.review-image-input {
    display: none;
}

.review-image-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.review-preview-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 85px;
    border: 1px solid #eee;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.review-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.review-preview-item.uploading {
    opacity: 0.6;
}

.review-preview-item .loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--pink, #e5a9b4);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.remove-review-image-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-review-image-btn:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

/* ✅ الكود الجديد: الزران متساويان تماماً بالمقاس (50% لكل زر عبر flex: 1) */
.review-modal-actions {
    display: flex !important;
    gap: 12px !important;
    margin-top: 22px !important;
}

.review-cancel-btn,
.review-submit-action-btn {
    flex: 1 !important;
    height: 48px !important;
    border-radius: 14px !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 0 10px !important;
    white-space: nowrap !important; /* يمنع نزول النص لسطر ثانٍ نهائياً */
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

/* ضبط إضافي للهواتف الصغيرة لضمان تناسق الكلمات الطويلة بالكردي */
@media (max-width: 480px) {
    .review-cancel-btn,
    .review-submit-action-btn {
        font-size: 0.82rem !important;
        padding: 0 6px !important;
        gap: 4px !important;
    }
}

.review-cancel-btn {
    border: 1.5px solid #eae0d7 !important;
    background: #fdfaf9 !important;
    color: #777777 !important;
}

.review-cancel-btn:hover {
    background: #f0ebe8 !important;
    color: #444444 !important;
}

.review-submit-action-btn {
    border: none !important;
    background: linear-gradient(135deg, var(--pink, #e5a9b4), #d68a96) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(229, 169, 180, 0.45) !important;
}

.review-submit-action-btn:hover {
    background: linear-gradient(135deg, #df9aa6, #c77b87) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(229, 169, 180, 0.6) !important;
}

.review-submit-action-btn:hover {
    background: linear-gradient(135deg, #df9aa6, #c77b87);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(229, 169, 180, 0.6);
}

.review-submit-action-btn:active {
    transform: scale(0.98);
}

.review-submit-action-btn:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================
   ✨ 5. التصميم الفخم لأزرار التقييم داخل قائمة الطلبات ✨
   ========================================================== */

/* ✅ الكود الجديد: متناسق تماماً مع هوية المتجر الوردي الناعم */
.add-review-btn {
    background: linear-gradient(135deg, var(--pink, #e5a9b4) 0%, #d68a96 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 9px 18px !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 14px rgba(229, 169, 180, 0.45) !important;
    transition: all 0.25s ease !important;
    white-space: nowrap !important;
}

.add-review-btn:hover {
    background: linear-gradient(135deg, #df9aa6 0%, #c77b87 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(229, 169, 180, 0.6) !important;
}

.add-review-btn:active {
    transform: scale(0.96) !important;
}

/* زر تعديل التقييم السابق (خلال 24 ساعة) */
.edit-review-btn {
    background: #ffffff !important;
    border: 1.5px solid var(--pink, #e5a9b4) !important;
    color: var(--pink, #e5a9b4) !important;
    padding: 6px 14px !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    transition: all 0.25s ease !important;
    white-space: nowrap !important;
}

.edit-review-btn:hover {
    background: #fff0f3 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(229, 169, 180, 0.3) !important;
}

.edit-review-btn:active {
    transform: scale(0.96) !important;
}

/* الزر عند التعطيل (تم التقييم مسبقاً) */
.order-product-item .review-btn:disabled,
.add-review-btn:disabled {
    background: #f1f3f5 !important;
    color: #94a3b8 !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
}

/* ============================================= */
/* ✨ تنسيقات قائمة المفضلة الجديدة في البروفايل ✨ */
/* ============================================= */

.profile-wishlist-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* مسافة بين المنتجات */
}

.profile-wishlist-item {
    display: flex;
    align-items: center; /* توسيط عمودي */
    gap: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: #fff;
    position: relative; /* لجعل زر الحذف مطلقاً بالنسبة له */
}

.profile-wishlist-img {
    width: 90px;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0; /* لمنع الصورة من الانكماش */
}

.profile-wishlist-info {
    flex-grow: 1; /* لجعل هذا العنصر يأخذ باقي المساحة */
    text-align: right;
}

.profile-wishlist-info h3 {
    font-size: 1.1rem;
    color: var(--heading-color);
    margin: 0 0 8px 0;
}

.profile-wishlist-info p {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--price-color);
    margin: 0;
}

/* زر الحذف (x) */
.profile-wishlist-remove-btn {
    background: none;
    border: none;
    font-size: 2rem; /* تكبير حجم الـ 'x' */
    color: var(--error-color);
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
    flex-shrink: 0;
    margin-left: -10px; /* تقريبه قليلاً */
}

.profile-wishlist-remove-btn:hover {
    opacity: 0.7;
}

/* زر مسح القائمة السفلي */
.wishlist-footer-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* استخدام تنسيق زر الإلغاء لزر المسح */
#profile-clear-wishlist-btn {
    min-width: 200px;
    font-weight: 700;
}

/* ✨ توحيد خط الموقع بالكامل للعربية والكردية السورانية ✨ */
*,
body,
button,
input,
select,
textarea,
h1, h2, h3, h4, h5, h6,
p, span, a, label {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* ============================================= */
/* ✨ تنسيقات نافذة نقاط الولاء (مصححة بالكامل) ✨ */
/* ============================================= */

/* 1. إصلاح الحاوية الخارجية (لتكون عمودية وليست أفقية) */
#loyalty-modal .modal-content {
    display: flex !important;
    flex-direction: column !important; /* هذا السطر يحل المشكلة الرئيسية */
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    max-width: 400px;
    width: 95%;
    max-height: 90vh; /* لضمان عدم خروجها عن الشاشة */
    background-color: #fff;
}

/* 2. تنسيق الرأس */
#loyalty-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    width: 100%; /* ضمان ملء العرض */
    box-sizing: border-box; /* حساب الحشوة ضمن العرض */
}

#loyalty-modal .modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--heading-color);
    font-weight: 800;
}

/* 3. إصلاح الجسم الداخلي (لترتيب العناصر فوق بعض) */
#loyalty-modal .modal-body {
    display: flex !important;
    flex-direction: column !important; /* ترتيب عمودي */
    align-items: center !important;    /* توسيط العناصر */
    padding: 25px;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto; /* السماح بالسكرول الداخلي إذا كانت الشاشة صغيرة */
    gap: 15px; /* مسافة موحدة بين العناصر */
}

/* 4. الصندوق الأصفر */
#loyalty-modal .loyalty-info-box {
    background-color: #fff9db;
    border: 1px dashed #f1c40f;
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

#loyalty-modal .loyalty-info-box p {
    margin: 5px 0;
    line-height: 1.5;
}

/* 5. القائمة */
#loyalty-modal ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: right;
}

#loyalty-modal ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #333;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

/* 6. الزر */
#loyalty-modal .btn-primary {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(229, 169, 180, 0.4);
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

/* 7. زر الإغلاق (X) */
#loyalty-modal .close-btn {
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transition: all 0.2s ease;
}

#loyalty-modal .close-btn:hover {
    background-color: #e74c3c;
    color: white;
}

/* تنسيق زر تسجيل الخروج */
.settings-btn.logout-action {
    color: var(--error-color);
    border-color: #fadbd8;
    background-color: #fff5f5;
}

.settings-btn.logout-action:hover {
    background-color: var(--error-color);
    color: white;
    border-color: var(--error-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.2);
}

/* ==========================================================================
   ✨ تنسيق زر تغيير اللغة في صفحة البروفايل (موزون مع العلم 100%) ✨
   ========================================================================== */
.profile-lang-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background-color: #f0f0f0 !important;
    border: 1px solid var(--border-color, #ddd) !important;
    border-radius: 25px !important;
    padding: 0 12px !important;
    height: 32px !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    color: var(--text-color) !important;
    line-height: 1 !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.profile-lang-btn:hover {
    background-color: #e0e0e0 !important;
}

.profile-lang-btn .flag-icon {
    width: 19px !important;
    height: 13px !important;
    border-radius: 2px !important;
    object-fit: cover !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.profile-lang-btn span {
    display: inline-block !important;
    line-height: 1 !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
    transform: translateY(1px) !important; /* موازنة دقيقة ليكون النص والعلم في المنتصف تماماً */
}

/* تنسيقات القائمة المنسدلة لنقاط الولاء */
.loyalty-accordion-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.loyalty-accordion-header:hover {
    opacity: 0.8;
}

.accordion-arrow {
    color: #d35400;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* المحتوى مخفي افتراضياً */
.loyalty-accordion-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* الكلاس الذي يضاف عند الفتح */
.loyalty-info-box.is-open .loyalty-accordion-content {
    max-height: 300px; /* ✨ زدنا الرقم من 100px إلى 300px ليستوعب القائمة */
    opacity: 1;
    padding-top: 10px; /* مسافة جمالية */
}

.loyalty-info-box.is-open .accordion-arrow {
    transform: rotate(180deg); /* تدوير السهم */
}

/* زر إعادة الطلب */
.reorder-btn {
    background-color: white;
    border: 1px solid var(--success-color); /* لون أخضر للإشارة للتكرار */
    color: var(--success-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.reorder-btn:hover {
    background-color: var(--success-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.2);
}

/* تنسيق حاوية الإجراءات في كارت الطلب */
.order-footer-actions {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
    display: flex;
    justify-content: flex-end; /* الزر يظهر في النهاية */
}

/* ==========================================================
   ✨ تحسينات واجهة "أطفالي" (Gamification) ✨
   ========================================================== */

/* 1. شبكة اختيار الأفاتار (داخل النافذة المنبثقة) */
.avatar-selection-container {
    margin-bottom: 20px;
    text-align: center;
}

.avatar-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-color);
}

.avatars-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.avatar-option {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    overflow: hidden;
    transition: all 0.2s ease;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem; /* للأفاتار الإيموجي */
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* حالة الاختيار */
.avatar-option.selected {
    border-color: var(--pink);
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(229, 169, 180, 0.4);
    background-color: #fff0f3;
}

.avatar-option:hover {
    transform: scale(1.05);
}

/* 2. عرض الأفاتار داخل كارت الطفل */
.kid-item {
    /* تحديث لتصميم الكارت ليكون أجمل */
    display: grid;
    grid-template-columns: auto 1fr; /* صورة يسار - محتوى يمين */
    align-items: start;
    gap: 20px;
    position: relative;
    overflow: hidden; /* لشريط الزينة */
}

/* الأفاتار الكبير في الكارت */
.kid-avatar-display {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 4px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    z-index: 1;
}

/* تعديل تفاصيل الطفل لتناسب التصميم الجديد */
.kid-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kid-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.kid-name-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--heading-color);
    margin: 0;
}

/* 3. شريط النمو (Growth Bar) */
.growth-progress-container {
    background-color: #f0f2f5;
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #e1e4e8;
}

.growth-text {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.growth-bar-track {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.growth-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    width: 0%;
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* رسالة التشجيع */
.growth-badge {
    font-size: 0.75rem;
    background-color: #e8f5e9;
    color: #27ae60;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
}

/* 4. تنبيه عيد الميلاد (Birthday Alert) */
.birthday-alert-box {
    background: linear-gradient(135deg, #fff0f3 0%, #fff 100%);
    border: 1px solid #ffccd5;
    border-radius: 12px;
    padding: 12px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: pulse-border 2s infinite;
}

.birthday-icon {
    font-size: 2rem;
    animation: bounce 1s infinite;
}

.birthday-text h4 {
    margin: 0;
    color: #c0392b;
    font-size: 1rem;
}

.birthday-text p {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    color: #555;
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* تحسين للموبايل */
@media (max-width: 480px) {
    .kid-item {
        grid-template-columns: 1fr; /* عمودي في الموبايل */
        text-align: center;
        justify-items: center;
    }
    .kid-details {
        width: 100%;
    }
    .kid-header-row {
        justify-content: center;
    }
    .kid-actions {
        top: 10px;
        left: 10px; /* إعادة التموضع */
    }
}

/* =========================================
   ✨ تنسيقات نافذة الإرجاع والاستبدال (الجديدة) ✨
   ========================================= */

/* ضبط النافذة حتى ما تطلع برة الشاشة بالموبايل */
.custom-scroll-modal {
    max-width: 500px !important;
    width: 95% !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: 85vh !important; /* يمنع النافذة تعبر طول الشاشة */
    padding: 0 !important;
    overflow: hidden !important;
}

.sticky-header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    border-bottom: 1px solid #eee;
}

.scrollable-body {
    overflow-y: auto !important; /* يفعل السكرول بس بداخل المحتوى */
    padding: 20px !important;
    -webkit-overflow-scrolling: touch;
}

.step-desc {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* شبكة الاختيارات */
.return-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* عمودين للحاسبة */
    gap: 15px;
}

.return-option-card {
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
}

.return-option-card:hover {
    border-color: var(--pink);
    background-color: #fff5f7;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(229, 169, 180, 0.15);
}

.return-option-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.return-option-card h4 {
    margin: 0 0 8px 0;
    color: var(--heading-color);
    font-size: 1.05rem;
}

.return-option-card p {
    font-size: 0.85rem;
    color: #777;
    margin: 0;
    line-height: 1.5;
}

/* صندوق الحسابات */
.refund-calc-box {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
}

.refund-calc-box h4 {
    margin: 0 0 15px 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    color: var(--heading-color);
}

.calc-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #555;
}

.calc-row.deduction span:last-child {
    color: #e74c3c;
    font-weight: bold;
}

.calc-row.total {
    font-weight: 800;
    font-size: 1.1rem;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
}

.success-text {
    color: #27ae60;
}

.refund-note {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 20px;
    line-height: 1.5;
}

.exchange-box {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    margin: 15px 0;
}

.credit-highlight {
    display: block;
    margin: 10px 0;
    font-size: 1.1rem;
    color: var(--heading-color);
}

.agree-btn { background: #27ae60; border-color: #27ae60; width: 100%; }
.agree-btn:hover { background: #219653; }
.store-btn { background: var(--blue); width: 100%; }

/* 🔥 تعديلات الموبايل (هنا ينحل الخلل) 🔥 */
@media (max-width: 480px) {
    /* تحويل الكروت من عمودين إلى عمود واحد حتى ما تنعصر */
    .return-options-grid {
        grid-template-columns: 1fr; 
    }
    
    /* ترتيب محتوى الكارت أفقياً بدل عمودياً لتوفير المساحة */
    .return-option-card {
        display: flex;
        align-items: center;
        text-align: right; /* للعربي */
        padding: 15px;
        gap: 15px;
    }
    
    html[dir="ltr"] .return-option-card {
        text-align: left; /* للإنجليزي */
    }
    
    .return-option-card .card-icon {
        margin-bottom: 0;
        font-size: 2rem;
    }
    
    /* ترتيب الأزرار تحت بعض */
    .stack-mobile {
        flex-direction: column;
        gap: 10px;
    }
    
    .stack-mobile button {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* زر طلب الإرجاع في قائمة الطلبات */
.return-request-btn {
    background-color: white;
    border: 1px solid #7f8c8d;
    color: #7f8c8d;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    margin-right: 5px;
}

.return-request-btn:hover {
    background-color: #7f8c8d;
    color: white;
}

/* =========================================
   ✨ تنسيقات حالات الإرجاع والاستبدال ✨
   ========================================= */

/* الشكل العام للشارة */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 10px;
    margin-right: 5px; /* مسافة بينه وبين زر إعادة الطلب */
}

/* 1. حالة "تم الاستبدال" (لون أزرق فاتح) */
.status-badge.status-exchange {
    background-color: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #90caf9;
}

/* 2. حالة "تم الإرجاع" (لون برتقالي فاتح) */
.status-badge.status-return {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ffb74d;
}

/* ============================================= */
/* ✨ تنسيقات شريط اكتمال الملف الشخصي ✨ */
/* ============================================= */

.completion-card {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.completion-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.completion-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--heading-color);
    display: flex;
    align-items: center;
    gap: 8px;
    border: none !important; /* إلغاء الخط السفلي الافتراضي للكروت */
    padding: 0 !important;
}

.completion-percent {
    font-weight: 800;
    color: var(--pink);
    font-size: 1.2rem;
}

/* مسار الشريط (الخلفية) */
.completion-progress-track {
    width: 100%;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

/* الشريط الممتلئ */
.completion-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pink), #d68a96);
    width: 0%;
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); /* حركة ناعمة */
}

/* لون أخضر عند الاكتمال */
.completion-progress-fill.completed {
    background: #2ecc71;
}

.completion-hint {
    font-size: 0.9rem;
    color: #777;
    margin: 0;
}

/* تمييز النص الناقص */
.completion-missing-item {
    color: var(--blue);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* ============================================= */
/* ✨ تنسيقات كارت عيد الميلاد في الداشبورد ✨ */
/* ============================================= */

.birthday-dashboard-card {
    background: linear-gradient(135deg, #fff0f3 0%, #ffffff 100%);
    border: 2px solid #ffccd5;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    animation: float 3s ease-in-out infinite;
}

/* تأثير زخرفة خفيف في الخلفية */
.birthday-dashboard-card::before {
    content: '🎉';
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 5rem;
    opacity: 0.1;
    transform: rotate(-20deg);
}

.birthday-content {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    position: relative; /* ليظهر فوق الخلفية */
}

.birthday-icon-large {
    font-size: 3rem;
    animation: bounce 2s infinite;
}

.birthday-info h3 {
    margin: 0 0 5px 0;
    color: #c0392b; /* لون أحمر احتفالي */
    font-size: 1.2rem;
    font-weight: 800;
}

.birthday-info p {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
}

.birthday-action-btn {
    display: block;
    background-color: var(--pink);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 4px 10px rgba(229, 169, 180, 0.4);
}

.birthday-action-btn:hover {
    background-color: #d698a4;
    transform: translateY(-2px);
}

/* حركات بسيطة */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

/* ✨ تنسيقات حقل البحث في الطلبات ✨ */
.order-search-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
    box-sizing: border-box; /* مهم جداً لمنع الخروج عن الشاشة */
}

.search-input {
    width: 100%;
    height: 45px; /* ارتفاع ثابت ومناسب للموبايل */
    padding: 10px 15px;
    
    /* ✅ هذا السطر هو حل مشكلة الخروج عن الشاشة */
    box-sizing: border-box; 
    
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Noto Sans Arabic', sans-serif;
    transition: all 0.3s ease;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    
    /* إعدادات النص حسب اللغة */
    text-align: right; /* للنصوص العربية والكردية */
}

/* ✅ إضافة الأيقونة عن طريق CSS بدلاً من الإيموجي لضمان مكانها */
.order-search-container::after {
    content: '🔍'; /* الأيقونة */
    position: absolute;
    left: 15px; /* تثبيتها على اليسار */
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #888;
    pointer-events: none; /* للسماح بالنقر من خلالها */
}

/* في حالة اللغة العربية/الكردية، نضيف مسافة للنص كي لا يغطي الأيقونة */
html[dir="rtl"] .search-input {
    padding-left: 45px; /* مسافة من اليسار للأيقونة */
    padding-right: 15px; /* مسافة عادية من اليمين */
}

.search-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(169, 212, 229, 0.2);
}


/* ==========================================================
   ✨ التصميم العصري الشامل لقسم (ادعُ صديقاً) ✨
   ========================================================== */
.referral-main-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid #eee;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

/* 1. الهيدر الرئيسي */
.referral-hero-box {
    text-align: center;
    background: linear-gradient(135deg, #fff7f9 0%, #ffffff 100%);
    border-radius: 18px;
    padding: 24px 18px;
    border: 1.5px solid #ffe8ee;
    margin-bottom: 22px;
}

.ref-badge-pill {
    display: inline-block;
    background: #fff0f3;
    color: var(--pink, #e5a9b4);
    border: 1px solid #ffd1dc;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.ref-hero-title {
    margin: 0 0 10px 0 !important;
    font-size: 1.35rem !important;
    font-weight: 900 !important;
    color: #2d3436 !important;
    border: none !important;
    padding: 0 !important;
}

.ref-hero-subtitle {
    margin: 0 auto;
    max-width: 580px;
    color: #636e72;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 2. شريط الخطوات الثلاث */
.ref-how-it-works {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 25px;
    gap: 10px;
}

.ref-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.ref-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--pink, #e5a9b4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(229, 169, 180, 0.35);
}

.ref-step-details {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.ref-step-details strong {
    font-size: 0.88rem;
    color: #2d3436;
    font-weight: 800;
}

.ref-step-details span {
    font-size: 0.75rem;
    color: #888;
}

.ref-step-arrow {
    color: #ccc;
    font-weight: bold;
    font-size: 1.1rem;
    user-select: none;
}

/* 3. صندوق كود الدعوة التفاعلي */
.referral-code-card {
    background: #ffffff;
    border: 2px dashed var(--pink, #e5a9b4);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 25px;
    text-align: center;
    background-color: #fffcfd;
}

.ref-code-label {
    display: block;
    font-weight: 800;
    color: #636e72;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.ref-code-interactive-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1.5px solid #f2e2e6;
    border-radius: 14px;
    padding: 8px 12px 8px 16px;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.ref-code-value {
    flex: 1;
    text-align: center;
}

#my-referral-code {
    font-family: monospace;
    font-size: 1.6rem;
    font-weight: 900;
    color: #d63031;
    letter-spacing: 2px;
}

.ref-copy-action-btn {
    background: linear-gradient(135deg, var(--pink, #e5a9b4), #d68a96);
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(229, 169, 180, 0.35);
}

.ref-copy-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(229, 169, 180, 0.45);
}

.ref-copy-action-btn.copied {
    background: #27ae60 !important;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.35) !important;
}

/* 4. أزرار المشاركة - شبكة 2x2 بألوان واضحة وفخمة */
.ref-share-section {
    margin-bottom: 25px;
    text-align: center;
}

.ref-share-title {
    display: block;
    font-weight: 800;
    color: #334155;
    font-size: 0.95rem;
    margin-bottom: 14px;
}

/* شبكة 2x2 ملمومة ومرتبة */
.ref-share-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* زرّين بكل صف */
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* التنسيق العام للكبسولة */
.ref-btn {
    height: 44px !important;
    width: 100% !important;
    padding: 0 10px !important;
    border-radius: 50px !important; /* شكل الكبسولة */
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    box-sizing: border-box !important;
    text-decoration: none;
    white-space: nowrap !important;
    -webkit-tap-highlight-color: transparent;
}

.ref-btn:active {
    transform: scale(0.94) !important;
}

/* 1. كبسولة مشاركة (بنفسجي أطوخ وأوضح) */
.ref-btn.share-native {
    background-color: #ede9fe !important;
    color: #6d28d9 !important;
    border: 1.5px solid #c4b5fd !important;
}
.ref-btn.share-native:hover {
    background-color: #ddd6fe !important;
    border-color: #a78bfa !important;
}

/* 2. كبسولة واتساب (أخضر أطوخ وأوضح) */
.ref-btn.share-whatsapp {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    border: 1.5px solid #86efac !important;
}
.ref-btn.share-whatsapp svg {
    color: #16a34a !important;
    fill: currentColor !important;
}
.ref-btn.share-whatsapp:hover {
    background-color: #bbf7d0 !important;
    border-color: #4ade80 !important;
}

/* 3. كبسولة تليكرام (سماوي أطوخ وأوضح) */
.ref-btn.share-telegram {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1.5px solid #7dd3fc !important;
}
.ref-btn.share-telegram svg {
    color: #0284c7 !important;
    fill: currentColor !important;
}
.ref-btn.share-telegram:hover {
    background-color: #bae6fd !important;
    border-color: #38bdf8 !important;
}

/* 4. كبسولة نسخ الرابط (رمادي داكن محدد) */
.ref-btn.share-copy {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    border: 1.5px solid #cbd5e1 !important;
}
.ref-btn.share-copy:hover {
    background-color: #e2e8f0 !important;
    border-color: #94a3b8 !important;
}
.ref-btn.share-copy.copied {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    border-color: #86efac !important;
}

/* 5. شبكة الإحصائيات */
.ref-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.ref-stat-card {
    background: #fdfdfd;
    border: 1.5px solid #f0f0f0;
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s ease;
}

.ref-stat-card:hover {
    border-color: #ddd;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.ref-stat-card.gold {
    background: #fffdf5;
    border-color: #faecc3;
}

.ref-stat-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.ref-stat-icon-box.blue {
    background: #eef7fc;
}

.ref-stat-icon-box.gold {
    background: #fff3d1;
}

.ref-stat-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.ref-stat-num {
    font-size: 1.6rem;
    font-weight: 900;
    color: #2d3436;
    line-height: 1.2;
}

.ref-stat-num.gold-text {
    color: #f39c12;
}

.ref-stat-title {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
    margin-top: 2px;
}

/* 6. قائمة الأصدقاء */
.ref-list-header-row {
    border-bottom: 1.5px solid #f0f0f0;
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.ref-list-header-row h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #2d3436;
}

/* 📱 متجاوب بالكامل مع شاشات الموبايل */
@media (max-width: 600px) {
    .ref-how-it-works {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .ref-step-arrow {
        display: none; /* إخفاء الأسهم الأفقية على الجوال */
    }
    .ref-code-interactive-box {
        flex-direction: column;
        gap: 10px;
    }
    .ref-copy-action-btn {
        width: 100%;
        justify-content: center;
    }
    .ref-btn {
        width: 100%;
        justify-content: center;
    }
    .ref-stats-grid {
        grid-template-columns: 1fr; /* عمود واحد للمربعات على الموبايل */
    }
}

/* ✨ تنسيقات ميزة "أطفالي" الجديدة ✨ */

/* 1. تنبيه تحديث المقاسات */
.measurement-alert {
    background-color: #fff8e1; /* خلفية صفراء فاتحة */
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.5s ease-in-out;
}

.measurement-alert .icon {
    font-size: 1.2rem;
}

/* ✨ 2. زر التسوق الذكي (تم التحسين) */
/* ✨ 2. زر التسوق الذكي (محسن + يدعم الألوان حسب الجنس) */
.smart-shop-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box; /* يمنع الخروج عن الحواف */
    
    padding: 10px 15px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 15px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    color: white; /* النص أبيض دائماً */
}

.smart-shop-btn:hover {
    transform: translateY(-2px);
}

/* 🎨 لون الأولاد (أزرق) */
.smart-shop-btn.male {
    background: linear-gradient(135deg, var(--blue), #8bc4d9);
    box-shadow: 0 4px 10px rgba(169, 212, 229, 0.4);
}
.smart-shop-btn.male:hover {
    box-shadow: 0 6px 15px rgba(169, 212, 229, 0.6);
}

/* 🎨 لون البنات (وردي) */
.smart-shop-btn.female {
    background: linear-gradient(135deg, var(--pink), #e07a89);
    box-shadow: 0 4px 10px rgba(229, 169, 180, 0.4);
}
.smart-shop-btn.female:hover {
    box-shadow: 0 6px 15px rgba(229, 169, 180, 0.6);
}

.smart-shop-btn .icon {
    margin-left: 8px;
    font-size: 1.1rem;
}

/* عكس الهامش للغات الأجنبية */
html[dir="ltr"] .smart-shop-btn .icon {
    margin-left: 0;
    margin-right: 8px;
}

/* ✨ رفع رسالة التنبيه في صفحة البروفايل ✨ */
@media (max-width: 768px) {
    .toast.show {
        bottom: 120px !important; /* رفع الرسالة فوق الشريط السفلي */
        z-index: 20000 !important;
    }
}

/* ✨ تنسيقات نظام الولاء والدعوات الجديد ✨ */

/* 1. بطاقة مستوى الولاء */
.loyalty-level-card {
    background: linear-gradient(135deg, #fff9f0 0%, #fff 100%);
    border: 1px solid #f1c40f;
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.level-header h3 {
    margin: 0;
    color: #d35400;
    font-size: 1rem;
}

.points-display {
    font-size: 2rem;
    font-weight: 800;
    color: #f39c12;
    margin: 0;
    line-height: 1;
}

.points-display small {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: normal;
}

.next-reward-badge {
    background-color: #fff;
    border: 1px dashed #f39c12;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.8rem;
}

.next-reward-badge strong {
    display: block;
    color: #d35400;
    font-size: 1rem;
}

/* شريط التقدم */
.loyalty-progress-container {
    margin-top: 10px;
}

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background-color: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f1c40f, #f39c12);
    width: 0%;
    border-radius: 10px;
    transition: width 1s ease-out;
    position: relative;
    overflow: hidden;
}

/* لمعة متحركة للشريط */
.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background-image: linear-gradient(
        45deg,
        rgba(255,255,255,.15) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255,255,255,.15) 50%, 
        rgba(255,255,255,.15) 75%, 
        transparent 75%, 
        transparent
    );
    background-size: 20px 20px;
    animation: moveStripes 1s linear infinite;
}

.progress-text {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 8px;
    text-align: center;
}

/* 2. قائمة الأصدقاء المدعوين */
.referrals-list-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.referral-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    transition: transform 0.2s ease;
}

.referral-item:hover {
    transform: translateX(-5px);
    border-color: var(--blue);
}

.ref-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ref-avatar {
    width: 35px;
    height: 35px;
    background-color: #f0f2f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.ref-name {
    font-weight: 700;
    color: var(--heading-color);
    font-size: 0.95rem;
}

.ref-date {
    font-size: 0.75rem;
    color: #999;
}

/* شارات الحالة */
.ref-status {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.ref-status.registered {
    background-color: #fff3cd;
    color: #856404;
}

.ref-status.purchased {
    background-color: #d4edda;
    color: #155724;
}

/* ✨ تنسيقات أزرار تسمية العنوان (Chips) ✨ */
.address-tags-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap; /* للسماح بالنزول لسطر جديد في الشاشات الصغيرة */
}

.address-tag-chip {
    background-color: #f0f2f5;
    border: 1px solid #e4e6eb;
    border-radius: 20px; /* حواف دائرية بالكامل */
    padding: 8px 16px;
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Noto Sans Arabic', sans-serif;
}

.address-tag-chip:hover {
    background-color: #e4e6eb;
}

/* عند اختيار الزر */
.address-tag-chip.selected {
    background-color: var(--blue); /* أو استخدم var(--pink) حسب ذوقك */
    color: white;
    border-color: var(--blue);
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(169, 212, 229, 0.4);
}

/* ✨ تحسينات بصرية (Visual Feedback) ✨ */

/* 1. تصميم الحالات الفارغة (Empty States) */
.empty-state-box {
    text-align: center;
    padding: 50px 20px;
    background-color: #fff;
    border-radius: 20px;
    border: 2px dashed #eee; /* إطار متقطع يعطي طابعاً خفيفاً */
    margin-top: 20px;
}

.empty-state-icon {
    font-size: 4rem; /* إيموجي كبير */
    display: block;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite; /* حركة طفو جميلة */
}

.empty-state-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--heading-color);
    margin-bottom: 10px;
}

.empty-state-desc {
    color: #777;
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.6;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.start-shopping-btn {
    display: inline-block;
    background-color: var(--pink);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(229, 169, 180, 0.4);
    transition: transform 0.2s ease;
}

.start-shopping-btn:hover {
    transform: scale(1.05);
}

/* 2. ألوان خلفية اختيار الجنس (Gender Colors) */
.avatar-selection-container {
    transition: background-color 0.5s ease, border-color 0.5s ease;
    padding: 15px;
    border-radius: 15px;
    border: 2px solid transparent;
}

/* كلاس للولد (أزرق فاتح) */
.gender-male-bg {
    background-color: #e3f2fd; 
    border-color: #90caf9;
}

/* كلاس للبنت (وردي فاتح) */
.gender-female-bg {
    background-color: #fff0f5; 
    border-color: #f48fb1;
}

/* ✨ تنسيق أزرار اختيار الجنس (Gender Chips) ✨ */
.gender-chip {
    background-color: #f0f2f5;
    border: 2px solid #e4e6eb;
    border-radius: 25px;
    padding: 10px 25px;
    font-size: 1rem;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.gender-chip:hover {
    background-color: #e4e6eb;
}

/* ✨ حالة الاختيار - ذكر (أزرق) ✨ */
.gender-chip.selected[data-value="male"] {
    background-color: #e3f2fd;
    color: var(--blue);
    border-color: var(--blue);
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.2);
}

/* ✨ حالة الاختيار - أنثى (وردي) ✨ */
.gender-chip.selected[data-value="female"] {
    background-color: #fff0f5;
    color: var(--pink);
    border-color: var(--pink);
    box-shadow: 0 4px 10px rgba(233, 30, 99, 0.2);
}

/* ✨ ألوان زر الحفظ حسب الجنس */
.save-btn.male {
    background: linear-gradient(135deg, var(--blue), #8bc4d9); /* أزرق */
    border-color: var(--blue);
}
.save-btn.male:hover {
    background: #8bc4d9;
    box-shadow: 0 4px 15px rgba(169, 212, 229, 0.6);
}

.save-btn.female {
    background: linear-gradient(135deg, var(--pink), #e07a89); /* وردي */
    border-color: var(--pink);
}
.save-btn.female:hover {
    background: #d698a4;
    box-shadow: 0 4px 15px rgba(229, 169, 180, 0.6);
}

/* ============================================= */
/* ✨ تنسيقات إضافية لقائمة المفضلة (جديد) ✨ */
/* ============================================= */

/* حاوية الأزرار داخل عنصر المفضلة */
.wishlist-item-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* زر "إضافة للسلة" في المفضلة */
.add-to-cart-wishlist-btn {
    background-color: var(--blue); /* أزرق ليتناسق مع الهوية */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Noto Sans Arabic', sans-serif;
}

.add-to-cart-wishlist-btn:hover {
    background-color: #8bc4d9;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(169, 212, 229, 0.4);
}

/* شارة "نفدت الكمية" */
.wishlist-out-of-stock {
    background-color: #fce4e4;
    color: #c0392b;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
    border: 1px solid #f5c6cb;
}

/* تحسين صورة المنتج عند نفاد الكمية */
.profile-wishlist-item.out-of-stock .profile-wishlist-img {
    filter: grayscale(100%); /* تحويل للأبيض والأسود */
    opacity: 0.6; /* شفافية */
}

/* تحسين استجابة الموبايل */
@media (max-width: 480px) {
    .profile-wishlist-item {
        flex-direction: row; /* إبقاء الصورة بجانب النص */
        align-items: flex-start;
    }
    
    .add-to-cart-wishlist-btn {
        width: 100%; /* الزر يأخذ العرض الكامل في الموبايل */
        justify-content: center;
        margin-top: 5px;
    }
}

/* ✨ Skeleton Loading Animation ✨ */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: #f0f0f0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 10px;
}

.skeleton-text { height: 15px; width: 60%; margin-bottom: 8px; }
.skeleton-title { height: 25px; width: 80%; margin-bottom: 15px; }
.skeleton-img { width: 100%; height: 150px; border-radius: 8px; }
.skeleton-card {
    background: white;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}



/* ✨ Profile Completion Ring ✨ */
.profile-ring-container {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    /* هذا التدرج سيتغير بالجافاسكريبت ليعكس النسبة */
    background: conic-gradient(var(--pink) 0%, #eee 0%); 
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 20px;
    transition: background 1s ease-out;
}

.ring-inner {
    width: 120px; /* أصغر قليلاً من الحاوية ليظهر الإطار */
    height: 120px;
    border-radius: 50%;
    background: white; /* لون فاصل */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#profile-avatar-img {
    width: 110px; /* الصورة الفعلية */
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
}

/* تنسيق زر الكاميرا ليكون فوق الحلقة */
#change-avatar-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--blue);
    border: 2px solid white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 5;
}

/* ==========================================================
   ✨ ويدجت آخر طلب في لوحة التحكم (بألوان هوية bb4kido) ✨
   ========================================================== */
.recent-order-card {
    background: #ffffff;
    border: 1px solid #ffd1dc; /* إطار وردي ناعم متناسق مع المتجر */
    border-radius: 18px;
    padding: 18px 20px 24px;
    margin-bottom: 22px;
    box-shadow: 0 4px 20px rgba(229, 169, 180, 0.15); /* ظل وردي ناعم */
    position: relative;
    overflow: hidden;
}

.recent-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px dashed #ffd1dc;
    padding-bottom: 12px;
    gap: 10px;
}

.recent-order-title {
    font-weight: 800;
    font-size: 1rem;
    color: #2d3436;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* زر تفاصيل الطلب بنمط الصفحة الرئيسية الوردية */
.recent-order-track-link {
    background: #fff0f3;
    color: #d63031;
    border: 1px solid #ffd1dc;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.recent-order-track-link:hover {
    background: #ffe4ea;
    transform: translateY(-1px);
}

/* شريط التقدم الأفقي */
.mini-progress-track {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 10px 15px;
}

/* الخط الرمادي الأساسي في الخلفية */
.mini-progress-track .track-line-bg {
    position: absolute;
    top: 18px;
    left: 10px;
    right: 10px;
    height: 4px;
    background-color: #f1f5f9;
    border-radius: 2px;
    z-index: 1;
}

/* خط التقدم المتدرج باللون الوردي الخاص بـ bb4kido بدلاً من الأخضر */
.mini-progress-track .track-line-fill {
    position: absolute;
    top: 18px;
    right: 10px;
    height: 4px;
    background: linear-gradient(90deg, #e5a9b4 0%, #d88c9a 100%);
    border-radius: 2px;
    z-index: 1;
    transition: width 0.8s ease-in-out;
}

.mini-step {
    position: relative;
    z-index: 2;
    width: 36px;
    height: 36px;
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #a0aec0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

/* الخطوة المكتملة: وردي مع علامة الصح البيضاء */
.mini-step.completed {
    background-color: var(--pink, #e5a9b4);
    border-color: var(--pink, #e5a9b4);
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 3px 10px rgba(229, 169, 180, 0.35);
}

/* الخطوة النشطة الحالية: مع تأثير نبض وردي أنيق */
.mini-step.active {
    background-color: #ffffff;
    border-color: var(--pink, #e5a9b4);
    color: var(--pink, #e5a9b4);
    box-shadow: 0 0 0 4px rgba(229, 169, 180, 0.25);
    animation: trackingPulse 2s infinite;
}

@keyframes trackingPulse {
    0% { box-shadow: 0 0 0 0 rgba(229, 169, 180, 0.6); }
    70% { box-shadow: 0 0 0 9px rgba(229, 169, 180, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 169, 180, 0); }
}

.step-label {
    position: absolute;
    top: 42px;
    left: 50%;
    transform: translateX(-50%);
    width: 75px;
    text-align: center;
    font-size: 0.72rem;
    color: #888;
    font-weight: 600;
    white-space: nowrap;
}

.mini-step.active .step-label {
    color: var(--pink, #e5a9b4);
    font-weight: 800;
}

.mini-step.completed .step-label {
    color: #2d3436;
    font-weight: 700;
}
/* --- تصميم بطاقة النقاط الذهبية --- */
.loyalty-card-header {
    background: linear-gradient(135deg, #f1c40f 0%, #d4a017 100%);
    color: #fff;
    padding: 25px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(241, 196, 15, 0.3);
}

.loyalty-info h3 { margin: 0 0 10px 0; font-size: 1.1rem; opacity: 0.9; }
.points-number { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.points-number small { font-size: 1rem; font-weight: normal; margin-right: 5px; }
.loyalty-icon { font-size: 3.5rem; opacity: 0.8; }

/* --- شبكة المكافآت --- */
.rewards-grid, .wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* --- تصميم كارت المكافأة --- */
.reward-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.reward-card h4 { color: #333; margin-bottom: 5px; font-size: 1.2rem; }
.reward-cost { color: #d4a017; font-weight: bold; margin-bottom: 15px; display: block; }

/* شريط التقدم */
.progress-container {
    background: #f0f0f0;
    height: 8px;
    border-radius: 4px;
    margin: 15px 0 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #27ae60;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text { font-size: 0.85rem; color: #777; margin-bottom: 10px; display: block; }

/* زر الاستبدال */
.redeem-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.redeem-btn.active {
    background: #27ae60;
    color: white;
}

.redeem-btn.disabled {
    background: #eee;
    color: #aaa;
    cursor: not-allowed;
}

/* --- تصميم الكوبون في المحفظة --- */
.wallet-coupon-card {
    border: 2px dashed #d4a017;
    background: #fffcf5;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.coupon-code-display {
    font-family: monospace;
    font-size: 1.5rem;
    background: #eee;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
    letter-spacing: 2px;
    font-weight: bold;
}

.activate-btn {
    background: linear-gradient(to right, #2980b9, #3498db);
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

/* ==========================================================================
   ✨ تصميم قائمة الإشعارات الجديد (ناعم ومتجاوب للموبايل) ✨
   ========================================================================== */

/* 1. ضبط الحاوية لتكون نقطة الارتكاز */
.notifications-container-user {
    position: relative;
}

/* 2. تنسيق القائمة المنسدلة */
.notifications-dropdown-user {
    position: absolute;
    top: 100% !important; /* التأكد من أنها أسفل الزر تماماً */
    margin-top: 18px;     /* مسافة لإظهار السهم */
    width: 300px;
    max-width: 90vw;      /* لضمان عدم الخروج من شاشة الموبايل */
    background-color: #fff;
    border-radius: 16px;  /* حواف دائرية ناعمة وعصرية */
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12); /* ظل ناعم وعميق */
    z-index: 1000;
    
    /* إعدادات الحركة الانسيابية (Soft Animation) */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95); /* تبدأ صغيرة ومرتفعة قليلاً */
    transform-origin: top left; /* الحركة تبدأ من جهة الزر (في العربية) */
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); /* تأثير ارتداد خفيف (Bouncy) */
}

/* 3. حالة الفتح (عند الضغط) */
.notifications-dropdown-user.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1); /* تعود لحجمها ومكانها الطبيعي */
}

/* 4. السهم الصغير (المثلث) لربط القائمة بالزر */
.notifications-dropdown-user::before {
    content: '';
    position: absolute;
    top: -8px; /* يظهر فوق القائمة */
    left: 14px; /* محاذاة مع الزر في اليسار (للعربية) */
    width: 0; 
    height: 0; 
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff; /* لون السهم نفس خلفية القائمة */
    filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.05));
}

/* 5. ضبط المحاذاة للغة العربية (RTL) */
html[dir="rtl"] .notifications-dropdown-user {
    right: auto;
    left: 0; /* محاذاة لليسار لتبدأ من عند الزر */
}

/* في حال اللغة الإنجليزية نعكس الاتجاه */
html[dir="ltr"] .notifications-dropdown-user {
    left: auto;
    right: 0;
    transform-origin: top right;
}
html[dir="ltr"] .notifications-dropdown-user::before {
    left: auto;
    right: 14px;
}

/* 6. تحسينات خاصة للموبايل (لتوسط القائمة إذا لزم الأمر) */
@media (max-width: 480px) {
    .notifications-dropdown-user {
        width: 280px; /* تصغير العرض قليلاً */
    }
    
    /* إذا كان الزر قريباً جداً من الحافة، نقوم بإزاحة القائمة */
    html[dir="rtl"] .notifications-dropdown-user {
        left: -10px; 
    }
    
    html[dir="rtl"] .notifications-dropdown-user::before {
        left: 24px; /* تعديل مكان السهم ليناسب الإزاحة */
    }
}

/* ============================================= */
/* ✨ إصلاح قائمة الإشعارات (RTL Fix) ✨ */
/* ============================================= */

/* 1. إجبار القائمة على المحاذاة لليمين بدلاً من اليسار في اللغة العربية */
html[dir="rtl"] #user-notifications-dropdown {
    left: auto !important;       /* إلغاء المحاذاة لليسار */
    right: 0 !important;         /* المحاذاة لليمين (لتبدأ من زر الجرس وتمتد لداخل الشاشة) */
    transform-origin: top right !important;
}

/* 2. تحسين العرض للموبايل لضمان عدم الخروج من الشاشة */
@media (max-width: 480px) {
    #user-notifications-dropdown {
        width: 300px !important;
        max-width: 92vw !important; /* عرض 92% من الشاشة كحد أقصى */
    }

    /* في الموبايل، نقوم بإزاحة بسيطة لضمان التوسط */
    html[dir="rtl"] #user-notifications-dropdown {
        right: -10px !important; /* إزاحة صغيرة عن الحافة اليمنى */
    }
}

/* ============================================= */
/* ✨ إصلاح نافذة نقاط الولاء (الموبايل واللابتوب) ✨ */
/* ============================================= */

/* 1. تكبير صندوق الجدول ليظهر 3 أسطر أو أكثر بدلاً من سطر واحد */
.points-history-container {
    min-height: 250px !important; /* يجبر القائمة أن تكون طويلة بما يكفي */
    max-height: 400px !important; /* يسمح بالتمدد */
    height: auto !important;
}

/* 2. حل مشكلة اختفاء النافذة في اللابتوب (رفع الطبقة فوق كل شيء) */
#loyalty-modal.modal-overlay {
    z-index: 99999 !important; /* رقم عالي جداً ليظهر فوق الهيدر وأي عنصر آخر */
    display: flex !important; /* ضمان العرض */
}

/* 3. تحسين شكل النافذة في اللابتوب (لتكون أعرض) */
@media (min-width: 769px) {
    #loyalty-modal .modal-content {
        max-width: 600px !important; /* عرض أكبر للشاشات الكبيرة */
        width: 100% !important;
    }
}

/* 4. التأكد من أن محتوى النافذة يسمح بالتمرير (Scroll) */
#loyalty-modal .modal-body {
    overflow-y: auto !important;
    max-height: 80vh !important;
}

/* إجبار زر الإشعارات على الظهور دائماً */
#user-notifications-btn {
    display: inline-flex !important; /* تأكيد العرض */
    align-items: center;
    justify-content: center;
    min-width: 40px;  /* عرض ثابت لضمان عدم انكماشه */
    min-height: 40px;
    visibility: visible !important;
    opacity: 1 !important;
}

/* في حالة كان الإيموجي يختفي */
#user-notifications-btn .icon {
    display: block !important;
    font-style: normal;
}

/* تمييز الكوبون النشط */
.wallet-coupon-card.active-card-glow {
    border: 2px solid var(--primary-color) !important;
    background-color: #fff0f5; /* لون وردي فاتح جداً */
    box-shadow: 0 0 15px rgba(233, 30, 99, 0.2);
}

.btn-deactivate-code {
    background-color: #e74c3c !important; /* لون أحمر للإلغاء */
    color: white;
}

/* ============================================= */
/* ✨ تنسيقات نافذة تفاصيل الطلب (Order Details) ✨ */
/* ============================================= */

/* توسيع النافذة قليلاً لتناسب الجدول */
.order-details-modal-content {
    max-width: 600px;
    width: 95%;
}

/* رأس الفاتورة (رقم الطلب والتاريخ) */
.od-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}
.od-id { font-weight: 800; color: var(--heading-color); font-size: 1.1rem; }
.od-date { color: #777; font-size: 0.9rem; }

/* قائمة المنتجات داخل النافذة */
.od-products-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 300px; /* سكرول إذا كانت المنتجات كثيرة */
    overflow-y: auto;
    padding-right: 5px; /* مسافة للسكرول */
}

/* كارت المنتج الواحد في التفاصيل */
.od-product-item {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
    align-items: center;
}
.od-product-item:last-child { border-bottom: none; }

.od-product-img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #eee;
    background-color: #fff;
}

.od-product-info { flex: 1; }
.od-product-info h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: var(--heading-color);
}
.od-meta {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    gap: 15px;
}
.od-meta span { background: #f0f0f0; padding: 2px 8px; border-radius: 4px; }

.od-price {
    font-weight: 700;
    color: var(--heading-color);
    font-size: 1rem;
}

/* ملخص الحساب (المجموع والتوصيل) */
.od-summary-box {
    margin-top: 20px;
    background-color: #fff9fa; /* خلفية وردية فاتحة جداً */
    border: 1px solid var(--pink);
    border-radius: 12px;
    padding: 20px;
}

.od-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #555;
}

.od-row.total {
    border-top: 1px dashed var(--pink);
    padding-top: 10px;
    margin-top: 10px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--price-color);
}

/* زر عرض التفاصيل (الذي سيظهر في القائمة الرئيسية) */
.view-details-btn {
    background-color: transparent;
    border: 1px solid var(--blue);
    color: var(--blue);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.view-details-btn:focus {
    outline: none;
}

@media (hover: hover) {
    .view-details-btn:hover {
        background-color: var(--blue);
        color: white;
    }
}

.view-details-btn:active {
    background-color: var(--blue);
    color: white;
}

/* ✅ إضافات تحسين الحركة (Smoothness) للنشر */

/* 1. تأثير ظهور التبويبات */
.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(10px); /* يبدأ من الأسفل قليلاً */
    /* لا نحتاج transition هنا لأننا نستخدم animation عند التفعيل */
}

.tab-content.active {
    display: block;
    animation: slideUpFade 0.4s ease-out forwards;
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 2. تحسين شكل شاشة التحميل (Loading) */
.loading-placeholder {
    padding: 40px;
    text-align: center;
    color: #888;
    font-size: 1.1rem;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px dashed #eee;
    margin: 20px 0;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* 3. تحسين استجابة الأزرار للمس (Touch Feedback) */
button, .reward-card, .order-card {
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

button:active, .reward-card:active, .order-card:active {
    transform: scale(0.98); /* تصغير بسيط عند الضغط */
}

/* ========================================= */
/* ⚡ 1. Skeleton Loading (شاشات التحميل الوهمية) */
/* ========================================= */

/* حركة الوميض (Shimmer Effect) */
@keyframes skeleton-loading {
    0% { background-color: #f0f0f0; }
    50% { background-color: #e0e0e0; }
    100% { background-color: #f0f0f0; }
}

.skeleton {
    animation: skeleton-loading 1.5s infinite ease-in-out;
    border-radius: 8px;
    background-color: #f0f0f0;
}

/* شكل وهمي لكارت المكافآت */
.skeleton-reward-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-title { height: 20px; width: 70%; border-radius: 4px; }
.skeleton-price { height: 15px; width: 40%; border-radius: 4px; }
.skeleton-bar { height: 8px; width: 100%; border-radius: 10px; margin-top: 10px; }
.skeleton-btn { height: 40px; width: 100%; border-radius: 8px; margin-top: 15px; }

/* شكل وهمي لسطر في المحفظة */
.skeleton-row {
    height: 60px;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 8px;
}

/* ========================================= */
/* ⚓ 2. Layout Stability (منع اهتزاز التصميم) */
/* ========================================= */

/* تثبيت ارتفاع كارت المكافأة */
.reward-card {
    min-height: 180px; /* ارتفاع ثابت لضمان عدم القفز */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* تثبيت ارتفاع أزرار التبديل */
.tab-btn {
    min-height: 45px;
    white-space: nowrap; /* لمنع نزول النص لسطر ثاني */
}

/* تثبيت ارتفاع خانات المحفظة */
.wallet-summary-card {
    min-height: 120px;
}

/* تثبيت ارتفاع العنوان */
h3, h4 {
    min-height: 1.2em; /* يحجز مكاناً للنص حتى قبل تحميله */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 1. تعريف الحركة (ناعم وانسيابي) */
@keyframes smoothOpen {
    0% {
        opacity: 0;
        transform: translateY(-15px) scale(0.95); /* تبدأ من الأعلى قليلاً وصغيرة */
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1); /* تستقر في مكانها وحجمها الطبيعي */
    }
}

/* 2. تطبيق الحركة على قائمة الإشعارات */
#user-notifications-dropdown {
    /* تطبيق الأنيميشن عند الظهور */
    animation: smoothOpen 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    
    /* تحسينات بصرية لتكون القائمة نفسها "ناعمة" */
    border: none !important;
    border-radius: 16px !important; /* حواف دائرية أكثر */
    box-shadow: 0 10px 40px rgba(0,0,0,0.12) !important; /* ظل ناعم جداً */
    
    /* تحديد نقطة خروج الأنيميشن (من الأعلى جهة اليمين أو اليسار حسب اللغة) */
    transform-origin: top center;
}

/* في حالة اللغة العربية، نجعل الحركة تبدأ من جهة الجرس (اليمين) */
html[dir="rtl"] #user-notifications-dropdown {
    transform-origin: top right;
}

/* =========================================
   تصميم أزرار المشاركة الجديد والعصري
========================================= */

/* حاوية الأزرار */
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* مسافة أوسع بين الأزرار */
    justify-content: center; /* توسيط الأزرار */
    margin-top: 30px;
    padding: 10px;
}

/* الستايل الأساسي لجميع الأزرار */
.share-btn {
    border: none;
    border-radius: 50px; /* حواف دائرية بالكامل (شكل كبسولة) */
    padding: 12px 28px;
    font-family: inherit; /* استخدام نفس خط الموقع */
    font-size: 16px;
    font-weight: 600;
    color: white; /* لون النص أبيض */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px; /* مسافة بين الأيقونة والنص */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* حركة ناعمة */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* ظل خفيف */
    position: relative;
    overflow: hidden;
}

/* تكبير الأيقونة قليلاً */
.share-btn .icon {
    font-size: 1.3em;
}

/* تأثير عند مرور الماوس (Hover Effect) */
.share-btn:hover {
    transform: translateY(-5px); /* يرتفع الزر للأعلى */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); /* يزيد الظل */
}
.share-btn:active {
    transform: translateY(-2px); /* هبوط خفيف عند الضغط */
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

/* --- ألوان الأزرار المخصصة (تدرجات عصرية) --- */

/* 1. زر المشاركة الرئيسي (Native Share) - تدرج بنفسجي/أزرق جذاب */
.share-btn.native {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
}

/* 2. زر واتساب - تدرج أخضر عصري */
.share-btn.whatsapp {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

/* 3. زر تليجرام - تدرج أزرق سماوي */
.share-btn.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #00c6ff 100%);
}

/* 4. زر نسخ الرابط - تدرج رمادي/فضي أنيق */
.share-btn.link {
    background: linear-gradient(135deg, #606c88 0%, #3f4c6b 100%);
}

/* حالة "تم النسخ" - يتحول إلى الأخضر */
.share-btn.link.copied {
    background: linear-gradient(135deg, #1D976C 0%, #93F9B9 100%) !important;
    box-shadow: 0 0 15px #93F9B9; /* توهج خفيف */
}

/* تحسين العرض على الموبايل */
@media (max-width: 600px) {
    .share-buttons {
        flex-direction: column; /* الأزرار تحت بعضها في الموبايل */
        width: 100%;
    }
    .share-btn {
        width: 100%; /* الزر يأخذ كامل العرض */
        justify-content: center;
        padding: 14px 20px;
    }
}

/* ==========================================================
   ✨ تصميم قائمة الدعوات المتقدم (Advanced Referral Card) ✨
   ========================================================== */
.referral-advanced-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.referral-advanced-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.06);
    border-color: var(--blue);
}

.referral-advanced-card .ref-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.ref-reward-badge {
    background-color: #fff9db;
    color: #f39c12;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid #f1c40f;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ref-progress-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.ref-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    text-align: center;
}

.ref-step .ref-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background-color: #f0f2f5;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
}

/* عندما تكتمل الخطوة (لون أخضر) */
.ref-step.completed .ref-icon {
    background-color: #eaf8f0;
    border-color: #27ae60;
    color: #27ae60;
}
.ref-step.completed .ref-text {
    color: #27ae60;
}

/* عندما تكون قيد الانتظار (لون برتقالي) */
.ref-step.pending .ref-icon {
    background-color: #fff9e6;
    border-color: #f39c12;
}
.ref-step.pending .ref-text {
    color: #f39c12;
}

.ref-step .ref-text {
    font-size: 0.8rem;
    color: #777;
    font-weight: 700;
}

/* خط التوصيل بين الدوائر */
.ref-line {
    height: 3px;
    background-color: #eee;
    flex: 1.5;
    margin: 0 10px;
    margin-top: -25px; /* رفع الخط ليكون بمستوى الدوائر */
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.ref-line.completed {
    background-color: #27ae60;
}

/* تحسينات الشاشات الصغيرة (الموبايل) */
@media (max-width: 480px) {
    .referral-advanced-card .ref-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .ref-reward-badge {
        align-self: flex-start;
    }
    .ref-progress-container {
        padding: 0;
    }
    .ref-step .ref-text {
        font-size: 0.75rem;
    }
}

/* ==============================================================
   ✨ التنسيقات المضافة لجعل الواجهة متناسقة مع جميع أنواع الموبايلات ✨
   ============================================================== */

/* 1. تنسيقات الهيدر المحدثة (تعويضاً عن Inline Styles) */
.header-left-actions { display: flex; align-items: center; gap: 10px; flex: 1; }
.header-icon-container { position: relative; }
.brand { flex: 0 0 auto; text-align: center; }
.brand h1 { margin: 0; font-size: 1.5rem; color: var(--heading-color); }
.header-right-actions { display: flex; justify-content: flex-end; flex: 1; }
.header-icon-btn { background: none; border: none; font-size: 1.4rem; cursor: pointer; display: flex; align-items: center; padding: 0; }
#notification-badge { position: absolute; top: -5px; right: -5px; background: #e74c3c; color: white; border-radius: 50%; padding: 2px 5px; font-size: 0.7rem; }
.notifications-dropdown { position: absolute; top: 100%; right: -10px; background: white; border: 1px solid #ddd; width: 300px; max-height: 400px; overflow-y: auto; box-shadow: 0 4px 15px rgba(0,0,0,0.1); z-index: 1000; border-radius: 12px; margin-top: 15px; }
.clear-notif-btn { background: none; border: none; color: #e74c3c; font-size: 0.8rem; cursor: pointer; padding: 0; }
.profile-lang-btn { display: flex; align-items: center; gap: 6px; background: #f0f0f0; border: 1px solid #ddd; padding: 5px 12px; border-radius: 20px; cursor: pointer; }
.back-to-store-link { white-space: nowrap; font-size: 0.95rem; display: flex; align-items: center; gap: 5px; text-decoration: none; color: var(--text-color); font-weight: 500; }

/* تنسيقات المنتجات في الطلبات الأساسية */
.order-product-item {
    display: flex; align-items: center; gap: 15px; margin-bottom: 12px; padding: 10px; background: #fff; border-radius: 8px; border: 1px solid #f0f0f0;
}

/* 2. تحسينات شبكة الملخص (مربعات الإحصائيات) */
.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); /* تصغير العرض الأدنى لتجنب الانهيار */
    gap: 15px;
    margin-bottom: 20px;
}

/* 📱 قواعد استجابة الشاشات للهواتف (Max-Width: 768px) */
@media (max-width: 768px) {
    /* تنظيم الهيدر للموبايل بشكل سليم */
    .profile-page-header {
        flex-direction: row !important;
        padding: 10px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    .brand { order: -1; width: 100%; margin-bottom: 5px; } /* وضع الشعار في الأعلى */
    .header-left-actions { flex: 1; justify-content: flex-start; }
    .header-right-actions { flex: 1; justify-content: flex-end; }
    .desktop-text { display: none; } /* إخفاء كلمة "العودة" وترك السهم فقط لكسب المساحة */
    
    /* منع خروج النصوص الطويلة (مثل الايميل والاسم) خارج المربعات */
    .info-row, .info-display-row {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }
    .info-value {
        text-align: right !important;
        font-size: 1rem !important;
        word-break: break-word; /* كسر الكلمة الطويلة للحفاظ على الإطار */
        width: 100%;
    }

    /* ترتيب حالة الطلب وتفاصيله لتجنب التداخل */
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .order-status {
        align-self: flex-start;
    }
    
    /* ترتيب منتجات الطلب للموبايل لتكون أسفل بعضها */
    .order-product-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .product-action-wrapper {
        width: 100%;
        display: flex;
    }
    .order-product-item .add-review-btn, .order-product-item .edit-review-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* تحسين النوافذ المنبثقة (Modals) لتناسب الموبايل */
    .form-modal-content, .confirm-modal-content {
        width: 95% !important;
        max-height: 85vh;
        overflow-y: auto;
        padding: 15px;
    }
}

/* 📱 قواعد استجابة خاصة جداً للهواتف الصغيرة (مثل iPhone SE بحجم 320px) */
@media (max-width: 360px) {
    .dashboard-summary-grid {
        grid-template-columns: 1fr 1fr; /* إجبار المربعات لتكون عمودين دائماً */
        gap: 10px;
    }
    .summary-box { padding: 12px 8px; }
    .summary-icon { font-size: 2rem; }
    .summary-value { font-size: 1.4rem; }
    
    /* تصغير الأزرار السفلية للشريط */
    .tab-btn { min-width: 65px; font-size: 0.65rem; }
    .tab-btn .icon { font-size: 1.2rem; }
}


/* ✨ تصميم زر الرجوع الواضح (نص ظاهر دائماً) ✨ */
.explicit-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    color: #333333 !important;
    border: 2px solid #dcdde1;
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.explicit-back-btn:hover {
    background-color: #f5f6fa;
    border-color: #b2bec3;
    color: var(--pink) !important;
}

/* سهم الرجوع (يتجه لليمين لأن الموقع بالعربي) */
.explicit-back-btn .back-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.explicit-back-btn:hover .back-arrow {
    transform: translateX(4px); /* حركة خفيفة للسهم عند التمرير */
}

/* ضمان ظهور النص بحجم ممتاز في الموبايل */
@media (max-width: 480px) {
    .explicit-back-btn {
        font-size: 0.85rem;
        padding: 5px 12px;
    }
}

/* ==============================================================
   ✨ تحسينات تجربة المستخدم النهائية للموبايل (Mobile UX Polish) ✨
   ============================================================== */

/* 1. إخفاء المربع الرمادي المزعج الذي يظهر عند النقر على الأزرار في الجوال */
* {
    -webkit-tap-highlight-color: transparent;
}

/* 2. ضمان عدم تداخل محتوى الصفحة مع شريط الآيفون السفلي (Safe Area) */
@media (max-width: 768px) {
    .profile-container {
        /* إضافة مساحة أمان للآيفون فوق مسافة الـ 90 بكسل */
        padding-bottom: calc(90px + env(safe-area-inset-bottom, 20px)) !important;
    }
}

/* تحسين تفاعل زر التفاصيل داخل سجل النقاط */
#pointsHistoryTableBody button:hover {
    opacity: 0.85;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.2);
}

/* رفع نافذة التنبيه المخصصة لتظهر فوق نافذة نقاط الولاء */
#custom-alert-modal {
    z-index: 100000 !important;
}

/* ==========================================================
   🚫 منع سكرول خلفية الموقع عند فتح أي نافذة منبثقة (Modal)
   ========================================================== */


/* ضمان سلاسة التمرير داخل محتوى النافذة فقط على الموبايل */
.form-modal-content,
.modal-content,
.confirm-modal-content,
.size-options-modal-content,
.order-details-modal-content {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================
   ✨ نظام النوافذ المنبثقة الموحد (حركة ناعمة وانسيابية) ✨
   ========================================================== */

/* 1. خلفية التعتيم لجميع النوافذ */
.form-modal-overlay,
.confirm-modal-overlay,
.modal-overlay,
.size-options-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.55) !important;
    backdrop-filter: blur(3px); /* تأثير ضبابي خفيف للخلفية */
    -webkit-backdrop-filter: blur(3px);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2000 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* عند الفتح */
.form-modal-overlay.is-open,
.confirm-modal-overlay.is-open,
.modal-overlay.is-open,
.size-options-modal-overlay.is-open {
    opacity: 1 !important;
    visibility: visible !important;
}


/* استقرار النافذة في مكانها الطبيعي عند الفتح */
.form-modal-overlay.is-open .form-modal-content,
.confirm-modal-overlay.is-open .confirm-modal-content,
.modal-overlay.is-open .modal-content,
.size-options-modal-overlay.is-open .size-options-modal-content,
.form-modal-overlay.is-open .order-details-modal-content {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

body.modal-is-open {
    overflow: hidden !important;
    touch-action: none; /* يمنع التمرير الخلفي نهائياً في شاشات اللمس والآيفون */
}

.profile-tabs {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.form-modal-content,
.confirm-modal-content,
.modal-content,
.size-options-modal-content,
.order-details-modal-content {
    border-radius: 18px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain; /* منع اهتزاز المتجر أثناء التمرير */
    opacity: 0;
    transform: translateY(20px) scale(0.94);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
    will-change: transform, opacity; /* تفعيل كرت الشاشة لتنعيم الحركة 120fps */
}

/* ==========================================================================
   ✨ تنسيقات زر ومودال اختيار المحافظة لقسم عناويني ✨
   ========================================================================== */
.cart-governorate-container {
    margin: 12px 0;
    width: 100%;
}

.cart-gov-btn {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    background-color: #ffffff;
    border: 1.5px solid var(--border-color, #eae0d7);
    border-radius: 12px;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--heading-color, #555);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

.cart-gov-btn:hover {
    border-color: var(--pink);
    background-color: #fff9fa;
}

.cart-gov-btn:active {
    transform: scale(0.97) !important;
}

.gov-btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gov-pin-icon {
    font-size: 1.1rem;
}

.governorate-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 20005 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.governorate-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.governorate-modal-content {
    background-color: #ffffff;
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
}

.governorate-modal-overlay.is-open .governorate-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.governorate-modal-header {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f2f2f2;
}

.gov-title-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gov-title-icon {
    font-size: 1.2rem;
}

.governorate-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--heading-color, #333);
}

.gov-close-btn {
    background-color: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #777;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.gov-close-btn:hover {
    background-color: #ffeef1;
    color: var(--pink);
}

.governorate-modal-body {
    padding: 16px 20px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.gov-subtitle {
    margin: 0 0 14px 0;
    font-size: 0.85rem;
    color: #888;
    text-align: right;
    font-weight: 500;
}

.governorates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gov-card-btn {
    background-color: #fafafa;
    border: 1.5px solid #eee;
    border-radius: 14px;
    padding: 12px 14px;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: right;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    box-sizing: border-box;
}

.gov-card-btn:hover {
    background-color: #fff8f9;
    border-color: var(--pink);
    color: var(--pink);
}

.gov-card-btn:active {
    transform: scale(0.96) !important;
}

.gov-card-btn.selected {
    background-color: #fff0f3;
    border-color: var(--pink);
    color: var(--pink);
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(229, 169, 180, 0.25);
}

.gov-card-btn.selected::after {
    content: '✓';
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--pink);
}

/* ==========================================================================
   ✨ تصميم قوائم تاريخ ميلاد الطفل (نمط الترتيب الافتراضي + تلوين الولد والبنت) ✨
   ========================================================================== */

/* الحاوية الرئيسية للقوائم الثلاث */
.custom-birthdate-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    margin-top: 8px;
    box-sizing: border-box;
    padding: 10px;
    border-radius: 16px;
    background-color: #fafafa;
    border: 1.5px dashed #e8e8e8;
    transition: all 0.35s ease;
}

/* 🎨 تلوين خلفية الحاوية وإطارها عند اختيار ولد (أزرق سماوي ناعم) */
.custom-birthdate-wrapper.gender-male {
    background-color: #f0f8fd;
    border-color: #b9e2f5;
    box-shadow: 0 4px 15px rgba(185, 226, 245, 0.25);
}

/* 🎨 تلوين خلفية الحاوية وإطارها عند اختيار بنت (وردي ناعم) */
.custom-birthdate-wrapper.gender-female {
    background-color: #fff2f5;
    border-color: #ffd1dc;
    box-shadow: 0 4px 15px rgba(255, 209, 220, 0.25);
}

/* الحاوية النسبية لكل قائمة منسدلة */
.custom-date-dropdown {
    position: relative;
    width: 100%;
}

/* 🔘 زر القائمة المنسدلة الرئيسي */
.custom-date-btn {
    width: 100%;
    height: 44px;
    padding: 0 10px;
    background-color: #ffffff;
    border: 1.5px solid var(--border-color, #eae0d7);
    border-radius: 12px;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #444;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    transition: all 0.22s ease;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.custom-date-btn:hover {
    border-color: #bbb;
    background-color: #fff;
}

/* سهم القائمة المنسدلة الدوار */
.custom-date-btn .sort-chevron-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #888;
    flex-shrink: 0;
}

/* تدوير السهم عند فتح القائمة */
.custom-date-btn.is-open .sort-chevron-icon {
    transform: rotate(180deg);
}

/* 📋 القائمة المنسدلة العائمة (Dropdown Menu) */
.custom-date-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    min-width: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: #ffffff;
    border: 1.5px solid #eee;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
    padding: 6px;
    margin: 0;
    list-style: none;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.22s;
    pointer-events: none;
    box-sizing: border-box;
    scrollbar-width: none; /* إخفاء السكرول في Firefox */
    -ms-overflow-style: none; /* إخفاء السكرول في Edge */
}

/* إخفاء شريط السكرول نهائياً في Chrome و Safari وجميع المتصفحات */
.custom-date-menu::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* فتح القائمة بحركة ناعمة */
.custom-date-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* خيارات الأرقام داخل القائمة */
.custom-date-item {
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.18s ease;
    white-space: nowrap;
    text-align: right;
}

/* ==========================================================================
   💙 ستايل الولد (Male) - تدرجات الأزرق السماوي
   ========================================================================== */
.gender-male .custom-date-btn:hover,
.gender-male .custom-date-btn.is-open {
    border-color: #38bdf8;
    background-color: #f8fcff;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.22);
}

.gender-male .custom-date-btn.is-open .sort-chevron-icon {
    color: #0284c7;
}

.gender-male .custom-date-menu {
    border-color: #b9e2f5;
}

.gender-male .custom-date-item:hover {
    background-color: #f0f9ff;
    color: #0284c7;
}

.gender-male .custom-date-item.active {
    background-color: #e0f2fe;
    color: #0369a1;
    font-weight: 800;
}

.gender-male .custom-date-item.active::after {
    content: '✓';
    font-weight: 900;
    color: #0284c7;
    font-size: 0.95rem;
}

/* ==========================================================================
   💖 ستايل البنت (Female) - تدرجات الوردي الناعم
   ========================================================================== */
.gender-female .custom-date-btn:hover,
.gender-female .custom-date-btn.is-open {
    border-color: var(--pink, #e5a9b4);
    background-color: #fff9fa;
    box-shadow: 0 4px 12px rgba(229, 169, 180, 0.25);
}

.gender-female .custom-date-btn.is-open .sort-chevron-icon {
    color: #d63031;
}

.gender-female .custom-date-menu {
    border-color: #ffd1dc;
}

.gender-female .custom-date-item:hover {
    background-color: #fff0f3;
    color: #d63031;
}

.gender-female .custom-date-item.active {
    background-color: #ffe4ea;
    color: #d63031;
    font-weight: 800;
}

.gender-female .custom-date-item.active::after {
    content: '✓';
    font-weight: 900;
    color: #d63031;
    font-size: 0.95rem;
}

/* ==========================================================================
   🔒 حالة القفل (عند تعديل طفل لا يمكن تغيير تاريخ الميلاد)
   ========================================================================== */
.custom-date-btn:disabled,
.custom-date-btn.disabled {
    background-color: #f5f5f5 !important;
    border-color: #e0e0e0 !important;
    color: #aaa !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.75;
}

/* تحسين للشاشات الصغيرة جداً */
@media (max-width: 360px) {
    .custom-birthdate-wrapper {
        gap: 6px;
        padding: 6px;
    }
    .custom-date-btn {
        padding: 0 6px;
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   ✨ التصميم العصري لقسائم الخصم في متجر النقاط (Ticket Voucher Style) ✨
   ========================================================================== */

/* كارت التذكرة */
.coupon-ticket-card {
    background: #ffffff;
    border: 1.5px solid #eae0d7;
    border-radius: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 14px 14px;
    box-sizing: border-box;
    min-height: 210px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.coupon-ticket-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(229, 169, 180, 0.2);
    border-color: var(--pink);
}

/* شريط نوع الكوبون العلوي */
.coupon-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    width: fit-content;
}

.coupon-tag-badge.percent { background: #fff0f3; color: #d63031; }
.coupon-tag-badge.fixed { background: #e8f8f0; color: #27ae60; }
.coupon-tag-badge.shipping { background: #e3f2fd; color: #0d47a1; }
.coupon-tag-badge.bogo { background: #fff8e7; color: #e67e22; }

/* عنوان وقيمة الكوبون */
.coupon-ticket-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #2d3436;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

/* صندوق النقاط المطلوبة */
.coupon-ticket-cost {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fffcf0;
    border: 1px solid #f1c40f;
    color: #d4a017;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    margin-bottom: 8px;
}

/* مدة الصلاحية */
.coupon-ticket-validity {
    font-size: 0.72rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
}

/* الفاصل المنقّط (شريط قطع التذكرة) */
.ticket-dashed-divider {
    position: relative;
    border-top: 1.5px dashed #e2e8f0;
    margin: 10px -14px 12px;
}

/* الثقوب الدائرية على الجوانب */
.ticket-dashed-divider::before,
.ticket-dashed-divider::after {
    content: '';
    position: absolute;
    top: -8px;
    width: 14px;
    height: 14px;
    background-color: var(--light-gray, #f9fafb);
    border-radius: 50%;
    border: 1.5px solid #eae0d7;
    z-index: 2;
    box-sizing: border-box;
}

.ticket-dashed-divider::before {
    right: -8px;
    border-right-color: transparent;
}

.ticket-dashed-divider::after {
    left: -8px;
    border-left-color: transparent;
}

/* شريط التقدم الدقيق */
.coupon-ticket-progress-track {
    background: #f0f2f5;
    height: 6px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.coupon-ticket-progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s ease;
}

.coupon-ticket-progress-fill.ready {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.coupon-ticket-progress-fill.pending {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

/* زر الاستبدال الفخم */
.coupon-ticket-btn {
    width: 100%;
    padding: 10px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    transition: all 0.25s ease;
}

.coupon-ticket-btn.active {
    background: linear-gradient(135deg, var(--pink, #e5a9b4), #d68a96);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(229, 169, 180, 0.4);
}

.coupon-ticket-btn.active:hover {
    background: linear-gradient(135deg, #df9aa6, #c77b87);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(229, 169, 180, 0.55);
}

.coupon-ticket-btn.disabled {
    background: #f0f2f5;
    color: #a0aec0;
    cursor: not-allowed;
    border: 1px solid #e2e8f0;
}

/* تأثير اهتزاز وتوهج تفاعلي عند نسيان النجوم */
@keyframes shakeAndGlowStars {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.review-stars-group.shake-error {
    animation: shakeAndGlowStars 0.5s ease-in-out;
    border-color: #e74c3c !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.3) !important;
}

/* تأثير اهتزاز حقل التعليق عند تركه فارغاً */
.review-input-error {
    border-color: #e74c3c !important;
    background-color: #fff8f8 !important;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.25) !important;
    animation: shakeAndGlowStars 0.4s ease-in-out;
}

/* ✨ تنسيق مربع التنبيه الأحمر الداخلي للتقييم بدلاً من التوست */
.review-inline-error {
    background-color: #fee2e2;      /* خلفية حمراء فاتحة ومريحة للعين */
    color: #b91c1c;                 /* نص أحمر واضح وبارز */
    border: 1.5px solid #f87171;     /* إطار أحمر متناسق */
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

/* ==========================================================
   ✨ صندوق وشريط تقدم التقييم التفاعلي داخل كارت الطلب ✨
   ========================================================== */
.order-review-progress-box {
    background: linear-gradient(135deg, #fff9fa 0%, #ffffff 100%);
    border: 1.5px solid #ffe3e8;
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(229, 169, 180, 0.08);
}

.order-review-progress-box.completed {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-color: #bbf7d0;
}

.progress-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.88rem;
}

.progress-box-title {
    font-weight: 800;
    color: #2d3436;
}

.progress-box-status {
    font-weight: 800;
    color: var(--pink);
    font-size: 0.85rem;
}

.order-review-progress-box.completed .progress-box-status {
    color: #16a34a;
}

/* مسار الشريط الرمادي */
.order-review-progress-track {
    width: 100%;
    height: 8px;
    background-color: #f1f3f5;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

/* شريط التعبئة المتدرج المتحرك */
.order-review-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e5a9b4, #d68a96);
    border-radius: 10px;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.order-review-progress-fill.full {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

/* النصوص التوضيحية أسفل الشريط (يمين ويسار) */
.progress-box-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
}

.progress-box-labels .label-start {
    color: var(--pink);
}

.order-review-progress-box.completed .progress-box-labels .label-start {
    color: #16a34a;
}

/* ==========================================================
   ✨ نافذة تعديل وقص الصورة الشخصية الدائرية (مصححة ومدمجة) ✨
   ========================================================== */

/* 1. القواعد الأساسية للمكتبة (لمنع ظهور صورتين دون الاعتماد على ملفات خارجية) */
.cropper-container {
    direction: ltr !important;
    text-align: left !important;
    font-size: 0;
    line-height: 0;
    position: relative;
    user-select: none;
    touch-action: none;
    width: 100% !important;
    height: 100% !important;
}

.cropper-container img {
    display: block;
    height: 100%;
    image-orientation: 0deg;
    max-height: none !important;
    max-width: none !important;
    min-height: 0 !important;
    min-width: 0 !important;
    width: 100%;
}

.cropper-wrap-box,
.cropper-canvas,
.cropper-drag-box,
.cropper-crop-box,
.cropper-modal {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
}

.cropper-wrap-box,
.cropper-canvas {
    overflow: hidden !important;
}

.cropper-drag-box {
    background-color: #fff;
    opacity: 0;
}

.cropper-modal {
    background-color: #000;
    opacity: 0.65 !important;
}

.cropper-view-box {
    display: block;
    height: 100%;
    outline: 2px solid #ffffff !important;
    overflow: hidden;
    width: 100%;
    border-radius: 50% !important; /* شكل الدائرة */
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65) !important;
}

.cropper-face {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50% !important;
    background-color: #fff;
    opacity: 0.05;
}

.cropper-dashed,
.cropper-point,
.cropper-line,
.cropper-center {
    display: none !important;
}

.cropper-hidden {
    display: none !important;
}

/* 2. تنسيقات النافذة الخاصة بموقعك */
.avatar-crop-modal-content {
    max-width: 440px !important;
    width: 95% !important;
    border-radius: 20px !important;
    overflow: hidden !important;
}

.avatar-crop-body {
    padding: 20px !important;
    text-align: center;
}

.crop-hint {
    margin: 0 0 12px 0;
    font-size: 0.88rem;
    color: #777;
    line-height: 1.5;
}

/* 🛑 منع ظهور قائمة حفظ الصورة في المتصفح عند السحب أو اللمس في البروفايل */
.crop-image-container,
.crop-image-container *,
.cropper-container,
.cropper-container * {
    -webkit-touch-callout: none !important; /* 👈 يمنع ظهور قائمة "حفظ الصورة" باللمس المطول في الموبايل */
    -webkit-user-drag: none !important;     /* 👈 يمنع المتصفح من سحب الصورة كملف تحميل */
    -webkit-user-select: none !important;   /* 👈 يمنع تظليل وتحديد الصورة */
    user-select: none !important;
    touch-action: none !important;
}

/* 3. إجبار الحاوية على اتجاه LTR لمنع هروب الصورة لليسار */
.crop-image-container {
    width: 100%;
    height: 320px;
    background-color: #111111;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    direction: ltr !important; /* حل مشكلة الهروب لليسار 🚀 */
    text-align: left !important;
}

.crop-image-container img {
    display: block;
    max-width: 100%;
    pointer-events: none; /* 👈 يمنع نقرات المتصفح المباشرة على الصورة */
}

/* 4. أزرار وشريط التحكم بالتكبير والتدوير */
.crop-controls-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    padding: 8px 14px;
    background: #fdfaf9;
    border: 1px solid #eae0d7;
    border-radius: 14px;
    direction: ltr !important; /* شريط التكبير من اليسار لليمين */
}

.crop-ctrl-btn {
    background: #ffffff;
    border: 1.5px solid #eae0d7;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.crop-ctrl-btn:hover {
    background-color: #fff0f3;
    border-color: var(--pink);
    transform: scale(1.08);
}

#crop-zoom-slider {
    flex: 1;
    -webkit-appearance: none;
     appearance: none;
    height: 6px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
    cursor: pointer;
}

#crop-zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--pink);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(229, 169, 180, 0.5);
    transition: transform 0.15s ease;
}

#crop-zoom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* ==========================================================
   ✨ نافذة عرض ومعاينة الصورة الشخصية وحذفها (نمط فيسبوك) ✨
   ========================================================== */

/* جعل إطار الصورة قابلاً للنقر مع تأثير تكبير ناعم */
.ring-inner {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.ring-inner:hover {
    transform: scale(1.04);
}

.avatar-view-modal-content {
    max-width: 440px !important;
    width: 95% !important;
    background: #ffffff !important;
    border-radius: 24px !important;
    overflow: hidden !important;
}

.avatar-view-body {
    padding: 24px 20px 20px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* صندوق عرض الصورة بحجم كبير ودائري */
.avatar-view-preview-box {
    width: 230px;
    height: 230px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

#avatar-full-view-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* أزرار الإجراءات (تغيير / حذف) */
.avatar-view-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.avatar-action-pill {
    flex: 1;
    height: 46px;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: none;
    box-sizing: border-box;
    white-space: nowrap;
}

.avatar-action-pill.change-btn {
    background: linear-gradient(135deg, var(--pink), #d68a96);
    color: white;
    box-shadow: 0 4px 12px rgba(229, 169, 180, 0.4);
}

.avatar-action-pill.change-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(229, 169, 180, 0.55);
}

.avatar-action-pill.delete-btn {
    background: #fdedec;
    color: #e74c3c;
    border: 1.5px solid #f5c6cb;
}

.avatar-action-pill.delete-btn:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
    transform: translateY(-2px);
}

.avatar-action-pill:active {
    transform: scale(0.97);
}

@media (max-width: 480px) {
    .avatar-view-preview-box {
        width: 190px;
        height: 190px;
    }
    .avatar-action-pill {
        font-size: 0.85rem;
        padding: 0 8px;
    }
}

/* ==========================================================
   ✨ إصلاح سكرول نافذة التفاصيل والتنبيهات (اللمس في أي مكان) ✨
   ========================================================== */

#custom-alert-modal .form-modal-content {
    max-height: 85vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border-radius: 20px !important;
}

#custom-alert-modal .modal-header {
    flex-shrink: 0 !important;
}

#custom-alert-modal .modal-body {
    max-height: calc(85vh - 75px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain !important;
    padding: 20px 20px 25px 20px !important;
}

/* تفعيل استجابة اللمس للسكرول على كل النصوص والمربعات الداخلية */
#custom-alert-modal .modal-body,
#custom-alert-modal .modal-body *,
#custom-alert-modal #custom-alert-text,
#custom-alert-modal #custom-alert-text * {
    touch-action: pan-y !important;
    -webkit-user-select: text !important;
    user-select: text !important;
}

#custom-alert-modal .save-btn {
    flex-shrink: 0 !important;
}

@media (max-width: 480px) {
    #loyalty-modal .modal-body {
        padding: 16px 8px !important;
    }
}

/* ✨ وميض ناعم يحيط بالطلبية عند الانتقال إليها من الإشعارات ✨ */
@keyframes orderHighlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(229, 169, 180, 0.7);
        border-color: var(--pink, #e5a9b4);
    }
    50% {
        box-shadow: 0 0 25px 6px rgba(229, 169, 180, 0.5);
        border-color: var(--pink, #e5a9b4);
        transform: scale(1.015);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(229, 169, 180, 0);
        border-color: #e0e0e0;
        transform: scale(1);
    }
}

.order-highlight-glow {
    animation: orderHighlightPulse 2.5s ease-in-out !important;
    border-color: var(--pink, #e5a9b4) !important;
}