/* ═══════════════════════════════════════════════════════════════
   AgencyOS — sidebar-v5.css
   Approved V5 Blue sidebar — values measured from the reference
   (design-referenceagencyos-v5-blue, v4.css .aos .sidebar …) at 1440×900:
     aside 256×100% (1px right border) · padding 20/10/16
     brand: 25px 4-tile mark + 23px/700 "AgencyOS", 12px gap
     section label: 10.5px/800 uppercase, ls 1.26px, padding 16/11/6
     item: 40px high, radius 10, padding 0 12, gap 12, 13.5px/600 (active 700),
           18px icons @ stroke 1.8, 3px left indicator on the active item
     footer: top border, user row (34px avatar, 13/600 name, 11/500 role) + 38px bell
     collapsed: 76px wide, 55×46 icon buttons, brand mark only
   Scoped to #sidebar. Markup/handlers (setSection …) are untouched.
   ═══════════════════════════════════════════════════════════════ */
#sidebar {
  /* light — reference .aos.palette-blue */
  --sb-bg: #ffffff;
  --sb-line: #cddfe4;
  --sb-ink: #17252b;
  --sb-muted: #566a73;
  --sb-primary: #12739a;
  --sb-active-bg: rgb(232, 242, 246);
  --sb-active-ink: #117093;
  --sb-avatar-bg: rgb(222, 237, 242);
  --sb-surface-2: #e3f0f3;
  --sb-ring: #ffffff;
  font-family: var(--app-font, Inter, 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif);
}
:root:not([data-theme="light"]) #sidebar {
  /* dark — reference .aos.palette-blue.dark */
  --sb-bg: #0d1116;
  --sb-line: #22313b;
  --sb-ink: #eff7f5;
  --sb-muted: #8e9aa5;
  --sb-primary: #17c7df;
  --sb-active-bg: linear-gradient(135deg, rgba(23, 199, 223, 0.18), rgba(71, 226, 130, 0.1));
  --sb-active-ink: #e9fffb;
  --sb-avatar-bg: rgb(14, 42, 50);
  --sb-surface-2: #131c24;
  --sb-ring: #0d1116;
}

