.sidebar {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-inline-end: 1px solid var(--glass-border);
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 4px 8px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.brandLogo {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
  border-radius: 8px;
}

.brandFallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.18);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.brandLogoUploaded {
  border-radius: 8px;
  object-fit: cover;
  background: transparent;
}

.brandText {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brandDomain {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.2;
}

.brandName {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  padding-inline-end: 2px;
}

.navGroup {
  display: flex;
  flex-direction: column;
}

.navItem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  width: 100%;
  text-align: start;
}

.navItem:hover {
  background: rgba(var(--primary-rgb) / 0.08);
  color: var(--primary);
}

.navItem.active {
  background: rgba(var(--primary-rgb) / 0.12);
  color: var(--primary);
}

.navGroupBtn {
  justify-content: flex-start;
}

.navGroupLabel {
  flex: 1;
}

.chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.chevronOpen {
  transform: rotate(180deg);
}

.subNav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-block: 2px 4px;
  margin-inline: 12px 0;
  padding-inline-start: 12px;
  border-inline-start: 2px solid rgba(148, 163, 184, 0.2);
}

.subNavItem {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.subNavItem:hover {
  background: rgba(var(--primary-rgb) / 0.06);
  color: var(--primary);
}

.subNavActive {
  background: rgba(var(--primary-rgb) / 0.1);
  color: var(--primary);
}

.footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  flex-shrink: 0;
}

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