/* Schlatter Sicherheitsberatung – Oberfläche nach Markenbuch 1.3 (Formal Light).
   Farbe hat eine Aufgabe: Dunkelgrün führt, Mittelgrün gliedert, Schiefer trägt, Weiß schafft Ruhe; Lime nur auf Schieferblau. */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/poppins-latin-400-normal.woff") format("woff");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/poppins-latin-600-normal.woff") format("woff");
}
:root {
  color-scheme: light;
  --green: #00432e;
  --mid: #256a4c;
  --white: #fefefe;
  --slate: #1d3036;
  --slate2: #34404c;
  --lime: #bcf600;
  --muted: #66737a;
  --line: #d7deda;
  --lgreen: #eaf2ee;
  --lslate: #eef1f2;
  --err: #a32b1f;
  --err-bg: #fbecea;
  --ok: var(--mid);
  --r: 6px;
  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --control-h: 2.5rem;
  --font: "Poppins", Aptos, Arial, sans-serif;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--lslate);
  color: var(--slate);
  font: 400 0.9rem/1.55 var(--font);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--green);
  line-height: 1.25;
}
h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate);
}
a {
  color: var(--green);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.8rem;
}
.num {
  font-variant-numeric: tabular-nums;
}
.grow {
  flex: 1;
}
.pre-line {
  white-space: pre-line;
}
:focus-visible {
  outline: 2px solid var(--mid);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Gerüst */
.wrap {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: var(--s2);
}
.page.wide,
.topbar-in.wide {
  max-width: 112rem;
}
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 4rem;
}
.brand img {
  display: block;
  height: 34px;
  width: auto;
}
.menu {
  display: flex;
  gap: 2px;
}
.menu a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: var(--r);
  font-weight: 600;
}
.menu a:hover {
  color: var(--slate);
  background: var(--lslate);
}
.menu a[aria-current="page"] {
  color: var(--green);
  background: var(--lgreen);
}
.who {
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 0.8rem;
}
.page {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding-block: var(--s3) 3rem;
}
.page-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sheet {
  background: var(--white);
  border-radius: var(--r);
  padding: var(--s2) 1.25rem;
  border: 1px solid var(--line);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1);
}
.pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.75rem;
}
.pair.wide-first {
  grid-template-columns: minmax(0, 1fr) 10rem;
}

/* Bedienelemente */
.btn,
.input {
  font: inherit;
  color: var(--slate);
  min-height: var(--control-h);
  border-radius: var(--r);
  border: 1px solid #b9c3c1;
  background: var(--white);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  background: var(--lgreen);
  border-color: var(--mid);
}
.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.btn.primary:hover {
  background: var(--mid);
}
.btn.quiet {
  border-color: transparent;
  background: transparent;
}
.btn.quiet:hover {
  background: var(--lslate);
}
.btn.danger {
  color: var(--err);
}
.btn.small {
  min-height: 2rem;
  padding: 0 0.7rem;
  font-size: 0.8rem;
}
.btn.icon {
  width: 2.1rem;
  min-height: 2.1rem;
  padding: 0;
}
.btn:disabled {
  opacity: 0.5;
  cursor: wait;
}
.input {
  width: 100%;
  padding: 0.45rem 0.65rem;
}
textarea.input {
  line-height: 1.5;
  resize: vertical;
}
select.input {
  padding-block: 0;
}
.input:hover {
  border-color: var(--mid);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.field > span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate2);
}
.field small {
  color: var(--muted);
  font-size: 0.75rem;
}
.check {
  display: flex;
  align-items: center;
  gap: var(--s1);
  min-height: 2rem;
  cursor: pointer;
}
.check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--green);
}
.mono-ish {
  font-size: 0.82rem;
}

