/* ==========================================================================
   Timeline / Gantt View - Executive Dynamic Day Grid
   ========================================================================== */

.gantt-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* GANTT TOP TOOLBAR & LEGEND */
.gantt-top-toolbar {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(15, 18, 26, 0.6);
  flex-shrink: 0;
}

.gantt-legend-list {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: var(--text-muted);
}

.gantt-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

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

/* SCROLLABLE MAIN GANTT VIEWPORT */
.gantt-scroll-viewport {
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  position: relative;
}

/* HEADER ROW */
.gantt-grid-header {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #121520;
  border-bottom: 1px solid var(--border-medium);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.gantt-left-col-header {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  position: sticky;
  left: 0;
  z-index: 12;
  background: #121520;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gantt-days-track {
  display: flex;
  flex: 1;
  width: 100%;
  position: relative;
}

.gantt-day-cell {
  flex: 1 1 0;
  min-width: 44px;
  text-align: center;
  padding: 6px 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.gantt-day-cell.is-today {
  background: rgba(56, 189, 248, 0.12);
  border-bottom: 2px solid #38bdf8;
}

.gantt-day-cell.is-weekend {
  background: rgba(0, 0, 0, 0.2);
}

.gantt-day-dow {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-dim);
}

.gantt-day-num {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
}

.gantt-day-cell.is-today .gantt-day-num {
  color: #38bdf8;
}

/* BODY ROWS */
.gantt-grid-body {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.gantt-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background-color var(--anim-fast);
  min-height: 48px;
  height: 48px;
  width: 100%;
}

.gantt-row:hover {
  background-color: rgba(255, 255, 255, 0.025);
}

.gantt-row-left {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  padding: 6px 14px;
  position: sticky;
  left: 0;
  z-index: 8;
  background: var(--bg-card);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
}

.gantt-row:hover .gantt-row-left {
  background: #171b26;
}

.gantt-row-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.gantt-row-sub {
  font-size: 10.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-row-bars-track {
  flex: 1;
  width: 100%;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

/* BACKGROUND GRID LINES BEHIND BARS */
.gantt-grid-background {
  position: absolute;
  inset: 0;
  display: flex;
  pointer-events: none;
  width: 100%;
}

.gantt-grid-bg-col {
  flex: 1 1 0;
  min-width: 44px;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  height: 100%;
}

.gantt-grid-bg-col.is-weekend {
  background: rgba(0, 0, 0, 0.12);
}

.gantt-grid-bg-col.is-today {
  background: rgba(56, 189, 248, 0.04);
}

/* TODAY VERTICAL LINE (CLEAN BOLD CYAN MARKER) */
.gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.5px;
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  z-index: 6;
  pointer-events: none;
}

/* GANTT BAR WITH PROGRESS FILL */
.gantt-bar-item {
  position: absolute;
  height: 28px;
  border-radius: var(--radius-xs);
  background: rgba(30, 36, 51, 0.95);
  border: 1px solid var(--border-medium);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 4;
  cursor: pointer;
  transition: transform var(--anim-fast), box-shadow var(--anim-fast), border-color var(--anim-fast);
}

.gantt-bar-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  z-index: 7;
}

.gantt-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: var(--radius-xs) 0 0 var(--radius-xs);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gantt-bar-item.status-done .gantt-bar-fill {
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: var(--radius-xs);
}

.gantt-bar-item.status-done {
  border-color: rgba(16, 185, 129, 0.4);
}

.gantt-bar-item.status-running .gantt-bar-fill {
  background: linear-gradient(90deg, #d4af37, #f59e0b);
}

.gantt-bar-item.status-running {
  border-color: rgba(212, 175, 55, 0.4);
}

.gantt-bar-item.status-overdue {
  border-color: rgba(244, 63, 94, 0.6);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.25);
}

.gantt-bar-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 8px;
  gap: 6px;
  font-size: 11px;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  overflow: hidden;
}

.gantt-bar-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-bar-pct {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}
