.tt-planning-timeline { color: var(--text-main, #0f172a); background: var(--bg-secondary, #fff); border: 1px solid var(--border-color, #e2e8f0); border-radius: 12px; padding: 16px; font-family: var(--font-sans, system-ui, sans-serif); }
.tt-planning-timeline * { box-sizing: border-box; }
.tt-timeline-help { color: var(--text-medium, #475569); font-size: .85rem; margin: 0 0 8px; }
.tt-timeline-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .8rem; margin: 12px 0; }
.tt-timeline-legend span { padding: 3px 10px; border: 2px solid currentColor; border-radius: 5px; }
.tt-timeline-legend .tt-status-planned { border-style: dotted; }
.tt-timeline-legend .tt-status-tentative { border-style: dashed; }
.tt-timeline-scroll { overflow: auto; max-height: 560px; border: 1px solid var(--border-color, #e2e8f0); border-radius: 8px; }
.tt-timeline-grid { --tt-name-width: 220px; width: calc(var(--tt-name-width) + var(--tt-days-width)); }
.tt-timeline-header, .tt-timeline-row { display: grid; grid-template-columns: var(--tt-name-width) var(--tt-days-width); min-height: 52px; }
.tt-timeline-header { position: sticky; top: 0; z-index: 5; background: var(--bg-secondary, #fff); }
.tt-timeline-name { position: sticky; left: 0; z-index: 3; display: flex; align-items: center; border: 0; border-right: 1px solid var(--border-color, #e2e8f0); border-bottom: 1px solid var(--border-color, #e2e8f0); padding: 8px 12px; background: var(--bg-secondary, #fff); color: inherit; font: inherit; font-size: .85rem; text-align: left; overflow-wrap: anywhere; }
button.tt-timeline-name { cursor: pointer; }
.tt-kind-phase .tt-timeline-name { padding-left: 22px; }
.tt-kind-demand .tt-timeline-name { padding-left: 34px; }
.tt-selected .tt-timeline-name { background: var(--primary-glow, #eef2ff); box-shadow: inset 3px 0 var(--primary, #4f46e5); }
.tt-timeline-dates { display: flex; }
.tt-timeline-date { flex: 0 0 var(--tt-day-width); position: relative; padding-top: 28px; text-align: center; font-size: 10px; border-right: 1px solid var(--border-color, #e2e8f0); }
.tt-timeline-date[data-month]::before { content: attr(data-month); position: absolute; top: 4px; left: 4px; font-size: 11px; white-space: nowrap; z-index: 1; }
.tt-day-off { background: var(--bg-tertiary, #f1f5f9); }
.tt-timeline-track { position: relative; min-height: 52px; border-bottom: 1px solid var(--border-color, #e2e8f0); background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(var(--tt-day-width) - 1px), var(--border-color, #e2e8f0) calc(var(--tt-day-width) - 1px), var(--border-color, #e2e8f0) var(--tt-day-width)), var(--tt-offday-background, none); }
.tt-timeline-bar { --tt-tone: #4338ca; position: absolute; display: flex; top: 9px; height: 34px; min-width: 0; color: #fff; background: var(--tt-tone); border: 2px solid var(--tt-tone); border-radius: 7px; z-index: 1; }
.tt-timeline-bar.tt-status-planned { border-style: dotted; border-color: #fff; outline: 1px solid var(--tt-tone); }
.tt-timeline-bar.tt-status-tentative { border-style: dashed; border-color: #fff; outline: 1px solid var(--tt-tone); }
.tt-tone-teal { --tt-tone: #0f766e; } .tt-tone-amber { --tt-tone: #92400e; } .tt-tone-rose { --tt-tone: #be123c; } .tt-tone-slate { --tt-tone: #475569; }
.tt-timeline-bar button { border: 0; padding: 0; min-width: 0; color: inherit; background: transparent; font: inherit; touch-action: none; }
.tt-timeline-move { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: grab; font-size: .8rem !important; }
.tt-timeline-grip { flex: 0 0 8px; cursor: ew-resize; font-size: 12px !important; }
.tt-timeline-bar.tt-readonly .tt-timeline-move { cursor: default; }
.tt-timeline-bar.tt-readonly .tt-timeline-grip { visibility: hidden; }
.tt-timeline-bar button:disabled { cursor: default; }
.tt-timeline-bar[aria-busy="true"] { opacity: .65; }
.tt-timeline-editor { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-top: 16px; }
.tt-timeline-editor strong { flex-basis: 100%; }
.tt-timeline-editor label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; }
.tt-timeline-editor input { min-height: 40px; padding: 6px 10px; border: 1px solid var(--border-color, #e2e8f0); border-radius: 6px; background: var(--bg-primary, #f8fafc); color: inherit; font: inherit; }
.tt-timeline-editor button { min-height: 40px; padding: 6px 12px; border: 1px solid var(--border-color, #e2e8f0); border-radius: 6px; cursor: pointer; font: inherit; }
.tt-timeline-editor .btn-primary { color: #fff; background: var(--primary, #4f46e5); }
.tt-timeline-editor .btn-secondary { color: inherit; background: var(--bg-secondary, #fff); }
.tt-timeline-editor :disabled { opacity: .65; cursor: default; }
.tt-planning-timeline :focus-visible { outline: 3px solid var(--primary, #4f46e5); outline-offset: 3px; }
.tt-timeline-bar :focus-visible { outline-color: #fbbf24; }
.tt-timeline-message { min-height: 1.5em; font-size: .85rem; margin: 12px 0 0; }
.tt-timeline-message[data-state="error"], .tt-timeline-message[data-state="conflict"] { color: var(--danger, #be123c); }
@media (max-width: 600px) { .tt-planning-timeline { padding: 10px; } .tt-timeline-grid { --tt-name-width: 150px; } .tt-timeline-editor label { flex: 1 1 140px; } .tt-timeline-editor input { width: 100%; } }


