/* css/admin_sidebar.css */
/* Боковая панель: структура и стиль как у основной панели */

/* Базовые переменные */
:root {
  --sidebar-w: 154px;
  --sidebar-bg: rgba(13, 13, 13, 0.30);
  --panel-border: #37393c;
  --gold: #cab170;
  --text: #fff;
  --muted: #a9acbc;
  --divider: rgba(130, 152, 171, .35);
}

/* Резерв слева под фиксированный сайдбар */
.admin-layout {
  padding-left: var(--sidebar-w) !important;
}

/* Сайдбар фиксированный и скроллится сам */
.ap-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--panel-border);
  box-shadow: 0 0 24px rgba(0, 0, 0, .08);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  isolation: isolate;
  /* свой стек наложения внутри */
  scrollbar-width: thin;
  /* scrollbar-gutter: stable; */
  -webkit-overflow-scrolling: touch;
}

.ap-sidebar::-webkit-scrollbar {
  width: 8px;
}

.ap-sidebar::-webkit-scrollbar-thumb {
  background: #2a2b2e;
  border-radius: 8px;
}

/* Внутренняя колонка */
.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 12px;
}

/* Логотип как «липкая» шапка */
.logo-wrapper {
  position: sticky;
  top: 0;
  isolation: isolate;
  z-index: 3;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* border-bottom: 1px solid rgba(55,57,60,.6); */
  background: #0e0e10;
  margin: -12px -12px 0 -12px;
  /* растянуть на всю ширину боковой */
  padding: 0 8px;
}

.logo-link {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.logo-img {
  width: 36px;
  height: 40px;
  display: block;
}

.logo-svg {
  width: 42px;
  height: 46px;
}

/* Секции */
.sidebar-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Заголовок секции */
.sidebar-section-title {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.sidebar-section-title.chat,
.sidebar-section-title.club, 
.sidebar-section-title.dic,
.sidebar-section-title.imp{
  color: var(--gold);
}

/* Блок секции */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Ссылки внутри секции (столбиком) */
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Ссылка-пункт меню */
.sidebar-link {
  display: flex;
  align-items: center;
  min-height: 28px;
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  font-weight: 300;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
}

.link-text {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  transition: background .2s;
}

.sidebar-link:hover .link-text {
  background: rgba(255, 255, 255, .12);
}

/* Активная ссылка */
.sidebar-link.active .link-text {
  background: rgba(255, 255, 255, .20);
}

/* Бейдж как в макете */
.badge {
  /* margin-left:6px; */
  width: 32px;
  background: var(--gold);
  color: #0e0e10;
  font-size: 10px;
  font-weight: 700;
  padding: 6px 6px;
  border-radius: 10px;
  line-height: 16px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Разделитель между блоками */
.sidebar-divider {
  align-self: stretch;
  margin: 4px 0;
}

.sidebar-section.club {
  margin-top: 0;
}

/* Подзаголовки групп (Main, Site, Chat, CMR) */
.sidebar-group-title {
  margin: 4px 0 0 0;
  padding: 18px 0 0 0;
  border-top: 1px solid rgba(255, 255, 255, .06);
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.1;
  letter-spacing: .08em;
  text-transform: uppercase;
  user-select: none;
}

/* Безопасная зона для скролла к якорям с учётом липкого лого */
.ap-sidebar {
  scroll-padding-top: 46px;
}

/* Адаптив: компактнее на низких экранах */
@media (max-height:700px) {
  .sidebar-section-title {
    font-size: 13px;
    height: 32px;
  }

  .sidebar-link {
    font-size: 13px;
  }
}