/* S Quadrat Naturbau — Betriebssoftware
   ---------------------------------------------------------------------------
   Farben und Schrift stammen aus dem CI-Handbuch, nicht aus einer Ableitung:

     Grün   #6d713b   Pantone 7749c   Primärfarbe, Aktionen
     Sand   #c8ae86   Pantone 4249c   Sekundär, Hervorhebung
     Creme  #fffaf2   Pantone 663c    Hintergrund
     Braun  #413c2c   Black 2c        Schrift
     Poppins, Schriftfarbe #413c2c, Hintergrund weiß oder Creme

   Zwei Formprinzipien, beide aus dem Haus:

   1. DIE WABE. Das Logo ist ein Sechseck — Statusmarken greifen die Form auf.
   2. DER PUTZQUERSCHNITT. Putz wird geschichtet aufgebaut (Grundputz,
      Gewebelage, Oberputz — Julians Standardarbeiten). Jede Karte trägt links
      eine Schichtkante, deren Farbe den Zustand zeigt. Information, kein Zierrat.

   Die Versalien-Setzung mit Punkt kommt aus dem Claim
   „NATÜRLICH. HISTORISCH. GESUND." und kehrt in den Rubriken wieder.
   --------------------------------------------------------------------------- */

@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/poppins-400-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/poppins-400-latext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/poppins-500-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/poppins-500-latext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/poppins-600-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/poppins-600-latext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/poppins-700-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/poppins-700-latext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 800;
  font-display: swap;
  src: url("/static/fonts/poppins-800-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 800;
  font-display: swap;
  src: url("/static/fonts/poppins-800-latext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;   /* CI: Hintergrund weiß oder Creme */

  /* CI, unverändert */
  --gruen: #6d713b;
  --sand:  #c8ae86;
  --creme: #fffaf2;
  --braun: #413c2c;

  /* Abgeleitet, damit die vier Farben eine Oberfläche tragen */
  --flaeche:     #fffdf8;
  --gruen-hell:  #eceedf;
  --gruen-tief:  #4f5229;
  --sand-hell:   #f7eee0;
  --sand-tief:   #a88454;   /* Sand, lesbar abgedunkelt */
  --leise:       #736b5b;
  --linie:       #e4d8c2;
  --linie-satt:  #d3c4a6;
  --kante-neutral: #9e8e77;   /* 3,19:1 — sichtbar, ohne zu drängen */

  /* Einzige Zusatzfarbe: Achtung. Ziegelrot, erdig, sticht aber heraus. */
  --achtung:      #9c4722;
  --achtung-hell: #f8e7dd;

  --masz-1: .25rem; --masz-2: .5rem;  --masz-3: .75rem;
  --masz-4: 1rem;   --masz-6: 1.5rem; --masz-8: 2.25rem;
  --schatten: 0 1px 2px rgba(65,60,44,.04), 0 2px 8px rgba(65,60,44,.05);

  --kante: 5px;
  --rund-klein: 6px;
  --rund: 14px;
  --tippziel: 48px;

  --schrift: "Poppins", "Century Gothic", "Avenir Next", -apple-system,
             BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}


* { box-sizing: border-box; }

/* `hidden` muss jede display-Regel schlagen. Sonst steht ein Block, dem man
   display:flex gegeben hat, trotz hidden-Attribut sichtbar da — passiert
   genau einmal und man sucht lange. */
[hidden] { display: none !important; }

body {
  margin: 0;
  padding-bottom: 5.5rem;
  background: var(--creme);
  color: var(--braun);
  font: 400 16px/1.6 var(--schrift);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* Wabenraster im Grund — das Logomotiv, sehr leise. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .28;
  background-image:
    radial-gradient(circle at 50% 0, var(--linie-satt) 1px, transparent 1.3px),
    radial-gradient(circle at 0 50%, var(--linie-satt) 1px, transparent 1.3px);
  background-size: 46px 80px, 46px 80px;
  background-position: 0 0, 23px 40px;
}

/* --------------------------------------------------------------- Typografie */

h1 {
  font-size: clamp(1.9rem, 7vw, 2.9rem);
  line-height: .98; letter-spacing: -.045em; font-weight: 800;
  margin: var(--masz-1) 0 var(--masz-4); text-wrap: balance;
  text-transform: uppercase;
}

/* Rubriken in der Setzung des Claims: Versalien, gesperrt. */
h2 {
  font-size: .8125rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .16em; color: var(--gruen);
  margin: var(--masz-8) 0 var(--masz-3);
  display: flex; align-items: center; gap: var(--masz-3);
}
h2::after { content: ""; flex: 1; height: 1px; background: var(--linie); }
h3 { font-size: .9375rem; font-weight: 600; margin: 0 0 var(--masz-2);
     letter-spacing: -.01em; }
p { text-wrap: pretty; margin: 0 0 var(--masz-3); }

/* Links waren bis hier Browser-Blau — in einer erdigen Palette ein Fremdkörper. */
a { color: var(--gruen-tief); text-decoration-color: var(--sand);
    text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--gruen); text-decoration-color: var(--gruen); }
