
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
}
.sidebar-container{
  position: relative;
  height: 100vh; 
}

.sidebar {
  width: 100px;
  background: #ffffff;
  border-radius: 0 10px 10px 0;
  box-shadow: 0 0 15px rgba(0,0,0,0.08);
  height: 100%;
  overflow-y: auto;
  transition: transform 0.25s ease;
}

/* Trạng thái THU GỌN: đẩy thanh vào bên trái */
.sidebar-container.collapsed .sidebar {
  transform: translateX(-220px);
}

/* NÚT TRƯỢT BÊN CẠNH */
.sidebar-toggle {
  position: absolute;
  top: 80px;
  left: 260px;
  transform: translateX(-50%);
  width: 28px;
  height: 64px;
  border-radius: 0 32px 32px 0;
  border: none;
  background: #1d4ed8;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: left 0.25s ease, transform 0.25s ease;
}

/* Khi THU GỌN thì nút kéo theo, và icon xoay lại */
.sidebar-container.collapsed .sidebar-toggle {
  left: 40px;
  transform: translateX(-50%) rotate(180deg);
}

.toggle-icon {
  font-size: 18px;
}

/* HEADER TAB */
.sidebar-header {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
}

.tab {
  flex: 1;
  padding: 10px 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: #4b5563;
}

.tab.active {
  background: #1d4ed8;
  color: #ffffff;
}

/* MENU CHÍNH */
.menu {
  padding: 10px;
}

.menu-item {
  margin-bottom: 8px;
}

/* Tiêu đề cấp 1 */
.menu-title,
.submenu-title {
  background: #e5f0ff;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.2s;
}

.menu-title:hover,
.submenu-title:hover {
  background: #d3e3ff;
}

/* Text để sau này có thể ẩn khi thu nhỏ nếu muốn */
.title-text {
  flex: 1;
}

/* ICON mũi tên */
.arrow {
  margin-left: 8px;
  transition: transform 0.2s;
}

/* Khi mở submenu thì quay mũi tên */
.menu-title.open .arrow,
.submenu-title.open .arrow {
  transform: rotate(90deg);
}

/* LIST CON (CẤP 2, CẤP 3) */
.submenu {
  list-style: none;
  margin: 4px 0 0 0;
  padding-left: 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

/* Khi mở */
.submenu.open {
  max-height: 500px; /* đủ lớn để chứa các item; cần thì tăng thêm */
}

/* item thường */
.submenu li {
  font-size: 13px;
  padding: 6px 0;
  color: #374151;
  cursor: pointer;
}

.submenu li:hover {
  color: #1d4ed8;
}

/* Cấp sâu hơn thụt vào thêm 1 chút */
.submenu.level-2 {
  padding-left: 18px;
}

.submenu.level-3 {
  padding-left: 22px;
}
