/* @bchen/ui — sidebar layout * Uses only tokens defined in dist/tokens.css. * Companion to dist/tokens.css and dist/base.css. */ /* ── Desktop: two-column grid ─────────────────────────────────────────── */ @media (min-width: 768px) { body { display: grid; grid-template-columns: 200px 1fr; grid-template-rows: 1fr; } .mobile-header { display: none; } .sidebar { display: flex; flex-direction: column; height: 100vh; position: sticky; top: 0; border-right: var(--border); background: var(--bg); padding: 1rem 0; overflow-y: auto; } .app-body { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; } } /* ── Mobile: sidebar hidden, top bar shown ─────────────────────────────── */ @media (max-width: 767px) { .sidebar { display: none; } .mobile-header { display: flex; } .app-body { display: flex; flex-direction: column; flex: 1; } } /* ── Sidebar components ────────────────────────────────────────────────── */ .sidebar-brand { padding: 0 1rem 1rem; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; } .sidebar-brand a { text-decoration: none; color: var(--fg); } .sidebar-nav { display: flex; flex-direction: column; flex: 1; gap: 0.125rem; padding: 0 0.5rem; } .nav-link { padding: 0.5rem 0.75rem; border-radius: var(--radius); color: var(--fg); text-decoration: none; font-size: 14px; transition: background 0.1s ease; } .nav-link:hover, .nav-link:focus-visible { background: var(--bg-elevated); outline: none; } .nav-link.nav-active { font-weight: 600; background: var(--bg-elevated); color: var(--fg); } .sidebar-footer { padding: 1rem; display: flex; flex-direction: column; gap: 0.25rem; border-top: 1px solid var(--border-color); margin-top: auto; } .sidebar-user { font-size: 11px; color: var(--fg-muted); }