﻿.timeline-layout {
    display: block;
    min-height: 100%;
}

.timeline-card {
    min-height: 0;
    padding: 0;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.84), rgba(255,255,255,0.62));
    border: 1px solid rgba(72, 113, 159, 0.10);
    box-shadow: 0 14px 34px rgba(53, 55, 71, 0.06);
    overflow: hidden;
}

    .timeline-card .section-card-header {
        padding: 16px 16px 0;
        margin-bottom: 10px;
    }

.timeline-wrapper {
    padding: 0 16px 16px;
    overflow: auto;
}

.timeline-grid {
    display: grid;
    grid-template-columns: 340px minmax(700px, 1fr);
    grid-auto-rows: 40px;
    border: 1px solid rgba(53, 55, 71, 0.22);
    background: rgba(255,255,255,0.5);
}

.timeline-left,
.timeline-right {
    display: contents;
}

.timeline-header-left > .timeline-col,
.timeline-header-right > .timeline-week-cell {
    background: rgba(255,255,255,0.86);
    font-weight: 700;
    color: var(--surface-dark);
}

.timeline-row-left > .timeline-col,
.timeline-row-right > .timeline-bg-cell,
.timeline-row-right {
    background: rgba(255,255,255,0.46);
}

.timeline-col {
    display: flex;
    align-items: center;
    padding: 0 8px;
    border-right: 1px solid rgba(53, 55, 71, 0.22);
    border-bottom: 1px solid rgba(53, 55, 71, 0.22);
    font-size: 0.82rem;
    color: var(--text);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.col-number {
    width: 100%;
    justify-content: center;
}

.col-task {
    width: 100%;
}

.col-date,
.col-duration {
    width: 100%;
    justify-content: center;
}

.timeline-header-left {
    display: grid;
    grid-template-columns: 40px 1fr 56px 56px 58px;
}

.timeline-row-left {
    display: grid;
    grid-template-columns: 40px 1fr 56px 56px 58px;
}

.timeline-header-right,
.timeline-row-right {
    display: grid;
    position: relative;
}

.timeline-week-cell,
.timeline-bg-cell {
    border-right: 1px solid rgba(53, 55, 71, 0.16);
    border-bottom: 1px solid rgba(53, 55, 71, 0.22);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    color: var(--surface-dark);
    min-width: 24px;
}

.timeline-month {
    font-size: 0.62rem;
    line-height: 1;
}

.timeline-day {
    font-size: 0.72rem;
    line-height: 1.1;
}

.timeline-bar-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.timeline-bar {
    position: absolute;
    top: 8px;
    height: 24px;
    border-radius: 0;
    background: rgba(166, 210, 230, 0.95);
    border: 1px solid rgba(120, 170, 195, 0.8);
    box-shadow: none;
}

@media (max-width: 980px) {
    .timeline-grid {
        grid-template-columns: 340px minmax(900px, 1fr);
    }
}
