/* SAGA 2.0: Erweiterung der vorhandenen Projektansichten. */
.ws-projects, .ws-project { min-width: 0; }
.pm-entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pm-scope-note { margin: -.35rem 0 0; }
.pm-project-filter { grid-template-columns: minmax(10rem, 2fr) repeat(2, minmax(9rem, 1fr)) auto; }
.pm-chip-line { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.pm-chip-line .status-chip { white-space: normal; line-height: 1.35; }
.pm-heading-status { margin-top: .55rem; }
.pm-project-tabs { flex-wrap: wrap; }
.pm-project-tabs a { white-space: normal; }
.pm-project-panel { min-width: 0; }
.pm-project-panel > :last-child { margin-bottom: 0; }
.pm-project-panel .platform-toolbar > .iv-actions, .ws-project-heading > .iv-actions { margin-left: auto; }
.pm-overview-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1rem; }
.pm-overview-section { min-width: 0; padding: 1rem; border: 1px solid var(--border); border-radius: .55rem; background: var(--surface); }
.pm-overview-grid + .pm-overview-section { margin-top: 1rem; }
.pm-overview-section .platform-toolbar { margin-top: 0; gap: .65rem; }
.pm-overview-section p { line-height: 1.55; }
.pm-overview-section .ws-facts { grid-template-columns: minmax(0, 1fr); }
.pm-weighted-progress { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; padding-top: .8rem; border-top: 1px solid var(--border); font-size: .8rem; }
.pm-overview-section .pm-follow-heading, .pm-project-panel .pm-follow-heading { margin-top: 1.25rem; }
.pm-attention-list, .pm-milestone-list, .pm-entry-list { list-style: none; padding: 0; margin: .6rem 0 0; }
.pm-attention-list > li { padding: .8rem 0; border-top: 1px solid var(--border); }
.pm-attention-list > li:first-child { border-top: 0; }
.pm-attention-list p { margin: .35rem 0; font-size: .8rem; }
.pm-attention-title { display: flex; justify-content: space-between; align-items: start; gap: .6rem; }
.pm-attention-title > .button { min-width: 0; }
.pm-attention-title .button, .pm-milestone-list .button, .pm-baseline-table .button, .pm-entry-task .button, .pm-document-table .button { padding: .1rem 0; min-height: 1.7rem; color: var(--primary-strong); background: transparent; border: 0; text-align: left; justify-content: flex-start; white-space: normal; }
.pm-milestone-list li { display: flex; gap: .65rem; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.pm-milestone-list li:last-child { border-bottom: 0; }
.pm-milestone-list li > div { min-width: 0; }
.pm-milestone-list p { margin: .15rem 0; font-size: .78rem; }
.pm-milestone-marker { color: var(--warning); margin-top: .35rem; }
.pm-task-filter { display: grid; grid-template-columns: minmax(11rem, 2fr) repeat(2, minmax(9rem, 1fr)); gap: .75rem; align-items: end; margin: 1rem 0; }
.pm-task-filter > .iv-actions { grid-column: 1 / -1; justify-content: flex-end; }
.pm-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; align-items: start; margin-top: .9rem; }
.pm-board-column { min-width: 0; padding: .6rem; border: 1px solid var(--border); background: var(--surface-subtle); border-radius: .55rem; }
.pm-board-column > h3 { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .2rem .15rem .65rem; font-size: .86rem; margin: 0; }
.pm-board-cards { display: grid; gap: .6rem; }
.pm-board-card { display: grid; width: 100%; min-width: 0; gap: 0; padding: 0; border: 1px solid var(--border); border-radius: .45rem; background: var(--surface); color: var(--ink); text-align: left; font: inherit; font-size: .8rem; box-shadow: var(--shadow-xs); transition: border-color 160ms; overflow: hidden; }
.pm-board-card:hover { border-color: var(--primary); background: var(--primary-soft); }
.pm-board-card:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.pm-board-open { display: grid; gap: .5rem; width: 100%; min-width: 0; padding: .75rem; background: transparent; border: 0; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.pm-board-open > span { min-width: 0; overflow-wrap: anywhere; }
.pm-board-open:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
.pm-board-card[draggable="true"] { cursor: grab; }
.pm-is-dragging { opacity: .45; }
.pm-board-column { border-top: 3px solid var(--brand-blue); min-height: 10rem; }
.pm-board-column[data-pm-drop="in_progress"] { border-top-color: var(--brand-cyan); }
.pm-board-column[data-pm-drop="in_review"] { border-top-color: var(--assessment-medium); }
.pm-board-column[data-pm-drop="done"] { border-top-color: var(--assessment-low); }
.pm-board-cards { min-height: 4rem; max-height: 32rem; overflow-y: auto; padding: .15rem; }
.pm-drop-active { outline: 2px dashed var(--primary); outline-offset: 2px; background: var(--primary-soft); }
.pm-card-phase { display: grid; gap: .3rem; min-width: 0; padding: .5rem .75rem .7rem; border-top: 1px solid var(--border); }
.pm-card-phase > span,.pm-card-readonly { color: var(--muted-strong); font-size: .7rem; }
.pm-card-phase select { width: 100%; min-width: 0; min-height: 32px; padding: .3rem .4rem; border: 1px solid var(--border); border-radius: .3rem; background: var(--surface); color: var(--ink); font: inherit; font-size: .76rem; }
.pm-card-phase select:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.pm-card-readonly { padding: .4rem .75rem .6rem; }
.pm-complete-target { margin: .3rem 0; padding: 1rem .65rem; border: 1px dashed var(--border); border-radius: .35rem; font-size: .8rem; line-height: 1.5; }
.pm-completed-tasks { margin-top: 1.5rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.pm-completed-tasks h3 { margin: 0; }
.pm-overview-gantt { padding-bottom: .5rem; }
.pm-overview-gantt h2 { margin: 0; }
.pm-overview-gantt .pm-gantt-viewport { max-height: 380px; }
.pm-overview-status,.pm-overview-team { margin-top: 1rem; align-items: start; }
.pm-overview-section .empty-state { min-height: 0; display: block; padding: 1rem .25rem; text-align: left; }
.pm-implementation .pm-weighted-progress { border-top: 0; padding: .3rem 0 .9rem; }
.pm-implementation .pm-progress { min-width: 10rem; flex: 1; max-width: 100%; }
.pm-implementation-counts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
.pm-implementation-counts > div { display: grid; gap: .25rem; padding: .65rem; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: .35rem; }
.pm-implementation-counts strong { font-size: 1.3rem; color: var(--primary-strong); }
.pm-implementation-counts span { font-size: .75rem; color: var(--muted-strong); }
.pm-implementation h4 { margin: 1rem 0 .4rem; font-size: .85rem; }
.pm-overview-status .pm-attention-list { max-height: 26rem; overflow: auto; padding-right: .4rem; }
.pm-team-member { border-top: 1px solid var(--border); padding: .7rem 0; }
.pm-team-member > summary { cursor: pointer; font-size: .85rem; font-weight: 650; overflow-wrap: anywhere; }
.pm-team-member > summary > .ws-count { margin-left: .5rem; }
.pm-team-task-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.pm-team-task-list li { display: flex; gap: .6rem; justify-content: space-between; align-items: flex-start; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.pm-team-task-list li:last-child { border-bottom: 0; }
.pm-team-task-list li > div { min-width: 0; }
.pm-team-task-list .button { padding: 0; min-height: 1.6rem; white-space: normal; text-align: left; justify-content: flex-start; border: 0; color: var(--primary-strong); background: transparent; }
.pm-team-task-list .pm-chip-line { flex-shrink: 0; max-width: 42%; }
.pm-board-card strong { font-size: .85rem; line-height: 1.45; overflow-wrap: anywhere; }
.pm-board-card > span { min-width: 0; overflow-wrap: anywhere; }
.pm-board-card-code { color: var(--muted-strong); font-size: .68rem; }
.pm-board-card-person, .pm-board-card-date { font-size: .74rem; }
.pm-board-card-blocker { padding-top: .5rem; border-top: 1px solid var(--border); font-size: .73rem; line-height: 1.45; }
.pm-board-card .pm-progress { font-size: .75rem; min-width: 0; }
.pm-board-card .status-chip { font-size: .66rem; }
.pm-board-empty { margin: 0; padding: .8rem .15rem; font-size: .77rem; color: var(--muted-strong); }
.pm-cancelled-tasks { margin-top: 1rem; }
.pm-cancelled-tasks > summary { padding: .5rem 0; }
.pm-baseline-section, .pm-document-section { border-top: 1px solid var(--border); margin-top: 1.25rem; padding-top: 1rem; }
.pm-baseline-section .ws-inline-form { margin: .7rem 0; }
.pm-entry { border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: .45rem; padding: .85rem 1rem; margin: .75rem 0; background: var(--surface); }
.pm-entry-decision { border-left-color: var(--warning); }
.pm-entry-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .35rem .75rem; }
.pm-entry-heading > span { color: var(--muted-strong); font-size: .73rem; }
.pm-entry p { margin: .65rem 0 0; font-size: .84rem; line-height: 1.6; }
.pm-entry-task { margin-top: .4rem; }
.pm-entry-rationale { margin-top: .8rem; padding: .7rem; background: var(--surface-subtle); border-radius: .35rem; }
.pm-entry-rationale strong { font-size: .75rem; }
.pm-entry-rationale p { margin-top: .35rem; }
.pm-state-in_review { fill: var(--assessment-medium); stroke: var(--warning); }
.pm-gantt-blocked-indicator { fill: var(--assessment-critical); stroke: var(--surface); stroke-width: 1.5; }
.pm-blockade-group .field textarea { min-height: 5.5rem; }
.pm-workspace-editor .platform-grid { gap: .75rem 1.15rem; align-items: start; }
.pm-workspace-editor .field input, .pm-workspace-editor .field select { min-height: 34px; }
.pm-workspace-editor .field > span { font-size: .8rem; }
.pm-workspace-editor .field textarea { min-height: 5.3rem; }
.pm-workspace-editor .field, .pm-workspace-editor .field input, .pm-workspace-editor .field select { min-width: 0; max-width: 100%; }
.pm-workspace-editor .check-label { display: flex; gap: .6rem; align-items: flex-start; }
.pm-workspace-editor .check-label input { flex: 0 0 1rem; width: 1rem; min-width: 1rem; margin-top: .15rem; }
.pm-workspace-editor .check-label span { line-height: 1.45; }
.pm-workspace-editor .pm-legacy-note { font-size: .8rem; line-height: 1.5; }
.pm-workspace-editor .platform-form-actions { flex-wrap: wrap; }
.pm-workspace-editor .pm-task-context { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--border); }
.pm-workspace-editor .pm-document-search { display: flex; align-items: end; gap: .65rem; margin-bottom: .8rem; }
.pm-workspace-editor .pm-document-search .field { flex: 1; }
.pm-project-list th:nth-child(6) { white-space: normal; min-width: 9rem; }
.pm-update-note { display: block; line-height: 1.6; }
.ws-project .platform-pagination, .ws-projects .platform-pagination { gap: .6rem; flex-wrap: wrap; }
.ws-project .platform-pagination > div, .ws-projects .platform-pagination > div { display: flex; flex-wrap: wrap; gap: .45rem; }
@media (min-width: 1100px) { .pm-workspace-editor { width: min(1180px, calc(100vw - 32px)); max-width: min(1180px, calc(100vw - 32px)); } }
@media (max-width: 1150px) { .pm-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pm-project-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pm-project-filter > .iv-actions { grid-column: 1 / -1; } }
@media (max-width: 900px) { .pm-overview-grid { grid-template-columns: minmax(0, 1fr); } .pm-task-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pm-task-filter > .field:first-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .pm-entry-grid { grid-template-columns: minmax(0, 1fr); } .pm-workspace-editor .platform-grid { grid-template-columns: minmax(0, 1fr); } .pm-workspace-editor .platform-span { grid-column: 1; } }
@media (max-width: 600px) {
 .ws-project .ws-metrics, .ws-projects .ws-metrics { grid-template-columns: minmax(0, 1fr); }
 .pm-board, .pm-task-filter, .pm-project-filter { grid-template-columns: minmax(0, 1fr); }
 .pm-project-tabs { gap: .2rem; }
 .pm-project-tabs a { padding: .5rem .65rem; font-size: .8rem; }
 .pm-overview-section { padding: .75rem; }
 .pm-attention-title { flex-direction: column; }
 .pm-project-panel .platform-toolbar { align-items: flex-start; flex-wrap: wrap; gap: .65rem; }
 .pm-project-panel .iv-actions, .ws-project-heading > .iv-actions { flex-wrap: wrap; width: 100%; justify-content: flex-end; gap: .4rem; }
 .ws-project .button, .ws-projects .button, .pm-workspace-editor .button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
 .pm-entry { padding: .75rem; }
 .pm-workspace-editor .pm-document-search { align-items: stretch; flex-direction: column; }
 .pm-workspace-editor .ws-repeat-row { grid-template-columns: minmax(0, 1fr); }
 .pm-workspace-editor .field select { width: 100%; }
 .pm-gantt-grid { grid-template-columns: 120px max-content; }
 .pm-gantt-labels button { width: 120px; }
 .pm-gantt-labels button small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pm-board-card { transition: none; } }

/* Importierte Projektpläne: gemeinsame SAGA-Flächen und Akzentfarben. */
.pmi-role-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
.pmi-phases { display:grid; gap:.7rem; margin:1rem 0 1.5rem; }
.pmi-phase { border:1px solid var(--border); border-left:5px solid var(--brand-blue); border-radius:.45rem; background:var(--surface); min-width:0; }
.pmi-phase > summary { display:flex; align-items:center; gap:.6rem; padding:.9rem; cursor:pointer; flex-wrap:wrap; color:var(--ink); }
.pmi-phase > summary strong { flex:1; min-width:10rem; }
.pmi-phase-code { padding:.45rem; border-radius:.3rem; background:var(--brand-blue); color:#fff; font-weight:700; min-width:2.5rem; text-align:center; }
.pmi-phase[open] { border-left-color:var(--brand-cyan); }
.pmi-phase-body { padding:0 1rem 1rem; min-width:0; }
.pmi-phase-body .iv-actions { padding-bottom:.7rem; }
.pmi-source-section { border-top:1px solid var(--border); padding-top:1rem; }
.pmi-source-table table { min-width:65rem; }
.pmi-source-table th { min-width:8rem; }
.pmi-source-table td { max-width:25rem; min-width:8rem; overflow-wrap:anywhere; white-space:pre-wrap; vertical-align:top; }
.pmi-source-table td:first-child { min-width:5rem; }
.pmi-origin { margin-top:1rem; padding:.8rem; border:1px solid var(--border); border-radius:.4rem; }
.pmi-origin p { overflow-wrap:anywhere; }
.pmi-dependency { border:1px solid var(--border); border-left:4px solid var(--brand-cyan); border-radius:.4rem; padding:.8rem; margin:.65rem 0; background:var(--surface); }
.pmi-task-scope { border-left:4px solid var(--warning) !important; }
.pm-dep-PARTIAL { stroke:var(--warning) !important; stroke-dasharray:5 4; }
.pm-dep-FF { stroke:var(--brand-cyan) !important; }
.pmi-phase .pm-task-table .button { white-space:normal; text-align:left; }
@media (max-width:640px) { .pmi-role-grid { grid-template-columns:1fr; } .pmi-phase-body { padding:0 .5rem .6rem; } .pmi-phase > summary { padding:.65rem; } .pmi-phase > summary strong { flex-basis:70%; } }

/* Quellhinweise sind Fließtext, keine horizontalen Symbolleisten. */
.pmi-note { display:block; overflow-wrap:anywhere; }
.pmi-origin .ws-prewrap, .pmi-phases, .pmi-phase, .pmi-phase-body, .pmi-source-section { min-width:0; max-width:100%; }
.pmi-phase-body .data-table-wrap { max-width:100%; overflow-x:auto; }
.pmi-role-grid .field { min-width:0; }
.pmi-role-grid select { max-width:100%; }

.pm-gantt-dialog .saga-dialog-body{padding-top:.5rem}.pm-gantt-dialog .pm-gantt-toolbar{position:sticky;top:0;z-index:8;background:var(--surface);padding:.6rem 0}.pm-gantt-dialog .pm-gantt-viewport{box-shadow:0 10px 30px rgba(0,0,0,.08)}
