/* ContentWerkstatt STEINEhunger
   Dunkel, damit die Fotos wirken und nicht die Oberflaeche.
   Kanten ohne Rundung. Die Aktionsfarbe gehoert den Knoepfen, sonst nirgends.
   Keine fremde Schrift, kein Schriftdienst. */

:root {
  --grund:        #16181c;
  --flaeche:      #1e2126;
  --flaeche-hoch: #262a30;
  --linie:        #343a42;
  --schrift:      #e8eaed;
  --schrift-leise:#9aa3ad;
  --aktion:       #e30613;   /* das Rot aus dem Stein im Logo, nur auf Knoepfen */
  --aktion-hell:  #ff2a37;
  --gelb:         #f8c800;   /* das Gelb der Gelbkoepfe, zweiter Akzent */
  --gut:          #3fb950;
  --warnung:      #d9a441;
  --offen:        #58a6ff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--grund);
  color: var(--schrift);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--offen); }

/* ---------------------------------------------------------------- Kopf */

header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: var(--flaeche);
  border-bottom: 1px solid var(--linie);
  position: sticky;
  top: 0;
  z-index: 20;
}

/* Das Logo und der Absender gehoeren zusammen und fuehren beide nach Hause. */
header .marke {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

header img.logo { height: 52px; width: auto; display: block; }

header .markentext { display: flex; flex-direction: column; line-height: 1.15; }

header .markentext strong {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

header .markentext span {
  font-size: 11px;
  color: var(--schrift-leise);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-top: 2px;
}

header h1 {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  color: var(--schrift-leise);
  padding-left: 16px;
  border-left: 1px solid var(--linie);
}

header .luecke { flex: 1; }

@media (max-width: 720px) {
  header img.logo { height: 38px; }
  header .markentext strong { font-size: 16px; }
  header h1 { display: none; }
}

/* ---------------------------------------------------------------- Knoepfe */

button, .knopf {
  font: inherit;
  padding: 8px 14px;
  border: 1px solid var(--linie);
  border-radius: 0;
  background: var(--flaeche-hoch);
  color: var(--schrift);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:hover, .knopf:hover { background: #30353c; }

button.tat, .knopf.tat {
  background: var(--aktion);
  border-color: var(--aktion);
  color: #fff;
  font-weight: 600;
}

button.tat:hover, .knopf.tat:hover { background: var(--aktion-hell); border-color: var(--aktion-hell); }

button:disabled, button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

button.leise { background: transparent; }

/* ---------------------------------------------------------------- Felder */

input[type=text], input[type=datetime-local], textarea, select {
  font: inherit;
  width: 100%;
  padding: 8px 10px;
  background: var(--grund);
  color: var(--schrift);
  border: 1px solid var(--linie);
  border-radius: 0;
}

textarea { resize: vertical; min-height: 80px; line-height: 1.55; }

label.feld {
  display: block;
  margin: 14px 0 5px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--schrift-leise);
}

input[type=range] { width: 100%; accent-color: var(--aktion); }

/* ---------------------------------------------------------------- Aufbau */

.spalten {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: calc(100vh - 57px);
}

.seitenleiste {
  background: var(--flaeche);
  border-right: 1px solid var(--linie);
  padding: 14px 0;
  overflow-y: auto;
  max-height: calc(100vh - 57px);
  position: sticky;
  top: 57px;
}

.seitenleiste h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--schrift-leise);
  margin: 4px 16px 8px;
  font-weight: 600;
}

.ordner {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 16px;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.ordner:hover { background: var(--flaeche-hoch); }
.ordner.aktiv { background: var(--flaeche-hoch); border-left-color: var(--aktion); }
.ordner.nachschub { font-weight: 600; }
.ordner .anzahl { color: var(--schrift-leise); font-size: 12px; }

main { padding: 20px 24px 120px; }

/* ---------------------------------------------------------------- Bilderraster */

.raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.kachel {
  position: relative;
  aspect-ratio: 1;
  background: var(--flaeche);
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
}

.kachel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kachel.gewaehlt { border-color: var(--aktion); }

.kachel .nummer {
  position: absolute;
  top: 6px; left: 6px;
  background: var(--aktion);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  width: 22px; height: 22px;
  display: none;
  align-items: center;
  justify-content: center;
}
.kachel.gewaehlt .nummer { display: flex; }

.kachel .art {
  position: absolute;
  bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.7);
  font-size: 10px;
  padding: 2px 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------------------------------------------------------------- Ablage */

.ablage {
  border: 2px dashed var(--linie);
  padding: 16px;
  margin-bottom: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  transition: border-color 0.12s, background 0.12s;
}
.ablage.drueber { border-color: var(--gelb); background: var(--flaeche); }
.ablage strong { font-size: 14px; }

/* ---------------------------------------------------------------- Filterleiste */

.filterleiste {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  margin-bottom: 10px;
}

.filterleiste .luecke { flex: 1; }
.filterleiste select { width: auto; padding: 5px 8px; }

.filtertitel {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--schrift-leise);
}

.knopfgruppe { display: flex; }
.knopfgruppe button {
  padding: 5px 11px;
  border-right: none;
  font-size: 13px;
}
.knopfgruppe button:last-child { border-right: 1px solid var(--linie); }
.knopfgruppe button.an {
  background: var(--gelb);
  border-color: var(--gelb);
  color: #181818;
  font-weight: 600;
}

/* Ein Bild, das nach Nicoles Regeln nicht in Frage kommt: Mensch im Bild,
   kein Lego, unfertiger Bau. Bleibt sichtbar, wenn das Ausblenden aus ist,
   aber gedimmt und mit Grund. */
.kachel.ungeeignet img { opacity: 0.35; filter: grayscale(0.6); }
.kachel .grund {
  position: absolute;
  top: 6px; right: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 6px;
  background: var(--aktion);
  color: #fff;
}
.kachel .grund.im-bau { background: var(--warnung); color: #181818; }
.kachel .geprueft {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--gut);
}

/* Das Aufnahmedatum auf der Kachel. */
.kachel .zeit {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.82));
  color: #fff;
  font-size: 11px;
  padding: 14px 6px 4px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}
