/* SVE Rhönrad App – Gestaltung nach Prototyp und sve-hamburg.de */

@font-face { font-family: "Lato"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/Lato-Regular.woff") format("woff"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/Lato-Bold.woff") format("woff"); }
@font-face { font-family: "Lato"; font-weight: 900; font-style: normal; font-display: swap; src: url("fonts/Lato-Black.woff") format("woff"); }

:root {
  --blau: #006AB3;
  --blau-dunkel: #00508A;
  --blau-hell: #E6F0F8;
  --blau-zart: #D6E8F5;
  --gelb: #FFDD00;
  --nachtblau: #181B31;
  --text: #303336;
  --text-2: #454A50;
  --grau: #5E6470;
  --hintergrund: #F5F5F5;
  --flaeche: #FFFFFF;
  --rahmen: #E5E7EB;
  --rahmen-2: #CCCCCC;
  --linie: #F1F1F1;
  --wartet-bg: #FDEBD9; --wartet: #8A3A07;
  --frei-bg: #DDEFE6; --frei: #1E5A3A;
  --ab-bg: #F6DEDE; --ab: #8B1E1E;
  --radius: 14px;
  --nav-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--hintergrund);
  color: var(--text);
  font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--blau); }
a:hover { color: var(--blau-dunkel); }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }

