/* WAVEPILOT — Akademie Überlingen Corporate Design (schlicht, professionell) */
:root {
  --au-rot: #e20613;
  --au-rot-dunkel: #9a1d28;
  --au-beige: #faf6e5;
  --au-hellgrau: #f4f4f4;
  --au-dunkelgrau: #666b6e;
  --au-text: #2d2f31;
  --au-heading: #1a1c1e;
  --au-rahmen: #e0ddd2;
  --ampel-rot: #c0392b;
  --ampel-gelb: #d9a300;
  --ampel-gruen: #2e7d32;
  --font-heading: "Merriweather", Georgia, "Times New Roman", serif;
  --font-body: "PT Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--au-text);
  background-color: var(--au-hellgrau);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4 { color: var(--au-heading); line-height: 1.25; }
h1 { font-family: var(--font-heading); font-size: 26px; font-weight: 400; margin: 0 0 .6rem; }
h2 { font-size: 20px; font-weight: 700; margin: 1.4rem 0 .6rem; }
h3 { font-size: 16px; font-weight: 700; margin: 1rem 0 .4rem; }
a { color: var(--au-rot); }

/* Kopf */
.kopf { background: var(--au-rot); color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.kopf-inner {
  max-width: 1100px; margin: 0 auto; padding: .7rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.marke { text-decoration: none; color: #fff; display: flex; flex-direction: column; }
.marke-name { font-family: var(--font-heading); font-size: 19px; letter-spacing: .5px; }
.marke-claim { font-size: 12px; opacity: .9; }
.kopf-nav { display: flex; align-items: center; gap: .8rem; }
.kopf-user { font-size: 13px; opacity: .95; }
.logout-form { margin: 0; }

/* Inhalt */
.inhalt { flex: 1; max-width: 1100px; width: 100%; margin: 0 auto; padding: 1.5rem 1.2rem; }
.fuss {
  background: var(--au-beige); color: var(--au-dunkelgrau);
  font-size: 12px; text-align: center; padding: .8rem; border-top: 1px solid var(--au-rahmen);
}

/* App-Navigation (native Zurueck/Vorwaerts/Steuerpult — Grundgeruest, in jeder App gleich) */
.app-nav { background: #fff; border-bottom: 1px solid var(--au-rahmen); }
.app-nav-inner {
  max-width: 1100px; margin: 0 auto; padding: .5rem 1.2rem;
  display: flex; align-items: center; gap: .5rem;
}
.zurueck-knopf {
  font-family: var(--font-body); font-size: 14px; line-height: 1;
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .5rem .85rem; border: 1px solid var(--au-rahmen); border-radius: 6px;
  background: var(--au-hellgrau); color: var(--au-text); text-decoration: none;
  cursor: pointer; transition: background .12s, border-color .12s;
}
.zurueck-knopf:hover { background: #ebe9e2; border-color: var(--au-dunkelgrau); }
.zurueck-knopf:active { background: #e2e0d8; }
.zurueck-knopf:focus-visible { outline: 2px solid var(--au-rot); outline-offset: 2px; }
.zurueck-home { background: var(--au-beige); }
.zurueck-home:hover { background: #f3edd6; }
@media (max-width: 520px) {
  .zurueck-knopf { font-size: 13px; padding: .45rem .6rem; }
}

/* Karten / Tafeln */
.tafel {
  background: #fff; border: 1px solid var(--au-rahmen); border-radius: 8px;
  padding: 1.2rem 1.4rem; margin-bottom: 1.2rem;
}
.tafel-rot-akzent { border-top: 3px solid var(--au-rot); }

/* Buttons */
.btn {
  display: inline-block; font-family: var(--font-body); font-size: 14px;
  padding: .5rem 1rem; border-radius: 6px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
}
.btn-primaer { background: var(--au-rot); color: #fff; border-color: var(--au-rot-dunkel); }
.btn-primaer:hover { background: var(--au-rot-dunkel); }
.btn-schlicht { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.4); }
.btn-schlicht:hover { background: rgba(255,255,255,.28); }
.btn-sekundaer { background: #fff; color: var(--au-text); border-color: var(--au-rahmen); }
.btn-sekundaer:hover { background: var(--au-hellgrau); }

/* Formulare */
.feld { margin-bottom: 1rem; }
.feld label { display: block; font-weight: 700; font-size: 13px; margin-bottom: .25rem; }
.feld input, .feld select, .feld textarea {
  width: 100%; padding: .5rem .6rem; font-size: 14px; font-family: var(--font-body);
  border: 1px solid var(--au-rahmen); border-radius: 6px; background: #fff;
}
.feld .hilfetext { font-size: 12px; color: var(--au-dunkelgrau); margin-top: .2rem; }
.formfehler { color: var(--au-rot); font-size: 13px; margin-top: .2rem; }

/* Tabellen (beide Klassen .liste und .tabelle einheitlich gestylt) */
table.liste, table.tabelle { width: 100%; border-collapse: collapse; background: #fff; }
table.liste th, table.tabelle th {
  background: var(--au-rot); color: #fff; text-align: left;
  padding: .55rem .7rem; font-size: 13px;
}
table.liste td, table.tabelle td { padding: .5rem .7rem; border-bottom: 1px solid var(--au-rahmen); font-size: 14px; }
table.liste tr:nth-child(even) td, table.tabelle tr:nth-child(even) td { background: var(--au-hellgrau); }

/* Ampel */
.ampel { display: inline-flex; align-items: center; gap: .4rem; font-size: 13px; }
.ampel-punkt { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.ampel-rot .ampel-punkt { background: var(--ampel-rot); }
.ampel-gelb .ampel-punkt { background: var(--ampel-gelb); }
.ampel-gruen .ampel-punkt { background: var(--ampel-gruen); }

/* Meldungen */
.meldungen { margin-bottom: 1rem; }
.meldung { padding: .6rem .9rem; border-radius: 6px; margin-bottom: .5rem; font-size: 14px; }
.meldung-success { background: #e6f4ea; color: #1e6b2c; border: 1px solid #b7dfc2; }
.meldung-error { background: #fdecea; color: #97241b; border: 1px solid #f5c6c2; }
.meldung-info { background: #eef3fb; color: #2c4a73; border: 1px solid #c7d8ef; }
.meldung-warning { background: #fef6e6; color: #8a6212; border: 1px solid #f1dca7; }

/* Login */
.login-box { max-width: 380px; margin: 3rem auto; }

/* Kachel-Grid (Optionsmenue / Schnellzugriff) — fuellt die Breite symmetrisch */
.kachel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.3rem 0 .3rem;
}
.kachel {
  display: flex; flex-direction: column; gap: .25rem;
  padding: 1.1rem 1.2rem; min-height: 92px;
  background: #fff; border: 1px solid var(--au-rahmen); border-radius: 8px;
  border-top: 3px solid var(--au-rot);
  text-decoration: none; color: var(--au-text);
  transition: box-shadow .12s ease, transform .12s ease, border-color .12s ease;
}
.kachel:hover { box-shadow: 0 6px 18px rgba(0,0,0,.10); transform: translateY(-2px); }
.kachel:focus-visible { outline: 2px solid var(--au-rot); outline-offset: 2px; }
.kachel-titel { font-weight: 700; font-size: 15.5px; color: var(--au-heading); }
.kachel-text { font-size: 13px; color: var(--au-dunkelgrau); line-height: 1.35; }

/* Formular-Tafel: zentriert, angenehme Lesebreite (nicht ueber die ganze Breite gezerrt) */
.tafel-formular { max-width: 680px; margin-left: auto; margin-right: auto; }
.form-aktionen { display: flex; gap: .6rem; margin-top: 1.3rem; flex-wrap: wrap; }

/* Auswertungs-Summen (Ampel-Zeile) etwas Luft geben */
.ampel-summen { display: flex; flex-wrap: wrap; gap: 1.2rem; margin: .4rem 0 1rem; }

/* Inhalts-Kopf (Titel + Aktion nebeneinander, sauber ausgerichtet) */
.inhalt-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
