/* Brötchen & Wäsche – gemeinsame Gestaltung. Große, kontrastreiche Schrift, gut lesbar auch mit Brille. */
:root {
  --bg: #fffaf0;
  --flaeche: #ffffff;
  --text: #1c1917;
  --leise: #57534e;
  --linie: #d6d3d1;
  --haupt: #b45309;
  --haupt-dunkel: #92400e;
  --haupt-hell: #fef3c7;
  --heute: #fde68a;
  --gruen: #15803d;
  --gruen-hell: #dcfce7;
  --rot: #b91c1c;
  --rot-hell: #fee2e2;
  --radius: 14px;
  --schatten: 0 1px 3px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.05);
  font-size: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}
.zahl { font-variant-numeric: tabular-nums; font-weight: 800; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
a { color: var(--haupt-dunkel); }
.leise { color: var(--leise); }
.klein { font-size: .85rem; }
.versteckt { display: none !important; }

/* Knöpfe */
button, .knopf {
  font: inherit; font-weight: 700; cursor: pointer;
  border: 2px solid var(--haupt); background: var(--flaeche); color: var(--haupt-dunkel);
  border-radius: 12px; padding: .55em 1em; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  text-decoration: none; white-space: nowrap;
}
button:hover, .knopf:hover { background: var(--haupt-hell); }
button.haupt, .knopf.haupt { background: var(--haupt); color: #fff; }
button.haupt:hover, .knopf.haupt:hover { background: var(--haupt-dunkel); }
button.gefahr { border-color: var(--rot); color: var(--rot); }
button.gefahr:hover { background: var(--rot-hell); }
button.flach { border-color: transparent; background: transparent; }
button.flach:hover { background: rgba(0,0,0,.05); }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #2563eb; outline-offset: 2px;
}
.knopfreihe { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* Eingaben */
label { display: block; font-weight: 700; margin: .7em 0 .25em; }
input, select, textarea {
  font: inherit; width: 100%; padding: .55em .7em; min-height: 48px;
  border: 2px solid var(--linie); border-radius: 10px; background: #fff; color: var(--text);
}
input[type=checkbox] { width: 26px; height: 26px; min-height: 0; accent-color: var(--haupt); }
textarea { min-height: 7em; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--haupt); outline: none; }

.pw-rahmen { display: flex; gap: .5rem; }
.pw-rahmen input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; letter-spacing: .03em; }
.pw-knopf { flex: none; min-width: 9.5em; }

