/* LazyAnalyze — die CI von Lazy Dishes, uebernommen am 08.09.2026
   Quelle: Web/lazydishes/public/index.html im App-Repo, dazu
   Shared/design-tokens.json. Vorher war das Dashboard dunkel
   (Violett/Blau/Mint) — der alte Stand liegt in der Git-Historie.

   Kontraste GEMESSEN gegen alle drei Gruende (#F6F0E9 Grund,
   #FEFDFB Karte, #EADFD2 Band), nicht geschaetzt:

     Marke     #A34524   5,40 / 6,02 / 4,65   ✓ traegt Schrift
     Bernstein #7A5608   5,87 / 6,53 / 5,05   ✓ traegt Schrift
     Gruen     #1F6B2E   5,80 / 6,45 / 4,99   ✓ traegt Schrift
     Rot       #B3261E   5,78 / 6,43 / 4,98   ✓ traegt Schrift
     Blau      #1D4E89   7,41 / 8,25 / 6,39   ✓ traegt Schrift
     Flaeche   #E2662F   3,01 / 3,35 / 2,59   ✗ NUR Flaechen

   ⚠️ Dieselbe Zweiteilung wie in der App: Eine leuchtende Farbe traegt
   Flaechen, ein dunklerer Zwilling traegt Schrift. Wer --flaeche als
   Textfarbe benutzt, macht den Fehler vom 02.09.2026 noch einmal. */

:root {
  color-scheme: light;
  --bg: #F6F0E9;          /* --grund der Website */
  --bg-hoch: #EADFD2;     /* --grund-mitte */
  --bg-tief: #E2D4C4;     /* --grund-tief */
  --band: #F7EFE3;
  --karte: #FEFDFB;
  --linie: rgba(56, 51, 61, 0.16);
  --linie-zart: rgba(56, 51, 61, 0.09);
  --text: rgba(0, 0, 0, 0.92);
  --gedimmt: rgba(0, 0, 0, 0.68);
  --violett: #A34524;     /* die Marke — Terrakotta */
  --marke: #A34524;
  --flaeche: #E2662F;     /* NUR Flaechen, nie Schrift */
  --blau: #1D4E89;
  --mint: #1F6B2E;
  --gruen: #1F6B2E;
  --orange: #7A5608;      /* Bernstein */
  --rot: #B3261E;
  --radius: 14px;
}

/* Manrope wie auf lazydishes.de — LOKAL ausgeliefert, nicht von Google.
   Der Browser dieser Seite spricht nur mit dieser Domain und mit Supabase;
   ein Fremd-Font waere ein Bruch der DSGVO-Architektur, kein Schoenheitsfehler.
   SIL Open Font License 1.1, Text in /assets/OFL-Manrope.txt */
@font-face { font-family: Manrope; src: url(/assets/Manrope-Regular.ttf) format("truetype");
  font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url(/assets/Manrope-SemiBold.ttf) format("truetype");
  font-weight: 600; font-display: swap; }
@font-face { font-family: Manrope; src: url(/assets/Manrope-ExtraBold.ttf) format("truetype");
  font-weight: 800; font-display: swap; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font: 16px/1.6 Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
/* Der Farbverlauf liegt auf einer eigenen festen Ebene — background-attachment:
   fixed am body bricht das Compositing (Screenshot-Probe: schwarzer Viewport
   nach dem Scrollen) und ist auf iOS Safari ohnehin unzuverlässig. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Warme Ebene statt der drei kalten Kreise. Sie bleibt auf einer festen
     body::before-Ebene — background-attachment: fixed und backdrop-filter
     haben hier am 22.08.2026 das Compositing zerschossen (schwarzer
     Viewport nach dem Scrollen). Nicht zurueckbauen. */
  background:
    radial-gradient(1200px 560px at 84% -12%, rgba(226, 102, 47, 0.10), transparent 62%),
    radial-gradient(940px 480px at -12% 10%, rgba(163, 69, 36, 0.07), transparent 58%),
    radial-gradient(800px 440px at 52% 112%, rgba(226, 212, 196, 0.55), transparent 62%);
}

main { max-width: 1180px; margin: 0 auto; padding: 0 20px 96px; }

