/* Jenni Holz – Betriebssoftware. Bewusst schlank, ohne Build-Schritt.
   Farben/Schriften kommen aus marke.css – hier keine festen Farbwerte einsetzen. */

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh;
  font: 16px/1.5 var(--schrift);
  background: var(--grund);
  color: var(--text);
  border-bottom: 8px solid var(--akzent); /* einziger Beige-Akzent: Streifen am Seitenende */
}
a { color: var(--primaer); }

/* Kopf: Logo-Ausführung «auf rotem Hintergrund» (weisses Logo auf Atomikrot) */
.kopf {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.75rem;
  padding: 0 1rem; background: var(--primaer); color: var(--weiss);
}
.kopf a { color: var(--weiss); text-decoration: none; }
.marke { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
/* Die Logo-SVG enthält bereits Freiraum (Clear Space) – daher grösser skalieren. */
.marke img { display: block; height: 64px; width: auto; }
.marke span { padding-left: .6rem; border-left: 1px solid rgb(255 255 255 / .5); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
/* Sparten als Reiter: aktive Sparte weiss unterstrichen */
.hauptnav { display: flex; flex-wrap: wrap; gap: 0 1.5rem; flex: 1; align-self: stretch; }
.hauptnav a { display: flex; align-items: center; min-height: 3rem; font-weight: 500; }
.hauptnav a:hover { box-shadow: inset 0 -3px 0 rgb(255 255 255 / .5); }
.hauptnav a[aria-current] { font-weight: 800; box-shadow: inset 0 -4px 0 var(--weiss); }
.konto { display: flex; align-items: center; gap: 1rem; font-size: .9rem; }
.konto form { margin: 0; }
button.link {
  background: none; border: 0; padding: 0; color: var(--weiss); font: inherit; cursor: pointer; text-decoration: underline;
}

/* Typografie nach Guideline: Headlines in Libre Franklin Black, Versalien */
.inhalt { max-width: 1100px; margin: 0 auto; padding: 1.75rem 1rem 3rem; }
h1 { margin: 0 0 .35rem; font-size: clamp(1.3rem, 5vw + .4rem, 1.7rem); hyphens: auto; overflow-wrap: break-word; font-weight: 900; text-transform: uppercase; letter-spacing: .01em; line-height: 1.15; }
h2 { font-weight: 700; }
.untertitel, .hinweis { color: var(--text-leise); }
.datum { margin: 0 0 .25rem; font-size: .875rem; font-weight: 700; color: var(--primaer); text-transform: uppercase; letter-spacing: .1em; }

.raster { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 1.25rem; }
.kachel {
  display: block; padding: 1rem 1.1rem; background: var(--flaeche);
  border: 1px solid var(--rand); border-top: 4px solid var(--primaer); border-radius: var(--radius);
  color: inherit; text-decoration: none;
}
a.kachel:hover { border-color: var(--primaer); box-shadow: 0 2px 10px rgb(0 0 0 / .08); }
a.kachel:focus-visible { outline: 2px solid var(--primaer); outline-offset: 2px; }
.kachel h2 { margin: 0 0 .25rem; font-size: 1.1rem; }
.kachel p { margin: 0; color: var(--text-leise); font-size: .95rem; }
.kachel.geplant { border-top-style: dashed; border-top-color: var(--light-contrast); }
/* Spartenkachel (Übersicht): weisses Symbol auf Rot, Titel mit Pfeil */
.kachel.sparte { display: flex; flex-direction: column; justify-content: space-between; gap: 1.75rem; min-height: 9rem; padding: 1.35rem; }
.sparte-symbol { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: var(--radius); background: var(--primaer); color: var(--weiss); }
.sparte-symbol svg { width: 1.6rem; height: 1.6rem; }
.kachel.sparte h2 { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: 0; font-size: 1.2rem; font-weight: 800; }
.kachel.sparte h2::after { content: "→"; color: var(--primaer); }
.kachel.geplant h2 { color: var(--text-leise); }
.marke-klein {
  display: inline-block; margin-top: .3rem;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--primaer); background: var(--flaeche); border: 1px solid var(--primaer); border-radius: 99px; padding: .05rem .5rem;
}

.meldungen { list-style: none; padding: 0; margin: 0 0 1rem; }
.meldung { padding: .6rem .9rem; border-radius: var(--radius); background: var(--erfolg-grund); border: 1px solid var(--ok); color: var(--ok); margin-bottom: .5rem; }
.meldung.error { background: var(--fehler-grund); border-color: var(--fehler); color: var(--fehler); }

/* Formulare (inkl. allauth) */
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 1.5rem; }
.karte.schmal { max-width: 460px; margin: 2rem auto; }
.karte-logo { display: block; width: 150px; height: auto; margin: -.5rem auto .5rem; }
form p, form > div { margin: 0 0 .9rem; }
label { display: block; font-weight: 600; margin-bottom: .25rem; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; padding: .55rem .65rem; font: inherit; border: 1px solid var(--light-contrast); border-radius: var(--radius); background: var(--weiss);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primaer); outline-offset: 1px; }
button:not(.link), input[type=submit] {
  padding: .6rem 1.2rem; font: inherit; font-weight: 700; color: var(--weiss); background: var(--primaer);
  border: 0; border-radius: var(--radius); cursor: pointer;
}
button:not(.link):hover { background: var(--primaer-dunkel); }
.errorlist { color: var(--fehler); padding-left: 1.1rem; margin: .25rem 0; }
.helptext { display: block; color: var(--text-leise); font-size: .85rem; }

