:root {
  --gruen: #4a7c59;
  --gruen-hell: #e6f0e9;
  --rot: #b3423e;
  --grau: #6b7280;
  --rand: #d8ddd9;
  --hintergrund: #f6f7f6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  color: #1f2937;
  background: var(--hintergrund);
}

.kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem 1rem;
  padding: 0.6rem 1rem;
  background: var(--gruen);
  color: #fff;
}
.kopf a, .kopf .link { color: #fff; text-decoration: none; }
.marke { font-weight: 700; font-size: 1.1rem; }
.kopf nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; align-items: center; }
.kopf nav a:hover { text-decoration: underline; }

main { max-width: 44rem; margin: 0 auto; padding: 1rem; }

h1 { font-size: 1.5rem; margin: 0.5rem 0 0.2rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.4rem; }
h3 { font-size: 1rem; margin: 0.6rem 0 0.2rem; }
.untertitel { color: var(--grau); margin-top: 0; }
.klein { font-size: 0.85rem; color: var(--grau); }

.karte {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 1rem;
  margin: 0.8rem 0;
}
.schmal { max-width: 26rem; margin-left: auto; margin-right: auto; }

.meldung {
  background: #fff8e1;
  border: 1px solid #e6d9a8;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin: 0.8rem 0;
}

/* Formulare */
label { display: block; margin: 0.8rem 0 0.25rem; font-weight: 600; }
input[type=text], input[type=email], input[type=date], textarea {
  width: 100%;
  padding: 0.7rem;
  font-size: 1.05rem;
  border: 1px solid var(--rand);
  border-radius: 10px;
  background: #fff;
}
input[type=checkbox] { width: 1.4rem; height: 1.4rem; accent-color: var(--gruen); }
textarea { resize: vertical; }

button, .knopf {
  display: inline-block;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--rand);
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
}
button.haupt, .knopf.haupt {
  background: var(--gruen);
  border-color: var(--gruen);
  color: #fff;
  font-weight: 600;
  width: 100%;
  margin-top: 0.9rem;
}
.knopf.haupt { width: auto; }
button.link {
  border: none;
  background: none;
  padding: 0.3rem;
  min-height: 0;
  color: var(--gruen);
  text-decoration: underline;
  font-size: 0.95rem;
}
button.link.gefahr, .gefahr { color: var(--rot); }
form.inline { display: inline; }

/* Tages-Navigation */
.tag-nav { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.4rem; }
.tag-nav .knopf { flex: 0 1 auto; }

/* Aufgabenliste (Helfer) */
.aufgaben { list-style: none; margin: 0; padding: 0; }
.aufgaben li { margin: 0.5rem 0; }
.aufgaben form { margin: 0; }
button.aufgabe {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  text-align: left;
  padding: 0.8rem;
  font-size: 1.05rem;
  min-height: 56px;
}
button.aufgabe .haken {
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  border: 2px solid var(--rand);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
button.aufgabe.erledigt {
  background: var(--gruen-hell);
  border-color: var(--gruen);
}
button.aufgabe.erledigt .haken {
  background: var(--gruen);
  border-color: var(--gruen);
  color: #fff;
}
button.aufgabe.erledigt .aufgabe-name { text-decoration: line-through; color: var(--grau); }
.aufgabe-name { flex: 1 1 auto; font-weight: 600; }

/* Tiere */
.tiere { list-style: none; margin: 0; padding: 0; }
.tier {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rand);
  flex-wrap: wrap;
}
.tier:last-child { border-bottom: none; }
.tier img, .tier-platzhalter {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gruen-hell);
}
.tier-info { flex: 1 1 auto; display: flex; flex-direction: column; }
.tier-gross { max-width: 100%; border-radius: 12px; margin: 0.5rem 0; }
.status { font-size: 0.85rem; font-weight: 600; }
.status.drinnen { color: var(--gruen); }
.status.draussen { color: #b45309; }

/* Notizen */
.notiz {
  border-top: 1px solid var(--rand);
  margin-top: 0.7rem;
  padding-top: 0.5rem;
}
.notiz p { margin: 0.15rem 0; white-space: pre-line; }

/* Listen / Zeilen */
.liste { list-style: none; margin: 0; padding: 0; }
.liste a { text-decoration: none; color: inherit; }
.zeile { padding: 0.8rem 1rem; }
.zeile-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.3rem 0;
}
.zeile-flex input[type=text], .zeile-flex input[type=date] { flex: 1 1 auto; width: auto; }
.check-zeile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
  margin: 0.3rem 0;
  min-height: 40px;
}

/* Status-Ansichten (Admin) */
.status-liste { list-style: none; margin: 0.2rem 0; padding: 0; }
.status-liste li { padding: 0.2rem 0; }
.status-liste li.erledigt { color: var(--gruen); }
.heute-markierung { border-color: var(--gruen); border-width: 2px; }
.abzeichen {
  font-size: 0.75rem;
  background: var(--gruen-hell);
  color: var(--gruen);
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.3rem;
}
.abzeichen.inaktiv { background: #fbe9e7; color: var(--rot); }

/* Plan-Grid + Tabellen */
.plan-tag { display: grid; gap: 0.6rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .plan-tag { grid-template-columns: repeat(3, 1fr); } }
fieldset { border: 1px solid var(--rand); border-radius: 10px; }
legend { font-weight: 600; padding: 0 0.3rem; }
.unternav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.7rem 0; }
.tabellen-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--rand); }
td.mitte { text-align: center; }
