.has-sidebar { --sidebar-width: 256px; }
.has-sidebar.sidebar-compact { --sidebar-width: 72px; }
.has-sidebar .topbar { height: 76px; padding: 10px 24px; flex-wrap: nowrap; gap: 14px; background: #fff; }
.top-actions { margin-left: auto; min-width: 0; }
.top-link { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.has-sidebar > main, .has-sidebar > .site-footer { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); }
.nav-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.sidebar { position: fixed; inset: 76px auto 0 0; width: var(--sidebar-width); padding: 20px 12px; background: #fff; border-right: 1px solid #eaeaec; z-index: 19; overflow-y: auto; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0 4px 16px 10px; color: #929299; font-size: 10px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.nav-collapse, .nav-close, .nav-mobile-toggle { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #777780; box-shadow: none; }
.nav-collapse:hover, .nav-close:hover, .nav-mobile-toggle:hover { color: #18181b; background: #f3f3f5; }
.nav-icon, .nav-chevron, .nav-control-icon { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.nav-icon { width: 20px; height: 20px; flex: 0 0 20px; color: #707078; }
.nav-control-icon { width: 19px; height: 19px; }
.nav-group { margin-bottom: 4px; }
.nav-group summary, .nav-entry { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 9px; color: #47474f; font-size: 13px; font-weight: 550; line-height: 1.4; cursor: pointer; text-decoration: none; }
.nav-group summary { list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-entry { margin-bottom: 4px; }
.nav-group summary:hover, .nav-entry:not(.nav-planned):hover { color: #18181b; background: #f5f5f7; }
.nav-group.is-active summary, .nav-entry[aria-current="page"] { color: #18181b; background: #ededf0; font-weight: 650; }
.nav-group.is-active .nav-icon, .nav-entry[aria-current="page"] .nav-icon { color: #18181b; }
.nav-text { min-width: 0; flex: 1; }
.nav-chevron { width: 14px; height: 14px; flex: 0 0 14px; margin-left: auto; color: #93939a; transition: transform .15s ease; }
.nav-group[open] .nav-chevron { transform: rotate(180deg); }
.nav-children { margin: 6px 0 10px 22px; padding: 0 0 0 14px; border-left: 1px solid #e4e4e8; }
.nav-children a, .nav-planned-child { position: relative; display: block; padding: 9px 10px; margin: 2px 0; border-radius: 7px; text-decoration: none; color: #707078; font-size: 12px; line-height: 1.5; font-weight: 500; }
.nav-children a:hover { color: #18181b; background: #f5f5f7; }
.nav-children a[aria-current="page"] { background: #f0f0f3; color: #18181b; font-weight: 650; }
.nav-children a[aria-current="page"]::before { content: ""; position: absolute; left: -17px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: #18181b; transform: translateY(-50%); }
.nav-settings { border-top: 1px solid #ededf0; padding-top: 12px; margin-top: 12px; }
.nav-planned, .nav-planned-child { color: #93939a; cursor: default; }
.nav-planned .nav-icon { color: #a2a2a9; }
.nav-planned .nav-text { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nav-entry small, .nav-planned-child small { display: inline-block; padding: 1px 6px; border: 1px solid #e9e9ed; border-radius: 5px; color: #92929a; font-size: 9px; font-weight: 500; white-space: nowrap; letter-spacing: 0; }
.nav-planned-child small { margin-left: 3px; }
.nav-tooltip, .nav-mobile-toggle, .nav-close { display: none; }
.sidebar :focus-visible, .nav-mobile-toggle:focus-visible { outline: 2px solid #96969f; outline-offset: 3px; }
@media (min-width: 981px) {
  .sidebar-compact .sidebar { overflow: visible; }
  .sidebar-compact .nav-text, .sidebar-compact .nav-chevron { display: none; }
  .sidebar-compact .sidebar-heading { justify-content: center; margin: 0 0 16px; }
  .sidebar-compact .nav-group summary, .sidebar-compact .nav-entry { justify-content: center; padding: 12px; }
  .sidebar-compact .nav-group { position: relative; }
  .sidebar-compact .nav-children { position: fixed; left: 78px; top: 88px; width: 240px; max-height: calc(100dvh - 108px); overflow-y: auto; margin: 0; padding: 8px; background: #fff; border: 1px solid #e7e7ec; border-radius: 12px; box-shadow: 0 10px 32px #18181b14; }
  .sidebar-compact .nav-children a[aria-current="page"]::before { display: none; }
  .sidebar-compact .nav-group:not([open]) summary:hover .nav-tooltip,
  .sidebar-compact .nav-group:not([open]) summary:focus-visible .nav-tooltip,
  .sidebar-compact .nav-entry:hover .nav-tooltip,
  .sidebar-compact .nav-entry:focus-visible .nav-tooltip { display: block; position: absolute; left: 59px; top: 8px; padding: 8px 12px; background: #27272a; color: #fff; border-radius: 7px; white-space: nowrap; font-size: 12px; font-weight: 500; box-shadow: 0 4px 14px #0001; }
  .sidebar-compact .nav-planned .nav-text { display: none; }
}
@media (max-width: 980px) {
  .has-sidebar > main, .has-sidebar > .site-footer { margin-left: 0; width: 100%; }
  .has-sidebar .topbar { padding: 10px 15px; }
  .nav-mobile-toggle, .nav-close { display: inline-flex; }
  .nav-collapse { display: none; }
  .sidebar { width: min(280px, 85vw); top: 0; z-index: 31; visibility: hidden; transform: translateX(-100%); }
  .drawer-open .sidebar { visibility: visible; transform: translateX(0); }
  .nav-backdrop:not([hidden]) { position: fixed; inset: 0; z-index: 30; border: 0; background: #18181b66; }
  .drawer-open { overflow: hidden; }
  .top-link { max-width: 100px; }
}
@media (max-width: 420px) { .has-sidebar .brand { font-size: 15px; gap: 6px; } .has-sidebar .topbar { gap: 6px; } .top-actions { gap: 2px; } .top-actions .ghost { padding: 9px; } .top-link { max-width: 70px; padding: 8px 4px; } }
@media (prefers-reduced-motion: reduce) { .nav-chevron { transition: none; } }
@media print { .sidebar, .nav-backdrop, .nav-mobile-toggle { display: none !important; } .has-sidebar > main, .has-sidebar > .site-footer { margin-left: 0; width: 100%; } }