/* Allgemeine Bausteine für Module */
.brotkrumen { margin: 0 0 .5rem; font-size: .9rem; color: var(--text-leise); }
.titelzeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; }
.aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 0; }
.aktionen select { width: auto; }
a.knopf {
  display: inline-block; padding: .55rem 1rem; font-weight: 700; color: var(--weiss); background: var(--primaer);
  border-radius: var(--radius); text-decoration: none;
}
a.knopf:hover { background: var(--primaer-dunkel); }
a.knopf.zweitrangig, button.zweitrangig:not(.link) { color: var(--primaer); background: var(--flaeche); border: 2px solid var(--primaer); }
a.knopf.zweitrangig:hover, button.zweitrangig:not(.link):hover { background: var(--primaer-hell); }
.klein:not(.link), a.knopf.klein { padding: .3rem .7rem; font-size: .85rem; }
.link-klein { display: inline-block; margin-top: .75rem; font-size: .9rem; font-weight: 600; }
.warnung { color: var(--fehler); }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Containerlogistik */
.standorte { display: grid; gap: 1rem; margin-top: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.karte.getrocknet { margin-top: 1rem; }
.karte h2 { margin: 0 0 .5rem; font-size: 1.1rem; }
.standort { padding: 1rem 1.1rem; border-top: 4px solid var(--primaer); }
.standort-kopf .belegung { color: var(--primaer); }
.standort.ueberbelegt { border-top-color: var(--fehler); }
.standort-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.standort-kopf h2 { margin: 0; }
.belegung { font-weight: 900; font-size: 1.25rem; }
meter.balken { display: block; width: 100%; height: .6rem; margin: .5rem 0 .25rem; }
.standort-aktion { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin: .25rem 0 .75rem; }
.standort-info { margin: 0; font-size: .9rem; color: var(--text-leise); }
/* Hauptaktion: gross genug für Finger und Arbeitshandschuhe */
a.knopf.gross { min-height: 3rem; padding: .75rem 1.25rem; font-size: 1.05rem; display: inline-flex; align-items: center; }
input.gross { font-size: 1.6rem; font-weight: 700; padding: .5rem .75rem; max-width: 9rem; }
.containerliste { list-style: none; margin: 0; padding: 0; }
.standort, .karte.getrocknet { container-type: inline-size; }
.container-zeile {
  display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto auto; align-items: center; gap: .6rem;
  padding: .5rem 0; border-top: 1px solid var(--rand);
}
/* Schmale Karte (Handy, enges Raster): Status und Knopf in eine zweite Zeile */
@container (max-width: 420px) {
  /* Status unter die Angaben, Knöpfe als eigene Zeile über die ganze Breite (gross genug für Handschuhe;
     nichts überdeckt den Status, auch bei grosser Schrift am Handy) */
  .container-zeile { grid-template-columns: 2.6rem minmax(0, 1fr); grid-template-areas: "nr info" "nr status" "nr knopf"; row-gap: .45rem; }
  .container-zeile .nr { grid-area: nr; align-self: start; }
  .container-zeile .info { grid-area: info; }
  .container-zeile .status { grid-area: status; justify-self: start; }
  .container-zeile .zeilen-knoepfe { grid-area: knopf; justify-self: stretch; }
  .container-zeile .zeilen-knoepfe > * { flex: 1 1 0; }
  .standort-aktion .knopf.gross { width: 100%; justify-content: center; }
}
.container-zeile form { margin: 0; }
/* Depot / Leeren: nebeneinander, gut treffbar */
.zeilen-knoepfe { display: flex; gap: .4rem; justify-self: end; }
.zeilen-knoepfe button.klein:not(.link), .zeilen-knoepfe a.knopf.klein {
  min-height: 2.4rem; min-width: 4.6rem; padding: .35rem .8rem; display: inline-flex; align-items: center; justify-content: center;
}

/* Bestätigungsseite (Depot / Leeren / Rückgängig): eine Frage, zwei grosse Knöpfe */
.bestaetigen { text-align: center; }
.bestaetigen h1 { font-size: 1.4rem; margin-top: .75rem; }
.bestaetigen .details { margin: .25rem 0 .75rem; color: var(--text-leise); }
.bestaetigen .nr.gross {
  display: inline-grid; place-items: center; width: 4rem; height: 4rem; border-radius: var(--radius);
  background: var(--primaer); color: var(--weiss); font-weight: 900; font-size: 1.8rem;
}
.bestaetigen-knoepfe { flex-direction: column; align-items: stretch; gap: .75rem; margin-top: 1.25rem; }
.bestaetigen-knoepfe button.gross:not(.link), .bestaetigen-knoepfe a.knopf.gross { min-height: 3.25rem; width: 100%; justify-content: center; font-size: 1.1rem; }
.container-zeile .nr {
  display: grid; place-items: center; height: 2.4rem; border-radius: var(--radius);
  background: var(--primaer); color: var(--weiss); font-weight: 900; font-size: 1.05rem;
}
.container-zeile .info { display: flex; flex-direction: column; min-width: 0; }
.container-zeile .info small { color: var(--text-leise); }
/* Trocknungsbalken: Verlauf nass → trocken als Hintergrund, der <progress>-Wert (rtl) deckt den Rest grau ab. */
progress.trocknungsbalken {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; height: 5px; margin-top: .35rem; border: 0; border-radius: 99px; overflow: hidden;
  background: linear-gradient(to right, var(--nass), var(--halbtrocken) 55%, var(--trocken));
}
progress.trocknungsbalken::-webkit-progress-bar { background: transparent; }
progress.trocknungsbalken::-webkit-progress-value { background: var(--balken-rest); }
progress.trocknungsbalken::-moz-progress-bar { background: var(--balken-rest); }
.status { font-size: .8rem; font-weight: 700; padding: .15rem .5rem; border-radius: 99px; white-space: nowrap; }
.status.fertig { color: var(--ok); background: var(--ok-grund); }
.status.laeuft { color: var(--text-leise); background: var(--laeuft-grund); border: 1px solid var(--rand); }

/* Tabellen */
.tabelle-rahmen { margin-top: 1rem; padding: 0; overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tabelle th, .tabelle td { padding: .5rem .75rem; border-bottom: 1px solid var(--rand); text-align: left; }
.tabelle thead th { font-size: .85rem; background: var(--grund-leise); }
.tabelle tfoot th, .tabelle tfoot td { font-weight: 900; border-bottom: 0; }
.tabelle .zahl { text-align: right; }

@media (max-width: 640px) {
  .marke img { height: 56px; }
  .konto { width: 100%; justify-content: flex-end; }
  .karte.schmal { margin: 1rem auto; }
}

/* Anmeldung: zweiter Weg «Mit Fingerabdruck anmelden» (Passkey) */
.oder { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0 1rem; color: var(--text-leise); font-size: .9rem; }
.oder::before, .oder::after { content: ""; flex: 1; border-top: 1px solid var(--rand); }
button#passkey_login, button.fingerabdruck-knopf {
  width: 100%; min-height: 3rem; color: var(--primaer); background: var(--flaeche); border: 2px solid var(--primaer);
}
button#passkey_login:hover, button.fingerabdruck-knopf:hover { background: var(--primaer-hell); }
.fingerabdruck-tipp { margin-top: 1.5rem; padding: .75rem 1rem; background: var(--flaeche); border: 1px dashed var(--primaer); border-radius: var(--radius); }
button.link.link-dunkel { color: var(--primaer); }

/* Auswertung: Filterleiste */
.filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; margin: 1rem 0 1.25rem; padding: 1rem; }
.filter p { margin: 0; flex: 1 1 10rem; }
.filter p:last-child { flex: 0 0 auto; }
.inhalt > h2 { margin: 1.75rem 0 .25rem; font-size: 1.15rem; }

