/* إصلاح مشكلة الـ sidebar - إخفاء العناصر الإضافية */
.left-side-bar {
  position: relative;
  overflow: hidden;
}

.left-side-bar .menu-block {
  height: calc(100vh - 60px);
  overflow-y: auto;
  overflow-x: hidden;
}

/* إخفاء أي عناصر إضافية في الـ sidebar */
.left-side-bar .menu-block::after {
  display: none !important;
}

.left-side-bar .menu-block::before {
  display: none !important;
}

/* إخفاء أي عناصر pinned apps */
.left-side-bar .pinned-apps,
.left-side-bar .desktop-icons,
.left-side-bar .system-icons,
.left-side-bar .app-icons {
  display: none !important;
}

/* إخفاء أي عناصر إضافية في الـ sidebar */
.left-side-bar .menu-block > *:not(.sidebar-menu) {
  display: none !important;
}

/* إخفاء أي عناصر بعد الـ sidebar-menu */
.left-side-bar .sidebar-menu + * {
  display: none !important;
}

/* إخفاء أي عناصر في نهاية الـ sidebar */
.left-side-bar .menu-block::after {
  display: none !important;
  content: none !important;
}

/* إخفاء أي عناصر مخفية أو pinned */
.left-side-bar [class*="pinned"],
.left-side-bar [class*="desktop"],
.left-side-bar [class*="app-icon"],
.left-side-bar [class*="system-icon"] {
  display: none !important;
}

/* إخفاء أي عناصر تحتوي على أيقونات تطبيقات */
.left-side-bar img[src*="whatsapp"],
.left-side-bar img[src*="zoom"],
.left-side-bar img[src*="discord"],
.left-side-bar img[src*="telegram"],
.left-side-bar img[src*="vlc"],
.left-side-bar img[src*="terminal"],
.left-side-bar img[src*="brave"],
.left-side-bar img[src*="vscode"] {
  display: none !important;
}

/* التأكد من أن الـ sidebar نظيف */
.left-side-bar .sidebar-menu {
  margin: 0;
  padding: 0;
}

.left-side-bar .sidebar-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* إخفاء أي عناصر إضافية قد تظهر */
.left-side-bar .menu-block > *:not(.sidebar-menu) {
  display: none !important;
}

/* التأكد من أن الـ sidebar لا يحتوي على عناصر إضافية */
.left-side-bar .brand-logo + *:not(.menu-block) {
  display: none !important;
}

/* إصلاح ارتفاع الـ sidebar */
.left-side-bar {
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

/* إخفاء أي عناصر مخفية */
.left-side-bar .hidden,
.left-side-bar .d-none,
.left-side-bar [style*="display: none"] {
  display: none !important;
}

/* إصلاح ترتيب الـ header */
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.language-dropdown {
  order: 1;
}

.user-info-dropdown {
  order: 2;
}

.language-dropdown .form-control {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  min-width: 120px;
}

.user-info-dropdown .dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.user-info-dropdown .dropdown-toggle:hover {
  background-color: #f8f9fa;
}

.user-icon img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-weight: 500;
  color: #333;
}

/* ضمان أن الداشبورد على اليمين */
.main-container {
  margin-left: 280px !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* إصلاح الـ sidebar ليكون على اليسار */
.left-side-bar {
  left: 0 !important;
  right: auto !important;
}

/* إصلاح الـ header ليكون على اليمين */
.header {
  margin-left: 280px !important;
  width: calc(100% - 280px) !important;
}

/* إخفاء أي عناصر إضافية في الـ sidebar نهائياً */
.left-side-bar *:not(.brand-logo):not(.menu-block):not(.sidebar-menu):not(.sidebar-menu *):not(.mobile-menu-overlay) {
  display: none !important;
}

/* إخفاء أي عناصر مخفية في الـ sidebar */
.left-side-bar .hidden,
.left-side-bar .d-none,
.left-side-bar [style*="display: none"],
.left-side-bar [style*="visibility: hidden"] {
  display: none !important;
  visibility: hidden !important;
}
