/* ==========================================================
   ANALYTICS FIXED LEFT SIDEBAR
========================================================== */

.analytics-page {
  position: relative;
}

.analytics-panel-shell {
  transition: margin-left .25s ease;
}

/* Додаємо відступ під відкритий сайдбар */
body:not(.analytics-sidebar-hidden) .analytics-panel-shell {
  margin-left: 285px;
}

/* Сам сайдбар */
.analytics-sidebar-fixed {
  position: fixed;
  top: 86px;              /* під navbar */
  left: 0;
  bottom: 0;
  width: 270px;

  z-index: 1020;

  background: linear-gradient(180deg, #071b3a 0%, #0b2f63 55%, #06152d 100%);
  box-shadow: 12px 0 35px rgba(7, 27, 58, .22);

  padding: 18px 14px;
  overflow-y: auto;

  transform: translateX(0);
  transition: transform .25s ease;
}

/* Шапка сайдбару */
.analytics-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;

  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;

  padding: 4px 6px 16px;
  margin-bottom: 12px;

  border-bottom: 1px solid rgba(255,255,255,.15);
}

/* Кнопка закрити */
.analytics-sidebar-close {
  width: 34px;
  height: 34px;

  border: 0;
  border-radius: 10px;

  background: rgba(255,255,255,.12);
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;
}

.analytics-sidebar-close:hover {
  background: #f4a100;
  color: #071b3a;
}

/* Навігація */
.analytics-sidebar-nav {
  display: flex !important;
  flex-direction: column;
  flex-wrap: nowrap !important;

  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.analytics-sidebar-nav .nav-item {
  width: 100%;
}

.analytics-sidebar-nav .nav-link {
  width: 100%;

  color: rgba(255,255,255,.78);
  background: transparent;

  border-radius: 14px;
  padding: 11px 14px;

  font-weight: 600;
  transition: all .2s ease;
}

.analytics-sidebar-nav .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,.10);
  transform: translateX(3px);
}

.analytics-sidebar-nav .nav-link.active {
  color: #071b3a;
  background: linear-gradient(135deg, #ffffff 0%, #f4a100 100%);
  box-shadow: 0 10px 24px rgba(244, 161, 0, .28);
}

/* Коли сайдбар схований */
body.analytics-sidebar-hidden .analytics-sidebar-fixed {
  transform: translateX(-100%);
}

body.analytics-sidebar-hidden .analytics-panel-shell {
  margin-left: 0;
}

/* Кнопка розгорнути */
.analytics-sidebar-open {
  position: fixed;
  top: 105px;
  left: 16px;

  width: 44px;
  height: 44px;

  border: 0;
  border-radius: 14px;

  background: #f4a100;
  color: #071b3a;

  display: none;
  align-items: center;
  justify-content: center;

  box-shadow: 0 10px 24px rgba(7, 27, 58, .25);
  z-index: 1030;
}

body.analytics-sidebar-hidden .analytics-sidebar-open {
  display: flex;
}

/* Мобільна версія */
@media (max-width: 991px) {
  body:not(.analytics-sidebar-hidden) .analytics-panel-shell {
    margin-left: 0;
  }

  .analytics-sidebar-fixed {
    width: 280px;
    top: 76px;
    z-index: 1050;
  }

  .analytics-sidebar-open {
    top: 90px;
    left: 12px;
  }
}