@media (min-width: 901px) {
  :root { --sidebar-w: 256px; }
  body.sidebar-collapsed { --sidebar-w: 76px; }

  #sidebar {
    width: var(--sidebar-w); min-width: var(--sidebar-w);
    padding: 20px 10px 16px;
    background: var(--sb-bg); color: var(--sb-ink);
    border-right: 1px solid var(--sb-line);
    position: relative; overflow: visible;
    transition: width .3s cubic-bezier(.4, 0, .2, 1), min-width .3s cubic-bezier(.4, 0, .2, 1), padding .3s cubic-bezier(.4, 0, .2, 1);
  }
  #sidebar.collapsed { padding: 18px 10px 14px; }

  /* brand */
  #sidebar .sidebar-brand {
    display: flex; align-items: center; gap: 12px;
    height: auto; padding: 0 11px 14px; margin: 0; border: 0; background: transparent;
    transition: padding .3s cubic-bezier(.4, 0, .2, 1), gap .3s cubic-bezier(.4, 0, .2, 1);
  }
  #sidebar .sidebar-brand .brandmark { display: grid; grid-template-columns: repeat(2, 11px); gap: 3px; width: 25px; flex: 0 0 25px; }
  #sidebar .sidebar-brand .brandmark i { display: block; height: 11px; border: 2px solid var(--sb-primary); border-radius: 4px; }
  #sidebar .sidebar-brand .brand-name {
    font-size: 23px; font-weight: 700; line-height: 35.65px; letter-spacing: normal; color: var(--sb-ink);
    max-width: 150px; overflow: hidden; white-space: nowrap;
    transition: max-width .3s cubic-bezier(.4, 0, .2, 1), opacity .18s ease;
  }
  #sidebar .sidebar-brand .brand-badge { display: none; }

  /* navigation */
  #sidebar .sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0; margin: 0; overflow-y: auto; overflow-x: hidden; flex: 1 1 auto; min-height: 0; scrollbar-width: thin; }
  #sidebar .nav-section-label {
    padding: 16px 11px 6px; margin: 0; border: 0;
    font-size: 10.5px; font-weight: 800; line-height: 16.275px; letter-spacing: 1.26px; text-transform: uppercase;
    color: var(--sb-muted); white-space: nowrap; overflow: hidden;
  }
  #sidebar .sidebar-nav > .nav-section-label:first-child { padding-top: 4px; }
  #sidebar .nav-item {
    position: relative; display: flex; align-items: center; gap: 12px;
    width: 100%; height: 40px; margin: 0; padding: 0 12px; border: 0; border-radius: 10px;
    background: transparent; color: var(--sb-muted);
    font-size: 13.5px; font-weight: 600; line-height: 20.925px; letter-spacing: normal; text-decoration: none; text-align: left;
    cursor: pointer; transition: background-color .15s ease, color .15s ease, padding .3s cubic-bezier(.4, 0, .2, 1), gap .3s cubic-bezier(.4, 0, .2, 1);
  }
  #sidebar .nav-item > span:not(.nav-badge) { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: max-width .3s cubic-bezier(.4, 0, .2, 1), opacity .18s ease; }
  #sidebar .nav-item .nav-icon { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  #sidebar .nav-item:hover { background: var(--sb-active-bg); color: var(--sb-active-ink); }
  #sidebar .nav-item.active { background: var(--sb-active-bg); color: var(--sb-active-ink); font-weight: 700; }
  #sidebar .nav-item.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sb-primary); }
  #sidebar .nav-item:focus-visible, #sidebar .sidebarCollapseToggle:focus-visible, #sidebar .role-switcher:focus-visible, #sidebar .notif-bell-btn:focus-visible { outline: 2px solid var(--sb-primary); outline-offset: 2px; }

  /* the reference sidebar has no "New Project" shortcut (it lives on the Projects screen) */
  #sidebar .sidebar-new-project-btn { display: none; }

  /* footer: top rule, user row + notifications */
  #sidebar .sidebar-footer { margin-top: auto; padding: 12px 0 0; border-top: 1px solid var(--sb-line); background: transparent; display: grid; gap: 0; }
  #sidebar .sidebar-footer-bottom { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; position: relative; }
  #sidebar .role-switcher.identity-chip {
    display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0;
    padding: 8px 7px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
    transition: background-color .15s ease, padding .3s cubic-bezier(.4, 0, .2, 1), gap .3s cubic-bezier(.4, 0, .2, 1);
  }
  #sidebar .role-switcher.identity-chip:hover { background: var(--sb-active-bg); }
  #sidebar .rs-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: var(--sb-avatar-bg); color: var(--sb-primary); font-size: 12px; font-weight: 700; line-height: 18.6px; }
  #sidebar .rs-info { min-width: 0; flex: 1 1 auto; transition: max-width .3s cubic-bezier(.4, 0, .2, 1), opacity .18s ease; }
  #sidebar .rs-name { font-size: 13px; font-weight: 600; line-height: 16.25px; color: var(--sb-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #sidebar .rs-label { font-size: 11px; font-weight: 500; line-height: 13.75px; color: var(--sb-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 0; }
  #sidebar .rs-caret { width: 14px; height: 14px; flex: 0 0 14px; color: var(--sb-muted); }
  #sidebar .notif-bell-btn, #sidebar .theme-toggle {
    position: relative; display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; padding: 0; margin: 0;
    border: 0; border-radius: 9px; background: transparent; color: var(--sb-muted); cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
  }
  #sidebar .notif-bell-btn:hover, #sidebar .theme-toggle:hover { color: var(--sb-primary); background: transparent; }
  #sidebar .notif-bell-btn svg, #sidebar .theme-toggle svg { width: 18px; height: 18px; }
  #sidebar .notif-bell-badge {
    position: absolute; top: 3px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: var(--sb-primary); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
    box-shadow: 0 0 0 2px var(--sb-ring);
  }
  :root:not([data-theme="light"]) #sidebar .notif-bell-badge { color: #061014; }

  /* collapse toggle (reference .sidebarCollapseToggle) */
  #sidebar .sidebarCollapseToggle {
    position: absolute; top: 24px; right: -15px; z-index: 130;
    display: grid; place-items: center; width: 30px; height: 30px; padding: 0; margin: 0;
    border: 1px solid var(--sb-line); border-radius: 50%; background: var(--sb-bg); color: var(--sb-ink);
    box-shadow: 0 4px 12px rgba(15, 42, 52, .14); cursor: pointer;
    opacity: 0; transform: translateX(-4px);
    transition: opacity .18s ease, transform .18s ease, color .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
  }
  #sidebar .sidebarCollapseToggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  #sidebar:hover .sidebarCollapseToggle, #sidebar .sidebarCollapseToggle:hover, #sidebar .sidebarCollapseToggle:focus-visible { opacity: 1; transform: none; }
  #sidebar .sidebarCollapseToggle:hover { color: var(--sb-primary); border-color: var(--sb-primary); }

  /* collapsed rail (76px) */
  #sidebar.collapsed .sidebar-brand { justify-content: center; gap: 0; padding: 0 0 16px; }
  #sidebar.collapsed .sidebar-brand .brand-name { max-width: 0; opacity: 0; display: none; }
  #sidebar.collapsed .nav-section-label { display: none; }
  #sidebar.collapsed .nav-item { justify-content: center; gap: 0; width: 55px; height: 46px; margin: 0 auto; padding: 0; border-radius: 12px; }
  #sidebar.collapsed .nav-item > span:not(.nav-badge) { display: none; }
  #sidebar.collapsed .nav-item.active::before { left: -7px; }
  #sidebar.collapsed .sidebar-footer { padding-top: 12px; margin-top: auto; }
  #sidebar.collapsed .sidebar-footer-bottom { flex-direction: column; gap: 4px; align-items: center; }
  #sidebar.collapsed .role-switcher.identity-chip { flex: 0 0 auto; width: 55px; height: 48px; padding: 0; justify-content: center; border-radius: 12px; }
  #sidebar.collapsed .rs-info, #sidebar.collapsed .rs-caret { display: none; }
  #sidebar.collapsed .notif-bell-btn, #sidebar.collapsed .theme-toggle { width: 55px; border-radius: 12px; }
  #sidebar.collapsed #claudeUsageSidebarRoot { display: none; }
  #sidebar.collapsed .nav-item[data-tooltip]::after,
  #sidebar.collapsed .notif-bell-btn[data-tooltip]::after,
  #sidebar.collapsed .role-switcher[data-tooltip]::after {
    content: attr(data-tooltip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%) translateX(-4px);
    z-index: 120; pointer-events: none; opacity: 0; white-space: nowrap; padding: 7px 9px;
    border: 1px solid var(--sb-line); border-radius: 8px; background: var(--sb-bg); color: var(--sb-ink);
    font-size: 12.5px; font-weight: 600; box-shadow: 0 8px 24px rgba(15, 42, 52, .14); transition: opacity .15s ease, transform .15s ease;
  }
  #sidebar.collapsed .nav-item[data-tooltip]:hover::after,
  #sidebar.collapsed .notif-bell-btn[data-tooltip]:hover::after,
  #sidebar.collapsed .role-switcher[data-tooltip]:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* tablet/mobile keep the existing responsive rail/drawer; only colours + type follow V5 */
