/* Timeline UX update: farbige Kalenderansicht, Umschalter und Abhängigkeitspfeile */
.timeline-actions { align-items: center; }
.timeline-control-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.segmented {
  display: inline-flex;
  align-items: center;
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: 12px;
  padding: 4px;
  gap: 2px;
}
.segmented button {
  border: 0;
  background: transparent;
  color: var(--on-surface-variant);
  border-radius: 9px;
  padding: 8px 11px;
  font-weight: 750;
}
.segmented button:hover { background: var(--surface-container-high); color: var(--on-surface); }
.segmented button.active { background: var(--primary); color: white; box-shadow: var(--shadow-1); }
.timeline-shell { display: grid; gap: 12px; }
.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  color: var(--on-surface-variant);
  font-size: 13px;
  font-weight: 700;
}
.legend-dot { width: 10px; height: 10px; border-radius: 99px; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.legend-dot.todo { background: var(--primary); }
.legend-dot.progress { background: var(--secondary); }
.legend-dot.waiting { background: var(--tertiary); }
.legend-dot.blocked { background: var(--error); }
.timeline-pro-wrap {
  background: var(--surface-container-lowest);
  border-radius: var(--radius);
  border: 1px solid var(--outline-variant);
  box-shadow: var(--shadow-1);
  min-height: calc(100vh - 240px);
}
.timeline-pro {
  min-width: max(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(290px, 330px) minmax(820px, 1fr);
  grid-template-rows: 64px auto;
}
.timeline-task-head,
.timeline-date-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface-container-low);
  border-bottom: 1px solid var(--outline-variant);
}
.timeline-task-head {
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: var(--on-surface-variant);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-right: 1px solid var(--outline-variant);
}
.timeline-date-head {
  display: grid;
  grid-template-columns: repeat(var(--tl-cols), minmax(0, 1fr));
}
.timeline-date-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 2px;
  border-left: 1px solid var(--outline-variant);
  background: var(--surface-container-low);
  color: var(--on-surface-variant);
  padding: 0 8px;
}
.timeline-date-col strong { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.timeline-date-col span { font-size: 11px; opacity: .85; }
.timeline-date-col.current {
  background: color-mix(in srgb, var(--primary) 16%, var(--surface-container-low));
  color: var(--primary);
}
.timeline-date-col.weekend { background: color-mix(in srgb, var(--surface-container-high) 50%, var(--surface-container-low)); }
.timeline-task-list {
  border-right: 1px solid var(--outline-variant);
  background: var(--surface-container-lowest);
}
.timeline-task-name {
  height: var(--tl-row-h);
  border-bottom: 1px solid var(--outline-variant);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
.timeline-task-name:hover { background: var(--surface-container-low); }
.timeline-task-copy { min-width: 0; }
.timeline-task-copy strong,
.timeline-task-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-task-copy small { color: var(--on-surface-variant); font-size: 12px; margin-top: 2px; }
.drag-dot { color: var(--outline); font-size: 18px; }
.dep-chips {
  margin-top: 6px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.dep-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 220px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-container-high);
  color: var(--on-surface-variant);
  font-size: 11px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dep-chip.open { background: var(--error-container); color: var(--error); }
.timeline-canvas {
  position: relative;
  overflow: hidden;
  background: var(--surface-container-lowest);
}
.timeline-grid-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--tl-cols), minmax(0, 1fr));
  pointer-events: none;
}
.timeline-grid-bg > span {
  border-left: 1px solid var(--outline-variant);
  background: transparent;
}
.timeline-grid-bg > span.current { background: color-mix(in srgb, var(--primary) 7%, transparent); }
.timeline-grid-bg > span.weekend { background: color-mix(in srgb, var(--surface-container-high) 28%, transparent); }
.timeline-lane {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--tl-row-h);
  border-bottom: 1px solid var(--outline-variant);
  pointer-events: none;
}
.timeline-bar-new,
.timeline-ghost {
  position: absolute;
  height: 34px;
  min-width: 46px;
  border-radius: 11px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  font-weight: 850;
  font-size: 12px;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  box-shadow: var(--shadow-1);
  z-index: 3;
}
.timeline-bar-new span:last-child { overflow: hidden; text-overflow: ellipsis; }
.timeline-bar-new.todo { background: var(--primary); color: white; }
.timeline-bar-new.progress { background: var(--secondary); color: white; }
.timeline-bar-new.review { background: var(--tertiary); color: white; }
.timeline-bar-new.waiting { background: color-mix(in srgb, var(--tertiary) 20%, var(--surface)); color: var(--tertiary); border-color: color-mix(in srgb, var(--tertiary) 38%, transparent); }
.timeline-bar-new.blocked,
.timeline-bar-new.delay { background: var(--error-container); color: var(--error); border-color: color-mix(in srgb, var(--error) 42%, transparent); }
.timeline-bar-new.done { background: var(--surface-container-high); color: var(--on-surface-variant); }
.timeline-ghost {
  background: transparent;
  border: 1px dashed var(--outline);
  opacity: .6;
  z-index: 2;
  min-width: 20px;
  padding: 0;
}
.timeline-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--error);
  z-index: 4;
  pointer-events: none;
}
.timeline-today-line span {
  position: absolute;
  top: 8px;
  left: 6px;
  background: var(--error);
  color: white;
  font-size: 10px;
  font-weight: 850;
  padding: 2px 6px;
  border-radius: 999px;
  box-shadow: var(--shadow-1);
}
.dependency-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.dep-arrow {
  fill: none;
  stroke: color-mix(in srgb, var(--primary) 55%, var(--outline));
  stroke-width: 2;
  stroke-dasharray: 0;
  vector-effect: non-scaling-stroke;
  opacity: .78;
}
.dep-arrow.open {
  stroke: var(--error);
  stroke-dasharray: 5 4;
  opacity: .9;
}
.dep-marker { fill: color-mix(in srgb, var(--primary) 65%, var(--outline)); }
.dep-arrow.open + .dep-marker { fill: var(--error); }

/* Dashboard Arbeitsfluss: Karten sauber umbrechen statt abgeschnitten/überlappend */
.cockpit-board { overflow: visible; }
.status-overview-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}
.status-overview-col {
  min-height: 176px;
  display: flex;
  flex-direction: column;
}
.status-task-list { flex: 1; }
.status-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  min-height: 62px;
}
.status-task span { min-width: 0; }
.status-task b {
  white-space: normal;
  overflow: hidden;
  text-overflow: unset;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.status-task small {
  white-space: normal;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.status-task i {
  padding-left: 8px;
  white-space: nowrap;
  align-self: start;
}
.status-overview-col .badge { margin-left: 8px; }

@media (max-width: 900px) {
  .timeline-pro { grid-template-columns: minmax(250px, 280px) minmax(720px, 1fr); }
  .timeline-control-group { width: 100%; }
  .segmented { overflow-x: auto; max-width: 100%; }
  .timeline-task-copy strong, .timeline-task-copy small { white-space: normal; }
}

