/* ================================================================
   ASHISH V53 — إصلاح وميض الواجهة القديمة في الصفحة الرئيسية
   المشكلة: كانت الواجهة القديمة (شبكة clientTabNav + الأقسام
   القديمة + الهيدر/الفوتر) تظهر أولاً ثم يُرسم التصميم الجديد
   (#ashApp) فوقها، فتبدو الصفحة مكرّرة/مهتزّة.
   الحل: إخفاء كامل الهيكل القديم نهائياً في وضع العميل، وإظهاره
   فقط في وضع لوحة الإدارة (client-admin-mode). النوافذ المنبثقة
   (modals / sheets) تبقى تعمل لأنها ملحقة بـ body مباشرة.
   ================================================================ */

html body:not(.client-admin-mode) #header,
html body:not(.client-admin-mode) #mobileNav,
html body:not(.client-admin-mode) .client-sidebar,
html body:not(.client-admin-mode) #inquiryBtn,
html body:not(.client-admin-mode) #scrollProgress,
html body:not(.client-admin-mode) #backToTop,
html body:not(.client-admin-mode) #noticeBar,
html body:not(.client-admin-mode) #mainContent,
html body:not(.client-admin-mode) > footer,
html body:not(.client-admin-mode) .skip-link {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* في وضع لوحة الإدارة نعيد كل شيء كما كان */
html body.client-admin-mode #header,
html body.client-admin-mode #mobileNav,
html body.client-admin-mode .client-sidebar,
html body.client-admin-mode #inquiryBtn,
html body.client-admin-mode #mainContent,
html body.client-admin-mode > footer {
  visibility: visible !important;
  pointer-events: auto !important;
}

/* لا تُعِد إظهار الأقسام القديمة بعد تفعيل التصميم الجديد */
html body.ash-redesign-active:not(.client-admin-mode) #mainContent > * {
  visibility: hidden !important;
}

/* التصميم الجديد يبقى فوق أي بقايا قديمة */
html body:not(.client-admin-mode) #ashApp {
  display: block !important;
  visibility: visible !important;
  position: relative;
  z-index: 5;
}
