/* abwesenheit.css — „Wer ist da, wer fehlt?“ (nur diese Seite).
   Richtung Wandkalender: heller, leicht salbeigrüner Grund, Salbeigrün und Pflaumenviolett als Hausfarben,
   flache Flächen ohne Schatten, kräftige Monatsreiter, Monatsnamen groß in Fraunces, sonst Hanken Grotesk.
   Die Seite ist bewusst nur hell. */

@font-face { font-family: "Hanken Grotesk"; src: url("../../schrift/hanken-grotesk-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../../schrift/muster/fraunces-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../../schrift/muster/fraunces-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root, :root[data-theme="light"] {
  color-scheme: light;
  --flaeche-0: #f2f6f0;          /* Grund, ein Hauch Salbei */
  --flaeche-1: #ffffff;          /* Blatt */
  --flaeche-2: #e4ece1;
  --linie: #c9d5c4;
  --raster: #e1e9de;
  --text-1: #18201a;
  --text-2: #3d4a40;
  --text-3: #56635a;
  --salbei: #3f7a54;
  --salbei-tief: #275539;
  --salbei-hell: #d7e8da;
  --pflaume: #6a2459;
  --pflaume-tief: #4b1640;
  --pflaume-hell: #f1e0ec;
  --akzent: #6a2459;
  --akzent-text: #6a2459;
  /* Arten der Abwesenheit: feste Farben, Krankenstand, Pflegefreistellung und Berufsschule zusätzlich mit Muster */
  --a-u: #3f8a5a;   /* Urlaub */
  --a-k: #c8442b;   /* Krankenstand, schraffiert */
  --a-z: #e1a62a;   /* Zeitausgleich */
  --a-p: #a8478a;   /* Pflegefreistellung, gepunktet */
  --a-s: #2b4b7a;   /* Schulung */
  --a-b: #8a5d33;   /* Berufsschule, quer gestreift */
  --a-x: #7d858f;   /* Sonstiges */
  --a-a: #4a5361;   /* abwesend, Grund ausgeblendet */
  /* Abteilungen: Platz 1 bis 6 in der Reihenfolge der Datei */
  --t1: #6a2459; --t2: #d27510; --t3: #17707a; --t4: #8a5d33; --t5: #2b4b7a; --t6: #7d858f;
  --s1: #6a2459; --s2: #d27510; --s3: #17707a; --s4: #8a5d33; --s5: #2b4b7a; --s6: #7d858f; --s7: #3f8a5a; --s8: #c8442b;
  --frei: #e3e6e1;
  --feiertag: #cfd4cc;
  --rot: #b3261e; --rot-hell: #f6d4d0;
  --gut-text: #275539; --kritisch-text: #9c1f18;
  --schatten: none;
  --kopfschrift: "Hanken Grotesk", system-ui, sans-serif;
  --monatsschrift: "Fraunces", "Hanken Grotesk", sans-serif;
}

html { overflow-x: clip; }
body { overflow-x: clip; font-family: "Hanken Grotesk", system-ui, sans-serif; font-size: 16px; }
.breite { width: min(100% - 32px, 1600px); }
:focus-visible { outline: 2.5px solid var(--pflaume); outline-offset: 2px; border-radius: 3px; }
.knopf:has(input:focus-visible), .wk-haken:has(input:focus-visible) { outline: 2.5px solid var(--pflaume); outline-offset: 2px; }

/* Muster für die Kalenderfelder (in einer eigenen, unsichtbaren Grafik, damit sie immer verfügbar sind) */
.wk-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.f-k { fill: var(--a-k); } .f-p { fill: var(--a-p); } .f-b { fill: var(--a-b); }
.f-weiss { fill: #fff; opacity: .55; }
.f-rot { fill: var(--rot); } .f-rot-hell { fill: #fff; opacity: .45; }

/* ---------- Kopfleiste und Titel ---------- */
.a-kopf { background: var(--pflaume); border-bottom: 0; }
.a-kopf .a-zurueck { color: #f3dceb; }
.a-kopf .a-zurueck:hover { color: #fff; }
.a-kopf .a-name { color: #fff; font-weight: 700; letter-spacing: .01em; }
.a-kopf :focus-visible { outline-color: #fff; }

.wk-titel { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr); gap: 28px 56px; align-items: end; padding: 44px 0 26px; }
.a-titel h1 { font-family: var(--kopfschrift); font-weight: 800; font-stretch: normal; font-size: clamp(36px, 5.4vw, 74px); line-height: .98; letter-spacing: -.03em; max-width: 14ch; margin-bottom: 18px; color: var(--pflaume-tief); }
.a-titel p { font-size: 18px; max-width: 58ch; color: var(--text-2); }
.a-schild { border-radius: 3px; background: var(--flaeche-1); border: 1px solid var(--linie); }
.a-schild i { background: var(--pflaume); border-radius: 2px; }
.a-schild.eigen i { background: var(--salbei); }
.wk-schutz { background: var(--salbei-tief); color: #f1f7f2; border-radius: 6px; padding: 20px 22px; min-width: 0; }
.a-titel .wk-schutz p { color: #e4efe6; font-size: 14.5px; line-height: 1.5; margin: 0 0 8px; max-width: none; }
.a-titel .wk-schutz p:last-child { margin-bottom: 0; }
.a-titel .wk-schutz .wk-schutz-titel { color: #fff; font-weight: 750; font-size: 17px; margin-bottom: 8px; }
@media (max-width: 980px) { .wk-titel { grid-template-columns: 1fr; padding-top: 30px; } }

/* ---------- Ablage, Hinweis ---------- */
.ablage { border-radius: 6px; border: 2px dashed var(--salbei); background: var(--flaeche-1); }
.ablage.drueber { border-color: var(--pflaume); background: var(--pflaume-hell); }
.ablage svg { color: var(--salbei); }
.ablage .vorlage-satz { display: block; margin-top: 6px; color: var(--text-1); }
.ablage .knoepfe { max-width: 340px; }
.ablage .vorlage-knopf { flex: 1 1 100%; border-style: dashed; border-color: var(--salbei); }
@media (max-width: 720px) { .ablage .knoepfe { max-width: none; } .ablage .vorlage-knopf { flex: 0 1 auto; } }
.knopf { border-radius: 4px; font-weight: 650; background: var(--pflaume); }
.knopf.leise { background: var(--flaeche-1); color: var(--text-1); border-color: var(--linie); }
.knopf.leise:hover { border-color: var(--salbei); filter: none; }
.wk-hinweis { margin: -14px 0 22px; font-size: 14px; color: var(--text-2); max-width: 110ch; }

/* ---------- Kennzahlen: flache Blätter mit großer Zahl ---------- */
.wk-zahlen { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--linie); border-radius: 6px; background: var(--flaeche-1); margin: 0 0 18px; }
.wk-kz { padding: 16px 20px 18px; border-left: 1px solid var(--linie); min-width: 0; }
.wk-kz:first-child { border-left: 0; }
.wk-kz p { margin: 0; }
.wk-kz .n { font-size: 13.5px; color: var(--text-2); font-weight: 550; }
.wk-kz .w { margin: 4px 0 2px; font-size: clamp(28px, 2.8vw, 40px); font-weight: 780; letter-spacing: -.02em; line-height: 1.05; color: var(--text-1); font-variant-numeric: tabular-nums; }
.wk-kz .w small { font-size: .42em; font-weight: 600; color: var(--text-2); margin-left: 4px; letter-spacing: 0; }
.wk-kz .u { font-size: 13px; color: var(--text-3); }
.wk-kz.p .w { color: var(--pflaume); }
.wk-kz.g .w { color: var(--salbei-tief); }
@media (max-width: 1100px) { .wk-zahlen { grid-template-columns: repeat(3, minmax(0, 1fr)); } .wk-kz:nth-child(4) { border-left: 0; } .wk-kz:nth-child(n+4) { border-top: 1px solid var(--linie); } }
@media (max-width: 620px) { .wk-zahlen { grid-template-columns: 1fr 1fr; } .wk-kz { padding: 12px 14px 14px; border-left: 0; border-top: 1px solid var(--linie); } .wk-kz:nth-child(-n+2) { border-top: 0; } .wk-kz:nth-child(even) { border-left: 1px solid var(--linie); } .wk-kz:nth-child(4) { border-left: 1px solid var(--linie); } .wk-kz .w { font-size: 26px; } }

/* ---------- Steuerleiste ---------- */
.wk-steuer { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: flex-end; padding: 14px 18px; margin: 0 0 6px; background: var(--salbei-hell); border-radius: 6px; }
.wk-feld { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 100%; margin: 0; padding: 0; border: 0; }
.wk-feld .f-name, .wk-mindest legend { font-size: 13px; color: var(--text-2); font-weight: 600; margin: 0; padding: 0; }
.wk-mindest legend { margin-bottom: 6px; }
#mindest-felder { display: flex; flex-wrap: wrap; gap: 6px 14px; }
#mindest-felder label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
#mindest-felder i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.wk-eingabe { min-height: 42px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--linie); background: var(--flaeche-1); color: var(--text-1); font: inherit; font-size: 15px; font-weight: 600; max-width: 100%; }
.wk-eingabe.kurz { width: 70px; text-align: right; }
#mindest-felder .wk-eingabe { width: 58px; text-align: right; }
.wahl { background: var(--flaeche-1); border-radius: 5px; border: 1px solid var(--linie); flex-wrap: wrap; max-width: 100%; }
.wahl button { border-radius: 4px; min-height: 38px; color: var(--text-1); font-weight: 600; }
.wahl button[aria-pressed="true"] { background: var(--pflaume); color: #fff; box-shadow: none; }

/* ---------- Abschnitte und Karten: flach, ohne Schatten ---------- */
.abschnitt { margin-top: 60px; }
.abschnitt.wk-erst { margin-top: 26px; }
.abschnitt > h2 { font-size: clamp(26px, 2.6vw, 36px); font-weight: 780; letter-spacing: -.02em; line-height: 1.08; margin-bottom: 8px; color: var(--pflaume-tief); }
.abschnitt > p.unter { max-width: 72ch; }
h1, h2 { text-wrap: balance; overflow-wrap: break-word; }
.gitter { gap: 14px; }
.karte { border-radius: 6px; padding: 20px 20px 16px; box-shadow: none; border: 1px solid var(--linie); }
.karte-kopf h2 { font-size: 18px; font-weight: 720; }
.karte-kopf .tabelle-knopf { border-radius: 4px; min-height: 36px; color: var(--text-1); }
.einsicht b { font-weight: 720; }
.legende i { border-radius: 2px; }
.tipp { border-radius: 4px; }
.tabelle-huelle { border-radius: 4px; }
.wk-leer { margin: 6px 0; color: var(--text-2); font-size: 14px; }

/* ---------- Wandkalender ---------- */
.wk-karte { padding-bottom: 14px; }
.wk-leiste { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.wk-leiste-rechts { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.wk-reiter { display: flex; flex-wrap: wrap; gap: 4px; }
.wk-reiter button {
  min-width: 52px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 5px 5px 0 0;
  background: var(--salbei); color: #fff; font: 700 15px/1 var(--kopfschrift); cursor: pointer;
  border-bottom: 4px solid var(--salbei-tief);
}
.wk-reiter button:hover { background: var(--salbei-tief); }
.wk-reiter button[aria-current="true"] { background: var(--pflaume); border-bottom-color: var(--pflaume-tief); }
.wk-haken { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; max-width: 100%; }
.wk-haken input { width: 18px; height: 18px; accent-color: var(--pflaume); flex: none; }
.wk-leg { gap: 6px 16px; }
.wk-leg li svg, .wk-leg-klein li svg { width: 14px; height: 14px; display: inline-block; flex: none; }

.wk-wand { display: grid; grid-template-columns: var(--namen-b, 190px) minmax(0, 1fr); border: 1px solid var(--linie); border-radius: 4px; overflow: hidden; background: var(--flaeche-1); }
.wk-namen { border-right: 2px solid var(--pflaume); background: var(--flaeche-1); min-width: 0; position: relative; z-index: 1; }
.wk-namen > div { display: flex; align-items: center; padding: 0 10px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--raster); }
.wk-namen > div span { overflow: hidden; text-overflow: ellipsis; }
.wk-namen .kopf { border-bottom: 1px solid var(--linie); font-size: 12px; color: var(--text-3); align-items: flex-end; padding-bottom: 6px; }
.wk-namen .abt { font-weight: 750; font-size: 13.5px; color: #fff; gap: 6px; }
.wk-namen .abt small { font-weight: 550; opacity: .85; font-size: 12px; }
.wk-namen .bk { font-weight: 750; color: var(--pflaume-tief); background: var(--pflaume-hell); border-top: 2px solid var(--pflaume); }
.wk-namen .b { font-weight: 600; gap: 6px; }
.wk-namen .b i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.wk-scroll { position: relative; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-color: var(--salbei) var(--flaeche-2); }
.wk-scroll svg { display: block; }
.wk-scroll .mon { font-family: var(--monatsschrift); font-weight: 700; fill: var(--pflaume-tief); }
.wk-scroll .tg { font-size: 10.5px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.wk-scroll .tg.fr { fill: var(--text-3); opacity: .7; }
.wk-scroll .bz { font-size: 10.5px; font-weight: 700; fill: var(--salbei-tief); }
.wk-scroll .bz.unter { fill: #fff; }
.wk-scroll .st { font-size: 11px; font-weight: 700; fill: var(--pflaume); }
.wk-wisch { margin: 8px 0 0; font-size: 13px; color: var(--text-3); }
@media (max-width: 720px) {
  .wk-wand { --namen-b: 112px; }
  .wk-namen > div { padding: 0 6px; font-size: 12px; }
  .wk-namen .abt small { display: none; }
  .wk-reiter button { min-width: 44px; font-size: 13.5px; padding: 0 6px; }
}
@media (min-width: 721px) { .wk-wisch { display: none; } }

/* ---------- Listen mit Balken (Engpässe, Urlaub, Brückentage, Abteilungen) ---------- */
.wk-zeile { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 7px 0; border-top: 1px solid var(--raster); }
.wk-zeile:first-child { border-top: 0; }
.wk-zeile .nm { font-size: 14px; font-weight: 650; min-width: 0; }
.wk-zeile .nm small { display: block; font-weight: 450; font-size: 12.5px; color: var(--text-3); }
.wk-zeile .sp { position: relative; height: 16px; background: var(--flaeche-2); border-radius: 2px; display: flex; overflow: hidden; }
.wk-zeile .sp i { display: block; height: 100%; flex: none; }
.wk-zeile .sp i.g { background: var(--a-u); }
.wk-zeile .sp i.pl { background: color-mix(in srgb, var(--a-u) 42%, #fff); }
.wk-zeile .sp i.o { background: var(--pflaume-hell); box-shadow: inset 0 0 0 1.5px var(--pflaume); }
.wk-zeile .sp i.ue { background: var(--rot); }
.wk-zeile .wt { font-size: 14px; font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wk-zeile .wt small { display: block; font-size: 12px; font-weight: 500; color: var(--text-3); }
.wk-rest .wk-zeile .nm { font-weight: 650; }
.wk-pille { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 3px; font-size: 11.5px; font-weight: 700; vertical-align: 1px; }
.wk-pille.viel { background: var(--pflaume); color: #fff; }
.wk-pille.ueber { background: var(--rot); color: #fff; }
.wk-pille.unter { background: var(--rot); color: #fff; }
@media (max-width: 620px) {
  .wk-zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .wk-zeile .nm { grid-column: 1 / -1; }
  .wk-zeile .sp { grid-column: 1; }
}

.wk-engpass .wk-zeile { grid-template-columns: minmax(0, 1fr) auto; }
.wk-engpass .wk-zeile .nm i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }

/* ---------- Summen und Annahmen ---------- */
.wk-annahmen { display: grid; gap: 8px; margin: 0 0 14px; }
.wk-annahmen label { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.wk-annahmen label > span:first-child { min-width: 170px; color: var(--text-2); font-weight: 600; }
.wk-summen { margin: 0; }
.wk-summen > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--raster); font-size: 14.5px; }
.wk-summen dt { color: var(--text-2); }
.wk-summen dd { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; }
.wk-summen .haupt dd { font-size: 22px; color: var(--pflaume); }
.wk-summen .haupt { border-top: 2px solid var(--pflaume); }

/* ---------- Krankenstand je Abteilung ---------- */
table.wk-tab { width: 100%; border-collapse: collapse; font-size: 14px; }
table.wk-tab th, table.wk-tab td { padding: 8px 6px; border-bottom: 1px solid var(--raster); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.wk-tab th:first-child, table.wk-tab td:first-child { text-align: left; white-space: normal; }
table.wk-tab th { font-size: 12.5px; color: var(--text-2); font-weight: 650; }
table.wk-tab td:first-child i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
table.wk-tab tr.ges td { font-weight: 750; border-top: 2px solid var(--text-2); }
.wk-tabkasten { position: relative; overflow-x: auto; }

/* ---------- Befunde ---------- */
.wk-befunde { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.wk-befunde li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 4px 18px; padding: 12px 0; border-top: 1px solid var(--raster); font-size: 15px; }
.wk-befunde li:first-child { border-top: 0; padding-top: 2px; }
.wk-befunde .was { font-size: 12.5px; font-weight: 750; color: var(--pflaume); padding-top: 2px; }
.wk-befunde .was.liste { color: var(--text-3); }
@media (max-width: 620px) { .wk-befunde li { grid-template-columns: 1fr; } }

.wk-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; }
.a-fuss { border-top: 3px solid var(--pflaume); }

/* Druck: Schalter stehen als Text im Berichtskopf, der Kalender bleibt ganz */
html.druckt .wk-steuer, html.druckt .wk-leiste, html.druckt .wk-wisch { display: none !important; }
html.druckt .wk-wand { break-inside: avoid; }

/* Verweis auf „Datei erkennen lassen“ */
.erkennen-satz { display: block; margin-top: 6px; font-size: 14px; color: var(--text-2); }
.erkennen-satz a { color: var(--akzent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
