/* Leftbar Styles */
.leftbar {
  width: 100%;
  height: 100%;
  min-height: 100%;
  min-width: 135px;
  background-color: #f8f9fa;
  padding: 20px;
  position: sticky;
  top: 0;
  overflow-y: auto;
}

.leftbar-section {
  margin-bottom: 20px;
}

.section-title {
  color: #828282;
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: bold;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 10px;
  color: #757575;
  cursor: pointer;
  border-radius: 5px;
  margin-bottom: 5px;
}

.menu-item.selected {
  background-color: #00ACE8;
  color: #FFFFFF;
}

.menu-item:hover {
  background-color: #00ACE8;
  color: #FFFFFF;
}

.menu-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.menu-text {
  font-size: 16px;
}

.leftbar-divider {
  height: 1px;
  background-color: #828282;
  margin: 20px 0;
}

.user-info {
  display: flex;
  align-items: center;
  padding: 10px;
  margin-top: auto;
  border-top: 1px solid #828282;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #FFFFFF;
  border: 2px solid #00ACE8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  color: #00ACE8;
  margin-right: 10px;
  flex-shrink: 0;

}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 16px;
  color: #000000;
}

.user-role {
  font-size: 14px;
  color: #828282;
}

/* Hamburger menu icon for mobile */
.leftbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.hamburger {
  width: 24px;
  height: 18px;
  position: relative;
}

.hamburger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: #333;
  border-radius: 2px;
  left: 0;
  transition: all 0.3s;
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 8px;
}

.hamburger span:nth-child(3) {
  top: 16px;
}

/* Animated hamburger menu when active */
.leftbar-toggle.active .hamburger span:nth-child(1) {
  transform: rotate(45deg);
  top: 8px;
}

.leftbar-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.leftbar-toggle.active .hamburger span:nth-child(3) {
  transform: rotate(-45deg);
  top: 8px;
}


@media (max-width: 870px) {
  .leftbar {
    padding: 20px 10px;
  }
  .user-avatar {
    width: 30px;
    height: 30px;
  }
}

/* Responsive drawer behavior for small screens */
@media (max-width: 500px) {
  .leftbar-toggle {
    display: block;
    position: fixed;
    top: 12px;
    left: 15px;
    z-index: 1100;
  }
  
  .leftbar {
    position: fixed;
    left: -100%;
    z-index: 1050;
    max-width: 80%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
  }
  
  .leftbar.active {
    left: 0;
  }
  
  /* Overlay for when drawer is open */
  .leftbar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
  }
  
  .leftbar-overlay.active {
    display: block;
  }
  
  /* Adjust topbar to make room for the hamburger */
  .topbar-left .logo {
    margin-left: 60px;
  }

  .leftbar-section {
    margin-top: 25px;
  }
}