/* Pesch Immobilien – Portal (Entwurf) */
:root {
  --navy: #1b2553;
  --navy-2: #28346d;
  --navy-soft: #eceef6;
  --gold: #b38b55;
  --gold-dark: #8a6838;
  --gold-soft: #f6efe4;
  --gold-line: #e9d9bf;
  --bg: #f6f4ef;
  --card: #ffffff;
  --line: #e6e1d6;
  --line-2: #f0ece4;
  --text: #1c2236;
  --muted: #6a6f82;
  --ok: #2b7a4c;
  --ok-soft: #e5f2ea;
  --warn: #a2650f;
  --warn-soft: #fbf0dc;
  --bad: #b0262e;
  --bad-soft: #fbe8e9;
  --info: #2b5797;
  --info-soft: #e7eef8;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(27, 37, 83, .05), 0 6px 18px rgba(27, 37, 83, .05);
  --serif: Optima, Candara, "Segoe UI", "Noto Sans", sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); margin: 0; font-weight: 600; letter-spacing: .01em; }
h4 { font-size: 15px; margin: 18px 0 8px; }
p { margin: 0 0 10px; }
a { color: var(--navy); }
.muted { color: var(--muted); }
.meta { color: var(--muted); font-size: 13px; }
.mb { margin-bottom: 16px; }
.bad-text { color: var(--bad); font-weight: 600; }
.ok-text { color: var(--ok); font-weight: 600; }
.info-text { color: var(--info); font-weight: 600; }
.warn-text { color: var(--warn); }
.ic { flex: none; }

/* Demo-Leiste */
.demo-leiste {
  background: var(--navy);
  color: #dfe3f2;
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  flex-wrap: wrap;
  border-radius: 10px;
  margin-bottom: 20px;
}
.demo-leiste button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  border-radius: 999px;
  padding: 2px 11px;
  font: inherit;
  cursor: pointer;
}
.demo-leiste button.aktiv { background: var(--gold); border-color: var(--gold); }

/* Grundlayout */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.seite-links {
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
}
.logo-link { display: block; padding: 0 8px 18px; border-bottom: 1px solid var(--line-2); margin-bottom: 14px; }
.logo { display: block; width: 100%; max-width: 190px; margin: 0 auto; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.nav a .ic { color: var(--muted); }
.nav a:hover { background: var(--bg); }
.nav a.aktiv { background: var(--navy); color: #fff; }
.nav a.aktiv .ic { color: var(--gold); }
.nav .zahl {
  margin-left: auto;
  background: var(--gold);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  padding: 0 7px;
}
.nutzer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 0;
  border-top: 1px solid var(--line-2);
}
.nutzer-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.nutzer-text span { color: var(--muted); font-size: 13px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--navy); }
.icon-btn:disabled { opacity: .4; cursor: default; }

.haupt { padding: 28px 34px 56px; max-width: 1260px; width: 100%; }
.kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.kopf h1 { font-size: 29px; line-height: 1.15; }
.kopf h1::after { content: ""; display: block; width: 44px; height: 3px; background: var(--gold); margin-top: 9px; border-radius: 2px; }
.kopf p { margin: 8px 0 0; }
.kopf-aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.zurueck { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 12px; }
.zurueck:hover { color: var(--navy); }