@media (max-width: 900px) {
  #sidebar { background: var(--sb-bg); color: var(--sb-ink); border-right: 1px solid var(--sb-line); }
  #sidebar .sidebar-brand .brandmark { display: grid; grid-template-columns: repeat(2, 11px); gap: 3px; width: 25px; flex: 0 0 25px; }
  #sidebar .sidebar-brand .brandmark i { display: block; height: 11px; border: 2px solid var(--sb-primary); border-radius: 4px; }
  #sidebar .sidebar-brand .brand-badge, #sidebar .sidebarCollapseToggle { display: none; }
  #sidebar .nav-item .nav-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  #sidebar .nav-item { color: var(--sb-muted); border-radius: 10px; font-weight: 600; }
  #sidebar .nav-item.active, #sidebar .nav-item:hover { background: var(--sb-active-bg); color: var(--sb-active-ink); }
  #sidebar .nav-section-label { color: var(--sb-muted); font-size: 10.5px; font-weight: 800; letter-spacing: 1.26px; }
}
@media (max-width: 700px) {
  body.mobile-nav-open #sidebar .sidebarCollapseToggle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #sidebar, #sidebar * { transition: none !important; }
}

/* ── precision pass (measured against the reference) ── */
#sidebar, #sidebar * { font-family: inherit; letter-spacing: normal; }
#sidebar .nav-section-label { letter-spacing: 1.26px; }
@media (min-width: 901px) {
  /* items must never be squeezed by the flex column — the nav scrolls instead */
  #sidebar .nav-item, #sidebar .nav-section-label { flex: 0 0 auto; }
  #sidebar .nav-item:hover, #sidebar .nav-item.active:hover { transform: none; }
  #sidebar .sidebar-brand .brand-name { max-width: none; flex: 0 1 auto; }
  /* footer row order: user · divider · notifications · theme (reference order) */
  #sidebar .sidebar-footer-bottom { flex-direction: row; }
  #sidebar .role-switcher.identity-chip { order: 1; }
  #sidebar .notif-bell-btn { order: 2; margin-left: 4px; }
  #sidebar .notif-bell-btn::before { content: ""; position: absolute; left: -6px; top: 7px; bottom: 7px; width: 1px; background: var(--sb-line); }
  #sidebar .theme-toggle { order: 3; }
  #sidebar.collapsed .notif-bell-btn::before { display: none; }
  #sidebar.collapsed .role-switcher.identity-chip { order: 0; }
}
#sidebar, #sidebar * { font-family: var(--app-font, Inter, 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif); }
@media (min-width: 901px) {
  #sidebar .nav-item.active .nav-icon { color: var(--sb-primary); }
  #sidebar.collapsed .sidebar-nav { gap: 6px; }
  #sidebar.collapsed .nav-item .nav-icon { width: 22px; height: 22px; flex: 0 0 22px; }
  #sidebar.collapsed .sidebar-footer-bottom { align-items: flex-start; }
  #sidebar.collapsed .notif-bell-btn { margin-left: 0; }
  #sidebar.collapsed .role-switcher.identity-chip, #sidebar.collapsed .notif-bell-btn, #sidebar.collapsed .theme-toggle { margin: 0; }
}
@media (min-width: 901px) {
  /* the collapse toggle straddles the sidebar edge: keep it above the page content */
  #sidebar { z-index: 60; }
}

