/* CSE-Vorlagen – Karte „Belege zur Rechnung" (shared/belege.js)
   Alle Regeln auf die Kapsel .csev-belege begrenzt (Haus-Muster shared-Baustein).
   Farben: Warnung gelb, Fehler/fehlender Beleg rot, Info grau, Erfolg grün –
   hell und dunkel über body[data-thema] wie im übrigen Add-in. */

.csev-belege .bel-hinweis { margin: 0 0 8px; color: var(--text-leise); }

.csev-belege .bel-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 8px; }
.csev-belege .bel-zeile label { flex: 0 0 auto; color: var(--text-leise); font-size: 12px; }
.csev-belege .bel-zeile input {
  flex: 1 1 110px;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--feld-rand);
  border-radius: 4px;
  background: var(--feld);
  color: var(--text);
  font: inherit;
  text-transform: uppercase;
}
.csev-belege .bel-zeile input:focus {
  outline: none;
  border-color: var(--feld-aktiv);
  box-shadow: 0 0 0 2px var(--feld-aktiv), 0 0 0 6px var(--feld-aktiv-schein);
}
.csev-belege .bel-zeile .knopf { flex: 0 0 auto; }

.csev-belege .bel-demo { margin: 0 0 8px; font-size: 12px; color: var(--text-leise); }
.csev-belege .bel-demo select { font: inherit; font-size: 12px; margin-left: 4px; max-width: 100%; }

.csev-belege .bel-karten { display: flex; flex-direction: column; gap: 6px; }
.csev-belege .bel-karte {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px;
  border: 1px solid;
  border-left-width: 5px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.35;
}
.csev-belege .bel-gelb  { background: #fff8e1; border-color: #e6d98a; border-left-color: #d9a300; color: #5f5300; }
.csev-belege .bel-rot   { background: #fde7e9; border-color: #f1b1b5; border-left-color: #c50f1f; color: #a4262c; font-weight: 600; }
.csev-belege .bel-grau  { background: var(--flaeche); border-color: var(--rand); border-left-color: #8a8886; color: var(--text-leise); }
.csev-belege .bel-gruen { background: #dff6dd; border-color: #a7d9a3; border-left-color: #107c10; color: #0b5e0b; }

body[data-thema="dunkel"] .csev-belege .bel-gelb  { background: #3a3416; border-color: #5c531f; border-left-color: #f5c518; color: #e8dc9a; }
body[data-thema="dunkel"] .csev-belege .bel-rot   { background: #442023; border-color: #6b2f33; border-left-color: #ff8389; color: #ffb3b7; }
body[data-thema="dunkel"] .csev-belege .bel-grau  { border-left-color: #7a7a7a; }
body[data-thema="dunkel"] .csev-belege .bel-gruen { background: #1f3a1f; border-color: #2f5a2f; border-left-color: #6ccb5f; color: #a8e39f; }

.csev-belege .bel-karte .bel-klein { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; opacity: .85; word-break: break-word; }

/* Belegliste: jeder Beleg der Soll-Liste mit Zustand; übersprungene (bereits versendete) grau */
.csev-belege .bel-liste { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--rand); font-size: 12px; }
.csev-belege .bel-beleg {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px;
  padding: 5px 2px; border-bottom: 1px solid var(--rand); color: var(--text);
}
.csev-belege .bel-beleg .bel-nr { font-weight: 600; flex: 0 0 auto; }
.csev-belege .bel-beleg .bel-art { flex: 1 1 140px; min-width: 0; color: var(--text-leise); }
.csev-belege .bel-beleg .bel-zustand { flex: 0 0 auto; margin-left: auto; font-weight: 600; }
.csev-belege .bel-beleg.bel-ok .bel-zustand { color: #107c10; }
.csev-belege .bel-beleg.bel-rot .bel-zustand { color: #c50f1f; }
.csev-belege .bel-beleg.bel-leise { color: var(--text-leise); }
.csev-belege .bel-beleg.bel-leise .bel-nr, .csev-belege .bel-beleg.bel-leise .bel-zustand { color: var(--text-leise); font-weight: 400; }
body[data-thema="dunkel"] .csev-belege .bel-beleg.bel-ok .bel-zustand { color: #6ccb5f; }
body[data-thema="dunkel"] .csev-belege .bel-beleg.bel-rot .bel-zustand { color: #ff8389; }

/* Haken „Auch bereits versendete Belege anhängen“ – Sitzungszustand, nicht gespeichert */
.csev-belege .bel-haken { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12px; color: var(--text); cursor: pointer; }
.csev-belege .bel-haken input { margin: 0; flex: 0 0 auto; }

.csev-belege .bel-ergebnis { margin: 8px 0 0; min-height: 1.2em; color: var(--text); font-weight: 600; }
.csev-belege .bel-ergebnis:empty { margin: 0; min-height: 0; }
.csev-belege > .knopf { margin-top: 8px; }