a:focus-visible { outline: 2px solid var(--gruen); outline-offset: 2px;
                  border-radius: 2px; }

/* Sand ist laut CI eine Flächenfarbe. Als Text auf Creme kam er auf 2,05:1
   und war damit unlesbar — Rubriken laufen deshalb in Grün (4,96:1). */
/* Die Setzung des Claims: Versalien, gesperrt, jedes Wort mit Punkt. */
.eyebrow {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .18em;
  font-weight: 700; color: var(--sand-tief); margin: 0 0 var(--masz-2);
}
.leise { color: var(--leise); font-size: .8125rem; }
.zahl { font-family: var(--mono); font-variant-numeric: tabular-nums;
        letter-spacing: -.02em; }

/* ------------------------------------------------------------------- Gerüst */

/* Seitenleiste links wie im ERP: alle Bereiche sichtbar, kein Suchen.
   Unter 60rem ist sie als Schublade angelegt (per Transform aus dem Bild
   geschoben) — die Fußleiste mit dem "Mehr"-Knopf holt sie bei Bedarf rein,
   damit auf dem Handy nichts von dem fehlt, was am PC sichtbar ist. */

.seitenleiste {
  position: fixed; left: 0; top: 0; bottom: 0; width: 15rem; z-index: 30;
  display: flex; flex-direction: column; gap: var(--masz-4);
  padding: var(--masz-6) var(--masz-4);
  background: var(--flaeche); border-right: 1px solid var(--linie);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .2s ease;
}
.seitenleiste.offen {
  transform: translateX(0);
  box-shadow: 0 0 2rem rgba(0, 0, 0, .3);
}
.buehne { min-height: 100vh; }

.menue-abdeckung {
  position: fixed; inset: 0; z-index: 25;
  background: rgba(0, 0, 0, .4);
}
.menue-abdeckung[hidden] { display: none; }

.menue-schliessen {
  display: block; flex-shrink: 0; width: 2rem; height: 2rem; margin-top: -.25rem;
  border: none; background: none; font-size: 1.1rem; line-height: 1;
  color: var(--leise); cursor: pointer;
}

.marke { display: block; text-decoration: none; }
.marke img { width: 100%; max-width: 11rem; height: auto; display: block; }

.menue { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.menue-rubrik {
  font-size: .625rem; text-transform: uppercase; letter-spacing: .14em;
  font-weight: 700; color: var(--leise); margin: var(--masz-4) 0 var(--masz-1);
}
.menue-rubrik:first-child { margin-top: 0; }
.menue a {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem .7rem; border-radius: var(--rund-klein);
  color: var(--braun); text-decoration: none; font-size: .9375rem;
  border-left: 3px solid transparent;
}
.menue a:hover { background: var(--gruen-hell); }
.menue a[aria-current=page] {
  background: var(--gruen-hell); border-left-color: var(--gruen);
  color: var(--gruen-tief); font-weight: 600;
}
.menue a:focus-visible { outline: 2px solid var(--gruen); outline-offset: -2px; }

.abmelden {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--masz-2); padding-top: var(--masz-3);
  border-top: 1px solid var(--linie); flex-direction: row;
}
.wer { font-size: .8125rem; color: var(--leise); }

