/* v5.23.8 - Timeline/Ressourcenplanung: Scrollstabilitaet, grosse Resize-Griffe und erledigte Aufgaben sperren */
.timeline-scroll-control {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--outline-variant);
  border-radius: 12px;
  background: var(--surface-container-low);
  color: var(--on-surface-variant);
  font-size: 12px;
  font-weight: 800;
}
.timeline-scroll-control input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: var(--primary);
  cursor: ew-resize;
}
.timeline-scroll-control input[type="range"]:disabled {
  opacity: .4;
  cursor: default;
}
.resource-scroll-control {
  position: sticky;
  left: 0;
  z-index: 14;
  margin: 0 0 8px;
}
.timeline-pro-wrap,
.resource-planner-v2 .resource-calendar-main,
.resource-planner-v2 .occupancy-week,
.resource-planner-v2 .occupancy-day,
.resource-planner-v2 .occupancy-month {
  scrollbar-gutter: stable both-edges;
  overscroll-behavior: contain;
  scroll-behavior: auto;
}
.timeline-resize-handle {
  width: 18px !important;
  opacity: .9;
  touch-action: none;
  pointer-events: auto;
}
.timeline-resize-handle.start { left: -2px; }
.timeline-resize-handle.end { right: -2px; }
.timeline-resize-handle::after {
  top: 6px;
  bottom: 6px;
  width: 4px;
  opacity: .85;
}
.timeline-bar-new.locked,
.timeline-bar-new.done.locked {
  cursor: default !important;
  opacity: .74;
}
.timeline-bar-new.locked[draggable="false"] {
  -webkit-user-drag: none;
  user-select: none;
}
.timeline-task-name.done-row {
  background: color-mix(in srgb, var(--surface-container-high) 58%, transparent);
  color: var(--on-surface-variant);
}
.timeline-task-name.done-row .drag-dot {
  color: color-mix(in srgb, var(--on-surface-variant) 55%, transparent);
}
.portfolio-child-row.done-row .timeline-task-copy strong {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--on-surface-variant) 55%, transparent);
}
.resource-planner-v2 .resource-resize-handle {
  width: 18px !important;
  min-width: 18px;
  opacity: .62;
  background: color-mix(in srgb, var(--surface-container-high) 50%, transparent);
  pointer-events: auto;
}
.resource-planner-v2 .resource-resize-handle.left { left: -2px; }
.resource-planner-v2 .resource-resize-handle.right { right: -2px; }
.resource-planner-v2 .resource-resize-handle::after {
  top: 7px;
  bottom: 7px;
  width: 4px;
  opacity: .9;
}
.resource-planner-v2 .occupancy-chip:hover .resource-resize-handle,
.resource-planner-v2 .occupancy-chip:focus-visible .resource-resize-handle,
.resource-planner-v2 .occupancy-chip.resizing .resource-resize-handle {
  opacity: 1;
}
.resource-planner-v2 .occupancy-chip.done {
  cursor: default !important;
}
.resource-resizing,
.timeline-resizing {
  overflow-anchor: none;
}
@media (max-width: 760px) {
  .timeline-scroll-control {
    grid-template-columns: 1fr;
  }
}


