/* ═══════════════════════════════════════════════════════════════════════════
   GANTT VIEW
   ═════════════════════════════════════════════════════════════════════════ */

.gantt-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* ── Controls ───────────────────────────────────────────────────────────── */
.gantt-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.gantt-period-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-transform: capitalize;
  flex: 1;
  text-align: center;
}

/* ── Scroll container ───────────────────────────────────────────────────── */
.gantt-scroll {
  flex: 1;
  overflow: auto;
}
.gantt-inner {
  display: flex;
  flex-direction: column;
}

/* ── Header rows ────────────────────────────────────────────────────────── */
.gantt-row-header {
  display: flex;
  align-items: stretch;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.gantt-months {
  display: flex;
}
.gantt-month-cell {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: capitalize;
  padding: 6px 8px;
  border-right: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

.gantt-days-header {
  display: flex;
}
.gantt-day-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  border-right: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
}
.gantt-day-head.weekend { background: rgba(255,255,255,0.02); }
.gantt-day-head.today   { background: rgba(124,92,191,0.15); }
.gantt-day-n {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}
.gantt-day-w {
  font-size: 9px;
  color: var(--text-dim);
  line-height: 1;
  margin-top: 2px;
}
.gantt-day-head.today .gantt-day-n { color: var(--accent); }

/* ── Label cell (sticky left) ───────────────────────────────────────────── */
.gantt-lbl-cell {
  width: 230px;
  min-width: 230px;
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 14px;
}

/* ── Body ───────────────────────────────────────────────────────────────── */
.gantt-body { position: relative; }

.gantt-today-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0.7;
  z-index: 4;
  pointer-events: none;
}
.gantt-today-line::before {
  content: '';
  position: absolute;
  top: 0;
  left: -4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.gantt-empty {
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Task rows ──────────────────────────────────────────────────────────── */
.gantt-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  height: 44px;
  cursor: pointer;
  transition: background 0.1s;
}
.gantt-row:hover { background: var(--bg-hover); }
.gantt-row:hover .gantt-lbl-cell { background: var(--bg-hover); }

.gantt-task-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gantt-task-sub {
  display: flex;
  gap: 2px;
  margin-top: 3px;
}
.gantt-av {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

/* ── Timeline ───────────────────────────────────────────────────────────── */
.gantt-timeline {
  position: relative;
  height: 44px;
  flex-shrink: 0;
}

.gantt-bg-cells {
  display: flex;
  height: 100%;
  position: absolute;
  inset: 0;
}
.gantt-cell {
  height: 100%;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.03);
}
.gantt-cell.weekend     { background: rgba(255,255,255,0.015); }
.gantt-cell.today-cell  { background: rgba(124,92,191,0.08); }

/* ── Bar ────────────────────────────────────────────────────────────────── */
.gantt-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
  z-index: 2;
  overflow: hidden;
  min-width: 8px;
}
.gantt-bar:hover {
  filter: brightness(1.15);
  transform: translateY(-50%) scaleY(1.08);
}
.gantt-bar.cl-left  { border-top-left-radius: 0;  border-bottom-left-radius: 0; }
.gantt-bar.cl-right { border-top-right-radius: 0; border-bottom-right-radius: 0; }

.gantt-bar-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
