:root {
  --akzent: #1f6feb;
  --akzent-text: #fff;
  --akzent-hell: color-mix(in srgb, var(--akzent) 10%, var(--flaeche));
  --grund: #f3f5f8;
  --flaeche: #ffffff;
  --text: #1a2130;
  --leise: #5b6475;
  --rand: #dde2ea;
  --gut: #1e7e34;
  --gut-hell: #e8f5ec;
  --warn: #9a6700;
  --warn-hell: #fff6e0;
  --gefahr: #c0392b;
  --schatten: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --rund: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --grund: #111418; --flaeche: #1b1f26; --text: #e7eaf0; --leise: #a2aaba; --rand: #2e3440;
    --gut: #4cc66b; --gut-hell: #16301f; --warn: #f0b429; --warn-hell: #33290f; --gefahr: #ff6b5b;
    --schatten: 0 1px 2px rgba(0, 0, 0, .4); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--grund); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; }
h1 { font-size: 1.35rem; margin: 0 0 6px; letter-spacing: -.01em; }
.leise { color: var(--leise); margin: 0 0 16px; }
small { color: var(--leise); font-weight: 400; }

/* Kopf */
.kopf { background: var(--akzent); color: var(--akzent-text); }
.kopf-innen { max-width: 760px; margin: 0 auto; padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.logo { width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; flex: none; }
.firma { font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.unterzeile { font-size: .82rem; opacity: .85; }

/* Schritte */
.schritte { max-width: 760px; width: 100%; margin: 0 auto; padding: 14px 16px 0; }
.schritte ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.schritte li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--leise); padding-bottom: 8px; border-bottom: 3px solid var(--rand); }
.schritte li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: var(--rand); color: var(--leise); flex: none; }
.schritte li em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schritte li.aktiv { color: var(--text); border-color: var(--akzent); font-weight: 600; }
.schritte li.aktiv span, .schritte li.erledigt span { background: var(--akzent); color: var(--akzent-text); }
.schritte li.erledigt { border-color: color-mix(in srgb, var(--akzent) 45%, var(--rand)); }
@media (max-width: 520px) { .schritte li em { display: none; } .schritte li.aktiv { flex: 2.2; } .schritte li.aktiv em { display: inline; } }

main { max-width: 760px; width: 100%; margin: 0 auto; padding: 16px; flex: 1; }
.schritt { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rund); padding: 22px; box-shadow: var(--schatten); }
@media (max-width: 520px) { .schritt { padding: 18px 16px; } }

/* Felder */
.feld { display: block; margin: 14px 0; font-size: .9rem; font-weight: 600; }
.feld small { margin-left: 4px; }
input, textarea { display: block; width: 100%; margin-top: 6px; padding: 12px; font: inherit; font-weight: 400; color: var(--text);
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: 8px; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 25%, transparent); }
.hilfe { display: block; font-size: .82rem; color: var(--leise); font-weight: 400; margin-top: 6px; }
.pflicht { color: var(--gefahr); }
.raster { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.raster .breit { grid-column: 1 / -1; }
@media (max-width: 560px) { .raster { grid-template-columns: 1fr; } }
.falle { position: absolute; left: -9999px; }

/* Kennzeichen wie ein Schild */
.schild { display: flex; margin-top: 6px; border: 2px solid #1a1a1a; border-radius: 8px; overflow: hidden; background: #fff; max-width: 340px; }
.schild .eu { background: #003399; color: #fc0; font-weight: 700; width: 34px; display: grid; place-items: end center; padding-bottom: 6px; font-size: .8rem; flex: none; }
.schild input { margin: 0; border: 0; border-radius: 0; font: 700 1.35rem/1 "DIN Alternate", "Arial Narrow", Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #111; background: #fff; }
.schild input:focus { box-shadow: none; }
.schild:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 30%, transparent); }
.erkannt { display: flex; gap: 8px; align-items: center; background: var(--gut-hell); color: var(--gut); padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.erkannt.neutral { background: var(--grund); color: var(--leise); font-weight: 400; }

/* Knöpfe */
button { font: inherit; font-weight: 600; padding: 11px 20px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; transition: filter .15s, background .15s; }
button:focus-visible { outline: 3px solid color-mix(in srgb, var(--akzent) 45%, transparent); outline-offset: 2px; }
button:disabled { opacity: .45; cursor: not-allowed; }
.haupt { background: var(--akzent); color: var(--akzent-text); }
.haupt:hover:not(:disabled) { filter: brightness(1.08); }
.haupt.gross { padding: 13px 26px; }
.zweit, .zurueck { background: var(--flaeche); color: var(--text); border-color: var(--rand); }
.zweit:hover, .zurueck:hover { background: var(--grund); }
.gefahr { background: transparent; color: var(--gefahr); border-color: color-mix(in srgb, var(--gefahr) 50%, var(--rand)); }
.knoepfe { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
.knoepfe.links { justify-content: flex-start; }

/* Leistungen */
.karten { display: grid; gap: 10px; }
.arbeit { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 14px; border: 1.5px solid var(--rand); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.arbeit:hover { border-color: color-mix(in srgb, var(--akzent) 50%, var(--rand)); }
.arbeit input { position: absolute; opacity: 0; pointer-events: none; }
.arbeit .box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--rand); display: grid; place-items: center; margin-top: 1px; transition: all .15s; }
.arbeit .box svg { opacity: 0; }
.arbeit.an { border-color: var(--akzent); background: var(--akzent-hell); }
.arbeit.an .box { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.arbeit.an .box svg { opacity: 1; }
.arbeit:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--akzent) 40%, transparent); }
.arbeit b { display: block; }
.arbeit .beschr { color: var(--leise); font-size: .88rem; margin-top: 2px; }
.arbeit .rechts { text-align: right; white-space: nowrap; font-size: .88rem; }
.arbeit .preis { font-weight: 700; }
.marke { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 99px; background: var(--grund); color: var(--leise); }

/* Leiste unten (mobil klebend) */
.leiste { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rand); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.leiste .knoepfe { margin-top: 0; }
.leiste-info { color: var(--leise); font-size: .92rem; }
.leiste-info b { color: var(--text); }
@media (max-width: 560px) {
  .leiste { position: sticky; bottom: 0; margin: 18px -16px -18px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--flaeche); border-radius: 0 0 var(--rund) var(--rund); box-shadow: 0 -6px 16px rgba(16, 24, 40, .06); }
  .leiste .knoepfe { width: 100%; } .leiste .knoepfe button { flex: 1; }
}