main { max-width: 46rem; margin: 0 auto; padding: var(--masz-6) var(--masz-4); }
main.schmal { max-width: 32rem; }

/* Auf dem Handy bleibt die Fußleiste — Daumen statt Maus. */
.fuss {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: var(--flaeche);
  border-top: 1px solid var(--linie);
  padding-bottom: env(safe-area-inset-bottom);
}
.fuss a {
  flex: 1; min-height: var(--tippziel); padding: .8rem .2rem;
  text-align: center; font-size: .625rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--leise); text-decoration: none;
  border-top: 2px solid transparent; margin-top: -1px;
}
.fuss a[aria-current=page] { color: var(--gruen); border-top-color: var(--gruen); }

.fuss-mehr {
  flex: 1; min-height: var(--tippziel); padding: .8rem .2rem;
  text-align: center; font-size: .625rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--leise); background: none; border: none;
  border-top: 2px solid transparent; margin-top: -1px; cursor: pointer;
}
.fuss-mehr[aria-expanded=true] { color: var(--gruen); border-top-color: var(--gruen); }

@media (min-width: 60rem) {
  .seitenleiste { transform: none; box-shadow: none; }
  .buehne { margin-left: 15rem; }
  .fuss { display: none; }
  .menue-abdeckung { display: none !important; }
  .menue-schliessen { display: none; }
  body { padding-bottom: var(--masz-8); }
}


/* ------------------------------------------------------- Karte + Schichtkante */

.karte, .zeile {
  position: relative; background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: var(--rund);
  box-shadow: var(--schatten);
  padding: var(--masz-4) var(--masz-6); overflow: hidden;
}

[data-schicht] { padding-left: calc(var(--masz-4) + var(--kante)); }
[data-schicht]::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--kante); background: var(--kante-neutral);
  transform-origin: bottom;
  animation: auftragen .45s cubic-bezier(.2,.7,.3,1) both;
}
[data-schicht="dran"]::before     { background: var(--gruen); }
[data-schicht="dringend"]::before { background: var(--achtung); }
[data-schicht="erledigt"]::before { background: var(--sand-tief); }
[data-schicht="offen"]::before    { background: var(--kante-neutral); }

@keyframes auftragen { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.karte + .karte, .liste > * + * { margin-top: var(--masz-3); }

/* ------------------------------------------------------------------ Tagestafel */

.tafel {
  display: flex; align-items: flex-end; gap: var(--masz-4);
  padding: var(--masz-4) 0 var(--masz-6);
  border-bottom: 1px solid var(--linie-satt);
  margin-bottom: var(--masz-4);
}
.tafel-zahl {
  font-family: var(--schrift); font-size: clamp(3rem, 15vw, 4.75rem);
  line-height: .78; font-weight: 800; letter-spacing: -.07em;
  font-variant-numeric: tabular-nums; color: var(--gruen);
}
.tafel-zahl small { font-size: .28em; font-weight: 600; color: var(--leise);
                    letter-spacing: 0; margin-left: .25em; }
.tafel-text { flex: 1; padding-bottom: .35rem; }

/* --------------------------------------------------------------- Aktionsliste */

.aktionen { display: flex; flex-direction: column; gap: var(--masz-2); }
.aktion {
  display: flex; align-items: center; gap: var(--masz-3);
  min-height: 3.75rem; padding: var(--masz-3) var(--masz-4);
  padding-left: calc(var(--masz-4) + var(--kante));
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--rund); box-shadow: var(--schatten);
  text-decoration: none; color: var(--braun);
  position: relative; overflow: hidden;
}
.aktion::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--kante); background: var(--linie-satt);
  transition: background .16s ease;
}
.aktion:hover::before, .aktion:focus-visible::before { background: var(--gruen); }
.aktion b { display: block; font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.aktion span span { display: block; font-size: .8125rem; color: var(--leise); }
.aktion .pfeil { margin-left: auto; color: var(--linie-satt); }
.aktion:focus-visible { outline: 2px solid var(--gruen); outline-offset: 2px; }

/* ------------------------------------------------------------------ Formulare */

form { display: flex; flex-direction: column; gap: var(--masz-4); }
.feld { display: flex; flex-direction: column; gap: var(--masz-1); }
.feld > label {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .11em;
  font-weight: 600; color: var(--leise);
}
.erklaerung { font-size: .8125rem; color: var(--leise); }

input[type=text], input[type=date], input[type=time], input[type=number],
input[type=password], input[type=file], select, textarea {
  font: inherit; width: 100%; min-height: var(--tippziel);
  padding: .6rem .8rem; color: var(--braun); background: var(--creme);
  border: 1px solid var(--linie-satt); border-radius: var(--rund-klein);
}
input[type=time], input[type=date], input[type=number] { font-family: var(--mono); }
textarea { min-height: 5rem; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gruen); outline-offset: 1px; border-color: var(--gruen);
}

