/* ==========================================================================
   Gantt Chart Tab — gantt.css
   ========================================================================== */

/* ── Gantt ────────────────────────────────────────────────── */
.gantt-wrapper {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  overflow: hidden;
}

/* ── Gantt header row ─────────────────────────────────────── */
.gantt-header-row {
  display: flex;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 0;
  z-index: 3;
}

.gantt-label-spacer {
  width: 200px;
  min-width: 200px;
  border-right: 1px solid #E2E8F0;
}

.gantt-weeks-header {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(var(--total-weeks), minmax(60px, 1fr));
  position: relative;
  min-width: 0;
}

.gantt-week-label {
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-right: 1px solid #F1F5F9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-today-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: #EF4444;
  z-index: 5;
  pointer-events: none;
}
.gantt-today-line::after {
  content: "Today";
  position: absolute;
  top: 0;
  left: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #EF4444;
  white-space: nowrap;
}

/* ── Gantt body ───────────────────────────────────────────── */
.gantt-body { overflow-x: auto; }

.gantt-team-section { border-bottom: 2px solid #E2E8F0; }
.gantt-team-section:last-child { border-bottom: none; }

.gantt-team-header {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.gantt-row {
  display: flex;
  align-items: center;
  min-height: 36px;
  border-bottom: 1px solid #F1F5F9;
}
.gantt-row:last-child { border-bottom: none; }
.gantt-row:hover { background: #F8FAFC; }

.gantt-row-label {
  width: 200px;
  min-width: 200px;
  padding: 6px 12px;
  border-right: 1px solid #E2E8F0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.epic-key-sm {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  color: #3B82F6;
  text-decoration: none;
}
a.epic-key-sm:hover { text-decoration: underline; }
.epic-sum-sm {
  font-size: 12px;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 172px;
}

.gantt-track {
  flex: 1;
  position: relative;
  height: 36px;
  min-width: 0;
}

.gantt-bar {
  position: absolute;
  top: 6px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: grab;
  min-width: 28px;
  padding: 0 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  transition: filter 0.15s;
  user-select: none;
}
.gantt-bar:hover { filter: brightness(1.1); }

.gantt-bar--dragging {
  cursor: grabbing;
  opacity: 0.85;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  transition: none;
  z-index: 10;
}

.gantt-bar--saving {
  cursor: wait;
  opacity: 0.6;
}

.gantt-bar--risk {
  outline: 2px solid #DC2626;
  outline-offset: 1px;
}

.gantt-due-marker {
  position: absolute;
  top: 4px;
  width: 2px;
  height: 28px;
  background: #F59E0B;
  border-radius: 1px;
  cursor: default;
}
.gantt-due-marker::before {
  content: "▼";
  position: absolute;
  top: -10px;
  left: -5px;
  font-size: 10px;
  color: #F59E0B;
}
