/* Partner-App. Die Farben hier sind Vorgaben; die des Mandanten (mandant.toml) überschreiben sie über /mandant.css. */
:root {
  --ink: #141414;
  --green: #0B3D45;
  --green-line: #2C6A73;
  --orange: #2EC4B6;
  --ground: #F4F2EE;
  --card: #FFFFFF;
  --muted: #5C5C5C;
  --line: #E2DFD8;
  --field-line: #8A8A8A;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
body.dark { background: var(--green); color: #FFFFFF; }
a { color: var(--ink); }
h1 { margin: 0; font-size: 26px; line-height: 1.2; }
h2 { margin: 8px 0 0; font-size: 17px; }
.muted { color: var(--muted); font-size: 14px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; padding-top: calc(14px + env(safe-area-inset-top));
  background: var(--green); color: #FFFFFF;
}
.brand { display: inline-flex; align-items: center; min-height: 44px; color: #FFFFFF; text-decoration: none; }
.brand img { display: block; width: 208px; max-width: 100%; height: auto; }
@media (max-width: 420px) { .topbar { padding-left: 16px; padding-right: 16px; } .brand img { width: 158px; } }
.brand span { color: var(--orange); }
.brand.big { margin: 0; }
.brand.big img { width: 100%; max-width: 376px; }
.netzwerk { margin: 0 0 4px; padding-left: 12px; border-left: 3px solid var(--orange); font-size: 15px; color: #D3E7EA; }
.netzwerk-zeile { margin: -8px 0 0; font-size: 15px; color: var(--muted); }
.role { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid #5E8A91; color: #D3E7EA; }

.nav {
  order: 3; position: sticky; bottom: 0;
  display: flex; background: var(--green);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
}
.nav a {
  flex: 1 1 0; min-width: 0; min-height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: #CFE3E6; font-size: 12px; font-weight: 600; text-decoration: none;
}
.nav a[aria-current="page"] { color: var(--orange); }

.page {
  order: 2; flex: 1; width: 100%; max-width: 720px; margin: 0 auto;
  padding: 20px; display: flex; flex-direction: column; gap: 16px;
}
@media (min-width: 800px) {
  .nav { order: 1; position: static; justify-content: center; padding: 0 8px; border-top: 1px solid var(--green-line); }
  .nav a { flex: 0 0 auto; flex-direction: row; gap: 8px; padding: 0 18px; font-size: 14px; }
}

.auth {
  flex: 1; width: 100%; max-width: 440px; margin: 0 auto; padding: 32px;
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
}
.lead { margin: 0; font-size: 17px; color: #D3E7EA; }
.hint { margin: 0; font-size: 13px; color: #C2D0C7; }
.auth .link { align-self: center; min-height: 44px; display: inline-flex; align-items: center; color: #FFFFFF; font-weight: 600; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; color: var(--ink); text-decoration: none; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.num { font-size: 30px; font-weight: 800; line-height: 1; }
.pill { flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #E8E6E0; color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, label { font-size: 13px; font-weight: 600; }
input, select {
  width: 100%; height: 48px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--field-line); background: #FFFFFF; color: var(--ink);
  font: inherit;
}
body.dark input { background: #082D33; color: #FFFFFF; border-color: #5E8A91; }
body.dark label { color: #D3E7EA; }
input:focus-visible, select:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.field-error { margin: 0; font-size: 13px; font-weight: 600; color: #A8200D; }
body.dark .field-error { color: #FFB4A8; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center;
}
.btn.primary { background: var(--orange); color: var(--ink); }
.btn.dark { background: var(--ink); color: #FFFFFF; }
.btn.outline { background: #FFFFFF; color: var(--ink); border-color: var(--ink); }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 14px; }
form > .btn, .page > .btn, .page > form > .btn, .auth .btn { width: 100%; }
.actions form > .btn, .row form > .btn { width: auto; }

.notice { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: #FFFFFF; font-weight: 600; }
.notice.error { background: #FBE3DF; color: #7A1608; }

/* Modul Aufträge */
textarea {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--field-line);
  background: #FFFFFF; color: var(--ink); font: inherit; resize: vertical;
}
textarea:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
input[type="checkbox"] { width: 22px; height: 22px; padding: 0; flex-shrink: 0; accent-color: var(--ink); }
.field div label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; font-weight: 400; }
[hidden] { display: none !important; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid #BDBDBD; background: #FFFFFF; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none;
}
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.job { gap: 6px; }
.job .row { flex-wrap: nowrap; align-items: flex-start; }
.job-title { font-size: 17px; }
.small { font-size: 13px; }
.pill.orange { background: #FFE9CF; color: #5A3200; }
.pill.dark { background: var(--ink); color: #FFFFFF; }
.pill.line { background: #FFFFFF; color: var(--muted); border: 1px solid #BDBDBD; }
.back { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; }
.facts { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.text { margin: 0; }

/* Umschalter Verwaltung / Partner-Ansicht */
button.role {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  background: transparent; color: #FFFFFF; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
button.role.partner { border-color: var(--orange); color: var(--orange); }
button.role:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Rechtliches */
.legal h2 { margin-top: 12px; }
.legal p, .legal ul { margin: 0; }
.legal ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal a, .link-plain { color: var(--ink); font-weight: 600; }
.link-plain { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; }
.auth .legal-links a { color: #C2D0C7; }
.auth .hint:not(.legal-links) a:not(.btn) { color: #FFFFFF; font-weight: 600; }   /* Links in Hinweisen auf dunklem Grund lesbar (2.0.18) */
details.loeschen summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }

/* Modul Dokumente */
.doc-link { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
a.notice { text-decoration: none; }
input[type="file"] { height: auto; padding: 12px; }

/* Zwei-Faktor-Anmeldung */
.qr { align-self: center; padding: 8px; background: #FFFFFF; border-radius: 12px; border: 1px solid var(--line); line-height: 0; }
.qr svg { display: block; width: 240px; max-width: 100%; height: auto; }
.schluessel { margin: 0; font-family: ui-monospace, Menlo, monospace; font-size: 15px; font-weight: 700; letter-spacing: 0.5px; overflow-wrap: anywhere; }
.codes { margin: 0; padding-left: 28px; columns: 2; font-family: ui-monospace, Menlo, monospace; font-size: 17px; font-weight: 700; line-height: 1.9; }
@media print { .topbar, .nav, .btn { display: none !important; } }

/* Navigation: auf dem Handy nur die ersten Punkte, der Rest unter "Mehr" */
.row-icon { display: inline-flex; align-items: center; gap: 10px; }

/* Modul Rechnungen */
.card-link { display: block; color: var(--ink); text-decoration: none; min-height: 44px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; }
.grid3 .field { min-width: 0; }
.position .row { align-items: flex-end; }
.field.ust { flex: 0 0 110px; }
label.weg { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 400; font-size: 14px; }
.fehlerliste { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.summen .row { flex-wrap: nowrap; }
details.card summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }

/* Modul Reisekosten */
.mahlzeiten { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.mahlzeiten label, details.card form > label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 400; }
.tiles-geld .num { font-size: 24px; white-space: nowrap; }

/* Kalender */
label.haken { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; font-weight: 400; }
#link { font-size: 13px; }

/* Hinweis: App auf den Startbildschirm */
.install h2 { margin: 0; font-size: 18px; }
.install p { margin: 0; }
.install-kopf { flex-wrap: nowrap; }
.install[data-install="banner"] { border-color: var(--orange); border-width: 2px; }
.install-zu { min-width: 44px; min-height: 44px; margin: -12px -12px -12px 0; border: 0; background: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.install-zu:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Free und Pro */
.pill.pro { display: inline-flex; align-items: center; gap: 4px; background: var(--orange); color: var(--ink); }
.pill.pro svg { width: 13px; height: 13px; }
.row-icon .pill { margin-left: 4px; }
.nav a { position: relative; }
.schloss { position: absolute; top: 6px; left: calc(50% + 6px); display: inline-flex; padding: 2px; border-radius: 999px; background: var(--orange); color: var(--ink); }
.schloss svg { width: 10px; height: 10px; stroke-width: 3; }
@media (min-width: 800px) {
  .schloss { position: static; margin-left: -2px; }
}
.card.gesperrt { background: #FAF8F4; }
.card.gesperrt strong { color: var(--muted); }
.pro-hinweis {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px;
  background: #FFF4E6; border: 1px solid #F5C990; color: var(--ink); text-decoration: none; font-size: 15px;
}
.pro-hinweis strong { white-space: nowrap; }
.pro-marke {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  background: var(--green); color: #FFFFFF; font-size: 12px; font-weight: 800; letter-spacing: 0.3px;
}
.pro-marke svg { width: 13px; height: 13px; }
.pro-marke.gross { align-self: flex-start; font-size: 14px; padding: 5px 12px; }
.lead-hell { margin: 0; font-size: 17px; color: var(--muted); }
.tarife { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .tarife { grid-template-columns: 1fr 1fr; } }
.tarif h2 { margin: 0; font-size: 22px; }
.tarif .muted { margin: 0; }
.tarif.pro { border: 2px solid var(--orange); }
.haken-liste { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.haken-liste li { padding-left: 26px; position: relative; }
.haken-liste li::before { content: "✓"; position: absolute; left: 4px; color: #3B7A57; font-weight: 800; }
.tarif-aendern summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.tarif-aendern { flex-basis: 100%; }
.tarif-aendern summary { font-weight: 600; }
.tarif-aendern form { max-width: 360px; padding-top: 4px; }
.card.row .pill { align-self: center; }
.card.bereich { flex-wrap: nowrap; }

/* Partnerprofil */
.avatar { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  background: var(--green); color: #FFFFFF; font-weight: 800; font-size: 18px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.gross { width: 96px; height: 96px; font-size: 38px; }
.person { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: 0; }
.profil-karte { display: flex; align-items: center; gap: 14px; }
.profil-karte .stack-klein { flex: 1; }
.profil-karte.hinweis { border-color: var(--orange); border-width: 2px; }
.stack-klein { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fortschritt { display: block; height: 8px; border-radius: 999px; background: #E8E6E0; overflow: hidden; }
.fortschritt span { display: block; height: 100%; background: var(--orange); border-radius: 999px; }
.foto-zeile { display: flex; align-items: flex-start; gap: 16px; }
.foto-felder { flex: 1; min-width: 0; gap: 8px; }
.profil-logo { max-width: 240px; max-height: 90px; width: auto; height: auto; align-self: flex-start; background: #FFFFFF; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
fieldset.auswahl { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.auswahl legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.auswahl-chip { position: relative; display: inline-flex; }
.auswahl-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.auswahl-chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #BDBDBD;
  background: #FFFFFF; font-size: 14px; font-weight: 600; cursor: pointer; }
.auswahl-chip input:checked + span { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.auswahl-chip input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.plz-ort { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.profil-kopf { display: flex; align-items: center; gap: 16px; }
.profil-kopf h1 { margin-bottom: 2px; }
.profil-kopf p { margin: 0 0 6px; }
.hilfe { margin: 0; }

/* Verfügbarkeit */
.monat-kopf { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; text-align: center; }
.monat-kopf h2 { margin: 0; }
.monat { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.monat .wt { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.tag-form { margin: 0; }
.tag { position: relative; width: 100%; aspect-ratio: 1; min-height: 44px; border-radius: 10px; border: 1px solid var(--line);
  background: #FFFFFF; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tag.aussen { opacity: .45; }
.tag:disabled { cursor: default; color: #A9A9A9; background: transparent; }
.tag.heute { box-shadow: inset 0 0 0 2px var(--ink); }
.tag.frei { background: #2F7A4F; border-color: #2F7A4F; color: #FFFFFF; }
.tag.nein { background: repeating-linear-gradient(135deg, #E8E6E0 0 6px, #D6D3CC 6px 12px); color: #6B6B6B; text-decoration: line-through; }
.tag:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.punkt { position: absolute; bottom: 5px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--orange); }
.legende { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); }
.legende > span { display: inline-flex; align-items: center; gap: 6px; }
.muster { position: relative; display: inline-block; width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--line); background: #FFFFFF; }
.muster.frei { background: #2F7A4F; border-color: #2F7A4F; }
.muster.nein { background: repeating-linear-gradient(135deg, #E8E6E0 0 3px, #D6D3CC 3px 6px); }
.muster .punkt { bottom: 4px; width: 6px; height: 6px; margin-left: -3px; }
.muster.belegt-voll { background: var(--orange); border-color: var(--orange); }
.plz-ort.zwei { grid-template-columns: 1fr 1fr; }
.tabelle-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; }
.verf-tabelle { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.verf-tabelle th, .verf-tabelle td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.verf-tabelle thead th { font-weight: 600; color: var(--muted); font-size: 12px; }
.verf-tabelle thead th span { font-weight: 800; color: var(--ink); }
.verf-tabelle th.we { background: #FAF8F4; }
.verf-tabelle tbody th { text-align: left; position: sticky; left: 0; background: #FFFFFF; padding-left: 14px; }
.verf-tabelle tbody th a { color: var(--ink); font-weight: 600; text-decoration: none; }
.verf-tabelle td { min-width: 34px; font-weight: 800; }
.verf-tabelle td.frei { background: #DDEFE3; color: #1F5E3A; }
.verf-tabelle td.nein { background: #EEECE7; color: #8A8A8A; }
.verf-tabelle td.belegt { background: #CDEFEB; color: #9A4D00; }
.leiste { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; padding: 10px; }
.lt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 8px; font-size: 13px; font-weight: 700; background: #F4F2EE; }
.lt small { font-size: 10px; font-weight: 600; color: var(--muted); }
.lt.frei { background: #DDEFE3; color: #1F5E3A; }
.lt.nein { background: repeating-linear-gradient(135deg, #EEECE7 0 4px, #E2DFD8 4px 8px); color: #8A8A8A; }
.lt.belegt { background: #CDEFEB; color: #9A4D00; }
@media (max-width: 520px) { .leiste { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

/* Vorschläge und Bewertungen */
.vorschlag .row { flex-wrap: nowrap; }
.gruende { display: flex; flex-wrap: wrap; gap: 6px; }
.grund { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: #EEECE7; color: var(--ink); }
.grund.gut { background: #DDEFE3; color: #1F5E3A; }
.grund.mittel { background: #FFF0DB; color: #7A4300; }
.grund.schlecht { background: #FBE3DF; color: #7A1608; }
.grund.neutral { background: #F1F0EC; color: var(--muted); }
.bewerten summary { min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.sterne-anzeige { color: #E08A00; letter-spacing: 1px; }
fieldset.sterne { margin: 0; padding: 0; border: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
fieldset.sterne legend { width: 100%; margin-bottom: 4px; }
fieldset.sterne input { position: absolute; opacity: 0; width: 1px; height: 1px; }
fieldset.sterne label { font-size: 34px; line-height: 1; color: #D6D3CC; cursor: pointer; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
fieldset.sterne input:checked ~ label, fieldset.sterne label:hover, fieldset.sterne label:hover ~ label { color: #E08A00; }
fieldset.sterne input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 8px; }
.profil-karte .avatar svg { width: 22px; height: 22px; }

/* Chat und Check-in */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
/* Spam-Falle auf der Anmeldeseite eines Gruppenlinks: für Menschen unsichtbar */
#feld-website { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.qr-gross svg { width: 100%; max-width: 260px; height: auto; background: #fff; padding: 8px; border-radius: 8px; }
.chat h2 { margin: 0; }
.verlauf { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding: 4px 2px; }
.msg { max-width: 85%; padding: 10px 12px; border-radius: 14px; }
.msg p { margin: 0; overflow-wrap: anywhere; }
.msg.fremd { align-self: flex-start; background: #F1F0EC; border-bottom-left-radius: 4px; }
.msg.eigen { align-self: flex-end; background: var(--green); color: #FFFFFF; border-bottom-right-radius: 4px; }
.msg-info { display: block; margin-top: 4px; font-size: 11px; opacity: .75; }
.verlauf .leer { margin: 0; }
.chat-eingabe { display: flex; gap: 8px; align-items: flex-end; }
.chat-eingabe textarea { flex: 1; min-height: 48px; }
.chat-eingabe .btn { width: auto; flex-shrink: 0; }
.zaehler { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px;
  border-radius: 999px; background: var(--orange); color: var(--ink); font-size: 11px; font-weight: 800; }
.checkin { border: 2px solid var(--orange); }
.checkin h2 { margin: 0; }
.nav .zaehler { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; }
@media (min-width: 800px) { .nav .zaehler { position: static; } }
.nachricht-hinweis { display: block; background: var(--orange); color: var(--ink); }

/* Auswertungen */
.kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kachel { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.num.klein { font-size: 22px; white-space: nowrap; }
.warn { color: #A8200D; }
.diagramm { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.balken-flaeche { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; height: 180px; align-items: end;
  border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0 44px, #EEECE7 44px 45px); }
.balken-spalte { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; outline: none; }
.balken { width: 70%; max-width: 36px; min-height: 0; background: #2F7A4F; border-radius: 4px 4px 0 0; }
.balken.orange { background: #E58A00; }
.achse { position: absolute; bottom: -22px; font-size: 11px; color: var(--muted); }
.balken-flaeche { margin-bottom: 22px; }
.tip { position: absolute; top: 0; left: 50%; transform: translate(-50%, -110%); white-space: nowrap; padding: 4px 8px; border-radius: 8px;
  background: var(--ink); color: #FFFFFF; font-size: 12px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 2; }
.balken-spalte:hover .tip, .balken-spalte:focus .tip { opacity: 1; }
.diagramm .balken-flaeche { margin-top: 28px; }
.balken-spalte:hover .balken, .balken-spalte:focus .balken { filter: brightness(.88); }
table.werte { border-collapse: collapse; font-size: 13px; width: 100%; }
table.werte th, table.werte td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line); }
table.werte th[scope="row"], table.werte thead th:first-child { text-align: left; }
table.werte a { color: var(--ink); font-weight: 600; }
.tabelle-karte { padding: 8px 12px; overflow-x: auto; }
details > table.werte { margin-top: 8px; }

/* Angebote und Menüs */
.card.menue-einfuegen { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.card.menue-einfuegen > .btn { width: auto; }
.gaenge { display: flex; flex-direction: column; gap: 2px; color: var(--muted); font-size: 14px; }
.gaenge span::before { content: "· "; color: var(--orange); font-weight: 800; }
.menue-karte { text-decoration: none; }
.kachel > span { overflow-wrap: anywhere; hyphens: auto; }

/* Verträge */
.vertragstext h2 { margin: 0 0 8px; font-size: 20px; }
.vertragstext h3 { margin: 16px 0 4px; font-size: 15px; }
.vertragstext p { margin: 0 0 8px; }
.vertragstext { max-height: 60vh; overflow-y: auto; }
.unterschrift-feld { display: flex; flex-direction: column; gap: 6px; }
canvas.sig { width: 100%; height: auto; aspect-ratio: 3 / 1; border: 1px dashed var(--field-line); border-radius: 10px; background: #FFFFFF; touch-action: none; cursor: crosshair; }
.sig-vorschau { max-width: 240px; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; }
.vertragstext-feld { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.vertrag-offen { border-color: var(--orange); border-width: 2px; }

/* Serien und Leistungsbestätigung */
.serie-marke { color: var(--ink); font-weight: 600; }
.serie summary { min-height: 44px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.serie-liste { margin: 8px 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.abnahme { border: 2px solid var(--green); }
.abnahme h2 { margin: 0; }
.abnahme p { margin: 0; }

/* Startseite „Heute“ und Geld */
.grow { flex: 1 1 auto; min-width: 0; }
.heute-einsatz { background: var(--green); color: #FFFFFF; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.heute-einsatz span { color: #DDE5E1; }
.heute-einsatz .heute-marke { font-size: 13px; font-weight: 700; color: #FFB866; text-transform: uppercase; letter-spacing: .6px; }
.heute-titel { font-size: 22px; color: #FFFFFF; }
.heute-einsatz .actions .btn { flex: 1 1 auto; }
.btn.ghost-hell { background: transparent; color: #FFFFFF; border: 1px solid #5B7569; }
.aufgaben, .liste-karte { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.aufgabe { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.aufgabe:hover { border-color: #BDB8AF; }
.aufgabe > svg { flex: 0 0 auto; color: var(--muted); width: 18px; height: 18px; }
.aufgabe .stack-klein { flex: 1 1 auto; gap: 2px; }
.aufgabe .punkt { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 5px; background: #8A8D8B; }
.aufgabe.dringend .punkt { background: var(--orange); }
.aufgabe.neu .punkt { background: #2F7A55; }
.aufgabe.gesperrt { opacity: .8; }
.geld-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; background: #E7EEEA; color: var(--green); display: flex; align-items: center; justify-content: center; }
.liste-karte { gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.liste-karte li + li { border-top: 1px solid #EEEBE6; }
.zeile { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; color: var(--ink); text-decoration: none; }
.zeile:hover { background: #FAF9F6; }
.zeile > svg { flex: 0 0 auto; color: var(--muted); width: 18px; height: 18px; }
.zeile .avatar { width: 40px; height: 40px; flex: 0 0 40px; }
.datum-spalte { width: 56px; flex: 0 0 56px; font-size: 13px; font-weight: 600; color: var(--muted); }
.kacheln-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kachel { display: flex; flex-direction: column; gap: 2px; padding: 12px; color: var(--ink); text-decoration: none; }
.kachel .num { font-size: 26px; }
.kachel .num.warn { color: #A85A00; }
.pill.gruen { background: #DDF1F2; color: #0F5C66; }
.leer { color: var(--muted); }
.filter-leiste { display: flex; flex-direction: column; gap: 10px; }
.filter-leiste input[type="search"] { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 18px; border: 1px solid #CFCAC2; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.chip.an { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.frei-am { justify-content: flex-start; flex-wrap: wrap; gap: 8px; align-items: center; }
.frei-am label { font-size: 14px; font-weight: 600; }
.frei-am input[type="date"] { width: auto; }
.zugang-aktionen h2 { margin: 0; }

/* Auftragsseite mit Reitern */
.reiter { display: flex; border-bottom: 1px solid var(--line); gap: 0; overflow-x: auto; margin-top: -4px; }
.reiter button { flex: 1 0 auto; min-height: 48px; padding: 0 12px; border: 0; border-bottom: 3px solid transparent; background: none;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.reiter button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--orange); }
.reiter button:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.reiter .zaehler { position: static; margin: 0; }
.reiter-panel[hidden] { display: none; }
.reiter-panel > h2:first-child { margin-top: 0; }
.status-aktionen { padding-top: 8px; border-top: 1px solid var(--line); }
.naechster-schritt { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 5; margin: 4px -4px 0;
  padding: 10px; background: rgba(244, 242, 238, .96); border-radius: 16px; box-shadow: 0 -4px 18px rgba(0, 0, 0, .08); display: flex; gap: 8px; }
.naechster-schritt .btn, .naechster-schritt form { flex: 1 1 0; width: 100%; }
.naechster-schritt form .btn { width: 100%; }
@media (min-width: 800px) { .naechster-schritt { bottom: 16px; } }
.naechster-schritt[hidden] { display: none; }
.zwei-spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.haken { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; cursor: pointer; }
.haken input[type="checkbox"] { width: 22px; height: 22px; flex: 0 0 22px; margin: 1px 0 0; accent-color: var(--green); }
.preis { margin: 0; font-size: 15px; } .preis strong { font-size: 24px; }
.notice.gruen-hinweis { background: #DDF1F2; color: #0F5C66; }
.abo-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }

/* Urheberhinweis */
.app-footer { order: 2; width: 100%; max-width: 720px; margin: 0 auto; padding: 4px 20px 16px; font-size: 11px; color: var(--muted); text-align: center; }
@media print { .app-footer { display: none; } }


/* Hilfe-Knopf und Hilfe-Fenster (ab 0.35) */
.topbar .brand { margin-right: auto; }
.hilfe-knopf { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 12px;
  border-radius: 999px; border: 1px solid #5E8A91; background: transparent; color: #FFFFFF; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.hilfe-knopf:hover { border-color: var(--orange); color: var(--orange); }
.hilfe-knopf:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.hilfe-knopf.schwebend { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 16px; }
.auth { position: relative; }
@media (max-width: 420px) { .topbar .hilfe-wort { display: none; } .topbar .hilfe-knopf { padding: 0; } }
.hilfe-fenster { width: min(520px, calc(100% - 24px)); max-height: calc(100% - 48px); border: 0; border-radius: 18px; padding: 20px;
  background: var(--card); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.hilfe-fenster[open] { display: flex; flex-direction: column; gap: 12px; }
.hilfe-fenster::backdrop { background: rgba(10,20,15,.55); }
.hilfe-fenster h2 { margin: 0; font-size: 22px; }
.hilfe-fenster p { margin: 0; color: var(--muted); }
.hilfe-kopf { display: flex; align-items: center; justify-content: space-between; }
.hilfe-marke { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding-left: 10px; border-left: 3px solid var(--orange); }
.hilfe-zu { width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--ground); color: var(--ink); font-size: 18px; cursor: pointer; }
.hilfe-schritte { margin: 0; padding-left: 0; list-style: none; counter-reset: schritt; display: flex; flex-direction: column; gap: 10px; }
.hilfe-schritte li { counter-increment: schritt; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.hilfe-schritte li::before { content: counter(schritt); width: 28px; height: 28px; border-radius: 999px; background: var(--orange); color: var(--ink);
  font-weight: 800; font-size: 14px; display: grid; place-items: center; }
@media (max-width: 600px) {
  .hilfe-fenster { margin: auto auto 0; width: 100%; max-width: 100%; border-radius: 18px 18px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
/* Hilfe: Schritte erscheinen nacheinander; beim Vorlesen ist hervorgehoben, was gerade dran ist. */
.hilfe-vorlesen { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-left: auto; margin-right: 8px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper, #fff); color: var(--ink); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.hilfe-vorlesen:hover, .hilfe-vorlesen[aria-pressed="true"] { border-color: var(--orange); }
.hilfe-vorlesen[aria-pressed="true"] { background: var(--orange); }
.hilfe-fenster [data-hilfe-teil] { border-radius: 8px; transition: background-color .25s, box-shadow .25s; }
.hilfe-fenster [data-hilfe-teil].spricht { background: rgba(255, 138, 0, .16); box-shadow: 0 0 0 6px rgba(255, 138, 0, .16); color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .hilfe-fenster[open] .hilfe-schritte li { animation: hilfe-schritt .35s ease-out both; animation-delay: calc(var(--nr, 1) * .12s); }
  @keyframes hilfe-schritt { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media print { .hilfe-knopf { display: none !important; } }
@media (max-width: 420px) { .topbar { gap: 8px; } .brand img { width: 132px; } }


/* Nachrichten (ab 0.37) */
.zaehler.rot { background: #E5322D; color: #FFFFFF; }
.nachricht-zeile { display: flex; align-items: center; gap: 12px; }
.nachricht-zeile.ungelesen { border-color: #E5322D; }
.nachricht-zeile.ungelesen .nachricht-text { color: var(--ink); font-weight: 600; }
.nachricht-mitte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nachricht-oben { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.nachricht-text { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) { .nav { padding-left: 2px; padding-right: 2px; } .nav a { font-size: 10.5px; letter-spacing: -.01em; } }
@media (max-width: 420px) { .ansicht-wort { display: none; } }

/* Partner-Chat (ab 0.40) */
.avatar.partner-chat { background: var(--green); color: #FFFFFF; }
.avatar.partner-chat svg { width: 22px; height: 22px; }
.pill.klein { font-size: 11px; padding: 1px 8px; vertical-align: 1px; }
.notice.mitlesen { border-left: 4px solid var(--orange); }

/* Problem melden & Ideen (ab 0.41) */
.meldung-bild { display: block; max-width: 100%; max-height: 420px; border-radius: 12px; border: 1px solid var(--line); }
.card.antwort { border-left: 4px solid var(--orange); }
.lead-dunkel { margin: 0; font-size: 16px; color: var(--muted); }

/* Menüleiste immer über Inhalten (ab 0.43) */
.nav { z-index: 20; }
.topbar { position: relative; z-index: 21; }

/* Netzwerk im Überblick (ab 0.44) */
.punkt-aktiv { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px #CDEFEB; margin-right: 8px; vertical-align: middle; }
.avatar-wrap { position: relative; flex: none; display: inline-flex; }
.punkt-aktiv.auf-avatar { position: absolute; right: -2px; bottom: -2px; margin: 0; border: 2px solid #FFFFFF; box-shadow: none; width: 14px; height: 14px; }
.aktiv-text { color: #0E6E68; }
.kachel-pro { border-color: var(--orange); }

/* NFC-Visitenkarte */
.vk-karte { display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: 16px; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-top: 6px solid var(--orange); text-align: left; }
.vk-kopf { display: flex; flex-direction: column; gap: 2px; }
.vk-name { font-size: 24px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.vk-position { font-size: 15px; font-weight: 600; }
.vk-firma { font-size: 15px; color: var(--muted); }
.vk-zeilen { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.vk-zeilen > * { display: flex; align-items: baseline; gap: 12px; min-height: 44px; padding: 10px 0; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.vk-zeilen > *:last-child { border-bottom: 0; padding-bottom: 0; }
.vk-zeilen > span { font-weight: 400; }
.vk-art { flex: 0 0 68px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.vk-seite { justify-content: flex-start; padding-top: 40px; }
.vk-seite .legal-links { text-align: center; }
.vk-schritte { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.vk-zwei { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vk-zwei.plz { grid-template-columns: 110px minmax(0, 1fr); }
@media (max-width: 380px) { .vk-zwei:not(.plz) { grid-template-columns: minmax(0, 1fr); } }
.vk-status { font-weight: 600; }
#nfc-box .btn:disabled { opacity: .5; cursor: default; }

/* Ratgeber „Selbstständig bleiben“ */
.ratgeber p { margin: 0; }
.ratgeber h3 { margin: 6px 0 0; font-size: 15px; }
.ratgeber h3.dafuer { color: #0F5C66; }
.ratgeber h3.dagegen { color: #7A1608; }
.kreuz-liste { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.kreuz-liste li { padding-left: 26px; position: relative; }
.kreuz-liste li::before { content: "✕"; position: absolute; left: 4px; color: #A8200D; font-weight: 800; }
.ratgeber-schritte { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 10px; }
.ratgeber-links { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.ratgeber-links a { color: var(--ink); font-weight: 600; }
.notice.ratgeber-hinweis { font-weight: 400; }

/* Baustein EÜR & Umsatzsteuer: Tabellen mit Geldbeträgen */
table.werte.betraege td { white-space: nowrap; vertical-align: top; }
table.werte.betraege th[scope="row"] { font-weight: 400; }
table.werte.betraege tr:last-child th, table.werte.betraege tr:last-child td { border-bottom: 0; }

/* ====================================================================================================
   Gestaltung ab Version 1.22: einheitliche Rundungen, Abstände, Schatten und Übergänge.
   Die Farben bleiben, wie sie sind (Variablen oben und /mandant.css). Hier steht nur Form, keine Farbe.
   ==================================================================================================== */
:root {
  --r-karte: 16px;      /* Karten, Listenzeilen, Hinweise */
  --r-feld: 12px;       /* Schaltflächen und Eingabefelder */
  --schatten: 0 1px 2px rgba(20, 20, 20, .04), 0 6px 20px -8px rgba(20, 20, 20, .10);
  --schatten-hoch: 0 2px 4px rgba(20, 20, 20, .05), 0 12px 28px -10px rgba(20, 20, 20, .18);
  --tempo: .16s;
}
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin-top: 10px; }
.card h2:first-child, form.card > h2:first-child { margin-top: 0; }
p { text-wrap: pretty; }
.page { gap: 18px; padding: 22px 20px 28px; }
.muted.small, .small { line-height: 1.45; }

/* Karten und Listenzeilen: gleiche Rundung, feiner Schatten statt harter Kante */
.card, .aufgabe, .liste-karte, .pro-hinweis { border-radius: var(--r-karte); box-shadow: var(--schatten); }
.card { padding: 18px; }
.kachel, .tile { padding: 14px 16px; }
.aufgabe { min-height: 64px; padding: 12px 16px; }
.notice, .heute-einsatz { border-radius: var(--r-karte); }
.notice { padding: 14px 16px; line-height: 1.4; }
a.card, a.aufgabe, a.notice, a.pro-hinweis, .zeile, .chip, .btn, .nav a, .hilfe-knopf, button.role {
  transition: transform var(--tempo) ease, box-shadow var(--tempo) ease, border-color var(--tempo) ease,
              background-color var(--tempo) ease, opacity var(--tempo) ease;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  a.card:hover, a.aufgabe:hover { box-shadow: var(--schatten-hoch); transform: translateY(-1px); border-color: #BDB8AF; }
  .btn:hover { filter: brightness(.97); }
  .chip:hover { border-color: var(--ink); }
}
a.card:active, a.aufgabe:active, .btn:active, .chip:active { transform: scale(.985); }

/* Zeilen mit Symbol und Pfeil: bleiben auf einer Zeile, der Text bricht um, nicht der Pfeil */
a.card.row { flex-wrap: nowrap; align-items: center; gap: 14px; }
a.card.row > .row-icon { flex: 1 1 auto; min-width: 0; gap: 14px; }
a.card.row > .row-icon > svg { flex: 0 0 auto; }
a.card.row > span[aria-hidden="true"] { flex: 0 0 auto; color: var(--muted); font-size: 20px; line-height: 1; }
.geld-icon { border-radius: 12px; width: 42px; height: 42px; flex-basis: 42px; }

/* Schaltflächen */
.btn { min-height: 50px; padding: 0 20px; border-radius: var(--r-feld); letter-spacing: -.005em; }
.btn.small { min-height: 44px; padding: 0 16px; border-radius: 11px; }
.btn.primary, .btn.dark { box-shadow: 0 1px 2px rgba(20, 20, 20, .10), 0 6px 14px -8px rgba(20, 20, 20, .35); }
.btn.outline { border-width: 1.5px; }

/* Eingabefelder */
input, select, textarea { border-radius: var(--r-feld); transition: border-color var(--tempo) ease, box-shadow var(--tempo) ease; }
input, select { height: 50px; padding: 0 14px; }
textarea { padding: 12px 14px; }
input[type="checkbox"], input[type="radio"] { height: 22px; border-radius: 6px; }
input[type="file"] { height: auto; }
input:hover, select:hover, textarea:hover { border-color: var(--ink); }
body.dark input:hover { border-color: #FFFFFF; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field { gap: 7px; }
.field label, label { letter-spacing: .005em; }
::placeholder { color: var(--muted); opacity: .75; }

/* Auswahl-Chips und Marken */
.chip, .auswahl-chip span { min-height: 40px; padding: 0 16px; }
.chips { gap: 8px; }
.pill { padding: 4px 11px; letter-spacing: .01em; }
.num { letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pill, table.werte td { font-variant-numeric: tabular-nums; }
.back { color: var(--muted); font-size: 15px; margin-bottom: -6px; }
.back:hover { color: var(--ink); }

/* Tabellen: ruhige Kopfzeile */
table.werte thead th { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
table.werte th, table.werte td { padding: 9px 8px; }
table.werte th:first-child, table.werte td:first-child { padding-left: 0; }
table.werte th:last-child, table.werte td:last-child { padding-right: 0; }

/* Menüleiste: der aktive Punkt bekommt eine Marke */
.nav { box-shadow: 0 -1px 0 var(--green-line); padding-top: 4px; }
.nav a { border-radius: 12px; }
.nav a[aria-current="page"]::before {
  content: ""; position: absolute; top: -4px; left: 50%; width: 28px; height: 3px; margin-left: -14px;
  border-radius: 0 0 3px 3px; background: var(--orange);
}
@media (hover: hover) { .nav a:hover { color: #FFFFFF; } .nav a[aria-current="page"]:hover { color: var(--orange); } }
@media (min-width: 800px) {
  .nav { box-shadow: none; padding-top: 0; }
  .nav a { min-height: 48px; border-radius: 0; }
  .nav a[aria-current="page"]::before { top: auto; bottom: 0; left: 18px; right: 18px; width: auto; margin-left: 0; border-radius: 3px 3px 0 0; }
}
.topbar { box-shadow: 0 1px 0 var(--green-line); }
.role, button.role { letter-spacing: .01em; }
.app-footer { padding-top: 8px; opacity: .85; }

/* Anmeldeseiten */
.auth { gap: 18px; }

@media (prefers-reduced-motion: reduce) {
  a.card, a.aufgabe, a.notice, .zeile, .chip, .btn, .nav a, input, select, textarea { transition: none; }
  a.card:hover, a.aufgabe:hover, a.card:active, a.aufgabe:active, .btn:active, .chip:active { transform: none; }
}
@media print { .card, .aufgabe, .liste-karte { box-shadow: none; } }

/* ====================================================================================================
   Gestaltung ab Version 1.23: kräftiger grüner Kopf mit runder Kante, farbige Kacheln, gefüllte Felder,
   gruppierte Listen, schwebende Menüleiste mit oranger Marke. Farben unverändert (Variablen oben, /mandant.css).
   ==================================================================================================== */
body { overflow-x: clip; }
.topbar { box-shadow: none; }
/* Kopf: Zurück-Link und Seitentitel stehen groß auf Grün, unten rund. Meldungen rücken darunter (order). */
.page > .back, .page > h1, .page > div:has(h1) {
  background: var(--green); color: #FFFFFF; margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; align-self: stretch;
}
.page > .back { order: -3; margin-top: -22px; margin-bottom: -18px; padding-top: 12px; color: #C9D6CF; min-height: 46px; }
.page > .back:hover { color: #FFFFFF; }
.page > h1, .page > div:has(h1) { order: -2; margin-top: -22px; padding-top: 18px; padding-bottom: 28px; border-radius: 0 0 28px 28px; }
.page > .back ~ h1, .page > .back ~ div:has(h1) { margin-top: 0; padding-top: 4px; }
.page > h1, .page > div:has(h1) h1 { font-size: clamp(26px, 7.6vw, 32px); letter-spacing: -.03em; color: #FFFFFF; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.page > h1::after, .page > div:has(h1) h1::after {
  content: ""; display: block; width: 44px; height: 5px; margin-top: 12px; border-radius: 999px; background: var(--orange);
}
.page > div:has(h1) .muted, .page > div:has(h1) > span, .page > div:has(h1) .stack-klein > span { color: #C9D6CF; }
.page > div:has(h1) > strong { color: #FFFFFF; }
.page > div:has(h1) .btn.outline { background: transparent; color: #FFFFFF; box-shadow: 0 0 0 1px #5B7569; }
@media (min-width: 760px) {
  .page > .back, .page > h1, .page > div:has(h1) { box-shadow: 0 0 0 100vmax var(--green); clip-path: inset(0 -100vmax); border-radius: 0; }
}
.page > h2 { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
/* Karten */
.card, .liste-karte { border-color: transparent; border-radius: 24px; box-shadow: 0 1px 2px rgba(20,20,20,.05), 0 16px 36px -18px rgba(20,20,20,.22); padding: 20px; }
.kachel, .tile { padding: 16px 18px; border-radius: 22px; }
.kacheln > .kachel:first-child, .tiles > .tile:first-child, .kacheln-3 > .kachel:first-child { background: var(--green); color: #FFFFFF; }
.kacheln > .kachel:first-child span, .tiles > .tile:first-child span, .kacheln-3 > .kachel:first-child span { color: #FFFFFF; }
.kachel:has(.num.warn) { background: #FFE9CF; }
.num.klein { font-size: 24px; }
/* Listen als Gruppe, Symbole kräftig */
.aufgaben { gap: 0; background: var(--card); border-radius: 24px; box-shadow: 0 1px 2px rgba(20,20,20,.05), 0 16px 36px -18px rgba(20,20,20,.22); overflow: hidden; }
.aufgaben .aufgabe { border: 0; border-radius: 0; box-shadow: none; min-height: 70px; padding: 14px 18px; }
.aufgaben li + li .aufgabe { border-top: 1px solid var(--line); }
.aufgaben .aufgabe:hover { transform: none; background: #FAF9F6; }
.geld-icon { background: var(--orange); color: var(--ink); border-radius: 15px; width: 46px; height: 46px; flex-basis: 46px; }
.aufgabe.gesperrt .geld-icon { background: #E8E6E0; color: var(--muted); }
/* Schaltflächen und Felder */
.btn { border-radius: 999px; min-height: 54px; font-size: 17px; }
.btn.small { font-size: 14px; min-height: 44px; }
.btn.primary { box-shadow: 0 2px 4px rgba(20,20,20,.10), 0 12px 22px -10px rgba(20,20,20,.40); }
.btn.outline { border-color: transparent; background: #FFFFFF; box-shadow: 0 1px 2px rgba(20,20,20,.10), 0 0 0 1px var(--line); }
.card .btn.outline { background: var(--ground); box-shadow: 0 0 0 1px var(--line); }
/* Eingabefelder: in Karten gefüllt und ohne Rahmen, frei auf der Seite weiß */
body:not(.dark) input:not([type="checkbox"]):not([type="radio"]), body:not(.dark) select, body:not(.dark) textarea {
  border-radius: 16px; border-color: transparent; background-color: #FFFFFF; box-shadow: 0 0 0 1px var(--line);
}
body:not(.dark) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), body:not(.dark) select { height: 54px; }
body:not(.dark) .card input:not([type="checkbox"]):not([type="radio"]), body:not(.dark) .card select, body:not(.dark) .card textarea,
body:not(.dark) dialog input:not([type="checkbox"]):not([type="radio"]), body:not(.dark) dialog textarea { background-color: var(--ground); box-shadow: none; }
body:not(.dark) input:hover, body:not(.dark) select:hover, body:not(.dark) textarea:hover { border-color: var(--field-line); }
.chip { border-color: transparent; box-shadow: 0 1px 2px rgba(20,20,20,.10); }
.chip[aria-current="true"] { background: var(--green); border-color: var(--green); }
.notice:not(.error):not(.gruen-hinweis) { background: var(--green); border-left: 5px solid var(--orange); border-radius: 20px; }
.notice { border-radius: 20px; }
.pill { padding: 5px 12px; }
/* Menüleiste: schwebt, aktiver Punkt orange */
@media (max-width: 799px) {
  .nav { margin: 0 12px calc(10px + env(safe-area-inset-bottom)); padding: 6px; border-radius: 26px; bottom: calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 14px 34px -8px rgba(20,20,20,.50); gap: 2px; }
  .nav a { min-height: 54px; border-radius: 20px; }
  .nav a[aria-current="page"]::before { display: none; }
  .nav a[aria-current="page"] { background: var(--orange); color: var(--ink); }
  .nav a[aria-current="page"] .zaehler { box-shadow: 0 0 0 2px var(--orange); }
}
/* Ab 1.43.1: Auf dem Handy fest am unteren Rand statt „sticky“. In der Web-App vom Home-Bildschirm (iPhone) rutschte die
   klebende Leiste nach Tastatur, Drehen oder Rückkehr aus dem Hintergrund manchmal aus dem Bild und kam erst nach Neuladen wieder.
   Platz für die Leiste hält die Fußzeile frei, damit nichts dahinter verschwindet. */
@media (max-width: 799px) {
  .nav { position: fixed; left: 0; right: 0; bottom: calc(10px + env(safe-area-inset-bottom)); margin: 0 12px; }
  .nav ~ .app-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
.page > div:has(h1) .avatar { background: #FFFFFF; color: var(--green); }
/* Buchung splitten */
fieldset.split-zeile { margin: 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
fieldset.split-zeile legend { padding: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.split-paar { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; }
.split-paar .field { min-width: 0; }
table.werte.betraege th a { font-weight: 400; text-decoration: none; }
table.werte.betraege th a:hover { text-decoration: underline; }
/* Prüfliste im Jahresabschluss: offene Punkte mit Ausrufezeichen statt Haken */
.pruefliste li.fehlt::before { content: "!"; color: #A85A00; }
.pruefliste a { color: var(--ink); font-weight: 600; }
/* Kennzeichnung Betaversion */
.pill.beta { background: var(--ink); color: #FFFFFF; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; }
.page .notice.beta-hinweis { background: #FFE9CF !important; color: #0A2E33 !important; border-left: 0; font-weight: 400; box-shadow: none; }
.notice.beta-hinweis .pill { margin-right: 6px; vertical-align: 1px; }
.page > div:has(h1) .pill.beta, .geld-zeile .pill.beta { vertical-align: 2px; }
/* Hilfe-Fenster im Stil der Seiten: grüner Kopf mit Titel und orangem Strich, Schritte als Liste in einer Karte */
.hilfe-fenster { padding: 0; gap: 0; border-radius: 26px; background: var(--ground); overflow: hidden auto; }
.hilfe-fenster[open] { gap: 0; }
/* Passt die Hilfe nicht ganz auf den Bildschirm, wird das Fenster gescrollt; kein Teil darf dafür zusammengedrückt werden (sonst verschwinden die Schritte). */
.hilfe-fenster[open] > * { flex-shrink: 0; }
.hilfe-kopf { background: var(--green); color: #FFFFFF; padding: 14px 16px 6px 20px; }
.hilfe-marke { border-left: 0; padding-left: 0; color: #D3E7EA; }
.hilfe-zu { background: rgba(255,255,255,.12); color: #FFFFFF; }
.hilfe-vorlesen { background: rgba(255,255,255,.12); border-color: transparent; color: #FFFFFF; border-radius: 999px; }
.hilfe-vorlesen[aria-pressed="true"] { color: var(--ink); }
.hilfe-fenster h2 { background: var(--green); color: #FFFFFF; margin: 0; padding: 4px 20px 24px; border-radius: 0 0 26px 26px; font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.12; }
.hilfe-fenster h2::after { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--orange); margin-top: 12px; }
.hilfe-fenster h2[data-hilfe-teil] { border-radius: 0 0 26px 26px; }
.hilfe-fenster > .btn.outline { border-radius: 999px; min-height: 48px; }
.hilfe-fenster h2[data-hilfe-teil].spricht { background: var(--green); box-shadow: none; color: var(--orange); }
.hilfe-fenster > p { margin: 18px 20px 0; }
.hilfe-schritte { margin: 16px 20px 0; background: var(--card); border-radius: 20px; box-shadow: var(--schatten); gap: 0; overflow: hidden; }
.hilfe-schritte li { padding: 13px 14px; border-bottom: 1px solid #EEECE7; grid-template-columns: 30px 1fr; gap: 12px; align-items: center; }
.hilfe-schritte li:last-child { border-bottom: 0; }
.hilfe-schritte li::before { width: 30px; height: 30px; border-radius: 10px; }
.hilfe-fenster [data-hilfe-teil].spricht { box-shadow: none; }
.hilfe-fenster li[data-hilfe-teil] { border-radius: 0; }
.hilfe-fenster > .btn { margin: 10px 20px 0; width: auto; }
.hilfe-fenster > .hilfe-schritte + .btn, .hilfe-fenster > p + .btn { margin-top: 18px; }
.hilfe-fenster > .btn:last-child { margin-bottom: 20px; }
@media (max-width: 640px) {
  .hilfe-fenster { border-radius: 26px 26px 0 0; }
  .hilfe-fenster > .btn:last-child { margin-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* Seite „Mehr“: Überschriften der Gruppen */
.mehr-gruppe { margin: 14px 0 -2px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Sprachwahl auf der Anmeldeseite */
.sprachwahl { display: flex; gap: 8px; justify-content: center; }
.sprachwahl button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.45); background: transparent; color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.sprachwahl button[aria-current="true"] { background: #FFFFFF; color: #141414; border-color: #FFFFFF; font-weight: 700; }


/* ---------- Startbild: Logo beim Öffnen der App (einmal je Sitzung, siehe base.html) ---------- */
.startbild { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 24px; background: var(--green); color: #FFFFFF; text-align: center; cursor: pointer;
  animation: startbild-weg 8s ease forwards; }
.gestartet .startbild, .startbild.weg { display: none; }
.startbild-logo { position: relative; display: block; width: min(78vw, 400px); overflow: hidden; margin-bottom: 14px;
  animation: startbild-logo .9s cubic-bezier(.2, .9, .25, 1.15) both; }
.startbild-logo img { display: block; width: 100%; height: auto; }
/* Lichtstreifen, der einmal über das Logo läuft; die Maske (im style-Attribut: das Logo selbst) begrenzt ihn auf die Logoform */
.startbild-glanz { position: absolute; inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  background: linear-gradient(100deg, transparent 38%, rgba(255, 190, 110, .95) 50%, transparent 62%) no-repeat; background-size: 250% 100%;
  animation: startbild-glanz 1.1s ease-out .8s both; }
.startbild-titel { margin: 0; font-size: clamp(22px, 5.5vw, 30px); font-weight: 800; letter-spacing: -.02em;
  animation: startbild-hoch .6s ease-out .55s both; }
.startbild-text { margin: 0; font-size: clamp(15px, 4vw, 18px); color: var(--orange); font-weight: 600;
  animation: startbild-hoch .6s ease-out .85s both; }
.startbild-balken { display: block; width: 120px; height: 3px; margin-top: 22px; border-radius: 3px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.startbild-balken span { display: block; height: 100%; background: var(--orange); transform-origin: left; animation: startbild-balken 7.2s linear .2s both; }
@keyframes startbild-weg { 0%, 94% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
@keyframes startbild-logo { from { opacity: 0; transform: scale(.72); } to { opacity: 1; transform: scale(1); } }
@keyframes startbild-glanz { from { background-position: 170% 0; } to { background-position: -70% 0; } }
@keyframes startbild-hoch { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes startbild-balken { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .startbild-logo, .startbild-titel, .startbild-text, .startbild-balken span { animation: none; }
  .startbild-glanz { display: none; }
}

/* ---------- Hilfetext, wenn der Mauszeiger zwei Sekunden auf einem Knopf oder Feld ruht (tipps.js) ---------- */
.tipp { position: absolute; z-index: 150; max-width: 280px; padding: 9px 12px; border-radius: 10px; background: var(--ink); color: #FFFFFF;
  font-size: 13px; font-weight: 500; line-height: 1.4; box-shadow: var(--schatten-hoch); pointer-events: none; opacity: 0; transform: translateY(4px);
  transition: opacity .15s, transform .15s; }
.tipp.da { opacity: 1; transform: none; }
.tipp::before { content: ""; position: absolute; left: var(--pfeil, 20px); width: 10px; height: 10px; background: var(--ink); transform: rotate(45deg); top: -4px; }
.tipp.oben::before { top: auto; bottom: -4px; }
@media print { .startbild, .tipp { display: none !important; } }

/* Pro-Los (1.37.0): zehn verdeckte Lose, eins antippen; danach werden alle aufgedeckt. */
.lose { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 4px 0 16px; }
.los { aspect-ratio: 3 / 4; min-height: 64px; border-radius: var(--r-karte); border: 2px solid var(--ink); background: var(--orange); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; padding: 0; cursor: pointer;
  transition: transform .15s ease-out; }
button.los:hover, button.los:focus-visible { transform: translateY(-4px) rotate(-3deg); }
.los-zeichen { font-size: 30px; font-weight: 800; line-height: 1; }
.los-nr { font-size: 12px; font-weight: 700; }
.lose.aufgedeckt .los { cursor: default; animation: los-auf .45s ease-out .7s both; }
.lose.aufgedeckt .los.andere { background: #FFFFFF; border-color: var(--line); color: var(--muted); }
.lose.aufgedeckt .los.gezogen { background: var(--ink); border-color: var(--ink); color: var(--orange); animation: los-gezogen .8s cubic-bezier(.2, .9, .25, 1.2) both; }
.los-zahl { font-size: 28px; font-weight: 800; line-height: 1; }
.los-einheit { font-size: 11px; font-weight: 700; }
.nowrap { white-space: nowrap; }
.los-verteilung .nowrap + .nowrap::before { content: "· "; }
@keyframes los-auf { from { transform: rotateY(90deg); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes los-gezogen { 0% { transform: rotateY(90deg) scale(.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .lose .los { animation: none !important; transition: none; } }

/* Unterschriftenfeld (mit Finger, Stift oder Maus) */
.unterschrift-feld { display: block; width: 100%; height: auto; aspect-ratio: 600 / 220; border: 2px dashed #8A8A8A; border-radius: 10px; background: #FFFFFF; touch-action: none; }
/* Ab 1.43.2: Zurück-Schaltfläche in Unterseiten deutlich als Knopf erkennbar (umrandete Pille auf dem grünen Kopf).
   Der grüne Streifen dahinter kommt aus ::before, die Pille aus ::after, damit der Knopf nur so breit ist wie sein Text. */
.page > .back {
  position: relative; z-index: 0; align-self: flex-start; margin: -10px 0 -10px; padding: 8px 18px 8px 14px; min-height: 42px;
  background: none; box-shadow: none; clip-path: none; border-radius: 999px; gap: 6px;
  color: #FFFFFF; font-size: 15px; font-weight: 700; line-height: 1.2;
}
/* Der Streifen ist nur so breit wie der Knopf und reicht per Schatten bis an die Ränder: Ein Schatten macht die Seite nicht breiter
   (ein breites Element dagegen schon – dann rutscht auf dem Handy die Menüleiste aus dem Bild). */
.page > .back::before { content: ""; position: absolute; z-index: -2; left: 0; right: 0; top: -12px; bottom: -9px; background: var(--green);
  box-shadow: 0 0 0 100vmax var(--green); clip-path: inset(0 -100vmax); }
.page > .back::after { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); transition: background .15s; }
.page > .back:hover, .page > .back:focus-visible { color: #FFFFFF; }
.page > .back:hover::after, .page > .back:active::after { background: rgba(255, 255, 255, .26); }
.page > .back:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
@media (min-width: 760px) { .page > .back { box-shadow: none; clip-path: none; border-radius: 999px; } }
/* Ab 1.43.3: Dateiansicht in der App vom Home-Bildschirm (core/static/core/dateien.js) */
html.datei-offen, html.datei-offen body { overflow: hidden; }
.datei-ansicht { position: fixed; inset: 0; z-index: 250; display: flex; flex-direction: column; background: var(--ground); }
.datei-kopf { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 12px; background: var(--green); color: #FFFFFF; }
.datei-zurueck { flex-shrink: 0; min-height: 42px; padding: 8px 18px 8px 14px; border: 0; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 700;
  color: #FFFFFF; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); cursor: pointer; }
.datei-zurueck:active, .datei-zurueck:hover { background: rgba(255, 255, 255, .26); }
.datei-zurueck:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.datei-titel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.datei-inhalt { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.datei-seite { display: block; width: 100%; max-width: 900px; height: auto; background: #FFFFFF; border-radius: 6px; box-shadow: 0 2px 10px rgba(20, 20, 20, .18); }
.datei-text { width: 100%; max-width: 900px; margin: 0; padding: 14px; background: #FFFFFF; border-radius: 12px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.datei-hinweis { max-width: 520px; text-align: center; color: var(--muted); }
.datei-knoepfe { display: flex; gap: 10px; justify-content: center; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: var(--card, #FFFFFF); box-shadow: 0 -1px 0 var(--line); }
.datei-knoepfe:empty { display: none; }
.datei-knoepfe .btn { flex: 1 1 0; max-width: 260px; }
/* Ab 1.45.0: Partnerprofil in der Ansicht der Verwaltung (core/_geschuetzt.html) */
.wasserzeichen { position: fixed; inset: 0; z-index: 15; pointer-events: none; background-repeat: repeat; }
body.geschuetzt .page, body.geschuetzt .topbar { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.geschuetzt .page img { -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; }
body.geschuetzt .page input, body.geschuetzt .page textarea, body.geschuetzt .page select { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.druck-gesperrt { display: none; }
.geschuetzt-hinweis { order: 99; text-align: center; }
@media print {
  body.geschuetzt > *:not(main), body.geschuetzt main > *:not(.druck-gesperrt) { display: none !important; }
  body.geschuetzt .druck-gesperrt { display: block !important; font-size: 18px; padding: 40px; }
}
.datei-ansicht.geschuetzt .datei-inhalt { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.datei-ansicht.geschuetzt img { -webkit-user-drag: none; -webkit-touch-callout: none; }
@media print { .datei-ansicht.geschuetzt { display: none !important; } }
/* Ab 1.45.0: Umfrage */
.umfrage-frage { border: 0; margin: 0; }
.umfrage-frage legend { float: left; width: 100%; padding: 0 0 6px; line-height: 1.35; }
.umfrage-frage legend + * { clear: both; }
.umfrage-wahl { display: flex; flex-direction: column; gap: 8px; }
.umfrage-wahl label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border-radius: 14px; background: var(--ground); cursor: pointer; font-weight: 600; }
.umfrage-wahl input { width: 20px; height: 20px; accent-color: var(--green); flex-shrink: 0; }
.umfrage-wahl label:has(input:checked) { background: var(--green); color: #FFFFFF; }
.umfrage-zeile { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.umfrage-balken { display: block; height: 10px; border-radius: 999px; background: #E8E6E0; overflow: hidden; }
.umfrage-balken > span { display: block; height: 100%; border-radius: 999px; background: var(--orange); }
.umfrage-balken.gross { height: 14px; }
/* Ab 1.48.0: Stunden – Ansichten, Stempeluhr, Auswertung */
.zeit-kopf { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 8px; text-align: center; }
.zeit-kopf a.pfeil { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: var(--card); color: var(--ink); font-size: 26px; font-weight: 700; text-decoration: none; box-shadow: 0 1px 2px rgba(20,20,20,.10); }
.zeit-kopf a.pfeil[aria-disabled="true"] { visibility: hidden; }
.zeit-kopf strong { display: block; font-size: 17px; }
.zeit-kopf .zeit-summe { display: block; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tag-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 18px 2px 6px; font-size: 14px; }
.tag-kopf strong { font-size: 15px; }
.tag-kopf .pill { margin-left: 6px; }
.stempel-anzeige { text-align: center; font-variant-numeric: tabular-nums; }
.stempel-anzeige .stempel-zeit { display: block; font-size: 54px; font-weight: 800; letter-spacing: .02em; line-height: 1.1; color: #FFFFFF; }
.stempel-anzeige .stempel-pause { display: block; font-size: 20px; font-weight: 700; color: #FFB866; }
.stempel-knoepfe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stempel-knoepfe .btn { min-height: 64px; font-size: 18px; }
.btn.stempel-start { min-height: 72px; font-size: 20px; width: 100%; }
.auswertung-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; font-size: 14px; }
.auswertung-zeile .umfrage-balken { grid-column: 1 / -1; }
.schlagwort { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #EEEBE4; font-size: 12px; font-weight: 600; margin-right: 4px; }
.einstellung-gruppe { border: 0; margin: 0; padding: 0; }
.einstellung-gruppe legend { font-weight: 800; font-size: 17px; padding: 0 0 6px; }
.text-rot { color: #B3261E; }

/* Hinweis „Aufbauphase“ beim Start (1.50.0) */
.aufbauphase-fenster form { margin: 4px 0 0; }
.aufbauphase-fenster .btn.block { width: 100%; }

/* Hinweis „Neue Version verfügbar“ (1.50.0) */
.neue-version { position: fixed; z-index: 240; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom));
  max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--ink); color: #FFFFFF; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.neue-version[hidden] { display: none; }
.neue-version > span { flex: 1; line-height: 1.35; }
.neue-version-text { font-size: 14px; opacity: .85; }
.neue-version .btn { flex: none; background: var(--orange); color: #FFFFFF; }
@media print { .neue-version { display: none; } }
.datenauskunft-code { font-size: 40px; font-weight: 700; letter-spacing: .12em; text-align: center; font-variant-numeric: tabular-nums; margin: 4px 0; user-select: all; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .45em; }
.datenauskunft-code.lang { font-size: 30px; }


/* =====================================================================================================
   Version 2.0 – Wegweiser, Menü, Bereiche, Pfadanzeige, Infotreff. Farben und Logo bleiben wie bisher.
   ===================================================================================================== */
.topbar-knoepfe { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.wegweiser-knopf { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 14px;
  border-radius: 999px; border: 0; background: var(--orange); color: var(--ink); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
  box-shadow: 0 0 0 0 rgba(255,152,40,.55); animation: wegweiser-puls 2.6s ease-out 1.2s 2; }
.wegweiser-knopf svg { width: 20px; height: 20px; }
.wegweiser-knopf:hover { filter: brightness(1.06); }
.wegweiser-knopf:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; }
@keyframes wegweiser-puls { 0% { box-shadow: 0 0 0 0 rgba(255,152,40,.55); } 100% { box-shadow: 0 0 0 14px rgba(255,152,40,0); } }
@media (prefers-reduced-motion: reduce) { .wegweiser-knopf { animation: none; } }
@media (max-width: 420px) { .topbar .wegweiser-wort { display: none; } .topbar .wegweiser-knopf { padding: 0; } }
@media print { .wegweiser-knopf, .pfad { display: none !important; } }

/* Wegweiser-Fenster: auf dem Handy von unten, am Computer als Leiste rechts */
.wegweiser { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border: 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  padding-top: calc(18px + env(safe-area-inset-top)); background: var(--ground); color: var(--ink); overflow-y: auto; }
.wegweiser[open] { display: flex; flex-direction: column; gap: 14px; animation: wegweiser-auf .22s ease-out; }
.wegweiser::backdrop { background: rgba(10,20,15,.55); }
@keyframes wegweiser-auf { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 800px) {
  .wegweiser { width: 460px; margin: 0 0 0 auto; box-shadow: -24px 0 60px rgba(0,0,0,.30); }
  @keyframes wegweiser-auf { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { .wegweiser[open] { animation: none; } }
.wegweiser h2 { margin: 0; font-size: 24px; }
.wegweiser h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.wegweiser-kopf { display: flex; align-items: center; justify-content: space-between; }
.wegweiser-marke { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--green); }
.wegweiser-marke svg { color: var(--orange); }
.wegweiser-hier { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.hier-punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255,152,40,.25); flex: 0 0 auto; }
.wegweiser-fuss { justify-content: space-between; }
.wegweiser-tipp { margin: 0; }
@media (pointer: coarse) { .wegweiser-tipp { display: none; } }
kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: #FFF; font: inherit; font-weight: 700; }

/* Baum: Bereiche wie Ordner, Seiten wie Dateien, mit Verbindungslinien */
.baum, .baum ul { list-style: none; margin: 0; padding: 0; }
.baum { display: flex; flex-direction: column; gap: 6px; }
.baum-ordner { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-karte, 16px); overflow: hidden; }
.baum-ordner > summary { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 14px; cursor: pointer; list-style: none; font-weight: 700; }
.baum-ordner > summary::-webkit-details-marker { display: none; }
.baum-ordner > summary > svg { color: var(--green); flex: 0 0 auto; }
.baum-ordner[open] > summary { border-bottom: 1px solid var(--line); background: #FBFAF7; }
.baum-pfeil { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex: 0 0 auto; }
.baum-ordner[open] .baum-pfeil { transform: rotate(45deg); }
.baum-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.baum-text { font-size: 12.5px; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.baum-anzahl { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--ground); border-radius: 999px; padding: 2px 9px; }
.baum-ordner ul { position: relative; margin: 6px 0 8px 27px; padding: 0; }
.baum-ordner ul::before { content: ""; position: absolute; left: 0; top: 0; bottom: 26px; border-left: 2px solid var(--line); }
.baum-ordner li { position: relative; padding-left: 16px; }
.baum-ordner li::before { content: ""; position: absolute; left: 0; top: 26px; width: 12px; border-top: 2px solid var(--line); }
.baum-blatt { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 12px 4px 8px; margin-right: 8px; border-radius: 12px;
  color: var(--ink); text-decoration: none; font-weight: 600; }
.baum-blatt > svg { width: 19px; height: 19px; color: var(--muted); flex: 0 0 auto; }
.baum-blatt:hover, .baum-blatt:focus-visible { background: var(--ground); }
.baum-blatt.hier { background: #FFF1E0; box-shadow: inset 3px 0 0 var(--orange); }
.baum-blatt.hier > svg { color: var(--ink); }
.baum-blatt.wurzel { background: var(--card); border: 1px solid var(--line); margin: 0; min-height: 54px; padding: 0 14px; }
.baum-blatt.wurzel.hier { background: #FFF1E0; }
.baum-blatt.uebersicht { min-height: 40px; color: var(--muted); font-size: 14px; }
.hier-marke { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #8A4B00; white-space: nowrap; }

/* Pfadanzeige über jeder Seite: Menü › Bereich › Seite */
.pfad { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: -4px 0 -6px; font-size: 14px; color: var(--muted); }
.pfad a { color: var(--muted); font-weight: 600; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.pfad a:hover { color: var(--ink); text-decoration: underline; }
.pfad [aria-current] { color: var(--ink); font-weight: 700; }
.pfad-trenner { color: #A9A59C; }
.pfad + .back, .pfad ~ .notice + .back { margin-top: -6px; }

/* Menü */
.menue-suche { position: relative; display: flex; align-items: center; }
.menue-suche > svg { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.menue-suche input[type="search"] { width: 100%; min-height: 54px; padding-left: 46px; border-radius: 999px; font-size: 16px; }
.bereiche { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .bereiche { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bereich-karte { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-karte, 16px);
  box-shadow: var(--schatten, none); overflow: hidden; }
.bereich-kopf { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none; }
.bereich-kopf:hover .bereich-pfeil { transform: translateX(3px); }
.bereich-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bereich-name strong { font-size: 17px; }
.bereich-pfeil { font-size: 22px; color: var(--muted); transition: transform .15s; }
.bereich-symbol { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px;
  background: var(--green); color: var(--orange); }
.bereich-symbol.gross { width: 56px; height: 56px; flex-basis: 56px; border-radius: 18px; }
.bereich-ziele { list-style: none; margin: 0; padding: 0 16px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.ziel-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--ground);
  border: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.ziel-chip:hover, .ziel-chip:focus-visible { border-color: var(--orange); background: #FFF6EC; }
.ziel-chip.gesperrt { color: var(--muted); }
.ziel-chip .zaehler { margin-left: 0; }
.bereich-titel { display: flex; align-items: center; gap: 14px; }
.btn > svg { margin-right: 6px; vertical-align: -4px; }

/* Menüleiste: der aktive Punkt bekommt eine Markierung, damit man immer sieht, wo man ist */
.nav a { position: relative; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; top: 2px; left: 50%; width: 28px; height: 3px; margin-left: -14px; border-radius: 3px; background: var(--orange); }
@media (min-width: 800px) { .nav a[aria-current="page"]::after { top: auto; bottom: 0; width: 100%; left: 0; margin-left: 0; } }

/* Infotreff */
.treff-kopf { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 20px; border-radius: var(--r-karte, 16px);
  background: var(--green); color: #FFFFFF; }
.treff-kopf p { margin: 0; color: #D3E7EA; }
.treff-kopf h1 { color: #FFFFFF; }
.treff-marke { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); }
.treff-filter { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
.treff-filter .pill { text-decoration: none; white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center; }
.treff-beitrag { display: flex; flex-direction: column; gap: 8px; }
.treff-beitrag.angeheftet { border-color: var(--orange); box-shadow: inset 4px 0 0 var(--orange), var(--schatten, none); }
.treff-beitrag.ausgeblendet, .treff-detail.ausgeblendet { opacity: .65; border-style: dashed; }
.treff-zeile { display: flex; align-items: center; gap: 10px; }
.treff-titel { font-size: 18px; line-height: 1.3; }
.treff-vorschau { color: var(--muted); }
.treff-zahlen { margin-top: 2px; }
.treff-art.vertretung { background: #FFE9CF; color: #5A3200; }
.treff-art.frage { background: #E3ECF7; color: #183C66; }
.treff-art.tipp { background: #DDF1F2; color: #0F5C66; }
.treff-art.termin { background: #EFE5F5; color: #4B2366; }
.treff-text p { margin: 0 0 10px; }
.treff-bild { width: 100%; height: auto; border-radius: 12px; }
.treff-werkzeuge { gap: 14px; }
.treff-antwort { display: flex; flex-direction: column; gap: 6px; }
.treff-antwort p { margin: 0; }
.notice-karte.warn { border-color: #E5322D; box-shadow: inset 4px 0 0 #E5322D; }
.link-knopf { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.leer-karte { align-items: flex-start; }
.wegweiser-zuletzt ul { list-style: none; margin: 0; padding: 0; }
.wegweiser-zuletzt .pill { text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.wegweiser-hier + .wegweiser-zuletzt { margin-top: 4px; }
.wegweiser-inhalt { display: flex; flex-direction: column; gap: 14px; }

/* Allergene (2.0) */
.allergen-gitter { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .allergen-gitter { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.allergen-karte { padding: 0; overflow: hidden; }
.allergen-karte > summary, .allergen-pflicht > summary { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; cursor: pointer; list-style: none; }
.allergen-karte > summary::-webkit-details-marker, .allergen-pflicht > summary::-webkit-details-marker { display: none; }
.allergen-pflicht > summary { justify-content: space-between; min-height: 52px; padding: 0; }
.allergen-karte[open] .baum-pfeil, .allergen-pflicht[open] .baum-pfeil { transform: rotate(45deg); }
.allergen-buchstabe { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px;
  color: #FFFFFF; font-weight: 800; font-size: 19px; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.allergen-inhalt { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.allergen-inhalt > p { margin: 12px 0; }
.allergen-liste { margin: 0; display: grid; gap: 8px; }
.allergen-liste dt { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.allergen-liste dd { margin: 0 0 4px; }
.zusatzstoffe .datum-spalte { font-weight: 800; }
.muster-text { margin: 0; padding: 12px 14px; border-left: 4px solid var(--orange); background: var(--ground); border-radius: 8px; }

/* Eigene Vertragsvorlagen (Vertragswerkstatt, 2.0) */
.werkstatt-schritte { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; }
.werkstatt-schritte li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--line); font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--muted); }
.werkstatt-schritte li span { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ground); color: var(--ink); }
.werkstatt-schritte li.fertig span { background: var(--green); color: #FFFFFF; }
.werkstatt-schritte li.jetzt { border-color: var(--orange); color: var(--ink); }
.werkstatt-schritte li.jetzt span { background: var(--orange); }
.werkstatt-schritte.klein li { font-size: 12px; padding: 4px 10px 4px 4px; }
.werkstatt-vorlagen { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .werkstatt-vorlagen { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.werkstatt-vorlage { display: flex; flex-direction: column; gap: 6px; }
.werkstatt-vorlage:hover { border-color: var(--orange); }
.werkstatt-merkmale { color: var(--green); font-weight: 600; margin-top: auto; }
.werkstatt-blatt { font-family: Georgia, "Times New Roman", serif; line-height: 1.55; }
.werkstatt-blatt .blatt-titel { font-size: 22px; margin: 0 0 12px; }
.werkstatt-blatt h3 { font-size: 16px; margin: 16px 0 4px; font-family: system-ui, -apple-system, sans-serif; }
.werkstatt-blatt p { margin: 0 0 10px; }
.werkstatt-blatt .blatt-punkt { margin: 0 0 4px 8px; }
/* Kopf der Dokumente (2.0.3): Stil und Farbe wählbar, Vorschau wie im PDF */
.werkstatt-blatt .farbe-anthrazit, .kopf-punkt.farbe-anthrazit { --kopf: #2B2B2B; }
.werkstatt-blatt .farbe-blau, .kopf-punkt.farbe-blau { --kopf: #1F4E79; }
.werkstatt-blatt .farbe-gruen, .kopf-punkt.farbe-gruen { --kopf: #2E6B3F; }
.werkstatt-blatt .farbe-bordeaux, .kopf-punkt.farbe-bordeaux { --kopf: #7A1F2B; }
.werkstatt-blatt .farbe-orange, .kopf-punkt.farbe-orange { --kopf: #C8651B; }
.blatt-kopf { margin: 0 0 14px; font-family: system-ui, -apple-system, sans-serif; }
.blatt-kopf .blatt-titel { font-family: Georgia, "Times New Roman", serif; }
.blatt-kopf .blatt-firma { display: block; color: var(--kopf); font-size: 17px; }
.blatt-kopf .blatt-anschrift { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; }
.blatt-kopf .blatt-logo { max-width: 150px; max-height: 56px; object-fit: contain; }
.blatt-kopfzeile { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.blatt-kopfzeile .blatt-titel { margin: 0; }
.kopf-briefkopf .blatt-kopfzeile { padding-bottom: 10px; border-bottom: 2px solid var(--kopf); margin-bottom: 18px; }
.kopf-zentriert { text-align: center; }
.kopf-zentriert .blatt-logo { display: block; margin: 0 auto 6px; }
.kopf-zentriert .blatt-anschrift { padding-bottom: 10px; border-bottom: 1px solid var(--kopf); margin-bottom: 16px; }
.kopf-balken .blatt-balken { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 16px;
  background: var(--kopf); border-radius: 4px; }
.kopf-balken .blatt-balken .blatt-firma, .kopf-balken .blatt-balken .blatt-anschrift { color: #FFFFFF; }
.kopf-balken .blatt-balken .blatt-anschrift { text-align: right; }
.blatt-briefpapier { height: 72px; margin-bottom: 12px; border: 1px dashed var(--line); border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.werkstatt-kopfwahl summary { list-style: none; width: max-content; }
.werkstatt-kopfwahl summary::-webkit-details-marker { display: none; }
.werkstatt-kopfwahl details[open] summary { margin-bottom: 12px; }
.kopf-stile, .kopf-farben { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.kopf-stile legend, .kopf-farben legend { margin-bottom: 6px; }
.kopf-stil-wahl { display: grid; grid-template-columns: auto 64px 1fr; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.kopf-stil-wahl:has(input:checked) { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }
.kopf-stil-wahl input, .kopf-farbe-wahl input { width: 20px; height: 20px; margin: 0; }
.kopf-farben { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.kopf-farbe-wahl { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.kopf-farbe-wahl:has(input:checked) { border-color: var(--orange); }
.kopf-punkt { width: 18px; height: 18px; border-radius: 50%; background: var(--kopf); flex: 0 0 18px; }
/* Mini-Bild je Stil: drei Striche stehen für Firmenname, Anschrift und Titel */
.kopf-mini { position: relative; display: flex; flex-direction: column; gap: 4px; width: 64px; height: 46px; padding: 6px; box-sizing: border-box;
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 4px; --kopf: #2B2B2B; }
.kopf-mini.farbe-blau { --kopf: #1F4E79; } .kopf-mini.farbe-gruen { --kopf: #2E6B3F; } .kopf-mini.farbe-bordeaux { --kopf: #7A1F2B; } .kopf-mini.farbe-orange { --kopf: #C8651B; }
.kopf-mini i { display: block; height: 4px; border-radius: 2px; background: #CFCFCF; }
.kopf-mini i:nth-child(1) { width: 60%; } .kopf-mini i:nth-child(2) { width: 80%; } .kopf-mini i:nth-child(3) { width: 45%; height: 6px; background: #555; }
.kopf-mini-klassisch i:nth-child(1), .kopf-mini-klassisch i:nth-child(2) { display: none; }
.kopf-mini-klassisch::after, .kopf-mini-briefkopf::after { content: ""; position: absolute; right: 6px; top: 6px; width: 14px; height: 10px; border-radius: 2px; background: #E2DFD8; }
.kopf-mini-briefkopf i:nth-child(1) { background: var(--kopf); width: 45%; } .kopf-mini-briefkopf i:nth-child(2) { width: 100%; height: 2px; background: var(--kopf); }
.kopf-mini-zentriert { align-items: center; } .kopf-mini-zentriert i:nth-child(1) { background: var(--kopf); }
.kopf-mini-balken i:nth-child(1) { width: calc(100% + 12px); height: 12px; margin: -6px -6px 2px; border-radius: 3px 3px 0 0; background: var(--kopf); }
.kopf-mini-balken i:nth-child(2) { display: none; }
.kopf-mini-briefpapier { justify-content: flex-end; } .kopf-mini-briefpapier i:nth-child(1), .kopf-mini-briefpapier i:nth-child(2) { display: none; }
.werkstatt-unterschriften { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .werkstatt-unterschriften { grid-template-columns: 1fr 1fr; } }
.werkstatt-sig { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.werkstatt-text { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 14px; line-height: 1.5; }
.werkstatt-lesen > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.werkstatt-lesen .werkstatt-blatt { max-height: 50vh; overflow-y: auto; margin-top: 10px; }
.haken-zeile { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; }
.haken-zeile input { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; }
.werkstatt-pflicht { border-color: var(--orange); box-shadow: inset 4px 0 0 var(--orange), var(--schatten, none); }
div.werkstatt-pflicht { padding: 12px 14px; border: 1px solid var(--orange); border-radius: 12px; }
.werkstatt-versand { margin: 0; padding-left: 18px; }
.werkstatt-start-hinweis p strong { color: var(--ink); }
.sprung-chips .pill { text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.testkopie-band { position: sticky; top: 0; z-index: 50; padding: 6px 14px; padding-top: calc(6px + env(safe-area-inset-top)); background: repeating-linear-gradient(-45deg, #2EC4B6, #2EC4B6 14px, #7FDDD4 14px, #7FDDD4 28px); color: #141414; font-size: 13px; text-align: center; }
/* Zurück-Knopf auf jeder Seite (2.0): eine Ebene höher. Hat die Seite schon einen eigenen, bleibt nur der. */
.page:has(> a.back:not(.pfad-zurueck)) > .pfad-zurueck { display: none; }
.pfad-zurueck + .pfad { margin-top: -10px; }

/* 2.0: Menü und Wegweiser getrennt nach „Firma“ (frei) und „Mein Betrieb“ (Plus-Pakete) */
.seiten-kopf { grid-column: 1 / -1; margin: 18px 0 2px; padding-left: 12px; border-left: 4px solid var(--orange); }
.seiten-kopf:first-child { margin-top: 4px; }
.seiten-kopf[data-seite="betrieb"] { border-left-color: var(--ink, #111); }
.seiten-kopf[data-seite="allgemein"] { border-left-color: #c9c9c9; }
.seiten-kopf h2 { margin: 0; font-size: 17px; }
.seiten-kopf p { margin: 2px 0 0; }
.baum-seite { list-style: none; margin: 12px 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #777; }

/* ---------- 2.0.1: Zum Seitenanfang, Passwort-Auge, Löschen ---------- */
.nach-oben { position: fixed; z-index: 230; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom));
  width: 48px; height: 48px; border-radius: 999px; border: 0; display: inline-flex; align-items: center; justify-content: center;
  background: var(--green); color: #FFFFFF; box-shadow: var(--schatten-hoch); cursor: pointer; transition: transform var(--tempo), opacity var(--tempo); }
.nach-oben[hidden] { display: none; }
.nach-oben:hover { transform: translateY(-2px); }
.nach-oben:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
body.dark .nach-oben { background: #FFFFFF; color: var(--green); }
@media (max-width: 799px) { .nach-oben { bottom: calc(92px + env(safe-area-inset-bottom)); right: 14px; } }
@media print { .nach-oben { display: none; } }

.passwort-feld { position: relative; display: block; }
.passwort-feld > input { width: 100%; padding-right: 52px; }
.passwort-auge { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--r-feld); background: transparent;
  color: var(--muted); cursor: pointer; }
.passwort-auge:hover, .passwort-auge.an { color: var(--ink); }
.passwort-auge:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.passwort-auge .auge-strich { display: none; }
.passwort-auge.an .auge-strich { display: inline; }

.btn.danger { background: #B3261E; color: #FFFFFF; border-color: #B3261E; }
.btn.danger:hover { background: #8C1D18; }
.chat-loeschen { margin-top: 4px; }
.chat-loeschen > summary { cursor: pointer; color: #B3261E; font-size: 14px; list-style: none; }
.chat-loeschen > summary::-webkit-details-marker { display: none; }
.chat-loeschen[open] > summary { margin-bottom: 8px; }
body.dark .passwort-auge { color: #CFE0D6; }
body.dark .passwort-auge:hover, body.dark .passwort-auge.an { color: #FFFFFF; }
@media (max-width: 799px) { .app-footer { padding-left: 68px; padding-right: 68px; } }

/* Ab 2.0.14: lange Prüfsummen umbrechen */
.umbruch { word-break: break-all; font-size: .85em; }