.knopfreihe { display: flex; flex-wrap: wrap; gap: var(--masz-2); }
.knopfreihe label {
  flex: 1 1 auto; min-width: 3.5rem; min-height: var(--tippziel);
  display: flex; align-items: center; justify-content: center;
  padding: 0 .8rem; text-align: center; cursor: pointer;
  font-size: .9375rem; font-family: var(--mono);
  background: var(--flaeche); border: 1px solid var(--linie-satt);
  border-radius: var(--rund-klein); white-space: nowrap;
}
.knopfreihe label:has(input:checked) {
  background: var(--gruen); border-color: var(--gruen); color: var(--creme);
  font-weight: 600;
}
.knopfreihe input { position: absolute; opacity: 0; width: 0; height: 0; }
.knopfreihe label:has(input:focus-visible) { outline: 2px solid var(--braun); outline-offset: 2px; }
.knopfreihe.wort label { font-family: var(--schrift); }

button, .knopf {
  font: inherit; font-weight: 600; min-height: var(--tippziel);
  padding: .7rem 1.3rem; border-radius: var(--rund-klein); cursor: pointer;
  border: 1px solid var(--gruen); background: var(--gruen); color: var(--creme);
  text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; gap: var(--masz-2); letter-spacing: .01em;
}
button.zweit, .knopf.zweit {
  background: transparent; color: var(--gruen); border-color: var(--linie-satt);
}
button.link {
  background: none; border: none; color: var(--leise); padding: .25rem;
  font-weight: 400; font-size: .8125rem; min-height: auto; text-decoration: underline;
}
button:focus-visible, .knopf:focus-visible { outline: 2px solid var(--braun); outline-offset: 2px; }

/* ------------------------------------------------------------------- Auswahl

   Statt Dropdown: alles gleichzeitig sichtbar und mit einem Tipp erreichbar.
   Ein <select> kostet auf dem Handy drei Aktionen (öffnen, scrollen, tippen)
   und verdeckt dabei das Formular. */

.wahl {
  display: grid; gap: var(--masz-2);
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
}
.wahl label {
  display: flex; flex-direction: column; gap: .15rem; cursor: pointer;
  padding: var(--masz-3); min-height: var(--tippziel);
  background: var(--flaeche); border: 1px solid var(--linie-satt);
  border-radius: var(--rund-klein); justify-content: center;
}
.wahl label b { font-size: .9375rem; font-weight: 600; letter-spacing: -.01em; }
.wahl label span { font-size: .75rem; color: var(--leise); }
.wahl input { position: absolute; opacity: 0; width: 0; height: 0; }
.wahl label:has(input:checked) {
  background: var(--gruen-hell); border-color: var(--gruen);
  box-shadow: inset 3px 0 0 var(--gruen);
}
.wahl label:has(input:checked) b { color: var(--gruen-tief); }
.wahl label:has(input:focus-visible) { outline: 2px solid var(--gruen); outline-offset: 2px; }
.wahl label:hover { border-color: var(--gruen); }

/* Lange Listen: Suchfeld darüber, JS blendet aus. */
.wahl-suche { margin-bottom: var(--masz-2); }
.wahl label[hidden] { display: none; }

/* -------------------------------------------------------------------- Hinweise */