/* Listen */
.actions {
  margin-bottom: 0.25rem;
}
.table-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
.table-wrap th {
  text-align: start;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: var(--green);
  padding: 0.6rem 0.9rem;
  white-space: nowrap;
}
.table-wrap td {
  padding: 0.6rem 0.9rem;
  vertical-align: top;
  border-top: 1px solid var(--line);
}
.table-wrap tbody tr:nth-child(even) td {
  background: var(--lslate);
}
.table-wrap td .sub {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}
.rowlink {
  font-weight: 600;
  text-decoration: none;
}
.rowlink:hover {
  text-decoration: underline;
}
.status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 1px 0.55rem;
  border-radius: 999px;
  background: var(--lslate);
  color: var(--slate2);
}
.s-ANGENOMMEN,
.s-AKTIV,
.s-ABGESCHLOSSEN {
  background: var(--lgreen);
  color: var(--green);
}
.s-ABGELEHNT {
  background: var(--err-bg);
  color: var(--err);
}
.state {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s3);
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}
.band {
  border-radius: var(--r);
  padding: 0.75rem 1rem;
}
.band.err {
  background: var(--err-bg);
  border-inline-start: 3px solid var(--err);
}
.band ul {
  margin: 0.25rem 0 0;
  padding-inline-start: 1.2rem;
}

