/* Bidloft navy–blue navigation treatment, aligned with the CRM palette. */
.sidebar {
  isolation: isolate;
  overflow: hidden;
  border-right: 1px solid rgba(132, 190, 229, .22);
  background:
    radial-gradient(circle at 18% 4%, rgba(69, 151, 205, .28), transparent 30%),
    linear-gradient(165deg, #101b25 0%, #153d5f 48%, #256f9f 100%);
  box-shadow: 12px 0 38px rgba(7, 31, 52, .26);
}

.sidebar::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto -82px -116px auto;
  width: 260px;
  height: 260px;
  border: 52px solid rgba(105, 181, 229, .08);
  border-radius: 50%;
  pointer-events: none;
}

.sidebar .brand {
  position: relative;
  flex: 0 0 auto;
  min-height: 82px;
  border-bottom-color: rgba(190, 220, 240, .17);
  background: linear-gradient(110deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025));
  box-shadow: 0 12px 30px rgba(2, 35, 51, .12);
}

.sidebar .brand-mark {
  border: 1px solid rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 22px rgba(1, 30, 47, .22);
}

.sidebar .brand b { color: #fff; font-size: 1.05rem; letter-spacing: -.015em; }
.sidebar .brand small { color: #aecce1; font-size: .76rem; }
.sidebar nav { scrollbar-color: rgba(174, 209, 233, .38) transparent; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(174, 209, 233, .38); }
.sidebar .nav-section { border-bottom-color: rgba(204, 227, 243, .10); }

.sidebar .nav-heading {
  border: 1px solid transparent;
  background: transparent;
  color: #c1d8e8;
  font-size: .75rem;
  letter-spacing: .075em;
}

.sidebar .nav-heading:hover {
  border-color: rgba(185, 220, 243, .14);
  background: rgba(255, 255, 255, .075);
  color: #fff;
}

.sidebar .nav-section.expanded .nav-heading {
  border-color: rgba(113, 183, 227, .24);
  background: linear-gradient(100deg, rgba(43, 119, 169, .42), rgba(77, 153, 204, .18));
  color: #fff;
  box-shadow: inset 3px 0 #67b5e5, 0 8px 20px rgba(2, 27, 49, .16);
}

.sidebar .nav-heading-icon { color: #c0def1; background: rgba(213, 235, 249, .11); }
.sidebar .nav-section.expanded .nav-heading-icon {
  color: #0d3552;
  background: #a9d5ef;
  box-shadow: 0 5px 14px rgba(3, 27, 49, .24);
}
.sidebar .nav-chevron { color: #9fc7df; }
.sidebar .nav-section.expanded .nav-chevron { color: #d7edfa; }

.sidebar .nav-item {
  border: 1px solid transparent;
  color: #d2e3ef;
  font-size: .84rem;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.sidebar .nav-item:hover {
  border-color: rgba(190, 222, 242, .16);
  background: rgba(255, 255, 255, .085);
  color: #fff;
  transform: translateX(2px);
}

.sidebar .nav-item.active {
  border-color: rgba(105, 178, 222, .28);
  background: linear-gradient(100deg, rgba(38, 113, 164, .44), rgba(73, 151, 202, .22));
  color: #fff;
  box-shadow: inset 3px 0 #69b8e7, 0 8px 20px rgba(2, 27, 49, .17);
}

.sidebar .nav-item > span:first-child {
  color: #a9d2eb;
  filter: drop-shadow(0 2px 5px rgba(1, 30, 43, .18));
}
.sidebar .nav-item.active > span:first-child { color: #e2f3fd; }

.sidebar .nav-item .count {
  border: 1px solid rgba(205, 231, 247, .15);
  background: rgba(255, 255, 255, .10);
  color: #d8eaf5;
}
.sidebar .nav-item.active .count {
  border-color: rgba(222, 241, 252, .24);
  background: #add7ee;
  color: #123c59;
}

.sidebar .nav-label,
.sidebar .version { color: #9fc2da; }
.sidebar .sidebar-foot { border-top-color: rgba(204, 227, 243, .13); }

@media (max-width: 850px) {
  .sidebar { box-shadow: 18px 0 48px rgba(4, 24, 43, .38); }
  .sidebar .mobile-menu-close {
    border-color: rgba(215, 237, 250, .24);
    background: rgba(255, 255, 255, .10);
    box-shadow: 0 8px 22px rgba(2, 31, 48, .18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar .nav-item { transition: none; }
  .sidebar .nav-item:hover { transform: none; }
}

/* Restrained Bidloft gold accents for navigation items. */
.sidebar {
  --sidebar-gold: #dfbd68;
}

.sidebar .brand {
  border-bottom-color: rgba(223, 189, 104, .28);
}

.sidebar .nav-item:hover {
  border-color: rgba(223, 189, 104, .20);
}

.sidebar .nav-item.active {
  border-color: rgba(223, 189, 104, .34);
  background: linear-gradient(100deg, rgba(223, 189, 104, .14), rgba(43, 119, 169, .40) 54%, rgba(76, 155, 207, .20));
  box-shadow: inset 3px 0 var(--sidebar-gold), 0 8px 20px rgba(2, 27, 49, .17);
}

.sidebar .nav-item > span:first-child {
  transition: color .16s ease, filter .16s ease;
}

.sidebar .nav-item:hover > span:first-child {
  color: #f0d995;
}

.sidebar .nav-item.active > span:first-child {
  color: #f4dc98;
  filter: drop-shadow(0 2px 7px rgba(223, 189, 104, .24));
}

.sidebar .nav-item.active .count {
  border-color: rgba(255, 232, 170, .42);
  background: #e7c875;
  color: #173d4a;
}

.sidebar .nav-item:focus-visible,
.sidebar .nav-heading:focus-visible {
  outline: 2px solid var(--sidebar-gold);
  outline-offset: 2px;
}