/* Skills: kompaktere Liste ohne doppelte Gruppen-Auswahl in den Skill-Zeilen */
.skill-admin {
  gap: 8px;
}
.skill-filterbar {
  margin-bottom: 8px;
}
.skill-group {
  border-radius: 14px;
}
.skill-group-head {
  padding: 7px 8px !important;
  gap: 6px !important;
  grid-template-columns: auto auto minmax(150px, 1fr) 44px auto auto !important;
}
.skill-group-head .input,
.skill-def-main .input,
.skill-def-main .select,
.skill-level-select {
  min-height: 30px;
}
.skill-group-head .badge {
  padding: 3px 7px;
}
.skill-list-admin {
  gap: 5px;
  padding: 7px 8px 8px;
}
.skill-def-row {
  gap: 4px;
  padding: 5px 6px;
  border-radius: 10px;
}
.skill-def-main {
  grid-template-columns: auto minmax(130px, 1fr) 42px auto !important;
  gap: 6px;
}
.skill-def-main .drag-handle {
  font-size: 20px;
}
.skill-def-main .color-mini,
.skill-group-head .color-mini {
  min-width: 42px;
  width: 42px;
  height: 30px;
  padding: 2px;
}
.skill-assign summary {
  padding: 2px 4px;
  font-size: 12px;
  line-height: 1.25;
}
.skill-member-grid.with-levels {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 5px;
  margin-top: 5px;
}
.skill-pick-list {
  gap: 5px;
  padding: 6px;
  max-height: 260px;
}
.skill-pick-list.with-levels {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.skill-pick-row,
.skill-member-row {
  grid-template-columns: minmax(0, 1fr) minmax(112px, auto);
  gap: 6px;
  padding: 5px 6px;
  border-radius: 10px;
}
.skill-pick-check,
.skill-member-person {
  gap: 5px;
  font-size: 13px;
}
.skill-level-select {
  min-height: 28px;
  padding: 3px 6px;
  font-size: 11px;
}
.member-skill-tag {
  padding: 3px 5px;
}
@media (max-width: 760px) {
  .skill-def-main {
    grid-template-columns: auto minmax(0, 1fr) 42px auto !important;
  }
}

/* v5.23.10 - Kanban: manuelle Reihenfolge per Drag & Drop und Fallback-Buttons */
.kanban-card-top {
  align-items: center;
  gap: 8px;
}
.kanban-card-badges {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.kanban-order-controls {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  cursor: default;
}
.kanban-drag-handle {
  color: var(--on-surface-variant);
  font-size: 20px;
  cursor: grab;
  opacity: .72;
}
.task-card:hover .kanban-drag-handle,
.task-card:focus-within .kanban-drag-handle {
  opacity: 1;
  color: var(--primary);
}
.kanban-order-controls .btn.tiny {
  width: 25px;
  height: 25px;
  min-height: 25px;
  padding: 0;
}
.kanban-order-controls .material-symbols-outlined {
  font-size: 18px;
}
.task-card.dragging {
  opacity: .55;
  outline: 2px dashed color-mix(in srgb, var(--primary) 50%, transparent);
  outline-offset: 2px;
}
.task-card.kanban-drop-before,
.task-card.kanban-drop-after {
  position: relative;
}
.task-card.kanban-drop-before::before,
.task-card.kanban-drop-after::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  height: 4px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent);
  pointer-events: none;
}
.task-card.kanban-drop-before::before {
  top: -8px;
}
.task-card.kanban-drop-after::after {
  bottom: -8px;
}
.kanban-task-list.drag-over-empty,
.kanban-column.drag-over .kanban-task-list:empty {
  outline: 2px dashed var(--primary);
  outline-offset: -6px;
}


/* Eingefügte Screenshots in Beschreibung, Notizen und Subtasks */
.image-paste-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  line-height: 1.25;
}
.image-paste-hint .material-symbols-outlined {
  font-size: 16px;
}
textarea[data-image-paste] {
  min-height: 92px;
}
textarea[data-image-paste].image-paste-processing {
  outline: 2px solid color-mix(in srgb, var(--primary), transparent 35%);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--primary), transparent 94%);
}
.inline-screenshot-figure {
  margin: 10px 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface), white 60%);
  box-shadow: var(--shadow-soft);
}
.inline-screenshot-figure a {
  display: block;
}
.inline-screenshot {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--border), transparent 25%);
  background: #fff;
  cursor: zoom-in;
}
.inline-screenshot-figure figcaption {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}
.note-text,
.viewer-text,
.inline-rich-preview {
  overflow-wrap: anywhere;
}
.inline-rich-preview {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.note-card .inline-screenshot-figure {
  margin-bottom: 0;
}

/* Kundenfix: Subtasks direkt in der Ansicht hinzufügen + bearbeitete Karten sichtbar halten */
.subtask-section-head {
  margin-bottom: 8px;
}
.subtask-quick-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: -2px 0 12px;
  padding: 8px;
  border: 1px dashed color-mix(in srgb, var(--primary) 34%, var(--outline-variant));
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 5%, var(--surface-container-lowest));
}
.subtask-quick-add.compact {
  padding: 7px;
  margin-bottom: 10px;
}
.subtask-quick-add .input {
  min-height: 34px;
  height: 34px;
}
.subtask-quick-add .btn {
  white-space: nowrap;
  min-height: 34px;
}
.subtask-locked-hint {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  margin: 0 0 10px;
}
.task-card.is-recent,
.task-focus-flash {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 14%, transparent), var(--shadow-2) !important;
}
.task-focus-flash {
  animation: taskFocusFlash 1.6s ease-out 1;
}
@keyframes taskFocusFlash {
  0% { transform: translateY(-2px); }
  45% { transform: translateY(0); }
  100% { transform: none; }
}
@media (max-width: 640px) {
  .subtask-quick-add { grid-template-columns: 1fr; }
  .subtask-quick-add .btn { justify-content: center; }
}
.avatar.muted-avatar { background: var(--surface-container-high); color: var(--on-surface-variant); border-color: var(--outline-variant); }
.meta-list .select.compact { width: 100%; min-width: 180px; }

