/* GERL. Corporate Design: Blau #183146, Melone #ff8c9b, Pistazie (online) #87b982, Schrift Barlow */
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --blau: #183146;
  --blau-hell: #e8edf1;
  --melone: #ff8c9b;
  --melone-hell: #ffe8eb;
  --pistazie: #87b982;
  --pistazie-hell: #e7f2e6;
  --warn: #c98a1a;
  --warn-hell: #fbf1dc;
  --fehler: #b3261e;
  --fehler-hell: #fbe9e7;
  --bg: #f5f6f7;
  --karte: #ffffff;
  --text: #183146;
  --text-leise: #5a6b7a;
  --linie: #d9dee3;
  --radius: 8px;
  --touch: 44px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* Kopfleiste */
.kopf {
  background: var(--blau);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  min-height: 56px;
  flex-wrap: wrap;
}
.kopf .marke { font-weight: 700; font-size: 1.375rem; letter-spacing: 0.02em; }
.kopf .bereich { opacity: 0.85; margin-right: auto; }
.kopf nav { display: flex; gap: 4px; }
.kopf nav a {
  color: #fff;
  text-decoration: none;
  padding: 0 14px;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
}
.kopf nav a.aktiv { background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 -3px 0 var(--melone); }
.kopf .nutzer { font-size: 0.9375rem; opacity: 0.9; display: flex; align-items: center; gap: 8px; }

main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 1.75rem; font-weight: 600; margin: 0 0 4px; }
h2 { font-size: 1.25rem; font-weight: 600; margin: 0 0 12px; }
.leise { color: var(--text-leise); }
.klein { font-size: 0.875rem; }

/* Karten und Raster */
.karte {
  background: var(--karte);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(24, 49, 70, 0.08);
  margin-bottom: 16px;
}
.karte.akzent { border-top: 4px solid var(--melone); }
.raster { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.kennzahl { background: var(--karte); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 3px rgba(24, 49, 70, 0.08); }
.kennzahl .wert { font-size: 1.875rem; font-weight: 600; }
.kennzahl .label { color: var(--text-leise); font-size: 0.9375rem; }
.kennzahl.offen { border-left: 4px solid var(--melone); }
.kennzahl.erledigt { border-left: 4px solid var(--pistazie); }
.kennzahl.bestand { border-left: 4px solid var(--blau); }

/* Fortschritt */
.balken { height: 14px; background: var(--blau-hell); border-radius: 999px; overflow: hidden; display: flex; }
.balken > span { display: block; height: 100%; }
.balken .erledigt { background: var(--pistazie); }
.balken .bestand { background: var(--blau); opacity: 0.35; }
.balken .lauf { background: var(--pistazie); transition: width 0.3s; }

/* Schaltflächen */
.knopf {
  min-height: var(--touch);
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1.5px solid var(--blau);
  background: #fff;
  color: var(--blau);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.knopf.primaer { background: var(--blau); color: #fff; }
.knopf.gefahr { border-color: var(--fehler); color: var(--fehler); }
.knopf.gefahr.primaer { background: var(--fehler); color: #fff; }
.knopf:disabled { opacity: 0.45; cursor: not-allowed; }
.knopfreihe { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* Formulare */
label { display: block; font-weight: 600; margin: 12px 0 6px; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  min-height: var(--touch);
  padding: 0 12px;
  border: 1.5px solid var(--linie);
  border-radius: var(--radius);
  background: #fff;
}
input:focus-visible, .knopf:focus-visible, a:focus-visible { outline: 3px solid var(--melone); outline-offset: 2px; }
.datei {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  border: 2px dashed var(--linie);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-leise);
  text-align: center;
  padding: 12px;
}
.datei input { display: none; }

/* Hinweise */
.hinweis { border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; }
.hinweis.ok { background: var(--pistazie-hell); }
.hinweis.warn { background: var(--warn-hell); }
.hinweis.fehler { background: var(--fehler-hell); color: var(--fehler); }

/* Tabellen */
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { color: var(--text-leise); font-weight: 600; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle-scroll { overflow-x: auto; }

/* Login */
.login { max-width: 400px; margin: 48px auto; }

/* Import-Schritte */
.schritt-kopf { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.schritt-nr {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blau); color: #fff; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.status-pille { font-size: 0.8125rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--blau-hell); }
.status-pille.ok { background: var(--pistazie-hell); }

@media (max-width: 640px) {
  .kopf .bereich { display: none; }
  main { padding: 16px 12px 40px; }
  .knopf { width: 100%; justify-content: center; }
}
