:root {
  --ink: #1d1d1b; --ink2: #5f5e5a; --ink3: #8a8983;
  --bg: #f6f5f2; --card: #ffffff; --line: #e3e1db; --line2: #cfccc4;
  --accent: #1d1d1b; --accent-ink: #fff;
  --blau: #2f6fb0; --blau-bg: #e7f0f9; --gruen: #2e7d4f; --gruen-bg: #e5f4ea;
  --gelb: #8a6200; --gelb-bg: #fbf0d6; --rot: #b3372f; --rot-bg: #fbe9e7; --grau-bg: #efeee9;
  --r: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45; }
a { color: inherit; }
h1 { font-size: 24px; margin: 4px 0 16px; font-weight: 650; }
h2 { font-size: 17px; margin: 24px 0 10px; font-weight: 650; }
h3 { font-size: 15px; margin: 16px 0 8px; }
.kopf { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  background: var(--card); border-bottom: 1px solid var(--line); padding: 6px 20px; }
.marke img { height: 44px; display: block; }
.nav { display: flex; gap: 4px; align-items: center; flex: 1; flex-wrap: wrap; }
.nav > a { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--ink2); font-weight: 550; }
.nav > a:hover { background: var(--bg); color: var(--ink); }
.nav > a.aktiv { background: var(--ink); color: #fff; }
.nav-user { margin-left: auto; color: var(--ink3); font-size: 13px; }
.menue-knopf { display: none; margin-left: auto; font-size: 22px; background: none; border: 0; padding: 6px 10px; }
.inhalt { max-width: 1180px; margin: 0 auto; padding: 20px 20px 80px; }
.karte { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 16px; }
.karte.schmal { max-width: 460px; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.raster .breit2 { grid-column: span 2; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kennzahl { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.kennzahl .wert { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.kennzahl .text { color: var(--ink2); font-size: 13px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink2); font-weight: 550; }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line2);
  border-radius: 8px; padding: 9px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9fb8d6; border-color: #7f9fc4; }
textarea { min-height: 70px; resize: vertical; }
input[type=checkbox] { width: auto; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; }
.knopf { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--line2); background: #fff; color: var(--ink); }
.knopf:hover { border-color: var(--ink3); }
.knopf.primaer { background: var(--ink); color: #fff; border-color: var(--ink); }
.knopf.gefahr { color: var(--rot); border-color: #e3b5b1; }
.knopf.klein { padding: 5px 9px; font-size: 13px; }
.knopf.breit { width: 100%; justify-content: center; }
.knopfleiste { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.kopfzeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.kopfzeile h1 { margin: 0; }
.filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filter input, .filter select { width: auto; min-width: 180px; }
table.liste { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
table.liste th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink3);
  background: #fbfaf8; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.liste td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.liste tr:last-child td { border-bottom: 0; }
table.liste tr.klick { cursor: pointer; }
table.liste tr.klick:hover td { background: #fbfaf8; }
table.liste tr.gruppe td { background: #f3f2ee; font-weight: 650; }
.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.leise { color: var(--ink3); font-size: 13px; }
.status { display: inline-block; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.status.grau { background: var(--grau-bg); color: var(--ink2); }
.status.blau { background: var(--blau-bg); color: var(--blau); }
.status.gruen { background: var(--gruen-bg); color: var(--gruen); }
.status.gelb { background: var(--gelb-bg); color: var(--gelb); }
.status.rot { background: var(--rot-bg); color: var(--rot); }
.meldung { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; background: var(--blau-bg); color: var(--blau); }
.meldung.ok { background: var(--gruen-bg); color: var(--gruen); }
.meldung.fehler { background: var(--rot-bg); color: var(--rot); }
.meldung.warnung { background: var(--gelb-bg); color: var(--gelb); }
.hinweis { color: var(--ink2); }
.login { max-width: 380px; margin: 6vh auto; text-align: center; }
.login-logo { width: 220px; margin-bottom: 12px; }
.login form { text-align: left; display: grid; gap: 12px; }
/* Positionseditor */
.pos-tabelle { width: 100%; border-collapse: collapse; }
.pos-tabelle th { font-size: 12px; color: var(--ink3); text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.pos-tabelle td { padding: 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pos-tabelle input { padding: 7px 8px; }
.pos-tabelle .w-menge { width: 80px; } .pos-tabelle .w-preis { width: 100px; } .pos-tabelle .w-rabatt { width: 70px; }
.pos-tabelle .w-abschnitt { width: 170px; } .pos-tabelle .w-nr { width: 90px; }
.pos-tabelle .betrag { width: 100px; text-align: right; font-variant-numeric: tabular-nums; }
.pos-tabelle .verfuegbar { font-size: 11.5px; color: var(--ink3); }
.pos-tabelle .verfuegbar.knapp { color: var(--rot); font-weight: 650; }
.summenblock { margin-left: auto; max-width: 360px; }
.summenblock div { display: flex; justify-content: space-between; padding: 4px 0; font-variant-numeric: tabular-nums; }
.summenblock .gesamt { font-weight: 700; border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 8px; font-size: 17px; }
.artikelsuche { position: relative; }
.treffer { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line2);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.08); max-height: 320px; overflow: auto; }
.treffer div { padding: 8px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.treffer div:hover, .treffer div.sel { background: var(--bg); }
.zwei-spalten { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
dl.daten { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
dl.daten dt { color: var(--ink3); }
dl.daten dd { margin: 0; }
@media (max-width: 820px) {
  .menue-knopf { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--card); border-bottom: 1px solid var(--line); padding: 8px; }
  body.nav-offen .nav { display: flex; }
  .nav-user { margin: 8px 12px; }
  .inhalt { padding: 14px 12px 80px; }
  .zwei-spalten { grid-template-columns: 1fr; }
  .raster .breit2 { grid-column: auto; }
  table.liste .mobil-weg { display: none; }
  .pos-tabelle thead { display: none; }
  .pos-tabelle tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .pos-tabelle td { border: 0; padding: 0; }
  .pos-tabelle td.bez { grid-column: 1 / -1; }
  .pos-tabelle .w-menge, .pos-tabelle .w-preis, .pos-tabelle .w-rabatt, .pos-tabelle .w-abschnitt, .pos-tabelle .w-nr { width: 100%; }
}
@media print { .kopf, .knopfleiste { display: none; } }
/* 1.1: Beträge, Summen, Kalender, Kasse, Zeiten */
.betrag-ein { color: var(--gruen); }
.betrag-aus { color: #c25e0a; }
.betrag-neutral { color: var(--ink2); }
.summenleiste { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.summenleiste span { color: var(--ink2); font-size: 13.5px; }
.summenleiste b { font-size: 15px; }
.tabellen-rahmen { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); }
table.liste tr.storniert td { text-decoration: line-through; opacity: .45; }
table.liste tr.storniert td.aktionen { text-decoration: none; }
table.liste tr.gedimmt td { opacity: .55; }
table.liste tr.edit-zeile td { background: #fbfaf8; }
table.liste tr.neu-markiert td { background: var(--gruen-bg); }
table.liste td.aktionen { white-space: nowrap; }
table.liste td.aktionen form { display: inline; }
table.liste td.beschreibung { max-width: 280px; }
table.liste tfoot td { border-top: 2px solid var(--line2); background: #fbfaf8; }
a.sortieren { text-decoration: none; color: inherit; }
a.sortieren.aktiv { color: var(--ink); }
.import-feld { display: flex; flex-direction: column; gap: 6px; border: 1px dashed var(--line2); border-radius: 8px; padding: 12px; }
.pos-optionen { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
label.mini { flex-direction: row; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--ink2); }
label.mini input { width: auto; margin: 0; }
.pos-tabelle .z-text { margin-top: 4px; font-size: 13px; min-height: 44px; }
.pos-tabelle tr.rein-zeile td { background: #fbfaf8; }
.jahr-wahl { width: auto; padding: 3px 6px; font-size: 13px; margin-right: 6px; }
.zeit-laeuft { font-size: 18px; font-weight: 650; margin: 0 0 10px; }
.knopf.gross { font-size: 18px; padding: 12px 22px; }
/* Kalender */
.kalender { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 10px; }
.kal-kopf { background: #fbfaf8; text-align: center; font-size: 12px; font-weight: 650; color: var(--ink3); padding: 6px 0; }
.kal-tag { background: #fff; min-height: 92px; padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kal-tag.fremd { background: #faf9f6; }
.kal-tag.fremd .kal-nr { color: #c9c6be; }
.kal-tag.heute .kal-nr { background: var(--ink); color: #fff; border-radius: 99px; }
.kal-nr { font-size: 12px; font-weight: 650; color: var(--ink2); width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.kal-event { display: block; font-size: 11.5px; line-height: 1.3; padding: 2px 5px; text-decoration: none; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; border-radius: 0; margin: 0 -4px; }
.kal-event.anfang { border-top-left-radius: 5px; border-bottom-left-radius: 5px; margin-left: 0; }
.kal-event.ende { border-top-right-radius: 5px; border-bottom-right-radius: 5px; margin-right: 0; }
.kal-event.gruen { background: var(--gruen-bg); color: var(--gruen); }
.kal-event.blau { background: var(--blau-bg); color: var(--blau); border: 1px dashed #9bbbe0; }
.kal-event:hover { filter: brightness(.95); }
@media (max-width: 820px) {
  .kal-tag { min-height: 64px; padding: 2px; }
  .kal-event { font-size: 10px; padding: 1px 3px; }
  .summenleiste { gap: 4px 12px; }
  table.liste.kasse td, table.liste.kasse th { padding: 7px 6px; }
}
.kennzahl .wert .betrag-ein, .kennzahl .wert .betrag-aus { white-space: nowrap; }
.filter.kompakt select { min-width: 140px; }
table.liste.import select { width: auto; min-width: 118px; padding: 6px 8px; }
table.liste.import td { vertical-align: top; }
.zwei-spalten.oben { align-items: start; }
@media (max-width: 820px) {
  .kennzahlen { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kennzahl { padding: 10px 12px; }
  .kennzahl .wert { font-size: 18px; }
  .filter input, .filter select, .filter.kompakt select { min-width: 0; flex: 1 1 44%; }
  table.liste.kasse td.aktionen .knopf { padding: 4px 7px; }
}

/* ---------------- Webseiten-Editor ---------------- */
.inhalt.breit { max-width: none; padding-left: 16px; padding-right: 16px; }
.web-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: -6px 0 16px; }
.web-tabs { display: flex; gap: 4px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.web-tabs a { text-decoration: none; padding: 7px 12px; border-radius: 7px; color: var(--ink2); font-weight: 550; font-size: 14px; }
.web-tabs a.aktiv { background: var(--ink); color: #fff; }
.editor-kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.speicherstand { padding: 6px 10px; border-radius: 8px; background: var(--grau-bg); }
.speicherstand.ok { background: var(--gruen-bg); color: var(--gruen); }
.speicherstand.fehler { background: var(--rot-bg); color: var(--rot); font-weight: 600; }
.editor { display: grid; grid-template-columns: minmax(380px, 520px) 1fr; gap: 16px; align-items: start; }
.ed-links { min-width: 0; }
.ed-rechts { position: sticky; top: 70px; height: calc(100vh - 90px); display: flex; flex-direction: column; min-width: 0; }
.vorschau-leiste { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.vorschau-leiste .leise { flex: 1; }
.umschalter { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.umschalter button { border: 0; background: #fff; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.umschalter button.an { background: var(--ink); color: #fff; }
.vorschau-rahmen { flex: 1; background: #d9d6cf; border-radius: 10px; overflow: hidden; display: flex; justify-content: center; border: 1px solid var(--line); }
.vorschau-rahmen iframe { width: 100%; height: 100%; border: 0; background: #fff; transition: width .25s; }
@media (max-width: 1000px) { .editor { grid-template-columns: 1fr; } .ed-rechts { position: static; height: 75vh; } }
.ed-block { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin: 0; }
.ed-block.aus { opacity: .55; }
.ed-block.offen { border-color: var(--ink3); box-shadow: 0 4px 18px -12px rgba(0,0,0,.4); }
.ed-block.blink { outline: 3px solid #2f6fb0; }
.seite-einst { margin-bottom: 8px; }
.eb-kopf, .ein-kopf { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; user-select: none; }
.eb-kopf .sym { font-size: 18px; }
.eb-titel { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.eb-titel .leise, .ein-titel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ein-titel { flex: 1; font-weight: 550; }
.pfeil { color: var(--ink3); width: 12px; }
.mini { display: inline-flex; gap: 2px; flex-shrink: 0; }
.mini button { border: 1px solid transparent; background: none; border-radius: 6px; padding: 3px 6px; cursor: pointer; font-size: 13px; color: var(--ink2); }
.mini button:hover { border-color: var(--line2); background: #fff; }
.eb-hilfe { margin: 0 14px; }
.ed-felder { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 10px 14px 16px; }
.ed-felder .ganz { grid-column: 1 / -1; }
.ed-felder label > span:first-child { font-size: 12px; }
.zaehler { font-size: 12px; color: var(--gruen); font-weight: 500; }
.zaehler.warn { color: var(--gelb); }
.plus-zeile { display: block; width: 100%; border: 1px dashed transparent; background: none; color: var(--ink3); font: inherit; font-size: 12px; padding: 3px; margin: 2px 0; cursor: pointer; border-radius: 8px; opacity: .55; }
.plus-zeile:hover { opacity: 1; border-color: var(--line2); background: #fff; color: var(--ink); }
.md-leiste { display: flex; gap: 4px; margin-bottom: 4px; }
.md-leiste button { border: 1px solid var(--line2); background: #fff; border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; }
.bild-einzeln { display: flex; gap: 10px; align-items: flex-start; }
.bild-einzeln img { width: 110px; height: 80px; object-fit: cover; border-radius: 8px; background: var(--grau-bg); flex-shrink: 0; }
.bild-rechts { flex: 1; display: grid; gap: 6px; }
.bild-rechts .knopfleiste { margin: 0; }
.bilder-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.bl-bild { position: relative; background: #fbfaf8; border: 1px solid var(--line); border-radius: 8px; padding: 4px; display: grid; gap: 4px; }
.bl-bild.erstes { border-color: var(--ink3); }
.bl-bild img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; background: var(--grau-bg); }
.bl-bild input { font-size: 12px; padding: 4px 6px; }
.bl-knoepfe { display: flex; justify-content: space-between; }
.bl-knoepfe button { border: 0; background: none; cursor: pointer; padding: 2px 6px; color: var(--ink2); }
.bl-plus { border: 2px dashed var(--line2); background: #fff; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; cursor: pointer; font: inherit; font-size: 22px; color: var(--ink3); }
.bl-plus .leise { font-size: 11px; text-align: center; padding: 0 6px; }
.bl-plus.ueber, .ablage.ueber { border-color: var(--blau); background: var(--blau-bg); }
.eintraege { display: grid; gap: 6px; }
.eintrag { border: 1px solid var(--line); border-radius: 8px; background: #fbfaf8; }
.eintrag.offen { background: #fff; border-color: var(--ink3); }
.eintrag .ed-felder { padding: 6px 10px 12px; }
.google { display: block; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 6px 0 10px; font-family: Arial, sans-serif; }
.google .g-url { display: block; font-size: 12px; color: #4d5156; }
.google .g-titel { display: block; font-size: 18px; color: #1a0dab; line-height: 1.3; margin: 2px 0; }
.google .g-text { display: block; font-size: 13px; color: #4d5156; line-height: 1.45; }
dialog.bildwahl, dialog.katalog { width: min(1000px, 94vw); max-height: 88vh; border: 0; border-radius: 14px; padding: 0; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(20,18,15,.45); }
.bw-kopf { position: sticky; top: 0; background: #fff; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); z-index: 1; }
.bw-kopf h2 { margin: 0; flex: 1; }
.bw-kopf .bw-suche { max-width: 220px; }
.bw-hinweis { padding: 0 16px; }
.bw-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 0 16px 16px; }
.bw-bild { position: relative; border: 2px solid transparent; border-radius: 10px; padding: 0; background: var(--grau-bg); cursor: pointer; overflow: hidden; text-align: left; }
.bw-bild img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.bw-bild.an { border-color: #2f6fb0; }
.bw-bild .nr { position: absolute; top: 6px; right: 6px; background: #2f6fb0; color: #fff; border-radius: 99px; min-width: 24px; height: 24px; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.bw-alt { display: block; font-size: 11px; color: var(--ink2); padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
dialog.katalog h3 { padding: 0 16px; }
.kat-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; padding: 0 16px 8px; }
.kat-eintrag { display: grid; grid-template-columns: 34px 1fr; gap: 2px 8px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px; cursor: pointer; font: inherit; }
.kat-eintrag:hover { border-color: var(--ink3); background: #fbfaf8; }
.kat-eintrag .sym { grid-row: span 2; font-size: 22px; }
.kat-eintrag .leise { font-size: 12px; }
.medien-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.medium { padding: 10px; margin: 0; display: grid; gap: 6px; }
.medium img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; background: var(--grau-bg); }
.ablage { border-style: dashed; }
.bildfeld { display: grid; gap: 6px; }
.bildfeld .label { font-size: 13px; color: var(--ink2); font-weight: 550; }
/* Text-Editor, Farbwahl, Gestaltung */
.ed-felder .feld { display: flex; flex-direction: column; gap: 4px; }
.ed-felder .feld-label { font-size: 12px; color: var(--ink2); font-weight: 550; }
.rt { border: 1px solid var(--line2); border-radius: 8px; background: #fff; }
.rt:focus-within { outline: 2px solid #9fb8d6; border-color: #7f9fc4; }
.rt-leiste { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); background: #fbfaf8; border-radius: 8px 8px 0 0; position: sticky; top: 58px; z-index: 2; }
.rt-leiste button { border: 1px solid transparent; background: none; border-radius: 6px; min-width: 28px; height: 28px; cursor: pointer; font-size: 13px; color: var(--ink); }
.rt-leiste button:hover { border-color: var(--line2); background: #fff; }
.rt-leiste select { width: auto; padding: 3px 6px; font-size: 12px; height: 28px; max-width: 120px; }
.rt-flaeche { min-height: 90px; padding: 10px 12px; outline: none; font-size: 15px; line-height: 1.55; }
.rt-flaeche.gross { min-height: 360px; max-height: 70vh; overflow: auto; }
.rt-flaeche p, .rt-flaeche ul, .rt-flaeche ol { margin: 0 0 .6em; }
.rt-flaeche h3 { font-size: 18px; margin: .6em 0 .3em; } .rt-flaeche h4 { font-size: 15px; margin: .6em 0 .3em; }
.rt-flaeche:empty::before { content: "Text eingeben …"; color: var(--ink3); }
.rt-farbe { position: relative; display: inline-block; }
.rt-a { font-weight: 700; border-bottom: 3px solid #b9643f; padding: 0 2px; }
.rt-farben { position: absolute; z-index: 5; top: 32px; left: 0; background: #fff; border: 1px solid var(--line2); border-radius: 8px; padding: 6px; display: grid; grid-template-columns: repeat(4, 26px); gap: 4px; box-shadow: 0 8px 20px -10px rgba(0,0,0,.4); }
.rt-farben button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line2) !important; padding: 0; }
.rt-farben input { width: 26px; height: 26px; padding: 0; border: 0; }
.farbwahl { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.farbwahl button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line2); cursor: pointer; padding: 0; }
.farbwahl button.an { box-shadow: 0 0 0 2px var(--ink); }
.farbwahl .fw-std { width: auto; border-radius: 99px; padding: 0 10px; font-size: 12px; background: #fff; }
.farbwahl input[type=color] { width: 34px; height: 30px; padding: 0 2px; }
.schriftfeld { display: flex; gap: 8px; align-items: center; }
.schriftfeld select { flex: 1; }
.schriftprobe { font-size: 18px; white-space: nowrap; color: var(--ink); }
.gestaltung { margin: 0 14px 14px; border: 1px dashed var(--line2); border-radius: 8px; background: #fcfbf9; }
.gestaltung.offen { border-style: solid; }
.gestaltung-kopf { width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink2); }
.vorlagen { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.vorlage { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px; cursor: pointer; font: inherit; font-size: 12px; text-align: left; display: grid; gap: 6px; }
.vorlage:hover { border-color: var(--ink3); }
.vorlage .streifen { display: flex; height: 22px; border-radius: 6px; overflow: hidden; }
.vorlage .streifen i { flex: 1; }
input[type=color] { height: 40px; padding: 2px 4px; cursor: pointer; }
.summenleiste.auszug { background: var(--blau-bg); color: var(--blau); margin-top: -6px; }
.loesch-filter { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; margin-top: 12px; }
.loesch-filter > div { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.loesch-filter b { width: 100%; }
@media (max-width: 700px) { .loesch-filter { grid-template-columns: 1fr; } }

/* GuV / ELSTER */
.untertitel { font-size: 15px; font-weight: 500; }
.kz { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.liste td.kz { color: var(--ink2); width: 1%; }
table.liste tr.summe td { font-weight: 650; border-top: 2px solid var(--line2); }
.pruefliste { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pruefliste li { display: flex; gap: 10px; align-items: baseline; }
table.liste.zuordnen tr.pruefen td { background: var(--gelb-bg); }
table.liste.zuordnen select { min-width: 220px; max-width: 380px; }
select.geaendert { outline: 2px solid var(--gelb); }
.grund { margin-top: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.speicherleiste { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; margin-bottom: 0; }
details.karte summary { cursor: pointer; }
.gkal-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.anleitung li { margin-bottom: 6px; }
@media print {
  .nicht-drucken, .meldung { display: none !important; }
  body { background: #fff; }
  .inhalt { padding: 0; max-width: none; }
  .karte { border: 0; padding: 0; }
  table.liste.elster td, table.liste.elster th { padding: 4px 6px; }
}
/* GuV 1.5: Stückzahl, Aufteilen */
.kat-zeile { display: flex; gap: 6px; align-items: center; }
label.stueck { flex-direction: row; align-items: center; gap: 2px; font-weight: 650; color: var(--ink2); }
label.stueck input { width: 64px; padding: 7px 6px; }
input.geaendert { outline: 2px solid var(--gelb); }
.teile div { margin-bottom: 2px; }
.teile-tabelle select, .teile-tabelle input { min-width: 0; }

/* Belege in der Kasse */
.belege-zeile { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--line); }
.beleg-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--grau-bg); border-radius: 6px;
  padding: 2px 4px 2px 8px; font-size: 13px; }
.beleg-chip form { display: inline; margin: 0; }

/* ---------------- Übergabe-/Rückgabeprotokoll (Tablet) ---------------- */
.prot-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 24px; }
.prot-kachel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.prot-kachel.heute { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.prot-kachel.erledigt { opacity: .7; }
.prot-kachel-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.prot-art { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; }
.prot-art.uebergabe { background: var(--blau-bg); color: var(--blau); }
.prot-art.rueckgabe { background: var(--gelb-bg); color: var(--gelb); }
.prot fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.prot-kopf { display: grid; grid-template-columns: 1fr minmax(260px, 420px); gap: 16px; align-items: start; }
.prot-kunde { font-size: 20px; font-weight: 700; }
.prot-kopf-felder { grid-template-columns: 1fr !important; gap: 8px; }
.prot-abschnitt { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.prot-abschnitt h2 { margin: 0; }
.prot-pos { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--line);
  align-items: center; }
.prot-pos:first-of-type { margin-top: 10px; }
.prot-pos-text b { font-size: 16px; }
.prot-menge { font-size: 18px; font-weight: 700; text-align: right; white-space: nowrap; }
.prot-vorher { font-size: 13px; color: var(--gelb); margin-top: 2px; }
.prot-pos .seg { grid-column: 1 / -1; }
.prot-pos-felder { grid-column: 1 / -1; display: flex; gap: 8px; align-items: end; }
.prot-pos-felder .kurz { width: 92px; flex: none; font-size: 12px; }
.prot-kommentar { flex: 1; }
.prot-pos.nicht-ok { background: linear-gradient(90deg, var(--rot-bg), transparent 60%); margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
.prot-pos .nur-schaden { display: none; }
.prot-pos.nicht-ok .nur-schaden { display: block; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; flex: 1 1 0; min-width: 84px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { display: block; }
.seg span { display: block; text-align: center; padding: 11px 8px; border: 1.5px solid var(--line2); border-radius: 10px;
  font-weight: 600; cursor: pointer; user-select: none; background: var(--card); font-size: 15px; }
.seg input:checked + span { color: #fff; border-color: transparent; }
.seg .seg-ok input:checked + span { background: var(--gruen); }
.seg label:not(.seg-ok) input:checked + span { background: var(--rot); }
.seg label.seg-verschmutzt input:checked + span { background: var(--gelb); }
.seg label.seg-spaeter input:checked + span { background: var(--ink2); }
.seg label.seg-neutral input:checked + span { background: var(--blau); }
.sig-feld.fest { cursor: default; }
.seg input:focus-visible + span { outline: 2px solid var(--blau); outline-offset: 2px; }
.prot-reinigung { margin: 12px 0 0; padding: 8px 12px; background: var(--blau-bg); color: var(--blau); border-radius: 8px; font-size: 14px; }
.prot-reinigung.leistung { background: var(--grau-bg); color: var(--ink2); margin-top: 6px; }
.prot-zusatz { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.prot-zusatz input:first-child { flex: 1; }
.prot-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.prot-foto { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--grau-bg); }
.prot-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prot-foto button { position: absolute; top: 6px; right: 6px; background: #fff; }
.prot-foto-neu { aspect-ratio: 4 / 3; border: 2px dashed var(--line2); border-radius: 8px; display: flex; align-items: center;
  justify-content: center; text-align: center; cursor: pointer; color: var(--ink2); font-weight: 600; font-size: 14px; }
.prot-foto-neu input { display: none; }
.prot-check { display: flex; flex-direction: row; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 16px; font-weight: 500; color: var(--ink); cursor: pointer; }
.prot-check input { width: 26px; height: 26px; flex: none; margin: 0; accent-color: var(--gruen); }
.prot-kaution { margin-top: 12px; }
.prot-rechtstext { font-size: 14px; color: var(--ink2); margin-top: 0; }
.prot-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.prot-sig-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sig-feld { position: relative; height: 190px; border: 1.5px solid var(--line2); border-radius: 10px; background: #fff;
  overflow: hidden; touch-action: none; cursor: crosshair; }
.sig-feld canvas { position: absolute; inset: 0; touch-action: none; }
.sig-feld::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 38px; border-bottom: 1px solid var(--line2); pointer-events: none; }
.sig-hinweis { position: absolute; left: 18px; bottom: 14px; color: var(--ink3); font-size: 13px; pointer-events: none; }
.sig-bild { max-width: 100%; max-height: 100%; display: block; margin: auto; position: absolute; inset: 0; object-fit: contain; padding: 10px; }
.sig-name { margin-top: 8px; }
.prot-leiste { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; justify-content: flex-end; padding: 12px 0;
  background: linear-gradient(transparent, var(--bg) 30%); }
.knopf.gross { padding: 14px 22px; font-size: 17px; }
.prot.fertig .seg span { cursor: default; }
.prot.fertig .seg label:not(:has(input:checked)) { display: none; }
@media (max-width: 820px) {
  .prot-kopf, .prot-sigs { grid-template-columns: 1fr; }
  .prot-pos-felder { flex-wrap: wrap; }
  .prot-kommentar { flex-basis: 100%; }
  .prot-leiste { justify-content: stretch; } .prot-leiste .knopf { flex: 1; justify-content: center; }
  .prot-zusatz { flex-wrap: wrap; } .prot-zusatz input:first-child { flex-basis: 100%; }
}
.prot.fertig .prot-kommentar:placeholder-shown, .prot.fertig textarea:placeholder-shown, .prot.fertig .prot-pos-felder .kurz input:placeholder-shown { display: none; }
.fahrt-raster { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 820px) { .fahrt-raster { grid-template-columns: 1fr 1fr; } }

/* Kassenzählung */
dialog.zaehlen { width: min(760px, 96vw); max-height: 92vh; border: 0; border-radius: 14px; padding: 0; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.zaehl-datum { flex-direction: row; align-items: center; gap: 6px; font-size: 14px; }
dialog.zaehlen form, dialog.zaehlen .zaehl-inhalt { min-width: 0; }
dialog.zaehlen { overflow-x: hidden; }
.zaehl-datum input { width: auto; }
.zaehl-inhalt { padding: 14px 16px; }
.zaehl-inhalt h3 { margin: 14px 0 6px; }
.zaehl-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.zaehl-spalten h3 { margin-top: 0; }
.zaehl-zeile { display: grid; grid-template-columns: 52px 36px minmax(0, 1fr) 36px 84px; gap: 6px; align-items: center; margin-bottom: 6px; }
.zaehl-zeile .zw { font-weight: 650; text-align: right; }
.zaehl-zeile input { text-align: center; font-size: 17px; padding: 6px 4px; min-width: 0; }
.zaehl-zeile .knopf { padding: 6px 0; justify-content: center; font-size: 17px; }
.zaehl-zeile .zs { text-align: right; font-size: 13px; }
.zaehl-zeile.hat input { border-color: var(--gruen); background: var(--gruen-bg); }
.zusatz-zeile { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 6px; margin-bottom: 6px; }
.zusatz-zeile input, .zaehl-zeile input { width: 100%; min-width: 0; }
.zusatz-zeile .r { text-align: right; }
.zaehl-ergebnis { position: sticky; bottom: 0; background: #fbfaf8; border-top: 1px solid var(--line); padding: 12px 16px;
  display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.zaehl-ergebnis > div:not(.knopfleiste) { display: flex; flex-direction: column; }
.zaehl-ergebnis b { font-size: 19px; }
.zaehl-ergebnis .check { flex-basis: 100%; }
@media (max-width: 640px) {
  .zaehl-spalten { grid-template-columns: 1fr; }
  .zaehl-zeile { grid-template-columns: 46px 44px minmax(0, 1fr) 44px 70px; }
  .zusatz-zeile { grid-template-columns: minmax(0, 1fr) 96px; }
  .zaehl-ergebnis { gap: 6px 16px; }
  .zaehl-ergebnis b { font-size: 16px; }
  .zaehl-hinweis { display: none; }
}

/* Daten (Ablage) */
.ablage-kopf { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 8px; }
.ablage-pfad { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 15px; min-width: 200px; }
.ablage-kopf input[type=search] { max-width: 220px; }
.ablage-liste td { vertical-align: middle; }
.ablage-symbol { display: inline-block; width: 22px; text-align: center; }
.ablage-zeile { display: flex; gap: 4px; align-items: flex-start; }
.ablage-name { min-width: 0; }
.ablage-name a { word-break: break-word; }
.nur-mobil { display: none; }
@media (max-width: 820px) { .nur-mobil { display: block; font-size: 12px; } .ablage-kopf input[type=search] { max-width: none; flex: 1; } }
.daten-kachel { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.zaehl-offen { border: 1px solid #e8cf8f; background: var(--gelb-bg); border-radius: 8px; padding: 8px 10px; margin-top: 14px; }
.zaehl-offen summary { cursor: pointer; }
.zaehl-offen table { background: #fff; }