.hinweis {
  padding: var(--masz-3) var(--masz-4); border-radius: var(--rund);
  margin: 0 0 var(--masz-4); font-size: .9375rem;
  position: relative; padding-left: calc(var(--masz-4) + var(--kante));
}
.hinweis::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--kante);
}
.hinweis.info { background: var(--gruen-hell); }
.hinweis.info::before { background: var(--gruen); }
.hinweis.fehler, .hinweis.warn { background: var(--achtung-hell); }
.hinweis.fehler::before, .hinweis.warn::before { background: var(--achtung); }

/* ---------------------------------------------------------------------- Listen */

.liste { list-style: none; margin: 0; padding: 0; }
.zeile { display: flex; justify-content: space-between; align-items: flex-start;
         gap: var(--masz-3); }
.zeile .haupt { font-weight: 600; letter-spacing: -.01em; }
.zeile .neben { font-size: .8125rem; color: var(--leise); }

/* Statusmarken als Wabe — das Logomotiv im Kleinen. */
.marke-punkt {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .625rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .09em; padding: .2rem .5rem; border-radius: var(--rund-klein);
}
.marke-punkt::before {
  content: ""; width: .5rem; height: .55rem; background: currentColor;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.marke-punkt.warn { background: var(--achtung-hell); color: var(--achtung); }
.marke-punkt.gut { background: var(--gruen-hell); color: var(--gruen-tief); }
.marke-punkt.neu { background: var(--gruen); color: var(--creme); }
.marke-warn { color: var(--achtung); font-weight: 600; }

.tabelle-huelle { overflow-x: auto; margin: 0 calc(var(--masz-4) * -1);
                  padding: 0 var(--masz-4); }
table { border-collapse: collapse; width: 100%; font-size: .875rem; }
th, td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--linie); }
th { font-size: .625rem; text-transform: uppercase; letter-spacing: .11em;
     color: var(--leise); font-weight: 600; }
td.zahl, th.zahl { text-align: right; font-family: var(--mono);
                   font-variant-numeric: tabular-nums; }
tfoot th { border-bottom: none; border-top: 1px solid var(--gruen); color: var(--braun);
           font-size: .8125rem; letter-spacing: 0; text-transform: none; }

/* -------------------------------------------------------------- Fortschritt */

.balken { height: 5px; background: var(--linie); border-radius: 99px; overflow: hidden; }
.balken > i { display: block; height: 100%; background: var(--gruen); border-radius: 99px; }
.balken.knapp > i { background: var(--achtung); }

/* -------------------------------------------------------------------- Fotos */

.fotogitter { display: grid; gap: var(--masz-2);
              grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); }
.fotogitter img { width: 100%; aspect-ratio: 4/3; object-fit: cover;
                  border-radius: var(--rund-klein); border: 1px solid var(--linie);
                  display: block; }

.unterschrift-feld {
  width: 100%; height: 12rem; touch-action: none; background: var(--flaeche);
  border: 1px dashed var(--linie-satt); border-radius: var(--rund-klein);
}

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

@media print {
  .kopf, .fuss, button, .knopf, body::before { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  main { max-width: none; }
  .karte { border: none; padding: 0; }
  [data-schicht]::before { display: none; }
  h2::after { display: none; }
}

/* ------------------------------------------------------------------- Board

   Spalten mit Karten, die man zwischen ihnen zieht: Aufgaben nach Zustand,
   Werkzeug nach Standort, Material nach Lager.

   Bewusst mit Pointer-Events statt der HTML5-Drag-API — die funktioniert auf
   Touch-Geräten nicht, und die halbe Mannschaft arbeitet am Handy. Jede Karte
   trägt zusätzlich Knöpfe, damit es ohne JavaScript und mit Tastatur geht. */

.board {
  display: grid; gap: var(--masz-3); align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.spalte {
  background: var(--creme); border: 1px solid var(--linie);
  border-radius: var(--rund); padding: var(--masz-3);
  min-height: 7rem; transition: background .12s ease, border-color .12s ease;
}
.spalte-kopf {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--masz-2); margin-bottom: var(--masz-3);
}
.spalte-kopf h3 {
  margin: 0; font-size: .6875rem; text-transform: uppercase;
  letter-spacing: .13em; color: var(--leise); font-weight: 700;
}
.spalte-kopf .anzahl {
  font-family: var(--mono); font-size: .75rem; color: var(--leise);
}
.spalte[data-ziel="dran"] .spalte-kopf h3 { color: var(--gruen); }

/* Beim Ziehen: nur das Ziel unter dem Finger hebt sich hervor. */
.spalte.bereit {
  background: var(--gruen-hell); border-color: var(--gruen);
  border-style: dashed;
}

.karten { display: flex; flex-direction: column; gap: var(--masz-2); min-height: 2.5rem; }

.zugkarte {
  position: relative; background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: var(--rund-klein);
  box-shadow: var(--schatten); padding: var(--masz-3);
  padding-left: calc(var(--masz-3) + var(--kante));
  touch-action: none;                 /* sonst scrollt die Seite beim Ziehen */
  cursor: grab; user-select: none;
}
.zugkarte::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--kante); background: var(--kante-neutral);
}
.zugkarte[data-schicht="dran"]::before { background: var(--gruen); }
.zugkarte[data-schicht="dringend"]::before { background: var(--achtung); }
.zugkarte[data-schicht="erledigt"]::before { background: var(--sand-tief); }
.zugkarte b { display: block; font-size: .9375rem; font-weight: 600;
              letter-spacing: -.01em; }
