@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/assets/fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("/assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }

:root { --seite: #F4F3F0; --flaeche: #FFFFFF; --text: #1a1a1a; --text-2: #52514e; --linie: #E6E5E1; --fokus: #2a78d6; --fehler: #b42318; --gut: #0b7a0b; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--seite); color: var(--text); font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, h2 { font-family: "Space Grotesk", Inter, sans-serif; margin: 0; line-height: 1.2; }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.leise { color: var(--text-2); font-size: 14px; }
.optional { color: var(--text-2); font-weight: 400; }

.schmal { max-width: 440px; margin: 0 auto; padding: 20px 16px 8px; display: flex; flex-direction: column; gap: 16px; }
.lead { color: var(--text-2); }
.hinweis { background: #FFF6E0; border: 1px solid #F0D9A0; border-radius: 12px; padding: 10px 12px; font-size: 14px; color: #5c4400; }

.knopf { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 18px; border: 0; border-radius: 12px; background: var(--knopf, var(--karte)); color: var(--knopf-text, var(--karte-text)); font: 600 16px/1.2 Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.knopf.wallet { background: #000000; color: #FFFFFF; }
.wallet-knoepfe { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; padding: 8px 0; }
.wallet-knopf { display: inline-flex; border-radius: 12px; line-height: 0; }
.wallet-knopf img { display: block; height: 52px; width: auto; }
.knopf:disabled { opacity: .5; cursor: default; }
.formular { display: flex; flex-direction: column; gap: 8px; }
.formular label { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; }
.formular input, .formular textarea { font: inherit; padding: 12px; border: 1px solid #CFCDC7; border-radius: 10px; background: #fff; color: var(--text); width: 100%; }
.formular textarea { resize: vertical; }

/* Karte wie im Wallet */
.pass { background: var(--karte); color: var(--karte-text); border-radius: 16px; padding: 14px 0 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 28px rgba(0,0,0,.14), inset 0 0 0 1px rgba(0,0,0,.08); overflow: hidden; }
.pass.klein { padding-bottom: 0; gap: 10px; }
.pass-kopf { display: flex; align-items: center; gap: 10px; padding: 0 14px; }
.emblem { width: 30px; height: 30px; flex: 0 0 30px; }
.pass-name { font-weight: 600; font-size: 16px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pass-feld { display: flex; flex-direction: column; min-width: 0; }
.pass-feld.rechts { align-items: flex-end; text-align: right; }
.pass-feld b { font-size: 17px; font-weight: 600; }
.label { font-size: 11px; letter-spacing: .06em; color: var(--label); font-weight: 600; }
.streifen { display: block; width: 100%; height: auto; }
.pass { position: relative; }
.streifen-logo { position: absolute; transform: translate(-50%, -50%); width: auto; height: auto; pointer-events: none; }
.streifen-logo[hidden] { display: none; }
.marke-jetzt { margin: 6px 0 2px; }
.marke-jetzt img { display: block; width: 40px; height: 40px; object-fit: contain; border-radius: 9px; background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.pass-felder { display: flex; justify-content: space-between; gap: 12px; padding: 0 14px; }
.qr { align-self: center; background: #fff; color: #111; border-radius: 10px; padding: 10px 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; letter-spacing: .08em; }
.qr svg { width: 128px; height: 128px; display: block; }
.rueckseite { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.rueckseite h2 { font-size: 15px; margin-top: 6px; }
.rueckseite h2:first-child { margin-top: 0; }

/* Mitteilung wie auf dem Sperrbildschirm */
.mitteilung { position: fixed; left: 12px; right: 12px; top: 12px; max-width: 420px; margin: 0 auto; z-index: 10; display: flex; gap: 10px; align-items: flex-start; background: rgba(255,255,255,.97); border-radius: 16px; padding: 10px 12px; box-shadow: 0 8px 28px rgba(0,0,0,.22); }
.mitteilung[hidden] { display: none; }
.m-icon .emblem { width: 34px; height: 34px; }
.m-titel { font-weight: 700; font-size: 14px; }
.mitteilung p { font-size: 14px; }

.fuss { max-width: 440px; margin: 0 auto; padding: 16px 20px 32px; color: var(--text-2); font-size: 13px; text-align: center; display: flex; flex-direction: column; gap: 6px; }

/* Stempel-Seite */
.laden-kopf { max-width: 1040px; margin: 0 auto; padding: 24px 20px 8px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--text-2); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--flaeche); border: 1px solid var(--linie); }
.chip.gut { border-color: #9fd59f; background: #eef8ee; color: #135c13; }
.chip.warn { border-color: #F0D9A0; background: #FFF6E0; color: #5c4400; }
.breit { max-width: 1040px; margin: 0 auto; padding: 8px 20px 40px; display: flex; flex-direction: column; gap: 16px; }
.block { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.block-kopf { display: flex; justify-content: space-between; align-items: baseline; }
.spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.tabelle-rahmen { overflow-x: auto; }
table.karten { width: 100%; border-collapse: collapse; font-size: 15px; }
.karten th { text-align: left; font-size: 13px; color: var(--text-2); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--linie); }
.karten td { padding: 10px 8px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.karten tr:last-child td { border-bottom: 0; }
.code { font-weight: 600; letter-spacing: .06em; }
.balken { width: 120px; height: 8px; border-radius: 4px; background: #EDECE8; overflow: hidden; margin-top: 4px; }
.balken i { display: block; height: 100%; background: var(--knopf, var(--karte)); border-radius: 4px; }
.aktionen { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.mini { min-height: 36px; padding: 6px 12px; border-radius: 10px; font-size: 14px; border: 1px solid #CFCDC7; background: #fff; color: var(--text); font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.mini.haupt { background: var(--knopf, var(--karte)); color: var(--knopf-text, var(--karte-text)); border-color: transparent; }
.mini:disabled { opacity: .45; cursor: default; }
.start-qr svg { width: 180px; height: 180px; display: block; }
.link-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; word-break: break-all; }
.protokoll { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; max-height: 320px; overflow-y: auto; }
.protokoll li { display: flex; gap: 10px; }
.protokoll time { color: var(--text-2); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.protokoll .fehler { color: var(--fehler); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1a1a1a; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: 90vw; }
.toast[hidden] { display: none; }
.toast.fehler { background: var(--fehler); }

/* Scannen an der Theke */
.scan-leiste { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.scan-knopf { gap: 10px; min-height: 52px; padding: 12px 20px; font-size: 17px; flex: 0 0 auto; }
.suche { flex: 1 1 220px; display: flex; }
.suche input { font: inherit; width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid #CFCDC7; border-radius: 12px; background: #fff; color: var(--text); }
.karten tr.treffer td { background: #FFF8DF; }
body.scannen { overflow: hidden; }
.scanner { position: fixed; inset: 0; z-index: 50; background: #000; color: #fff; display: flex; flex-direction: column; }
.scanner[hidden] { display: none; }
.scanner-kopf { display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
.scanner-kopf h2 { font-size: 17px; }
.scanner-x { width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(255,255,255,.14); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.scanner-bild { position: relative; flex: 1 1 auto; min-height: 200px; overflow: hidden; }
.scanner-bild video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #111; }
.scanner-rahmen { position: absolute; left: 50%; top: 50%; width: min(68vw, 52vh, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 22px; border: 3px solid rgba(255,255,255,.92); box-shadow: 0 0 0 9999px rgba(0,0,0,.42); }
.scanner.gefunden .scanner-rahmen { border-color: #7fe07f; }
.scanner-status { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); background: rgba(0,0,0,.66); color: #fff; padding: 8px 14px; border-radius: 14px; font-size: 15px; text-align: center; }
.scanner-status.fehler { background: #b42318; }
.sk { background: var(--flaeche); color: var(--text); border-radius: 18px 18px 0 0; padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 560px; margin: 0 auto; }
.sk[hidden] { display: none; }
.sk-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sk-code { font-size: 20px; }
.sk-stand { font: 700 30px/1 "Space Grotesk", Inter, sans-serif; font-variant-numeric: tabular-nums; }
.sk-balken { width: 100%; height: 10px; margin-top: 0; }
.sk-ok { color: var(--gut); font-weight: 600; min-height: 1.5em; }
.sk-ok.fehler { color: var(--fehler); }
.sk-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sk-knoepfe .knopf { min-height: 58px; font-size: 17px; }
.sk-praemie { background: #fff; color: var(--text); border: 2px solid #CFCDC7; }
.sk-praemie.bereit { background: var(--knopf, var(--karte)); color: var(--knopf-text, var(--karte-text)); border-color: transparent; }
.sk-unten { display: flex; justify-content: space-between; gap: 10px; }
.scanner-code { display: flex; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #111; width: 100%; }
.scanner-code[hidden] { display: none; }
.scanner-code input { flex: 1 1 auto; min-width: 0; font: 16px Inter, system-ui, sans-serif; padding: 10px 12px; border-radius: 10px; border: 1px solid #444; background: #222; color: #fff; letter-spacing: .06em; }
.scanner-code input::placeholder { color: #9a9a9a; letter-spacing: 0; }
.sk-ok.warn { color: #b54708; }

/* Barcode-Scanner am Computer oder Tablet: ohne Kamerabild, die Seite bleibt abgedunkelt sichtbar */
.scanner.geraet { background: rgba(16,16,16,.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.scanner.geraet video, .scanner.geraet .scanner-rahmen { display: none; }
.scanner.geraet .scanner-code { max-width: 560px; margin: 0 auto; border-radius: 14px 14px 0 0; }
.scan-tipp { flex: 1 1 100%; margin: 0; font-size: 14px; }

/* Schmale Bildschirme: Liste ohne die Spalten „Im Wallet“ und „Zuletzt“ */
@media (max-width: 640px) {
  .karten th:nth-child(3), .karten td:nth-child(3), .karten th:nth-child(4), .karten td:nth-child(4) { display: none; }
  .karten td { padding: 10px 6px; }
  .balken { width: 84px; }
  .aktionen { justify-content: flex-start; }
  .scan-knopf { flex: 1 1 100%; }
  .scan-tipp { display: none; }
}

/* Logo in der Kopfzeile der Karte (höchstens 160 x 50 wie im Wallet) */
.pass-logo { max-height: 36px; max-width: 46%; width: auto; height: auto; flex: 0 1 auto; object-fit: contain; display: block; }
.pass-logo[hidden] { display: none; }
.kopf-rechts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* Anmelden */
body.anmelden main { padding-top: 48px; }
.anmelde-karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.fehlertext { color: var(--fehler); font-weight: 600; font-size: 14px; }
.gut { color: var(--gut); }

/* Admin */
body.admin { --karte: #1C1C1E; --karte-text: #FFFFFF; --knopf: #1C1C1E; --knopf-text: #FFFFFF; }
.admin-kopf { background: #1C1C1E; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; flex-wrap: wrap; }
.admin-marke { font: 700 18px/1 "Space Grotesk", Inter, sans-serif; text-decoration: none; color: #fff; }
.admin-marke span { color: #C9A227; }
.admin-kopf nav { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-kopf nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 10px; }
.admin-kopf nav a[aria-current="page"], .admin-kopf nav a:hover { background: rgba(255,255,255,.14); }
.admin-inhalt { max-width: 1100px; margin: 0 auto; padding: 20px 20px 48px; display: flex; flex-direction: column; gap: 18px; }
.seiten-kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.admin code { background: #EDECE8; padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.leer-zustand { align-items: flex-start; }

.kachel-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.laden-kachel { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.kachel-link { text-decoration: none; display: block; border-radius: 16px; }
.kachel-text { display: flex; flex-direction: column; gap: 6px; }
.kachel-text h2 { font-size: 18px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kachel-text h2 a { text-decoration: none; }
.mini-pass { gap: 10px; padding: 12px 0 12px; }
.mini-pass .pass-feld b { font-size: 15px; }
.zahlen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.zahl { display: flex; flex-direction: column; gap: 2px; }
.zahl b { font: 700 20px/1.1 "Space Grotesk", Inter, sans-serif; font-variant-numeric: tabular-nums; }
.zahl span { font-size: 12px; color: var(--text-2); }
.zahlen.gross { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 16px; }
.zahlen.gross .zahl b { font-size: 28px; }

.formular-raster, .laden-raster { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.laden-links { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vorschau-sticky, .laden-vorschau { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; }
.admin-form { display: flex; flex-direction: column; gap: 16px; }
.admin-form fieldset { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 14px; padding: 14px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.admin-form legend { font: 700 16px/1.2 "Space Grotesk", Inter, sans-serif; padding: 0 6px; margin-left: -6px; }
.feld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.feld > label, .label-text { font-weight: 600; font-size: 14px; }
.feld input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]), .feld textarea { font: inherit; padding: 11px 12px; border: 1px solid #CFCDC7; border-radius: 10px; background: #fff; color: var(--text); width: 100%; min-width: 0; }
.feld textarea { resize: vertical; }
.feld input[aria-invalid="true"], .feld textarea[aria-invalid="true"] { border-color: var(--fehler); box-shadow: 0 0 0 1px var(--fehler); }
.feld-fehler { color: var(--fehler); font-size: 13px; font-weight: 600; }
.feld-fehler[hidden] { display: none; }
.feld[hidden] { display: none; }
.hilfe { font-size: 13px; color: var(--text-2); }
.fest { font-weight: 600; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mit-praefix { display: flex; align-items: stretch; border: 1px solid #CFCDC7; border-radius: 10px; overflow: hidden; background: #fff; }
.mit-praefix span { padding: 11px 4px 11px 12px; color: var(--text-2); white-space: nowrap; background: #F7F6F3; }
.feld .mit-praefix input { border: 0 !important; border-radius: 0 !important; padding-left: 4px !important; }
.mit-knopf { display: flex; gap: 8px; align-items: center; }
.mit-knopf input { flex: 1 1 auto; min-width: 0; font: inherit; padding: 9px 12px; border: 1px solid #CFCDC7; border-radius: 10px; background: #fff; }
.farbe { display: flex; gap: 8px; align-items: center; }
.farbe input[type="color"] { width: 46px; height: 44px; padding: 2px; border: 1px solid #CFCDC7; border-radius: 10px; background: #fff; cursor: pointer; flex: 0 0 auto; }
.check { display: flex; gap: 8px; align-items: baseline; font-size: 14px; font-weight: 600; flex-wrap: wrap; }
.check input { width: 18px; height: 18px; flex: 0 0 auto; }
.check .leise { font-weight: 400; }
.form-aktionen { display: flex; gap: 12px; align-items: center; }
.fehler-box { background: #FEF3F2; border: 1px solid #F5C2BD; color: var(--fehler); border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.fehler-box[hidden] { display: none; }
.slug-status { font-size: 13px; min-height: 1.2em; }
.formular-schmal { max-width: 680px; display: flex; flex-direction: column; gap: 16px; }
.formular-schmal .form-aktionen { flex-wrap: wrap; }

.link-block .qr-bild { width: 160px; height: 160px; display: block; background: #fff; border-radius: 8px; }
.knopf-reihe { display: flex; gap: 8px; flex-wrap: wrap; }
.einstellungen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.einstellungen li { display: flex; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 9px 0; border-bottom: 1px solid var(--linie); font-size: 15px; flex-wrap: wrap; }
.einstellungen li:last-child { border-bottom: 0; }
.einstellungen span { color: var(--text-2); }
.gefahr { border-color: #F5C2BD; }
.mini.gefaehrlich { border-color: #F5C2BD; color: var(--fehler); }

@media (max-width: 880px) {
  .formular-raster, .laden-raster { grid-template-columns: minmax(0, 1fr); }
  .vorschau-spalte { order: -1; }
  .vorschau-sticky { position: static; }
  .laden-vorschau { position: static; order: -1; }
}
@media (max-width: 520px) {
  .zwei { grid-template-columns: 1fr; }
  .zahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Druckvorlagen: Aufsteller (A5) und Team-Zettel (A6) */
body.druck { background: #E9E8E4; }
.druck-leiste { display: flex; gap: 10px; justify-content: center; padding: 14px; }
.aufsteller, .team-zettel { background: #fff; margin: 0 auto 24px; box-shadow: 0 6px 24px rgba(0,0,0,.12); display: flex; flex-direction: column; align-items: center; text-align: center; color: #1a1a1a; }
.aufsteller { width: 148mm; min-height: 210mm; padding: 14mm 12mm 10mm; gap: 6mm; border-top: 10mm solid var(--stempel); }
.aufsteller.a4 { width: 210mm; min-height: 297mm; padding: 22mm 18mm 14mm; gap: 9mm; border-top-width: 14mm; }
.aufsteller.a4 h1 { font-size: 34pt; }
.aufsteller.a4 .aufsteller-name { font-size: 28pt; }
.aufsteller.a4 .aufsteller-lead { font-size: 18pt; max-width: 165mm; }
.aufsteller.a4 .aufsteller-qr { width: 100mm; height: 100mm; padding: 5mm; border-width: 1.6mm; }
.aufsteller.a4 .aufsteller-schritte { font-size: 16pt; gap: 2.5mm; }
.aufsteller.a4 .druck-logo { max-width: 120mm; max-height: 36mm; }
.aufsteller.a4 .aufsteller-fuss { font-size: 12pt; }
.team-zettel { width: 105mm; min-height: 148mm; padding: 9mm 8mm 7mm; gap: 4mm; }
.aufsteller-kopf { display: flex; flex-direction: column; align-items: center; gap: 3mm; }
.druck-logo { max-width: 90mm; max-height: 26mm; width: auto; height: auto; }
.druck-emblem .emblem { width: 18mm; height: 18mm; }
.aufsteller-name { font: 700 20pt/1.1 "Space Grotesk", Inter, sans-serif; }
.aufsteller h1 { font-size: 22pt; line-height: 1.15; }
.team-zettel h1 { font-size: 18pt; }
.aufsteller-lead { font-size: 13pt; color: #333; max-width: 115mm; }
.aufsteller-qr { width: 70mm; height: 70mm; padding: 4mm; border: 1.2mm solid var(--stempel); border-radius: 5mm; background: #fff; }
.aufsteller-qr.klein { width: 52mm; height: 52mm; border-color: #1a1a1a; }
.aufsteller-qr svg { width: 100%; height: 100%; display: block; }
.aufsteller-schritte { text-align: left; margin: 0; padding-left: 6mm; font-size: 12pt; display: flex; flex-direction: column; gap: 1.5mm; }
.team-zettel .aufsteller-schritte { font-size: 10pt; }
.aufsteller-fuss { margin-top: auto; font-size: 10pt; color: #555; word-break: break-all; }
@media print {
  body.druck { background: #fff; }
  .druck-leiste { display: none; }
  .aufsteller, .team-zettel { box-shadow: none; margin: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Handy-Mockup für Briefe */
.mockup-raster { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
.mockup-vorschau { position: sticky; top: 16px; border-radius: 16px; border: 1px solid var(--linie); padding: 16px; background-color: #fff; background-image: linear-gradient(45deg, #EEEDEA 25%, transparent 25%), linear-gradient(-45deg, #EEEDEA 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #EEEDEA 75%), linear-gradient(-45deg, transparent 75%, #EEEDEA 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.mockup-vorschau canvas { display: block; width: 100%; height: auto; max-height: calc(100vh - 66px); object-fit: contain; }
.wahl { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.admin-form select { font: inherit; padding: 10px 12px; border: 1px solid #CFCDC7; border-radius: 10px; background: #fff; color: var(--text); width: 100%; }
.mockup-vorlagen .mini[aria-pressed="true"] { background: #1C1C1E; color: #fff; border-color: #1C1C1E; }
@media (max-width: 880px) {
  .mockup-raster { grid-template-columns: minmax(0, 1fr); }
  .mockup-vorschau { position: static; order: -1; }
}

/* Geburtstag beim Karte-Holen und auf der Kartenseite */
.geburtstag-feld { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.geburtstag-feld legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 8px; }
.geburtstag-wahl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; }
.geburtstag-wahl select { font: inherit; padding: 11px 10px; border: 1px solid #CFCDC7; border-radius: 10px; background: #fff; color: var(--text); width: 100%; min-width: 0; }
.geburtstag-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.geburtstag-form .geburtstag-wahl { width: 100%; }
.geschenk-box { background: #FFF6E0; border: 1px solid #F0D9A0; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; color: #3d2e00; }
.geschenk-box h2 { font-size: 17px; }

/* Stempel-Seite: Zahlen des Monats, Geburtstagsgeschenk */
.monat-zahlen { font-size: 15px; color: var(--text-2); }
.monat-zahlen[hidden] { display: none; }
.monat-zahlen b { color: var(--text); }
.chip.geschenk-chip { display: inline-block; margin-top: 4px; font-size: 12px; border-color: #F0D9A0; background: #FFF6E0; color: #5c4400; }
.sk-geschenk { background: #FFF6E0; border: 1px solid #F0D9A0; color: #5c4400; border-radius: 10px; padding: 8px 10px; font-weight: 600; }
.sk-geschenk[hidden], .sk-geschenk-knopf[hidden] { display: none; }
.sk-geschenk-knopf { width: 100%; }
.unterfelder { display: flex; flex-direction: column; gap: 12px; padding-left: 26px; }
.unterfelder[hidden] { display: none; }

/* Besuchsbericht */
.monat-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.monat-name { font: 700 18px/1.2 "Space Grotesk", Inter, sans-serif; min-width: 150px; text-align: center; }
.mini.aus { opacity: .4; cursor: default; }
.bericht-zahlen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bk { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bk-label { font-size: 14px; color: var(--text-2); }
.bk-wert { font: 600 30px/1.1 Inter, system-ui, sans-serif; }
.bk.held .bk-wert { font-size: 48px; }
.bk-zusatz { font-size: 13px; color: var(--text-2); }
.bericht-zahlen.klein .bk-wert { font-size: 24px; }
.diagramm { width: 100%; height: auto; display: block; --serie: var(--knopf, #1C1C1E); }
.diagramm .gitter { stroke: #E6E5E1; stroke-width: 1; shape-rendering: crispEdges; }
.diagramm .achse { font: 11px Inter, system-ui, sans-serif; fill: #52514e; font-variant-numeric: tabular-nums; }
.diagramm .wert { font: 600 12px Inter, system-ui, sans-serif; fill: #1a1a1a; }
.diagramm .saeule { fill: var(--serie); }
.diagramm .saeule.laufend { opacity: .42; }
.diagramm .saeule-ziel { outline: none; cursor: default; }
.diagramm .saeule-ziel:hover .saeule, .diagramm .saeule-ziel:focus .saeule, .diagramm .saeule-ziel.aktiv .saeule { opacity: .72; }
.diagramm .saeule-ziel:focus-visible rect { stroke: var(--fokus); stroke-width: 2; }
.tabelle-ansicht summary { cursor: pointer; font-size: 14px; color: var(--text-2); }
.tabelle-ansicht table { margin-top: 8px; }
.treu { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; }
.treu li { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linie); font-size: 15px; }
.treu li:last-child { border-bottom: 0; }
@media (max-width: 760px) {
  .bericht-zahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk.held .bk-wert { font-size: 40px; }
}
@media print {
  body.bericht { background: #fff; }
  .kein-druck, .monat-nav .mini, .tabelle-ansicht { display: none; }
  .bericht .block, .bk { break-inside: avoid; }
}
.nur-schmal { display: none; }
@media (max-width: 600px) {
  .nur-breit { display: none; }
  .nur-schmal { display: block; }
}
@media (max-width: 600px) {
  .monat-nav .mini.aus { display: none; }
}
.geburtstag-feld legend { display: flex; justify-content: space-between; width: 100%; }

/* Dashboards (Inhaber und Admin) */
.gruppen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gruppen li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 12px; min-width: 0; }
.gruppen b { font: 600 26px/1.1 Inter, system-ui, sans-serif; }
.gruppen li > span:not(.leise) { font-weight: 600; }
.gruppen .leise { font-size: 13px; }
.personen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.personen li { display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linie); font-size: 15px; }
.personen li:last-child { border-bottom: 0; }
.personen .code { grid-row: span 2; align-self: center; }
.personen .leise { grid-column: 2; font-size: 13px; }
.aktivitaet { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.aktivitaet li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--linie); font-size: 14px; }
.aktivitaet li:last-child { border-bottom: 0; }
.hinweis-gut { background: #eef8ee; border: 1px solid #9fd59f; color: #135c13; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.hinweis-gelb { background: #FFF6E0; border: 1px solid #F0D9A0; color: #5c4400; border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.todo-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.todo-liste li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.todo-zeichen { flex: 0 0 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; background: #E6E5E1; color: #1a1a1a; }
.todo-liste li.warn .todo-zeichen { background: #F0D9A0; color: #5c4400; }
.tabelle-scroll { overflow-x: auto; margin: 0 -4px; }
table.daten-tabelle { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 760px; }
.daten-tabelle th { text-align: left; font-size: 13px; color: var(--text-2); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.daten-tabelle td { padding: 10px 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.daten-tabelle tr:last-child td { border-bottom: 0; }
.daten-tabelle .leise { font-size: 13px; }
.zahl-spalte { text-align: right; font-variant-numeric: tabular-nums; }
.daten-tabelle th.zahl-spalte { text-align: right; }
.hinweis-spalte .chip { display: inline-block; margin: 0 4px 4px 0; font-size: 12px; }
.daten-tabelle .laden-spalte { min-width: 10rem; }
.daten-tabelle .hinweis-spalte { min-width: 14rem; }
.daten-tabelle .laden-spalte .leise, .daten-tabelle .zeit-spalte { white-space: nowrap; }
.chip.abo { white-space: nowrap; }
.chip.abo-aktiv { border-color: #9fd59f; background: #eef8ee; color: #135c13; }
.chip.abo-test { border-color: #b9cff0; background: #eef4fc; color: #1d4f91; }
.chip.abo-pausiert, .chip.abo-gekuendigt { border-color: #E6E5E1; background: #F4F3F0; color: #52514e; }
.chip.abo-intern { color: #52514e; }
@media (max-width: 760px) {
  .gruppen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aktivitaet li { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* ---------- Inhaber-Dashboard (ab 0.12)
   Kopf in der Kartenfarbe des Ladens, darunter ruhige weiße Flächen.
   Datenfarbe ist --knopf (immer mindestens 3:1 auf hellem Grund). */
.inhaber-dash { --id-text-2: color-mix(in srgb, var(--karte-text) 80%, var(--karte)); --id-linie: color-mix(in srgb, var(--karte-text) 22%, var(--karte)); }
.id-band { background: var(--karte); color: var(--karte-text); border-bottom: 1px solid rgba(0, 0, 0, .08); }
.id-band-innen { max-width: 1120px; margin: 0 auto; padding: 18px 20px 24px; display: flex; flex-direction: column; gap: 22px; }
.id-kopfzeile { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.id-marke { display: flex; align-items: center; gap: 12px; min-width: 0; }
.id-logo { height: 40px; width: auto; max-width: 140px; object-fit: contain; display: block; }
.id-marke .emblem { width: 38px; height: 38px; flex: 0 0 38px; }
.id-name { font: 700 20px/1.2 "Space Grotesk", Inter, sans-serif; color: var(--karte-text); }
.id-unter { font-size: 13px; color: var(--id-text-2); }
.id-aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.id-aktionen .mini { background: color-mix(in srgb, var(--karte-text) 12%, var(--karte)); color: var(--karte-text); border-color: color-mix(in srgb, var(--karte-text) 30%, var(--karte)); }
.id-aktionen .mini:hover { background: color-mix(in srgb, var(--karte-text) 20%, var(--karte)); }
.id-aktionen .chip { background: color-mix(in srgb, var(--karte-text) 12%, var(--karte)); color: var(--karte-text); border-color: transparent; }
.id-band :focus-visible { outline-color: var(--karte-text); }
.id-zahlen { display: grid; gap: 18px; }
.id-held { display: flex; flex-direction: column; gap: 4px; }
.id-label, .id-feld dt { font-size: 14px; color: var(--id-text-2); }
.id-heldwert { display: flex; align-items: baseline; gap: 10px; }
.id-heldwert b { font: 600 64px/1 Inter, system-ui, sans-serif; letter-spacing: -0.035em; }
.id-heldwert span { font-size: 20px; font-weight: 600; }
.id-vgl { margin-top: 6px; }
.id-klein { font-size: 13px; color: var(--id-text-2); }
.id-delta { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; line-height: 1.2; padding: 3px 9px 3px 7px; border-radius: 999px; background: color-mix(in srgb, var(--karte-text) 13%, var(--karte)); }
.pfeil { width: 9px; height: 9px; fill: currentColor; flex: 0 0 9px; }
.id-felder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto; column-gap: 12px; row-gap: 4px; margin: 0; padding-top: 16px; border-top: 1px solid var(--id-linie); }
.id-feld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
@supports (grid-template-rows: subgrid) {
  .id-feld { display: grid; grid-row: span 3; grid-template-rows: subgrid; gap: 0; row-gap: 4px; align-items: end; }
  .id-feld dt { align-self: end; }
  .id-feldbasis { align-self: start; }
}
.id-feld dd { margin: 0; }
.id-feldwert { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.id-feldwert b { font: 600 28px/1.1 Inter, system-ui, sans-serif; letter-spacing: -0.02em; }
.id-feldbasis { font-size: 12px; color: var(--id-text-2); }
.id-vgl { font-size: 14px; line-height: 1.7; }
.id-vgl .id-delta { vertical-align: 1px; margin-right: 4px; }
.id-vgl-text { font-weight: 600; }
.id-feld .id-delta { font-size: 12px; padding: 2px 7px 2px 6px; }

.id-raster { max-width: 1120px; margin: 0 auto; padding: 20px 20px 40px; display: flex; flex-direction: column; gap: 16px; }
.id-spalte { display: contents; }
.id-woche { order: 1; } .id-kunden { order: 2; } .id-los { order: 3; } .id-wert { order: 4; } .id-zuletzt { order: 5; } .id-fuss { order: 6; }
.id-panel { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.id-panel-kopf { display: flex; flex-direction: column; gap: 4px; }
.id-sub { font-size: 14px; color: var(--text-2); }
.id-sub b { color: var(--text); font-weight: 600; }
.id-leer { font-size: 13px; color: var(--text-2); }
.id-woche .diagramm, .id-los .diagramm { --serie: var(--knopf, #1C1C1E); }

/* Wärmekarte: Wochentag × Uhrzeit, eine Farbe von hell nach dunkel */
.hm { display: grid; grid-template-columns: 2.2em repeat(7, minmax(0, 1fr)); gap: 3px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.hm-tag { text-align: center; padding-bottom: 2px; }
.hm-std { text-align: right; padding-right: 6px; line-height: 20px; }
.hm-z { display: block; height: 20px; border-radius: 4px; background: #EEEDE9; position: relative; }
.hm-z::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--knopf, #1C1C1E); opacity: 0; }
.hm-z.s1::before { opacity: .2; } .hm-z.s2::before { opacity: .38; } .hm-z.s3::before { opacity: .56; } .hm-z.s4::before { opacity: .76; } .hm-z.s5::before { opacity: 1; }
.hm .hm-z:hover, .hm .hm-z.aktiv { box-shadow: 0 0 0 2px var(--flaeche), 0 0 0 4px var(--text); z-index: 1; }
.hm-legende { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; font-size: 12px; color: var(--text-2); }
.hm-legende span { margin: 0 4px; }
.hm-legende .hm-z { width: 18px; height: 12px; }
.hm-legende .hm-abstand { width: 10px; margin: 0; }
.hm-tabelle th, .hm-tabelle td { text-align: right; padding: 4px 6px; font-variant-numeric: tabular-nums; }
.hm-tabelle th[scope="row"] { text-align: left; font-weight: 400; white-space: nowrap; }

/* Kundengruppen zum Aufklappen */
.id-gruppe { border-top: 1px solid var(--linie); }
.id-gruppe > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; column-gap: 12px; row-gap: 2px; align-items: center; padding: 12px 2px; border-radius: 8px; }
.id-gruppe > summary::-webkit-details-marker { display: none; }
.id-gruppe > summary::after { content: ""; grid-column: 3; grid-row: 1 / span 2; justify-self: center; width: 7px; height: 7px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: translateY(-2px) rotate(45deg); transition: transform .15s ease; }
.id-gruppe[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.id-gname { font-weight: 600; font-size: 16px; }
.id-anzahl { grid-column: 2; grid-row: 1 / span 2; font: 600 15px/1 Inter, system-ui, sans-serif; background: var(--seite); border-radius: 999px; padding: 6px 11px; min-width: 2.4em; text-align: center; }
.id-gtext { grid-column: 1; font-size: 13px; color: var(--text-2); }
.id-ginhalt { padding: 0 2px 14px; display: flex; flex-direction: column; gap: 10px; }
.id-personen { list-style: none; margin: 0; padding: 0; }
.id-personen li { padding: 9px 0; border-top: 1px solid #F0EFEB; display: flex; flex-direction: column; gap: 3px; }
.id-personen li:first-child { border-top: 0; padding-top: 2px; }
.id-p-kopf { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.id-p-name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.id-p-code { font-size: 12px; color: var(--text-2); letter-spacing: .06em; }
.id-p-info { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; }
.id-mini { display: inline-flex; gap: 3px; }
.id-mini i { width: 8px; height: 8px; border-radius: 50%; background: #D9D7D2; }
.id-mini i.v { background: var(--knopf, #1C1C1E); }
.id-geschenk { background: #FFF6E0; border: 1px solid #F0D9A0; color: #5c4400; border-radius: 10px; padding: 8px 10px; font-size: 14px; }

/* Das hat Ihre Karte gebracht */
.id-bon { list-style: none; margin: 0; padding: 0; }
.id-bon li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid #F0EFEB; font-size: 15px; }
.id-bon li b { font-variant-numeric: tabular-nums; font-weight: 600; }
.id-bon li.unter { padding-left: 16px; font-size: 14px; color: var(--text-2); }
.id-bon li.unter b { color: var(--text); }
.id-meter { display: flex; flex-direction: column; gap: 8px; }
.id-meter-kopf { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.id-meter-kopf b { font-variant-numeric: tabular-nums; }
.id-meter-bahn { position: relative; height: 10px; border-radius: 999px; overflow: hidden; }
.id-meter-bahn::before { content: ""; position: absolute; inset: 0; background: var(--knopf, #1C1C1E); opacity: .16; }
.id-meter-bahn span { position: absolute; inset: 0 auto 0 0; background: var(--knopf, #1C1C1E); border-radius: 999px; }

/* Zuletzt */
.id-feed { list-style: none; margin: 0; padding: 0; }
.id-feed li { display: grid; grid-template-columns: 7.2em minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid #F0EFEB; font-size: 14px; }
.id-feed b { font-weight: 600; }
.id-feed li:first-child { border-top: 0; padding-top: 0; }
.id-zeit { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.id-fuss { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); padding: 4px 2px 0; }

/* Tooltip für Säulen und die Wärmekarte */
.tipp { position: fixed; z-index: 60; pointer-events: none; background: #1a1a1a; color: #fff; font: 600 13px/1.35 Inter, system-ui, sans-serif; padding: 6px 9px; border-radius: 8px; max-width: 240px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); transform: translate(-50%, calc(-100% - 10px)); }
.tipp[hidden] { display: none; }

@media (min-width: 720px) {
  .id-heldwert b { font-size: 76px; }
  .id-feldbasis { font-size: 13px; }
  .id-feld .id-delta { font-size: 13px; }
  .id-panel { padding: 22px 22px 18px; }
}
@media (min-width: 960px) {
  .id-band-innen { padding: 22px 20px 30px; }
  .id-zahlen { grid-template-columns: minmax(0, 1.35fr) minmax(0, 3fr); align-items: end; gap: 32px; }
  .id-felder { padding: 0 0 0 32px; border-top: 0; border-left: 1px solid var(--id-linie); gap: 24px; }
  .id-raster { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; gap: 20px; padding-top: 24px; }
  .id-spalte { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
  .id-fuss { grid-column: 1 / -1; }
}
@media print {
  .id-band { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .id-gruppe:not([open]) .id-ginhalt { display: none; }
  .tipp { display: none; }
}

/* ---------- Kundenbereich (ab 0.13): Menü im Kopf und Unterseiten */
.kb-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 0; -webkit-overflow-scrolling: touch; }
.kb-nav::-webkit-scrollbar { display: none; }
.kb-nav a { flex: 0 0 auto; color: var(--id-text-2); text-decoration: none; font-weight: 600; font-size: 15px; padding: 9px 13px; border-radius: 999px; white-space: nowrap; }
.kb-nav a:hover { color: var(--karte-text); background: color-mix(in srgb, var(--karte-text) 8%, var(--karte)); }
.kb-nav a[aria-current="page"] { color: var(--karte-text); background: color-mix(in srgb, var(--karte-text) 16%, var(--karte)); }
.kb-seite .id-band-innen { gap: 16px; padding-bottom: 14px; }
.id-panel-kopf.mit-link { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 12px; }
.springen-kb { position: absolute; left: -9999px; top: 8px; z-index: 20; background: var(--text); color: #fff; padding: 10px 14px; border-radius: 8px; }
.springen-kb:focus { left: 12px; }

.kb-inhalt { max-width: 1120px; margin: 0 auto; padding: 22px 20px 48px; display: flex; flex-direction: column; gap: 16px; }
.kb-titel { display: flex; flex-direction: column; gap: 4px; padding: 0 2px; }
.kb-titel h1 { font-size: 26px; }
.kb-raster { display: grid; gap: 16px; align-items: start; }
.kb-spalte { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 960px) { .kb-spalte { gap: 20px; } }
@media (min-width: 960px) { .kb-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
.kb-leise { color: var(--text-2); font-size: 13px; }
.kb-zurueck { font-size: 14px; }
.kb-zurueck a { color: var(--text-2); }
.kb-schmal { max-width: 720px; }
.kb-form { display: flex; flex-direction: column; gap: 14px; }
.kb-form textarea { font: inherit; }

/* Kundenliste */
.kb-suche { display: flex; gap: 8px; flex-wrap: wrap; }
.kb-suche input[type="search"] { flex: 1 1 220px; min-width: 0; font: inherit; padding: 10px 12px; border: 1px solid #CFCDC7; border-radius: 10px; background: #fff; }
.kb-suche select { font: inherit; padding: 9px 10px; border: 1px solid #CFCDC7; border-radius: 10px; background: #fff; }
.kb-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.kb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--linie); background: var(--flaeche); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; min-height: 36px; }
.kb-chip b { font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.kb-chip[aria-current="true"] { background: var(--knopf, #1C1C1E); color: var(--knopf-text, #fff); border-color: transparent; }
.kb-chip[aria-current="true"] b { color: inherit; opacity: .85; }
.kb-chip.klein { font-size: 12px; padding: 3px 9px; min-height: 0; background: var(--seite); border-color: transparent; }
.kb-liste-kopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.kb-tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.kb-tabelle th { text-align: left; font-size: 13px; font-weight: 600; color: var(--text-2); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.kb-tabelle td { padding: 10px 10px 10px 0; border-bottom: 1px solid #F0EFEB; vertical-align: middle; }
.kb-tabelle tr:last-child td { border-bottom: 0; }
.kb-kunde { font-weight: 600; color: var(--text); }
.kb-tabelle .id-p-code { display: block; margin-top: 2px; }
.kb-stempel { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kb-blaettern { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 14px; }
@media (max-width: 760px) {
  .kb-tabelle thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .kb-tabelle, .kb-tabelle tbody, .kb-tabelle tr, .kb-tabelle td { display: block; }
  .kb-tabelle tr { padding: 10px 0; border-bottom: 1px solid #F0EFEB; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .kb-tabelle td { border: 0; padding: 0; font-size: 13px; color: var(--text-2); }
  .kb-tabelle td:first-child { grid-column: 1; font-size: 15px; color: var(--text); }
  .kb-tabelle td:nth-child(2) { grid-column: 2; grid-row: 1; align-self: center; }
  .kb-tabelle td:nth-child(n+3) { grid-column: 1 / -1; }
  .kb-tabelle td:nth-child(n+3)::before { content: attr(data-label) ": "; }
  .kb-tabelle td:nth-child(5), .kb-tabelle td:nth-child(6) { display: none; }
}

/* Ein Kunde */
.kb-karte-gross { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--seite); }
.id-mini.gross { gap: 6px; flex-wrap: wrap; }
.id-mini.gross i { width: 22px; height: 22px; }
.kb-karte-gross p { font-size: 14px; color: var(--text-2); }
.kb-fakten { margin: 0; display: flex; flex-direction: column; }
.kb-fakten > div { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 4px 12px; padding: 9px 0; border-bottom: 1px solid #F0EFEB; font-size: 15px; }
.kb-fakten > div:last-child { border-bottom: 0; }
.kb-fakten dt { color: var(--text-2); font-size: 14px; }
.kb-fakten dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .kb-fakten > div { grid-template-columns: minmax(0, 1fr); } }

/* Nachrichten */
.kb-gruppenwahl { display: flex; flex-direction: column; gap: 0 !important; padding: 6px 12px 8px !important; }
.kb-wahl { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid #F0EFEB; cursor: pointer; }
.kb-wahl:first-of-type { border-top: 0; }
.kb-wahl input { width: 18px; height: 18px; margin: 0; }
.kb-wahl > span:nth-child(2) { display: flex; flex-direction: column; gap: 1px; }
.kb-anzahl { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.kb-zaehler { font-size: 12px; color: var(--text-2); text-align: right; margin-top: -2px; }
.kb-vorschau { background: linear-gradient(160deg, #6b6f7c, #3c3f48); border-radius: 18px; padding: 16px; }
.kb-vorschau-kopf, .kb-vorschau p { background: rgba(255, 255, 255, .88); }
.kb-vorschau-kopf { display: flex; align-items: center; gap: 8px; padding: 10px 12px 2px; border-radius: 14px 14px 0 0; font-size: 13px; }
.kb-vorschau-kopf img, .kb-vorschau-emblem { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; display: block; }
.kb-vorschau-kopf span { margin-left: auto; color: var(--text-2); font-size: 12px; }
.kb-vorschau p { padding: 2px 12px 12px; border-radius: 0 0 14px 14px; font-size: 14px; margin: 0; overflow-wrap: anywhere; }
.kb-bestaetigen { background: #FFF6E0; border: 1px solid #F0D9A0; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; font-weight: 600; }
.kb-bestaetigen[hidden] { display: none; }

/* Aktionen */
.kb-jetzt { flex-direction: row; align-items: center; padding: 14px 18px; }
.kb-jetzt.an { border-color: transparent; background: var(--knopf, #1C1C1E); color: var(--knopf-text, #fff); }
.kb-tipp { font-size: 14px; background: var(--seite); border-radius: 10px; padding: 10px 12px; }
.kb-aktionen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.kb-aktion { display: flex; justify-content: space-between; align-items: center; gap: 10px 14px; padding: 12px 0; border-top: 1px solid #F0EFEB; flex-wrap: wrap; }
.kb-aktion:first-child { border-top: 0; }
.kb-aktion-name { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kb-aktion-knoepfe { display: flex; gap: 6px; }
.kb-status { display: inline-flex; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--seite); color: var(--text-2); }
.kb-status.laeuft, .kb-status.aktiv { background: #E6F4E6; color: #135c13; }
.kb-status.geplant, .kb-status.test { background: #EAF1FB; color: #1e4f91; }
.kb-status.offen { background: #FFF6E0; color: #5c4400; }
.kb-status.gekuendigt, .kb-status.vorbei { background: #F1F0EC; color: #52514e; }
.kb-tage { display: flex; gap: 6px; flex-wrap: wrap; }
.kb-tag { position: relative; }
.kb-tag input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.kb-tag span { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 40px; border-radius: 10px; border: 1px solid #CFCDC7; background: #fff; font-weight: 600; }
.kb-tag input:checked + span { background: var(--knopf, #1C1C1E); color: var(--knopf-text, #fff); border-color: transparent; }
.kb-tag input:focus-visible + span { outline: 3px solid var(--fokus); outline-offset: 2px; }

/* Rechnungen & Vertrag */
.kb-dokumente { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.kb-dokumente li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #F0EFEB; flex-wrap: wrap; }
.kb-dokumente li:first-child { border-top: 0; }
.kb-dokumente li > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 260px; }
.kb-dokument { max-width: 820px; font-size: 15px; line-height: 1.6; gap: 10px; }
.kb-dokument h2 { font-size: 17px; margin-top: 12px; }
.kb-dokument ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.kb-dokument-leiste { display: flex; justify-content: flex-end; }
.vertrag-parteien { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); background: var(--seite); border-radius: 12px; padding: 14px 16px; }
.platzhalter { background: #FFF6E0; color: #5c4400; padding: 0 4px; border-radius: 4px; }
.kb-abschluss { max-width: 820px; }

/* Material */
.kb-material { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.kb-material-karte h2 { font-size: 17px; }
.kb-material-karte p:last-child { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.kb-social { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 0.6fr); align-items: start; }
.kb-social figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.kb-social canvas { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--linie); display: block; }
.kb-social figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
@media (max-width: 600px) { .kb-social { grid-template-columns: minmax(0, 1fr); } }

/* Hilfe */
.kb-hilfe .frage { border-bottom: 1px solid #F0EFEB; }
.kb-hilfe .frage summary { cursor: pointer; padding: 12px 28px 12px 0; font-weight: 600; list-style: none; position: relative; }
.kb-hilfe .frage summary::-webkit-details-marker { display: none; }
.kb-hilfe .frage summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--text-2); }
.kb-hilfe .frage[open] summary::after { content: "–"; }
.kb-hilfe .frage p { padding: 0 0 14px; color: var(--text-2); font-size: 15px; }

@media print {
  .kb-seite .id-band, .kb-nav, .kein-druck, .toast { display: none !important; }
  .kb-seite { background: #fff; }
  .kb-inhalt { padding: 0; max-width: none; }
  .kb-dokument { border: 0; padding: 0; max-width: none; }
}

/* Anfragen von der Webseite (Admin) */
.admin-kopf nav .zaehler { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #E3B04B; color: #1C1C1E; font-size: 12px; font-weight: 700; vertical-align: 1px; }
.anfrage-zeile { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 0; border-top: 1px solid var(--linie); }
.anfrage-zeile:first-of-type { border-top: 0; }
.anfrage-karte { display: block; text-decoration: none; color: inherit; }
.anfrage-karte .mini-pass { pointer-events: none; }
.anfrage-text h3 { margin: 0 0 4px; font-size: 17px; }
.anfrage-text h3 a { color: inherit; }
.anfrage-text p { margin: 0 0 4px; font-size: 14px; }
.anfrage-knoepfe { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.anfrage-nachricht { white-space: pre-wrap; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
@media (max-width: 760px) {
  .anfrage-zeile { grid-template-columns: minmax(0, 1fr); }
  .anfrage-karte { max-width: 280px; }
  .anfrage-knoepfe { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Abrechnung nach aktiven Kunden (0.15) */
.kb-erklaerung { border-top: 1px solid var(--linie); padding-top: 6px; font-size: 14px; }
.kb-erklaerung summary { cursor: pointer; font-weight: 600; min-height: 36px; display: flex; align-items: center; }
.kb-erklaerung p { margin: 6px 0 10px; color: var(--text-2); }
.kb-preise { max-width: 340px; }
.kb-preise th:last-child, .kb-preise td:last-child { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; }
.kb-abo { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; background: var(--seite); border-radius: 12px; padding: 14px; }
.kb-abo p { margin: 0; font-size: 14px; }
.fehler-text { color: var(--fehler); }
#abo-nutzung { margin-top: -4px; }
.zahl-spalte .leise { white-space: nowrap; }
