/* =====================================================
   TIMELINE - Gantt Chart Simplificado
   ===================================================== */

.timeline-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    overflow-x: auto;
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.timeline-title {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* ── Gantt Grid ── */
.gantt {
    position: relative;
    min-width: 700px;
}

.gantt__months {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-3);
    margin-left: 160px;
}

.gantt__month {
    flex: 1;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    text-align: center;
    font-weight: var(--fw-medium);
}

.gantt__month.current {
    color: var(--accent-hover);
    font-weight: var(--fw-semibold);
}

.gantt__rows {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.gantt__row {
    display: flex;
    align-items: center;
    height: 32px;
    transition: background var(--transition-fast);
    border-radius: var(--radius-sm);
    padding: 0 var(--space-2);
}

.gantt__row:hover {
    background: var(--bg-hover);
}

.gantt__row-label {
    width: 150px;
    min-width: 150px;
    font-size: var(--fs-xs);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.gantt__row-bar-area {
    flex: 1;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.gantt__bar {
    position: absolute;
    height: 20px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    padding: 0 var(--space-2);
    font-size: 10px;
    font-weight: var(--fw-semibold);
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    overflow: hidden;
    white-space: nowrap;
}

.gantt__bar:hover {
    filter: brightness(1.15);
    transform: scaleY(1.15);
    z-index: 2;
}

.gantt__bar--on-track {
    background: linear-gradient(90deg, var(--flag-on-track), #34D399);
}

.gantt__bar--in-process {
    background: linear-gradient(90deg, var(--flag-in-process), #FBBF24);
}

.gantt__bar--blocked {
    background: linear-gradient(90deg, var(--flag-blocked), #F87171);
}

.gantt__bar--completed {
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    opacity: 0.7;
}

.gantt__bar-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

/* ── Today Marker ── */
.gantt__today {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--flag-blocked);
    z-index: 3;
    opacity: 0.6;
}

.gantt__today::before {
    content: 'HOY';
    position: absolute;
    top: -20px;
    left: -12px;
    font-size: 9px;
    color: var(--flag-blocked);
    font-weight: var(--fw-bold);
    letter-spacing: 0.04em;
}

/* ── Grid Lines ── */
.gantt__gridlines {
    position: absolute;
    top: 0;
    left: 160px;
    right: 0;
    bottom: 0;
    display: flex;
    pointer-events: none;
}

.gantt__gridline {
    flex: 1;
    border-left: 1px solid var(--border-light);
}