/* Einstellungen: Tabellen mit kleinen Zahlenfeldern rechts */
.einstellungen .karte { margin-top: 1rem; }
.einstellungen .karte h2 { margin-bottom: .25rem; }
.einstell-tabelle th { font-weight: 600; }
.einstell-tabelle th small { display: block; font-weight: 400; }
.einstell-tabelle td { white-space: nowrap; width: 1%; }
input.zahl-eingabe { width: 5rem; text-align: right; display: inline-block; }
.einheit { color: var(--text-leise); font-size: .9rem; }
.einstellungen .aktionen { margin-top: 1.25rem; }

/* Pause einer Trocknungsanlage (Wartung Energieversorgung) */
.pause-hinweis {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem;
  margin: .5rem 0 .75rem; padding: .6rem .8rem; border-radius: var(--radius);
  background: var(--fehler-grund); border: 1px solid var(--fehler); color: var(--fehler);
}
.pause-hinweis p { margin: 0; flex: 1 1 14rem; }
.pause-geplant { margin: .25rem 0 .5rem; font-size: .9rem; color: var(--text-leise); }
.status.pausiert { color: var(--fehler); background: var(--fehler-grund); border: 1px solid var(--fehler); }

/* Link «ändern» in der Container-Zeile: gut treffbar, aber unaufdringlich */
.container-zeile a.aendern { font-weight: 600; display: inline-block; padding: .15rem 0; }

