/* RADAR - nur Dunkelmodus. Akzentfarbe Cyan, sonst nur Grau und Weiss. */

:root {
  --grund: #0E1116;
  --karte: #171B22;
  --karte-hoch: #1E242D;
  --linie: #252B34;
  --text: #E6E9EF;
  --text-leise: #8A93A3;
  --akzent: #2FD2E8;
  --akzent-dunkel: #123C45;
  --warn: #E8A33C;
  --gefahr: #E85C5C;
  --rund: 10px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom);
}

.versteckt { display: none !important; }

/* ---------- Ladeschirm ---------- */
.ladeschirm {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--grund); color: var(--akzent);
  font-size: 28px; font-weight: 600; letter-spacing: 6px; z-index: 100;
}

/* ---------- Anmeldung ---------- */
.anmeldung { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.anmeldebox { width: 100%; max-width: 340px; }
.marke { font-size: 32px; letter-spacing: 8px; margin: 0; color: var(--akzent); text-align: center; }
.marke-unter { color: var(--text-leise); text-align: center; margin: 4px 0 32px; font-size: 14px; }

label { display: block; font-size: 13px; color: var(--text-leise); margin: 14px 0 6px; }

input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=time], select, textarea {
  width: 100%; padding: 12px; font-size: 16px; font-family: inherit;
  background: var(--karte); color: var(--text);
  border: 1px solid var(--linie); border-radius: var(--rund);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--akzent); }

/* ---------- Knoepfe ---------- */
.knopf-voll {
  width: 100%; margin-top: 18px; padding: 13px; font-size: 16px; font-family: inherit;
  background: var(--akzent); color: #06232A; border: none; border-radius: var(--rund);
  font-weight: 600; cursor: pointer;
}
.knopf-voll:active { opacity: .8; }

.knopf-flach {
  width: 100%; margin-top: 12px; padding: 11px; font-size: 15px; font-family: inherit;
  background: transparent; color: var(--text-leise);
  border: 1px solid var(--linie); border-radius: var(--rund); cursor: pointer;
}
.knopf-flach.gefahr { color: var(--gefahr); border-color: var(--gefahr); }

.knopf-rund {
  flex: 0 0 46px; width: 46px; height: 46px; font-size: 24px; line-height: 1;
  background: var(--akzent); color: #06232A; border: none; border-radius: var(--rund);
  cursor: pointer;
}

.fehler { color: var(--gefahr); font-size: 14px; margin-top: 12px; }

/* ---------- Aufbau ---------- */
#inhalt { padding: 16px 16px 90px; max-width: 620px; margin: 0 auto; }
.kopf { margin: 8px 0 18px; }
.kopf-titel { font-size: 22px; margin: 0; font-weight: 600; }
.gruss { color: var(--text-leise); font-size: 14px; margin: 0 0 2px; }

.karte {
  background: var(--karte); border-radius: 12px; padding: 14px; margin-bottom: 12px;
}
.karte-titel { font-size: 13px; color: var(--text-leise); margin: 0 0 8px; }
.klein { font-size: 13px; color: var(--text-leise); }
.reihe { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.schalter {
  flex: 0 0 auto; padding: 7px 16px; font-size: 14px; font-family: inherit;
  background: transparent; color: var(--text-leise);
  border: 1px solid var(--linie); border-radius: 20px; cursor: pointer;
}
.schalter.an { background: var(--akzent); color: #06232A; border-color: var(--akzent); font-weight: 600; }
.mitte { text-align: center; }

/* ---------- Schnelleingabe ---------- */
.schnell { display: flex; gap: 8px; margin-bottom: 16px; }
.schnell input { flex: 1; }

/* ---------- Fortschritt ---------- */
.fortschritt-karte { padding: 16px; }
.fortschritt-zahl { display: flex; align-items: baseline; gap: 8px; }
.fortschritt-zahl > span:first-child { font-size: 28px; font-weight: 600; color: var(--akzent); }
.fortschritt-text { font-size: 14px; color: var(--text-leise); }
.balken { height: 4px; background: var(--linie); border-radius: 2px; margin-top: 12px; overflow: hidden; }
.balken-fuellung { height: 100%; width: 0; background: var(--akzent); border-radius: 2px; transition: width .3s; }

/* ---------- Rang ---------- */
.rang-kopf { display: flex; align-items: center; gap: 12px; }
.rang-text { flex: 1; min-width: 0; }
.rang-name { font-size: 16px; font-weight: 600; }
.gurt {
  flex: 0 0 auto; width: 44px; height: 15px; border-radius: 3px;
  background: #EFEFEF; border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.18);
}
.serie {
  flex: 0 0 auto; font-size: 12px; color: var(--akzent);
  border: 1px solid var(--akzent-dunkel); background: var(--akzent-dunkel);
  padding: 4px 9px; border-radius: 12px; white-space: nowrap;
}
.serie.aus { display: none; }
.rang-karte .balken { margin-top: 12px; }

/* ---------- Listen ---------- */
.gruppe-titel {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-leise); margin: 22px 0 8px;
}
.gruppe-titel.warnung { color: var(--warn); }

.zeile {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--karte); border-radius: 10px; padding: 12px; margin-bottom: 8px;
}
.zeile-text { flex: 1; min-width: 0; }
.zeile-titel { word-break: break-word; }
.zeile.fertig .zeile-titel { color: var(--text-leise); text-decoration: line-through; }
.zeile-unter { font-size: 12px; color: var(--text-leise); margin-top: 2px; }
.zeile-unter.warnung { color: var(--warn); }

.haken {
  flex: 0 0 22px; width: 22px; height: 22px; margin-top: 1px;
  border: 2px solid #3A424E; border-radius: 6px; background: transparent;
  cursor: pointer; padding: 0; position: relative;
}
.haken.an { border-color: var(--akzent); background: var(--akzent); }
.haken.an::after {
  content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid #06232A; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.zeile-weg {
  flex: 0 0 auto; background: transparent; border: none; color: var(--text-leise);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px;
}

.prio-hoch { border-left: 3px solid var(--warn); }

.leer { color: var(--text-leise); text-align: center; padding: 28px 12px; font-size: 15px; }

/* ---------- Navigation ---------- */
#navi {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex;
  background: var(--karte); border-top: 1px solid var(--linie);
  padding-bottom: env(safe-area-inset-bottom);
}
.navi-knopf {
  flex: 1; padding: 14px 4px; background: transparent; border: none;
  color: var(--text-leise); font-size: 13px; font-family: inherit; cursor: pointer;
}
.navi-knopf.aktiv { color: var(--akzent); font-weight: 600; }

/* ---------- Dialog ---------- */
.dialog-hinter {
  position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
.dialog {
  background: var(--karte-hoch); width: 100%; max-width: 480px;
  border-radius: 16px 16px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto;
}
.dialog h3 { margin: 0 0 8px; font-size: 18px; }
.dialog-knoepfe { display: flex; gap: 10px; margin-top: 8px; }
.dialog-knoepfe .knopf-voll, .dialog-knoepfe .knopf-flach { margin-top: 12px; }

@media (min-width: 600px) {
  .dialog-hinter { align-items: center; }
  .dialog { border-radius: 16px; }
}

/* ---------- Meldung ---------- */
.melder {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px;
  background: var(--karte-hoch); color: var(--text); border: 1px solid var(--linie);
  padding: 10px 16px; border-radius: 24px; font-size: 14px; z-index: 60;
  max-width: 90vw; text-align: center;
}
.melder.fehler-ton { border-color: var(--gefahr); color: var(--gefahr); }
