/* Single navigation component. Shared DOM #primary-sidebar in index.html. */
.sidebar{position:fixed;inset:0 auto 0 0;z-index:500;height:100dvh;display:flex;flex-direction:column;gap:18px;width:var(--sidebar-width-collapsed);padding:16px 10px;background:var(--surface);color:var(--text-primary);border-right:1px solid var(--border-subtle);overflow:hidden;transition:width 160ms ease;visibility:visible;pointer-events:auto}
.sidebar .brand{display:flex;position:relative;align-items:center;gap:10px;min-width:0;flex:0 0 44px;height:44px}
.sidebar .brand-mark{width:38px;height:38px;min-width:38px;display:grid;place-items:center;border-radius:var(--control-radius);background:var(--surface);overflow:hidden}
.sidebar .brand-mark img{width:100%;height:100%;object-fit:contain}
.sidebar .brand strong{font-size:15px}.sidebar .brand span{font-size:11px;color:var(--text-secondary)}
.side-nav{display:flex;flex-direction:column;gap:4px;flex:1;min-height:0;overflow:auto;scrollbar-width:thin}
.sidebar :is(.nav-item,.nav-group-toggle,.nav-action-item){position:relative;width:100%;display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 10px;border:0;border-radius:var(--control-radius);background:transparent;color:var(--text-secondary);font-family:inherit;font-size:13px;font-weight:500;line-height:1.35;text-align:left;white-space:normal;box-shadow:none}
.sidebar .nav-group{display:block;min-width:0}.sidebar .nav-label{flex:1;opacity:1;transform:none;visibility:visible;font-size:13px;white-space:nowrap}
.sidebar :is(.nav-item,.nav-group-toggle,.nav-action-item):hover{background:var(--surface-muted);color:var(--text-primary)}
.sidebar .nav-icon{width:24px;height:24px;flex:0 0 24px;display:grid;place-items:center;color:var(--accent-info);background:transparent}
.sidebar .nav-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sidebar .nav-item.active,.sidebar .nav-group.has-active-view>.nav-group-toggle{background:var(--accent-soft);color:var(--accent-primary)}
.sidebar .nav-item.active .nav-icon,.sidebar .nav-group.has-active-view .nav-icon{color:var(--accent-primary)}
.sidebar .nav-chevron{margin-left:auto;transition:transform 140ms}.sidebar .nav-group.expanded>.nav-group-toggle .nav-chevron{transform:rotate(90deg)}
.sidebar .nav-children{display:none;position:static!important;width:auto!important;max-height:none!important;padding:4px 0 4px 12px;margin:2px 0 8px 12px;border:0;border-left:1px solid var(--border-subtle);box-shadow:none;background:transparent}
.sidebar .nav-group.expanded>.nav-children{display:flex;flex-direction:column;gap:2px}
.sidebar .nav-child-dot{display:none}.sidebar .nav-children .nav-icon{width:16px;flex-basis:16px}.sidebar .nav-children .nav-icon svg{width:16px;height:16px}
.sidebar .nav-badge{font-size:10px;border-radius:10px;padding:2px 5px;background:var(--surface-muted);color:var(--text-secondary)}
.sidebar-footer{border-top:1px solid var(--border-subtle);padding-top:12px;font-size:11px;color:var(--text-secondary)}
.sidebar-pin{display:grid;place-items:center;margin-left:auto;width:40px;min-width:40px;min-height:40px!important;border:0;border-radius:var(--control-radius);color:var(--text-secondary);background:transparent;opacity:1}
.sidebar-pin svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transform:rotate(35deg);transition:transform 160ms ease}
.sidebar-pin[aria-pressed=true]{background:var(--accent-soft);color:var(--accent-primary)}
.sidebar-pin[aria-pressed=true] svg{transform:rotate(0);fill:var(--accent-soft)}
.sidebar-pin:hover{background:var(--surface-muted)}
@media(min-width:761px){
 body .app-shell{grid-template-columns:var(--sidebar-width-collapsed) minmax(0,1fr)!important}
 body.sidebar-pinned .app-shell{grid-template-columns:var(--sidebar-width-expanded) minmax(0,1fr)!important}
 body .workspace{grid-column:2}
 body .sidebar:is(:hover,:has(:focus-visible)),body.sidebar-pinned .sidebar{width:var(--sidebar-width-expanded);padding:16px 10px;box-shadow:var(--shadow-soft)}
 body:not(.sidebar-pinned) .sidebar:not(:hover):not(:has(:focus-visible)) :is(.nav-label,.nav-chevron,.nav-badge,.nav-children,.sidebar-footer,.sidebar-pin,.brand>div:not(.brand-mark)){display:none!important}
 body .mobile-menu-toggle{display:none!important}
}
@media(max-width:760px){
 body .app-shell{grid-template-columns:minmax(0,1fr)!important}body .workspace{grid-column:1}
 body .sidebar{width:min(var(--sidebar-width-expanded),calc(100vw - 40px));padding:16px 10px;transform:translateX(-100%);z-index:2500}
 body.sidebar-mobile-open .sidebar{transform:translateX(0);box-shadow:var(--shadow-soft)}
 body .sidebar-pin{display:none}body .mobile-menu-toggle{display:inline-grid!important}
}
@media(prefers-reduced-motion:reduce){.sidebar,.sidebar *{transition:none!important}}
