/* ==========================================================================
   1. Base & Device Fluidity (المرونة الشاملة وحماية الشاشات)
   ========================================================================== */
* { 
  -webkit-tap-highlight-color: transparent; 
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

html {
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html.dark-mode {
  color-scheme: dark;
}

html[dir="rtl"] { font-family: var(--app-font, 'Cairo', system-ui, -apple-system, sans-serif); }
html[dir="ltr"] { font-family: var(--app-font, 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif); }

/* دعم النوتش والحواف الدائرية للهواتف الحديثة (Safe Areas) */
body { 
  background-color: var(--bg-main, #0b1120);
  color: var(--text-main, #f1f5f9);
  transition: background-color 0.25s ease, color 0.25s ease;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 16px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   2. Brand Utilities & App Radius
   ========================================================================== */
.bg-brand { background-color: var(--brand-color) !important; }
.text-brand { color: var(--brand-color) !important; }
.border-brand { border-color: var(--brand-color) !important; }
.focus-brand:focus { 
  border-color: var(--brand-color) !important; 
  box-shadow: 0 0 0 3px var(--brand-glow, rgba(15, 118, 110, 0.25)) !important; 
}

.app-card, input, select, button { 
  border-radius: var(--app-radius, 16px); 
}

/* ==========================================================================
   3. Header & Dynamic Scroll Navigation (محرك الهيدر المطور)
   ========================================================================== */
#mainAppHeader {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.header-hidden-scroll {
  transform: translateY(-115%) !important;
  opacity: 0 !important;
  pointer-events: none;
}

/* أزرار التحكم المشتركة داخل الهيدر */
#mainAppHeader button {
  border-radius: calc(var(--app-radius, 16px) - 4px);
  border-width: 1px;
  border-style: solid;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1. الكبسولة العائمة (Floating Island) */
.header-style-floating {
  width: calc(100% - 20px);
  max-width: 960px;
  margin: 10px auto 0 auto;
  border-radius: var(--app-radius, 18px);
  background-color: var(--header-bg) !important;
  color: var(--header-text) !important;
  transition: all 0.25s ease;
}
html.dark-mode .header-style-floating {
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
html:not(.dark-mode) .header-style-floating {
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.14), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* 2. الهيدر الزجاجي الفخم (Glassmorphic) */
html.dark-mode .header-style-glass {
  width: 100%;
  background: color-mix(in srgb, var(--header-bg) 65%, transparent) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--header-text) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}
html:not(.dark-mode) .header-style-glass {
  width: 100%;
  background: color-mix(in srgb, var(--header-bg) 85%, white 15%) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--header-text) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.12);
}

/* 3. الهيدر الكلاسيكي الممتد */
html.dark-mode .header-style-classic {
  width: 100%;
  background-color: var(--header-bg) !important;
  color: var(--header-text) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}
html:not(.dark-mode) .header-style-classic {
  width: 100%;
  background-color: var(--header-bg) !important;
  color: var(--header-text) !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* 4. الهيدر المينيمال المدمج */
.header-style-minimal {
  width: 100%;
  background: transparent !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html.dark-mode .header-style-minimal {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}
html:not(.dark-mode) .header-style-minimal {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
}
.header-style-minimal #headerSubtitleDisplay {
  display: none !important;
}

.header-style-hidden { display: none !important; }
.header-style-sidebar { display: none !important; }

#sidebarTriggerBtn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  background-color: var(--header-bg);
  color: var(--header-text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
html[dir="ltr"] #sidebarTriggerBtn {
  right: auto;
  left: 16px;
}

#sidebarDrawer {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   4. Action Buttons & Landing Controls
   ========================================================================== */
#landingCustomButtonsGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-btn-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--app-radius, 16px);
  min-height: 62px;
  display: flex;
  align-items: center;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s ease;
}
.action-btn-card:hover {
  transform: translateY(-2px);
}
.action-btn-card:active {
  transform: scale(0.97);
}

.phone-num-ltr, [dir="ltr"].phone-text {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  text-align: left;
}

/* زر المنيو / القائمة المدمج والأنيق */
.quick-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--app-radius, 14px);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.quick-menu-btn:active {
  transform: scale(0.96);
}

/* بطاقات المنيو */
.menu-card {
  border-radius: var(--app-radius, 16px);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.2s ease;
}
.menu-card:hover {
  transform: translateY(-3px);
}

/* ==========================================================================
   5. Dark Mode Styles
   ========================================================================== */
html.dark-mode body { 
  background-color: var(--bg-main, #0b1120); 
  color: var(--text-main, #f1f5f9); 
}
html.dark-mode .app-card { 
  background-color: var(--card-bg, #111a2e) !important; 
  border-color: var(--border-color, #1e293b) !important; 
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.45);
}
html.dark-mode .app-table-header {
  background-color: color-mix(in srgb, var(--card-bg, #111a2e) 80%, black);
  color: #94a3b8;
}
html.dark-mode .app-table-row:hover {
  background-color: color-mix(in srgb, var(--card-bg, #111a2e) 85%, white);
}
html.dark-mode input, html.dark-mode select { 
  background-color: color-mix(in srgb, var(--bg-main, #0b1120) 80%, black) !important; 
  color: #f8fafc !important; 
  border-color: var(--border-color, #22314a) !important; 
}
html.dark-mode .text-muted { color: #94a3b8 !important; }
html.dark-mode .text-main { color: #f8fafc !important; }
html.dark-mode .border-custom { border-color: var(--border-color, #1e293b) !important; }
html.dark-mode footer { border-color: var(--border-color, #1e293b) !important; }

/* أزرار الهيدر بالوضع الليلي */
html.dark-mode #mainAppHeader button:not(#logoutBtn) {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 6px rgba(0, 0, 0, 0.25);
}
html.dark-mode #mainAppHeader button:not(#logoutBtn):hover {
  background-color: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-1px);
}

/* زر الخروج بالوضع الليلي */
html.dark-mode #logoutBtn {
  background-color: rgba(244, 63, 94, 0.15) !important;
  border-color: rgba(244, 63, 94, 0.35) !important;
  color: #fda4af !important;
}
html.dark-mode #logoutBtn:hover {
  background-color: rgba(244, 63, 94, 0.25) !important;
  border-color: rgba(244, 63, 94, 0.5) !important;
}

html.dark-mode .quick-menu-btn {
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-color) 25%, transparent) 0%, color-mix(in srgb, var(--brand-color) 10%, transparent) 100%);
  border: 1.5px solid color-mix(in srgb, var(--brand-color) 45%, transparent);
  color: #f8fafc;
  box-shadow: 0 4px 15px -3px var(--brand-glow);
}
html.dark-mode .quick-menu-btn:hover {
  transform: translateY(-1.5px);
  border-color: var(--brand-color);
  box-shadow: 0 6px 20px -3px var(--brand-glow);
  color: var(--brand-color);
}

html.dark-mode #sidebarDrawer {
  background-color: var(--bg-main, #0b1120) !important;
  color: #f1f5f9 !important;
  border-color: var(--border-color, #1e293b) !important;
}
html.dark-mode #sidebarDrawer .sidebar-item {
  background-color: var(--card-bg, #111a2e) !important;
  border-color: var(--border-color, #1e293b) !important;
  color: #f8fafc !important;
}

/* ==========================================================================
   6. Light Mode Colors & Contrast
   ========================================================================== */
html:not(.dark-mode) body {
  background-color: #f1f5f9;
  color: #0f172a;
}
html:not(.dark-mode) .app-card {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04) !important;
}

html:not(.dark-mode) #mainAppHeader button:not(#logoutBtn) {
  border-color: rgba(0, 0, 0, 0.15) !important;
  background-color: rgba(255, 255, 255, 0.75) !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
html:not(.dark-mode) #mainAppHeader button:not(#logoutBtn):hover {
  background-color: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.25) !important;
  transform: translateY(-1px);
}

html:not(.dark-mode) #logoutBtn {
  background-color: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #b91c1c !important;
}
html:not(.dark-mode) #logoutBtn:hover {
  background-color: #fecaca !important;
}

html:not(.dark-mode) #bioText {
  color: #334155 !important;
  font-weight: 700 !important;
}

html:not(.dark-mode) .quick-menu-btn {
  background: var(--brand-color) !important;
  color: #ffffff !important;
  border: 1.5px solid var(--brand-color) !important;
  box-shadow: 0 6px 20px -3px var(--brand-glow) !important;
}
html:not(.dark-mode) .quick-menu-btn:hover {
  filter: brightness(0.92);
  color: #ffffff !important;
  transform: translateY(-1.5px);
}

html:not(.dark-mode) a[title*="خرائط"],
html:not(.dark-mode) a[href*="review"] {
  background-color: #fffbeb !important;
  border-color: #fcd34d !important;
  color: #b45309 !important;
}
html:not(.dark-mode) a[title*="خرائط"] span,
html:not(.dark-mode) a[href*="review"] span {
  color: #b45309 !important;
}

html:not(.dark-mode) #workingHoursLabel,
html:not(.dark-mode) div:has(#workingHoursLabel) {
  background-color: #ecfdf5 !important;
  border-color: #6ee7b7 !important;
  color: #047857 !important;
}
html:not(.dark-mode) div:has(#workingHoursLabel) .animate-pulse {
  background-color: #059669 !important;
}

html:not(.dark-mode) .action-btn-card {
  background-color: #ffffff !important;
  box-shadow: 0 4px 15px -2px rgba(15, 23, 42, 0.06) !important;
}
html:not(.dark-mode) .action-btn-card:hover {
  box-shadow: 0 10px 25px -3px rgba(15, 23, 42, 0.12) !important;
}
html:not(.dark-mode) .action-btn-card .text-main {
  color: #0f172a !important;
  font-weight: 800 !important;
}
html:not(.dark-mode) .action-btn-card .text-emerald-400 {
  color: #047857 !important;
  font-weight: 800 !important;
}
html:not(.dark-mode) .action-btn-card .text-blue-400 {
  color: #1d4ed8 !important;
  font-weight: 800 !important;
}
html:not(.dark-mode) .action-btn-card .text-sky-400 {
  color: #0284c7 !important;
  font-weight: 800 !important;
}

html:not(.dark-mode) .action-btn-card.border-emerald-500\/35 {
  border-color: #a7f3d0 !important;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%) !important;
}
html:not(.dark-mode) .action-btn-card.border-blue-500\/35 {
  border-color: #bfdbfe !important;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%) !important;
}
html:not(.dark-mode) .action-btn-card.border-sky-500\/35 {
  border-color: #bae6fd !important;
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%) !important;
}

html:not(.dark-mode) .social-btn {
  background-color: #f8fafc !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}
html:not(.dark-mode) .social-btn.text-pink-400 { color: #db2777 !important; border-color: #fbcfe8 !important; }
html:not(.dark-mode) .social-btn.text-sky-400 { color: #0284c7 !important; border-color: #bae6fd !important; }
html:not(.dark-mode) .social-btn.text-blue-400 { color: #2563eb !important; border-color: #bfdbfe !important; }
html:not(.dark-mode) .social-btn.text-main { color: #0f172a !important; border-color: #cbd5e1 !important; }

html:not(.dark-mode) .menu-card {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 15px -3px rgba(15, 23, 42, 0.07) !important;
}
html:not(.dark-mode) .menu-card h4 { color: #0f172a !important; }

html:not(.dark-mode) .app-table-header { background-color: #f1f5f9; color: #475569; }
html:not(.dark-mode) .app-table-row:hover { background-color: #f8fafc; }
html:not(.dark-mode) input, html:not(.dark-mode) select {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
html:not(.dark-mode) .text-muted { color: #64748b !important; }
html:not(.dark-mode) .text-main { color: #0f172a !important; }
html:not(.dark-mode) .border-custom { border-color: #e2e8f0 !important; }
html:not(.dark-mode) footer { border-color: #e2e8f0 !important; }

html:not(.dark-mode) #sidebarDrawer {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
html:not(.dark-mode) #sidebarDrawer .sidebar-item {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* ==========================================================================
   7. Responsive Media Queries (الهواتف والتابلت والكمبيوتر)
   ========================================================================== */
@media (max-width: 359px) {
  #landingCustomButtonsGrid { gap: 8px; }
  .action-btn-card { padding: 8px 10px !important; gap: 8px !important; min-height: 56px; }
  .action-btn-card .w-10 { width: 32px !important; height: 32px !important; border-radius: 10px !important; }
  .action-btn-card .text-xs { font-size: 11px !important; }
  .action-btn-card .text-\[11px\] { font-size: 10px !important; }
  .quick-menu-btn { padding: 8px 14px !important; font-size: 12px !important; }
}

@media (min-width: 640px) {
  #landingCustomButtonsGrid { gap: 12px; }
  .action-btn-card { min-height: 68px; padding: 14px 16px !important; }
}

@media (orientation: landscape) and (max-height: 550px) {
  #imagePreviewModal { padding: 6px 12px !important; }
  #modalViewport img { max-height: 82vh !important; }
  #modalThumbnailsStrip { display: none !important; }
}

/* ==========================================================================
   8. Extra Utilities & Interactive Elements
   ========================================================================== */
input[type="date"]::-webkit-calendar-picker-indicator {
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
html.dark-mode input[type="date"]::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f8fafc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") !important;
  opacity: 0.9;
}

#adminLiveMap { height: 480px; width: 100%; border-radius: var(--app-radius, 16px); z-index: 10; }
.leaflet-popup-content-wrapper {
  padding: 0 !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25) !important;
  overflow: hidden;
  background: #ffffff !important;
}
.leaflet-popup-content { margin: 0 !important; line-height: normal !important; }
.leaflet-popup-tip { background: #ffffff !important; }
.leaflet-container a.leaflet-popup-close-button {
  top: 10px !important;
  right: 12px !important;
  color: #64748b !important;
  font-size: 16px !important;
  padding: 0 !important;
}

.driver-pill-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e293b;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  border: 1.5px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}
.driver-pill-dot { width: 7px; height: 7px; border-radius: 50%; }
.driver-pill-dot.online { background-color: #10b981; }
.driver-pill-dot.offline { background-color: #ef4444; }

.order-pill-marker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ea580c;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  border: 1.5px solid #ffffff;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.45);
  white-space: nowrap;
}

.btn-pay-cash {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
}
.btn-pay-cash:hover { 
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  transform: translateY(-1px);
}
.btn-pay-cash:active { transform: scale(0.96); }

.btn-pay-card {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
}
.btn-pay-card:hover { 
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  transform: translateY(-1px);
}
.btn-pay-card:active { transform: scale(0.96); }

/* ============================================================
   9. حركات وتأثيرات التجاوب والأنيميشن الناعمة (Modern UX Animations)
   ============================================================ */

/* تحسين مدخلات البحث والفلاتر وتأثير التركيز السلس */
.search-input-modern {
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(15, 23, 42, 0.65);
}
.search-input-modern:focus {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px var(--brand-glow, rgba(15, 118, 110, 0.25));
  border-color: var(--brand-color, #0f766e) !important;
}

/* حركة تدريجية مرنة للكروت والبطاقات */
.app-card, .menu-card, .action-btn-card {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  will-change: transform;
}

@media (hover: hover) {
  .app-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
  }
}

/* تأثير الأنيميشن عند التبديل بين التبويبات والمحتويات */
@keyframes modernFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dev-tab-pane, 
#driverTabActiveOrdersContent, 
#driverTabNewOrderContent, 
#adminTabOverviewContent,
#adminTabMapContent,
#adminTabOrdersContent,
#adminTabDriversContent {
  animation: modernFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* أزرار العمليات التفاعلية مع ارتداد لمسي مريح */
button:active:not(:disabled) {
  transform: scale(0.96);
  transition: transform 0.1s ease;
}

/* شريط تمرير أفقي مخفي بالكامل على كافة المتصفحات */
.scrollbar-none::-webkit-scrollbar {
  display: none !important;
}
.scrollbar-none {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

/* حاوية الجداول الاحترافية لتجنب تداخل الأعمدة في الشاشات الصغيرة */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive-wrapper table {
  min-width: 680px;
}

/* ==========================================================================
   إصلاح وتثبيت ظهور أزرار الهيدر (الثيم واللغة) في كافة الصفحات
   ========================================================================== */
#themeToggleBtn, #langToggleBtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 36px;
  min-height: 34px;
  padding: 6px 10px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 30;
}

#themeToggleIcon, #langLabel {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 14px;
  line-height: 1;
}

/* ضمان وضوح التباين في الوضع الليلي والنهاري لأزرار الهيدر */
html.dark-mode #themeToggleBtn, 
html.dark-mode #langToggleBtn {
  background-color: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #f8fafc !important;
}

html:not(.dark-mode) #themeToggleBtn, 
html:not(.dark-mode) #langToggleBtn {
  background-color: rgba(15, 23, 42, 0.08) !important;
  border-color: rgba(15, 23, 42, 0.2) !important;
  color: #0f172a !important;
}
