/* ============================================================
   PDPL ROPA Manager — Sidebar Styles
   Dark slate sidebar with teal accents
   ============================================================ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: #0F172A;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #1E293B transparent;
  border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #1E293B; border-radius: 99px; }

/* --- Brand Header ----------------------------------------- */
.sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.sidebar-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(1.05);
  flex-shrink: 0;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sidebar-brand-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #F8FAFC;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-brand-sub {
  font-size: 0.7rem;
  color: #2DD4BF;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* --- Navigation ------------------------------------------- */
.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section {
  margin-bottom: 6px;
}

.nav-section-title {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #475569;
  padding: 8px 10px 4px;
  margin-top: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94A3B8;
  text-decoration: none;
  transition: all 0.18s ease;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(255,255,255,0.06);
  color: #E2E8F0;
}

.nav-link.active {
  background: rgba(45,212,191,0.12);
  color: #2DD4BF;
  font-weight: 600;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: #2DD4BF;
  border-radius: 0 3px 3px 0;
}

.nav-link-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.8;
}

.nav-link.active .nav-link-icon {
  opacity: 1;
}

.nav-link-badge {
  margin-left: auto;
  background: rgba(239,68,68,0.2);
  color: #FCA5A5;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
}

/* --- Sidebar Footer --------------------------------------- */
.sidebar-footer {
  flex-shrink: 0;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.sidebar-org {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 10px 12px;
  margin-bottom: 4px;
}

.sidebar-org-icon {
  width: 32px; height: 32px;
  background: rgba(45,212,191,0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-org-icon svg {
  width: 16px; height: 16px;
  color: #2DD4BF;
}

.sidebar-org-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #E2E8F0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-org-role {
  font-size: 0.7rem;
  color: #475569;
}

.sidebar-version {
  text-align: center;
  font-size: 0.65rem;
  color: #334155;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 4px;
}

/* --- Sidebar toggle (mobile) ------------------------------ */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  width: 38px; height: 38px;
  background: #0F172A;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
}

/* Active indicator glow */
.nav-link.active .nav-link-icon {
  filter: drop-shadow(0 0 4px rgba(45,212,191,0.5));
}

/* Tooltip for collapsed state (future) */
.nav-tooltip {
  display: none;
  position: absolute;
  left: calc(var(--sidebar-width) + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: #1E293B;
  color: #E2E8F0;
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 200;
}