.kachel .zeit .jz { color: var(--gelb); }

/* ---------------------------------------------------------------- Fussleiste */

.fussleiste {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--flaeche);
  border-top: 1px solid var(--linie);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 30;
  transform: translateY(100%);
  transition: transform 0.15s ease-out;
}
.fussleiste.da { transform: translateY(0); }
.fussleiste .luecke { flex: 1; }
.fussleiste select { width: auto; }

/* ---------------------------------------------------------------- Beitragsliste */

.liste { border: 1px solid var(--linie); }

.zeile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--linie);
  text-decoration: none;
  color: inherit;
}
.zeile:last-child { border-bottom: none; }
.zeile:hover { background: var(--flaeche); }
.zeile .titel { flex: 1; font-weight: 500; }
.zeile .leise { color: var(--schrift-leise); font-size: 13px; }

.pille {
  font-size: 11px;
  padding: 2px 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--linie);
}
.pille.entwurf       { color: var(--schrift-leise); }
.pille.freigegeben   { color: var(--warnung); border-color: var(--warnung); }
.pille.veroeffentlicht { color: var(--gut); border-color: var(--gut); }
.pille.fehler        { color: var(--aktion-hell); border-color: var(--aktion-hell); }

/* ---------------------------------------------------------------- Editor */

.editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1100px) {
  .editor { grid-template-columns: 1fr; }
  .spalten { grid-template-columns: 1fr; }
  .seitenleiste { position: static; max-height: none; }
}

.kasten {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  padding: 16px;
  margin-bottom: 18px;
}

.kasten h2 {
  margin: 0 0 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--schrift-leise);
  font-weight: 600;
}

.kasten p.leise { color: var(--schrift-leise); font-size: 13px; margin: 0 0 12px; }

.bildkarte { border: 1px solid var(--linie); margin-bottom: 14px; }
.bildkarte .vorschau { background: #000; display: flex; justify-content: center; }
.bildkarte .vorschau img { max-width: 100%; max-height: 360px; display: block; }
.bildkarte .regler { padding: 10px 12px; display: grid; gap: 8px; }
.bildkarte .kopf {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-bottom: 1px solid var(--linie);
  font-size: 13px;
}
.bildkarte .kopf .luecke { flex: 1; }

.reglerzeile { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; font-size: 12px; color: var(--schrift-leise); }

/* Was die Einmessung ergeben hat. */
.messzeile {
  padding: 6px 12px;
  font-size: 12px;
  color: var(--schrift-leise);
  border-bottom: 1px solid var(--linie);
}

.werkwarnung {
  padding: 7px 12px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--linie);
  border-left: 3px solid transparent;
}
.werkwarnung.gut     { color: var(--gut); border-left-color: var(--gut); }
.werkwarnung.unklar  { color: var(--warnung); border-left-color: var(--warnung); }
.werkwarnung.schlecht{ color: var(--aktion-hell); border-left-color: var(--aktion-hell); font-weight: 600; }

