:root {
  --gruen: #1f6f4a;
  --gruen-dunkel: #16563a;
  --rot: #a4342a;
  --hintergrund: #f4f5f3;
  --karte: #ffffff;
  --text: #1c1e1c;
  --text-schwach: #5b615c;
  --rand: #dcdfda;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--hintergrund);
  color: var(--text);
}

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

h1 { font-size: 1.4rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 0 0 0.75rem; }

.app-layout {
  display: flex;
  min-height: 100vh;
}

.seitenleiste {
  width: 220px;
  flex-shrink: 0;
  background: var(--gruen-dunkel);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
}

.seitenleiste .marke {
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.5rem 1.25rem 1.25rem;
}

.seitenleiste a {
  color: white;
  text-decoration: none;
  padding: 0.65rem 1.25rem;
  opacity: 0.9;
}

.seitenleiste a:hover { background: rgba(255,255,255,0.08); }

.seitenleiste-fuss {
  margin-top: auto;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.inhalt {
  flex: 1;
  padding: 2rem;
  max-width: 1100px;
}

.inhalt-ausgeloggt {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.login-karte {
  width: 320px;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-schwach);
  margin-bottom: 0.9rem;
}

input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem 0.6rem;
  font-size: 0.95rem;
  border: 1px solid var(--rand);
  border-radius: 6px;
  background: white;
  color: var(--text);
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  background: var(--gruen);
  color: white;
}
button:hover { background: var(--gruen-dunkel); }

.button-primaer {
  display: inline-block;
  background: var(--gruen);
  color: white;
  text-decoration: none;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
}

.button-sekundaer {
  background: white;
  color: var(--text);
  border: 1px solid var(--rand);
}

.link-button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  padding: 0;
  text-decoration: underline;
  font-size: 0.85rem;
}

.listen-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.suchleiste {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  max-width: 420px;
}

.suchleiste input, .suchleiste select { margin-top: 0; }

.tabelle {
  width: 100%;
  border-collapse: collapse;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  overflow: hidden;
}

.tabelle th, .tabelle td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--rand);
  font-size: 0.9rem;
}

.tabelle th {
  background: var(--hintergrund);
  font-weight: 600;
}

.tabelle tr:last-child td { border-bottom: none; }

.formset-tabelle input, .formset-tabelle select { margin-top: 0; }

.aktionen-zelle {
  display: flex;
  gap: 0.4rem;
}
.aktionen-zelle form { display: inline; }
.aktionen-zelle button { padding: 0.35rem 0.7rem; font-size: 0.85rem; }

.kennzahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kennzahl-karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
}

.kennzahl-karte.kennzahl-warnung {
  border-color: var(--rot);
  background: #fdf1f0;
}

.kennzahl-wert { font-size: 1.8rem; font-weight: 700; }
.kennzahl-label { color: var(--text-schwach); font-size: 0.85rem; }

.gesamt { font-size: 1.05rem; }

.paginierung {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-schwach);
}

.meldungen {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.meldung {
  padding: 0.65rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.meldung-success { background: #e5f3ec; color: var(--gruen-dunkel); }
.meldung-error { background: #fdecea; color: var(--rot); }
.meldung-info { background: #eef2f5; color: var(--text); }

.fehlertext { color: var(--rot); font-size: 0.85rem; }