/* group rhythm exactly as the reference: label padding only — no divider rule, no extra top margin */
#sidebar .nav-divider { display: none; }
#sidebar .sidebar-nav .nav-section-label { margin-top: 0 !important; }
/* the System/Administration groups are wrapped in a plain <div>; give them the same 2px item rhythm */
#sidebar .sidebar-nav div:not(.nav-divider) { display: flex; flex-direction: column; gap: 2px; }
#sidebar .sidebar-nav .nav-section-label:not(:first-child) { margin-top: 4px !important; }
#sidebar .sidebar-nav > .nav-section-label:first-child { margin-top: 0 !important; }

/* collapsed-rail tooltip (single fixed element, never clipped by the nav) */
#sbTip { position: fixed; z-index: 3000; pointer-events: none; opacity: 0; transform: translateX(-4px); white-space: nowrap; padding: 7px 10px; border: 1px solid #cddfe4; border-radius: 8px; background: #ffffff; color: #17252b; font: 600 12.5px/1.2 var(--app-font, Inter, system-ui, sans-serif); box-shadow: 0 8px 24px rgba(15, 42, 52, .14); -webkit-backdrop-filter: none; backdrop-filter: none; transition: opacity .14s ease, transform .14s ease; }
:root:not([data-theme="light"]) #sbTip { border-color: #22313b; background: #0d1116; color: #eff7f5; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
#sbTip.show { opacity: 1; transform: none; }
#sbTip[hidden] { display: none; }
#sidebar.collapsed .nav-item[data-tooltip]::after, #sidebar.collapsed .notif-bell-btn[data-tooltip]::after, #sidebar.collapsed .role-switcher[data-tooltip]::after { display: none; }