.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--hintergrund);
}
@media (min-width: 560px) {
  .app { border-left: 1px solid var(--rahmen); border-right: 1px solid var(--rahmen); }
}
main {
  flex: 1;
  padding: 20px 20px calc(var(--nav-h) + 28px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
main.mit-leiste { padding-bottom: calc(var(--nav-h) + 110px); }
main:focus { outline: none; }

/* ---------- Kopf ---------- */
.kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.marke { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.marke img { height: 42px; width: auto; }
.marke span {
  padding-left: 12px; border-left: 2px solid var(--rahmen);
  font-weight: 900; font-size: 18px; letter-spacing: .6px; text-transform: uppercase; color: var(--blau);
}
.kopf-rechts { display: flex; align-items: center; gap: 6px; color: var(--grau); font-size: 13px; white-space: nowrap; min-width: 0; }
.kopf-rechts span { overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.icon-knopf {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent;
  color: var(--text-2); cursor: pointer; text-decoration: none;
}
.icon-knopf:hover { background: var(--flaeche); color: var(--blau); }
.icon-knopf.aktiv { color: var(--blau); }

.zurueck { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; min-height: 44px; align-self: flex-start; }

/* ---------- Typografie ---------- */
h1 { margin: 0; font-weight: 900; font-size: 26px; line-height: 1.15; }
h2.abschnitt {
  margin: 0; font-size: 17px; font-weight: 900; color: var(--blau);
  text-transform: uppercase; letter-spacing: .6px;
}
.unter { margin: 0; font-size: 15px; color: var(--text-2); }
.klein { font-size: 13px; color: var(--grau); }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.abschnitt-kopf a { font-size: 14px; font-weight: 700; }
section { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Karten ---------- */
.karte {
  background: var(--flaeche); border: 1px solid var(--rahmen); border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
  color: var(--text); text-decoration: none;
}
a.karte:hover, button.karte:hover { border-color: #C9D6E2; color: var(--text); }
button.karte { text-align: left; cursor: pointer; width: 100%; }
.karte.zeile { flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; }
.karte.gestrichelt { border-style: dashed; border-color: var(--rahmen-2); }
.karte .titel { font-weight: 700; font-size: 16px; }
.karte .info { font-size: 14px; color: var(--grau); }
.karte .text { font-size: 14px; color: var(--text-2); white-space: pre-line; }

.held {
  background: var(--blau); color: #fff; border-radius: 18px; padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.held .oberzeile { font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--blau-zart); }
.held .gross { font-weight: 700; font-size: 21px; line-height: 1.15; }
.held .knoepfe { display: flex; gap: 10px; margin-top: 6px; }
.held .knoepfe a { flex: 1; }
.held.leer { background: var(--flaeche); color: var(--text); border: 1px solid var(--rahmen); }
.held.leer .oberzeile { color: var(--grau); }

.datum-kachel {
  width: 52px; flex: none; text-align: center; border-radius: 10px; background: var(--blau-hell); padding: 6px 0;
}
.datum-kachel b { display: block; font-size: 21px; line-height: 1.1; }
.datum-kachel span { font-size: 12px; font-weight: 700; color: var(--blau); }
.vergangen .datum-kachel { background: #EFEFEF; }
.vergangen .datum-kachel span { color: var(--grau); }
.wk-zeile { display: flex; gap: 14px; align-items: center; }
.wk-zeile > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* ---------- Status-Chips ---------- */
.chip {
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap;
  display: inline-block; align-self: flex-start;
}
.chip.wartet { background: var(--wartet-bg); color: var(--wartet); }
.chip.freigegeben { background: var(--frei-bg); color: var(--frei); }
.chip.abgelehnt { background: var(--ab-bg); color: var(--ab); }
.chip.neutral { background: #EDEDED; color: var(--text-2); }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 16px; border-radius: 12px;
  font-weight: 700; font-size: 16px; text-decoration: none; text-align: center;
  border: 1px solid transparent; cursor: pointer; width: 100%;
}
.knopf.primaer { background: var(--blau); color: #fff; }
.knopf.primaer:hover { background: var(--blau-dunkel); color: #fff; }
.knopf.gelb { background: var(--gelb); color: var(--nachtblau); }
.knopf.gelb:hover { background: #F2D200; color: var(--nachtblau); }
.knopf.umriss-hell { border-color: #8CC0E3; color: #fff; background: transparent; }
.knopf.umriss-hell:hover { background: rgba(255,255,255,.08); color: #fff; }
.knopf.sekundaer { background: var(--flaeche); border-color: var(--rahmen-2); color: var(--text); }
.knopf.sekundaer:hover { border-color: var(--blau); color: var(--blau); }
.knopf.text { background: transparent; color: var(--blau); min-height: 44px; padding: 8px 12px; width: auto; }
.knopf.gefahr { background: var(--flaeche); border-color: #E2B4B4; color: var(--ab); }
.knopf[disabled], .knopf.aus { background: #E8E8E8; color: var(--grau); border-color: #E8E8E8; cursor: not-allowed; }
.knopf-reihe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.leiste {
  position: fixed; left: 0; right: 0; bottom: var(--nav-h);
  max-width: 520px; margin: 0 auto;
  padding: 12px 20px; background: var(--hintergrund); border-top: 1px solid var(--rahmen);
  display: flex; flex-direction: column; gap: 6px; z-index: 5;
}
.leiste .klein { text-align: center; }

/* ---------- Navigation ---------- */
nav.unten {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  max-width: 520px; margin: 0 auto;
  display: flex; border-top: 1px solid var(--rahmen); background: var(--flaeche);
  padding: 4px 8px calc(8px + env(safe-area-inset-bottom));
}
nav.unten a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0; min-height: 52px; text-decoration: none; color: var(--grau); font-size: 12px; font-weight: 700;
}
nav.unten a[aria-current="page"] { color: var(--blau); }

/* ---------- Listen ---------- */
dl.daten { margin: 0; background: var(--flaeche); border: 1px solid var(--rahmen); border-radius: var(--radius); padding: 4px 16px; }
dl.daten > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--linie); }
dl.daten > div:last-child { border-bottom: 0; }
dl.daten dt { color: var(--grau); }
dl.daten dd { margin: 0; text-align: right; font-weight: 700; }
dd.warn { color: var(--wartet); }

.klassen { display: flex; flex-wrap: wrap; gap: 8px; }
.klassen span { padding: 7px 12px; border-radius: 10px; background: var(--flaeche); border: 1px solid var(--rahmen); font-size: 14px; font-weight: 700; }

.zeitplan { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); row-gap: 8px; column-gap: 12px; font-size: 15px; }
.zeitplan span:nth-child(odd) { color: var(--grau); }

.link-zeile {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 52px;
  border-radius: 12px; background: var(--flaeche); border: 1px solid var(--rahmen);
  text-decoration: none; color: var(--text); font-weight: 700;
}
.link-zeile svg { flex: none; color: var(--blau); }
.link-zeile .zwei { display: flex; flex-direction: column; gap: 2px; }
.link-zeile .zwei span { font-weight: 400; font-size: 14px; color: var(--grau); }

.hinweis-box { background: var(--blau-hell); border-radius: 12px; padding: 12px 14px; font-size: 15px; color: var(--text-2); margin: 0; }
.fehler-box { background: var(--ab-bg); color: var(--ab); border-radius: 12px; padding: 12px 14px; font-size: 15px; margin: 0; }
.platzhalter { color: var(--grau); font-style: italic; }

/* ---------- Formulare ---------- */
form { display: flex; flex-direction: column; gap: 22px; }
fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
legend { padding: 0 0 8px; font-size: 16px; font-weight: 900; color: var(--blau); text-transform: uppercase; letter-spacing: .6px; }
.feld { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 700; }
.feld input, .feld select, .feld textarea {
  font-weight: 400; font-size: 16px; padding: 11px 12px; border: 1px solid var(--rahmen-2);
  border-radius: 10px; background: var(--flaeche); min-height: 46px; width: 100%;
}
.feld textarea { min-height: 96px; resize: vertical; }
.feld input:focus, .feld select:focus, .feld textarea:focus { outline: 2px solid var(--blau); outline-offset: 1px; border-color: var(--blau); }
.feld .hilfe { font-weight: 400; font-size: 13px; color: var(--grau); }
.feld .fehler { font-weight: 700; font-size: 13px; color: var(--ab); }
.feld.hat-fehler input, .feld.hat-fehler select { border-color: var(--ab); }
.zwei-spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.drei-spalten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.drei-spalten .feld { font-weight: 400; color: var(--grau); font-size: 13px; }
.haken { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; min-height: 44px; padding: 10px 0; cursor: pointer; }
.haken input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--blau); }
.haken-gruppe { background: var(--flaeche); border: 1px solid var(--rahmen); border-radius: var(--radius); padding: 2px 14px; }
.haken-gruppe .haken { border-bottom: 1px solid var(--linie); }
.haken-gruppe .haken:last-child { border-bottom: 0; }
.honig { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Umschalter / Tage ---------- */
.segmente { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; background: #E8E8E8; border-radius: 12px; padding: 4px; gap: 4px; }
.segmente a, .segmente button {
  text-align: center; padding: 10px 6px; border-radius: 9px; color: var(--text-2);
  font-size: 14px; font-weight: 700; text-decoration: none; border: 0; background: transparent; cursor: pointer; min-height: 44px;
}
.segmente [aria-current="page"], .segmente [aria-pressed="true"] { background: var(--flaeche); color: var(--blau); }

.tage { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tage::-webkit-scrollbar { display: none; }
.tage button {
  flex: none; min-width: 74px; cursor: pointer; padding: 8px 10px; border-radius: 12px; text-align: center;
  background: var(--flaeche); color: var(--text); border: 1px solid var(--rahmen-2);
  display: flex; flex-direction: column; gap: 0; min-height: 52px; justify-content: center;
}
.tage button b { font-size: 15px; }
.tage button span { font-size: 13px; }
.tage button[aria-pressed="true"] { background: var(--blau); color: #fff; border-color: var(--blau); }

.zaehler { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.zaehler div { background: var(--flaeche); border: 1px solid var(--rahmen); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.zaehler b { font-size: 28px; line-height: 1.1; }
.zaehler span { font-size: 13px; color: var(--grau); }
.zaehler .gruen b { color: var(--frei); }
.zaehler .orange b { color: var(--wartet); }
.zaehler .rot b { color: var(--ab); }

/* ---------- Status-Verlauf ---------- */
.verlauf { display: flex; flex-direction: column; }
.schritt { display: flex; gap: 14px; }
.schritt .spur { display: flex; flex-direction: column; align-items: center; }
.schritt .punkt {
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; border: 2px solid var(--rahmen-2); color: var(--grau); flex: none;
}
.schritt .strich { width: 2px; flex: 1; background: var(--rahmen); min-height: 22px; }
.schritt.fertig .punkt { background: var(--blau); border-color: var(--blau); color: #fff; }
.schritt.fertig .strich { background: var(--blau); }
.schritt.offen .punkt { border-color: #C2410C; color: #C2410C; }
.schritt.nein .punkt { background: var(--ab); border-color: var(--ab); color: #fff; }
.schritt .inhalt { padding-bottom: 16px; }
.schritt .inhalt div { font-size: 14px; color: var(--grau); }

.erfolg-kopf { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-top: 12px; }
.erfolg-kopf .kreis { width: 72px; height: 72px; border-radius: 50%; background: var(--blau); display: flex; align-items: center; justify-content: center; }
.erfolg-kopf .kreis.rot { background: var(--ab); }
.erfolg-kopf .kreis.orange { background: #C2410C; }

/* ---------- Sonstiges ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 16px);
  max-width: 480px; width: calc(100% - 32px);
  background: var(--nachtblau); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 15px; z-index: 50;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.toast.fehler { background: var(--ab); }
.laden { color: var(--grau); text-align: center; padding: 24px 0; }
.versteckt { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
details.karte summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.tabelle-zeile { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.zitat { font-size: 14px; color: var(--text-2); font-style: italic; }
:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }
