/* Keine externen Schriften (DSGVO): System-Schriften */
:root {
  --papier: #f3f5f6;
  --flaeche: #ffffff;
  --tinte: #1c2730;
  --leise: #5b6873;
  --linie: #d6dce1;
  --akzent: #2f5d8a;
  --gruen: #2a7a50;
  --gelb: #a8701a;
  --rot: #ad3a2e;
  --gruen-hell: #e3f1e9;
  --gelb-hell: #f8ecd6;
  --rot-hell: #f7e2df;
  --radius: 6px;
  --schrift: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --papier: #12181d; --flaeche: #1a2229; --tinte: #e4e9ed; --leise: #97a4ae; --linie: #2c3741;
    --akzent: #7fa9d4; --gruen: #5cbf8a; --gelb: #e0a94e; --rot: #e57f72;
    --gruen-hell: #18321f; --gelb-hell: #3a2c14; --rot-hell: #3b1d19; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--papier); color: var(--tinte); font: 15px/1.5 var(--schrift); font-variant-numeric: tabular-nums; }
a { color: var(--akzent); }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }

/* Kopf */
.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); border-top: 4px solid var(--akzent); display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding: .6rem 1.25rem; }
.marke { font-weight: 650; letter-spacing: -.01em; display: flex; align-items: center; gap: .6rem; }
.marke img { height: 30px; width: auto; display: block; }
.marke small { color: var(--leise); font-weight: 400; }
@media (max-width: 1280px) and (min-width: 801px) { .marke small { display: none; } }
.kopf nav { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1; }
@media (max-width: 800px) { .kopf nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; } .ich { margin-left: auto; } }
.kopf nav a { color: var(--leise); text-decoration: none; padding: .35rem .55rem; border-radius: var(--radius); white-space: nowrap; }
.kopf nav a:hover { color: var(--tinte); background: var(--papier); }
.kopf nav a.an { color: var(--tinte); background: var(--papier); font-weight: 600; box-shadow: inset 0 -2px 0 var(--akzent); }
.ich { color: var(--leise); font-size: .9rem; white-space: nowrap; }

main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
h1 { font-size: 1.6rem; letter-spacing: -.02em; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 .75rem; }
.leise { color: var(--leise); }

.flash { padding: .65rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; background: var(--gruen-hell); border-left: 4px solid var(--gruen); }
.flash.fehler { background: var(--rot-hell); border-left-color: var(--rot); }
.hinweis { padding: .65rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; background: var(--gelb-hell); border-left: 4px solid var(--gelb); }

/* Stempeluhr: das zentrale Element */
.uhr { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; display: grid; grid-template-columns: 10px 1fr; overflow: hidden; margin-bottom: 1.5rem; }
.uhr .band { background: var(--leise); }
.uhr[data-status="anwesend"] .band { background: var(--gruen); }
.uhr[data-status="pause"] .band { background: var(--gelb); }
.uhr-inhalt { padding: 1.5rem 1.75rem; display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; }
.zeit-gross { font-size: clamp(3rem, 9vw, 5.5rem); font-weight: 300; line-height: 1; letter-spacing: -.04em; }
.status-text { font-size: 1.05rem; margin-top: .5rem; }
.status-text b { font-weight: 650; }
.heute-zaehler { color: var(--leise); margin-top: .25rem; }
.knoepfe { display: grid; gap: .6rem; min-width: 220px; }
.knoepfe form { margin: 0; }
.stempel { width: 100%; font: inherit; font-size: 1.15rem; font-weight: 600; padding: 1rem 1.25rem; border-radius: 8px; border: 0; cursor: pointer; color: #fff; }
.stempel.kommen { background: var(--gruen); }
.stempel.pause { background: var(--gelb); }
.stempel.gehen { background: var(--tinte); color: var(--flaeche); }
.stempel:hover { filter: brightness(1.08); }
.stempel:active { transform: translateY(1px); }
@media (max-width: 640px) { .uhr-inhalt { grid-template-columns: 1fr; } .knoepfe { min-width: 0; } }

/* Kennzahlen */
.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--linie); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem; }
.zahl { background: var(--flaeche); padding: .9rem 1rem; }
.zahl span { display: block; color: var(--leise); font-size: .85rem; }
.zahl strong { font-size: 1.45rem; font-weight: 600; letter-spacing: -.01em; }
.plus { color: var(--gruen); } .minus { color: var(--rot); }

/* Tabellen */
.tabelle-wrap { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; }
th, td { padding: .5rem .75rem; text-align: left; border-bottom: 1px solid var(--linie); white-space: nowrap; }
th { font-size: .85rem; color: var(--leise); font-weight: 600; background: var(--papier); }
td.zahl-z, th.zahl-z { text-align: right; }
tr.frei td { color: var(--leise); background: color-mix(in srgb, var(--papier) 60%, var(--flaeche)); }
tr.heute td { background: color-mix(in srgb, var(--akzent) 7%, var(--flaeche)); }
tr.heute td:first-child { box-shadow: inset 3px 0 0 var(--akzent); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 650; background: var(--papier); }
.warn { color: var(--rot); font-size: .85rem; white-space: normal; }
td.info { white-space: normal; min-width: 140px; }

/* Formulare */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.5rem; }
.felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .9rem 1rem; align-items: end; }
label { display: grid; gap: .25rem; font-size: .9rem; color: var(--leise); }
input, select, textarea { font: inherit; color: var(--tinte); background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: .5rem .6rem; width: 100%; }
.check { display: flex; align-items: center; gap: .4rem; color: var(--tinte); }
.check input { width: auto; }
.tage-wahl { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn { font: inherit; font-weight: 600; padding: .5rem 1rem; border-radius: var(--radius); border: 1px solid var(--akzent); background: var(--akzent); color: var(--auf-akzent, #fff); cursor: pointer; text-decoration: none; display: inline-block; }
.btn.zweit { background: transparent; color: var(--akzent); }
.btn.gefahr { background: transparent; color: var(--rot); border-color: var(--rot); }
.btn.klein { padding: .25rem .6rem; font-size: .85rem; }
.inline { display: inline; margin: 0; }
.leiste { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.leiste .gruppe { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* Status-Markierungen */
.pille { display: inline-block; padding: .1rem .55rem; border-radius: 99px; font-size: .8rem; font-weight: 600; background: var(--papier); color: var(--leise); }
.pille.genehmigt, .pille.anwesend { background: var(--gruen-hell); color: var(--gruen); }
.pille.beantragt, .pille.pause { background: var(--gelb-hell); color: var(--gelb); }
.pille.abgelehnt { background: var(--rot-hell); color: var(--rot); }

/* Kalender */
#kalender { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem; }
.fc { --fc-border-color: var(--linie); --fc-page-bg-color: var(--flaeche); --fc-today-bg-color: color-mix(in srgb, var(--akzent) 10%, transparent); --fc-event-border-color: transparent; }
.fc .fc-button-primary { background: var(--akzent); border-color: var(--akzent); }
.fc .ev-urlaub { background: var(--akzent); }
.fc .ev-krank, .fc .ev-abwesend { background: var(--leise); }
.fc .ev-za { background: var(--gruen); }
.fc .ev-sonstiges { background: var(--gelb); }
.fc .ev-beantragt { opacity: .55; background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255,255,255,.25) 6px 12px); }
.fc .ev-feiertag { background: var(--gelb-hell); opacity: 1; }
.fc .ev-feiertag .fc-event-title { color: var(--gelb); font-style: normal; font-weight: 600; }
.fc .ev-feiertag-text { background: transparent; color: var(--gelb); font-weight: 600; }
.fc .ev-feiertag-text .fc-event-title { color: var(--gelb); }
.legende { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .75rem; font-size: .9rem; color: var(--leise); }
.legende i { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }

/* Login */
.login { max-width: 380px; margin: 12vh auto; text-align: left; }
.login h1 { font-size: 2rem; }
.login .btn { width: 100%; padding: .8rem; text-align: center; font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Mitarbeiterliste ---------- */
.reiter { display: flex; gap: .25rem; border-bottom: 1px solid var(--linie); margin: 1.25rem 0 1rem; overflow-x: auto; }
.reiter a { padding: .55rem .9rem; color: var(--leise); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.reiter a.an { color: var(--tinte); border-bottom-color: var(--akzent); font-weight: 600; }
.reiter a span { display: inline-block; min-width: 1.5rem; padding: 0 .4rem; margin-left: .35rem; border-radius: 99px; background: var(--papier); font-size: .8rem; text-align: center; }
.suche { position: relative; }
.suche input { padding-left: 2rem; width: 260px; max-width: 100%; }
.suche::before { content: ""; position: absolute; left: .7rem; top: 50%; width: .7rem; height: .7rem; border: 2px solid var(--leise); border-radius: 50%; transform: translateY(-60%); }
.ma-tabelle td { vertical-align: middle; padding-top: .65rem; padding-bottom: .65rem; }
.ma-tabelle tbody tr { cursor: pointer; transition: background .12s; }
.ma-tabelle tbody tr:hover td { background: color-mix(in srgb, var(--akzent) 6%, var(--flaeche)); }
.person { display: flex; align-items: center; gap: .75rem; min-width: 220px; }
.avatar { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700;
  background: color-mix(in srgb, var(--akzent) 16%, var(--flaeche)); color: color-mix(in srgb, var(--akzent) 75%, var(--tinte)); letter-spacing: .02em; }
.person b { display: block; font-weight: 600; }
.person small { display: block; color: var(--leise); font-size: .82rem; }
.chips { display: flex; flex-wrap: wrap; gap: .25rem; max-width: 240px; white-space: normal; }
.chip { display: inline-block; padding: .08rem .5rem; border-radius: 99px; font-size: .78rem; background: var(--papier); color: var(--tinte); border: 1px solid var(--linie); white-space: nowrap; }
.chip.leitung { border-color: var(--akzent); color: var(--akzent); font-weight: 600; }
.chip.rolle { background: color-mix(in srgb, var(--akzent) 10%, var(--flaeche)); border-color: transparent; }
.genehmiger { font-size: .85rem; line-height: 1.35; white-space: normal; min-width: 140px; max-width: 200px; }
.genehmiger small { color: var(--leise); }
.pfeil { color: var(--leise); text-align: right; width: 1.5rem; }
.leer-zeile { padding: 2.5rem 1rem !important; text-align: center; color: var(--leise); }
details.karte > summary { cursor: pointer; font-weight: 600; list-style: none; }
details.karte > summary::before { content: "+ "; color: var(--akzent); }
details.karte[open] > summary { margin-bottom: 1rem; }
details.karte[open] > summary::before { content: "– "; }
.gefahrenzone { border-color: color-mix(in srgb, var(--rot) 40%, var(--linie)); }
.gefahrenzone h2 { margin-top: 0; color: var(--rot); font-size: 1rem; }
@media (max-width: 900px) { .ma-tabelle .opt { display: none; } }

/* ---------- Timer in der Kopfzeile (Z-01) ---------- */
.mini-uhr { display: flex; align-items: center; gap: .4rem; padding: .3rem .4rem .3rem .7rem; border: 1px solid var(--linie); border-radius: 99px; background: var(--papier); margin: 0; }
.mini-punkt { width: .6rem; height: .6rem; border-radius: 50%; background: var(--leise); flex: none; }
.mini-uhr[data-status="anwesend"] .mini-punkt { background: var(--gruen); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gruen) 25%, transparent); }
.mini-uhr[data-status="pause"] .mini-punkt { background: var(--gelb); }
.mini-text { font-size: .85rem; color: var(--leise); white-space: nowrap; }
.mini-uhr select { width: auto; padding: .2rem .35rem; font-size: .8rem; border-radius: 99px; }
.mini-btn { font: inherit; font-size: .82rem; font-weight: 600; border: 0; border-radius: 99px; padding: .3rem .8rem; cursor: pointer; color: #fff; }
.mini-btn.kommen { background: var(--gruen); } .mini-btn.pause { background: var(--gelb); } .mini-btn.gehen { background: var(--tinte); color: var(--flaeche); }
@media (max-width: 800px) { .mini-uhr { order: 2; } .mini-text { display: none; } }

/* ---------- Kacheln, Aufgaben, Fortschritt ---------- */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.kachel { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 1rem 1.1rem; text-decoration: none; color: var(--tinte); border-left: 4px solid var(--akzent); }
.kachel:hover { box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.kachel span { display: block; color: var(--leise); font-size: .85rem; }
.kachel strong { font-size: 1.8rem; font-weight: 650; }
.aufgaben { list-style: none; padding: 0; margin: 0 0 1.5rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
.aufgaben li { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 1rem; border-bottom: 1px solid var(--linie); }
.aufgaben li:last-child { border-bottom: 0; }
.aufgaben a { color: var(--tinte); text-decoration: none; }
.aufgaben a:hover { color: var(--akzent); }
.faellig { white-space: nowrap; font-size: .85rem; color: var(--leise); }
.faellig.ueber { color: var(--rot); font-weight: 600; }
.balken { width: 90px; height: .45rem; background: var(--linie); border-radius: 99px; overflow: hidden; display: inline-block; vertical-align: middle; }
.balken i { display: block; height: 100%; background: var(--akzent); border-radius: 99px; }
.balken i.voll { background: var(--gruen); }
.zahl a { color: inherit; text-decoration: none; }
.zahl a:hover strong { text-decoration: underline; }
.reiter-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--linie); margin: 1rem 0 1.25rem; overflow-x: auto; }
.reiter-tabs a { padding: .55rem .9rem; color: var(--leise); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.reiter-tabs a.an { color: var(--tinte); border-bottom-color: var(--akzent); font-weight: 600; }
.dl { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: .45rem 1rem; margin: 0; }
.dl dt { color: var(--leise); } .dl dd { margin: 0; }

/* Ausgeblendete Elemente immer verbergen (auch wenn display gesetzt ist) */
[hidden] { display: none !important; }


textarea { font: inherit; }

/* ---------- Unternavigation ---------- */
.unternav { background: var(--flaeche); border-bottom: 1px solid var(--linie); display: flex; gap: .25rem; padding: 0 1.25rem; overflow-x: auto; }
.unternav a { padding: .55rem .8rem; color: var(--leise); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; font-size: .92rem; }
.unternav a:hover { color: var(--tinte); }
.unternav a.an { color: var(--tinte); border-bottom-color: var(--akzent); font-weight: 600; }
.etabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--linie); margin: 0 0 1.25rem; overflow-x: auto; }
.etabs a { padding: .55rem .9rem; color: var(--leise); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.etabs a.an { color: var(--tinte); border-bottom-color: var(--akzent); font-weight: 600; }

tr.warn-zeile td { background: var(--rot-hell); }

/* ---------- Stempeln in der Kopfzeile (schlicht) ---------- */
.stempel-kopf { display: flex; align-items: center; gap: .35rem; margin: 0; font-size: .88rem; }
.sk-punkt { width: .55rem; height: .55rem; border-radius: 50%; background: var(--leise); display: inline-block; margin-right: .45rem; vertical-align: middle; }
.stempel-kopf[data-status="anwesend"] .sk-punkt { background: var(--gruen); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gruen) 22%, transparent); }
.stempel-kopf[data-status="pause"] .sk-punkt { background: var(--gelb); }
.sk-info { color: var(--leise); white-space: nowrap; padding-right: .2rem; }
.sk-btn, .sk-start summary { font: inherit; font-size: .86rem; font-weight: 600; color: var(--tinte); background: transparent;
  border: 1px solid var(--linie); border-radius: 8px; padding: .32rem .75rem; cursor: pointer; white-space: nowrap; list-style: none; }
.sk-btn:hover, .sk-start summary:hover { border-color: var(--akzent); color: var(--akzent); }
.sk-stopp { color: var(--rot); } .sk-stopp:hover { border-color: var(--rot); color: var(--rot); }
.sk-start { position: relative; }
.sk-start summary::-webkit-details-marker { display: none; }
.sk-start[open] summary { border-color: var(--akzent); color: var(--akzent); }
.sk-menue { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 20; background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: .5rem; display: grid; gap: .3rem; min-width: 170px; }
.sk-menue small { color: var(--leise); padding: .1rem .4rem; }
.sk-menue button { font: inherit; text-align: left; background: transparent; border: 0; border-radius: 6px; padding: .45rem .6rem; cursor: pointer; color: var(--tinte); }
.sk-menue button:hover { background: color-mix(in srgb, var(--akzent) 10%, transparent); }
.sk-menue button.zuletzt::after { content: " ✓"; color: var(--leise); }
@media (max-width: 800px) { .stempel-kopf { order: 2; } .sk-info { display: none; } }
.filterleiste { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: 0 0 1rem; }
.filterleiste select { width: auto; }
.rollen-wahl { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-bottom: .9rem; }

/* ---------- Stempeluhr (Startseite, Web und Handy) ---------- */
.stempeluhr { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 18px; padding: 1.75rem 1.5rem 1.25rem;
  margin-bottom: 1.5rem; text-align: center; max-width: 560px; margin-left: auto; margin-right: auto; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.su-status { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .8rem; border-radius: 99px; background: var(--grund, #f3f5f6); color: var(--leise); font-size: .9rem; }
.su-status b { color: var(--tinte); }
.su-punkt { width: .6rem; height: .6rem; border-radius: 50%; background: var(--leise); }
.stempeluhr[data-status="anwesend"] .su-punkt { background: var(--gruen); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gruen) 20%, transparent); animation: su-puls 2s infinite; }
.stempeluhr[data-status="pause"] .su-punkt { background: var(--gelb); }
@keyframes su-puls { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--gruen) 5%, transparent); } }
.su-zeit { font-size: clamp(3rem, 12vw, 4.4rem); font-weight: 300; letter-spacing: -.03em; line-height: 1.1; margin-top: .8rem; font-variant-numeric: tabular-nums; }
.su-unter { color: var(--leise); font-size: .92rem; }
.su-balken { height: .45rem; background: var(--linie); border-radius: 99px; overflow: hidden; margin: 1rem auto 0; max-width: 340px; }
.su-balken i { display: block; height: 100%; background: var(--akzent); border-radius: 99px; transition: width .6s; }
.su-balken i.voll { background: var(--gruen); }
.su-hinweis { margin: .9rem auto 0; max-width: 380px; font-size: .88rem; color: var(--gelb-dunkel, #8a5a00); background: var(--gelb-hell); border-radius: 8px; padding: .5rem .75rem; }
.su-form { margin: 1.25rem auto 0; max-width: 380px; display: grid; gap: .75rem; }
.su-orte { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; }
.su-orte label { display: block; }
.su-orte input { position: absolute; opacity: 0; pointer-events: none; }
.su-orte span { display: block; padding: .45rem .9rem; border: 1px solid var(--linie); border-radius: 99px; font-size: .9rem; cursor: pointer; color: var(--leise); background: var(--flaeche); }
.su-orte input:checked + span { border-color: var(--akzent); color: var(--akzent); background: color-mix(in srgb, var(--akzent) 8%, var(--flaeche)); font-weight: 600; }
.su-orte input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 2px; }
.su-knoepfe { display: flex; gap: .6rem; justify-content: center; }
.su-btn { flex: 1; max-width: 260px; min-height: 52px; font: inherit; font-size: 1.05rem; font-weight: 650; border-radius: 12px; border: 1px solid transparent; cursor: pointer; touch-action: manipulation; }
.su-btn:active { transform: scale(.98); } .su-btn:disabled { opacity: .6; }
.su-btn.kommen { background: var(--gruen); color: #fff; }
.su-btn.gehen { background: var(--tinte); color: var(--flaeche); }
.su-btn.zweit { background: var(--flaeche); color: var(--tinte); border-color: var(--linie); }
.su-btn.zweit:hover { border-color: var(--akzent); color: var(--akzent); }
.su-link { display: inline-block; margin-top: 1rem; font-size: .85rem; color: var(--leise); }
@media (max-width: 600px) { .stempeluhr { border-radius: 14px; padding: 1.4rem 1rem 1rem; } .su-btn { min-height: 58px; font-size: 1.1rem; } }

/* ---------- Stempeluhr am Desktop: volle Breite, Zeit links, Knöpfe rechts ---------- */
@media (min-width: 900px) {
  .stempeluhr { max-width: none; text-align: left; display: grid; grid-template-columns: 1fr 380px; column-gap: 2.5rem;
    align-items: center; padding: 1.75rem 2rem; border-left: 6px solid var(--leise); border-radius: 14px; }
  .stempeluhr[data-status="anwesend"] { border-left-color: var(--gruen); }
  .stempeluhr[data-status="pause"] { border-left-color: var(--gelb); }
  .stempeluhr > .su-status, .stempeluhr > .su-zeit, .stempeluhr > .su-unter, .stempeluhr > .su-balken, .stempeluhr > .su-hinweis { grid-column: 1; justify-self: start; }
  .su-zeit { font-size: 5.2rem; margin-top: .4rem; }
  .su-balken { margin: .9rem 0 0; width: 100%; max-width: 460px; }
  .su-hinweis { margin: .9rem 0 0; }
  .stempeluhr > .su-form { grid-column: 2; grid-row: 1 / span 5; margin: 0; max-width: none; padding-left: 2.5rem; border-left: 1px solid var(--linie); }
  .stempeluhr > .su-link { grid-column: 2; padding-left: 2.5rem; margin-top: .6rem; justify-self: center; }
  .su-btn { max-width: none; min-height: 58px; font-size: 1.15rem; }
}
/* Kopfzeile: Einstempel-Menü immer vollständig über allen Seiteninhalten (z. B. Kalender) */
.kopf { position: relative; z-index: 100; overflow: visible; }
.sk-menue { z-index: 1000; }

/* Kopfzeile bleibt beim Scrollen sichtbar (laufende Buchung immer im Blick) */
.kopf { position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 var(--linie); }
html { scroll-padding-top: 5rem; }

/* ---------- Stempel in der Kopfzeile: farbig (grün / gelb / rot) ---------- */
.sk-start summary { background: var(--gruen); border-color: var(--gruen); color: #fff; display: inline-flex; align-items: center; gap: .4rem; }
.sk-start summary:hover, .sk-start[open] summary { background: color-mix(in srgb, var(--gruen) 85%, #000); border-color: transparent; color: #fff; }
.sk-icon { font-size: .7rem; }
.sk-btn { border-color: transparent; color: #fff; display: inline-flex; align-items: center; gap: .3rem; }
.sk-pause { background: var(--gelb); } .sk-weiter { background: var(--gruen); } .sk-stopp { background: var(--rot); color: #fff; }
.sk-btn:hover { filter: brightness(.92); color: #fff; border-color: transparent; }
.sk-stopp:hover { color: #fff; border-color: transparent; }
.sk-menue { max-width: calc(100vw - 1.5rem); }

/* Handy: Stempel rechts neben dem Logo in der obersten Zeile, Kopfzeile bleibt fix */
@media (max-width: 800px) {
  .kopf { gap: .4rem .75rem; padding: .5rem .9rem; }
  .kopf .marke { order: 1; }
  .stempel-kopf { order: 2; margin-left: auto; }
  .kopf nav { order: 3; flex: 1 1 auto; flex-basis: auto; min-width: 0; }
  .ich { order: 4; margin-left: 0; font-size: .82rem; white-space: nowrap; }
  .kopf .marke small { display: none; }
  .sk-info { display: inline; font-size: .8rem; }
  .sk-btn span { display: none; }
  .sk-btn { padding: .4rem .65rem; min-width: 2.4rem; justify-content: center; }
  .sk-start summary { padding: .4rem .8rem; }
  .sk-menue { right: 0; left: auto; }
}

.kopf nav a.nur-handy { display: none; }
@media (max-width: 800px) { .ich { display: none; } .kopf nav a.nur-handy { display: inline-block; } }

.legende-box { margin: 1rem 0; padding: .9rem 1.1rem; background: var(--grund, #f3f5f6); border-radius: 10px; font-size: .9rem; }
.legende-box p { margin: .4rem 0; } .legende-box table { margin: .4rem 0; border-collapse: collapse; }
.legende-box td { padding: .2rem .8rem .2rem 0; vertical-align: top; } .legende-box code { background: var(--flaeche); padding: .05rem .35rem; border-radius: 4px; border: 1px solid var(--linie); }

.btn-text { font: inherit; font-size: .85rem; background: none; border: 0; color: var(--leise); text-decoration: underline; cursor: pointer; padding: .2rem; }
.btn-text:hover { color: var(--tinte); }
@media (max-width: 600px) { .krank-hinweis { font-size: .85rem; padding: .6rem .75rem; } }

/* ---------- Desktop-Stempelkarte: große Uhrzeit, Buchen rechts (ersetzt die Handy-Karte ab 900px) ---------- */
.sd { display: none; }
@media (min-width: 900px) {
  .stempeluhr { display: none; }
  .sd { display: grid; grid-template-columns: 1fr 340px; gap: 2.5rem; align-items: center; background: var(--flaeche);
    border: 1px solid var(--linie); border-left: 6px solid var(--leise); border-radius: 14px; padding: 1.6rem 2rem; margin-bottom: 1.5rem; }
  .sd[data-status="anwesend"] { border-left-color: var(--gruen); }
  .sd[data-status="pause"] { border-left-color: var(--gelb); }
  .sd[data-status="anwesend"] .su-punkt { background: var(--gruen); }
  .sd[data-status="pause"] .su-punkt { background: var(--gelb); }
  .sd-uhr { font-size: 5.5rem; font-weight: 300; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
  .sd-status { display: flex; align-items: center; gap: .5rem; margin-top: .7rem; font-size: 1.05rem; font-weight: 600; }
  .sd-status .su-punkt { display: inline-block; }
  .sd-gebucht { color: var(--leise); margin-top: .25rem; font-variant-numeric: tabular-nums; }
  .sd-gebucht b { color: var(--tinte); }
  .sd-balken { height: .4rem; background: var(--linie); border-radius: 99px; overflow: hidden; margin-top: .8rem; max-width: 420px; }
  .sd-balken i { display: block; height: 100%; background: var(--akzent); border-radius: 99px; transition: width .6s; }
  .sd-balken i.voll { background: var(--gruen); }
  .sd-aktion { display: grid; gap: .6rem; margin: 0; max-width: none; }
  .sd-aktion select { width: 100%; }
  .sd-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
  .sd-btn { min-height: 56px; font: inherit; font-size: 1.15rem; font-weight: 650; border: 0; border-radius: 10px; color: #fff; cursor: pointer; }
  .sd-btn:active { transform: scale(.98); } .sd-btn:disabled { opacity: .6; }
  .sd-btn.buchen { background: var(--gruen); } .sd-btn.pause { background: var(--gelb); } .sd-btn.gehen { background: var(--rot); }
  .sd-btn:hover { filter: brightness(.93); }
  .sd-aktion .su-link { text-align: center; margin-top: .2rem; }
}

.schnellwahl { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.schnellwahl a { padding: .4rem .9rem; border: 1px solid var(--linie); border-radius: 99px; background: var(--flaeche); color: var(--tinte); text-decoration: none; font-size: .9rem; }
.schnellwahl a:hover { border-color: var(--akzent); color: var(--akzent); }
.schnellwahl a.an { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent, #fff); font-weight: 600; }

.tag-loeschen { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .75rem 1rem; margin: 0 0 1rem;
  border: 1px solid color-mix(in srgb, var(--rot) 35%, var(--linie)); border-radius: 10px; background: color-mix(in srgb, var(--rot) 4%, var(--flaeche)); }
.tag-loeschen input { flex: 1; min-width: 200px; }

.geburtstag-hinweis { margin: 0 0 1.25rem; padding: .7rem 1rem; border-radius: 10px; background: #fbeaf0; color: #72243e; border: 1px solid #f4c0d1; }
