/* Verträge im Kundenportal (17.10.2026) — kundenportal-vertraege.js (Kunde) und kundenportal-vertraege-admin.js (Admin).
   Farben wie konto-app.css (dunkle Fläche, Töne über --ld-*). */

/* Hinweis oben auf jeder Seite, solange ein Vertrag offen ist — bewusst auffällig */
.kvt-hinweis{ display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin: 0 0 18px; border-radius: 14px;
  background: rgba(220,38,38,.12); border: 2px solid #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.12) }
.kvt-hinweis-zeichen{ flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: #dc2626; color: #1a0b0b; font: 800 22px/1 inherit }
.kvt-hinweis-text{ flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px }
.kvt-hinweis-text b{ font-size: 17px; color: #a51c1c }
.kvt-hinweis-text span{ color: var(--ld-text-2); font-size: 15px; line-height: 1.5 }
.kvt-hinweis-knopf{ flex: 0 0 auto; width: auto; min-width: 220px; padding: 0 20px; text-decoration: none; text-align: center }

/* Ansicht „Verträge“ */
.kvt-vertrag--offen{ border-color: rgba(212,161,6,.55) }
.kvt-meta{ margin: 0; color: var(--ld-text-2); font-size: 14px }
.kvt-lesen{ margin: 0; color: var(--ld-text-2) }
.kvt-text{ max-height: 60vh; overflow: auto; padding: 18px 20px; border-radius: 12px; background: #fff; color: #1f2937;
  font-size: 15px; line-height: 1.6 }
.kvt-text:focus-visible{ outline: 3px solid #d4a106; outline-offset: 2px }
.kvt-text h1{ font-size: 22px; margin: 0 0 4px; color: #111827; text-transform: none }
.kvt-text h2{ font-size: 17px; margin: 22px 0 6px; color: #111827; text-transform: none; letter-spacing: 0 }
.kvt-text h3{ font-size: 15px; margin: 14px 0 4px; color: #111827; text-transform: none }
.kvt-text p, .kvt-text li{ color: #1f2937 }
.kvt-text ul, .kvt-text ol{ padding-left: 22px }
.kvt-text table{ width: 100%; border-collapse: collapse; font-size: 14px }
.kvt-text th, .kvt-text td{ border: 1px solid #d1d5db; padding: 6px 8px; vertical-align: top; text-align: left; color: #1f2937 }
.kvt-text .avv-unterzeile{ color: #4b5563; margin: 0 0 14px }
.kvt-text .avv-parteien{ display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 10px 0 16px }
.kvt-details summary{ cursor: pointer; font-weight: 600; color: var(--ld-text); padding: 6px 0 }
.kvt-details[open] summary{ margin-bottom: 10px }
.kvt-knoepfe{ display: flex; flex-wrap: wrap; gap: 10px }

/* Abschließen */
.kvt-form{ display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: 12px;
  background: rgba(22,163,74,.06); border: 1px solid rgba(22,163,74,.45) }
.kvt-form h3{ margin: 0; font-size: 18px; text-transform: none }
.kvt-felder{ display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px }
.kvt-haken{ display: flex; gap: 12px; align-items: flex-start; font-size: 16px; font-weight: 600; color: var(--ld-text); cursor: pointer }
.kvt-haken input{ flex: 0 0 auto; width: 22px; height: 22px; margin: 2px 0 0; accent-color: #16a34a }
.kvt-abschliessen{ width: auto; align-self: flex-start; min-width: 280px; padding: 0 22px }
/* Hinweis auf die Bestätigungsmail (27.10.2026): Adresse gut sichtbar, lange Adressen brechen um */
.kvt-mailhinweis{ margin: 0; padding: 10px 14px; border-left: 3px solid #16a34a; background: rgba(22,163,74,.06); font-size: 15px; color: var(--ld-text); overflow-wrap: anywhere }
.kvt-abschliessen{ height: auto; min-height: 48px; line-height: 1.35; padding-top: 10px; padding-bottom: 10px; white-space: normal; overflow-wrap: anywhere }

/* Abschlussvermerk */
.kvt-abschluss{ padding: 16px 18px; border-radius: 12px; background: rgba(22,163,74,.08); border: 2px solid #16a34a }
.kvt-abschluss-kopf{ margin: 0 0 10px; font-size: 17px; font-weight: 700; color: #146c35 }
.kvt-eckdaten{ display: flex; flex-direction: column; gap: 6px; margin: 0 }
.kvt-eckdaten div{ display: grid; grid-template-columns: minmax(160px, 260px) minmax(0, 1fr); gap: 10px }
.kvt-eckdaten dt{ color: var(--ld-text-2); font-size: 14px }
.kvt-eckdaten dd{ margin: 0; color: var(--ld-text); font-size: 15px }
.kvt-pruefsumme{ font-family: ui-monospace, Menlo, monospace; font-size: 13px !important; word-break: break-all }

/* Admin-Seite „Verträge“ */
.kvt-admin-liste{ display: flex; flex-direction: column; gap: 10px }
.kvt-zeile{ display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px 18px; align-items: center;
  padding: 14px 16px; border-radius: 12px; background: var(--ld-flaeche); border: 1px solid var(--ld-rand) }
.kvt-zeile h3{ margin: 0 0 2px; font-size: 16px; text-transform: none }
.kvt-zeile p{ margin: 0; font-size: 14px; color: var(--ld-text-2) }
.kvt-zeile--neu{ border-color: #16a34a }
.kvt-zeile .kvt-zeit{ color: var(--ld-text); font-weight: 600 }
.kvt-neu-form{ display: flex; flex-direction: column; gap: 12px }
.kvt-neu-form textarea{ min-height: 220px; font-family: ui-monospace, Menlo, monospace; font-size: 13px }

@media (max-width: 720px){
  .kvt-hinweis{ flex-direction: column; align-items: stretch; text-align: left }
  .kvt-hinweis-knopf{ min-width: 0; width: 100% }
  .kvt-abschliessen{ width: 100%; min-width: 0 }
  .kvt-eckdaten div{ grid-template-columns: 1fr; gap: 2px }
  .kvt-zeile{ grid-template-columns: 1fr }
  .kvt-text{ max-height: 70vh; padding: 14px }
}
/* „Gilt für“ (Projekte) im Vertragsformular (17.10.2026, Umbau Abschnitt 2) */
.kvt-bezug{ margin: 0; padding: 10px 12px; border: 1px solid var(--ld-rand); border-radius: 10px; display: flex; flex-direction: column; gap: 6px }
.kvt-bezug legend{ padding: 0 4px; font-size: 13px; color: var(--ld-text-2) }
/* Zweiklang (30.10.2026): Vertragshinweis ruhiger — eine Zeile in Orange statt großem roten Kasten; der erklärende Satz nur am Rechner */
.kvt-hinweis{ gap: 12px; padding: 12px 14px; border-radius: 14px; background: #fff4e5; border: 1px solid #f5c27a; box-shadow: none }
.kvt-hinweis-zeichen{ width: 30px; height: 30px; background: #ea6c10; color: #fff; font-size: 15px }
.kvt-hinweis-text b{ font-size: 15.5px; color: #7a3a05 }
.kvt-hinweis-text span{ font-size: 14px }
.kvt-hinweis-knopf{ min-width: 0 }
@media (max-width: 760px){
  /* ausdrücklich Zeile: die ältere Regel (≤ 720 px) setzt column — mit wrap rutschte der Knopf als zweite Spalte rechts aus dem Bild (Prüfung 30.10.2026) */
  .kvt-hinweis{ flex-direction: row; flex-wrap: wrap; align-items: center }
  .kvt-hinweis-text{ flex: 1 1 0 }
  .kvt-hinweis-text span{ display: none }
  .kvt-hinweis-knopf{ flex: 1 1 100%; width: 100% }
}