/* Karten */
.karte {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  min-width: 0;
}
.karte h3 { font-size: 17px; }
.karte > h3 { margin-bottom: 12px; }
.karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.karte-kopf a { font-size: 13px; color: var(--gold-dark); text-decoration: none; font-weight: 600; }
.karte-kopf a:hover { text-decoration: underline; }
.raster-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; align-items: start; }
.karten-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; margin-bottom: 18px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--gold-line); }
.kpi .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.kpi .wert { font-family: var(--serif); font-size: 29px; color: var(--navy); line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .wert small { font-size: 16px; color: var(--muted); }
.kpi .wert.bad { color: var(--bad); }
.kpi .unter { font-size: 13px; color: var(--muted); }
.kpi .unter.bad { color: var(--bad); font-weight: 600; }
.balken { height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin: 4px 0 2px; }
.balken span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #cfa871); border-radius: 999px; }

/* Listen */
.liste { display: flex; flex-direction: column; }
.zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}
.zeile:last-child { border-bottom: 0; }
.zeile.klickbar { cursor: pointer; border-radius: 0; }
.zeile.klickbar:hover .titel { color: var(--gold-dark); }
.haupttext { flex: 1; min-width: 0; }
.titel { font-weight: 600; }
.zeile .zahl, .zahl-text { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.zeile .zahl.bad { color: var(--bad); }
.zeile .zahl.ok { color: var(--ok); }
.liste.kompakt .zeile { padding: 8px 0; }
.symbol {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: var(--gold-dark);
  flex: none;
}

/* Badges & Chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--line-2);
  color: var(--muted);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.gold { background: var(--gold-soft); color: var(--gold-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.chip.warn { background: var(--warn-soft); border-color: #f0dcb5; color: var(--warn); }
.chip.ok { background: var(--ok-soft); border-color: #cfe6d8; color: var(--ok); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 9px;
  padding: 8px 14px;
  font: 600 14px var(--sans);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { border-color: var(--navy); }
.btn.primaer { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.primaer:hover { background: var(--navy-2); }
.btn.klein { padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn.breit { width: 100%; padding: 11px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; font: 600 13px var(--sans); color: var(--navy); cursor: pointer; }
.link.bad { color: var(--bad); }
.link:hover { text-decoration: underline; }
.knopf-reihe { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 14px; }

/* Filter / Tabs */
.filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filter button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 13px;
  font: 500 13px var(--sans);
  cursor: pointer;
  color: var(--text);
}
.filter button.aktiv { background: var(--navy); color: #fff; border-color: var(--navy); }
.auswahl { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font: 500 13px var(--sans); background: #fff; color: var(--text); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font: 600 14px var(--sans);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.tabs button:hover { color: var(--navy); }
.tabs button.aktiv { color: var(--navy); border-bottom-color: var(--gold); }

/* Tabellen */
.tabelle-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tfoot td { border-top: 1px solid var(--line); border-bottom: 0; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.eng { white-space: nowrap; }
tr.klickbar { cursor: pointer; }
tr.klickbar:hover td { background: #fbf9f5; }
table select, table input.betrag {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 8px;
  font: 14px var(--sans);
  background: #fff;
  color: var(--text);
}
table input.betrag { width: 110px; text-align: right; font-variant-numeric: tabular-nums; }

/* Häuser */
.haus-karte {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.haus-karte:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(27, 37, 83, .1); }
.haus-bild {
  height: 128px;
  background: linear-gradient(135deg, var(--navy) 0%, #2d3b7a 100%);
  display: grid;
  place-items: center;
  position: relative;
}
.haus-bild::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold); }
.haus-bild.klein { height: auto; width: 150px; flex: none; border-radius: 10px; min-height: 104px; }
.haus-bild.klein::after { display: none; }
.haus-karte-inhalt { padding: 16px 18px; }
.haus-karte-inhalt h3 { font-size: 19px; }
.haus-karte-fuss { display: flex; justify-content: space-between; border-top: 1px solid var(--line-2); padding-top: 10px; margin-top: 4px; font-size: 14px; color: var(--muted); }
.haus-karte-fuss strong { color: var(--navy); font-variant-numeric: tabular-nums; }
.haus-kopf { display: flex; gap: 18px; align-items: stretch; margin-bottom: 18px; }
.haus-kopf-text { flex: 1; min-width: 0; }
.haus-kopf h1 { font-size: 27px; }
.fakten { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 12px; }
.fakten div { display: flex; flex-direction: column; }
.fakten span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.fakten strong { font-size: 17px; color: var(--navy); font-variant-numeric: tabular-nums; }

.bilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 12px; }
.bild { margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.bild-platz {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  color: #9aa0b8;
  background: repeating-linear-gradient(135deg, #f1f2f7 0 12px, #eceef5 12px 24px);
}
.bild figcaption { padding: 7px 10px; font-size: 13px; font-weight: 600; }
.bild.neu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px dashed var(--gold-line);
  background: var(--gold-soft);
  color: var(--gold-dark);
  font: 600 13px var(--sans);
  cursor: pointer;
  min-height: 140px;
}

/* Pinnwand */
.aushaenge { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.aushang {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.aushang.oben { border-top: 3px solid var(--gold); }
.aushang h3 { font-size: 17px; margin: 6px 0 6px; }
.aushang p { margin: 0; white-space: pre-line; }
.aushang-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.pin { display: inline-flex; align-items: center; gap: 4px; color: var(--gold-dark); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.aushang-fuss { display: flex; gap: 14px; margin-top: auto; padding-top: 12px; }

/* Hinweis-Boxen */
.box { border-radius: 11px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; text-decoration: none; color: inherit; }
.box .ic { margin-top: 1px; }
.box.gold { background: var(--gold-soft); border: 1px solid var(--gold-line); color: #5b4322; }
.box.gold .ic { color: var(--gold-dark); }
.box.info { background: var(--info-soft); border: 1px solid #d3e0f2; color: #22406d; }
a.box:hover { border-color: var(--gold); }
.box.warn { background: var(--warn-soft); border: 1px solid #f0dcb5; color: var(--warn); }

/* Werte-Listen */
.werte { margin: 0; display: flex; flex-direction: column; }
.werte div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.werte div:last-child { border-bottom: 0; }
.werte dt { color: var(--muted); }
.werte dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.werte .summe dt, .werte .summe dd { color: var(--navy); font-weight: 700; }
.werte .summe { border-top: 1px solid var(--line); }

/* Monatswahl */
.monat-wahl { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.monat-wahl strong { font-family: var(--serif); font-size: 19px; color: var(--navy); min-width: 150px; text-align: center; }

/* Meldungen */
.status-wahl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.verlauf { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.eintrag { background: var(--bg); border-radius: 10px; padding: 9px 12px; font-size: 14px; }
.eintrag.system { background: none; padding: 2px 12px; font-size: 13px; color: var(--muted); }
.antwort { display: flex; gap: 8px; align-items: flex-end; }
.antwort textarea {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  font: 14px var(--sans);
  resize: vertical;
  min-height: 42px;
}
.wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.wahl label {
  border: 1.5px solid var(--line);
  border-radius: 11px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
}
.wahl label input { margin-top: 3px; accent-color: var(--navy); }
.wahl label.aktiv { border-color: var(--navy); background: var(--navy-soft); }
.wahl strong { display: block; color: var(--navy); }
.wahl span { color: var(--muted); font-size: 13px; }

/* Formulare */
label.feld { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.feld input, .feld textarea, .feld select {
  display: block;
  width: 100%;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  font: 15px var(--sans);
  color: var(--text);
  background: #fff;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
.haken { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 8px; cursor: pointer; }
.haken input { accent-color: var(--navy); width: 16px; height: 16px; }
.datei { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.datei input { display: none; }

/* Modal */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 24, 48, .45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px;
  z-index: 50;
  overflow-y: auto;
}
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 580px; box-shadow: 0 24px 64px rgba(0, 0, 0, .25); }
.modal.breit { max-width: 780px; }
.modal-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-kopf h3 { font-size: 19px; }
.modal-inhalt { padding: 18px 20px 20px; }
.modal-fuss { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 11px 18px;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
  z-index: 60;
  width: max-content;
  max-width: min(540px, calc(100vw - 32px));
  font-size: 14px;
  border-left: 4px solid var(--gold);
}

.leer { text-align: center; padding: 26px 10px; color: var(--muted); }

/* Belege */
.ablage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 26px 16px;
  border: 2px dashed var(--gold-line);
  border-radius: var(--radius);
  background: var(--gold-soft);
  color: var(--gold-dark);
  cursor: pointer;
  margin-bottom: 16px;
  transition: background .15s, border-color .15s;
}
.ablage:hover, .ablage.aktiv { border-color: var(--gold); background: #f1e6d4; }
.ablage input { display: none; }
.ablage strong { color: var(--navy); }
.zuordnen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.vorschau {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.vorschau img { max-width: 100%; max-height: 520px; display: block; }
.vorschau iframe { width: 100%; height: 520px; border: 0; background: #fff; }
.vorschau .leer { color: var(--muted); }
.suche { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font: 13px var(--sans); min-width: 180px; background: #fff; }
.feld-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal.gross { max-width: 1000px; }

/* Login */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(179, 139, 85, .22), transparent 60%),
    linear-gradient(160deg, #1b2553 0%, #121a3d 100%);
}
.login-karte {
  background: #fff;
  border-radius: 18px;
  padding: 30px 30px 26px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  text-align: center;
}
.login-logo { width: 250px; max-width: 100%; display: block; margin: 0 auto 10px; }
.login-karte h1 { font-size: 22px; }
.login-karte form { text-align: left; margin-top: 18px; }
.login-demo { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.login-demo p { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.login-wahl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.login-wahl .btn { flex-direction: column; gap: 4px; padding: 10px 6px; font-size: 13px; }

/* Handy */
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .seite-links {
    min-width: 0;
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 10px;
  }
  .logo-link { padding: 0; border: 0; margin: 0; flex: none; }
  .logo { width: 84px; }
  .nav { flex-direction: row; overflow-x: auto; flex: 1; scrollbar-width: none; min-width: 0; }
  .nav a { padding: 7px 10px; white-space: nowrap; font-size: 14px; gap: 6px; }
  .nav a .ic { display: none; }
  .nutzer { margin: 0; padding: 0; border: 0; flex: none; }
  .nutzer-text { display: none; }
  .haupt { padding: 20px 16px 48px; }
  .kopf h1 { font-size: 24px; }
  .haus-kopf { flex-direction: column; }
  .haus-bild.klein { width: 100%; min-height: 90px; }
  .wahl { grid-template-columns: 1fr; }
  .zuordnen, .feld-reihe { grid-template-columns: 1fr; }
  .vorschau { min-height: 200px; }
  .vorschau iframe { height: 320px; }
  .login-wahl .btn { font-size: 12px; }
}

/* Mietverträge */
.erkannt { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--ok-soft); color: var(--ok); vertical-align: 1px; }
.erkannt.fehlt { background: var(--bg); color: var(--muted); font-weight: 600; }
.erkannt.unsicher { background: var(--warn-soft); color: var(--warn); }
.feld:has(.erkannt.unsicher) input, .feld:has(.erkannt.unsicher) select { border-color: #e9c98f; background: #fffaf0; }
.lesen { min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--navy); }
.kreisel { width: 34px; height: 34px; border: 3px solid var(--gold-line); border-top-color: var(--gold); border-radius: 50%; animation: drehen .8s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }
.zwischen { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--gold-dark); margin: 18px 0 2px; }
.zwischen:first-child { margin-top: 0; }
.zeile.gewaehlt .titel { color: var(--gold-dark); }
.zeile.gewaehlt { box-shadow: inset 3px 0 0 var(--gold); padding-left: 10px; }
.haken.klein { font-size: 12px; margin: 0; color: var(--muted); white-space: nowrap; }
.haken input:disabled { cursor: not-allowed; }
.dok-neu { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.dok-neu select { border: 1px solid var(--line); border-radius: 9px; padding: 5px 9px; font: 13px var(--sans); background: #fff; }
.dok-neu input[type=file] { display: none; }
.dok-neu label.btn { cursor: pointer; }

/* Übergaben */
a.zeile { text-decoration: none; }
.schritte { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; }
.schritte button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font: 600 13px var(--sans); color: var(--muted); cursor: pointer; }
.schritte button.aktiv { background: var(--navy); border-color: var(--navy); color: #fff; }
.raum { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.raum-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.umschalter { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.umschalter button { border: 0; background: #fff; padding: 7px 13px; font: 600 13px var(--sans); color: var(--muted); cursor: pointer; }
.umschalter button + button { border-left: 1px solid var(--line); }
.umschalter button.gut.aktiv { background: var(--ok-soft); color: var(--ok); }
.umschalter button.mangel.aktiv { background: var(--warn-soft); color: var(--warn); }
.fotos { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.fotos img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.foto-knopf { cursor: pointer; }
.foto-knopf input { display: none; }
.raum-neu { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.raum-neu input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; font: 14px var(--sans); }
.zeile-raster { display: grid; grid-template-columns: 1.1fr 1fr 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.zeile-raster:last-of-type { border-bottom: 0; }
.zeile-raster.schluessel { grid-template-columns: 1.4fr 1fr 1fr; }
.zeile-raster label.feld { margin: 0; }
.signaturen { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.signatur-titel { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.signatur canvas { display: block; width: 100%; height: 150px; background: #fff; border: 1.5px dashed var(--gold-line); border-radius: 10px; touch-action: none; cursor: crosshair; }
.signatur .unter { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.schritt-fuss { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; }

/* Das Protokoll selbst (Ansicht im Portal und PDF) */
.protokoll { background: #fff; color: #1f2430; font-size: 14px; line-height: 1.45; }
.protokoll-kopf { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 2px solid var(--navy); padding-bottom: 10px; margin-bottom: 12px; }
.protokoll-kopf h2 { font-size: 24px; }
.protokoll-kopf img { height: 46px; width: auto; }
.protokoll h4 { margin: 18px 0 6px; }
.protokoll th, .protokoll td { padding: 6px 8px 6px 0; vertical-align: top; }
.protokoll-daten th { width: 130px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.protokoll-fotos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.protokoll-fotos img { width: 90px; height: 68px; object-fit: cover; border-radius: 4px; }
.protokoll .unterschriften { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 26px; }
.protokoll .sig-feld { height: 64px; display: flex; align-items: flex-end; }
.protokoll .sig-feld img { max-height: 62px; max-width: 100%; }
.protokoll .linie { border-top: 1px solid #555; padding-top: 4px; font-size: 12px; color: #555; }
.protokoll-fuss { margin: 18px 0 0; }
.vorschau.dok { display: block; overflow: auto; max-height: 560px; padding: 18px; background: #fff; }
#druckbereich { display: none; }
@media print {
  body > *:not(#druckbereich) { display: none !important; }
  #druckbereich { display: block; }
  body { background: #fff; }
  .protokoll { font-size: 12px; }
  .protokoll tr { break-inside: avoid; }
  .protokoll .unterschriften { break-inside: avoid; }
}
@page { margin: 14mm; }
@media (max-width: 860px) {
  .zeile-raster { grid-template-columns: 1fr 1fr; }
  .zeile-raster > div:first-child { grid-column: 1 / -1; }
  .zeile-raster.schluessel { grid-template-columns: 1fr 1fr; }
  .signaturen { grid-template-columns: 1fr; }
  .protokoll .unterschriften { grid-template-columns: 1fr; gap: 18px; }
}

/* Checkliste für Übergaben */
.raum-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.punkte { margin-top: 8px; }
.punkt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.punkt .umschalter button { padding: 5px 10px; min-width: 38px; }
.umschalter button.nv.aktiv { background: var(--bg); color: var(--text); }
.punkt-notiz { grid-column: 1 / -1; border: 1px solid #e9c98f; background: #fffaf0; border-radius: 8px; padding: 7px 10px; font: 14px var(--sans); }
.raum-fuss { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.raum-notiz { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; font: 14px var(--sans); }
.aufgaben { display: flex; flex-direction: column; }
.aufgabe { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; cursor: pointer; }
.aufgabe input { accent-color: var(--navy); width: 18px; height: 18px; margin-top: 1px; flex: none; }
.aufgabe.erledigt span { color: var(--muted); }
.cl-liste { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; max-height: 46vh; overflow: auto; }
.cl-zeile { display: flex; gap: 4px; align-items: center; }
.cl-nr { width: 22px; text-align: right; color: var(--muted); font-size: 12px; flex: none; margin-right: 4px; }
.cl-zeile input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: 14px var(--sans); }
.cl-zeile .icon-btn:disabled { opacity: .3; cursor: default; }
.cl-uebersicht { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.cl-uebersicht div { background: var(--bg); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.cl-uebersicht strong { font: 600 22px var(--serif); color: var(--navy); }
.cl-uebersicht span { font-size: 12px; color: var(--muted); }
.protokoll-check { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 24px; }
.protokoll-check li { padding: 3px 0; break-inside: avoid; }
.protokoll-check li.offen { color: var(--warn); }
.protokoll .schreiblinie { border-bottom: 1px solid #888; height: 28px; }
@media (max-width: 860px) { .protokoll-check { columns: 1; } }

/* ---------------------------------------------------------------- Echte App */
a.nutzer-text { color: inherit; text-decoration: none; }
a.nutzer-text:hover strong { color: var(--gold-dark); }
.schritte-liste { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.auszug-reihe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.auszug-reihe input { border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; font: 14px var(--sans); }
.login .box { text-align: left; }
.konto-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.konto-tabelle { max-height: 56vh; overflow: auto; }
a.kpi { text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--gold); }
.kpi .wert small { font-size: 16px; color: var(--muted); }
.probleme { margin: 4px 0 0; padding-left: 18px; }
.nk-tabelle td, .nk-tabelle th { font-size: 13px; }
.nk-ergebnis { max-width: 420px; margin: 14px 0 0 auto; }
.nk-ergebnis .summe th, .nk-ergebnis .summe td { border-top: 2px solid var(--navy); color: var(--navy); }
.seitenumbruch { break-after: page; page-break-after: always; }
table select { max-width: 100%; }
.eintrag.intern { background: var(--gold-soft); border: 1px dashed var(--gold-line); }
.aushang.abgelaufen { opacity: .6; }
a.zeile { color: inherit; }
.qr-feld { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.qr-feld img { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.qr-feld .schluessel { display: inline-block; margin-top: 6px; font-size: 14px; letter-spacing: .04em; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.codes code { background: var(--bg); border-radius: 8px; padding: 7px 10px; font-size: 15px; text-align: center; letter-spacing: .05em; }
td.zweck { max-width: 260px; font-size: 13px; color: var(--muted); }