/* collapsed rail: section labels become thin dividers (reference .sidebar.collapsed nav span) */
@media (min-width: 901px) {
  #sidebar.collapsed .sidebar-nav .nav-section-label { display: block !important; height: 0 !important; min-height: 0; margin: 10px 14px !important; padding: 0 !important; border-top: 1px solid var(--sb-line); font-size: 0 !important; line-height: 0; overflow: hidden; letter-spacing: 0; }
  #sidebar.collapsed .sidebar-nav > .nav-section-label:first-child { display: none !important; }
}

/* Tablet/mobile rail (<=900px): the reference rail shows icons only — no section labels, no "New Project" shortcut */
@media (max-width: 900px) {
  body:not(.mobile-nav-open) #sidebar .nav-section-label, body:not(.mobile-nav-open) #sidebar .sidebar-new-project-btn { display: none; }
}

/* Tablet rail (701-900px): the account chip and bell stack inside the narrow rail instead of overflowing it
   (same treatment as the collapsed desktop rail); the chip still opens the Settings / Log out menu. */
@media (min-width: 641px) and (max-width: 900px) {
  #sidebar .sidebar-footer-bottom { flex-direction: column; align-items: center; gap: 6px; }
  #sidebar .role-switcher.identity-chip { flex: 0 0 auto; width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; }
  #sidebar .rs-info, #sidebar .rs-caret { display: none; }
  #sidebar .notif-bell-btn { width: 40px; border-radius: 12px; }
}

/* Phone (<=640px): the drawer keeps its shadow only while open (it leaked a dark band along the left edge),
   and page content starts below the fixed menu button instead of under it. */
@media (max-width: 640px) {
  #sidebar { box-shadow: none; }
  body.mobile-nav-open #sidebar { box-shadow: 2px 0 32px rgba(0, 0, 0, .5); }
  #viewProjects, #viewQueue, #viewApprovals, #viewSettings, #viewAdmin, #viewAccount, #viewNewProject, #viewSkillsPage, #viewMcpsPage { padding-top: 52px; }
}

/* Five-hour usage card (claude-usage-card.js) — compact, sits above the user row; hidden when the rail is collapsed. */
#sidebar .cuc-slot:empty { display: none; }
#sidebar .cuc-slot { padding: 0 0 10px; min-width: 0; }
#sidebar .cuc { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--sb-line); border-radius: 12px; background: var(--sb-active-bg); min-width: 0; }
#sidebar .cuc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
#sidebar .cuc-pct { font-size: 13px; font-weight: 800; color: var(--sb-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
#sidebar .cuc-acct { font-size: 11px; color: var(--sb-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#sidebar .cuc-bar { height: 6px; border-radius: 999px; background: var(--sb-line); overflow: hidden; }
#sidebar .cuc-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--sb-primary); transition: width .3s ease; }
#sidebar .cuc[data-tone="warm"] .cuc-bar > i { background: #d29922; }
#sidebar .cuc[data-tone="hot"] .cuc-bar > i { background: #e5484d; }
#sidebar .cuc-meta { font-size: 11px; color: var(--sb-muted); line-height: 1.35; }
#sidebar .cuc-noticeX { display: flex; align-items: flex-start; gap: 8px; margin-top: 2px; padding: 8px 8px 8px 10px; border-radius: 9px; border: 1px solid var(--sb-line); background: var(--sb-bg); font-size: 11px; line-height: 1.4; color: var(--sb-ink); }
#sidebar .cuc-notice span { flex: 1 1 auto; min-width: 0; }
#sidebar .cuc-notice a { color: var(--sb-primary); font-weight: 700; text-decoration: none; }
#sidebar .cuc-notice a:hover { text-decoration: underline; }
#sidebar .cuc-x { flex: 0 0 auto; width: 20px; height: 20px; border: 0; border-radius: 6px; background: transparent; color: var(--sb-muted); font-size: 16px; line-height: 1; cursor: pointer; }
#sidebar .cuc-x:hover { background: var(--sb-active-bg); color: var(--sb-ink); }
#sidebar .cuc-x:focus-visible, #sidebar .cuc-notice a:focus-visible { outline: 2px solid var(--sb-primary); outline-offset: 2px; }
#sidebar.collapsed .cuc-slot { display: none; }
#sidebar .cuc { position: relative; }
#sidebar .cuc-x { position: absolute; top: 6px; right: 6px; }
#sidebar .cuc-head { padding-right: 22px; }
#sidebar .cuc-note { font-size: 11px; color: var(--sb-muted); }
#sidebar .cuc-switch { display: flex; gap: 6px; align-items: center; min-width: 0; }
#sidebar .cuc-switch select { flex: 1 1 auto; min-width: 0; height: 28px; border: 1px solid var(--sb-line); border-radius: 8px; background: var(--sb-bg); color: var(--sb-ink); font-size: 11px; }
#sidebar .cuc-btn { flex: 0 0 auto; height: 28px; padding: 0 10px; border: 1px solid var(--sb-line); border-radius: 8px; background: var(--sb-bg); color: var(--sb-primary); font-size: 11px; font-weight: 700; cursor: pointer; }
#sidebar .cuc-btn:disabled { opacity: .6; cursor: default; }

