/* Shared Dashboard Sidebar (Portfolio, Deals, Documents, Insights) */
.sidebar {
  background: linear-gradient(180deg, rgba(15, 20, 35, 0.98) 0%, rgba(10, 14, 28, 0.99) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-section {
  padding: 0.25rem 0;
}

.sidebar-section-title {
  display: block;
  padding: 0.5rem 1.25rem 0.25rem;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.45);
}

.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06) 20%, rgba(255, 255, 255, 0.06) 80%, transparent);
  margin: 0.5rem 1rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  margin: 0.125rem 0.625rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 450;
  color: rgba(203, 213, 225, 0.65);
  transition: all 0.15s ease;
  position: relative;
  letter-spacing: 0.005em;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(241, 245, 249, 0.95);
}

.sidebar-link:hover svg {
  color: rgba(148, 163, 184, 0.8);
}

.sidebar-link.active {
  background: rgba(59, 130, 246, 0.08);
  color: #f1f5f9;
  font-weight: 500;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 1.25rem;
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
  border-radius: 0 9999px 9999px 0;
}

.sidebar-link.active svg {
  color: #60a5fa;
}

.sidebar-link svg {
  width: 1.125rem;
  height: 1.125rem;
  color: rgba(148, 163, 184, 0.4);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.sidebar-link .sidebar-badge {
  margin-left: auto;
  font-size: 0.5625rem;
  font-weight: 700;
  padding: 0.125rem 0.4rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(148, 163, 184, 0.7);
  line-height: 1.3;
  letter-spacing: 0.02em;
  min-width: 1.25rem;
  text-align: center;
}

.sidebar-link.active .sidebar-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.sidebar-badge--alert {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
}

.sidebar-health-card {
  margin: 0.75rem 0.625rem;
  padding: 0.875rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-health-card__title {
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(148, 163, 184, 0.5);
  margin-bottom: 0.625rem;
}

.sidebar-health-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0;
}

.sidebar-health-card__label {
  font-size: 0.6875rem;
  color: rgba(148, 163, 184, 0.7);
}

.sidebar-health-card__val {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
}

.sidebar-health-card__val--green {
  color: #34d399;
}

.sidebar-health-card__val--amber {
  color: #fbbf24;
}

.sidebar-health-card__val--red {
  color: #f87171;
}

.sidebar-workspace-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.875rem;
  width: 100%;
  margin: 0;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background 0.12s ease;
}

.sidebar-workspace-pill:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-workspace-pill:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.75);
  outline-offset: 2px;
}

.sidebar-workspace-pill__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(203, 213, 225, 0.7);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-workspace-pill__icon {
  color: rgba(148, 163, 184, 0.5);
  flex-shrink: 0;
}

.sidebar-workspace-heading {
  margin: 0 1rem 0.125rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(148, 163, 184, 0.9);
  text-transform: uppercase;
  line-height: 1;
}

.sidebar-workspace-dropdown {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(100% + 0.5rem);
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.75rem;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(8px);
  z-index: 80;
}

.sidebar-workspace-dropdown .workspace-dropdown-title {
  color: rgba(148, 163, 184, 0.92);
}

.sidebar-workspace-dropdown .workspace-dropdown-divider {
  border-color: rgba(148, 163, 184, 0.2);
}
