/* FitAgain – frisches, aktives Design; mobile-first und responsiv */

:root {
  --petrol: #0d7377;
  --petrol-dunkel: #095456;
  --coral: #ff7849;
  --coral-dunkel: #e85f30;
  --hell: #e6f4f4;
  --hintergrund: #f4f9f9;
  --text: #1f2d2d;
  --text-grau: #5a6a6a;
  --rand: #cfe3e3;
  --weiss: #ffffff;
  --gruen: #2e9e5b;
  --rot: #d64545;
  --radius: 14px;
  --schatten: 0 2px 10px rgba(13, 115, 119, 0.10);
}

* { box-sizing: border-box; }

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

/* ---------- Kopfzeile ---------- */
.topbar {
  background: linear-gradient(120deg, var(--petrol) 0%, #0e8e93 60%, #12a5a0 100%);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.logo {
  color: var(--weiss);
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.5px;
}
.logo span { color: #ffd9c7; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 8px;
  color: var(--weiss);
  font-size: 1.2rem;
  padding: 0.15rem 0.55rem;
  cursor: pointer;
}
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.nav a {
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.15s;
}
.nav a:hover { background: rgba(255,255,255,0.15); }
.nav a.aktiv { background: rgba(255,255,255,0.22); }
.nav a.nav-cta {
  background: var(--coral);
  color: var(--weiss);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.nav a.nav-cta:hover { background: var(--coral-dunkel); }
.nav-logout {
  background: none;
  border: 1.5px solid rgba(255,255,255,0.55);
  color: rgba(255,255,255,0.92);
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
}
.nav-logout:hover { background: rgba(255,255,255,0.15); }

/* ---------- Inhalt ---------- */
.inhalt {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}
h1 { color: var(--petrol-dunkel); font-size: 1.7rem; margin: 0.5rem 0 1rem; }
h2 { color: var(--petrol-dunkel); font-size: 1.25rem; }

.flash {
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-weight: 600;
}
.flash-success { background: #e3f6ea; color: var(--gruen); border: 1px solid #b8e6c9; }
.flash-error { background: #fdeaea; color: var(--rot); border: 1px solid #f3c1c1; }

/* ---------- Karten & Grids ---------- */
.karten-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}
.karte {
  background: var(--weiss);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.karte h3 { margin: 0; color: var(--petrol-dunkel); font-size: 1.05rem; }
.karte .beschreibung {
  color: var(--text-grau);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.karten-fuss { margin-top: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; }

.kennzahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.kennzahl {
  background: linear-gradient(135deg, var(--weiss), var(--hell));
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 1.2rem;
  text-align: center;
  text-decoration: none;
}
.kennzahl .zahl { font-size: 2.2rem; font-weight: 800; color: var(--coral); }
.kennzahl .label { color: var(--petrol-dunkel); font-weight: 600; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-region { background: var(--hell); color: var(--petrol-dunkel); }
.badge-art { background: #fff0e8; color: var(--coral-dunkel); }
.badge-geraet { background: #eef0f2; color: var(--text-grau); }
.badge-ki { background: #f0e8ff; color: #6b3fa0; }
.badge-stufe { background: var(--petrol); color: var(--weiss); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.1s, background 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-primaer { background: var(--coral); color: var(--weiss); }
.btn-primaer:hover { background: var(--coral-dunkel); }
.btn-sekundaer { background: var(--petrol); color: var(--weiss); }
.btn-sekundaer:hover { background: var(--petrol-dunkel); }
.btn-leise { background: var(--hell); color: var(--petrol-dunkel); }
.btn-leise:hover { background: #d3ecec; }
.btn-gefahr { background: #fdeaea; color: var(--rot); }
.btn-gefahr:hover { background: #f7d4d4; }
.btn-klein { padding: 0.3rem 0.8rem; font-size: 0.82rem; }

.kopf-aktionen {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

/* ---------- Formulare ---------- */
.formular {
  background: var(--weiss);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 1.4rem;
  max-width: 760px;
}
.feld-zeile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.9rem;
}
.feld { margin-bottom: 0.9rem; }
.feld label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--petrol-dunkel);
  margin-bottom: 0.25rem;
}
.feld input, .feld select, .feld textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1.5px solid var(--rand);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--weiss);
  color: var(--text);
}
.feld input:focus, .feld select:focus, .feld textarea:focus {
  outline: none;
  border-color: var(--petrol);
  box-shadow: 0 0 0 3px rgba(13,115,119,0.15);
}
.feld .hinweis { font-size: 0.78rem; color: var(--text-grau); margin-top: 0.2rem; }
.formular-aktionen { display: flex; gap: 0.7rem; margin-top: 1rem; flex-wrap: wrap; }
fieldset {
  border: 1.5px solid var(--rand);
  border-radius: var(--radius);
  margin: 0 0 1.1rem;
  padding: 0.9rem 1rem 0.4rem;
}
legend { font-weight: 800; color: var(--coral-dunkel); padding: 0 0.4rem; font-size: 0.9rem; }

/* ---------- Tabellen ---------- */
.tabelle-umbruch { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--schatten); }
table.plan-tabelle {
  width: 100%;
  border-collapse: collapse;
  background: var(--weiss);
  min-width: 560px;
}
.plan-tabelle th {
  background: var(--petrol);
  color: var(--weiss);
  padding: 0.65rem 0.8rem;
  text-align: left;
  font-size: 0.88rem;
}
.plan-tabelle td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--rand);
  font-size: 0.9rem;
}
.plan-tabelle tr:nth-child(even) td { background: var(--hell); }

/* ---------- Listen ---------- */
.leer-hinweis {
  background: var(--weiss);
  border: 2px dashed var(--rand);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--text-grau);
}
.filter-leiste {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  align-items: center;
}
.filter-leiste select {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1.5px solid var(--rand);
  background: var(--weiss);
  font-family: inherit;
}

.fusszeile {
  text-align: center;
  color: var(--text-grau);
  font-size: 0.8rem;
  padding: 1.5rem 1rem 2rem;
}

.email-formular { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.email-formular input {
  padding: 0.5rem 0.7rem;
  border: 1.5px solid var(--rand);
  border-radius: 999px;
  min-width: 220px;
  font-family: inherit;
}

/* ---------- Mobil ---------- */
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0.6rem;
  }
  .nav.offen { display: flex; }
  .nav a { text-align: center; }
  .nav form { display: block !important; }
  .nav-logout { width: 100%; }
  h1 { font-size: 1.4rem; }
  .formular { padding: 1rem; }
}