/* Vorlagenwahl */
.templates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: var(--s2);
}
.template {
  font: inherit;
  text-align: start;
  color: var(--slate);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: var(--r);
  padding: 1rem 1.1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.template:hover {
  border-color: var(--mid);
  background: var(--lgreen);
}
.template strong {
  color: var(--green);
  font-size: 1rem;
}
.template span {
  color: var(--muted);
  font-size: 0.82rem;
}
.template ol {
  margin: 0.4rem 0 0;
  padding-inline-start: 1.2rem;
  font-size: 0.8rem;
}
.template em {
  font-style: normal;
  color: var(--mid);
  font-weight: 600;
  font-size: 0.72rem;
}

/* Editor: Eingaben links, Papier rechts */
.editor {
  display: grid;
  grid-template-columns: minmax(0, 40rem) minmax(0, 1fr);
  gap: var(--s3);
  align-items: start;
}
.edit-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}
.toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--s1);
  background: var(--lslate);
  padding-block: 0.5rem;
}
details.sheet > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--s1);
}
details.sheet > summary::-webkit-details-marker {
  display: none;
}
details.sheet > summary::after {
  content: "";
  margin-inline-start: auto;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--mid);
  border-bottom: 2px solid var(--mid);
  transform: rotate(45deg);
  transition: transform 0.15s;
}
details.sheet[open] > summary {
  margin-bottom: 0.9rem;
}
details.sheet[open] > summary::after {
  transform: rotate(-135deg);
}
.count {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--lgreen);
  color: var(--green);
  font-size: 0.75rem;
}
.modules {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.module {
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--green);
  border-radius: var(--r);
  padding: 0.75rem 0.9rem 0.9rem;
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--white);
}
.module:has([data-mf="kind"] option[value="optional"]:checked),
.module:has([data-mf="kind"] option[value="wahlweise"]:checked) {
  border-inline-start-color: var(--mid);
  background:
    linear-gradient(var(--lslate), var(--lslate)) top / 100% 3rem no-repeat,
    var(--white);
}
.module-head {
  display: flex;
  align-items: center;
  gap: 2px;
}
.module-no {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
}
.positions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pos-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4rem 4.6rem 7.2rem 6rem 6rem 2.1rem;
  gap: 0.35rem;
  align-items: center;
}
.pos-row .input {
  min-height: 2.1rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.82rem;
}
.pos-row output {
  text-align: end;
  font-size: 0.82rem;
  white-space: nowrap;
}
.pos-head {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}
.pos-row.lib {
  grid-template-columns: minmax(0, 1fr) 4rem 4.6rem 9rem 6rem 2.1rem;
}
.pos-head span:nth-child(6) {
  text-align: end;
}
.module-sum {
  font-size: 0.82rem;
  color: var(--muted);
}
.module-sum output {
  color: var(--green);
  font-weight: 600;
  margin-inline-start: 0.25rem;
}
.more > summary {
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.add-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s1);
  padding: 0.75rem;
  border: 1px dashed var(--mid);
  border-radius: var(--r);
  background: var(--lgreen);
}
.rate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7rem 9rem 2.1rem;
  gap: 0.35rem;
}
.rate-row .input {
  min-height: 2.1rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.82rem;
}
.row > select.input {
  flex: 1;
  min-width: 0;
  min-height: 2rem;
  font-size: 0.82rem;
}
.actions-more {
  padding-block: 0.6rem;
}
.preview-col {
  align-self: stretch;
  min-width: 0;
}
.preview-sticky {
  position: sticky;
  top: var(--s2);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.side {
  background: var(--slate);
  color: #fff;
  border-radius: var(--r);
  padding: 0.8rem 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  align-items: center;
}
.side-sum {
  display: flex;
  flex-direction: column;
}
.side-sum strong {
  color: var(--lime);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.side .muted {
  color: #c9d2d0;
}
.warnlist {
  margin: 0;
  padding-inline-start: 1.1rem;
  font-size: 0.8rem;
  color: #ffd9a8;
}
.ok-line {
  font-size: 0.8rem;
  color: #d5f3a0;
}
.stage {
  background: #d9e0de;
  border-radius: var(--r);
  padding: var(--s2);
  max-height: calc(100dvh - 9rem);
  overflow: auto;
  container-type: inline-size;
}
.stage[data-stale] {
  opacity: 0.55;
}

/* Projekte */
.proposal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21rem;
  gap: var(--s3);
  align-items: start;
}
.proposal-grid aside {
  position: sticky;
  top: var(--s2);
}
.task-row {
  display: grid;
  grid-template-columns: minmax(9rem, 2fr) minmax(7rem, 1fr) 9rem 8rem auto;
  gap: 0.5rem;
  align-items: end;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.document-row {
  display: grid;
  grid-template-columns: 2fr 8rem 2fr auto;
  gap: 0.5rem;
  align-items: end;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.module-list {
  margin: 0;
  padding-inline-start: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
}
.module-list li > * {
  vertical-align: top;
}
.module-list b,
.total-line b {
  float: right;
  font-weight: 600;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.module-list em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--mid);
}
.total-line {
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
  font-weight: 600;
}

/* ===== Papier: Vorschau mit Inhalt und Gliederung des PDFs (A4, Formal Light) ===== */
.sp-sheet {
  position: relative;
  background: #fff;
  color: var(--slate);
  max-width: 52rem;
  margin: 0 auto 1.25rem;
  padding: 2.4rem 3rem 3.6rem;
  box-shadow: 0 1px 4px rgb(29 48 54 / 0.25);
  font-size: 12.5px;
  line-height: 1.55;
  min-height: 30rem;
}
.sp-sheet p {
  margin: 0 0 0.6em;
}
.sp-logo {
  display: block;
  width: 190px;
  height: auto;
}
.sp-logo.small {
  width: 110px;
}
.sp-letterhead {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2.2rem;
}
.sp-address {
  float: left;
  width: 55%;
}
.sp-sender {
  font-size: 9px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  margin-bottom: 0.6rem;
}
.sp-recipient {
  white-space: pre-line;
  min-height: 5.5em;
}
.sp-mail {
  font-size: 11px;
  color: var(--muted);
  margin-top: 0.4rem;
}
.sp-meta {
  float: right;
  width: 38%;
  margin: 1.3rem 0 0;
  display: grid;
  gap: 2px;
  font-size: 11px;
}
.sp-meta div {
  display: grid;
  grid-template-columns: 6rem 1fr;
}
.sp-meta dt {
  color: var(--muted);
}
.sp-meta dd {
  margin: 0;
  font-weight: 600;
}
.sp-subject {
  clear: both;
  padding-top: 2.4rem;
  font-size: 20px;
  line-height: 1.3;
  color: var(--green);
  margin-bottom: 0.9rem;
}
.sp-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  background: var(--lgreen);
  border-inline-start: 3px solid var(--green);
  padding: 0.6rem 0.9rem;
  margin-bottom: 1.1rem;
  font-size: 11px;
}
.sp-facts span {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sp-greet {
  margin-top: 1rem !important;
}
.sp-sign {
  font-weight: 600;
  margin-top: 1.4rem !important;
}
.sp-firm {
  position: absolute;
  left: 3rem;
  right: 3rem;
  bottom: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.3rem;
  font-size: 8.5px;
  color: var(--muted);
  text-align: center;
}
.sp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.4rem;
  margin-bottom: 1.4rem;
  font-size: 10px;
  color: var(--muted);
}
.sp-foot {
  position: absolute;
  left: 3rem;
  right: 3rem;
  bottom: 1.1rem;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
}
.sp-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mid);
  margin: 0 !important;
}
.sp-h1 {
  font-size: 21px;
  color: var(--green);
  margin: 0.2rem 0 0.8rem;
}
.sp-h1 + p {
  margin-top: -0.2rem;
}
.sp-sheet .sp-h1:not(:first-of-type) {
  margin-top: 1.6rem;
}
.sp-h2 {
  font-size: 15px;
  color: var(--slate);
  margin: 1.2rem 0 0.4rem;
}
.sp-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 1rem;
}
.sp-card {
  display: flex;
  flex-direction: column;
  background: var(--lgreen);
  overflow-wrap: anywhere;
}
.sp-card header {
  background: var(--green);
  color: #fff;
  padding: 10px 12px;
  min-height: 5.4rem;
}
.sp-card header span {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
}
.sp-card h3 {
  font-size: 13.5px;
  line-height: 1.3;
  margin-top: 3px;
  color: #fff;
}
.sp-card.alt {
  background: var(--lslate);
}
.sp-card.alt header {
  background: var(--mid);
}
.sp-card-body {
  padding: 10px 12px 12px;
}
.sp-price {
  font-size: 19px;
  font-weight: 600;
  color: var(--green);
  line-height: 1.2;
}
.sp-unit {
  font-size: 9.5px;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.sp-card ul {
  margin: 0;
  padding-inline-start: 1rem;
  font-size: 10.5px;
  line-height: 1.4;
}
.sp-card li::marker {
  color: var(--mid);
}
.sp-sum {
  background: var(--slate);
  color: #fff;
  padding: 1rem 1.2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 1rem;
  align-items: end;
}
.sp-sum-label {
  grid-column: 1 / -1;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.sp-sum dl {
  margin: 0;
  font-size: 11px;
  display: grid;
  gap: 1px;
}
.sp-sum dl div {
  display: flex;
  gap: 0.5rem;
}
.sp-sum dt {
  min-width: 7.5rem;
  opacity: 0.85;
}
.sp-sum dd {
  margin: 0;
}
.sp-sum-total {
  color: var(--lime);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  text-align: end;
}
.sp-sum-total small {
  display: block;
  font-size: 9.5px;
  color: #fff;
  font-weight: 400;
}
.sp-sum p {
  grid-column: 1 / -1;
  font-size: 11px;
  margin: 0.3rem 0 0;
}
.sp-module {
  margin: 1.3rem 0 0.4rem;
}
.sp-module-head {
  border-inline-start: 3px solid var(--green);
  padding-inline-start: 0.7rem;
  margin-bottom: 0.6rem;
}
.sp-module-head span {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mid);
}
.sp-module-head h3 {
  font-size: 16px;
  color: var(--green);
  line-height: 1.3;
}
.sp-module-head em {
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  color: var(--mid);
  background: var(--lslate);
  padding: 1px 6px;
}
.sp-sheet ul {
  margin: 0 0 0.6em;
  padding-inline-start: 1.2rem;
}
.sp-sheet ul li {
  margin-bottom: 0.25em;
}
.sp-sheet ul li::marker {
  color: var(--mid);
}
.sp-sheet ul.sp-l1 {
  list-style: square;
}
.sp-sheet ul.sp-l2 {
  list-style: "– ";
  margin-top: 0.2em;
}
.sp-note {
  font-size: 11px;
  color: var(--muted);
}
.sp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  margin: 0.5rem 0 0.8rem;
  font-variant-numeric: tabular-nums;
}
.sp-table th {
  background: var(--green);
  color: #fff;
  font-weight: 600;
  text-align: start;
  padding: 5px 8px;
}
.sp-table td {
  padding: 5px 8px;
  vertical-align: top;
}
.sp-table tbody tr:nth-child(even) td {
  background: var(--lslate);
}
.sp-table td:nth-child(n + 2),
.sp-table th:nth-child(n + 2) {
  text-align: end;
  white-space: nowrap;
}
.sp-table.rates td:nth-child(3) {
  text-align: start;
}
.sp-table tfoot td {
  border-top: 1.5px solid var(--green);
  font-weight: 600;
  color: var(--green);
}
.sp-panel {
  background: var(--lgreen);
  border-inline-start: 3px solid var(--green);
  padding: 0.6rem 0.9rem;
  margin: 1rem 0;
  font-size: 11.5px;
}
.sp-sheet ul.sp-checks {
  list-style: none;
  padding: 0;
}
.sp-checks li::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 1.2px solid var(--green);
  margin-inline-end: 0.6rem;
  vertical-align: -1px;
}
.sp-small {
  font-size: 10.5px;
  color: var(--muted);
}
.sp-signs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
  font-size: 10.5px;
  color: var(--muted);
}
.sp-signs span {
  display: block;
  border-top: 1px solid var(--slate);
  margin-bottom: 3px;
}
.sp-empty {
  color: var(--muted);
}
@container (width < 640px) {
  .sp-sheet {
    padding: 1.5rem 1.2rem 3.2rem;
  }
  .sp-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .sp-address,
  .sp-meta {
    float: none;
    width: auto;
  }
  .sp-subject {
    padding-top: 1rem;
  }
}
/* ===== Erweiterungen: Projekte, Ablauf, Planung, Eingang ===== */
.section-title {
  margin-top: 0.5rem;
}
.sub-h {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.4rem;
}
.plain {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--mid);
  background: var(--lgreen);
  border-radius: 999px;
  padding: 1px 0.5rem;
  margin-inline-start: 0.5rem;
}
.pair.four {
  grid-template-columns: 9rem minmax(0, 1fr) 9.5rem 9.5rem;
}
.band.warn {
  background: #fff6e5;
  border-inline-start: 3px solid #b26b00;
}
.band.ok {
  background: var(--lgreen);
  border-inline-start: 3px solid var(--mid);
}
.ok-text {
  color: var(--mid);
}
.warn-text {
  color: #9a5a00;
  font-weight: 600;
}
.over {
  color: #ffd9a8;
}
.under {
  color: #d5f3a0;
}
.plain-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.plain-fieldset[disabled] {
  opacity: 0.75;
}
.input.inline {
  display: inline-block;
  width: 12rem;
  min-height: 2rem;
}
.input.search {
  width: 18rem;
}
meter {
  width: 5rem;
  height: 0.6rem;
  vertical-align: middle;
}
/* Ablauf im Angebot */
.workflow {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  border-top: 4px solid var(--slate);
}
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: st;
}
.steps li {
  counter-increment: st;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--lslate);
  color: var(--muted);
}
.steps li::before {
  content: counter(st) " ";
  font-weight: 600;
}
.steps li.done {
  background: var(--lgreen);
  color: var(--green);
}
.steps li.now {
  background: var(--slate);
  color: var(--lime);
  font-weight: 600;
}
.choice {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0.5rem 0.8rem;
}
.choice legend {
  font-size: 0.78rem;
  font-weight: 600;
}
.rateset-row {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr) 7rem 6rem 2.1rem;
  gap: 0.35rem;
}
.rateset-row .input {
  min-height: 2.1rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.82rem;
}
.clauses {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.clause {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0.4rem 0.7rem;
}
.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.suggest {
  white-space: pre-line;
  background: var(--lslate);
  border-inline-start: 3px solid var(--mid);
  padding: 0.6rem 0.8rem;
  border-radius: var(--r);
  font-size: 0.85rem;
  margin-block: 0.4rem;
}
.warnbox {
  background: #fff6e5;
  border-radius: var(--r);
  padding: 0.6rem 0.6rem 0.6rem 1.6rem;
  font-size: 0.8rem;
}
/* Startseite */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
}
.kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: var(--r);
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: var(--slate);
  display: flex;
  flex-direction: column;
}
.kpi strong {
  font-size: 1.6rem;
  color: var(--green);
  line-height: 1.1;
}
.kpi span {
  font-size: 0.8rem;
  color: var(--muted);
}
.dash {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: var(--s2);
  align-items: start;
}
.duelist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.due {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.45rem 0.2rem;
  border-bottom: 1px solid var(--line);
}
.due a {
  font-weight: 600;
  text-decoration: none;
}
.due-date {
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}
.due-level {
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 1px 0.5rem;
  background: var(--lslate);
  color: var(--muted);
}
.due.alarm .due-level {
  background: var(--err-bg);
  color: var(--err);
}
.due.warn .due-level {
  background: #fff6e5;
  color: #9a5a00;
}
/* Projektseite */
.proj-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.6rem;
}
.kv {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
}
.kv > span:first-child {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mid);
}
.briefing {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.b-row {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr) 11rem minmax(0, 0.7fr);
  gap: 0.6rem;
  align-items: start;
  padding: 0.5rem 0.7rem;
  border-inline-start: 4px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.b-row.s-BEKANNT {
  border-inline-start-color: var(--mid);
}
.b-row.s-FEHLT {
  border-inline-start-color: #c98a1b;
  background: #fffaf0;
}
.b-row.s-UNGEKLAERT {
  border-inline-start-color: var(--err);
  background: #fdf3f2;
}
.b-row.s-ENTFAELLT {
  border-inline-start-color: var(--muted);
  opacity: 0.8;
}
.b-label {
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
}
.b-label abbr {
  text-decoration: none;
  color: var(--err);
}
.b-meta {
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--muted);
}
.b-row .input {
  min-height: 2.1rem;
  font-size: 0.85rem;
  padding: 0.3rem 0.5rem;
}
.party-row,
.date-row,
.q-row,
.task-row,
.staff-row,
.team-row {
  display: grid;
  gap: 0.5rem;
  align-items: end;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.party-row {
  grid-template-columns: 11rem repeat(4, minmax(0, 1fr)) auto;
}
.date-row {
  grid-template-columns: 10rem minmax(0, 1fr) 9.5rem 9.5rem 6.5rem 8rem auto;
}
.date-row.open {
  background: #fdf3f2;
}
.q-row {
  grid-template-columns: minmax(0, 2fr) 9rem 9rem 9.5rem 8.5rem auto;
}
.q-row.done {
  opacity: 0.65;
}
.task-row {
  grid-template-columns: minmax(0, 2fr) 9rem 9.5rem 9.5rem 8rem auto auto;
}
.staff-row {
  grid-template-columns: 10rem minmax(0, 2fr) 9.5rem 9.5rem 8rem auto;
}
.staff-row.conflict {
  background: var(--err-bg);
}
.team-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 7rem minmax(0, 1fr) auto;
}
.wide {
  grid-column: 1 / -1;
}
.time-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.5rem;
  align-items: end;
}
/* Gantt */
.gantt-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  max-height: 34rem;
}
.gantt {
  display: block;
  font-family: var(--font);
}
.gantt .g-month {
  font-size: 10px;
  font-weight: 600;
  fill: var(--green);
}
.gantt .g-day {
  font-size: 8.5px;
  fill: var(--muted);
  text-anchor: middle;
}
.gantt .g-mline {
  stroke: var(--line);
  stroke-width: 1;
}
.gantt .g-weekend {
  fill: var(--lslate);
}
.gantt .g-stripe {
  fill: #f7f9f8;
}
.gantt .g-label {
  font-size: 10.5px;
  fill: var(--slate);
}
.gantt .g-label.g-open {
  fill: var(--err);
}
.gantt .g-bar {
  fill: var(--slate2);
}
.gantt .g-event {
  fill: var(--green);
}
.gantt .g-date {
  fill: #9ccbb5;
}
.gantt .g-task {
  fill: var(--slate2);
}
.gantt .g-staff {
  fill: var(--mid);
}
.gantt .g-tentative {
  fill-opacity: 0.45;
}
.gantt .done {
  fill-opacity: 0.35;
}
.gantt .g-conflict {
  stroke: var(--err);
  stroke-width: 2;
}
.gantt .g-ms {
  fill: var(--green);
  stroke: #fff;
}
.gantt .g-ms.done {
  fill: var(--muted);
}
.gantt .g-today {
  stroke: var(--err);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}
