/* Sidebar trái kiểu OMS (Phase 7.7): nền đặc tông tím đậm hợp tông hồng; chữ #efe3f2 trên #2a1733 (tương phản ≈ 13:1, AA). */
:root { --sb-w: 220px; --sb-w-min: 64px; --sb-bg: #2a1733; --sb-fg: #efe3f2; --sb-muted: #c9b3d1; --sb-active: #43254f; }
.shell { display: flex; min-height: 100vh; }
.shell-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sidebar { position: sticky; top: 0; height: 100vh; width: var(--sb-w); flex: none; background: var(--sb-bg); color: var(--sb-fg);
  display: flex; flex-direction: column; z-index: var(--z-header); overflow: hidden; transition: width .15s; }
html.sb-collapsed .sidebar { width: var(--sb-w-min); }
html.sb-collapsed .sb-label { display: none; }
.sb-top { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.sb-brand { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; text-decoration: none; overflow: hidden; white-space: nowrap; min-width: 0; }
.sb-brand img { height: 30px; width: auto; flex: none; }
.sb-toggle, .sb-close { margin-left: auto; flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .1); color: var(--sb-fg); cursor: pointer; font-size: 16px; }
.sb-toggle:hover, .sb-close:hover { background: rgba(255, 255, 255, .2); }
.sb-close { display: none; }
.sb-arrow::before { content: "«"; } html.sb-collapsed .sb-arrow::before { content: "»"; }
html.sb-collapsed .sb-top { justify-content: center; padding: 10px 6px; } html.sb-collapsed .sb-toggle { margin-left: 0; }
html.sb-collapsed .sb-brand { display: none; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; flex: 1 1 auto; overflow-y: auto; }
.sb-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-left: 3px solid transparent; border-radius: 8px;
  background: none; color: var(--sb-fg); text-decoration: none; font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; text-align: left; }
.sb-link:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.sb-link.active { background: var(--sb-active); color: #fff; border-left-color: var(--pink); }
.sb-ic { width: 22px; flex: none; text-align: center; font-size: 18px; line-height: 1; }
html.sb-collapsed .sb-link { padding: 10px 0; justify-content: center; border-left-width: 0; } html.sb-collapsed .sb-link.active { box-shadow: inset 3px 0 0 var(--pink); }
.sb-bottom { padding: 10px 8px 14px; border-top: 1px solid rgba(255, 255, 255, .1); }
.sb-user { display: flex; flex-direction: column; gap: 4px; padding: 4px 12px 10px; color: var(--sb-muted); font-size: 13px; }
.sb-user b { color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .role-chip { align-self: flex-start; background: rgba(255, 255, 255, .14); color: #ffd7e6; }
.sb-backdrop { display: none; }
.top-burger { display: none; }
/* Board co giãn theo phần còn lại: sidebar mở → bớt cột (đè board.css nhờ độ ưu tiên cao hơn); thu gọn → như cũ */
@media (min-width: 768px) and (max-width: 1799px) { html:not(.sb-collapsed) .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 768px) and (max-width: 1399px) { html:not(.sb-collapsed) .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) and (max-width: 1099px) { html:not(.sb-collapsed) .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Mobile: ngăn kéo trượt từ trái (--z-modal), nền mờ; luôn đầy đủ nhãn dù desktop đang thu gọn */
@media (max-width: 767px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: var(--sb-w) !important; transform: translateX(-102%); transition: transform .2s; z-index: calc(var(--z-modal) + 1); box-shadow: 0 0 30px rgba(0, 0, 0, .35); }
  html.sb-open .sidebar { transform: none; }
  html.sb-collapsed .sb-label, html.sb-collapsed .sb-brand { display: flex; } html.sb-collapsed .sb-user { display: flex; }
  html.sb-collapsed .sb-link { padding: 10px 12px; justify-content: flex-start; border-left-width: 3px; } html.sb-collapsed .sb-link.active { box-shadow: none; }
  html.sb-collapsed .sb-top { justify-content: flex-start; padding: 10px 12px; }
  .sb-toggle { display: none; } .sb-close { display: inline-flex; align-items: center; justify-content: center; }
  .sb-backdrop { position: fixed; inset: 0; background: rgba(30, 10, 40, .5); z-index: var(--z-modal); }
  html.sb-open .sb-backdrop { display: block; }
  .top-burger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 8px; background: var(--pink-soft); color: var(--pink); font-size: 20px; cursor: pointer; }
}
