* { 
    -webkit-tap-highlight-color: transparent; 
    outline: none; 
    box-sizing: border-box; /* أساسي لمنع خروج العناصر عن حواف الشاشة */
}

/* تحسين الاسكرول ليكون ناعم زي التطبيقات الأصلية (Smooth Native Scroll) */
html, body {
    background-color: #e5e7eb; 
    overflow: hidden; 
    margin: 0; 
    padding: 0; 
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overscroll-behavior-y: none; /* يمنع تحديث الصفحة العشوائي عند السحب لأعلى في الموبايل */
    scroll-behavior: smooth;
}

#app-frame { 
    width: 100%; 
    max-width: 430px; 
    height: 100dvh; 
    margin: 0 auto; 
    background-color: #f8fafc; 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}

@media (min-width: 640px) { 
    #app-frame { 
        height: 850px; 
        min-height: 850px; 
        margin-top: 2rem; 
        margin-bottom: 2rem; 
        border-radius: 40px; 
        border: 10px solid #1f2937; 
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3); 
    } 
}

/* إخفاء شريط التمرير مع تفعيل النزول السلس جداً (Momentum Scrolling) للأيفون والأندرويد */
.hide-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
    -webkit-overflow-scrolling: touch; 
    scroll-behavior: smooth;
}
.hide-scrollbar::-webkit-scrollbar { display: none; } 

/* الحركات (Animations) - تم استخدام Cubic-bezier لنعومة فائقة */
.fade-in { animation: fadeIn 0.4s ease-out forwards; } 
.slide-up { animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; } 
.slide-down { animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; } 
.toast-enter { animation: toastEnter 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; } /* حركة نطاطة خفيفة */
.pop-in { animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.dropdown-enter { animation: dropdownEnter 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } 
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } } 
@keyframes slideDown { from { transform: translateY(0); opacity: 1; } to { transform: translateY(100%); opacity: 0; } } 
@keyframes toastEnter { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } 
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes dropdownEnter { from { opacity: 0; transform: scale(0.95) translateY(-10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* أنيميشن إضافي للنبض (عشان الرحلات النشطة تدي شكل احترافي) */
@keyframes pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.8; transform: scale(1.05); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}
.animate-pulse-glow { animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* إعدادات الخريطة */
.leaflet-container { background: #e5e3df; font-family: inherit; z-index: 0 !important; } 
.leaflet-control-attribution { display: none !important; } 
.custom-pin { background: none; border: none; } 
.map-gradient-overlay { background: linear-gradient(to bottom, rgba(255,255,255,0) 60%, rgba(248,250,252,1) 100%); pointer-events: none; }

/* مكونات الـ UI الأساسية */
.card-modern { 
    background-color: #ffffff; 
    border-radius: 24px; 
    padding: 1.25rem; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.02); 
    border: 1px solid #f3f4f6; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
}
/* تأثير لمس الموبايل على الكارت */
.card-modern:active { 
    transform: scale(0.98); 
    box-shadow: 0 1px 5px rgba(0,0,0,0.01); 
}

.input-modern { 
    width: 100%; 
    background-color: #f9fafb; 
    padding: 1rem; 
    border-radius: 1rem; 
    border: 1px solid #f3f4f6; 
    outline: none; 
    font-weight: 700; 
    font-size: 0.875rem; 
    color: #1f2937; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.input-modern:focus { 
    border-color: #10b981; 
    background-color: #ffffff; 
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15); /* هالة خضراء ناعمة عند الكتابة */
}

/* تحسين نعومة حركة الأيقونات في شريط التنقل السفلي */
.nav-btn .nav-icon, 
.nav-btn .nav-text, 
.nav-btn .nav-bg {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#app-frame { 
    width: 100%; 
    max-width: 430px; 
    height: 100dvh; 
    margin: 0 auto; 
    background-color: #f8fafc; 
    position: relative; 
    display: flex; 
    flex-direction: column; 
   
}* { 
    -webkit-tap-highlight-color: transparent; 
    outline: none; 
    box-sizing: border-box; /* أساسي لمنع خروج العناصر عن حواف الشاشة */
}

/* تحسين الاسكرول ليكون ناعم زي التطبيقات الأصلية (Smooth Native Scroll) */
html, body {
    background-color: #e5e7eb; 
    overflow: hidden; 
    margin: 0; 
    padding: 0; 
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overscroll-behavior-y: none; /* يمنع تحديث الصفحة العشوائي عند السحب لأعلى في الموبايل */
    scroll-behavior: smooth;
}

#app-frame { 
    width: 100%; 
    max-width: 430px; 
    height: 100dvh; 
    margin: 0 auto; 
    background-color: #f8fafc; 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}

@media (min-width: 640px) { 
    #app-frame { 
        height: 850px; 
        min-height: 850px; 
        margin-top: 2rem; 
        margin-bottom: 2rem; 
        border-radius: 40px; 
        border: 10px solid #1f2937; 
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3); 
    } 
}

