/* Vertragsbereich im CRM (Liste, Editor, Verlauf). Mobil zuerst; Dokumentgestaltung: vertrag-dokument.css. */
.v-filter { display: grid; gap: 8px; grid-template-columns: 1fr; margin: 14px 0 16px; }
.v-karte-titel { font-size: 16px; letter-spacing: -.01em; }
.v-aktionen { justify-content: flex-start; }
.v-leer { color: var(--muted); }
.v-offen { color: #6b3d00; background: #fff1c2; border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 700; }
.v-status--entwurf { background: #fff1c2; color: #6b3d00; }
.v-status--text_freigegeben { background: #dff3e8; color: var(--ok); }
.v-status--neu { background: #efece8; color: var(--muted); }
a.btn, .ghost-link { display: inline-block; text-decoration: none; }
.ghost-link { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.ghost-link.is-disabled { opacity: .45; pointer-events: none; }
.v-mehrzeilig { white-space: pre-line; }
.v-wahl { display: grid; gap: 12px; max-width: 560px; }

.v-editor > .err:empty { display: none; }
.v-aktionsleiste { display: grid; gap: 8px; padding: 12px 0; margin-bottom: 6px; background: var(--ivory); border-bottom: 1px solid var(--line); }
.v-zustand { margin: 0; font-size: 13px; line-height: 1.45; }
.v-aktionsleiste > .row { justify-content: flex-start; }
.v-ph select, .v-ph textarea, .v-filter select, .v-filter input { font-size: 14px; }
.v-umschalter { display: inline-flex; margin: 10px 0 14px; padding: 4px; border-radius: 999px; background: #efece8; }
.v-umschalter button { background: transparent; color: var(--ink); padding: 9px 18px; transition: none; }
.v-umschalter button[aria-pressed="true"] { background: var(--cobalt); color: #fff; }
.v-raster > .v-vorschau { display: none; }
.v-raster.zeigt-vorschau > .v-formular { display: none; }
.v-raster.zeigt-vorschau > .v-vorschau { display: block; }
.v-formular { display: grid; gap: 14px; min-width: 0; }
.v-gruppe { display: grid; gap: 10px; }
.v-gruppe h3 { margin: 0; font-size: 15px; }
.v-parteien { display: grid; gap: 14px; }
.v-partei { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.v-partei > button { justify-self: start; }
.v-abschnitte { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.v-abschnitt { display: grid; gap: 8px; }
.v-abschnitt textarea { resize: vertical; line-height: 1.55; }
.v-nr { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cobalt); }
.v-abschnitt-knoepfe { gap: 6px; }
.v-abschnitt-knoepfe button { padding: 7px 12px; }
.v-plus { justify-self: start; }
.v-hilfe { font-size: 13px; color: var(--muted); }
.v-hilfe ul { margin: 6px 0 0; padding-left: 18px; }
.v-platzhalter { display: grid; gap: 10px; }
.v-platzhalter h3 { margin: 0; font-size: 15px; }
.v-ph { display: grid; gap: 6px; padding: 10px; border-radius: 10px; border: 1.5px solid var(--line); }
.v-ph.is-offen { border-color: #e2a33a; background: #fffaf0; }
.v-ph.is-ok { border-color: #b9dfc9; }
.v-ph-name { font-weight: 700; font-size: 13px; overflow-wrap: anywhere; }
.v-wert { margin: 0; font-size: 13px; color: var(--muted); white-space: pre-line; }

.v-vorschau { min-width: 0; }
.v-vorschau-blatt { overflow: hidden; border-radius: 4px; }

.v-verlauf { margin-top: 24px; }
.v-verlauf summary { cursor: pointer; font-weight: 700; }
.v-versionen { display: grid; gap: 8px; margin: 12px 0 0; padding-left: 20px; }
.v-versionen li { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; }
.v-diff-block { background: #faf6f9; border-radius: 10px; padding: 8px 12px; margin-top: 10px; }
.v-diff-block h4 { margin: 0 0 4px; font-size: 13px; }
.v-diff-block p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.v-diff ins { background: #dff3e8; color: #10462d; text-decoration: none; }
.v-diff del { background: #fde2e6; color: #7a1d2c; }

.v-dialog { max-width: min(520px, calc(100vw - 32px)); border: 0; border-radius: 16px; padding: 22px; box-shadow: 0 30px 80px rgba(23, 20, 26, .3); }
.v-dialog::backdrop { background: rgba(23, 20, 26, .45); }
.v-dialog h3 { margin-top: 0; }
.v-hinweis { padding: 8px 12px; border-radius: 8px; background: #efece8; font-size: 13px; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
label.check input { width: auto; margin-top: 3px; }

@media (min-width: 720px) {
  .v-filter { grid-template-columns: 1fr 200px 200px; }
  .v-aktionsleiste { position: sticky; top: 0; z-index: 3; }
}
@media (min-width: 1100px) {
  .v-umschalter { display: none; }
  .v-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .v-raster > .v-formular, .v-raster > .v-vorschau { display: block; }
  .v-raster > .v-formular { display: grid; }
  .v-vorschau { position: sticky; top: 112px; max-height: calc(100vh - 124px); overflow: auto; }
}
.v-vorschau:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 4px; }
