/* ===================== SIDEBAR (.sb-) ===================== */
.sb-root { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--bg-elev); }
.sb-head { padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 12px; flex: none; }
.sb-head__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sb-head__title { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; }
.sb-head__actions { display: flex; gap: 2px; }
.sb-filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.sb-filters::-webkit-scrollbar { display: none; }
.sb-filters .kit-chip { flex: none; }

.sb-list { flex: 1; overflow-y: auto; padding: 4px 8px 16px; overscroll-behavior: contain; }
.sb-section__title { padding: 10px 10px 4px; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.sb-item { position: relative; display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r-md); cursor: pointer; transition: background var(--dur-fast); outline: none; }
.sb-item:hover { background: var(--hover); }
.sb-item:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.sb-item.is-active { background: var(--accent-soft); }
.sb-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sb-item__row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sb-item__title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-item.is-unread .sb-item__title { font-weight: 800; }
.sb-item__time { flex: none; font-size: var(--fs-xs); color: var(--text-3); }
.sb-item.is-unread .sb-item__time { color: var(--accent); font-weight: 700; }
.sb-item__flag { flex: none; color: var(--text-3); display: inline-flex; }
.sb-item__preview { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-item.is-unread .sb-item__preview { color: var(--text); font-weight: 600; }
.sb-item__preview.is-draft em { color: var(--danger); font-style: normal; font-weight: 600; }
.sb-item__badge { flex: none; display: inline-flex; }
.sb-item__dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.sb-item__more { flex: none; display: none; width: 24px; height: 24px; border-radius: 50%; color: var(--text-2); align-items: center; justify-content: center; }
.sb-item__more:hover { background: var(--surface-3); color: var(--text); }
@media (hover: hover) { .sb-item:hover .sb-item__more { display: inline-flex; } .sb-item:hover .sb-item__badge, .sb-item:hover .sb-item__dot { display: none; } }
.sb-item__labels { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.sb-label { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill); color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 16%, transparent); }
.sb-archived { display: flex; align-items: center; gap: 8px; width: calc(100% - 8px); margin: 8px 4px 0; padding: 10px 12px; border-radius: var(--r-md); color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; }
.sb-archived span { flex: 1; text-align: left; }
.sb-archived:hover { background: var(--hover); }

.sb-nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.sb-nav__item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); font-weight: 600; color: var(--text-2); text-align: left; }
.sb-nav__item:hover { background: var(--hover); color: var(--text); }
.sb-nav__item.is-active { background: var(--accent-soft); color: var(--accent); }
.sb-nav__ic { display: inline-flex; }
.sb-nav__label { flex: 1; }
.sb-nav__count { min-width: 24px; padding: 1px 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); background: var(--surface-3); color: var(--text-2); text-align: center; }
.sb-nav__count.is-hot { background: var(--danger); color: #fff; }