.zugkarte span { display: block; font-size: .75rem; color: var(--leise); }
.zugkarte:focus-visible { outline: 2px solid var(--gruen); outline-offset: 2px; }

.zugkarte.faehrt {
  position: fixed; z-index: 50; pointer-events: none; width: 14rem;
  cursor: grabbing; box-shadow: 0 8px 24px rgba(65,60,44,.18);
  transform: rotate(-1.5deg); opacity: .95;
}
.zugkarte.platzhalter { opacity: .3; }

.zugkarte-knoepfe {
  display: flex; flex-wrap: wrap; gap: var(--masz-1);
  margin-top: var(--masz-2);
}
.zugkarte-knoepfe button {
  min-height: 2rem; padding: .25rem .6rem; font-size: .75rem;
  font-weight: 500; background: transparent; color: var(--leise);
  border-color: var(--linie-satt);
}
.zugkarte-knoepfe button:hover { color: var(--gruen); border-color: var(--gruen); }

/* Auf dem Zeigergerät verrät ein Griffpunkt, dass man ziehen kann. */
@media (hover: hover) {
  .zugkarte::after {
    content: "⠿"; position: absolute; top: .5rem; right: .6rem;
    color: var(--linie-satt); font-size: .75rem; line-height: 1;
  }
}

.board-hinweis {
  font-size: .8125rem; color: var(--leise); margin: 0 0 var(--masz-4);
}

/* ------------------------------------------------------------ Schieberegler

   Für die Pause: 0 bis 180 Minuten in Fünferschritten. Ein Regler trifft die
   Wirklichkeit besser als vier feste Knöpfe — 20 Minuten Brotzeit gibt es
   genauso wie zweieinhalb Stunden Anfahrt dazwischen. */

.regler {
  display: flex; align-items: center; gap: var(--masz-4);
}
.regler input[type=range] {
  flex: 1; height: var(--tippziel); margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent;
}
.regler input[type=range]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 99px; background: var(--linie);
}
.regler input[type=range]::-moz-range-track {
  height: 6px; border-radius: 99px; background: var(--linie);
}
/* Großer Griff — auf dem Gerüst wird mit dem Daumen bedient. */
.regler input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 2rem; height: 2rem; margin-top: -.8rem; border-radius: 50%;
  background: var(--gruen); border: 3px solid var(--flaeche);
  box-shadow: 0 1px 4px rgba(65,60,44,.25); cursor: grab;
}
.regler input[type=range]::-moz-range-thumb {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--gruen); border: 3px solid var(--flaeche);
  box-shadow: 0 1px 4px rgba(65,60,44,.25); cursor: grab;
}
.regler input[type=range]:focus-visible { outline: 2px solid var(--gruen); outline-offset: 4px; }