.gantt .g-today-t {
  font-size: 9px;
  fill: var(--err);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
  align-items: center;
  color: var(--muted);
  margin: 0;
}
.lg {
  display: inline-block;
  width: 0.9rem;
  height: 0.55rem;
  border-radius: 2px;
  margin-inline-end: 0.3rem;
  vertical-align: middle;
  background: var(--slate2);
}
.lg.event {
  background: var(--green);
}
.lg.date {
  background: #9ccbb5;
}
.lg.ms {
  width: 0.6rem;
  height: 0.6rem;
  transform: rotate(45deg);
  background: var(--green);
}
.lg.staff {
  background: var(--mid);
}
.lg.conflict {
  background: #fff;
  outline: 2px solid var(--err);
}
/* Eingang */
.proposal {
  align-items: flex-start;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}
.proposal .quote {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}
.voice {
  border-inline-start: 4px solid var(--mid);
}
td.diff {
  max-width: 22rem;
  font-size: 0.8rem;
  word-break: break-word;
}
/* Papier: Seite 1 „Auf einen Blick“ */
.sp-glance {
  margin: 0.2rem 0 1rem;
}
.sp-table.glance tbody td:nth-child(2) {
  text-align: start;
  color: var(--mid);
  font-size: 10px;
}
@media (width < 75rem) {
  .dash {
    grid-template-columns: minmax(0, 1fr);
  }
  .b-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .editor {
    grid-template-columns: minmax(0, 1fr);
  }
  .preview-sticky {
    position: static;
  }
  .stage {
    max-height: none;
  }
  .proposal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .proposal-grid aside {
    position: static;
  }
}
@media (width < 40rem) {
  .pos-row {
    grid-template-columns: 1fr 1fr 2.1rem;
  }
  .pos-row [data-pf="title"] {
    grid-column: 1 / -1;
  }
  .pos-head {
    display: none;
  }
  .rate-row,
  .task-row,
  .document-row,
  .party-row,
  .date-row,
  .q-row,
  .staff-row,
  .team-row,
  .rateset-row,
  .pair.four,
  .b-row,
  .due {
    grid-template-columns: 1fr 1fr;
  }
  .menu {
    flex-wrap: wrap;
  }
  .pair.wide-first {
    grid-template-columns: 1fr;
  }
  .topbar-in {
    flex-wrap: wrap;
    gap: var(--s1);
    padding-block: var(--s1);
  }
}
@media print {
  .topbar,
  .edit-col,
  .side {
    display: none;
  }
  .editor {
    display: block;
  }
  .stage {
    max-height: none;
    background: none;
    padding: 0;
  }
}
