/* generator.css — Vertragsgenerator (verknüpft mit Musterabfrage)
   Eigenständiger Generator-Screen, gleiche Optik wie die Musterabfrage.
   Akzentfarbe kommt aus --accent (vom App-Shell gesetzt, Orange). */

.gen {
  max-width: 1600px;
  margin: 0 auto;
  animation: genRise .32s cubic-bezier(.22,.61,.36,1);
}
@keyframes genRise {
  from { transform: translateY(8px); }
  to   { transform: none; }
}

/* ── Skyline-Band (unten im Vertragsgenerator) ── */
.gen-skyline {
  position: relative;
  margin-top: 26px;
  width: 100%;
  height: 130px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F5F9 100%);
  border: 1px solid var(--line-2);
}
.gen-skyline-row {
  position: absolute; inset: 0;
  background-repeat: repeat-x;
  background-position: bottom center;
  background-size: auto 100%;
}
.gen-skyline-back {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 150'%3E%3Cpath fill='%23E2E8F0' d='M0 150 L0 100 L40 100 L40 82 L95 82 L95 108 L150 108 L150 72 L210 72 L210 100 L300 100 L300 150 Z'/%3E%3C/svg%3E");
}
.gen-skyline-front {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 150'%3E%3Cpath fill='%23CBD5E1' d='M0 150 L0 120 L50 120 L50 96 L110 96 L110 118 L160 118 L160 90 L215 90 L215 120 L260 120 L260 150 Z'/%3E%3C/svg%3E");
}
.gen-skyline-church {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 100%; width: auto;
}

/* ── Title row ─────────────────────────── */
.gen-titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.gen-title h1 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.gen-title p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}
.gen-status {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}
.gen-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.gen-pill-progress { background: var(--accent-soft); color: var(--accent); }
.gen-pill-status { background: var(--line-2); color: var(--ink-2); }
.gen-pill-status i {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--ink-3); display: inline-block;
}
.gen-titlebar-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.gen-toolbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  transition: all .12s;
}
.gen-toolbtn:hover { background: var(--line-2); color: var(--ink); }

/* ── Stepper cards ─────────────────────── */
.gen-steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.gen-step {
  text-align: left;
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 14px;
  transition: all .15s ease;
  font-family: inherit;
  position: relative;
}
.gen-step:hover { border-color: var(--accent-line); }
.gen-step.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 4px 16px rgba(247,142,17,.10);
}
.gen-step-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.gen-step-badge {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  background: var(--line-2);
  color: var(--ink-3);
  border: 1.5px solid transparent;
}
.gen-step.active .gen-step-badge {
  background: #FDEBD3;
  color: var(--accent);
}
.gen-step-badge.done {
  background: var(--accent);
  color: white;
}
.gen-step-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #FBE7CE;
  overflow: hidden;
}
.gen-step-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width .35s cubic-bezier(.22,.61,.36,1);
}
.gen-step-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.gen-step-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.gen-step.active .gen-step-label { color: var(--accent); }
.gen-step-frac {
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Split layout ──────────────────────── */
.gen-split {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 18px;
  align-items: start;
}
.gen-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  min-height: 640px;
}
.gen-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 26px 16px;
}
.gen-panel-head h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.gen-panel-body {
  padding: 4px 26px 22px;
  flex: 1;
}
.gen-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 26px 22px;
  border-top: 1px solid var(--line-2);
}

/* ── Left: Willkommen / intro box ──────── */
.gen-intro {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #FFF7ED;
  border: 1px solid #FCD9A8;
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 22px;
}
.gen-intro-text h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.gen-intro-text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 46ch;
}
.gen-intro-logo {
  width: 110px;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
}

/* Section eyebrow inside step panels */
.gen-sec {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 26px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-2);
}
.gen-sec:first-child { margin-top: 6px; }

/* Prefilled-from-Musterabfrage note (dezent) */
.gen-prefill-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--line-2);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
  line-height: 1.5;
}
.gen-prefill-note svg { color: var(--accent); flex-shrink: 0; margin-top: 1px; }