/* إخفاء شريط التمرير مع تفعيل النزول السلس جداً (Momentum Scrolling) للأيفون والأندرويد */
.hide-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
    -webkit-overflow-scrolling: touch; 
    scroll-behavior: smooth;
}
.hide-scrollbar::-webkit-scrollbar { display: none; } 

/* الحركات (Animations) - تم استخدام Cubic-bezier لنعومة فائقة */
.fade-in { animation: fadeIn 0.4s ease-out forwards; } 
.slide-up { animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; } 
.slide-down { animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; } 
.toast-enter { animation: toastEnter 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; } /* حركة نطاطة خفيفة */
.pop-in { animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.dropdown-enter { animation: dropdownEnter 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } 
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } } 
@keyframes slideDown { from { transform: translateY(0); opacity: 1; } to { transform: translateY(100%); opacity: 0; } } 
@keyframes toastEnter { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } 
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes dropdownEnter { from { opacity: 0; transform: scale(0.95) translateY(-10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* أنيميشن إضافي للنبض (عشان الرحلات النشطة تدي شكل احترافي) */
@keyframes pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.8; transform: scale(1.05); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}
.animate-pulse-glow { animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* إعدادات الخريطة */
.leaflet-container { background: #e5e3df; font-family: inherit; z-index: 0 !important; } 
.leaflet-control-attribution { display: none !important; } 
.custom-pin { background: none; border: none; } 
.map-gradient-overlay { background: linear-gradient(to bottom, rgba(255,255,255,0) 60%, rgba(248,250,252,1) 100%); pointer-events: none; }

/* مكونات الـ UI الأساسية */
.card-modern { 
    background-color: #ffffff; 
    border-radius: 24px; 
    padding: 1.25rem; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.02); 
    border: 1px solid #f3f4f6; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
}
/* تأثير لمس الموبايل على الكارت */
.card-modern:active { 
    transform: scale(0.98); 
    box-shadow: 0 1px 5px rgba(0,0,0,0.01); 
}

.input-modern { 
    width: 100%; 
    background-color: #f9fafb; 
    padding: 1rem; 
    border-radius: 1rem; 
    border: 1px solid #f3f4f6; 
    outline: none; 
    font-weight: 700; 
    font-size: 0.875rem; 
    color: #1f2937; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.input-modern:focus { 
    border-color: #10b981; 
    background-color: #ffffff; 
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15); /* هالة خضراء ناعمة عند الكتابة */
}

/* تحسين نعومة حركة الأيقونات في شريط التنقل السفلي */
.nav-btn .nav-icon, 
.nav-btn .nav-text, 
.nav-btn .nav-bg {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#app-frame { 
    width: 100%; 
    max-width: 430px; 
    height: 100dvh; 
    margin: 0 auto; 
    background-color: #f8fafc; 
    position: relative; 
    display: flex; 
    flex-direction: column; 
   
}