/* Kalender */
.kalender { margin: 4px 0 8px; }
.monat { display: flex; align-items: center; justify-content: space-between; font-weight: 600; margin-bottom: 8px; }
.pfeil { background: var(--grund); color: var(--text); border: 1px solid var(--rand); width: 38px; height: 38px; padding: 0; font-size: 1.3rem; line-height: 1; }
.tage { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.tag { padding: 8px 0; text-align: center; background: var(--flaeche); color: var(--text); border: 1.5px solid var(--rand); line-height: 1.15; font-weight: 500; }
.tag small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.tag b { display: block; font-size: 1.15rem; }
.tag .anz { font-size: .7rem; color: var(--leise); }
.tag:disabled { opacity: .35; background: var(--grund); }
.tag.an { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.tag.an small, .tag.an .anz { color: inherit; opacity: .9; }
.gruppe { margin-top: 16px; }
.gruppe h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--leise); margin: 0 0 8px; }
.zeiten { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.zeit { background: var(--flaeche); color: var(--text); border: 1.5px solid var(--rand); padding: 10px 0; font-variant-numeric: tabular-nums; }
.zeit:hover { border-color: var(--akzent); }
.zeit.an { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.leer { text-align: center; color: var(--leise); padding: 24px 8px; }

/* Kontakt */
.zusammen { background: var(--akzent-hell); border: 1px solid color-mix(in srgb, var(--akzent) 25%, var(--rand)); border-radius: 10px; padding: 12px 14px; margin: 8px 0 6px; font-size: .92rem; }
.zusammen b { font-size: 1rem; }
.schalter { display: flex; gap: 8px 22px; flex-wrap: wrap; margin: 8px 0; }
.haken { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.haken input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--akzent); }
.einwilligung { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--rand); border-radius: 10px; background: var(--grund); }

/* Fertig */
.fertig-kopf { text-align: center; margin-bottom: 8px; }
.haken-gross { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; background: var(--gut-hell); color: var(--gut); }
.haken-gross.warten { background: var(--warn-hell); color: var(--warn); }
.haken-gross.weg { background: var(--grund); color: var(--leise); }
.karte { border: 1px solid var(--rand); border-radius: 10px; padding: 16px; margin: 14px 0; }
.termin-zeit { display: flex; gap: 14px; align-items: center; }
.tag-gross { width: 58px; text-align: center; border-radius: 10px; overflow: hidden; border: 1px solid var(--rand); flex: none; }
.tag-gross small { display: block; background: var(--akzent); color: var(--akzent-text); font-size: .72rem; text-transform: uppercase; padding: 2px 0; }
.tag-gross b { display: block; font-size: 1.5rem; padding: 4px 0; }
.liste { margin: 12px 0 0; padding-left: 20px; color: var(--leise); }

/* Meldungen, Laden */
.meldung { padding: 12px 14px; border-radius: 10px; margin-bottom: 12px; background: #fdecea; color: #7a1c12; border: 1px solid #f5c2bc; }
.meldung.gut { background: var(--gut-hell); color: var(--gut); border-color: transparent; }
.meldung.info { background: var(--warn-hell); color: var(--warn); border-color: transparent; }
.laden { display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--leise); padding: 40px 0; }
.kreisel { width: 20px; height: 20px; border: 3px solid var(--rand); border-top-color: var(--akzent); border-radius: 50%; animation: dreh .8s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .kreisel { animation-duration: 3s; } * { transition: none !important; } }
iframe.text { width: 100%; border: 0; height: 40px; background: transparent; color-scheme: light; margin-bottom: 8px; }
iframe.klein { margin-bottom: 4px; }
.fuss { text-align: center; color: var(--leise); font-size: .78rem; padding: 18px 16px 26px; }