/* ── Template cards ────────────────────── */
.gen-tpl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.gen-tpl {
  text-align: center;
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 22px 16px 20px;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.gen-tpl:hover { border-color: var(--accent-line); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(15,23,42,.06); }
.gen-tpl.active {
  border-color: var(--accent);
  border-width: 2px;
  background: #FFF7ED;
}
.gen-tpl-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.gen-tpl-sub {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.4;
  margin-top: -8px;
}
.gen-tpl-icon {
  width: 64px; height: 64px;
  border-radius: 14px;
  background: var(--line-2);
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s ease;
}
.gen-tpl.active .gen-tpl-icon { background: #FDEBD3; color: var(--accent); }
.gen-tpl-check {
  position: absolute;
}
.gen-tpl-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  background: #FDEBD3;
  padding: 3px 9px;
  border-radius: 999px;
}

/* ── Preview toolbar ───────────────────── */
.gen-prev-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}
.gen-prev-iconbtn {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
}
.gen-prev-iconbtn:hover { background: var(--line-2); color: var(--ink); }
.gen-prev-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}
.gen-prev-btn:hover { background: var(--line-2); color: var(--ink); }
.gen-prev-btn-pdf { border-color: var(--accent-line); color: var(--accent); }
.gen-prev-btn-pdf:hover { background: var(--accent-soft); }

/* ── Document viewer ───────────────────── */
.gen-doc-frame {
  background: #EEF1F5;
  border-radius: 12px;
  padding: 20px;
  margin: 0 26px 22px;
  max-height: 760px;
  overflow-y: auto;
}
.gen-doc-paper {
  background: white;
  margin: 0 auto;
  padding: 48px 52px 36px;
  max-width: 680px;
  box-shadow: 0 4px 24px rgba(15,23,42,.10);
  border-radius: 2px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.7;
  color: #1A1A1A;
  transform-origin: top center;
  counter-reset: gsec;
}
.gen-doc-paper + .gen-doc-paper { margin-top: 22px; }

