/* Zero-Cockpit — Navy-Stil (C-6 §1.3). Farben überschreibbar via /config → CSS-Variablen. */
:root {
  --navy: #0b1f3a;
  --panel: #13294c;
  --panel-hell: #1b3560;
  --linie: #24406e;
  --text: #e9eef7;
  --gedaempft: #93a5c4;
  --akzent: #d4a94f;
  --gruen: #3fbf7f;
  --gelb: #e6b84c;
  --rot: #e2604f;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--navy);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

main { max-width: 900px; margin: 0 auto; padding: 0 14px 90px; }

/* Kopf */
.kopf {
  max-width: 900px; margin: 0 auto; padding: 18px 14px 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.kopf h1 { font-size: 1.35rem; letter-spacing: .02em; display: inline; }
.untertitel { color: var(--akzent); font-size: .85rem; margin-left: 8px; letter-spacing: .12em; text-transform: uppercase; }

/* Offline-Banner (§6: kein weißer Bildschirm) */
.offline-banner {
  background: var(--rot); color: #fff; text-align: center;
  padding: 8px 12px; font-size: .85rem; position: sticky; top: 0; z-index: 20;
}
.versteckt { display: none; }

/* Vier-Zahlen-Kopf */
.vier-zahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 4px; }
.zahl-kachel {
  background: var(--panel); border-radius: var(--radius); padding: 10px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.zahl-wert { font-size: 1.05rem; font-weight: 600; }
.zahl-label { font-size: .68rem; color: var(--gedaempft); text-transform: uppercase; letter-spacing: .08em; }

/* Abschnitte */
.abschnitt { margin-top: 22px; }
.abschnitt h2 { font-size: .95rem; color: var(--gedaempft); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.zaehler { color: var(--akzent); }
.leer-hinweis { color: var(--gedaempft); font-size: .9rem; padding: 6px 2px; }

/* Inbox-Karten */
.inbox-stapel { display: flex; flex-direction: column; gap: 12px; }
.karte {
  background: var(--panel); border-radius: var(--radius); padding: 14px;
  border: 1px solid var(--linie);
}
.karte-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.badge {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 999px; color: var(--navy);
}
.badge-entscheidung { background: var(--akzent); }
.badge-alarm { background: var(--rot); color: #fff; }
.badge-chance { background: var(--gruen); color: #06301c; }
.frist-punkt { width: 10px; height: 10px; border-radius: 50%; margin-left: auto; flex: none; }
.frist-sofort { background: var(--rot); }
.frist-heute { background: var(--gelb); }
.frist-woche { background: var(--gruen); }
.karte h3 { font-size: 1rem; margin-bottom: 6px; }
.karte p { font-size: .88rem; line-height: 1.45; color: var(--text); margin-bottom: 4px; }
.karte .feld-label { color: var(--gedaempft); }
.karte details { margin: 8px 0 4px; }
.karte summary { cursor: pointer; color: var(--akzent); font-size: .85rem; }
.karte pre {
  white-space: pre-wrap; word-break: break-word; font-size: .82rem; line-height: 1.5;
  background: var(--navy); border-radius: 8px; padding: 10px; margin-top: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.karte-aktionen { display: flex; gap: 8px; margin-top: 10px; }

/* Buttons */
.btn {
  border: 0; border-radius: 10px; padding: 10px 16px; font-size: .9rem; font-weight: 600;
  cursor: pointer; color: var(--text); background: var(--panel-hell);
}
.btn:active { transform: scale(.97); }
.btn-primaer { background: var(--akzent); color: var(--navy); }
.btn-go { background: var(--gruen); color: #06301c; flex: 1; }
.btn-aendern { background: var(--panel-hell); flex: 1; }
.btn-ablehnen { background: transparent; border: 1px solid var(--linie); color: var(--gedaempft); flex: 1; }

/* Neuer Auftrag */
.auftrag-form { display: flex; flex-direction: column; gap: 8px; }
.auftrag-form textarea, .auftrag-form select {
  background: var(--panel); color: var(--text); border: 1px solid var(--linie);
  border-radius: 10px; padding: 10px; font-size: .95rem; font-family: inherit; width: 100%;
}
.auftrag-zeile { display: flex; gap: 8px; }
.auftrag-zeile select { flex: 1; }
.meldung { font-size: .85rem; color: var(--gruen); margin-top: 6px; }
.meldung.fehler { color: var(--rot); }

/* Task-Board */
.board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.spalte { flex: 0 0 230px; background: var(--panel); border-radius: var(--radius); padding: 10px; }
.spalte h4 { font-size: .75rem; color: var(--gedaempft); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.spalte h4 .zaehler { margin-left: 4px; }
.task {
  background: var(--panel-hell); border-radius: 10px; padding: 9px 10px; margin-bottom: 8px;
  font-size: .84rem; line-height: 1.4;
}
.task .task-typ { color: var(--akzent); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.task details summary { color: var(--gedaempft); font-size: .78rem; cursor: pointer; margin-top: 4px; }
.task pre {
  white-space: pre-wrap; word-break: break-word; font-size: .78rem; line-height: 1.45;
  background: var(--navy); border-radius: 8px; padding: 8px; margin-top: 5px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.task .task-fehler { color: var(--rot); font-size: .78rem; margin-top: 4px; }

/* Kosten-Widget */
.kosten { background: var(--panel); border-radius: var(--radius); padding: 14px; }
.kosten-zeile { display: flex; justify-content: space-between; font-size: .9rem; margin: 6px 0 4px; }
.kosten-prozent { color: var(--gedaempft); }
.balken { background: var(--navy); border-radius: 999px; height: 10px; overflow: hidden; }
.balken-fuellung { height: 100%; width: 0; background: var(--gruen); border-radius: 999px; transition: width .4s; }
.balken-warn { background: var(--gelb); }
.balken-voll { background: var(--rot); }

/* Status-Punkte */
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.punkt-gruen { background: var(--gruen); }
.punkt-gelb { background: var(--gelb); }
.punkt-rot { background: var(--rot); }
.punkt-grau { background: var(--gedaempft); }

/* Fußzeile */
.fusszeile {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--panel); border-top: 1px solid var(--linie);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  font-size: .75rem; color: var(--gedaempft);
}
.fusszeile span { white-space: nowrap; }

/* Login */
.login-mitte {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 18px; padding: 20px;
}
.login-karte {
  background: var(--panel); border-radius: var(--radius); padding: 26px;
  width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px;
}
.login-karte h1 { font-size: 1.2rem; text-align: center; }
.login-karte input {
  background: var(--navy); color: var(--text); border: 1px solid var(--linie);
  border-radius: 10px; padding: 12px; font-size: 1rem; width: 100%;
}
.login-hinweis { font-size: .8rem; color: var(--gedaempft); text-align: center; line-height: 1.5; }

@media (min-width: 700px) {
  .spalte { flex: 1 1 0; min-width: 170px; }
}