/* Projekt-Aufgaben: dieselbe stabile Kanban-Logik wie im globalen Kanban verwenden */
.project-task-tab-head {
  align-items: flex-end;
  margin-bottom: 12px;
}
.project-task-tab-head h2 {
  margin: 0 0 2px;
}
.project-task-kanban {
  margin-top: 0;
}
.project-task-kanban .project-task-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-content: stretch;
  min-width: 0;
  overflow: hidden;
}
.project-task-kanban .project-task-col .kanban-task-list {
  flex: 1 1 auto;
  min-height: 280px;
  max-height: calc(100vh - 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.project-task-kanban .task-card {
  width: 100%;
  min-width: 0;
}
@media (max-width: 760px) {
  .project-task-tab-head {
    align-items: stretch;
  }
}

/* Projektliste: Kachel-/Listenansicht mit gespeicherten Filtern */
.project-toolbar {
  align-items: center;
  flex-wrap: wrap;
}
.project-view-switch button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.project-view-switch .material-symbols-outlined {
  font-size: 18px;
}
.project-list-filters {
  margin-bottom: 14px;
}
.project-list-kpis {
  margin-bottom: 14px;
}
.project-list-card {
  overflow: hidden;
}
.project-overview-table {
  min-width: 1080px;
}
.project-overview-table .avatar-stack.inline {
  display: flex;
  justify-content: flex-start;
  min-width: 92px;
}

.project-team-names {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  min-width: 210px;
  max-width: 340px;
}
.project-team-member {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 2px 8px 2px 2px;
  border: 1px solid var(--outline-variant);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-container-high) 78%, transparent);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.15;
  color: var(--on-surface);
  white-space: nowrap;
}
.project-team-member .avatar {
  flex: 0 0 auto;
}
.project-list-progress {
  min-width: 140px;
}
.project-list-progress .progress {
  margin-top: 4px;
}
.project-filter-hint {
  margin: 12px 0 0;
}
@media (max-width: 760px) {
  .project-toolbar {
    align-items: stretch;
  }
  .project-toolbar .segmented,
  .project-toolbar .btn {
    width: 100%;
  }
  .project-view-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.required-assignee-highlight {
  outline: 2px solid var(--danger, #ef4444);
  outline-offset: 3px;
  border-radius: 12px;
  animation: requiredAssigneePulse 0.9s ease-in-out 2;
}

@keyframes requiredAssigneePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.18); }
}


/* v5.23.19 - Board Interaction Engine: Scrollen, Slider und Resize-Griffe stabilisieren */
.timeline-shell,
.resource-planner-v2,
.kanban,
.project-task-kanban,
.timeline-pro-wrap,
.timeline-wrap,
.resource-planner-v2 .resource-calendar-main,
.resource-planner-v2 .occupancy-week,
.resource-planner-v2 .occupancy-day,
.resource-planner-v2 .occupancy-month,
.kanban-task-list {
  overscroll-behavior: auto;
  overflow-anchor: none;
}
.timeline-scroll-control {
  position: sticky;
  top: 0;
  z-index: 18;
}
.timeline-scroll-control input[type="range"] {
  min-height: 30px;
  touch-action: pan-x;
}
.timeline-bar-new {
  overflow: visible !important;
}
.timeline-bar-new > span:not(.timeline-resize-handle) {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.timeline-resize-handle {
  width: 28px !important;
  top: -5px !important;
  bottom: -5px !important;
  z-index: 32 !important;
  opacity: .95;
  border-radius: 12px;
  touch-action: none;
}
.timeline-resize-handle.start { left: -8px !important; }
.timeline-resize-handle.end { right: -8px !important; }
.timeline-resize-handle::after {
  top: 8px !important;
  bottom: 8px !important;
  width: 5px !important;
  opacity: .95 !important;
}
.timeline-resize-handle.start::after { left: 9px !important; }
.timeline-resize-handle.end::after { right: 9px !important; }
.timeline-resize-handle:hover,
.timeline-resize-handle:focus-visible {
  background: color-mix(in srgb, var(--primary) 22%, transparent);
}
.resource-planner-v2 .occupancy-chip {
  overflow: visible;
}
.resource-planner-v2 .occupancy-chip > strong,
.resource-planner-v2 .occupancy-chip > span:not(.resource-resize-handle),
.resource-planner-v2 .occupancy-chip > small {
  overflow: hidden;
  text-overflow: ellipsis;
}
.resource-planner-v2 .resource-resize-handle {
  width: 30px !important;
  top: -4px !important;
  bottom: -4px !important;
  z-index: 32 !important;
  opacity: .95;
  touch-action: none;
}
.resource-planner-v2 .resource-resize-handle.left { left: -9px !important; }
.resource-planner-v2 .resource-resize-handle.right { right: -9px !important; }
.resource-planner-v2 .resource-resize-handle::after {
  width: 5px !important;
  top: 8px !important;
  bottom: 8px !important;
}
.resource-planner-v2 .resource-resize-handle.left::after { left: 10px !important; }
.resource-planner-v2 .resource-resize-handle.right::after { right: 10px !important; }
.resource-planner-v2 .resource-resize-handle:hover,
.resource-planner-v2 .resource-resize-handle:focus-visible {
  background: color-mix(in srgb, var(--primary) 18%, var(--surface-container-high));
}
body.timeline-resizing .timeline-pro-wrap,
body.resource-resizing .resource-calendar-main,
body.resource-resizing .occupancy-week,
body.resource-resizing .occupancy-day {
  scroll-behavior: auto !important;
}
.kanban-task-list {
  overscroll-behavior-y: auto;
  scroll-behavior: auto;
}

/* v5.23.20 - Timeline: Zeilen beim Drag/Resize stabil halten */
.timeline-stable-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-container-low));
  color: var(--primary);
  font-weight: 850;
  font-size: 11px;
  white-space: nowrap;
}
.timeline-stable-hint .material-symbols-outlined {
  font-size: 15px;
}
.timeline-embedded-head > div:first-child {
  display: grid;
  gap: 4px;
}
.timeline-bar-new.resizing {
  z-index: 40 !important;
}
body.timeline-resizing .timeline-task-list,
body.timeline-resizing .timeline-canvas,
body.timeline-resizing .timeline-pro-wrap {
  overflow-anchor: none !important;
}