/* ---- Kopf ---- */
header.seite {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline;
  justify-content: space-between; margin: 16px 0 6px;
}
h1 { font-size: clamp(28px, 4.5vw, 38px); letter-spacing: -0.6px; margin: 0; }
h1 .cave { background: linear-gradient(96deg, var(--marke), var(--flaeche) 62%, #C4703F); -webkit-background-clip: text; background-clip: text; color: transparent; }
.untertitel { color: var(--gedimmt); margin: 2px 0 0; font-size: 15px; }
.konto { display: flex; gap: 10px; align-items: center; color: var(--gedimmt); font-size: 14px; }

h2 { font-size: 22px; letter-spacing: -0.3px; margin: 44px 0 4px; }
h2 small { color: var(--gedimmt); font-weight: 400; font-size: 14px; margin-left: 8px; }
.beschreibung { color: var(--gedimmt); font-size: 14.5px; margin: 0 0 14px; max-width: 72ch; }

/* ---- Karten und Raster ---- */
.raster { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.raster.schmal { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.karte {
  background: linear-gradient(180deg, #FEFDFB, var(--band));
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.karte h3 { margin: 0 0 2px; font-size: 15px; font-weight: 600; }
.karte .hinweis { color: var(--gedimmt); font-size: 13px; margin: 0; }
.karte.voll { grid-column: 1 / -1; }

/* Kennzahl-Kacheln */
.kachel .wert { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; letter-spacing: -0.8px; margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.kachel .wert.violett { color: var(--violett); }
.kachel .wert.blau { color: var(--blau); }
.kachel .wert.mint { color: var(--mint); }
.kachel .einheit { color: var(--gedimmt); font-size: 13px; }

/* Diagramm-Behälter: feste Höhe, Chart.js füllt ihn responsiv */
.diagramm { position: relative; height: 300px; margin-top: 12px; }
.diagramm.hoch { height: 360px; }
.diagramm.flach { height: 240px; }

/* ---- Bedienelemente ---- */
button, .knopf {
  font: inherit; color: var(--text); cursor: pointer;
  background: var(--karte); border: 1px solid var(--linie);
  border-radius: 11px; padding: 9px 16px; transition: background 0.15s ease;
}
button:hover { background: var(--bg-hoch); }
button.primaer { background: linear-gradient(90deg, var(--violett), var(--blau)); border: 0; font-weight: 600; }
button.primaer:hover { filter: brightness(1.12); }
button.leise { background: transparent; border-color: transparent; color: var(--gedimmt); padding: 6px 10px; }
button.leise:hover { color: var(--text); background: var(--band); }
button:disabled { opacity: 0.5; cursor: default; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.chip {
  font-size: 13.5px; padding: 6px 12px; border-radius: 999px;
  background: var(--band); border: 1px solid var(--linie); color: var(--gedimmt);
}
/* GEMESSEN: Weiss auf --flaeche (#E2662F) kommt nur auf 3,40:1 — zu hell fuer
   12-px-Schrift. Der Verlauf endet deshalb auf #C2410C (5,18:1). --flaeche
   bleibt fuer Flaechen ohne Schrift darauf. */
.chip.aktiv { color: #fff; border-color: transparent; background: linear-gradient(96deg, var(--marke), #C2410C); }
.chip .x { margin-left: 6px; opacity: 0.75; }

/* flex-wrap seit 18.09.2026: Ein Schalter mit drei langen Beschriftungen
   war bei 390 px 396 px breit und stand ueber die Karte hinaus.
   Am Desktop aendert sich nichts — umgebrochen wird nur, wenn es nicht passt. */
.umschalter { display: inline-flex; flex-wrap: wrap; max-width: 100%; background: var(--band); border: 1px solid var(--linie); border-radius: 11px; padding: 3px; gap: 2px; }
.umschalter button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font-size: 14px; color: var(--gedimmt); }
.umschalter button.aktiv { background: var(--karte); color: var(--text); box-shadow: 0 1px 2px rgba(56,51,61,0.12); }

input[type="email"], input[type="password"], input[type="search"], select {
  font: inherit; color: var(--text); width: 100%;
  background: var(--band); border: 1px solid var(--linie);
  border-radius: 11px; padding: 11px 14px; outline: none;
}
input:focus, select:focus { border-color: rgba(29,78,137,0.6); }
label { display: block; font-size: 13.5px; color: var(--gedimmt); margin: 14px 0 6px; }

/* ---- Tabellen (mit eigenem Querlauf, die Seite selbst scrollt nie seitlich) ---- */
.tabelle { overflow-x: auto; margin-top: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 12px; border-top: 1px solid var(--linie); white-space: nowrap; }
/* Ganze Sätze in einer Zelle sprengen die Tabelle seitlich, statt umzubrechen —
   das nowrap oben gilt für Zahlen und Abzeichen, nicht für Quellenangaben. */
td .quellzeile { white-space: normal; display: inline-block; max-width: 46ch; }
th { color: var(--gedimmt); font-weight: 600; font-size: 13px; border-top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.hervor td { background: rgba(163, 69, 36, 0.06); }
.punkt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }

.abzeichen { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.abzeichen.ok { color: var(--gruen); background: rgba(31, 107, 46, 0.11); }
.abzeichen.warn { color: var(--orange); background: rgba(122, 86, 8, 0.12); }
.abzeichen.rot { color: #9B1F19; background: rgba(179, 38, 30, 0.11); }
/* GEMESSEN 08.09.2026: Mit --marke kam dieses Abzeichen auf 4,28:1 — die
   eigene Toenung verdunkelt den Grund, den es selbst braucht. Deshalb ein
   dunklerer Schrift-Zwilling, wie in der App bei okay/okayText. */
.abzeichen.violett { color: #8F3A1E; background: rgba(163, 69, 36, 0.11); }
.abzeichen.blau { color: var(--blau); background: rgba(29, 78, 137, 0.11); }
.abzeichen.mint { color: var(--mint); background: rgba(31, 107, 46, 0.11); }
.abzeichen.grau { color: var(--gedimmt); background: rgba(56, 51, 61, 0.08); }

/* ---- Zustände: laden, leer, Fehler — nie eine falsche Null ---- */
.laden { color: var(--gedimmt); font-size: 14px; padding: 26px 0; text-align: center; }
.laden::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 9px; vertical-align: -2px; border-radius: 50%; border: 2px solid var(--linie); border-top-color: var(--blau); animation: drehen 0.9s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }
.fehler { color: var(--orange); font-size: 14px; padding: 18px 0; }
.meldung { border-radius: 11px; padding: 11px 14px; font-size: 14.5px; margin-top: 14px; }
.meldung.gut { background: rgba(31, 107, 46, 0.11); color: var(--gruen); }
.meldung.schlecht { background: rgba(122, 86, 8, 0.10); color: var(--orange); }

/* ---- Anmeldung ---- */
.auth-buehne { min-height: 78vh; display: grid; place-items: center; }
.auth { width: min(420px, 100%); padding: 26px 26px 24px; }
.auth h2 { margin: 6px 0 2px; font-size: 24px; }
.auth .tabs { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; }
.auth form { margin-top: 4px; }
.auth button.primaer { width: 100%; margin-top: 20px; padding: 12px; }
.klein { font-size: 13px; color: var(--gedimmt); }
.klein a, footer a { color: var(--mint); text-decoration: none; }
.klein a:hover, footer a:hover { text-decoration: underline; }

/* ---- Was die Anmeldung aus dem Rest der Gestaltung braucht ----
   Seit AP-01b (08.10.2026) ist die Gestaltung zweigeteilt: Diese Datei ist
   offen und traegt die Anmeldeseite; dashboard.css liefert der Server nur
   mit gueltiger Sitzung aus und wird NACH dieser Datei eingesetzt. Zusammen
   sind es dieselben Regeln in derselben Reihenfolge wie vorher in
   styles.css — bis auf die zwei folgenden, die schon die Anmeldeseite
   braucht und die deshalb hierher vorgezogen sind. */
.versteckt { display: none !important; }
@media (max-width: 640px) {
  main { padding: 0 14px 80px; }
}

/* Der Ladezustand nach der Anmeldung: Abstand ueber dem zweiten Ausweg.
   GEMESSEN 08.10.2026: „Abmelden“ war als leiser Knopf 35 px hoch — unter
   den 44 px, die ein Finger braucht. */
.lade-ausweg { margin: 10px 0 0; text-align: center; }
.lade-ausweg button { min-height: 44px; min-width: 44px; }
