/* Projektplan (PLAN): Gliederungsbaum, Phasen-Karten, Detail rechts. Regeln aus dem <style> des Ist (index.html, K17/K22/T-11).
   Die Bausteine erv-* teilt der Plan mit den Assistenten; gleiche Regeln doppelt zu laden schadet nicht. */
.erv-phase-cards{display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:18px;}
@media (max-width:760px){.erv-phase-cards{grid-template-columns:1fr;}}
.erv-phase-card{border:1px solid var(--border); border-radius:var(--radius-md); padding:14px 16px; background:var(--page);}
.erv-phase-card .erv-pc-num{color:var(--text-muted); font-size:11px; font-variant-numeric:tabular-nums;}
.erv-phase-card h4{margin:5px 0 9px; font-size:14px;}
.erv-pc-track{height:6px; border-radius:5px; background:var(--grid); overflow:hidden; margin-bottom:6px;}
.erv-pc-fill{height:100%; background:var(--accent); border-radius:5px;}
.erv-pc-pct{font-variant-numeric:tabular-nums; font-size:11px; color:var(--text-muted);}
.erv-steplist{display:flex; flex-direction:column; gap:2px;}
.erv-phase-tag{font-family:var(--font-mono); font-size:11px; color:var(--text-muted); padding:12px 4px 5px;}
.erv-step-btn{
  display:flex; align-items:center; gap:8px; width:100%; text-align:left; background:none; border:none; cursor:pointer;
  padding:6px 8px; border-radius:var(--radius-sm); font-size:12.5px; color:var(--text-secondary);
}
.erv-step-btn:hover{background:var(--page);}
.erv-step-btn.active{background:var(--accent-soft-bg); color:var(--accent-soft-text); font-weight:var(--fw-semibold);}
.erv-step-btn .erv-step-dot{
  flex:0 0 auto; width:16px; height:16px; border-radius:50%; border:1.5px solid var(--border); background:var(--surface-1);
  display:flex; align-items:center; justify-content:center; font-size:11px; color:var(--text-muted);
}
.erv-step-btn.done .erv-step-dot{border-color:var(--status-good); background:var(--status-good); color:var(--surface-1);}
.erv-step-btn .erv-step-text{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.erv-step-btn .erv-step-pct{flex:0 0 auto; font-variant-numeric:tabular-nums; font-size:11px; color:var(--text-muted);}
.erv-step-btn.upd-level2{padding-left:22px;}
.erv-step-btn.upd-level3{padding-left:38px;}
.erv-step-btn.upd-notapplicable{opacity:.5;}
.erv-stepdetail .erv-step-head{margin-bottom:16px;}
.erv-stepdetail .erv-step-code{font-family:var(--font-mono); color:var(--text-muted); font-size:11.5px;}
.erv-stepdetail .erv-step-head h4{font-size:18px; margin:4px 0 0;}
/* K17: Projektplan und Assistenten in einem Tab. Liste links nur lesen und wählen, Detail rechts pflegen. */
.pl-layout{display:grid; grid-template-columns:minmax(260px,340px) 1fr; gap:24px; align-items:start;}
.pl-detail{min-width:0; border-left:1px solid var(--grid); padding-left:24px;}
.pl-group{display:flex; justify-content:space-between; gap:8px; font-size:13px; font-weight:var(--fw-semibold); color:var(--text-primary); padding:14px 4px 0; margin-top:10px; border-top:1px solid var(--grid);}
.pl-list > .pl-group:first-child{margin-top:0; padding-top:2px; border-top:none;}
.pl-group-pct{font-weight:var(--fw-regular); color:var(--text-muted); font-variant-numeric:tabular-nums;}
.pl-code{color:var(--text-muted); margin-right:6px; font-variant-numeric:tabular-nums;}
.erv-step-btn.active .pl-code{color:inherit;}
.erv-step-btn.pl-wip .erv-step-dot{border-color:var(--status-warning); background:color-mix(in srgb, var(--status-warning) 30%, transparent);}
/* #261: Bearbeiten rechts mit den Bausteinen der Offenen Punkte (.op-meta, .ctl-feld, .ctl-select in portfolio.css und bausteine.css) */
.pl-bearbeiten{display:flex; flex-direction:column; gap:var(--sp-sm); padding-bottom:var(--sp-lg); margin-bottom:var(--sp-lg); border-bottom:1px solid var(--grid);}
/* K22: Gliederungsbaum. Aktionen + und ✕ bei Hover und Fokus, am Handy über ⋯. #261: je Zeile Griff und runder Haken
   der Offenen Punkte (.op-griff, .op-check, Linie .op-linie in portfolio.css); Einzug je Ebene aus --einzug-ebene, das
   auch das Ziehen liest (ansichten/baumZiehen.js). */
.pl-baum{position:relative; --einzug-ebene:var(--sp-lg);}
.pl-node{display:flex; align-items:center; gap:8px; min-height:30px; padding:var(--sp-3xs) var(--sp-xs) var(--sp-3xs) calc(var(--sp-xs) + var(--tiefe,0) * var(--einzug-ebene)); border-radius:var(--radius-sm); font-size:12.5px; color:var(--text-secondary);}
.pl-node > .op-griff, .pl-node > .op-check{flex:0 0 auto;}
.pl-node:hover, .pl-node:focus-within{background:var(--page);}
.pl-node.active{background:color-mix(in srgb, var(--accent) 12%, transparent); color:var(--accent-soft-text);}
.pl-node-phase{font-weight:var(--fw-semibold); color:var(--text-primary); margin-top:6px;}
.pl-name{flex:1; min-width:0; text-align:left; background:none; border:none; padding:2px 0; font:inherit; color:inherit; cursor:pointer; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.pl-name-statisch{cursor:default;}
.pl-node.done .pl-name{color:var(--text-muted);}
.pl-pct{flex:0 0 auto; font-size:11px; color:var(--text-muted); font-variant-numeric:tabular-nums;}
.pl-acts{display:none; gap:2px; flex:0 0 auto;}
.pl-node:hover .pl-acts, .pl-node:focus-within .pl-acts{display:flex;}
.pl-act{background:none; border:none; cursor:pointer; color:var(--text-muted); font-size:13px; line-height:1; padding:3px 7px; border-radius:var(--radius-sm);}
.pl-act:hover, .pl-act:focus-visible{background:var(--grid); color:var(--text-primary);}
.pl-more{display:none; flex:0 0 auto; background:none; border:none; cursor:pointer; color:var(--text-muted); font-size:16px; line-height:1; min-width:32px; min-height:32px; border-radius:var(--radius-sm);}
@media (hover:none), (max-width:760px){
  .pl-node:hover .pl-acts, .pl-node:focus-within .pl-acts{display:none;}
  .pl-node.open .pl-acts{display:flex;}
  .pl-more{display:block;}
  .pl-act{min-width:32px; min-height:32px; font-size:15px;}
}
.pl-unter{padding-left:calc(var(--sp-2xl) + var(--tiefe,0) * var(--einzug-ebene));}
.pl-addform{display:flex; gap:6px; align-items:center; padding:var(--sp-2xs) var(--sp-xs) var(--sp-2xs) calc(var(--sp-xs) + var(--tiefe,0) * var(--einzug-ebene) + var(--sp-2xl) + var(--sp-xl));}
.pl-addform input{flex:1; min-width:0;}
.pl-neuephase{margin:10px 0 0 6px;}
.pl-trenner{border:none; border-top:1px solid var(--grid); margin:10px 0 4px;}
.pl-verborgen{margin-top:14px; font-size:12px; color:var(--text-secondary);}
.pl-verborgen-zeile{display:flex; align-items:center; justify-content:space-between; gap:8px; padding:3px 0;}
.pl-card-list{list-style:none; margin:10px 0 0; padding:0; font-size:12px;}
.pl-card-step{display:flex; gap:8px; width:100%; text-align:left; background:none; border:none; cursor:pointer; padding:3px 0; font:inherit; color:var(--text-secondary);}
.pl-card-step:hover{color:var(--text-primary);}
.pl-card-mark{flex:0 0 34px; font-variant-numeric:tabular-nums; font-size:11px; color:var(--text-muted);}
.pl-card-step.done .pl-card-mark{color:var(--status-good);}
.task-status-btn.is-static{cursor:default;}
.pl-stammdaten{margin-bottom:16px;}
.pl-fuss{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:18px; padding-top:12px; border-top:1px solid var(--grid); font-size:12px; color:var(--text-muted);}
.pl-detail .pl-zurueck{display:none; margin-bottom:12px;}
@media (max-width:760px){
  .pl-layout{grid-template-columns:1fr;}
  .pl-detail{border-left:none; padding-left:0;}
  .pl-layout.zeigt-detail .pl-list, .pl-layout:not(.zeigt-detail) .pl-detail{display:none;}
  .pl-detail .pl-zurueck{display:inline-flex;}
}
.erv-fld-label{font-size:11.8px; font-weight:var(--fw-semibold); color:var(--text-secondary);}
.erv-btn{font:inherit; font-weight:var(--fw-semibold); font-size:12.5px; border-radius:var(--radius-sm); padding:7px 12px; border:1px solid var(--accent-fill); background:var(--accent-fill); color:var(--on-accent); cursor:pointer; display:inline-flex; align-items:center; gap:6px;}
.erv-btn:hover{opacity:.9;}
.erv-btn.ghost{background:transparent; color:var(--text-primary); border-color:var(--border);}
.erv-btn.ghost:hover{border-color:var(--accent); color:var(--accent);}
.erv-btn.small{font-size:11.5px; padding:5px 9px;}
/* Read-Only Intern (body.ro): Knoten anlegen und entfernen sind weg, Haken und Felder gesperrt (disabled im HTML) */
body.ro #plNeuePhase, body.ro [data-pl-add], body.ro [data-pl-del], body.ro .pl-more{display:none !important;}