/* v5.23.21 - Timeline: Zeitraum-Navigator als echter Zeitversatz statt deaktiviertem Scrollbalken */
.timeline-navigator-control {
  grid-template-columns: auto minmax(220px, 1fr) minmax(120px, auto);
  position: sticky;
  top: 0;
  z-index: 35;
  pointer-events: auto;
  user-select: none;
}
.timeline-navigator-control input[type="range"] {
  min-height: 36px;
  cursor: grab;
  pointer-events: auto;
  touch-action: pan-x;
  position: relative;
  z-index: 2;
}
.timeline-navigator-control input[type="range"]:active {
  cursor: grabbing;
}
.timeline-navigator-control output {
  justify-self: end;
  min-width: 112px;
  text-align: right;
  font-size: 11px;
  font-weight: 850;
  color: var(--primary);
  white-space: nowrap;
}
.timeline-shell .timeline-navigator-control + .timeline-pro-wrap {
  margin-top: 0;
}
@media (max-width: 720px) {
  .timeline-navigator-control {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .timeline-navigator-control output {
    justify-self: start;
    text-align: left;
  }
}

/* v5.23.22 - Timeline: Zeitraum-Navigator stabilisieren */
.timeline-navigator-control {
  grid-template-columns: auto 36px minmax(240px, 1fr) 36px minmax(120px, auto);
  isolation: isolate;
}
.timeline-navigator-control input[type="range"] {
  touch-action: none;
  -webkit-user-drag: none;
  user-select: none;
}
.timeline-nav-step {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--outline-variant);
  background: var(--surface);
  color: var(--on-surface);
  cursor: pointer;
  pointer-events: auto;
  padding: 0;
  position: relative;
  z-index: 3;
}
.timeline-nav-step:hover,
.timeline-nav-step:focus-visible {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--outline-variant));
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}
.timeline-nav-step .material-symbols-outlined {
  font-size: 22px;
}
@media (max-width: 720px) {
  .timeline-navigator-control {
    grid-template-columns: 36px 1fr 36px;
  }
  .timeline-navigator-control > span,
  .timeline-navigator-control > output {
    grid-column: 1 / -1;
  }
}



/* v5.25.65 - Projekte: KPI-Werte in Listen- und Kachelansicht als kompakte RTL-Zeile. */
.project-list-kpis {
  display: flex !important;
  flex-direction: row-reverse;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.project-list-kpis > div {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  min-width: max-content;
  padding: 8px 10px;
  white-space: nowrap;
}
.project-list-kpis strong,
.project-list-kpis span {
  display: inline;
  white-space: nowrap;
  overflow-wrap: normal;
  line-height: 1;
}
.project-list-filters {
  padding: 12px;
}
.project-list-filters .form-grid {
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(126px, .85fr));
  gap: 8px;
  align-items: end;
}
.project-list-filters .form-field {
  gap: 4px;
}
.project-list-filters .form-field > span {
  font-size: 12px;
}
.project-list-filters .input,
.project-list-filters .select {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 13px;
}
@media (max-width: 1100px) {
  .project-list-filters .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .project-list-kpis {
    padding-bottom: 2px;
  }
}
@media (max-width: 700px) {
  .project-list-filters .form-grid {
    grid-template-columns: 1fr;
  }
  .project-list-kpis {
    margin-inline: -4px;
    padding-inline: 4px;
  }
}