.regler-wert {
  font-family: var(--mono); font-size: 1.05rem; font-weight: 600;
  color: var(--gruen); min-width: 5.5rem; text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------- Karte: klickbar + Haken

   Die Karte ist ein Link auf die Aufgabe. Das Kästchen links oben wählt sie
   für eine Sammelaktion aus, ohne sie zu öffnen. Ziehen geht weiterhin —
   der Zug greift erst nach ein paar Pixeln, ein Tipp bleibt also ein Tipp. */

.zugkarte .karte-link {
  display: block; text-decoration: none; color: var(--braun);
  padding-right: 1.5rem;
}
.zugkarte .karte-link:hover b { color: var(--gruen-tief); }
.zugkarte .karte-link b { display: block; font-size: .9375rem; font-weight: 600;
                          letter-spacing: -.01em; margin-bottom: .15rem; }
.zugkarte .karte-link span { display: block; font-size: .75rem; color: var(--leise); }
.zugkarte .karte-umfang {
  font-family: var(--mono); color: var(--gruen) !important; font-weight: 600;
}

.karte-haken {
  position: absolute; top: .4rem; right: .4rem; z-index: 2;
  width: 1.75rem; height: 1.75rem; display: flex;
  align-items: center; justify-content: center; cursor: pointer;
}
.karte-haken input { width: 1.15rem; height: 1.15rem; accent-color: var(--gruen); }
.zugkarte:has(.karte-haken input:checked) {
  border-color: var(--gruen); background: var(--gruen-hell);
}
@media (hover: hover) { .zugkarte::after { display: none; } }

.sammelleiste {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--masz-3); flex-wrap: wrap;
  background: var(--gruen-hell); border: 1px solid var(--gruen);
  border-radius: var(--rund); padding: var(--masz-3) var(--masz-4);
  margin-bottom: var(--masz-3);
}
.sammel-anzahl { font-size: .9375rem; }
.sammel-anzahl b { font-family: var(--mono); font-size: 1.1rem; color: var(--gruen-tief); }

/* ------------------------------------------------------- Werkzeugplan

   Ein Tag ist eine Rasterspalte. Ein Einsatz spannt so viele Spalten, wie er
   Tage dauert — dadurch stimmt die Länge des Balkens mit der Dauer überein,
   ohne dass irgendwo eine Pixelrechnung steht. */

.plan {
  display: grid;
  grid-template-columns: 11rem repeat(var(--tage), 1.35rem);
  align-items: center;
  min-width: max-content;
}
.plan-ecke { grid-column: 1; }
.plan-monat {
  font-size: .6875rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--leise);
  padding: 0 0 var(--masz-1) .2rem; white-space: nowrap;
}
.plan-tag {
  font-family: var(--mono); font-size: .6875rem; color: var(--leise);
  text-align: center; padding-bottom: var(--masz-2);
  border-bottom: 1px solid var(--linie);
}
.plan-tag.wochenende { color: var(--linie-satt); }
.plan-tag.heute {
  color: var(--creme); background: var(--gruen); border-radius: 99px 99px 0 0;
  font-weight: 600;
}

.plan-name {
  grid-column: 1; padding: var(--masz-2) var(--masz-3) var(--masz-2) 0;
  border-bottom: 1px solid var(--linie); align-self: stretch;
  display: flex; flex-direction: column; justify-content: center;
}
.plan-name a { font-size: .875rem; font-weight: 600; text-decoration: none; }
.plan-name span { font-size: .75rem; color: var(--leise); }
.plan-name.warn a { color: var(--achtung); }

.plan-spur {
  display: grid; grid-template-columns: subgrid;
  grid-auto-rows: minmax(2.5rem, auto); align-items: center;
  border-bottom: 1px solid var(--linie); position: relative;
}
.plan-zelle { grid-row: 1; height: 100%; border-left: 1px solid var(--creme); }
.plan-zelle.wochenende { background: var(--sand-hell); }

.plan-balken {
  grid-row: 1; z-index: 1;
  background: var(--gruen); color: var(--creme);
  font-size: .75rem; font-weight: 500; text-decoration: none;
  padding: .4rem .5rem; margin: 0 1px; border-radius: var(--rund-klein);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.plan-balken:hover { background: var(--gruen-tief); color: var(--creme); }
.plan-balken.konflikt { background: var(--achtung); }
.plan-balken:focus-visible { outline: 2px solid var(--braun); outline-offset: 2px; }
