/* ───── Sidebar groups ───── */
.nav-group { margin-bottom: 2px; }

.nav-group__heading {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 12px 18px 8px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  /* Хорошо видный светло-серый на тёмном фоне sidebar */
  color: #cbd5e1;
  user-select: none;
  transition: color 0.15s;
}
.nav-group__heading:hover {
  color: #ffffff;
}
.nav-group__title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.nav-group__chevron {
  font-size: 18px !important;
  transition: transform 0.2s ease;
  opacity: 0.7;
  color: #cbd5e1;
}
.nav-group__heading:hover .nav-group__chevron { opacity: 1; }

/* Когда группа свёрнута */
.nav-group.collapsed .nav-group__chevron { transform: rotate(-90deg); }
.nav-group.collapsed .nav-group__items {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  margin-bottom: 0;
}

.nav-group__items {
  max-height: 600px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

/* Тонкая разделительная линия между группами */
.nav-group + .nav-group .nav-group__heading {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
  padding-top: 14px;
}

/* Активная группа: жёлтый заголовок */
.nav-group.has-active .nav-group__title {
  color: #FFC107;
}
.nav-group.has-active .nav-group__chevron {
  color: #FFC107;
}

/* ───── Скрытые группы и пункты (по выбору пользователя) ───── */
.nav-group.user-hidden,
.nav-item.user-hidden {
  display: none !important;
}

/* «Настроить меню» — кнопка в footer */
.sidebar__customize-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  transition: all 0.15s;
  font-family: inherit;
}
.sidebar__customize-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 193, 7, 0.4);
  color: #FFC107;
}
.sidebar__customize-btn i { font-size: 18px !important; }

/* ───── Модал «Настроить меню» ───── */
.menu-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: menuFade 0.18s ease;
}
@keyframes menuFade { from { opacity: 0; } to { opacity: 1; } }

.menu-modal {
  background: #0f1419;
  color: #e5e7eb;
  border-radius: 16px;
  max-width: 540px; width: 100%;
  max-height: 86vh; overflow-y: auto;
  border: 1px solid rgba(255, 193, 7, 0.2);
  padding: 24px;
  position: relative;
}

.menu-modal h3 {
  margin: 0 0 6px;
  font-size: 18px; font-weight: 800;
  color: #fff;
}
.menu-modal .menu-modal__hint {
  color: #94a3b8; font-size: 13px; margin-bottom: 18px;
}

.menu-modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06); color: #fff;
  border: 0; cursor: pointer; font-size: 20px;
}
.menu-modal__close:hover { background: rgba(239,68,68,0.4); }

.menu-group {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}
.menu-group__head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.menu-group__head label {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 700;
  color: #fff;
  cursor: pointer;
}
.menu-group__items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.menu-group__items label {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
  font-size: 13px;
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.15s;
}
.menu-group__items label:hover { background: rgba(255,193,7,0.08); color: #FFC107; }

.menu-group__items input[type="checkbox"],
.menu-group__head input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #FFC107;
  cursor: pointer;
}

.menu-modal__actions {
  display: flex; gap: 8px; justify-content: space-between;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.menu-modal__btn {
  padding: 10px 18px;
  border-radius: 8px; border: 0;
  font-family: inherit; font-weight: 700; font-size: 13px;
  cursor: pointer; transition: all 0.15s;
}
.menu-modal__btn-yellow { background: #FFC107; color: #000; }
.menu-modal__btn-yellow:hover { background: #B8860B; color: #fff; }
.menu-modal__btn-ghost { background: transparent; color: #cbd5e1; border: 1px solid rgba(255,255,255,0.1); }
.menu-modal__btn-ghost:hover { background: rgba(255,255,255,0.05); }

@media (max-width: 540px) {
  .menu-group__items { grid-template-columns: 1fr; }
}
