.sidebar {
  background: #fff;
  border-right: 1px solid #f2f2f2;
  box-sizing: border-box;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 80px;
  transition: width 0.3s ease;
  position: fixed;
  z-index: 110;
}

.sidebar.expanded .sidebar-top,
.sidebar.expanded .menu,
.sidebar.expanded .user {
  padding: 24px 20px;
}

.sidebar.expanded {
  width: 236px;
}

.sidebar:not(.expanded) .menu {
  align-items: center;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 16px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.sidebar-collapse-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #4F5359;
  padding: 0;
  transition: transform 0.3s ease;
}

.menu {
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 16px;
  list-style: none;
  overflow: auto;
}

.menu-item {
  display: flex;
  flex-direction: column;
  position: relative;
}

.menu-top {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.menu-top svg {
  color: #4F5359;
  transition: color 0.3s ease;
}

.menu-text {
  white-space: nowrap;
  overflow: hidden;
  font-size: 12px;
  line-height: 14px;
  letter-spacing: 5%;
  color: #4F5359;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.menu-arrow {
  display: flex;
  align-items: center;
  transition: transform 0.5s ease;
}

.menu-submenu {
  display: none;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin: 20px 0 0 9px;
  padding-left: 22px;
  position: relative;
}

.menu-submenu li {
  list-style: none;
  line-height: 17px;
  margin: 0;
}

.menu-submenu a {
  font-size: 14px;
  line-height: 17px;
  text-decoration: none;
  color: #4F5359;
  transition: color 0.5s ease;
}

.menu-submenu li.active {
  color: #CA12AA;
}

.menu-submenu:has(li.active) .menu-line {
  border-left: 1px solid #CA12AA;
  border-bottom: 1px solid #CA12AA;
  border-bottom-left-radius: 2px;
}

.menu-line {
  position: absolute;
  left: -1px;
  width: 16px;
  height: 100%;
  border-left: 1px solid rgba(79, 83, 89, 0.25);
  background: transparent;
  transition: top 0.5s ease, height 0.5s ease;
  z-index: 0;
}

.menu-item.active svg,
.menu-item.active .menu-text {
  color: #CA12AA;
}

.menu-item.active .menu-arrow {
  transform: rotate(180deg);
}

.menu-item.active .menu-submenu {
  display: flex;
}

.user {
  margin-top: auto;
  padding: 24px 16px;
  position: relative;
  display: inline-block;
}

.user-btn {
  padding: 12px;
  width: 100%;
  border: 1px solid #D8DCE9;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border 0.3s ease;
}

.user-btn:hover {
  border: 1px solid #5068A5;
}

.user-icon {
  margin-right: 6px;
}

.user-text {
  font-size: 14px;
  line-height: 17px;
  color: #333;
}

.user-arrow {
  margin-left: auto;
  color: #5068A5;
  transform: rotate(-90deg);
}

.sidebar:not(.expanded) .user-btn {
  padding: 9px;
}

.sidebar:not(.expanded) .logo-2,
.sidebar:not(.expanded) .menu-text,
.sidebar:not(.expanded) .menu-arrow,
.sidebar:not(.expanded) .menu-submenu,
.sidebar:not(.expanded) .user-arrow,
.sidebar:not(.expanded) .user-icon {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.sidebar:not(.expanded) .sidebar-collapse-btn {
  transform: rotate(-180deg);
}

.sidebar:not(.expanded) .user-text {
  background-color: #F1F1F3;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #5068A5;
}

.user-menu {
  display: none;
  flex-direction: column;
  gap: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid #D8DCE9;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateY(-10px);
}

.user-menu.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.user-menu.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.user-menu p {
  font-size: 14px;
  line-height: 17px;
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu .button {
  justify-content: center;
}

.user-menu .button {
  width: 100%;
}

