/* Freigabe – eine CSS-Datei, keine externen Schriften. */

:root {
  --text: #1d1d1f;
  --leise: #6b6b72;
  --hintergrund: #f4f4f6;
  --flaeche: #ffffff;
  --rand: #dcdce1;
  --haupt: #1f5fbf;
  --haupt-dunkel: #174a96;
  --gruen: #1a7f37;
  --gruen-hell: #e6f4ea;
  --rot: #c62828;
  --rot-hell: #fdecea;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--hintergrund);
}

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

h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.125rem; margin: 0 0 0.75rem; }

/* --- Kopfzeile ------------------------------------------------------------- */

.kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  padding: 0.5rem max(1rem, env(safe-area-inset-right)) 0.5rem max(1rem, env(safe-area-inset-left));
  padding-top: max(0.5rem, env(safe-area-inset-top));
  background: var(--flaeche);
  border-bottom: 1px solid var(--rand);
}

.marke {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.25rem;
  margin-left: auto;
}

.nav a,
.nav-knopf {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.6rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav a[aria-current="page"] { background: var(--hintergrund); font-weight: 600; }
.nav a:hover, .nav-knopf:hover { background: var(--hintergrund); }
.nav form { margin: 0; }

/* --- Inhalt --------------------------------------------------------------- */

.inhalt {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem max(1rem, env(safe-area-inset-right)) calc(2rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

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

.ausgegraut { opacity: 0.6; }

.leise { color: var(--leise); }

.abzeichen {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--hintergrund);
  border: 1px solid var(--rand);
  font-size: 0.8125rem;
  color: var(--leise);
  white-space: nowrap;
}

.leer {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--leise);
}
.leer strong { color: var(--text); font-size: 1.125rem; }
.leer-symbol {
  font-size: 2.5rem;
  line-height: 1;
  color: var(--gruen);
  margin: 0 0 0.5rem;
}

/* --- Meldungen ------------------------------------------------------------ */

.hinweis {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid transparent;
}
.hinweis-ok { background: var(--gruen-hell); border-color: #b7dfc2; color: #0f5223; }
.hinweis-fehler { background: var(--rot-hell); border-color: #f3c1bd; color: #8e1c1c; }

/* --- Formulare ------------------------------------------------------------ */

.formular { display: flex; flex-direction: column; gap: 0.9rem; }
.formular.schmal { max-width: 28rem; }

label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 500; }
label .leise { font-weight: 400; }

input, select, textarea {
  font: inherit;
  font-size: 16px; /* iOS zoomt sonst beim Antippen hinein */
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--flaeche);
  color: var(--text);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--haupt);
  outline-offset: 1px;
  border-color: var(--haupt);
}

fieldset {
  border: 1px solid var(--rand);
  border-radius: 8px;
  padding: 0.5rem 0.75rem 0.75rem;
  margin: 0;
}
legend { font-weight: 500; padding: 0 0.25rem; }

label.auswahl {
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
  min-height: 44px;
  cursor: pointer;
}
label.auswahl input { width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0; flex: none; }

.raster { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .raster { grid-template-columns: 1fr 1fr; }
}

.zeile { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.zeile > input { flex: 1 1 14rem; width: auto; }
.zeile-verteilt { justify-content: space-between; }
.zeile + .zeile, .zeile-verteilt + form { margin-top: 0.75rem; }

.knopfreihe { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
form.knopfreihe { margin-top: 0.5rem; }

/* --- Knöpfe --------------------------------------------------------------- */

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--rand);
  background: var(--flaeche);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.knopf:hover { background: var(--hintergrund); }

.knopf-haupt { background: var(--haupt); border-color: var(--haupt); color: #fff; }
.knopf-haupt:hover { background: var(--haupt-dunkel); border-color: var(--haupt-dunkel); }

/* --- Login ---------------------------------------------------------------- */

.login {
  max-width: 24rem;
  margin: 0 auto;
  min-height: calc(100dvh - 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-titel { text-align: center; font-size: 1.75rem; }
.login .knopf { width: 100%; }
