
.el-sidebar-menu-wrapper * {
  box-sizing: border-box;
  font-family: "Tajawal", sans-serif !important;
 
}
.el-sidebar-menu-wrapper {
  width: 100%;
}
.el-sidebar-main {
  list-style: none;
  padding: 0!important;
  margin: 0!important;
  width: 100%;
}
.el-sidebar-item {
  border: 1px solid #eee;
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 5px 15px;
  background: #fff;
  transition: all 0.3s ease;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.el-sidebar-item.active {
  font-weight: bold;
  color: #0A3069;
}

.el-sidebar-item.active {

  border-color: #0A3069;
}

.el-sidebar-item:hover {

  border-color: #0A3069;
  background-color: #F1F5FB;
}
.el-sidebar-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
}
.el-sidebar-item svg {
  width: 16px;
  height: 16px;
  fill: #0A3069;
  flex-shrink: 0;
  margin-left: 8px;
   max-width: 100%;
  max-height: 100%;
  display: inline-block;
}
.el-sidebar-sub {
  list-style: none;
  padding: 0 !important;
  margin: 0 !important; /* 🔥 أضف هذه السطر */
  border: none;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
  display: none; /* ✅ لمنع الحجز الكامل */
}

.el-sidebar-sub.active {
  display: block;     /* ✅ أظهر القائمة عند التفعيل */
  max-height: 500px;  /* كما هو */
  margin-top: 10px !important; /* رجّع الهوامش فقط عند التفعيل */
}

.el-sidebar-sub li {
  background-color: #F9F9F9;
  padding: 5px 15px;
  margin-top: 8px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  border: 1px solid #ECECEC;
  transition: all 0.3s ease;
}

.el-sidebar-sub li.active {
    background-color: #F1F5FB;
    color: #0A3069;
    font-weight: bold;
    border-color: #0A3069;
}

.el-sidebar-sub li a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.el-sidebar-menu-wrapper a.active {
  color: #0A3069;
  font-weight: bold;
}


.el-sidebar-main a:focus {
  outline: none !important;
  box-shadow: none !important;
}


/*ايقونة الجوال*/
/* زر القائمة يظهر فقط على الجوال */
.el-sidebar-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  background: #0A3069;
  color: #fff;
  border: none;
  font-size: 18px;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .el-sidebar-toggle {
    display: block;
  }

  .el-sidebar-menu-wrapper {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    padding: 20px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.4s ease;
    z-index: 999;
  }

  .el-sidebar-menu-wrapper.active {
    right: 0;
  }
}


.el-sidebar-menu-wrapper {

    z-index:10;
  }


@media (max-width: 767px) {
  .el-sidebar-menu-wrapper.hide-on-mobile {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .hide-on-mobile {
    display: none !important;
  }
}

.el-sidebar-controls {
  display: flex;
  gap: 10px;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  background-color: #fafafa;
  justify-content: flex-end;
}

.el-sidebar-controls button {
  background-color: #243D80;
  color: white;
  border: none;
  padding: 5px 12px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  transition: background-color 0.3s ease;
}

.el-sidebar-controls button:hover {
  background-color: #1c2f63;
}

.expand-all-default .el-sidebar-item.has-children .el-sidebar-sub {
    display: block;
}


.el-sidebar-toggle {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.el-sidebar-toggle.visible {
  opacity: 1;
  pointer-events: auto;
}

.expand-all-default .el-sidebar-item.has-children {
    max-height: none;
}


/* إظهار على الشاشات الصغيرة فقط */
.el-sidebar-controls {
  display: flex;
  gap: 10px;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  background-color: #fafafa;
  justify-content: flex-end;
}

/* إخفاء على الشاشات الواسعة */
@media (min-width: 769px) {
  .el-sidebar-controls {
    display: none;
  }
}

.el-sidebar-menu-wrapper::before {
  content: "";
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 100px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(255,255,255,0));
  z-index: -1;
}
