.gantt-panel {
    margin-top: 30px;
    font-family: Arial, sans-serif;
    font-size: 13px;
}

.gantt-header__empty {
    flex: 0 0 230px;     /* та же ширина, что и .gantt-row__label и .gantt-group-row__label */
    box-sizing: border-box;
}

/* Панель фильтров */
.gantt-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 15px;
}

.gantt-toolbar__group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gantt-toolbar__group label {
    font-size: 12px;
    color: #555;
}

.gantt-toolbar__group select {
    min-width: 170px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #d0d7de;
    background: #f5f9ff;
    box-sizing: border-box;
    outline: none;
    transition: background .15s ease, border-color .15s ease;
}

.gantt-toolbar__group select:focus {
    border-color: #3b82f6;
    background: #fff;
}

/* Легенда */
.gantt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.gantt-legend__item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #333;
}

.gantt-legend__color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* Контейнер диаграммы */
.gantt-container {
    width: 100%;
    overflow: auto;
    position: relative;
    background: #fff;
}

/* Шапка */
.gantt-header {
    display: flex;
    border-bottom: 1px solid #eee;
    width: fit-content;
}
.gantt-header__cell {
    text-align: center;
    border-left: 1px solid #eee;
    box-sizing: border-box;
    font-size: 11px;
    color: #444;
    flex: 0 0 auto; /* базовое значение, которое потом переопределяем в JS */
}

/* Группы и строки */
.gantt-group-row {
    display: flex;
    align-items: flex-start;   /* текст может быть в 2 строки */
    background: #f7f7f7;
    min-height: 24px;          /* минимум как было, но не фикс */
    border-bottom: 1px solid #e0e0e0;
    width: fit-content;
}

.gantt-group-row__label {
    flex: 0 0 230px;           /* та же ширина, что и .gantt-row__label */
    padding: 4px 6px;
    font-weight: 600;
    color: #333;
    box-sizing: border-box;
    white-space: normal;       /* разрешаем переносы */
    line-height: 1.3;
}

.gantt-group-row__line {
    height: 100%;
    box-sizing: border-box;
    background: #f7f7f7;
    border-bottom: 1px solid #e0e0e0;
}

.gantt-row {
    display: flex;
    align-items: center;
    height: 40px;
}

.gantt-row__label {
    flex: 0 0 230px;
    padding-right: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    font-size: 12px;
}

/* Сетка и бары */
.gantt-grid-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    border-left: 1px solid #f3f3f3;
}

.gantt-row__timeline {
    position: relative;
    height: 100%;
    border-bottom: 1px solid #f5f5f5;
}

.gantt-bar {
    position: absolute;
    top: 6px;
    height: 26px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform .1s ease, box-shadow .1s ease, opacity .1s ease;
}

.gantt-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    opacity: 0.95;
}

/* Цвета статусов */
.gantt-bar--planning  { background: #2196F3; }
.gantt-bar--execution { background: #4CAF50; }
.gantt-bar--completed { background: #9E9E9E; }
.gantt-bar--postponed { background: #FFC107; }
.gantt-bar--default   { background: #607D8B; }

/* Модалка */
.gantt-modal-overlay {
    display: none;
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.35);
    z-index: 9998;
}

.gantt-modal {
    display: none;
    position: fixed;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 18px 20px;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
    border-radius: 6px;
    z-index: 9999;
}
.gantt-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.gantt-modal__title {
    margin: 0;
    font-size: 16px;
}
.gantt-modal__close {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}
.gantt-modal__body {
    font-size: 13px;
}

/* Внутренний блок даты в шапке */
.gantt-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    margin: 5px;
}

.gantt-date__day {
    font-size: 12px;
    font-weight: 600;
}

.gantt-date__month {
    font-size: 10px;
    color: #888;
}

/* Выходные */
.gantt-header__cell--weekend {
    background: #faf5f5;
    color: #c0392b;
}

/* Сегодня */
.gantt-header__cell--today {
    background: #e8f0ff;
    border-bottom: 2px solid #3b82f6;
}

/* Граница начала месяца */
.gantt-header__cell--month-start {
    border-left: 2px solid #bbb;
}

.gantt-header-wrapper {
    display: flex;
    flex-direction: column;
}

.gantt-header-years {
    display: flex;
    border-bottom: 1px solid #ddd;
    background: #fafafa;
    font-size: 12px;
    font-weight: bold;
    color: #444;
    width: fit-content;
}

.gantt-header-year-cell {
    text-align: center;
    padding: 2px 0;
    border-left: 1px solid #ddd;
    box-sizing: border-box;
}

