/* woijd Proof – nur, was das Paket woijd-ui nicht mitbringt. Keine Farbwerte: alles über die Token des Pakets. */
.d-kopfzeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.d-kopfzeile h1 { margin: 0; }
.d-rechts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.w .d-abstand { margin-top: 22px; }
.w .d-abstand-klein { margin-top: 10px; }
.d-voll { width: 100%; }
.d-spalte-s { width: 12%; } .d-spalte-m { width: 20%; } .d-spalte-l { width: 34%; }
.d-zahlfeld { max-width: 130px; text-align: right; font-variant-numeric: tabular-nums; }
.d-kurzfeld { max-width: 170px; }
.d-nowrap { white-space: nowrap; }
.d-vorzeile { white-space: pre-line; }
.d-befunde { display: flex; flex-direction: column; }
.d-befund { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }
.d-befund:first-child { border-top: 0; }
.d-befund .w-marke { flex: none; }
.d-befund a { margin-left: auto; flex: none; font-size: 13px; }
.d-editor { width: 100%; border-collapse: collapse; }
.d-editor th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); padding: 0 6px 6px 0; }
.d-editor td { padding: 4px 6px 4px 0; vertical-align: top; }
.d-editor td:last-child { width: 44px; padding-right: 0; }
.d-editor input, .d-editor select { width: 100%; }
.d-rahmen-x { overflow-x: auto; }
.d-summe { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-variant-numeric: tabular-nums; }
/* Dokument: wie ein Blatt Papier in der Ansicht, mit den Token des Pakets */
.d-dok { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-karte); padding: 28px 32px; max-width: 880px; }
.d-dok h2 { font-size: 20px; margin: 30px 0 10px; padding-top: 18px; border-top: 1px solid var(--border); }
.d-dok h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.d-dok h3 { font-size: 16px; margin: 24px 0 8px; }
.d-dok h4 { font-size: 14px; margin: 18px 0 6px; }
.d-dok h5 { font-size: 13px; margin: 12px 0 4px; }
.d-dok p { margin: 0 0 10px; white-space: pre-line; }
.d-dok table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 13px; }
.d-dok table.t th { text-align: left; border-bottom: 2px solid var(--text); padding: 6px 8px 6px 0; vertical-align: bottom; font-size: 12px; }
.d-dok table.t td { border-bottom: 1px solid var(--border); padding: 6px 8px 6px 0; vertical-align: top; }
.d-dok table.p td { padding: 4px 10px 4px 0; vertical-align: top; }
.d-dok table.p td:first-child { width: 34%; color: var(--text-dim); }
.d-dok .z { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.d-textblock { position: relative; border-left: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); padding: 2px 0 2px 12px; margin: 0 0 10px; }
.d-textblock.geaendert { border-left-color: var(--primary); }
.d-textblock p { margin-bottom: 4px; }
.d-textblock .w-knopf { margin-top: 2px; }
.d-urteil { font-size: 22px; font-weight: 800; text-align: center; letter-spacing: .04em; margin: 18px 0; }
.d-urteil.offen { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--text-dim); border: 1px dashed var(--border); border-radius: var(--radius); padding: 14px; }
.d-unterschrift { margin: 22px 0 10px; }
.d-unterschrift img { height: 56px; display: block; }
.d-unterschrift .linie { border-top: 1px solid var(--text); max-width: 300px; padding-top: 4px; }
.d-bild img { max-width: 100%; max-height: 360px; border-radius: var(--radius); }
.d-vorschau { width: 100%; height: 78vh; border: 1px solid var(--border); border-radius: var(--radius-karte); background: var(--surface); }
.d-unterschriftsbild { max-height: 70px; max-width: 280px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; } /* woijd-ui: frei – Unterschrift steht immer auf Weiß wie im Dokument */
.d-treffer { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 4px; max-height: 240px; overflow: auto; }
.d-treffer button { text-align: left; border: 0; background: transparent; color: var(--text); padding: 10px 12px; min-height: 44px; font: inherit; cursor: pointer; border-top: 1px solid var(--border); }
.d-treffer button:first-child { border-top: 0; }
.d-treffer button:hover { background: var(--hover); }
.d-verlauf { display: flex; flex-direction: column; }
.d-verlauf div { padding: 8px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.d-verlauf div:first-child { border-top: 0; }
.d-wahl { display: flex; flex-direction: column; gap: 4px; }
.d-wahl .w-schalter { align-items: flex-start; padding: 6px 0; }
.d-wahl button { text-align: left; justify-content: flex-start; height: auto; padding: 12px 14px; flex-direction: column; align-items: flex-start; gap: 2px; }
.d-wahl button span { font-weight: 500; color: var(--text-dim); font-size: 13px; white-space: normal; }
.w-knopf.d-wahlknopf { min-height: 56px; }
@media (max-width: 700px) {
  .d-dok { padding: 18px 16px; } .d-dok table.p td:first-child { width: 42%; }
  .d-dok table.t { min-width: 560px; }
  /* Listen: jede Zeile wird ein Block, der Kopf entfällt – nichts wird gequetscht, nichts schiebt seitlich */
  .w-tabelle.d-liste thead { display: none; }
  .w-tabelle.d-liste, .w-tabelle.d-liste tbody, .w-tabelle.d-liste tr, .w-tabelle.d-liste td { display: block; width: auto; }
  .w-tabelle.d-liste tr { padding: 12px 14px; border-top: 1px solid var(--border); }
  .w-tabelle.d-liste tr:first-child { border-top: 0; }
  .w-tabelle.d-liste td { padding: 2px 0; border: 0; }
  .w-tabelle.d-zahlen { min-width: 620px; }
  .w-tabelle-rahmen { overflow-x: auto; }
  /* Zeilen-Editor: erstes Feld über die Breite, die übrigen darunter nebeneinander */
  .d-editor thead { display: none; }
  .d-editor, .d-editor tbody { display: block; }
  .d-editor tr { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0; border-top: 1px solid var(--border); }
  .d-editor tr:first-child { border-top: 0; }
  .d-editor td { padding: 0; flex: 1 1 90px; width: auto; }
  .d-editor td:first-child { flex: 1 1 100%; }
  .d-editor td:last-child { flex: 0 0 44px; }
  .d-zahlfeld { max-width: none; }
  .d-befund { flex-wrap: wrap; } .d-befund > span:nth-child(2) { flex: 1 1 100%; order: 3; } .d-befund a { order: 2; }
}
