

:root {
  --sb2-w: 236px;
  --sb2-w-mini: 76px;
  --sb2-accent: #00c9a7;
  --sb2-accent-2: #00e0b8;
  --sb2-accent-soft: rgba(0, 201, 167, 0.1);
}
html.theme-black {
  --sb2-accent: #c43030;
  --sb2-accent-2: #e04a4a;
  --sb2-accent-soft: rgba(196, 48, 48, 0.12);
}


#sidebar.sb2 {
  width: var(--sb2-w) !important;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform var(--transition-slow, 0.3s ease);
}

@media (min-width: 769px) {
  .dashboard-layout .main-content {
    margin-left: 260px !important;
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
  html.sb2-mini #sidebar.sb2 {
    width: var(--sb2-w-mini) !important;
  }
  html.sb2-mini .dashboard-layout .main-content {
    margin-left: 100px !important;
  }
}


#sidebar .sb2-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 12px 12px 16px;
  min-height: 0;
}
#sidebar .sb2-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
}
#sidebar .sb2-brand-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
#sidebar .sb2-brand-logo img {
  height: 22px;
  width: auto;
  display: block;
}
#sidebar .sb2-brand-name {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.02rem;
  font-weight: 500 !important;
  letter-spacing: -0.005em;
  color: #f2f3f2;
  white-space: nowrap;
}
#sidebar .sb2-collapse {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
  padding: 0;
}
#sidebar .sb2-collapse:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}
#sidebar .sb2-collapse svg {
  width: 13px;
  height: 13px;
  transition: transform 0.28s ease;
}
html.sb2-mini #sidebar .sb2-collapse svg {
  transform: rotate(180deg);
}


#sidebar .sb2-search-wrap {
  position: relative;
  padding: 2px 12px 12px;
}
#sidebar .sb2-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.18s ease, background 0.18s ease;
}
#sidebar .sb2-search:focus-within {
  border-color: rgba(0, 201, 167, 0.4);
  background: rgba(255, 255, 255, 0.045);
}
html.theme-black #sidebar .sb2-search:focus-within {
  border-color: rgba(196, 48, 48, 0.45);
}
#sidebar .sb2-search > svg {
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}
#sidebar .sb2-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #e8e9e8;
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 400 !important;
}
#sidebar .sb2-search input::placeholder {
  color: rgba(255, 255, 255, 0.32);
  font-weight: 400;
}
#sidebar .sb2-search kbd {
  flex-shrink: 0;
  font-family: inherit;
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 2px 6px;
  line-height: 1;
}
#sidebar .sb2-results {
  position: absolute;
  left: 12px;
  right: 12px;
  top: calc(100% - 4px);
  background: #17191a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  padding: 5px;
  z-index: 60;
  max-height: 264px;
  overflow-y: auto;
}
#sidebar .sb2-results[hidden] {
  display: none;
}
#sidebar .sb2-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 450;
}
#sidebar .sb2-result svg {
  width: 13px;
  height: 13px;
  opacity: 0.55;
  flex-shrink: 0;
}
#sidebar .sb2-result:hover,
#sidebar .sb2-result.sel {
  background: var(--sb2-accent-soft);
  color: #fff;
}
#sidebar .sb2-result-empty {
  padding: 12px 10px;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.38);
  text-align: center;
}


#sidebar .sb2-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
#sidebar .sb2-nav::-webkit-scrollbar { width: 4px; }
#sidebar .sb2-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }

#sidebar .sb2-item {
  position: relative;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100%;
  min-height: 0;
  margin: 0 !important;
  padding: 8px 9px !important;
  border-radius: 9px !important;
  border: none;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.62) !important;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 0.83rem !important;
  font-weight: 450 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  box-sizing: border-box;
}
#sidebar .sb2-item:hover {
  background: rgba(255, 255, 255, 0.045) !important;
  color: #f2f3f2 !important;
}
#sidebar .sb2-item::before { display: none !important; }