/* Karten */
.karte {
  background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten);
  padding: 1rem 1.1rem; margin-bottom: 1rem;
}
.meldung { padding: .8em 1em; border-radius: 12px; margin: .7em 0; font-weight: 600; }
.meldung.ok { background: var(--gruen-hell); color: #14532d; border: 2px solid var(--gruen); }
.meldung.fehler { background: var(--rot-hell); color: #7f1d1d; border: 2px solid var(--rot); }
.meldung.info { background: var(--haupt-hell); color: #78350f; border: 2px solid #f59e0b; }

/* Tabellen */
table { border-collapse: collapse; width: 100%; background: var(--flaeche); }
th, td { padding: .55em .6em; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: top; }
th { background: #f5f5f4; font-weight: 800; position: sticky; top: 0; z-index: 1; }
td.z, th.z { text-align: center; font-variant-numeric: tabular-nums; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tr.summe td { font-weight: 800; background: #f5f5f4; border-top: 3px solid var(--text); }
tr.klickbar { cursor: pointer; }
tr.klickbar:hover td { background: var(--haupt-hell); }
.tabelle-rahmen { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--schatten); }

/* Etiketten */
.etikett {
  display: inline-block; padding: .15em .55em; border-radius: 999px; font-size: .85rem; font-weight: 700;
  background: #f5f5f4; color: var(--leise); border: 1px solid var(--linie);
}
.etikett.gruen { background: var(--gruen-hell); color: #14532d; border-color: #86efac; }
.etikett.gelb { background: var(--haupt-hell); color: #78350f; border-color: #fcd34d; }
.etikett.rot { background: var(--rot-hell); color: #7f1d1d; border-color: #fca5a5; }
.sorte-chip {
  display: inline-flex; align-items: baseline; gap: .3em; padding: .2em .6em; border-radius: 8px;
  background: #fafaf9; border: 2px solid var(--linie); border-left-width: 8px; font-weight: 700; margin: .15em .25em .15em 0;
}
.sorte-chip .zahl { font-size: 1.25rem; }

/* ---------- Wochenübersicht ---------- */
.tag {
  background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten);
  margin-bottom: 1rem; overflow: hidden; border: 2px solid transparent;
}
.tag-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding: .8rem 1rem .3rem; }
.tag-kopf h2 { margin: 0; font-size: 1.25rem; }
.tag.heute { border: 4px solid var(--haupt); background: #fffbeb; }
.tag.heute .tag-kopf { background: var(--heute); padding: 1rem; }
.tag.heute .tag-kopf h2 { font-size: 1.75rem; font-weight: 900; }
.heute-schild {
  background: var(--haupt); color: #fff; font-weight: 900; letter-spacing: .05em;
  padding: .2em .7em; border-radius: 999px; font-size: 1rem;
}
.tag.vorbei { opacity: .75; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 40%), 1fr)); gap: .5rem; padding: .6rem 1rem 1rem; }
.kachel {
  border: 2px solid var(--linie); border-left-width: 10px; border-radius: 12px; padding: .4rem .7rem; background: #fff;
  min-width: 0; overflow-wrap: anywhere; hyphens: auto;
}
.kachel .zahl { font-size: 2rem; line-height: 1.1; display: block; }
.kachel .name { font-weight: 700; color: var(--leise); }
.tag.heute .kachel .zahl { font-size: 2.8rem; }
.tag.heute .kachel .name { color: var(--text); }
.kachel .name { display: block; font-size: .95rem; line-height: 1.2; }
@media (max-width: 560px) {   /* Handy: eine Zeile pro Sorte – Zahl groß links, Name rechts */
  .kacheln { grid-template-columns: 1fr; gap: .4rem; }
  .kachel { display: flex; align-items: center; gap: .9rem; padding: .3rem .8rem; }
  .kachel .zahl { min-width: 2.2ch; text-align: right; }
  .kachel .name { font-size: 1.1rem; }
}
.kachel.gesamt { border-color: var(--text); border-left-color: var(--text); background: #f5f5f4; }
.tag details { border-top: 1px solid var(--linie); }
.tag summary {
  cursor: pointer; padding: .8rem 1rem; font-weight: 800; list-style: none; display: flex; justify-content: space-between; align-items: center;
  min-height: 52px;
}
.tag summary::-webkit-details-marker { display: none; }
.tag summary::after { content: "▾"; font-size: 1.3rem; transition: transform .15s; }
.tag details[open] summary::after { transform: rotate(180deg); }
.haus { padding: .2rem 1rem .6rem; }
.haus h3 { font-size: 1rem; margin: .6rem 0 .3rem; color: var(--haupt-dunkel); text-transform: none; }
.kunde {
  display: flex; align-items: center; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid #eee;
}
.kunde:last-child { border-bottom: 0; }
.kunde .wer { flex: 1; min-width: 0; }
.kunde .wer strong { font-size: 1.1rem; }
.kunde.erledigt .wer { opacity: .55; }
.kunde .notiz { font-size: .9rem; color: var(--haupt-dunkel); font-style: italic; }
.haken {
  flex: none; min-width: 64px; min-height: 64px; border-radius: 16px; font-size: 1.8rem;
  border: 3px solid var(--linie); background: #fff; color: #bbb; padding: 0;
}
.haken:hover { background: var(--gruen-hell); }
.haken.an { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.fortschritt { font-weight: 800; }
.fortschritt.fertig { color: var(--gruen); }

/* Fenster (eigene Bestätigung statt confirm()) */
.fenster-hintergrund {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 1rem;
}
.fenster {
  background: var(--flaeche); border-radius: 18px; padding: 1.3rem; width: 100%; max-width: 560px;
  max-height: 92vh; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.fenster.breit { max-width: 980px; }
.fenster h2 { margin-bottom: .7rem; }
.fenster .knopfreihe { justify-content: flex-end; margin-top: 1.2rem; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 200;
  background: #1c1917; color: #fff; padding: .8em 1.2em; border-radius: 12px; font-weight: 700;
  box-shadow: 0 6px 24px rgba(0,0,0,.3); max-width: 92vw;
}

@media print {
  .nicht-drucken { display: none !important; }
}
