/* Helles Layout: dunkle Seitenleiste, heller Inhalt, weiße Karten, blaue Akzente */
:root {
  --bg: #f3f5f8;
  --karte: #ffffff;
  --text: #24303f;
  --leise: #7a8696;
  --linie: #e4e8ee;
  --eingabe: #d5dbe3;
  --akzent: #2b7de9;
  --akzent-dunkel: #1f66c7;
  --akzent-hell: #e8f1fd;
  --gruen: #5cb83c;
  --gruen-hell: #e9f6e3;
  --warn: #b26b00;
  --warn-hell: #fff4e0;
  --fehler: #d64545;
  --fehler-hell: #fdeaea;
  --leiste: #1f2632;
  --leiste-text: #c9d1dc;
  --leiste-aktiv: #2a3341;
  --radius: 6px;
  --schatten: 0 1px 2px rgba(31, 38, 50, .04), 0 4px 16px rgba(31, 38, 50, .05);
  --leistenbreite: 248px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
a { color: var(--akzent); }
a:hover { color: var(--akzent-dunkel); }
.icon { flex: none; }

/* --- Seitenleiste ------------------------------------------------------ */
.seitenleiste {
  position: fixed; inset: 0 auto 0 0; width: var(--leistenbreite);
  background: var(--leiste); color: var(--leiste-text);
  display: flex; flex-direction: column; z-index: 30;
}
.seitenkopf { padding: 26px 20px 18px; }
.app-name { display: block; color: #fff; text-decoration: none; font-size: 24px; font-weight: 600; letter-spacing: .01em; margin-bottom: 14px; }
.app-name:hover { color: #fff; }
.app-name img { display: block; height: 42px; width: auto; }
.firmenwahl { position: relative; }
.firmenwahl summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
  padding: 9px 12px; border-radius: var(--radius); background: rgba(255,255,255,.06); color: #fff; font-size: 14px;
}
.firmenwahl summary span:not(.pfeil) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.firmenwahl summary .pfeil { opacity: .6; }
.firmenwahl summary::-webkit-details-marker { display: none; }
.firmenwahl summary:hover, .firmenwahl[open] summary { background: rgba(255,255,255,.12); }
.firmenliste {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: var(--karte); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 6px;
}
.firmenliste form { margin: 0; }
.firmenliste button, .firmenliste a {
  display: block; width: 100%; text-align: left; border: none; background: none; cursor: pointer;
  padding: 8px 10px; border-radius: 4px; font: inherit; font-size: 14px; text-decoration: none; color: var(--text);
}
.firmenliste button:hover, .firmenliste a:hover { background: var(--bg); }
.firmenliste button.aktiv { font-weight: 650; }
.firmenliste a { color: var(--akzent); border-top: 1px solid var(--linie); margin-top: 4px; border-radius: 0 0 4px 4px; }

.hauptnav { display: flex; flex-direction: column; margin-top: 6px; }
.hauptnav a, .seitenfuss a, .seitenfuss button {
  display: flex; align-items: center; gap: 16px; padding: 16px 26px;
  color: var(--leiste-text); text-decoration: none; font-weight: 600; font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,.05); border-left: 3px solid transparent;
}
.hauptnav a:hover, .seitenfuss a:hover, .seitenfuss button:hover { background: var(--leiste-aktiv); color: #fff; }
.hauptnav a.aktiv { background: var(--leiste-aktiv); color: #fff; border-left-color: var(--akzent); }
.seitenfuss { margin-top: auto; padding-bottom: 12px; }
.seitenfuss .benutzer { padding: 0 29px 8px; font-size: 12px; color: #7f8a99; text-transform: uppercase; letter-spacing: .06em; }
.seitenfuss form { margin: 0; }
.seitenfuss button { width: 100%; background: none; border: none; border-left: 3px solid transparent; cursor: pointer; font: inherit; font-weight: 600; text-align: left; }

body.mit-seitenleiste main { margin-left: var(--leistenbreite); }
main { max-width: 1240px; padding: 32px 40px 72px; }
body.mit-seitenleiste main { max-width: none; }
body.mit-seitenleiste main > * { max-width: 1180px; margin-left: auto; margin-right: auto; }

@media (max-width: 900px) {
  .seitenleiste { position: sticky; top: 0; width: auto; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .seitenkopf { padding: 10px 14px; display: flex; align-items: center; gap: 12px; flex: 1; }
  .app-name { font-size: 18px; margin: 0; }
  .app-name img { height: 26px; }
  .firmenwahl { flex: 1; max-width: 260px; }
  .hauptnav { flex-direction: row; overflow-x: auto; margin: 0; order: 3; flex-basis: 100%; }
  .hauptnav a { padding: 10px 14px; gap: 8px; border: none; border-bottom: 3px solid transparent; white-space: nowrap; font-size: 14px; }
  .hauptnav a.aktiv { border-left: none; border-bottom-color: var(--akzent); }
  .hauptnav .icon { width: 18px; height: 18px; }
  .seitenfuss { margin: 0; padding: 0 8px 0 0; display: flex; }
  .seitenfuss .benutzer, .seitenfuss a span, .seitenfuss button span { display: none; }
  .seitenfuss a, .seitenfuss button { padding: 10px; border: none; }
  body.mit-seitenleiste main { margin-left: 0; }
  main { padding: 20px 16px 56px; }
}

/* --- Inhalt ------------------------------------------------------------ */
h1 { font-size: 26px; font-weight: 600; margin: 0 0 4px; }
h2 { font-size: 19px; font-weight: 600; margin: 0 0 14px; }
.unterzeile { color: var(--leise); margin: 0 0 22px; }
.kopfzeile { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.kopfzeile .aktionen { display: flex; gap: 10px; flex-wrap: wrap; }

.karte { background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); padding: 24px 28px; margin-bottom: 24px; }
.raster { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.raster > .karte { margin-bottom: 0; }
.raster { margin-bottom: 24px; }
.raster-2 { display: grid; gap: 24px; grid-template-columns: 2fr 1fr; }
@media (max-width: 1100px) { .raster-2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .karte { padding: 18px; } }

.schnellstart { display: flex; align-items: center; gap: 16px 20px; flex-wrap: wrap; }
.schnellstart h2 { margin: 0 auto 0 0; }

.kennzahl { text-align: center; }
.kennzahl .wert { font-size: 34px; font-weight: 300; color: var(--akzent); font-variant-numeric: tabular-nums; line-height: 1.2; margin-bottom: 4px; }
.kennzahl .wert.rot { color: var(--fehler); }
.kennzahl .wert.gruen { color: var(--gruen); }
.kennzahl .label { color: var(--text); font-size: 14px; }
.kennzahl .klein { color: var(--leise); font-size: 12px; margin-top: 6px; }
.balken { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; margin: 10px auto 0; max-width: 220px; }
.balken span { display: block; height: 100%; background: var(--akzent); }
.balken.warn span { background: var(--warn); }

table.liste { width: 100%; border-collapse: collapse; }
table.liste th { text-align: left; font-weight: 600; font-size: 12px; color: var(--leise); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--linie); padding: 10px; }
table.liste td { padding: 13px 10px; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.liste tbody tr:hover td { background: #fafbfd; }
table.liste tr:last-child td { border-bottom: none; }
table.liste .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.liste tfoot td { font-weight: 650; border-top: 2px solid var(--linie); }
table.liste a { text-decoration: none; font-weight: 600; }
.tabelle-scroll { overflow-x: auto; }

.status { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #eef1f5; color: var(--leise); white-space: nowrap; }
.status.offen, .status.versendet { background: var(--akzent-hell); color: var(--akzent-dunkel); }
.status.bezahlt, .status.angenommen, .status.erledigt { background: var(--gruen-hell); color: #3e8c22; }
.status.storniert, .status.abgelehnt, .status.ueberfaellig { background: var(--fehler-hell); color: var(--fehler); }

.knopf, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 14px; font-weight: 600; padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--eingabe); background: var(--karte); color: var(--text); cursor: pointer; text-decoration: none;
}
.knopf:hover, button:hover { border-color: var(--akzent); color: var(--akzent); }
.knopf.haupt, button.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; padding: 10px 26px; }
.knopf.haupt:hover, button.haupt:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); color: #fff; }
.knopf.gruen, button.gruen { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.knopf.gruen:hover, button.gruen:hover { background: #4ea532; color: #fff; }
.knopf.gefahr, button.gefahr { color: var(--fehler); }
.knopf.gefahr:hover, button.gefahr:hover { border-color: var(--fehler); }
.knopf.klein, button.klein { font-size: 13px; padding: 4px 12px; }
.knopf .icon, button .icon { width: 18px; height: 18px; }
button:disabled { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }

.meldungen { list-style: none; padding: 0; margin: 0 0 22px; }
.meldungen li { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 8px; background: var(--gruen-hell); color: #2f6d1b; border-left: 4px solid var(--gruen); }
.meldungen li.error { background: var(--fehler-hell); color: var(--fehler); border-left-color: var(--fehler); }
.meldungen li.warning { background: var(--warn-hell); color: var(--warn); border-left-color: var(--warn); }
.hinweisbox { padding: 12px 16px; border-radius: var(--radius); background: var(--warn-hell); color: var(--warn); border-left: 4px solid var(--warn); margin-bottom: 22px; }
.hinweisbox ul { margin: 6px 0 0; padding-left: 20px; }

.formular { display: grid; gap: 16px 22px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.formular .breit { grid-column: 1 / -1; }
.feld label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.feld .hilfe { font-size: 12px; color: var(--leise); margin-top: 4px; }
.feld .hilfe ul { margin: 4px 0 0; padding-left: 18px; }
.feld .fehler { font-size: 12px; color: var(--fehler); margin-top: 4px; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=password], input[type=search], input[type=file], select, textarea {
  width: 100%; font: inherit; padding: 9px 12px; border: 1px solid var(--eingabe); border-radius: 4px; background: #fff; color: var(--text);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-hell); }
fieldset { border: none; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: 19px; margin-bottom: 14px; }

/* --- Beleg-Editor im Briefbogen-Look ----------------------------------- */
.editor { max-width: 900px !important; }
.werkzeugleiste {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  background: rgba(243, 245, 248, .94); backdrop-filter: blur(6px); padding: 12px 0; margin: -12px 0 18px; border-bottom: 1px solid var(--linie);
}
.werkzeugleiste strong { font-size: 19px; font-weight: 600; display: block; line-height: 1.2; }
.werkzeugleiste .unterzeile { font-size: 13px; color: var(--leise); }
.werkzeugleiste .aktionen { display: flex; gap: 8px; flex-wrap: wrap; }

.blatt {
  background: #fff; color: #333; box-shadow: 0 1px 3px rgba(31,38,50,.08), 0 10px 40px rgba(31,38,50,.10);
  padding: 44px 56px 30px; min-height: 1100px; display: flex; flex-direction: column; font-size: 14px; border-radius: 2px;
}
.blatt input, .blatt select, .blatt textarea {
  font: inherit; color: inherit; background: transparent; border: 1px solid transparent; border-bottom: 1px dashed #c9d1dc;
  border-radius: 3px; padding: 3px 6px; width: 100%; box-shadow: none; outline: none; transition: border-color .15s, background .15s;
}
.blatt input:hover, .blatt select:hover, .blatt textarea:hover { background: #f7f9fc; border-bottom-color: var(--akzent); }
.blatt input:focus, .blatt select:focus, .blatt textarea:focus { background: #fff; border: 1px solid var(--akzent); box-shadow: 0 0 0 3px var(--akzent-hell); }
.blatt input::placeholder, .blatt textarea::placeholder { color: #aab3bf; }
.blatt textarea { resize: none; overflow: hidden; line-height: 1.45; display: block; }
.blatt input[type=number] { -moz-appearance: textfield; text-align: right; }
.blatt input[type=number]::-webkit-inner-spin-button, .blatt input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.blatt-kopf { text-align: center; min-height: 70px; margin-bottom: 26px; }
.blatt-kopf img { max-height: 90px; max-width: 260px; }
.blatt-name { font-size: 24px; font-weight: 600; color: #444; padding-top: 18px; }
.blatt-adresszeile { display: flex; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.blatt-anschrift { flex: 1 1 300px; max-width: 360px; }
.ruecksende { font-size: 10.5px; color: #777; border-bottom: 1px solid #ddd; padding-bottom: 3px; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kundenwahl select { font-weight: 600; padding-left: 4px; cursor: pointer; }
.kundenwahl select.leer { color: var(--akzent); border: 1px dashed var(--akzent); background: var(--akzent-hell); }
.anschrift-vorschau { padding: 4px 6px 0; line-height: 1.5; min-height: 20px; }
.anschrift-vorschau div:first-child { display: none; }
.neu-link { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; padding: 6px 4px; color: var(--akzent); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; border-radius: 4px; }
.neu-link:hover { background: var(--akzent-hell); color: var(--akzent-dunkel); }
.neu-link .icon { width: 16px; height: 16px; }
.blatt-info { border-collapse: collapse; font-size: 13px; align-self: flex-start; }
.blatt-info th { text-align: left; font-weight: 400; color: #666; padding: 2px 14px 2px 0; white-space: nowrap; }
.blatt-info td { text-align: right; padding: 1px 0; width: 150px; }
.blatt-info input { text-align: right; padding: 2px 4px; }
.blatt-info .vorschau { color: #888; font-style: italic; padding-right: 6px; }
.blatt-info #kunden-nummer { padding-right: 6px; }
.blatt-info tr.zeitraum.zu { display: none; }
.link-knopf { background: none; border: none; padding: 2px 6px; color: var(--akzent); font-size: 12px; cursor: pointer; }
.link-knopf:hover { text-decoration: underline; background: none; }

.blatt-titel { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.blatt-titel h1 { font-size: 24px; font-weight: 600; margin: 0; color: #333; flex: none; }
.blatt-titel input { font-size: 15px; color: #555; }
#id_einleitung { margin-bottom: 16px; }

.blatt-positionen { width: calc(100% + 56px); border-collapse: collapse; margin-left: -28px; table-layout: fixed; }
.blatt-positionen th { font-size: 12px; font-weight: 600; color: #555; text-align: left; padding: 8px 6px; border-bottom: 1.5px solid #444; }
.blatt-positionen th.num { text-align: right; }
.blatt-positionen th.griff-spalte, .blatt-positionen td.griff { width: 28px; }
.blatt-positionen th.aktionen-spalte, .blatt-positionen td.pos-aktionen { width: 76px; }
.blatt-positionen td { padding: 8px 3px; vertical-align: top; border-bottom: 1px solid #e6e6e6; }
.blatt-positionen td.menge, .blatt-positionen th:nth-child(3) { width: 74px; }
.blatt-positionen td.einheit, .blatt-positionen th:nth-child(4) { width: 92px; }
.blatt-positionen td.preis, .blatt-positionen th:nth-child(5) { width: 96px; }
.blatt-positionen td.rabatt, .blatt-positionen th:nth-child(6) { width: 76px; }
.blatt-positionen td.betrag, .blatt-positionen th:nth-child(7) { width: 100px; }
.blatt-positionen td.text input { font-weight: 600; }
.blatt-positionen td.text textarea { font-size: 13px; color: #666; margin-top: 2px; }
.blatt-positionen td.betrag { text-align: right; padding: 12px 6px 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.blatt-positionen td.griff { cursor: grab; color: #c2c9d2; padding-top: 11px; text-align: center; user-select: none; letter-spacing: -2px; opacity: 0; transition: opacity .15s; }
.blatt-positionen tr:hover td.griff { opacity: 1; }
.blatt-positionen td.einheit input { cursor: pointer; padding-right: 18px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237a8696' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 6px center; }
.mit-einheit { display: flex; align-items: center; gap: 2px; }
.mit-einheit span { color: #999; font-size: 12px; }
.blatt-positionen td.pos-aktionen { white-space: nowrap; text-align: right; padding-top: 7px; }
button.rund { width: 30px; height: 30px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--eingabe); color: var(--leise); margin-left: 3px; }
button.rund:hover { color: var(--akzent); border-color: var(--akzent); background: var(--akzent-hell); }
button.rund.pos-entfernen:hover { color: var(--fehler); border-color: var(--fehler); background: var(--fehler-hell); }
.blatt-positionen tr.zieht { opacity: .4; }
.blatt-positionen tr.neu td { animation: aufblitzen .9s ease-out; }
@keyframes aufblitzen { from { background: var(--akzent-hell); } to { background: transparent; } }
.blatt-positionen .fehler { color: var(--fehler); font-size: 12px; padding: 2px 6px; }
.als-artikel { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--leise); padding: 4px 6px 0; cursor: pointer; user-select: none; }
.als-artikel[hidden] { display: none; }
.blatt .als-artikel input { width: auto; margin: 0; accent-color: var(--akzent); }
#pos-neu { margin: 6px 0 0 -4px; align-self: flex-start; }

.blatt-summe { margin: 8px 0 18px auto; border-collapse: collapse; min-width: 260px; }
.blatt-summe th { text-align: left; padding: 8px 6px; font-size: 15px; border-top: 1.5px solid #444; }
.blatt-summe td { text-align: right; padding: 8px 6px; font-size: 15px; font-weight: 700; border-top: 1.5px solid #444; font-variant-numeric: tabular-nums; }
.blatt-hinweis { font-size: 13px; color: #555; margin: 0 0 8px 6px; }
#id_schlusstext { margin-bottom: 24px; }
.blatt-fuss { margin-top: auto; padding-top: 16px; border-top: 1px solid #ddd; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; font-size: 10.5px; color: #777; line-height: 1.5; }
.blatt-fuss strong { color: #555; }
.notiz-karte { margin-top: 22px; }

.auswahlliste {
  position: absolute; z-index: 100; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--eingabe);
  border-radius: var(--radius); box-shadow: 0 8px 28px rgba(31,38,50,.16); max-height: 280px; overflow-y: auto; font-size: 14px;
}
.auswahlliste li { padding: 7px 10px; border-radius: 4px; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; white-space: nowrap; }
.auswahlliste li span { color: var(--leise); font-size: 12px; }
.auswahlliste li:hover, .auswahlliste li.markiert { background: var(--akzent-hell); color: var(--akzent-dunkel); }
.auswahlliste li.gewaehlt { font-weight: 600; }

@media (max-width: 900px) {
  .blatt { padding: 26px 18px 20px; min-height: 0; }
  .blatt-positionen { width: 100%; margin-left: 0; table-layout: auto; }
  .blatt-fuss { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  .blatt-adresszeile { flex-direction: column; gap: 14px; }
  .blatt-anschrift { max-width: none; flex: none; }
  .blatt-info { width: 100%; }
  .blatt-titel { flex-direction: column; gap: 4px; }
  .blatt-positionen thead { display: none; }
  .blatt-positionen tbody tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 8px; padding: 12px 0; border-bottom: 1px solid #e6e6e6; }
  .blatt-positionen tbody tr[hidden] { display: none; }
  .blatt-positionen td { border: none; padding: 0; width: auto !important; }
  .blatt-positionen td.text { grid-column: 1 / -1; }
  .blatt-positionen td.griff { display: none; }
  .blatt-positionen td.betrag { padding-top: 6px; text-align: left; font-weight: 600; }
  .blatt-positionen td.pos-aktionen { grid-column: 2 / -1; }
  .blatt-summe { min-width: 0; width: 100%; }
}

.suchleiste { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.suchleiste input, .suchleiste select { width: auto; min-width: 200px; }
.leer { color: var(--leise); padding: 12px 0; margin: 0; }
.daten { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.daten dt { color: var(--leise); }
.daten dd { margin: 0; }
.adresse { white-space: pre-line; }

.seitenfuss button { justify-content: flex-start; }

/* --- Anmeldeseite ------------------------------------------------------ */
body.anmeldeseite { background: #fff; }
body.anmeldeseite main { max-width: none; padding: 0; margin: 0; }
.anmeldung { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, 1fr); min-height: 100vh; min-height: 100dvh; }
.anm-buehne {
  position: relative; overflow: hidden; color: #dfe6f0; padding: 44px 56px; display: flex; flex-direction: column; gap: 34px;
  background:
    radial-gradient(900px 500px at 110% -10%, rgba(43,125,233,.45), transparent 60%),
    radial-gradient(700px 500px at -20% 110%, rgba(92,184,60,.18), transparent 60%),
    linear-gradient(160deg, #1f2632 0%, #18202b 100%);
}
.anm-buehne::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.anm-buehne > * { position: relative; }
.anm-marke img { display: block; height: 68px; width: auto; }
.anm-marke { display: flex; align-items: center; gap: 12px; color: #fff; font-size: 22px; font-weight: 600; letter-spacing: .01em; }
.anm-logo { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; background: var(--akzent); color: #fff; box-shadow: 0 6px 18px rgba(43,125,233,.45); }
.anm-spruch { margin: 0; max-width: 520px; }
.anm-spruch p { margin: 0; color: #fff; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
.anm-spruch p::before { content: "„"; color: var(--akzent); margin-right: 2px; }
.anm-spruch p::after { content: "“"; color: var(--akzent); margin-left: 2px; }
.anm-spruch footer { margin-top: 14px; font-size: 13px; color: #8f9bab; text-transform: uppercase; letter-spacing: .12em; }

.anm-bild { position: relative; flex: 1; min-height: 300px; max-width: 520px; }
.anm-blatt { position: absolute; width: 270px; background: #fff; border-radius: 8px; padding: 22px 22px 26px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.anm-blatt.hinten { left: 4%; top: 30px; transform: rotate(-8deg); opacity: .55; }
.anm-blatt.vorne { left: 32%; top: 0; transform: rotate(4deg); animation: schweben 7s ease-in-out infinite; }
@keyframes schweben { 0%, 100% { transform: rotate(4deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .anm-blatt.vorne { animation: none; } }
.anm-blatt .z { display: block; height: 7px; border-radius: 4px; background: #e7ebf1; margin: 8px 0; flex: 1; }
.anm-blatt .z.kurz { max-width: 45%; } .anm-blatt .z.mittel { max-width: 65%; } .anm-blatt .z.kopf { max-width: 35%; margin-left: auto; margin-right: auto; height: 10px; }
.anm-blatt-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.anm-blatt-kopf .punkt { width: 22px; height: 22px; border-radius: 6px; background: var(--akzent); flex: none; }
.anm-titel { color: #24303f; font-weight: 700; font-size: 17px; margin: 10px 0 10px; }
.anm-zeile { display: flex; align-items: center; gap: 14px; font-size: 12px; color: #5b6878; border-bottom: 1px solid #eef1f5; padding: 3px 0; }
.anm-zeile b { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.anm-summe { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 2px solid #24303f; color: #24303f; font-size: 13px; }
.anm-summe b { font-variant-numeric: tabular-nums; }
.anm-qr {
  width: 46px; height: 46px; margin-top: 16px; border-radius: 3px;
  background:
    linear-gradient(90deg, #24303f 33%, transparent 33% 66%, #24303f 66%) 0 0 / 15px 15px,
    linear-gradient(#24303f 33%, transparent 33% 66%, #24303f 66%) 0 0 / 15px 15px;
  opacity: .85;
}
.anm-stempel {
  position: absolute; right: 18px; bottom: 26px; transform: rotate(-14deg); color: var(--gruen); border: 3px solid var(--gruen);
  border-radius: 8px; padding: 2px 12px; font-weight: 800; font-size: 20px; text-transform: uppercase; letter-spacing: .08em; opacity: .9;
}
.anm-punkte { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.anm-punkte li { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #c9d1dc; }
.anm-punkte li::before { content: "✓"; color: var(--gruen); margin-right: 6px; font-weight: 700; }

.anm-formular { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 32px; background: #fff; }
.anm-karte { width: 100%; max-width: 380px; }
.anm-karte .anm-marke.klein { display: none; font-size: 19px; color: var(--text); margin-bottom: 28px; }
.anm-karte .anm-marke.klein .anm-logo { width: 34px; height: 34px; border-radius: 9px; }
.anm-karte h1 { font-size: 30px; font-weight: 700; margin: 0 0 6px; color: var(--text); letter-spacing: -.01em; }
.anm-karte .unterzeile { margin: 0 0 28px; color: var(--leise); }
.anm-felder { display: flex; flex-direction: column; gap: 18px; }
.anm-feld > span:first-child { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.anm-eingabe { position: relative; display: flex; align-items: center; }
.anm-eingabe > svg { position: absolute; left: 14px; color: var(--leise); pointer-events: none; }
.anm-eingabe input { width: 100%; padding: 13px 44px 13px 42px; font-size: 15px; border-radius: 10px; border: 1px solid var(--eingabe); background: #f8fafc; transition: border-color .15s, box-shadow .15s, background .15s; }
.anm-eingabe input:focus { outline: none; background: #fff; border-color: var(--akzent); box-shadow: 0 0 0 4px var(--akzent-hell); }
.anm-auge { position: absolute; right: 6px; width: 34px; height: 34px; padding: 0; border: none; background: none; color: var(--leise); display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.anm-auge:hover, .anm-auge[aria-pressed=true] { color: var(--akzent); background: var(--akzent-hell); }
.anm-knopf { width: 100%; margin-top: 8px; padding: 13px 20px !important; font-size: 15px; border-radius: 10px; display: flex; justify-content: center; gap: 8px; box-shadow: 0 8px 20px rgba(43,125,233,.25); }
.anm-knopf span { transition: transform .15s; }
.anm-knopf:hover span { transform: translateX(3px); }
.anm-fuss { margin: 34px 0 0; font-size: 12px; color: var(--leise); text-align: center; }
.anm-karte .feld input { border-radius: 10px; padding: 11px 12px; }

@media (max-width: 980px) {
  .anmeldung { grid-template-columns: 1fr; }
  .anm-buehne { padding: 28px 24px 30px; gap: 18px; }
  .anm-bild, .anm-punkte { display: none; }
  .anm-spruch p { font-size: 22px; }
  .anm-marke img { height: 40px; }
  .anm-formular { padding: 32px 20px 40px; justify-content: flex-start; }
}

@media (max-width: 600px) {
  .raster { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kennzahl .wert { font-size: 22px; }
  .kennzahl .label { font-size: 13px; }
  .schnellstart .knopf { flex: 1 1 100%; }
}

/* Auswahllisten (Checkboxen) */
.auswahl > div:not(.hilfe):not(.fehler) { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.auswahl > div:not(.hilfe):not(.fehler) > div label { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; margin: 0; padding: 9px 14px; border: 1px solid var(--eingabe); border-radius: 999px; cursor: pointer; background: #fff; }
.auswahl > div:not(.hilfe):not(.fehler) > div label:has(input:checked) { border-color: var(--akzent); background: var(--akzent-hell); color: var(--akzent-dunkel); }
.schalter { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 20px; }
.schalter .feld label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--akzent); }

.reiter { display: flex; gap: 4px; border-bottom: 1px solid var(--linie); margin: -6px 0 24px; }
.reiter a { padding: 10px 18px; text-decoration: none; color: var(--leise); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.reiter a:hover { color: var(--text); }
.reiter a.aktiv { color: var(--akzent); border-bottom-color: var(--akzent); }
code { background: #eef1f5; padding: 1px 6px; border-radius: 4px; font-size: 12px; }
