/* Project workspace: one section system for existing projects and the create modal.
   Deliberately scoped: no changes to standalone reports or other application forms. */
@layer werger-workspace {
@media screen {
  body.werger-ui:not([class*="printing-"]) .project-workspace {
    --project-section-gap:24px;
    --project-content-gap:16px;
    --project-card-inset:18px;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace :is(.project-section-surface,.project-history-panel) {
    min-width:0!important;width:100%!important;max-width:100%!important;
    padding:0!important;margin:0!important;border:0!important;border-radius:0!important;
    background:transparent!important;box-shadow:none!important;
    overflow:visible!important;box-sizing:border-box!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-section-header {
    display:flex!important;align-items:flex-start!important;justify-content:space-between!important;
    flex-wrap:wrap!important;gap:12px 20px!important;margin:0 0 20px!important;padding:0!important;
    min-width:0!important;width:100%!important;border:0!important;border-radius:0!important;
    background:transparent!important;box-shadow:none!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-section-heading {
    display:flex!important;align-items:flex-start!important;gap:10px!important;
    flex:1 1 320px!important;min-width:0!important;padding:0!important;margin:0!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-section-heading>.material-icons-round {
    flex:0 0 18px!important;width:18px!important;height:20px!important;
    margin:0!important;padding:0!important;font-size:18px!important;line-height:20px!important;
    color:var(--ws-muted)!important;background:transparent!important;border:0!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-section-heading>div {min-width:0!important;flex:1!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-section-heading h3 {
    margin:0!important;padding:0!important;font-size:13px!important;font-weight:700!important;
    line-height:1.5!important;letter-spacing:normal!important;color:var(--ws-ink)!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-section-heading .hint {
    display:block!important;margin:5px 0 0!important;padding:0!important;max-width:760px!important;
    font-size:11px!important;line-height:1.65!important;font-weight:400!important;
    letter-spacing:normal!important;color:var(--ws-muted)!important;overflow-wrap:break-word!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-section-actions {
    display:flex!important;align-items:center!important;justify-content:flex-end!important;
    flex:0 1 auto!important;flex-wrap:wrap!important;gap:8px!important;min-width:0!important;
    max-width:100%!important;margin:0!important;padding:0!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-section-actions .btn {
    flex:0 1 auto!important;width:auto!important;min-width:0!important;max-width:100%!important;
    height:auto!important;min-height:36px!important;margin:0!important;padding:8px 12px!important;
    font-size:11px!important;line-height:1.45!important;white-space:normal!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-detail-section {
    margin:var(--project-section-gap) 0 0!important;padding:var(--project-section-gap) 0 0!important;
    border:0!important;border-top:1px solid var(--ws-line)!important;background:transparent!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-detail-title {
    margin:0 0 14px!important;padding:0!important;font-size:13px!important;line-height:1.5!important;
    color:var(--ws-ink)!important;font-weight:700!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-editor-empty {
    display:flex;align-items:flex-start;gap:12px;padding:18px 20px;margin:0;
    background:var(--ws-soft);border:1px dashed var(--ws-line);border-radius:10px;
    color:var(--ws-muted);font-size:12px;line-height:1.65;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-editor-empty .material-icons-round {font-size:20px;flex:0 0 20px;margin-top:1px}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-editor-empty b {display:block;color:var(--ws-ink);font-weight:600}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-editor-empty p {margin:3px 0 0}
  body.werger-ui:not([class*="printing-"]) .project-workspace #gpr-box:not(:empty)+.project-gpr-empty,
  body.werger-ui:not([class*="printing-"]) .project-workspace #budget-box:not(:empty)+.project-budget-empty {display:none!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace #gpr-box {
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:16px!important;
    min-width:0!important;margin:0!important;padding:0!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-work-row {
    display:block!important;position:relative!important;min-width:0!important;
    margin:0!important;padding:var(--project-card-inset)!important;
    background:var(--ws-paper)!important;border:1px solid var(--ws-line)!important;
    border-radius:10px!important;box-shadow:none!important;transform:none!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-row-heading {
    display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:32px;
    margin:0 0 16px;padding:0 0 12px;border-bottom:1px solid var(--ws-line);
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-row-heading>b {font-size:12px;font-weight:700;color:var(--ws-ink)}
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-delete-btn {
    position:static!important;inset:auto!important;flex:0 0 32px!important;
    width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;
    padding:6px!important;margin:0!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-row-top {
    display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,2fr) minmax(150px,.8fr)!important;
    align-items:start!important;gap:16px 12px!important;min-width:0!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-row-schedule {
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:20px 24px!important;margin-top:20px!important;padding-top:20px!important;
    border-top:1px solid var(--ws-line)!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-period-card {
    min-width:0!important;padding:0!important;margin:0!important;background:transparent!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-period-title {
    margin:0 0 14px!important;font-size:12px!important;font-weight:700!important;
    text-transform:none!important;letter-spacing:normal!important;line-height:1.5!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-period-fields {
    display:grid!important;grid-template-columns:minmax(0,1.3fr) minmax(88px,.75fr) minmax(0,1.25fr)!important;
    gap:12px!important;align-items:start!important;min-width:0!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace :is(.gpr-work-row,.budget-row) .field {min-width:0!important;margin:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace :is(.gpr-work-row,.budget-row) .field>label {display:block!important;margin:0 0 7px!important;font-size:11px!important;line-height:1.5!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace :is(.gpr-work-row,.budget-row) :is(input:not([type=hidden]),select) {width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-calc-date {text-align:left!important;background:var(--ws-soft)!important;color:var(--ws-muted)!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-work-field select {flex:1 1 0!important;width:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-work-field .btn.icon {flex:0 0 38px!important}

  body.werger-ui:not([class*="printing-"]) .project-workspace .project-budget-summary {
    display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:8px 20px;
    padding:14px 18px;margin:0 0 16px;background:var(--ws-soft);border-radius:9px;
    color:var(--ws-muted);font-size:12px;line-height:1.6;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-budget-summary b {color:var(--ws-ink);font-size:16px;line-height:1.5;font-weight:700;font-variant-numeric:tabular-nums}
  body.werger-ui:not([class*="printing-"]) .project-workspace #budget-box {display:grid!important;gap:12px!important;margin:0!important;padding:0!important;min-width:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .budget-row {
    display:grid!important;grid-template-columns:minmax(0,1fr) minmax(150px,180px) auto 36px!important;
    align-items:end!important;gap:12px!important;margin:0!important;padding:16px!important;
    border:1px solid var(--ws-line)!important;border-radius:10px!important;background:var(--ws-paper)!important;box-shadow:none!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .budget-row .field {width:auto!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .budget-months-btn {min-height:38px!important;margin:0!important;max-width:100%!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .budget-delete-btn {width:36px!important;height:38px!important;min-width:36px!important;min-height:38px!important;margin:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .reconcile-shell {
    margin:24px 0 0!important;padding:24px 0 0!important;border:0!important;border-top:1px solid var(--ws-line)!important;
    border-radius:0!important;box-shadow:none!important;background:transparent!important;
  }

  body.werger-ui:not([class*="printing-"]) .project-workspace :is(.project-tracking-cards,.project-realization-kpis,.project-materials-kpis) {
    display:grid!important;gap:1px!important;padding:0!important;margin:0 0 20px!important;
    background:var(--ws-line)!important;border:1px solid var(--ws-line)!important;border-radius:10px!important;
    box-shadow:none!important;min-width:0!important;overflow:hidden!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-tracking-cards {grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-realization-kpis {grid-template-columns:repeat(5,minmax(0,1fr))!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-materials-kpis {grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace :is(.project-tracking-cards,.project-realization-kpis,.project-materials-kpis)>div {
    display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;
    gap:5px!important;padding:14px 16px!important;min-width:0!important;margin:0!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;background:var(--ws-soft)!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace :is(.project-tracking-cards,.project-realization-kpis,.project-materials-kpis)>div>span {font-size:11px!important;font-weight:500!important;line-height:1.5!important;text-transform:none!important;letter-spacing:normal!important;color:var(--ws-muted)!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace :is(.project-tracking-cards,.project-realization-kpis,.project-materials-kpis)>div>b {margin:0!important;font-size:16px!important;line-height:1.5!important;font-weight:700!important;white-space:normal!important;overflow-wrap:anywhere!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace :is(.project-tracking-cards,.project-realization-kpis,.project-materials-kpis)>div>small {margin:0!important;font-size:10px!important;line-height:1.5!important;color:var(--ws-muted)!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-progress-list {display:grid!important;gap:0!important;margin:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-progress-row {padding:14px 16px!important;gap:12px 20px!important;border:0!important;border-bottom:1px solid var(--ws-line)!important;background:var(--ws-soft)!important;border-radius:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-progress-row:first-child {border-radius:9px 9px 0 0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-progress-row:last-child {border-bottom:0!important;border-radius:0 0 9px 9px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-progress-row:only-child {border-radius:9px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-progress-row>div {min-width:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-progress-row b {display:block!important;font-size:12px!important;line-height:1.6!important;overflow-wrap:anywhere!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-progress-row small {display:block!important;margin-top:4px!important;line-height:1.6!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-payment-mini-list {margin:0!important;padding:0!important;border:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-payment-mini-list>div {display:flex!important;align-items:flex-start!important;justify-content:space-between!important;flex-wrap:wrap!important;gap:8px 20px!important;padding:12px 16px!important;line-height:1.6!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-payment-mini-list>div>span {min-width:0!important;overflow-wrap:anywhere!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .bonus-mini {
    padding:24px 0 0!important;margin:24px 0 0!important;border:0!important;border-top:1px solid var(--ws-line)!important;
    border-radius:0!important;box-shadow:none!important;background:transparent!important;
  }
  body.werger-ui:not([class*="printing-"]) .project-workspace .bonus-mini-head {display:flex!important;align-items:flex-start!important;flex-wrap:wrap!important;gap:12px!important;margin-bottom:14px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .bonus-mini-head>div {flex:1 1 240px!important;min-width:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .bonus-mini-head b {font-size:13px!important;line-height:1.5!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .bonus-mini-head .hint {margin-top:5px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .bonus-mini-row {padding:12px 16px!important;gap:8px 16px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .compact-empty {padding:16px 18px!important;min-height:0!important;line-height:1.65!important;font-size:12px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-tab-empty {padding:24px!important;min-height:0!important;border-radius:10px!important;line-height:1.65!important;background:var(--ws-soft)!important;box-shadow:none!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-tab-empty h3 {font-size:14px!important;line-height:1.6!important;margin:10px 0 6px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace :is(.project-task-group,.project-draft-task-row,.project-realization-row,.project-history-card) {padding:16px!important;border-radius:10px!important;box-shadow:none!important;min-width:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-closure-check {padding:16px!important;min-width:0!important;gap:12px!important;border-radius:10px!important;box-shadow:none!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-closure-check>div {min-width:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-closure-check b {line-height:1.6!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-closure-check small {display:block!important;line-height:1.6!important;margin-top:5px!important;overflow-wrap:anywhere!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace :is(.project-closure-summary,.project-create-staged-note,.project-task-draft-hint) {padding:14px 16px!important;gap:10px!important;line-height:1.65!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .bom-project-assemblies {margin:24px 0 0!important;padding:24px 0 0!important;border:0!important;border-top:1px solid var(--ws-line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .bom-section-head {gap:12px!important;margin-bottom:16px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .bom-section-head h3 {font-size:13px!important;line-height:1.5!important;margin:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .bom-section-head .hint {margin:5px 0 0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace :is(.project-files-subtitle,.project-realization-docs h4) {font-size:13px!important;line-height:1.6!important;margin:20px 0 14px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-history-card> b {font-size:12px!important;line-height:1.6!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-history-change {padding:10px 12px!important;line-height:1.6!important;min-width:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-history-change>span {min-width:0!important;overflow-wrap:anywhere!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-history-panel>h4 {font-size:13px!important;line-height:1.6!important;margin:20px 0 14px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .history-version-card {padding:16px!important;min-width:0!important;border-radius:10px!important;box-shadow:none!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .history-version-head {display:flex!important;flex-wrap:wrap!important;align-items:flex-start!important;gap:10px 16px!important;min-width:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .history-version-head>div {flex:1 1 200px!important;min-width:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .history-change-row {padding:10px 12px!important;gap:6px 12px!important;line-height:1.65!important;min-width:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .history-change-row>span {min-width:0!important;overflow-wrap:anywhere!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .history-version-actions {display:flex!important;flex-wrap:wrap!important;gap:8px!important;min-width:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .history-version-actions .btn {max-width:100%!important;min-width:0!important;height:auto!important;min-height:36px!important;padding:8px 12px!important;line-height:1.6!important;white-space:normal!important}
}

@container project-workspace (max-width:960px) {
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-row-top {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-row-schedule {grid-template-columns:minmax(0,1fr)!important;gap:20px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-period-card+.gpr-period-card {padding-top:20px!important;border-top:1px solid var(--ws-line)!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-period-fields {grid-template-columns:minmax(0,1fr) minmax(100px,.6fr) minmax(0,1fr)!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-realization-kpis {grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@container project-workspace (max-width:700px) {
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-section-header {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:14px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-section-actions {justify-content:flex-start!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .budget-row {grid-template-columns:minmax(0,1fr) auto 36px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .budget-article-field {grid-column:1/-1!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-tracking-cards {grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@container project-workspace (max-width:480px) {
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-work-row {padding:14px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-row-top {grid-template-columns:minmax(0,1fr)!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-period-fields {grid-template-columns:minmax(0,1fr) 90px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-period-fields>.field:last-child {grid-column:1/-1!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-period-fields>.field>label {min-height:33px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .gpr-period-fields>.field:last-child>label {min-height:0!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .budget-row {grid-template-columns:minmax(0,1fr) 36px!important;padding:14px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .budget-plan-field {grid-column:1/-1!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .budget-months-btn {justify-self:start!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-realization-kpis {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-materials-kpis {grid-template-columns:minmax(0,1fr)!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-progress-row {grid-template-columns:minmax(0,1fr)!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-closure-check {grid-template-columns:20px minmax(0,1fr)!important;padding:14px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-closure-check>strong {grid-column:2!important;justify-self:start!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .project-budget-summary {padding:12px 14px!important}
  body.werger-ui:not([class*="printing-"]) .project-workspace .history-change-row {grid-template-columns:minmax(0,1fr)!important}
}
}

@layer werger-workspace {
  @media screen {
    body.werger-ui:not([class*="printing-"]) .project-items-add-row {display:flex;align-items:center;justify-content:flex-start;padding:14px 0 18px;}
    body.werger-ui:not([class*="printing-"]) .project-items-add-row .btn {min-height:38px;max-width:100%;white-space:normal;}
    body.werger-ui:not([class*="printing-"]) .project-items-panel [aria-invalid="true"] {border-color:var(--primary,#ed1825)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--primary,#ed1825) 18%,transparent)!important;}
  }
}