/* Collapsed icon rail: the nav list is the only scroller here (.sidebar-nav, overflow-y:auto). On laptop heights it overflows, and a classic
   thick scrollbar appeared beside the icons. Hide the bar (not the scrolling): wheel, touchpad, touch and keyboard still scroll the list. */
#sidebar.collapsed .sidebar-nav { scrollbar-width: none; -ms-overflow-style: none; }
#sidebar.collapsed .sidebar-nav::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ── Themed thin scrollbars ────────────────────────────────────────────────────────────────────────────────────────────────────────────
   Root cause of the thick bright bar beside the expanded nav: .sidebar-nav set scrollbar-width:thin but no scrollbar-color, so Chromium
   (≥121, where the standard properties override ::-webkit-scrollbar) drew its native light-grey thumb on a white track. The page scrollers
   (.view-page) had the global 5px ::-webkit-scrollbar thumb in --border-subtle, which is almost invisible on the dark UI.
   Both now use one thin, theme-aware thumb on a transparent track. The collapsed rail keeps scrollbar-width:none (rule above). */
:root { --scr-thumb: rgba(142, 154, 165, .42); --scr-thumb-hover: rgba(142, 154, 165, .75); }
:root[data-theme="light"] { --scr-thumb: rgba(86, 106, 115, .42); --scr-thumb-hover: rgba(86, 106, 115, .72); }
#sidebar:not(.collapsed) .sidebar-nav,
:root .view-page,
:root .tab-panel { scrollbar-width: thin; scrollbar-color: var(--scr-thumb) transparent; }
#sidebar:not(.collapsed) .sidebar-nav:hover,
:root .view-page:hover,
:root .tab-panel:hover { scrollbar-color: var(--scr-thumb-hover) transparent; }
@supports not (scrollbar-width: thin) {
  #sidebar:not(.collapsed) .sidebar-nav::-webkit-scrollbar,
  :root .view-page::-webkit-scrollbar,
  :root .tab-panel::-webkit-scrollbar { width: 6px; height: 6px; }
  #sidebar:not(.collapsed) .sidebar-nav::-webkit-scrollbar-track,
  :root .view-page::-webkit-scrollbar-track,
  :root .tab-panel::-webkit-scrollbar-track { background: transparent; }
  #sidebar:not(.collapsed) .sidebar-nav::-webkit-scrollbar-thumb,
  :root .view-page::-webkit-scrollbar-thumb,
  :root .tab-panel::-webkit-scrollbar-thumb { background: var(--scr-thumb); border-radius: 999px; }
}
