/* ========================================================================== 
    ДВУХУРОВНЕВАЯ ЗАКРЕПЛЕННАЯ ШАПКА ДАТ 
   ========================================================================== */
.gantt-timeline-header {
  display: grid;
  grid-template-columns: 260px 1fr;
  border-bottom: 1px solid var(--polyus-border);
  background-color: var(--polyus-bg-card);
  position: sticky;
  top: 0;
  z-index: var(--gantt-z-sticky-header);
}

.gantt-header-label-cell {
  padding: 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  border-right: 1px solid var(--polyus-border);
  display: flex;
  align-items: center;
  background-color: var(--polyus-bg-card);
  position: sticky;
  left: 0;
  z-index: var(--gantt-z-sticky-label);
}

.gantt-header-periods-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.gantt-header-tier-years {
  display: flex;
  width: 100%;
  border-bottom: 1px solid rgba(44, 49, 54, 0.7);
  background-color: rgba(17, 19, 21, 0.4);
}

.gantt-year-cell {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  border-right: 1px solid var(--polyus-border);
  letter-spacing: 1px;
  box-sizing: border-box;
  flex-shrink: 0;
  flex-grow: 0;
}

.gantt-year-cell:last-child {
  border-right: none;
}

.gantt-header-tier-subperiods {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 4), 1fr);
  width: 100%;
}

.gantt-subperiod-cell {
  padding: 8px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-right: 1px solid var(--polyus-border);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  box-sizing: border-box;
}

.gantt-subperiod-cell:last-child {
  border-right: none;
}

.gantt-subperiod-cell .cell-dates {
  font-size: 9px;
  color: var(--polyus-gold);
  font-weight: normal;
}

/* Если у родителя активен класс сжатия, скрываем текстовый блок с датами */
.hide-timeline-dates .gantt-subperiod-cell .cell-dates {
  display: none;
}

/* Оптимизируем высоту ячеек, чтобы при скрытии дат шапка автоматически становилась тоньше */
.hide-timeline-dates .gantt-subperiod-cell {
  gap: 0;
  padding-top: 6px;
  padding-bottom: 6px;
}