/* ============================================================
   SIDEBAR — Institutional Document Navigation
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 100;
  border-right: 1px solid rgba(200,169,81,0.08);
  transition: transform var(--transition);
}

/* ---- Header: Logo + Title ---- */
.sidebar-header {
  padding: 28px 28px 22px;
  border-bottom: 1px solid rgba(200,169,81,0.1);
  flex-shrink: 0;
}
.sidebar-logo {
  width: 160px;
  height: auto;
  display: block;
  opacity: 0.92;
  margin-bottom: 10px;
}
.sidebar-title {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(200,169,81,0.4);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ---- Scrollable Nav ---- */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.06) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 2px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

/* ---- Groups & Labels ---- */
.nav-group {
  padding: 0 0 4px;
}
.nav-group-label {
  padding: 10px 28px 6px;
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255,255,255,0.2);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-separator {
  height: 1px;
  margin: 4px 28px;
  background: rgba(255,255,255,0.04);
}

/* ---- Links ---- */
.nav-link {
  display: block;
  padding: 7px 28px;
  font-size: 0.77rem;
  font-weight: 400;
  color: rgba(255,255,255,0.42);
  text-decoration: none;
  transition: color 200ms ease, background 200ms ease;
  line-height: 1.4;
  position: relative;
}
.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
  transition: background 200ms ease;
}

.nav-link:hover {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
}

.nav-link.active {
  color: rgba(255,255,255,0.92);
  font-weight: 500;
}
.nav-link.active::before {
  background: var(--gold);
}

/* ---- Footer ---- */
.sidebar-footer {
  padding: 18px 28px;
  border-top: 1px solid rgba(200,169,81,0.08);
  flex-shrink: 0;
}
.sidebar-footer-line {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.18);
  line-height: 1.7;
  letter-spacing: 0.3px;
}
.sidebar-confidential {
  color: rgba(200,169,81,0.25);
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ============================================================
   MOBILE SIDEBAR OVERLAY
   ============================================================ */
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
#sidebar-overlay.visible { display: block; }

/* ============================================================
   MOBILE TOP BAR — sticky header with logo + hamburger
   ============================================================ */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 101;
  height: 56px;
  background: rgba(10,17,32,0.92);
  border-bottom: 1px solid rgba(200,169,81,0.1);
  align-items: center;
  padding: 0 16px;
  gap: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(-100%);
  transition: transform 300ms ease;
}
.mobile-topbar.visible {
  transform: translateY(0);
}
.mobile-topbar-logo {
  height: 28px;
  width: auto;
  opacity: 0.85;
}

.sidebar-toggle {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.06); }
.sidebar-toggle svg { width: 18px; height: 18px; stroke: rgba(255,255,255,0.7); fill: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    width: 300px;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(0,0,0,0.35);
  }
  .mobile-topbar { display: flex; }

  /* Make sidebar links bigger for touch */
  .nav-link {
    padding: 11px 28px;
    font-size: 0.85rem;
  }
  .nav-group-label {
    padding: 12px 28px 8px;
    font-size: 0.65rem;
  }
}