#sidebar .sb2-ico {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.18s ease;
}
#sidebar .sb2-ico svg {
  width: 16px !important;
  height: 16px !important;
}
#sidebar .sb2-item:hover .sb2-ico { color: #f2f3f2; }

#sidebar .sb2-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}


#sidebar .sb2-item.active {
  color: #fff !important;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0%, var(--sb2-accent-soft) 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
#sidebar .sb2-item.active::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  background: radial-gradient(circle, var(--sb2-accent) 0%, transparent 72%);
  opacity: 0.55;
  filter: blur(6px);
  pointer-events: none;
  z-index: -1;
}
#sidebar .sb2-item.active .sb2-ico { color: var(--sb2-accent); }

#sidebar .sb2-item.active::before {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  left: auto !important;
  right: 4px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 3px !important;
  height: 16px !important;
  border-radius: 999px !important;
  background: var(--sb2-accent) !important;
  box-shadow: 0 0 8px var(--sb2-accent), 0 0 18px var(--sb2-accent-soft) !important;
}


#sidebar .sb2-chev {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.32);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#sidebar .sb2-group-btn[aria-expanded="true"] .sb2-chev {
  transform: rotate(180deg);
  color: rgba(255, 255, 255, 0.6);
}


#sidebar .sb2-group {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.22s ease;
}
#sidebar .sb2-group.open {
  opacity: 1;
}
#sidebar .sb2-group-inner {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 0 4px;
}
#sidebar .sb2-sub {
  padding-left: 8px !important;
  font-size: 0.81rem !important;
}
#sidebar .sb2-sub .sb2-ico {
  width: 24px;
  height: 24px;
}
#sidebar .sb2-sub .sb2-ico svg {
  width: 14px !important;
  height: 14px !important;
}


#sidebar .sb2-other {
  margin: 10px 9px 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}
#sidebar .sb2-other-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 550 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
}


#sidebar .sb2-foot {
  display: flex !important;
  align-items: center;
  gap: 9px;
  padding: 12px 14px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}
#sidebar .sb2-foot .avatar {
  width: 30px !important;
  height: 30px !important;
  font-size: 0.76rem !important;
  margin: 0 !important;
  flex-shrink: 0;
}
#sidebar .sb2-foot-email {
  font-size: 0.72rem !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.42) !important;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


@media (min-width: 769px) {
  html.sb2-mini .sb2-label,
  html.sb2-mini .sb2-search-wrap,
  html.sb2-mini .sb2-chev,
  html.sb2-mini .sb2-other-label,
  html.sb2-mini .sb2-foot-email {
    display: none !important;
  }
  html.sb2-mini #sidebar .sb2-head {
    flex-direction: column;
    gap: 8px;
    padding: 16px 0 10px;
    align-items: center;
  }
  html.sb2-mini #sidebar .sb2-brand {
    justify-content: center;
  }
  html.sb2-mini #sidebar .sb2-group {
    max-height: none !important;
    opacity: 1 !important;
  }
  html.sb2-mini #sidebar .sb2-nav {
    padding: 2px 0 12px;
    align-items: center;
  }
  html.sb2-mini #sidebar .sb2-item {
    width: 44px !important;
    justify-content: center !important;
    padding: 8px 0 !important;
    gap: 0 !important;
  }
  html.sb2-mini #sidebar .sb2-item.active::after {
    right: 2px;
  }
  html.sb2-mini #sidebar .sb2-sub {
    padding-left: 0 !important;
  }
  html.sb2-mini #sidebar .sb2-other {
    width: 44px;
    margin: 8px 0 2px;
    padding-top: 8px;
  }
  html.sb2-mini #sidebar .sb2-foot {
    justify-content: center;
    padding: 12px 0 !important;
  }
}


@media (max-width: 768px) {
  #sidebar.sb2,
  html.sb2-mini #sidebar.sb2 {
    width: var(--sb2-w) !important;
  }
  #sidebar .sb2-collapse {
    display: none;
  }
}
