/* Deliberately one small stylesheet: the dashboard has to render on a phone in
   a stairwell with no build step and no framework. */

:root {
  --grund: #f6f6f4;
  --karte: #ffffff;
  --rand: #d9d7d0;
  --text: #23221f;
  --leise: #6b6862;
  --akzent: #2f5d50;
  --rot: #9c2b2b;
  --gelb: #8a6d1a;
  --gruen: #2f6b3a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

header {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  align-items: center; justify-content: space-between;
  padding: .6rem 1rem;
  background: var(--akzent); color: #fff;
}
header nav { display: flex; flex-wrap: wrap; gap: 1rem; align-items: baseline; }
header a { color: #fff; text-decoration: none; }
header a:hover, header a.aktiv { text-decoration: underline; }
header .marke { font-weight: 700; }
header .abmelden { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }

main { max-width: 72rem; margin: 0 auto; padding: 1rem; }
footer {
  max-width: 72rem; margin: 2rem auto; padding: 1rem;
  color: var(--leise); font-size: .85rem;
}

h1 { font-size: 1.5rem; margin: .4rem 0 1rem; }
h2 { font-size: 1.1rem; margin: 1.6rem 0 .5rem; }
code { background: #eceae4; padding: .05em .3em; border-radius: 3px; font-size: .9em; }
.erlaeuterung { color: var(--leise); margin: .2rem 0 1rem; }

/* --- messages ---------------------------------------------------------- */
.hinweis {
  padding: .7rem .9rem; border-radius: 6px; margin: .5rem 0;
  border-left: 4px solid var(--leise); background: var(--karte);
}
.hinweis ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.hinweis.fehler  { border-color: var(--rot);   background: #fbf0f0; }
.hinweis.warnung { border-color: var(--gelb);  background: #fbf7ea; }
.hinweis.erfolg  { border-color: var(--gruen); background: #eef6ef; }

/* --- tables ------------------------------------------------------------ */
.daten {
  width: 100%; border-collapse: collapse; background: var(--karte);
  border: 1px solid var(--rand); border-radius: 6px;
}
.daten th, .daten td {
  text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--rand);
  vertical-align: top;
}
.daten th { font-weight: 600; color: var(--leise); white-space: nowrap; }
.daten tr:last-child td { border-bottom: none; }
.breit { display: block; overflow-x: auto; }
.knapp { white-space: nowrap; color: var(--leise); font-variant-numeric: tabular-nums; }
.pfad, .grund { font-size: .85rem; color: var(--leise); word-break: break-word; }
tr.ergebnis-unklar td, tr.ergebnis-fehler td { background: #fdf8ee; }
tr.erledigt td { opacity: .55; }

.marke {
  display: inline-block; font-size: .72rem; padding: .05em .4em;
  border-radius: 3px; background: #eceae4; color: var(--leise);
}
.marke.gut { background: #e4efe6; color: var(--gruen); }

/* --- forms ------------------------------------------------------------- */
button, .knopf {
  font: inherit; font-size: .9rem; padding: .3rem .7rem; cursor: pointer;
  border: 1px solid var(--rand); border-radius: 5px;
  background: var(--karte); color: var(--text); text-decoration: none;
}
button:hover, .knopf:hover { border-color: var(--akzent); }
button.haupt { background: var(--akzent); color: #fff; border-color: var(--akzent); }
header button { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }

input, select {
  font: inherit; font-size: .9rem; padding: .3rem .4rem;
  border: 1px solid var(--rand); border-radius: 5px; background: #fff;
  max-width: 100%;
}
label { display: block; margin: .4rem 0; font-size: .85rem; color: var(--leise); }
label input, label select { display: block; width: 100%; margin-top: .15rem;
  color: var(--text); font-size: 1rem; }
label small { color: var(--leise); font-size: .8rem; }

.filter { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end;
  margin-bottom: 1rem; }
.filter label { margin: 0; }
.filter .anzahl { color: var(--leise); font-size: .85rem; }

.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0 1rem; align-items: end; background: var(--karte); padding: 1rem;
  border: 1px solid var(--rand); border-radius: 6px; }
.raster .voll { grid-column: 1 / -1; }
.raster button { grid-column: 1 / -1; justify-self: start; margin-top: .8rem; }

.rueckmeldung { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.rueckmeldung input { min-width: 8rem; }

/* --- overview ---------------------------------------------------------- */
.kacheln { list-style: none; display: flex; flex-wrap: wrap; gap: .8rem;
  padding: 0; margin: .5rem 0 1rem; }
.kacheln li {
  background: var(--karte); border: 1px solid var(--rand); border-radius: 6px;
  padding: .7rem 1.1rem; min-width: 8rem; color: var(--leise); font-size: .85rem;
}
.kacheln .zahl { display: block; font-size: 1.7rem; color: var(--text);
  font-variant-numeric: tabular-nums; }

.blaettern { display: flex; gap: .6rem; margin-top: 1rem; }
.berichte { line-height: 2; }

/* --- login ------------------------------------------------------------- */
.anmeldeseite { display: flex; min-height: 100vh; align-items: center; }
.anmeldung {
  max-width: 22rem; margin: auto; background: var(--karte); padding: 1.5rem;
  border: 1px solid var(--rand); border-radius: 8px;
}
.anmeldung button { width: 100%; margin-top: 1rem; background: var(--akzent);
  color: #fff; border-color: var(--akzent); padding: .5rem; font-size: 1rem; }

/* --- rendered report --------------------------------------------------- */
.bericht {
  background: var(--karte); border: 1px solid var(--rand); border-radius: 6px;
  padding: 1rem 1.4rem;
}
.bericht table { border-collapse: collapse; margin: .6rem 0; }
.bericht th, .bericht td { border: 1px solid var(--rand); padding: .3rem .6rem;
  text-align: left; }
.bericht blockquote { margin: .6rem 0; padding-left: .9rem;
  border-left: 3px solid var(--rand); color: var(--leise); }
