/* style */
/* ---------- Left menu: full height by default ---------- */
    @media (min-width: 1025px) {
      .left-sidebar {
        height: calc(100vh - 190px);   /* from below the toolbar to the bottom of the window */
        align-self: flex-start;
        position: sticky;
        top: 100px;
      }
      .left-sidebar.expanded {
        overflow-y: auto;
        overscroll-behavior: contain;
      }
      .left-sidebar::-webkit-scrollbar { width: 6px; }
      .left-sidebar::-webkit-scrollbar-track { background: transparent; margin: 12px 0; }
      .left-sidebar::-webkit-scrollbar-thumb { background: #c9b8ea; border-radius: 999px; }
      .left-sidebar::-webkit-scrollbar-thumb:hover { background: #5a2da2; }
      body.night-mode .left-sidebar::-webkit-scrollbar-thumb { background: #4f4566; }
    }

/* id="sd-menu-style" */
/* ---------- System Design sidebar: collapsible sections ---------- */
.left-sidebar .sidebar-section h3 { margin: 0; padding: 0; }
.left-sidebar .sdmenu-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 4px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.left-sidebar .sdmenu-toggle:hover { background: #f6f3fc; color: var(--primary); }
.left-sidebar .sdmenu-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.left-sidebar .sdmenu-title { flex: 1; }
.left-sidebar .sdmenu-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1ecfa;
  color: var(--primary);
  font-size: 0.68rem;
  letter-spacing: 0;
  text-align: center;
}
.left-sidebar .sdmenu-chevron { font-size: 0.7rem; transition: transform 0.2s ease; }
.left-sidebar .sdmenu-toggle[aria-expanded="false"] .sdmenu-chevron { transform: rotate(-90deg); }
.left-sidebar .sidebar-menu[hidden] { display: none; }
.left-sidebar .sdmenu-soon {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 12px;
  border-radius: 8px;
  color: #9aa1ab;
  font-size: 0.92rem;
  line-height: 1.35;
  text-align: left;
  cursor: default;
}
.left-sidebar .sdmenu-soon > span:first-child { flex: 1; }
.left-sidebar .sdmenu-badge {
  flex-shrink: 0;
  padding: 1px 7px;
  border: 1px solid #e6e1ef;
  border-radius: 999px;
  color: #8b8f98;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* Collapsed sidebar: full-height bar on desktop */
@media (min-width: 1025px) {
  .left-sidebar:not(.expanded) { height: calc(100vh - 190px); }
}
/* Smaller text and tighter spacing for menu links */
.left-sidebar .sidebar-menu { gap: 2px; }
.left-sidebar .sidebar-menu a,
.left-sidebar .sdmenu-soon {
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 0.9rem;
  line-height: 1.35;
}
.left-sidebar .sdmenu-toggle { padding-top: 5px; padding-bottom: 5px; }
/* ---------- System Design sidebar look (works with the old and the new site stylesheet) ---------- */
/* Title: smaller, one line */
.left-sidebar .sidebar-title { font-size: 1.05rem; line-height: 1.3; }
/* Sections: tighter, separated by a thin line */
.left-sidebar .sidebar-section { margin: 0; padding: 6px 0; border-top: 1px solid #f0edf5; }
.left-sidebar .sidebar-header + .sidebar-section { border-top: 0; }
/* Section headings: purple, ~14px, one accent colour, no side bar, not uppercase */
.left-sidebar .sidebar-section h3 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--primary);
  font-family: "Poppins", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.3;
}
/* Current page: light purple highlight instead of a solid block */
.left-sidebar .sidebar-menu a.active {
  background: #efe8fb;
  color: var(--primary);
  font-weight: 600;
  box-shadow: none;
  border-color: transparent;
}
/* Room below the last section so it is never cut off */
.left-sidebar.expanded { padding-bottom: 24px; }
/* No section dividers while the sidebar is collapsed */
.left-sidebar:not(.expanded) .sidebar-section { border-top: 0; padding: 0; }
body.night-mode .left-sidebar .sidebar-section { border-top-color: #3b3b45; }
body.night-mode .left-sidebar .sidebar-header + .sidebar-section { border-top: 0; }
body.night-mode .left-sidebar .sidebar-section h3 { color: #cdb9f5; }
body.night-mode .left-sidebar .sidebar-menu a.active { background: #2c2442; color: #cdb9f5; }
/* Bullet before every menu link */
.left-sidebar .sidebar-menu a::before,
.left-sidebar .sdmenu-soon::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin-right: 2px;
  border-radius: 50%;
  background: #b9a5df;
  position: static;
}
.left-sidebar .sidebar-menu a:hover::before { background: var(--primary); }
.left-sidebar .sidebar-menu a.active::before { background: currentColor; }
.left-sidebar .sdmenu-soon::before { background: #d3d6db; }
body.night-mode .left-sidebar .sidebar-menu a::before { background: #6a5a8c; }
body.night-mode .left-sidebar .sidebar-menu a:hover::before,
body.night-mode .left-sidebar .sidebar-menu a.active::before { background: #cdb9f5; }
body.night-mode .left-sidebar .sdmenu-soon::before { background: #4a4a55; }
/* Scroll slider: the open menu scrolls inside the sidebar */
@media (min-width: 1025px) {
  .left-sidebar.expanded {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
.left-sidebar::-webkit-scrollbar { width: 6px; }
.left-sidebar::-webkit-scrollbar-track { background: transparent; margin: 12px 0; }
.left-sidebar::-webkit-scrollbar-thumb { background: #c9b8ea; border-radius: 999px; }
.left-sidebar::-webkit-scrollbar-thumb:hover { background: #5a2da2; }
@supports (-moz-appearance: none) {
  .left-sidebar.expanded { scrollbar-width: thin; scrollbar-color: #c9b8ea transparent; }
}
body.night-mode .left-sidebar::-webkit-scrollbar-thumb { background: #4f4566; }
body.night-mode .left-sidebar .sdmenu-toggle:hover { background: #2c2442; color: #cdb9f5; }
body.night-mode .left-sidebar .sdmenu-count { background: #2c2442; color: #cdb9f5; }
body.night-mode .left-sidebar .sdmenu-soon { color: #6f6a7d; }
body.night-mode .left-sidebar .sdmenu-badge { border-color: #3b2f5c; color: #8a8399; }
