/* Wohnungsübergabe – Oberfläche für iPad (Hochformat), bedienbar mit Finger und Stift.
   Hell und kontrastreich, damit sie auch bei Tageslicht in leeren Wohnungen gut lesbar ist. */

:root {
  --blau: #1E398F; /* CI-Blau laut Logo-Vorgabe (RGB 30/57/143) */
  --blau-hell: #e7ebf6;
  --text: #1b1f24;
  --text-leise: #5a6472;
  --linie: #d5dbe3;
  --flaeche: #ffffff;
  --grund: #f3f5f8;
  --gruen: #1f7a3d;
  --rot: #b3261e;
  --rot-hell: #fdecea;
  --gelb-hell: #fff6dc;
  --gelb-linie: #e6c35a;
  --info-hell: #eaf2fb;
  --radius: 10px;
  --tipp: 52px; /* Mindesthöhe für Bedienelemente */
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; } /* kein Zoom durch Doppeltippen */
body {
  margin: 0;
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--grund);
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Kopf ---------- */
.kopf {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  min-height: 56px;
  padding: calc(env(safe-area-inset-top) + 6px) 16px 6px;
  background: var(--blau); color: #fff;
}
.kopf h1 { flex: 1; margin: 0; font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf-zurueck { background: none; border: 0; color: #fff; font: inherit; font-size: 18px; min-height: 44px; padding: 0 8px 0 0; cursor: pointer; }
.kopf-version { font-size: 13px; opacity: .75; }

main { max-width: 920px; margin: 0 auto; padding: 16px; }
.seite { display: flex; flex-direction: column; gap: 16px; }
.seite.schmal { max-width: 640px; margin: 0 auto; width: 100%; }

h2 { font-size: 18px; margin: 0 0 12px; }
.gruppe h2 { margin: 8px 0; color: var(--text-leise); font-size: 15px; text-transform: uppercase; letter-spacing: .03em; }
.klein { font-size: 14px; color: var(--text-leise); }
.leer { color: var(--text-leise); text-align: center; padding: 24px 0; }
.versteckt { display: none !important; }
a { color: var(--blau); }

/* ---------- Karten ---------- */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.karte > h2 { margin-bottom: 0; }
.karte p { margin: 0; }
.platzhalter { border-style: dashed; background: #fafbfc; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tipp); padding: 0 18px;
  border: 1px solid var(--linie); border-radius: var(--radius);
  background: var(--flaeche); color: var(--text);
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.knopf:active { transform: translateY(1px); }
.knopf:disabled { opacity: .45; cursor: default; }
.knopf.primaer { background: var(--blau); border-color: var(--blau); color: #fff; }
.knopf.gefahr { background: var(--rot); border-color: var(--rot); color: #fff; }
.knopf.gefahr-leise { color: var(--rot); }
.knopf.gross { min-height: 60px; font-size: 18px; padding: 0 24px; }
.knopf.auswahl { flex: 1; min-height: 72px; font-size: 19px; }
.knopf.auswahl.gewaehlt { background: var(--blau-hell); border: 2px solid var(--blau); color: var(--blau); font-weight: 700; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 10px; }
.knopfreihe.gross .knopf { flex: 1; min-width: 150px; min-height: 72px; font-size: 19px; }
.mini { min-width: 44px; min-height: 44px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); font-size: 16px; cursor: pointer; color: var(--text); }
.mini:disabled { opacity: .3; }
.mini.gefahr-leise { color: var(--rot); }
.chip { min-height: 48px; padding: 0 16px; border-radius: 24px; border: 1px solid var(--linie); background: var(--flaeche); font: inherit; cursor: pointer; color: var(--text); }
.zeile-zwischen { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Listen ---------- */
.liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.listeneintrag {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 64px; padding: 10px 14px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  color: var(--text); text-decoration: none; font: inherit; text-align: left; cursor: pointer;
}
.liste.kompakt .listeneintrag { min-height: 56px; }
.listeneintrag.alarm { border: 2px solid var(--rot); background: var(--rot-hell); }
details.listeneintrag { display: block; }
details.listeneintrag summary { min-height: 36px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.eintrag-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.eintrag-text small { color: var(--text-leise); font-size: 14px; }
.pfeil { font-size: 28px; color: var(--text-leise); line-height: 1; }
.abzeichen { flex: none; padding: 4px 10px; border-radius: 12px; font-size: 14px; font-weight: 600; background: var(--blau-hell); color: var(--blau); }
.abzeichen.auszug { background: #fdeee0; color: #8a4b0f; }
.abzeichen.einzug { background: #e3f4e8; color: var(--gruen); }
.unterliste { margin: 8px 0 0; padding-left: 20px; font-size: 15px; }
.verlauf { margin: 0; padding-left: 20px; font-size: 15px; color: var(--text-leise); }

/* ---------- Definitionstabelle ---------- */
.tabelle { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.tabelle dt { color: var(--text-leise); }
.tabelle dd { margin: 0; word-break: break-word; }

/* ---------- Formulare ---------- */
.formular { display: flex; flex-direction: column; gap: 12px; }
.feld { display: flex; flex-direction: column; gap: 4px; }
.feld-name { font-weight: 600; font-size: 15px; }
.feld-hilfe { font-size: 13px; color: var(--text-leise); }
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; min-height: var(--tipp); padding: 10px 12px;
  border: 1px solid #b9c2ce; border-radius: 8px; background: #fff;
  font: inherit; font-size: 17px; color: var(--text);
}
input:focus, select:focus, textarea:focus, .knopf:focus-visible, .mini:focus-visible, .listeneintrag:focus-visible { outline: 3px solid #7aa7e0; outline-offset: 1px; }
input[type=date], input[type=time] { display: block; min-width: 10em; }
input::-webkit-date-and-time-value { text-align: left; }
input.pin { font-size: 24px; letter-spacing: .3em; text-align: center; }

.listeneditor { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.listeneditor li { display: flex; align-items: center; gap: 8px; }
.listeneditor li input[type=text] { flex: 1; }
.listeneditor li.inaktiv input[type=text] { color: var(--text-leise); text-decoration: line-through; }
.aktiv-schalter { display: flex; align-items: center; gap: 4px; font-size: 15px; white-space: nowrap; min-height: 44px; }
.aktiv-schalter input { width: 22px; height: 22px; }

/* ---------- Kacheln (Einstellungen) ---------- */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.kachel { display: flex; flex-direction: column; gap: 4px; padding: 16px; min-height: 92px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.kachel span { font-size: 14px; color: var(--text-leise); }

/* ---------- Hinweise ---------- */
.meldeblock { border-radius: var(--radius); padding: 12px 14px; border: 1px solid; }
.meldeblock p { margin: 4px 0 0; }
.meldeblock ul { margin: 6px 0 0; padding-left: 20px; font-size: 15px; }
.meldeblock.fehler { background: var(--rot-hell); border-color: #e8a29c; }
.meldeblock.warnung { background: var(--gelb-hell); border-color: var(--gelb-linie); }
.meldeblock.hinweis { background: var(--info-hell); border-color: #b8d0ec; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 40px);
  max-width: min(90vw, 560px); padding: 12px 18px; border-radius: var(--radius);
  background: #1b1f24; color: #fff; font-size: 16px; opacity: 0; pointer-events: none; transition: .2s; z-index: 40;
}
.toast.sichtbar { opacity: 1; transform: translate(-50%, 0); }
.toast.fehler { background: var(--rot); }

.update-band {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--gelb-hell); border-top: 1px solid var(--gelb-linie);
}

/* ---------- Dialog ---------- */
.dialog-hintergrund { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 35, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { background: #fff; border-radius: 14px; width: min(600px, 100%); max-height: 90vh; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.dialog h2 { margin: 0; }
.dialog-inhalt p { margin: 0 0 8px; }
.dialog-knoepfe { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }

/* ---------- Fuß ---------- */
.fuss { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--linie); color: var(--text-leise); font-size: 14px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .tabelle { grid-template-columns: 1fr; gap: 0 0; }
  .tabelle dd { margin-bottom: 8px; }
}

/* =========================================================
   Schritt 2 – Erfassung
   ========================================================= */
.kopf-status { font-size: 13px; opacity: .85; white-space: nowrap; }
.rahmen { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.rahmen[disabled] { opacity: .85; }

/* Statusabzeichen */
.status { flex: none; padding: 3px 10px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.status.ok { background: #e3f4e8; color: var(--gruen); }
.status.offen { background: var(--rot-hell); color: var(--rot); }
.status.info { background: var(--blau-hell); color: var(--blau); }
.karte.rand-ok { border-left: 6px solid var(--gruen); }
.karte.rand-offen { border-left: 6px solid var(--rot); }
.punkt { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--linie); }
.punkt.ok { background: var(--gruen); border-color: var(--gruen); }
.punkt.teil { background: var(--gelb-linie); border-color: var(--gelb-linie); }

.pruefliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.pruefliste li { padding: 8px 10px; border-radius: 8px; }
.pruefliste li.fehler { background: var(--rot-hell); }
.pruefliste li.hinweis { background: var(--info-hell); }
.pruefliste a { color: var(--text); text-decoration: none; display: block; }
.maengelliste { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.maengelliste a { color: var(--text); text-decoration: none; }
.maengelliste small { color: var(--text-leise); }

/* Formularzeilen */
.felder-zeile { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.mit-knopf { display: flex; gap: 8px; }
.mit-knopf input { flex: 1; }
.zeilenliste { display: flex; flex-direction: column; gap: 10px; }
.zeilenliste .zeile { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.zeilenliste .zeile .feld { flex: 1; min-width: 180px; }
.schalter { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-size: 16px; }
.schalter input { width: 24px; height: 24px; }
.navleiste { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 8px; }
.navleiste .knopf { flex: 1; min-width: 140px; }
.klein-knopf { min-height: 44px; align-self: flex-start; }

/* Segmentschalter */
.segmente { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid #b9c2ce; border-radius: 10px; overflow: hidden; background: #fff; }
.segment { flex: 1 1 0; min-height: 48px; min-width: 64px; padding: 0 8px; border: 0; border-right: 1px solid #d5dbe3; background: #fff; font: inherit; font-size: 15px; color: var(--text); cursor: pointer; touch-action: manipulation; }
.segment:last-child { border-right: 0; }
.segment.aktiv { background: var(--blau); color: #fff; font-weight: 600; }
.segment.aktiv.z-io { background: var(--gruen); }
.segment.aktiv.z-abgenutzt { background: #4d6a8f; }
.segment.aktiv.z-mangel { background: var(--rot); }
.segment.aktiv.z-fehlt { background: #6b7280; }
.segment.aktiv.z-ungeprueft { background: #a16207; }
.segmente.klein .segment { min-height: 44px; }

/* Prüfpunkte */
.raum-stand { margin: 0; font-weight: 600; }
.raum-stand.ok { color: var(--gruen); }
.raum-stand.offen { color: var(--text-leise); }
.pp-liste { display: flex; flex-direction: column; gap: 10px; }
.pp { background: var(--flaeche); border: 1px solid var(--linie); border-left: 6px solid var(--linie); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.pp.z-io { border-left-color: var(--gruen); }
.pp.z-abgenutzt { border-left-color: #4d6a8f; }
.pp.z-mangel { border-left-color: var(--rot); background: #fffafa; }
.pp.z-fehlt { border-left-color: #6b7280; }
.pp.z-ungeprueft { border-left-color: #a16207; }
.pp-kopf { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 3fr) auto; gap: 10px; align-items: center; }
.pp-name { font-weight: 600; }
.pp-name small { font-weight: 400; color: var(--text-leise); }
.mini.hat-inhalt { background: var(--blau-hell); border-color: var(--blau); }
.mangel { border: 1px solid #e8a29c; border-radius: 10px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 10px; }

/* Räume verwalten */
.raumliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.raumliste li { display: flex; align-items: center; gap: 8px; }
.raum-link { flex: 1; display: flex; flex-direction: column; min-height: 52px; justify-content: center; padding: 6px 12px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); color: var(--text); text-decoration: none; }
.raum-link small { color: var(--text-leise); }
details.karte > summary { cursor: pointer; font-weight: 600; min-height: 32px; }

@media (max-width: 700px) {
  .pp-kopf { grid-template-columns: 1fr auto; }
  .pp-kopf .segmente { grid-column: 1 / -1; grid-row: 2; }
  .segment { min-width: 0; padding: 0 3px; font-size: 13px; }
  .kopf-status { display: none; }
}

/* =========================================================
   0.3.0 – Fotos und Rückmeldungen aus dem Trockentest
   ========================================================= */
.unterblock { border: 1px solid var(--linie); border-radius: var(--radius); padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.unterblock legend { font-weight: 600; font-size: 15px; padding: 0 4px; }
.felder-zeile.plz-ort { grid-template-columns: minmax(110px, 1fr) minmax(180px, 3fr); }
.knopfraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.knopfraster .knopf { min-height: 60px; padding: 4px 8px; white-space: normal; text-align: center; overflow-wrap: anywhere; }
.pp-werkzeug { display: flex; gap: 6px; }
.kamera { white-space: nowrap; }
.frist-schnell { margin-top: 6px; gap: 6px; }
.frist-schnell .knopf { min-height: 40px; padding: 0 10px; font-size: 14px; }

.foto-leiste { display: flex; flex-wrap: wrap; gap: 8px; }
.foto-vorschau { position: relative; width: 96px; height: 96px; padding: 0; border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; background: #e9edf2; cursor: pointer; }
.foto-vorschau img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-nr { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 6px; background: rgba(15, 23, 35, .75); color: #fff; font-size: 13px; font-weight: 600; }
.foto-info { display: flex; flex-direction: column; gap: 8px; }
.foto-gross { width: 100%; max-height: 65vh; object-fit: contain; background: #111; border-radius: 8px; }

/* =========================================================
   0.4.0 – Anmeldung, Benutzer, Zähler, Schlüssel, Sonstiges
   ========================================================= */
span.chip { display: inline-flex; align-items: center; cursor: default; background: var(--blau-hell); border-color: var(--blau-hell); color: var(--blau); font-weight: 600; }
.knopf.leise { border-color: transparent; background: transparent; color: var(--blau); align-self: center; }
.knopfraster .knopf { flex-direction: column; gap: 2px; }
.knopfraster .knopf small { font-size: 13px; color: var(--text-leise); font-weight: 400; }
.knopf.gesperrt { opacity: .5; }
.nutzer-name { font-weight: 600; font-size: 18px; }

.pin-karte { align-items: center; text-align: center; }
.pin-punkte { display: flex; gap: 14px; justify-content: center; margin: 6px 0; }
.pin-punkt { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--blau); }
.pin-punkt.voll { background: var(--blau); }
.pin-meldung { min-height: 22px; margin: 0; color: var(--rot); font-weight: 600; }
.pin-tasten { display: grid; grid-template-columns: repeat(3, 84px); gap: 12px; justify-content: center; }
.pin-taste { width: 84px; height: 72px; border-radius: 14px; border: 1px solid var(--linie); background: var(--flaeche); font: inherit; font-size: 28px; font-weight: 600; color: var(--text); cursor: pointer; }
.pin-taste:active { background: var(--blau-hell); }
.wackeln { animation: wackeln .35s; }
@keyframes wackeln { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.notfallcode { font-family: ui-monospace, Menlo, monospace; font-size: 26px; font-weight: 700; letter-spacing: .08em; text-align: center; padding: 12px; margin: 0; background: var(--gelb-hell); border: 1px dashed var(--gelb-linie); border-radius: 8px; user-select: all; -webkit-user-select: all; }

li.benutzer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche); }
li.benutzer .eintrag-text { display: flex; flex-direction: column; }
li.benutzer.inaktiv strong { color: var(--text-leise); text-decoration: line-through; }
li.benutzer .knopfreihe .knopf { min-height: 44px; }

.zaehlwerk { display: flex; align-items: center; gap: 6px; }
.zaehlwerk input.zahl { width: 72px; text-align: center; font-size: 20px; }
.zaehlwerk .mini { min-width: 52px; font-size: 22px; }
.feld-fehler { color: var(--rot); font-size: 14px; min-height: 0; }
.feld-fehler:empty { display: none; }
li.kurzzeile { padding: 6px 0; border-bottom: 1px solid var(--linie); font-size: 15px; }
li.kurzzeile:last-child { border-bottom: 0; }

/* =========================================================
   0.5.0 – Einrichtungscode, Zusammenfassung, Unterschriften, Abschluss
   ========================================================= */
.warnung-text { color: var(--rot); font-weight: 600; }
.segmente.umbruch .segment { flex: 1 1 45%; min-width: 150px; border-bottom: 1px solid #d5dbe3; }

/* Unterschriftenfeld */
.dialog.dialog-unterschrift { width: min(1100px, 100%); overscroll-behavior: contain; }
.dialog.dialog-unterschrift, .dialog.dialog-unterschrift * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.unterschrift-offen, html.unterschrift-offen body { overflow: hidden; -webkit-user-select: none; user-select: none; }
.unterschrift-box { display: flex; flex-direction: column; gap: 10px; }
.unterschrift-rahmen { position: relative; border: 2px solid var(--blau); border-radius: 10px; background: #fff; width: 100%; margin: 0 auto; }
/* Feld so groß wie möglich, aber der ganze Dialog muss ohne Scrollen auf den Bildschirm passen (auch iPad mini quer) */
.dialog.dialog-unterschrift { max-height: 94vh; max-height: 94dvh; }
.dialog-unterschrift .unterschrift-rahmen { width: min(100%, calc((94vh - 300px) * 2.5)); width: min(100%, calc((94dvh - 300px) * 2.5)); }
.unterschrift-feld { display: block; width: 100%; aspect-ratio: 5 / 2; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; cursor: crosshair; }
.unterschrift-linie { position: absolute; left: 6%; right: 6%; bottom: 22%; border-bottom: 1px solid #9aa6b5; pointer-events: none; }
.unterschrift-linie span { position: absolute; left: -4%; bottom: 2px; color: #9aa6b5; font-size: 20px; }
.unterschrift-name { margin: 0; text-align: center; font-weight: 600; }
.unterschrift-platz { border: 1px solid var(--linie); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.unterschrift-platz.fertig { border-color: var(--gruen); background: #f2f8f3; }
.unterschrift-bild { width: min(360px, 100%); border: 1px solid var(--linie); border-radius: 6px; background: #fff; }
.unterschriften-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.unterschrift-anzeige { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.unterschrift-anzeige img { width: 100%; border: 1px solid var(--linie); border-radius: 6px; background: #fff; }
.unterschrift-anzeige figcaption { font-size: 14px; color: var(--text-leise); }

/* Zusammenfassung (für den Mieter gut lesbar) */
.zusammenfassung { background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 18px; font-size: 17px; }
.zf-titel h1 { margin: 0; font-size: 24px; color: var(--blau); }
.zf-kennung { margin: 4px 0 0; font-family: ui-monospace, Menlo, monospace; font-size: 15px; color: var(--text-leise); }
.zf-entwurf { margin: 6px 0 0; color: var(--rot); font-weight: 700; }
.zf-hinweis { margin: 6px 0 0; font-weight: 600; }
.zf-abschnitt { display: flex; flex-direction: column; gap: 8px; }
.zf-abschnitt h2 { margin: 0; font-size: 19px; border-bottom: 2px solid var(--blau-hell); padding-bottom: 4px; }
.zf-abschnitt h3 { margin: 6px 0 0; font-size: 17px; }
.zf-raum p { margin: 2px 0; }
.zf-punkte { margin: 4px 0; padding-left: 20px; }
.tabelle-rahmen { overflow-x: auto; }
.zf-tabelle { width: 100%; border-collapse: collapse; font-size: 15px; }
.zf-tabelle th, .zf-tabelle td { border: 1px solid var(--linie); padding: 6px 8px; text-align: left; vertical-align: top; }
.zf-tabelle th { background: var(--blau-hell); }
.echtheit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.echtheit li.ok { color: var(--gruen); }
.echtheit li.fehler { color: var(--rot); font-weight: 600; }
.nachtraege { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.nachtraege p { margin: 2px 0; }
.mehrzeilig { white-space: pre-wrap; }

/* =========================================================
   0.6.0 – Logo, PDF
   ========================================================= */
.marke { display: flex; justify-content: center; padding: 8px 0 4px; }
.marke img { width: min(360px, 80%); height: auto; }
.marke.links { justify-content: flex-start; }
.marke.links img { width: min(300px, 70%); }
.pdf-info { display: flex; flex-direction: column; gap: 6px; }

/* 0.7.0: Mieterwechsel, Nachtrag mit Fotos */
.abzeichen.wechsel { background: #efe7f8; color: #5a2d8c; }
.mangel-teil { margin: 10px 0 2px; font-size: 14px; color: var(--blau); border-top: 1px solid var(--linie); padding-top: 8px; }
.foto-vorschau .foto-weg { position: absolute; top: 2px; right: 2px; min-width: 32px; min-height: 32px; padding: 0; background: rgba(255,255,255,.9); }
.knopfreihe.vorschlaege { margin-top: -4px; }

/* 0.8.0: Räume ziehen */
.raumliste .griff { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; min-height: var(--tipp); font-size: 22px; color: var(--text-leise); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.raumliste li { transition: transform .12s ease; background: var(--hinter, #fff); border-radius: 8px; }
.raumliste li.zieht { transition: none; position: relative; z-index: 5; box-shadow: 0 6px 18px rgba(15, 23, 35, .25); }
.rahmen:disabled .griff { cursor: default; opacity: .4; }

/* Vereinbarung zum Mieterwechsel, Versand und Ablage (0.8.0) */
.vereinbarung-punkte { padding-left: 24px; }
.vereinbarung-punkte li { margin: 6px 0; }
.fett { font-weight: 600; }
.pdf-bereich h3 { margin: 12px 0 4px; font-size: 1rem; }
.versand-zeile { border-top: 1px solid var(--linie); padding-top: 8px; margin-top: 4px; }
.versand-zeile p { margin: 0 0 6px; }
.versand-liste li, .karte.ablage .kurzzeile { color: var(--gruen); }
/* Lange Zeichenketten ohne Leerzeichen (Prüfsumme, Dateinamen) umbrechen statt die Seite zu verbreitern */
.seite { overflow-wrap: break-word; }

/* ---------- Module (ab 0.9.0) ---------- */
.kacheln.module { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kachel.modul { min-height: 76px; }
.kachel.modul.aktiv { border: 2px solid var(--blau); background: var(--blau-hell); }
.kachel.modul.aktiv strong { color: var(--blau); }
.tabelle dd.nummer { font-variant-numeric: tabular-nums; font-weight: 600; }
.kuerzel-liste { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.kuerzel-liste li { padding: 2px 10px; border-radius: 12px; background: var(--blau-hell); color: var(--blau); font-weight: 600; font-size: 14px; }
.schalter-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Testumgebung (Subdomain test-…) ---------- */
.testumgebung .kopf { background: #8a4b0f; }
.test-band { padding: 6px 16px; background: #fdeee0; color: #8a4b0f; font-weight: 700; font-size: 14px; text-align: center; border-bottom: 1px solid #e9b98a; }
.feld-kurz { max-width: 8em; }