.gen-doc-h1 {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 4px;
}
.gen-doc-h1-sub {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 26px;
}
.gen-doc-sec {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 26px 0 14px;
  scroll-margin-top: 16px;
}
/* Abschnittsüberschrift im Vorlagen-Stil (zentriert, Kapitälchen, römische Ziffer) */
.gen-doc-h2 {
  counter-increment: gsec; counter-reset: gpar;
  text-align: center;
  font-size: 13px; font-weight: 700; color: #1A1A1A;
  letter-spacing: 0.16em; text-transform: uppercase;
  margin: 28px 0 14px; scroll-margin-top: 16px;
}
.gen-doc-h2::before { content: counter(gsec, upper-roman) ".\00a0\00a0"; }
/* Haftungsausschluss */
/* Haftungsausschluss als eigene erste Seite */
.gen-doc-page1 {
  display: flex; flex-direction: column;
  min-height: 900px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 28px; padding-bottom: 18px;
}
.gen-doc-htitle {
  text-align: center; font-size: 13px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; margin: 6px 0 24px;
}
.gen-doc-footnote {
  margin-top: auto; padding-top: 10px; border-top: 1px solid #999;
  font-size: 10px; color: var(--ink-2); max-width: 320px;
}
.gen-doc-disc {
  font-size: 10px; line-height: 1.55; color: var(--ink-3);
  background: #F8FAFC; border: 1px solid var(--line-2); border-radius: 8px;
  padding: 12px 14px; margin-bottom: 22px;
}
.gen-doc-disc b { color: var(--ink-2); }
/* Aufzählungen */
.gen-doc-ul { margin: 0 0 12px; padding-left: 30px; list-style: none; }
.gen-doc-ul li { margin-bottom: 4px; position: relative; }
.gen-doc-ul li::before { content: "–"; position: absolute; left: -18px; color: #1A1A1A; }
/* Anlagenverzeichnis */
.gen-doc-anlagen-wrap { margin-top: 40px; }
.gen-doc-anlagen-title { font-size: 13px; margin-bottom: 12px; }
.gen-doc-anlagen { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.gen-doc-anlage { display: grid; grid-template-columns: 150px 1fr; gap: 10px; font-size: 13px; align-items: start; }
.gen-doc-anlage > span:first-child { font-weight: 400; text-decoration: underline; text-decoration-color: #94A3B8; }
.gen-doc-p {
  margin: 0 0 12px;
  text-align: justify;
}
/* Nummerierter Absatz (1)(2)(3) – zählt je Abschnitt neu */
.gen-doc-pn {
  counter-increment: gpar;
  display: grid; grid-template-columns: 30px 1fr; gap: 2px;
  margin: 0 0 12px; text-align: justify;
}
.gen-doc-pn::before { content: "(" counter(gpar) ")"; font-variant-numeric: tabular-nums; }
.gen-doc-p-num {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 4px;
  margin: 0 0 12px;
}
.gen-doc-p-num > span:first-child { font-variant-numeric: tabular-nums; }
.gen-doc-party {
  display: grid; grid-template-columns: 22px 1fr; gap: 10px;
  margin: 0 0 14px 210px;
}
.gen-doc-pnum { font-variant-numeric: tabular-nums; }
.gen-doc-party-label { font-weight: 700; }
/* Mehrere Mieter: jeder Block eigenständig untereinander, klar getrennt */
.gen-doc-tenant { display: block; }
.gen-doc-tenant + .gen-doc-tenant { margin-top: 9px; padding-top: 9px; border-top: 1px dashed #D5DCE5; }
.gen-doc-tenant-foot { display: block; margin-top: 10px; }

/* Live value highlighting */
.gen-v {
  border-radius: 3px;
  padding: 0 3px;
  font-weight: 600;
}
.gen-v-set { background: #DCFCE7; color: #14794A; }
.gen-v-empty { background: #F1F5F9; color: #8A97A8; font-weight: 500; font-style: italic; }

/* Flash-Hervorhebung: Stelle, zu der bei Fokus eines Eingabefeldes gesprungen wird */
[data-fk], [data-sec] { scroll-margin-top: 28px; }
@keyframes genFkFlash {
  0%   { background: #FBBF24; box-shadow: 0 0 0 4px rgba(247,142,17,.35); }
  60%  { background: #FDE8C8; box-shadow: 0 0 0 4px rgba(247,142,17,.12); }
  100% { background: transparent; box-shadow: 0 0 0 0 rgba(247,142,17,0); }
}
.gen-fk-flash {
  animation: genFkFlash 1.3s ease-out;
  border-radius: 4px;
}
/* bei Abschnittsüberschriften zusätzlich den Akzent kurz hochziehen */
.gen-doc-h2.gen-fk-flash { color: var(--accent); }

/* Mietzins table */
.gen-doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 14px;
  font-size: 12px;
}
.gen-doc-table td {
  padding: 3px 0;
  vertical-align: top;
}
.gen-doc-table .gd-letter { width: 22px; color: var(--ink-2); }
.gen-doc-table .gd-cur { text-align: right; width: 22px; padding-right: 6px; color: var(--ink-3); }
.gen-doc-table .gd-amt { text-align: right; width: 84px; font-variant-numeric: tabular-nums; }
.gen-doc-table .gd-amt b { font-weight: 700; }
.gen-amt-set { background: #DCFCE7; color: #14794A; border-radius: 3px; padding: 0 3px; font-weight: 600; }
.gen-amt-row-total td { border-top: 1.5px solid #111; padding-top: 5px; font-weight: 700; }
.gen-amt-row-rule td { border-top: 1px solid #999; }

.gen-doc-foot {
  text-align: center;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 30px;
  letter-spacing: 0.04em;
}
.gen-doc-disclaimer {
  margin-top: 30px; padding: 10px 14px;
  background: #FFF7ED; border: 1px solid #F6C98A; border-radius: 8px;
  font-size: 11px; line-height: 1.5; color: #92590F; text-align: center;
}

/* Signatures – im Vorlagen-Stil: gepunktete Datums-/Unterschriftszeilen, gestapelt */
.gen-doc-sign {
  display: flex;
  flex-direction: column;
  gap: 76px;
  margin-top: 48px;
}
.gen-doc-sign-date { margin-left: 18px; font-size: 13px; color: #1A1A1A; }
.gen-doc-dotfill {
  display: inline-block; width: 200px; height: 0;
  border-bottom: 1.5px dotted #1A1A1A; vertical-align: middle;
}
.gen-doc-dotfill-sm { width: 110px; }
.gen-doc-sign-foot { margin-top: 70px; text-align: center; }
.gen-doc-sign-rule {
  width: 280px; max-width: 80%; height: 0; margin: 0 auto 8px;
  border-bottom: 1.5px dotted #1A1A1A;
}
.gen-doc-sign-label { font-size: 13px; color: #1A1A1A; }

/* ── Vertragsparteien (Schritt 2) ──────── */
.gen-party-sec {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 26px 0 14px;
}
.gen-party-sec:first-child { margin-top: 4px; }
.gen-party-sec h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.gen-addbtn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line); background: white;
  color: var(--ink-2); font-size: 13px; font-weight: 600; font-family: inherit;
  transition: all .12s;
}
.gen-addbtn:hover { background: var(--line-2); color: var(--ink); border-color: var(--accent-line); }

/* Akzent-Variante: hervorgehobener Kataster-Such-Button */
.gen-addbtn-accent {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 0 0 3px var(--accent-soft);
}
.gen-addbtn-accent:hover { background: var(--accent); color: #fff; border-color: var(--accent); filter: brightness(.95); }
.gen-addbtn-accent svg { stroke: #fff; }

.gen-party {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 18px 16px; margin-bottom: 16px; background: white;
}
.gen-party-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.gen-party-head h4 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.gen-party-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--accent); background: #FDEBD3; padding: 3px 9px; border-radius: 999px;
}
.gen-party-remove {
  margin-left: auto; border: 0; background: transparent;
  color: var(--ink-3); font-size: 13px; font-weight: 500; font-family: inherit;
}
.gen-party-remove:hover { color: #B91C1C; }
.gen-party-remove:disabled { opacity: .4; cursor: not-allowed; }

/* Quelle-Umschalter */
.gen-quelle-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.gen-quelle {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 14px;
}
.gen-quelle > span { font-size: 13px; color: var(--ink-3); transition: color .12s; }
.gen-quelle > span.active { color: var(--ink); font-weight: 600; }

/* „auswählen"-Dropdown */
.gen-pick-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.gen-pick {
  width: 100%; height: 44px; border-radius: 8px;
  border: 1px solid var(--line); background: white;
  font-size: 14px; padding: 0 14px; color: var(--ink); font-family: inherit;
  margin-bottom: 16px; cursor: pointer;
}
.gen-pick:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Felder im Generator (Partei-Karten + Objekt-/Detailformular) — Musterabfrage-Stil (weiß) */
.gen-cream .field label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.gen-cream .field input, .gen-cream .field select, .gen-cream .field textarea {
  background: white; border: 1px solid var(--line); height: 38px; border-radius: 8px; color: var(--ink);
}
.gen-cream .field textarea { height: auto; }
.gen-cream .field input:focus, .gen-cream .field select:focus, .gen-cream .field textarea:focus {
  background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
/* Gesperrte Auswahl (Reinversion Diözese Innsbruck): ausgegraut, nicht bedienbar. */
.gen-cream .field select:disabled, .form-grid select:disabled, select:disabled {
  background: var(--line-2, #eef1f5); color: var(--ink-3, #8a94a6);
  cursor: not-allowed; opacity: .7;
}

/* Label-Zeile mit Info-Icon */
.gen-flabel { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.gen-info { width: 15px; height: 15px; color: var(--ink-3); flex-shrink: 0; cursor: help; }
.gen-info:hover { color: var(--accent); }

/* Eingabefeld mit Aktion daneben (z. B. Firmenbuch-Suche neben FN) */
.gen-input-with-action { display: flex; gap: 8px; align-items: stretch; }
.gen-input-with-action input { flex: 1; min-width: 0; }
.gen-fn-search {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 600; font-family: inherit; text-decoration: none; white-space: nowrap;
  transition: all .12s;
}
.gen-fn-search:hover { background: #FDEBD3; border-color: var(--accent); }

/* Schnellauswahl Kaution (1–4 Bruttomonatsmieten) */
.gen-deposit-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gen-quick-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 9px; border: 1px solid var(--line);
  background: white; color: var(--ink-2); font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all .12s;
}
.gen-quick-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.gen-quick-btn:disabled { opacity: .5; cursor: not-allowed; }
.gen-quick-amt { font-variant-numeric: tabular-nums; font-weight: 700; opacity: .9; }

/* Befristung: schreibgeschütztes Vertragsende + Mindestbefristungs-Hinweis */
.gen-readonly-input { background: #F4F6F9 !important; color: var(--ink-2) !important; cursor: default; }
/* Räume-Chip-Komposer */
.gen-raumchips { margin-bottom: 8px; }
.gen-raumchips-row { display: flex; flex-wrap: wrap; gap: 7px; }
.gen-raumchips-foot { display: flex; align-items: center; gap: 12px; margin-top: 9px; flex-wrap: wrap; }
.gen-raumchips-preview { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); font-style: italic; line-height: 1.4; }
.gen-minterm-hint {
  display: flex; align-items: center; gap: 7px; margin: 10px 0 0;
  font-size: 13px; color: var(--ink-2);
}
.gen-minterm-hint svg { color: var(--accent); flex-shrink: 0; }
.gen-minterm-hint b { color: var(--ink); font-weight: 700; }
/* Audit V4: Korrektur der Befristungsdauer */
.gen-dauer-err { margin: 8px 0 0; font-size: 13px; font-weight: 600; line-height: 1.4; color: #B91C1C; }
/* Audit V5: berechneter Hauptmietzins unter „Hauptmietzins ohne Abschlag“ */
.gen-abschlag-calc { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-2); }
.gen-abschlag-calc b { color: var(--ink); }

/* Slider (Kündigungsfrist) */
.gen-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
  border-radius: 999px; background: var(--line-2); outline: none; margin: 8px 0 2px; cursor: pointer;
}
.gen-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(15,23,42,.25);
}
.gen-slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(15,23,42,.25);
}
.gen-slider-val {
  font-size: 13px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 3px 11px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
.gen-slider-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.gen-slider:disabled { cursor: not-allowed; opacity: .9; }
.gen-slider:disabled::-webkit-slider-thumb { cursor: not-allowed; }
.gen-slider:disabled::-moz-range-thumb { cursor: not-allowed; }

/* Zahlenfeld ohne Stepper-Pfeile (z. B. Befristungsdauer) */
.gen-no-spin::-webkit-outer-spin-button,
.gen-no-spin::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gen-no-spin { -moz-appearance: textfield; appearance: textfield; }

/* „Erscheint im Vertrag"-Markierung an Feldlabels + Legende */
.gen-flow-dot, .gen-flow-legend { display: none !important; }
.gen-flow-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 5px; vertical-align: -2px;
  color: var(--accent); opacity: .65; cursor: help;
}
.gen-flow-dot svg { display: block; }
label:hover .gen-flow-dot, .gen-bool-row span:hover .gen-flow-dot { opacity: 1; }
.gen-flow-legend {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ink-3); font-weight: 500;
  padding: 3px 9px 3px 6px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--accent-soft);
}
.gen-flow-legend .gen-flow-dot { margin-left: 0; opacity: .9; }

/* „Warum dieses Muster?"-Aufklapper */
.gen-why { margin: 0 0 18px; border: 1px solid var(--line-2); border-radius: var(--density-radius, 12px); overflow: hidden; }
.gen-why-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 11px 14px; background: #fff; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink); text-align: left;
}
.gen-why-toggle:hover { background: var(--line-1, #f8fafc); }
.gen-why-chev { transition: transform .18s; color: var(--ink-3); flex-shrink: 0; }
.gen-why.open .gen-why-chev { transform: rotate(90deg); }
.gen-why-count {
  margin-left: auto; font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  padding: 2px 9px; border-radius: 999px;
}
.gen-why-body { padding: 4px 14px 14px; border-top: 1px solid var(--line-2); background: #fff; }
.gen-why-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: why; }
.gen-why-item { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.gen-why-item svg { color: var(--accent); margin-top: 2px; }
.gen-why-foot { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: 12px; line-height: 1.5; color: var(--ink-3); }

/* Dezenter Plausibilitäts-Hinweis (z. B. Kaution) */
.gen-plaus-hint {
  display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: start;
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: #FFF7ED; border: 1px solid var(--accent-line);
  font-size: 12px; line-height: 1.5; color: #9A5B12;
}
.gen-plaus-hint svg { color: var(--accent); margin-top: 1px; }
.gen-plaus-hint b { color: #7C4710; }

/* Read-only-Feld „Typ" (Mietertyp kommt aus der Musterabfrage) */
.gen-type-fixed {
  height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 14px; border: 1px solid var(--line); border-radius: 8px;
  background: #F4F6F9; color: var(--ink-2); font-size: 14px; font-weight: 600;
}
.gen-type-fixed-hint {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--accent); background: #FDEBD3; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}

/* Custom-Tooltip für Info-Icons (weiße Schrift, oranger Hintergrund) */
.gen-tip { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; cursor: help; }
.gen-tip:hover .gen-info, .gen-tip:focus-visible .gen-info { color: var(--accent); }
.gen-tip:focus-visible { outline: none; }
.gen-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 9px);
  right: -6px;
  z-index: 60;
  width: max-content;
  max-width: 260px;
  padding: 8px 11px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(247,142,17,.28), 0 2px 6px rgba(15,23,42,.12);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.gen-tip::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 3px);
  right: 2px;
  z-index: 61;
  border: 6px solid transparent;
  border-top-color: var(--accent);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.gen-tip:hover::after, .gen-tip:focus-visible::after,
.gen-tip:hover::before, .gen-tip:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}

/* „aktualisieren"-Button */
.gen-party-foot { display: flex; justify-content: flex-end; margin-top: 16px; }

/* 2-Spalten-Raster der Partei-Formulare */
.gen-party-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 4px; }
.gen-party-grid .field { min-width: 0; }
.gen-party-grid .field.full { grid-column: span 2; }

/* ── Mietobjekt (Schritt 3) ────────────── */
.gen-subsec { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.gen-subsec:first-child { margin-top: 4px; }
.gen-subsec-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* Bool-Zeile (z. B. Möbliert) */
.gen-bool-row {
  display: flex; align-items: center; justify-content: space-between;
  background: white; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 16px; height: 44px; grid-column: span 2;
}
.gen-bool-row > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.gen-bool-toggle { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); }
.gen-bool-toggle b { font-weight: 500; transition: color .12s; }
.gen-bool-toggle b.active { color: var(--ink); font-weight: 700; }

/* Listen-Zeile (Gemeinschaftsanlagen) */
.gen-listrow { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.gen-listrow input {
  flex: 1; font-family: inherit; font-size: 13px; height: 38px; padding: 0 12px;
  background: white; border: 1px solid var(--line); border-radius: 8px; color: var(--ink);
}
.gen-listrow input:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.gen-list-remove {
  flex-shrink: 0; height: 42px; padding: 0 16px; border-radius: 9px;
  border: 1px solid var(--line); background: white; color: var(--ink-2);
  font-size: 13px; font-weight: 600; font-family: inherit;
}
.gen-list-remove:hover { color: #B91C1C; border-color: #F3C6C6; }
.gen-list-add {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 2px;
  height: 38px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line); background: white; color: var(--ink-2);
  font-size: 13px; font-weight: 600; font-family: inherit;
}
.gen-list-add:hover { background: var(--line-2); color: var(--ink); border-color: var(--accent-line); }

/* Eintrags-Karte (Vertragsanlagen, Ausstattungszuschläge) */
.gen-entry { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.gen-entry-head { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.gen-entry-remove {
  border: 1px solid var(--line); background: white; height: 34px; padding: 0 14px;
  border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); font-family: inherit;
}
.gen-entry-remove:hover { color: #B91C1C; border-color: #F3C6C6; }
.gen-entry input, .gen-entry textarea {
  width: 100%; font-family: inherit; font-size: 13px;
  background: white; border: 1px solid var(--line); border-radius: 8px; color: var(--ink);
}
.gen-entry input { height: 38px; padding: 0 12px; }
.gen-entry textarea { padding: 10px 12px; resize: vertical; line-height: 1.5; }
.gen-entry input:focus, .gen-entry textarea:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Label-Zeile mit Aktion rechts (für Listen-Felder) */
.gen-listhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.gen-listhead-label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.gen-listhead-actions { display: flex; align-items: center; gap: 10px; }
.gen-update-btn {
  height: 40px; padding: 0 18px; border-radius: 9px;
  border: 1.5px solid var(--accent); background: white; color: var(--accent);
  font-size: 13px; font-weight: 700; font-family: inherit; transition: all .12s;
}
.gen-update-btn:hover { background: var(--accent-soft); }

/* ── Conditions form helpers ───────────── */
.gen-radio-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.gen-radio {
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  border: 1.5px solid var(--line);
  background: white;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.gen-radio:hover { border-color: var(--accent-line); }
.gen-radio.disabled, .gen-radio:disabled {
  opacity: .5;
  cursor: not-allowed;
  background: var(--line-2, #eef1f5);
  color: var(--ink-3, #8a94a6);
  border-color: var(--line-2, #e5e8ee);
}
.gen-radio.disabled:hover, .gen-radio:disabled:hover { border-color: var(--line-2, #e5e8ee); }
.gen-radio.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.gen-sum-amount {
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gen-sum-amount-label { font-size: 12px; color: #14794A; font-weight: 600; }
.gen-sum-amount-val { font-size: 20px; font-weight: 800; color: #14794A; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
/* Audit M15: nicht enthaltene Heiz-/Warmwasserkosten unter der Summe */
.gen-sum-amount:has(.gen-sum-amount-note) { flex-wrap: wrap; }
.gen-sum-amount-note { flex-basis: 100%; margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: #3F5F4E; }

/* ── Zusammenfassung review ────────────── */
.gen-review {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gen-review-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.gen-review-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px;
  background: var(--line-2);
}
.gen-review-head h4 { margin: 0; font-size: 13px; font-weight: 700; }
.gen-review-edit {
  border: 0; background: transparent; color: var(--accent);
  font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px;
}
.gen-review-body {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
  font-size: 13px;
}
.gen-review-kv { display: flex; flex-direction: column; gap: 1px; }
.gen-review-kv span { color: var(--ink-3); font-size: 11px; }
.gen-review-kv b { font-weight: 600; color: var(--ink); }

/* ── Generating overlay + success ──────── */
.gen-overlay {
  position: fixed; inset: 0;
  background: rgba(248,250,252,.86);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.gen-overlay-inner { text-align: center; }
.gen-overlay-spin {
  width: 46px; height: 46px;
  border: 4px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 999px;
  margin: 0 auto 18px;
  animation: spin .8s linear infinite;
}
.gen-overlay-inner h3 { margin: 0 0 6px; font-size: 20px; }
.gen-overlay-inner p { margin: 0; color: var(--ink-2); font-size: 13px; }

/* ── Zusammenfassung: Weiterverarbeitung + Dank ── */
.gen-proc-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.gen-proc-btn {
  display: inline-flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 20px; border-radius: 10px;
  border: 1px solid var(--line); background: white; color: var(--ink);
  font-size: 14px; font-weight: 600; font-family: inherit; transition: all .12s;
}
.gen-proc-btn:hover { background: var(--line-2); border-color: var(--accent-line); }
.gen-proc-btn-primary { background: var(--accent); border-color: var(--accent); color: white; }
.gen-proc-btn-primary:hover { background: var(--accent); filter: brightness(.96); border-color: var(--accent); }

.gen-thanks {
  position: relative; overflow: hidden;
  margin-top: 26px;
  display: flex; align-items: center; gap: 20px;
  background: linear-gradient(180deg, #FFF4E6 0%, #ffffff 100%);
  border: 1.5px solid var(--accent-line);
  border-radius: 18px;
  padding: 26px 30px;
}
.gen-thanks::after {
  content: ""; position: absolute; top: 50%; right: 26px; transform: translateY(-50%);
  width: 200px; height: 110px;
  background: url("assets/dioezese-innsbruck.png") no-repeat right center;
  background-size: contain; opacity: 0.05; pointer-events: none; z-index: 0;
}
.gen-thanks-warn::after { display: none; }
/* Variante „in Bearbeitung" (work in progress) */
.gen-thanks-wip {
  background: linear-gradient(180deg, #FFF7ED 0%, #ffffff 100%);
  border-color: var(--accent-line);
}
.gen-thanks-wip::after { display: none; }
.gen-thanks-wip .gen-thanks-icon { background: var(--accent-soft); color: var(--accent); }
.gen-thanks-wip .gen-thanks-text h3 { color: var(--accent); }
.gen-wip-bar { height: 7px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin: 12px 0 5px; max-width: 360px; }
.gen-wip-bar-fill { height: 100%; border-radius: 999px; background: var(--accent); transition: width .35s cubic-bezier(.22,.61,.36,1); }
.gen-wip-pct { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.gen-thanks-missing { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gen-miss-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--accent-line);
  background: #fff; color: var(--accent); font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all .12s;
}
.gen-miss-chip:hover { background: var(--accent-soft); border-color: var(--accent); }
.gen-miss-chip svg { opacity: .8; }

/* Offene-Einträge-Panel – eigenständig unter Eingabe + Vorschau */
.gen-missing { margin: 22px 0 0; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; overflow: hidden; }
.gen-missing-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; font-size: 13px; font-weight: 700; color: var(--ink);
  background: #FFF7ED; border-bottom: 1px solid var(--accent-line);
}
.gen-missing-head svg { color: var(--accent); }
.gen-missing-count {
  margin-left: auto; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent);
  border-radius: 999px; padding: 2px 9px; min-width: 20px; text-align: center;
}
.gen-missing-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.gen-missing-group { display: flex; flex-direction: column; gap: 6px; }
.gen-missing-sec { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.gen-missing-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.gen-missing-chip {
  font-family: inherit; font-size: 12px; font-weight: 500; color: #9A5B12;
  background: #FFF7ED; border: 1px solid var(--accent-line); border-radius: 999px;
  padding: 5px 12px; cursor: pointer; transition: all .12s;
}
.gen-missing-chip:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.gen-missing-ok {
  display: flex; align-items: center; gap: 9px; padding: 13px 15px;
  font-size: 13px; font-weight: 600; color: #1F8A5B;
  background: #ECFDF5; border-color: #A7E3C6;
}
.gen-missing-ok svg { color: #1F8A5B; }
/* Hervorheben des angesprungenen Platzhalters in der Vorschau */
.gen-miss-flash {
  background: var(--accent) !important; color: #fff !important;
  border-radius: 3px; box-shadow: 0 0 0 3px var(--accent-soft);
  transition: all .15s;
}
.gen-thanks-icon {
  position: relative; z-index: 1; flex-shrink: 0;
  width: 50px; height: 50px; border-radius: 999px;
  background: #F0FDF4; color: #16A34A;
  display: flex; align-items: center; justify-content: center;
}
.gen-thanks-text { position: relative; z-index: 1; }
.gen-thanks-text h3 { margin: 0 0 5px; font-size: 20px; font-weight: 700; color: var(--accent); letter-spacing: -0.01em; }
.gen-thanks-text p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); max-width: 520px; }

.gen-success {
  max-width: 640px;
  margin: 40px auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  animation: flowFade .32s cubic-bezier(.22,.61,.36,1);
}
.gen-success-icon {
  width: 76px; height: 76px;
  border-radius: 999px;
  background: #F0FDF4;
  color: #16A34A;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.gen-success h1 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 10px; }
.gen-success p { color: var(--ink-2); margin: 0 auto 26px; max-width: 46ch; line-height: 1.6; }
.gen-success-file {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 26px;
  background: var(--line-2);
}
.gen-success-file-icon {
  width: 40px; height: 48px; border-radius: 4px;
  background: white; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.gen-success-file-meta { text-align: left; }
.gen-success-file-meta b { display: block; font-size: 13px; }
.gen-success-file-meta span { font-size: 11px; color: var(--ink-3); }
.gen-success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Responsive ────────────────────────── */
@media (max-width: 1080px) {
  .gen-split { grid-template-columns: 1fr; }
  .gen-steps { grid-template-columns: repeat(3, 1fr); }
  .gen-titlebar { grid-template-columns: 1fr; gap: 12px; }
  .gen-status { justify-content: flex-start; }
  .gen-titlebar-actions { justify-content: flex-start; }
}

/* ── Print: isolate the contract document ─ */
/* Vertrag im Erfolgs-Screen: gerendert (für innerText/Export), aber außerhalb des sichtbaren Bereichs */
.gen-print-doc {
  position: absolute; left: -99999px; top: 0;
  width: 794px; pointer-events: none;
}

@media print {
  body * { visibility: hidden !important; }
  .gen-doc-frame, .gen-doc-frame *,
  .gen-print-doc, .gen-print-doc * { visibility: visible !important; }
  .gen-doc-frame {
    position: absolute; left: 0; top: 0; right: 0;
    margin: 0; padding: 0; max-height: none; background: white;
    overflow: visible;
  }
  .gen-print-doc {
    position: absolute; left: 0 !important; top: 0; right: 0;
    width: 100% !important; margin: 0; padding: 0; background: white;
  }
  .gen-doc-paper { box-shadow: none; max-width: 100%; }
  .gen-v-set, .gen-v-empty, .gen-amt-set { background: transparent !important; color: #111 !important; }
}

/* Beilagen-Zeilen: Beschriftung links, Schalter und Datum rechts in EINER Zeile */
.gen-bool-right { display: inline-flex; align-items: center; gap: 16px; flex-shrink: 0; }
.gen-bool-row .gen-row-date {
  width: 165px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 6px;
  background: #fff; font-size: 13px; color: var(--ink-2);
}

/* Erläuterung neben „Angaben als PDF" in der Zusammenfassung. */
.gen-proc-hint { align-self: center; font-size: 13px; color: var(--ink-2, #475569); }

/* Umsatzsteuer-Dropdown neben der Bruttosumme; auf schmalen Breiten untereinander. */
.ust-zeile { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.ust-zeile > .field { flex: 0 1 260px; min-width: 200px; }
.ust-zeile .gen-sum-amount-val { white-space: nowrap; }
.ust-zeile > .gen-sum-amount { flex: 1 1 280px; align-self: flex-start; margin: 20px 0 0; padding: 7px 16px; min-height: 38px; gap: 12px; }

/* Besonderheiten (Musterabfrage und Vertragsgenerator). */
.besonderheiten-zaehler { align-self: flex-end; font-size: 12px; color: var(--ink-3, #64748B); font-variant-numeric: tabular-nums; }
/* Funktions-Audit V16: gewähltes Vertragsmuster auf der Startseite */
.welcome-min-muster { max-width: 640px; margin: 0 auto 18px; text-align: left; }
