.sidebar {
  width: 300px;
  min-height: 0;
  padding: 18px 16px 14px;
  border-right: 1px solid var(--line-soft);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-top {
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line-soft);
}

.server-switcher {
  display: grid;
  width: 100%;
  grid-template-columns: 30px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 0;
  background: #11131b;
  color: var(--text-main);
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.server-switcher-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  object-fit: cover;
}

.server-switcher-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 800;
}

.plugin-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.plugin-list:hover {
  scrollbar-color: rgba(255, 255, 255, 0.20) transparent;
}

.sidebar-section {
  margin-bottom: 16px;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.sidebar-section-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 6px 10px;
  border: 0;
  background: transparent;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(244, 247, 251, 0.76);
  font-weight: 800;
}

.plugin-card {
  position: relative;
  width: 100%;
  margin-bottom: 3px;
  padding: 8px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
  min-height: 46px;
}

.plugin-card .icon {
  flex-basis: 42px;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(244, 247, 251, 0.78);
  background: transparent;
  border: 0;
}

.plugin-card .icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.label-main {
  font-size: 0.86rem;
  font-weight: 700;
}

.label-sub {
  margin-top: 5px;
  font-size: 0.70rem;
  color: rgba(244, 247, 251, 0.56);
  font-weight: 450;
}

.sidebar-footer {
  padding-top: 20px;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.sidebar-footer a {
  color: rgba(244, 247, 251, 0.62);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
}

.server-switcher-caret {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--text-dim);
}

.sidebar-section-title.collapsible {
  cursor: pointer;
  user-select: none;
  text-align: left;
}

.sidebar-section:not(.collapsed) .sidebar-section-title.collapsible::before {
  content: "-";
}

.sidebar-section.collapsed .plugin-list-inner {
  display: none;
}

.plugin-card.disabled {
  opacity: 0.4;
}

.label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sidebar-footer a:hover {
  color: var(--gold);
}

.plugin-inner p,
.plugin-inner li,
.plugin-inner span:not(.icon):not(.label-main):not(.label-sub) {
  color: var(--text-muted);
}

.server-switcher:hover {
  border-color: transparent;
  background: #151824;
}

.plugin-list::-webkit-scrollbar {
  width: 4px;
}

.plugin-list::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

.plugin-list::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
}

.plugin-list:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
}

.plugin-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.sidebar-section-title.collapsible::before {
  content: "+";
  flex: 0 0 auto;
  order: 3;
  font-size: 0.95rem;
  color: rgba(244, 247, 251, 0.52);
}

.sidebar-section-count {
  margin-left: auto;
  min-width: 32px;
  color: rgba(244, 247, 251, 0.62);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: right;
  letter-spacing: 0.04em;
}

.plugin-list-inner {
  padding: 0;
}

.plugin-card:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.055);
  border-color: transparent;
  box-shadow: none;
}

.plugin-card.active {
  background: rgba(245, 179, 53, 0.09);
  border-color: transparent;
  box-shadow: none;
}

.plugin-card.active::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.plugin-card.active .icon {
  color: #f5b335;
  background: rgba(245, 179, 53, 0.10);
  border-color: rgba(255, 255, 255, 0.34);
  border: 0;
}