/* ---------------------------------------------------------------- Pruefung */

.befund { display: flex; gap: 9px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--linie); }
.befund:last-child { border-bottom: none; }
.befund .marke { font-weight: 700; flex-shrink: 0; width: 16px; text-align: center; }
.befund.fehler .marke  { color: var(--aktion-hell); }
.befund.hinweis .marke { color: var(--warnung); }
.befund.offen .marke   { color: var(--offen); }

.zaehler { font-variant-numeric: tabular-nums; color: var(--schrift-leise); font-size: 12px; }
.zaehler.zuviel { color: var(--aktion-hell); font-weight: 600; }

pre.caption {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--grund);
  border: 1px solid var(--linie);
  padding: 12px;
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  max-height: 420px;
  overflow-y: auto;
}

/* ---------------------------------------------------------------- Zustand */

.zustand {
  font-size: 13px;
  color: var(--schrift-leise);
  padding: 6px 0;
  min-height: 24px;
}
.zustand.arbeitet { color: var(--warnung); }
.zustand.schlecht { color: var(--aktion-hell); }
.zustand.gut { color: var(--gut); }

.leer { color: var(--schrift-leise); padding: 40px 0; text-align: center; }

/* ---------------------------------------------------------------- Plan */

.monat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--linie); border: 1px solid var(--linie); }
.tag { background: var(--grund); min-height: 110px; padding: 6px; }
.tag.fremd { background: var(--flaeche); opacity: 0.45; }
.tag .datum { font-size: 12px; color: var(--schrift-leise); margin-bottom: 4px; }
.tag.heute .datum { color: var(--aktion-hell); font-weight: 700; }
.wochenkopf { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; margin-bottom: 1px; }
.wochenkopf div { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--schrift-leise); padding: 6px; }

.kaertchen { display: block; font-size: 12px; padding: 4px 6px; margin-bottom: 4px; background: var(--flaeche-hoch); border-left: 3px solid var(--schrift-leise); text-decoration: none; color: inherit; }
.kaertchen.freigegeben { border-left-color: var(--warnung); }
.kaertchen.veroeffentlicht { border-left-color: var(--gut); }
.kaertchen.fehler { border-left-color: var(--aktion-hell); }
.umriss { font-size: 11px; padding: 4px 6px; margin-bottom: 4px; border: 1px dashed var(--linie); color: var(--schrift-leise); }

/* ---------------------------------------------------------------- Anmelden */

.anmeldeseite {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.anmeldekasten {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  padding: 32px 28px;
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.anmeldekasten .logo { height: 64px; width: auto; align-self: center; margin-bottom: 14px; }
.anmeldekasten strong { font-size: 19px; text-align: center; }
.anmeldekasten > .zaehler { text-align: center; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px; }
.anmeldekasten button { margin-top: 14px; }

/* ---------------------------------------------------------------- Anleitung */

ol.anleitung { margin: 0; padding-left: 22px; }
ol.anleitung li { margin-bottom: 14px; line-height: 1.6; }
ol.anleitung code {
  background: var(--grund);
  border: 1px solid var(--linie);
  padding: 1px 5px;
  font-size: 12.5px;
}
ol.anleitung .warn { color: var(--warnung); }

ul.hinweise { margin: 0; padding-left: 20px; }
ul.hinweise li { margin-bottom: 9px; line-height: 1.55; }

table.stand { width: 100%; border-collapse: collapse; margin-top: 10px; }
table.stand td { padding: 5px 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.stand td:first-child {
  width: 150px;
  color: var(--schrift-leise);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 7px;
}
table.stand tr:last-child td { border-bottom: none; }

/* ---------------------------------------------------------------- Kleinkram */

.reihe { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.reihe .luecke { flex: 1; }
.tagliste { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tagliste span { background: var(--grund); border: 1px solid var(--linie); padding: 3px 8px; font-size: 12px; }