/* Fremdtrocknung: Container externer Firmen klar erkennbar (Firmenkürzel über der Nummer, anderer Rahmen) */
.container-zeile .nr.fremd, .nr.gross.fremd {
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05;
  height: auto; min-height: 2.4rem; padding: .15rem .1rem;
  background: var(--flaeche); border: 2px dashed var(--primaer); color: var(--primaer);
}
.nr.fremd small { font-size: .55rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nr.gross.fremd small { font-size: .7rem; }
/* Kästchen (z. B. «neu erfassen»): Kästchen vor dem Text */
p.kaestchen { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: .5rem; }
p.kaestchen label { margin: 0; }
p.kaestchen input { width: 1.4rem; height: 1.4rem; }
.karte.firmen { margin-top: 1.5rem; }
.karte.firmen th small.hinweis { display: block; font-weight: 400; }

/* Modul Miete */
.miete-form fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.miete-form legend { font-weight: 900; font-size: 1.05rem; margin-bottom: .5rem; }
.neues-geraet { border-left: 3px solid var(--rand); padding-left: .75rem; }
.neues-geraet .hinweis { margin: 0 0 .5rem; font-size: .9rem; }
.zweispaltig { display: grid; grid-template-columns: 2fr 1fr; gap: 0 .75rem; }
.zustand { margin: 0 0 .9rem; }
.zustand-titel { font-weight: 600; margin: 0 0 .35rem; }
.zustand-wahl > div { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.zustand-wahl label { display: flex; align-items: center; gap: .5rem; margin: 0; padding: .7rem .75rem; cursor: pointer;
  border: 1px solid var(--light-contrast); border-radius: var(--radius); background: var(--weiss); }
.zustand-wahl input { width: 1.3rem; height: 1.3rem; margin: 0; }
.zustand-wahl label:has(input:checked) { border-color: var(--primaer); outline: 1px solid var(--primaer); }
/* Beschreibung nur bei «Schäden vorhanden» (ohne Skript) */
.zustand .schadenfeld { display: none; margin-top: .75rem; }
.zustand:has(input[value=vorhanden]:checked) .schadenfeld { display: block; }
.zustand .fotos-freiwillig { display: none; margin-top: .75rem; }
.zustand:has(input[value=keine]:checked) .fotos-freiwillig { display: block; }
input[type=file] { width: 100%; padding: .5rem; font: inherit; border: 1px dashed var(--light-contrast); border-radius: var(--radius); background: var(--weiss); }
.fotoreihe { display: flex; flex-wrap: wrap; gap: .35rem; margin: .35rem 0; }
.fotoreihe img { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--rand); }
.fotoreihe.gross img { width: 160px; height: 120px; }
.rapport { max-width: 820px; }
.rapport-teile { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem 1.5rem; margin: 1rem 0; }
.rapport-teile h2 { margin-bottom: .5rem; }
.rapport-daten { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: 0 0 .5rem; }
.rapport-daten dt { color: var(--text-leise); }
.rapport-daten dd { margin: 0; }
.rapport-summe { padding: .75rem 0; border-top: 1px solid var(--rand); border-bottom: 1px solid var(--rand); font-variant-numeric: tabular-nums; }
.rapport-senden { margin-top: 1rem; max-width: 460px; }
.rapport-zuruecknehmen { margin: .5rem 0 1rem; }
.fotolabel { display: block; font-size: .8rem; color: var(--text-leise); margin-top: .25rem; }
.mietliste { list-style: none; margin: 0; padding: 0; }
.mietliste li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  padding: .6rem 0; border-bottom: 1px solid var(--rand); }
.mietliste li:last-child { border-bottom: 0; }
.mietliste .info small { display: block; color: var(--text-leise); }
.miete-laufend { margin-top: 1rem; }
.tabelle-titel { padding: 1rem 1rem 0; }
.tabelle-rahmen > .hinweis { padding: 0 1rem 1rem; }
