/* GiroCode, Mahnlauf, Bewertung (seit 0.9, Paket Z). Nur Variablen aus app.css, Präfix .zl-.
   Mahnwesen (#/app/crm/mahnwesen), QR-Code-Dialog, Karte „Mahnung und Bewertung“ in der Kundenakte, Mahnsperre im Beleg,
   Einstellungen und die öffentlichen Seiten /bewertung/<token>/abmelden (body.zl-seite, ohne Inline-Stil). */

/* ---------- Mahnwesen ---------- */
.zl-stand { margin-bottom: 18px; }
.zl-stand-zeile { display: flex; align-items: center; gap: 14px; padding: 14px 18px; flex-wrap: wrap; }
.zl-stand-zeile + .zl-stand-zeile { border-top: 1px solid var(--line); }
.zl-stand-zeile .grow { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.zl-stand-zeile.warn { background: var(--warn-tint); }
.zl-stand-zeile.warn .zl-stand-ico { color: var(--warn); background: var(--surface); }
.zl-stand-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--copper-dark); }
.zl-gruppe { margin-bottom: 18px; }
.zl-gruppe .card-head { flex-wrap: wrap; }
.zl-post-hinweis { border-bottom: 1px solid var(--line); padding-top: 10px; padding-bottom: 10px; }
.zl-post-hinweis .ico { display: inline-block; vertical-align: -2px; }
.zl-zeile { flex-wrap: wrap; align-items: flex-start; }
.list .zl-zeile .t { white-space: normal; }
.zl-zeile .t a { color: inherit; text-decoration: none; }
.zl-zeile .t a:hover { text-decoration: underline; }
.zl-zeile .m.small { font-size: 12.5px; }
.zl-zeile .m .ico { display: inline-block; vertical-align: -2px; }
.zl-zeile.fehler { background: color-mix(in srgb, var(--bad-tint) 45%, transparent); }
.zl-zeile.in_arbeit { opacity: .75; }
.zl-an { overflow-wrap: anywhere; }
.zl-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; flex: none; }
.zl-mehr { margin-bottom: 18px; }
.zl-mehr > summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; list-style: none; min-height: 48px; }
.zl-mehr > summary::-webkit-details-marker { display: none; }
.zl-mehr > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .15s; }
.zl-mehr[open] > summary::after { transform: rotate(-135deg); }
.zl-mehr[open] > summary { border-bottom: 1px solid var(--line); }
a.zl-uebersicht { display: block; text-decoration: none; color: var(--ink); }
a.zl-uebersicht:hover { border-color: var(--copper); }

/* ---------- QR-Code zum Bezahlen ---------- */
.zl-qr { display: grid; gap: 12px; justify-items: center; padding: 18px 20px 20px; text-align: center; }
.zl-qr-bild { width: min(280px, 72vw); height: auto; aspect-ratio: 1; padding: 10px; background: #fff; border-radius: 8px; border: 1px solid var(--line); image-rendering: pixelated; }
.zl-qr-betrag { font: 600 26px/1.1 var(--display); letter-spacing: .01em; }
.zl-qr-daten { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; text-align: left; font-size: 14px; width: 100%; max-width: 420px; }
.zl-qr-daten dt { color: var(--ink-3); }
.zl-qr-daten dd { margin: 0; overflow-wrap: anywhere; }
.zl-qr .form-actions { width: 100%; }

/* ---------- Kundenakte und Beleg ---------- */
.zl-akte-teil { display: grid; gap: 10px; }
.zl-akte-teil + .zl-akte-teil { border-top: 1px solid var(--line); }
.zl-akte-zeile { display: flex; align-items: flex-start; gap: 12px; }
.zl-akte-zeile .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.zl-akte-zeile .small { overflow-wrap: anywhere; }
.zl-akte-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); }
.zl-akte-ico.ok { background: var(--ok-tint); color: var(--ok); }
.zl-akte-ico.warn { background: var(--warn-tint); color: var(--warn); }
.zl-akte-ico.bad { background: var(--bad-tint); color: var(--bad); }
.zl-akte-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.zl-sperre { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; font-size: 14px; border-bottom: 1px solid var(--line); }
.zl-sperre.warn { background: var(--warn-tint); }
.zl-sperre .ico { display: inline-block; vertical-align: -2px; color: var(--warn); }
.zl-mail-kopf { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 14px; }
.zl-mail-kopf dt { color: var(--ink-3); }
.zl-mail-kopf dd { margin: 0; overflow-wrap: anywhere; }
.zl-mail-text { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); font-size: 14px; max-height: 42vh; overflow: auto; }

/* ---------- Einstellungen ---------- */
.zl-einst { display: grid; gap: 12px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.zl-einst-titel { margin: 0; font-size: 15px; font-weight: 600; }

@media (max-width: 720px) {
  .zl-knoepfe { width: 100%; justify-content: flex-start; }
  .zl-knoepfe .btn { flex: 1 1 auto; }
  .zl-stand-zeile .btn { width: 100%; }
  /* „Zuletzt gesendet“: nur ein PDF-Knopf – bleibt rechts in der Zeile */
  .list.kompakt .zl-zeile { flex-wrap: nowrap; }
  .list.kompakt .zl-knoepfe { width: auto; }
}

/* ---------- Öffentliche Seiten (Abmelden von Bewertungsanfragen) ---------- */
body.zl-seite { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); }
.zl-haupt { max-width: 560px; margin: 0 auto; padding: 48px 16px; }
.zl-karte { padding: 28px 26px; display: grid; gap: 14px; }
.zl-karte h1 { margin: 0; font: 600 24px/1.2 var(--display); }
.zl-karte p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.zl-firma { font: 500 12px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--copper-dark); }
/* Kupfer im Dunkelmodus heller (wie .pill.copper in app.css) */
:root[data-theme="dark"] .zl-stand-zeile:not(.warn) .zl-stand-ico, :root[data-theme="dark"] .zl-firma { color: var(--copper-light); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zl-stand-zeile:not(.warn) .zl-stand-ico, :root:not([data-theme="light"]) .zl-firma { color: var(--copper-light); } }
.zl-form { margin: 4px 0 0; }
.zl-form .btn { width: 100%; }
.zl-klein { font-size: 13px; color: var(--ink-3); }

/* Beleg: QR-Knopf nur mit Symbol (Kopfzeile bricht bei 1366 px sonst um) */
.zl-qr-knopf { padding-left: 11px; padding-right: 11px; }
