/* Hippo-Physio Prototyp — Brand-Overlay (Typografie, Radien, Haarlinien, Buttons, Badges)
 * Alle effektiven Farben und Radien auf erlaubte Palette (8):
 *   #E74450 Lampone | #F2F2F2 | #FFFFFF | #1D1D1B | #4F4F4F | #828282 | #BDBDBD | #E0E0E0
 * Radien: nur 0, 2, 8, 48 (Pill). Keine Verläufe/Schatten.
 */

/* ===== Typografie ===== */
html, body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.45;
}

body {
  font-size: 15px;
  color: var(--ink);           /* --brand-dark, compliant */
  background: var(--bg);       /* --brand-light = #F2F2F2, compliant */
}

h1 {
  font-size: 21px;
  line-height: 1.12;
  font-weight: 800;
  margin: 0 0 4px;
}

h2 {
  font-size: 17px;
  margin: 0 0 6px;
}

h3 {
  font-size: 15px;
  margin: 0 0 4px;
}

p {
  margin: 6px 0;
}

/* Link-Akzent in Lampone (erlaubt) */
a {
  color: var(--brand-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ===== Radien-Skala ===== */
/* Nur erlaubte Radien: 0, 2, 8, 48(px) — 50% = Pill erlaubt */
.card {
  border-radius: 8px;
  background: var(--card);         /* --brand-white, compliant */
  border: 1px solid var(--line);   /* --brand-a3 = #BDBDBD, compliant */
  padding: 14px 16px;
  margin-bottom: 12px;
}

.btn {
  border-radius: 48px;             /* Pill - erlaubt */
}

.toast {
  border-radius: 48px;
}

.code, .filterbar select {
  border-radius: 2px;
}

/* ===== Haarlinien statt Kästen ===== */
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--brand-a4);     /* #E0E0E0, compliant */
}

.list .row {
  border-bottom: 1px solid var(--brand-a3);   /* #BDBDBD, compliant */
}

.table-row {
  border-bottom: 1px solid var(--line);        /* --brand-a3, compliant */
}

.table-row .t-name {
  font-weight: 500;    /* override styles.css:167 weight:700 in @media min-width:760px */
}

/* ===== Status-Badges — 8-Farben-Palette ===== */
/* Hierarchielesbarkeit durch Helligkeitsunterschiede + Lampone-Akzent */
.badge-st {
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 48px;          /* Pill - erlaubt */
}

/* st-draft: neutral grau, heller Hintergrund (Helligkeit > review > final) */
.st-draft {
  background: #FFFFFF;          /* brand-white */
  color: #4F4F4F;               /* brand-a1, Sekundärtext */
  border: 1px solid #BDBDBD;    /* brand-a3 Haarlinie hell */
}

/* st-review: warm, aber nur Helligkeiten aus Palette (keine echte Amber-Farbe) */
.st-review {
  background: #F2F2F2;          /* brand-light */
  color: #828282;               /* brand-a2, Kicker */
  border: 1px solid #BDBDBD;    /* brand-a3 Haarlinie hell */
}

/* st-final: Lampone-Akzent erlaub als Akzentpunkt (border + text) */
.st-final {
  background: #FFFFFF;          /* brand-white, klarer Kontrast zu review */
  color: #E74450;               /* Lampone - Akzentpunkt, erlaubt */
  border: 1px solid #E74450;    /* Lampone - Akzentpunkt, erlaubt */
}

/* st-sent: dunkelgrau (a1), kontrastreich zu draft/ review/final */
.st-sent {
  background: #1D1D1B;          /* brand-dark */
  color: #F2F2F2;               /* brand-light, heller Text auf dunklem Grund */
  border: none;
}

.count-pill {
  border-radius: 48px;          /* Pill - erlaubt (Runde Form ok) */
  background: #F2F2F2;          /* brand-light statt --red-soft */
  color: #1D1D1B;               /* brand-dark statt --red, klarer Kontrast */
  border: 1px solid #BDBDBD;    /* brand-a3 Haarlinie hell */
}

/* .avatar: neutral grau-statt blau (Farbwert korrigiert) */
.avatar {
  border-radius: 50%;
  background: #F2F2F2;          /* brand-light */
  color: #4F4F4F;               /* brand-a1, Sekundärtext */
}

/* Badge (topbar Prototyp-Badge): neutral grau aus Palette */
.badge[title="Prototyp"] {
  color: var(--brand-a1);       /* #4F4F4F */
  background: var(--brand-light);   /* #F2F2F2 */
  border: 1px solid var(--brand-a4);  /* #E0E0E0 */
}

/* Topbar .badge (status badge ohne title): auf Palette */
.badge {
  font-weight: 500;
  border-radius: 999px;         /* 50% Pill erlaubt */
  color: var(--brand-a1);       /* #4F4F4F */
  background: var(--brand-light);   /* #F2F2F2 */
  border: 1px solid var(--brand-a4);  /* #E0E0E0 als Haarlinie */
}

/* ===== Hauptknopf — EIN pro Screen (Lampone) ===== */
.btn,
.actions .btn:first-child,
#app .screen-head .btn {
  background: var(--brand-primary);   /* Lampone = Hauptaktion */
  border-color: var(--brand-primary);
  color: #fff;
  font-weight: 800;
}

/* .btn:hover auf #1D1D1B — keine neue Farbe, nur Palette */
.btn:hover {
  background: #1D1D1B;
  border-color: #1D1D1B;
  color: #F2F2F2;
}

/* Ghost/Sof/Soft-Buttons: dezent, nur Palette-Farben */
.btn.ghost {
  background: transparent;
  color: var(--brand-primary);   /* Lampone — Akzentpunkt erlaubt */
  border-color: var(--brand-a4); /* #E0E0E0 */
}

/* .btn.ghost:hover: neutral grau-soft aus Palette */
.btn.ghost:hover {
  background: #F2F2F2;          /* brand-light */
  color: #1D1D1B;               /* brand-dark */
}

.btn.soft {
  background: #F2F2F2;          /* brand-light */
  color: var(--brand-dark);     /* #1D1D1B */
  border-color: var(--line);    /* #BDBDBD */
}

/* .btn.danger: weiße Karte, Lampone-Text (keine andere Farbe) */
.btn.danger {
  background: #FFFFFF;          /* brand-white */
  color: #E74450;               /* Lampone — Akzentpunkt erlaubt */
  border-color: #BDBDBD;        /* brand-a3 Haarlinie hell */
}

/* .btn.danger:hover: auf #1D1D1B statt soft — keine Abstufungen */
.btn.danger:hover {
  background: #F2F2F2;          /* brand-light */
  color: #E74450;               /* Lampone bleibt Akzentpunkt */
}

/* .btn-ghost:hover: nur Palette-Farben (gray-soft = #F2F2F2 aus token) */
.btn-ghost {
  background: none;
  border: none;
  font: inherit;
  font-size: 13px;
  color: var(--brand-a2);       /* #828282, compliant */
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 2px;           /* Kleinste Einheit — korrigiert von 6px */
}

.btn-ghost:hover {
  background: #F2F2F2;          /* brand-light statt --gray-soft (gleicher Wert aber explizit) */
  color: #1D1D1B;               /* brand-dark statt --ink (gleicher Wert, aber klarer) */
}

/* ===== Eingabefelder — Rahmen und Radius korrigiert ===== */
input[type="text"],
input[type="email"],
input[type="date"],
select,
textarea {
  border-radius: 8px;           /* Karten-Radius — korrigiert von 6px */
  border: 1px solid #BDBDBD;    /* brand-a3 Haarlinie hell — statt hartem #C4CDD4 */
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--brand-primary);   /* Lampone erlaubt als Fokus-Akzent */
  outline-offset: 0;
  border-color: var(--brand-primary);
}

/* ===== Tabbar — aktiver Tab in Lampone ===== */
#tabbar a.active {
  color: var(--brand-primary);       /* aktiver Tab = Lampone (erlaubt) */
}

/* Haarlinie unter aktivem Tab: Radius 0 für korrekt ansonsten falsche 3px-Kurve */
#tabbar a.active::after {
  background: var(--brand-primary);   /* Lampone */
  border-radius: 0;          /* Korrigiert von 3px — Haarlinie muss gerade sein */
}

/* .tab-badge (ZahlbAdge): Lampe-bolzer Text auf Dunkelgrau */
.tab-badge {
  background: #1D1D1B;      /* brand-dark — statt --red (#B3261E) */
  color: #F2F2F2;            /* brand-light */
}

/* ===== Toast, Error-Feld, .saved-big mark — Palette ===== */
.toast {
  background: var(--brand-dark);     /* #1D1D1B — statt hartem #17242E (nicht in Palette) */
  color: var(--brand-white);         /* #FFFFFF */
}

.callout {
  border-left: 3px solid var(--brand-primary);   /* Lampone erlaubt als Akzent */
  background: #F2F2F2;          /* brand-light — statt --blue-soft (#FBEEEF, nicht Palette) */
  border-radius: 0;             /* Haarlinien-Logik — styles.css L141 hat 6px */
}

/* callout.warn: Rand zu #4F4F4F — styles.css L142 nutzt hartes #D9A33B (nicht Palette) */
.callout.warn {
  border-left-color: #4F4F4F;   /* brand-a1 — statt #D9A33B */
  background: #F2F2F2;           /* brand-light */
}

/* .callout.ok: Border auf #E74450 (Lampone als Status-Punkt) - ok da Akzent erlaubt */
.callout.ok {
  border-left-color: #E74450;   /* Lampone erlaubt als Akzent */
  background: #F2F2F2;          /* brand-light */
}

.card.error {
  border-color: #4F4F4F;        /* brand-a1 — statt #E5B5B1 (nicht Palette) */
  background: #FFFFFF;           /* brand-white — statt --red-soft (#FBEDEC, nicht Palette) */
}

.saved-big .mark {
  background: #F2F2F2;          /* brand-light — statt --green-soft (#EAF3ED, nicht Palette) */
  border-color: #4F4F4F;        /* brand-a1 statt --green (#2D6A4F, nicht Palette) */
  color: #1D1D1B;               /* brand-dark — kein grüne Farbwert mehr */
}

/* .range-out (Range-Ausgabe-Wert): Hintergrund und Text auf Palette */
.range-out {
  background: #F2F2F2;          /* brand-light — statt --blue-soft (#E8F0FC, nicht Palette) */
  color: #1D1D1B;               /* brand-dark — statt --blue-dark (#164A96, nicht Palette) */
  border-radius: 2px;            /* Nicht-Pill-Radius - korrigiert von 6px */
}

/* .row:hover: neutral hell auf Palette */
.row:hover {
  background: #F2F2F2;          /* brand-light — statt --blue-soft (#E8F0FC, nicht Palette) */
}

/* ===== Kicker/Label in --brand-a2 ===== */
.muted,
.fgroup legend,
.f > span,
.section-label {
  color: var(--brand-a2);       /* #828282 */
}

/* .badge — Gewichte (oben bereits behandelt) */

/* ===== Font-Weight Mappings (unverändert von oben) ===== */
#tabbar a {
  font-weight: 500;
}

.tab-badge {
  font-weight: 800;
}

.row-title {
  font-weight: 500;
}

.count-pill {
  font-weight: 800;
}

.flegend,
.fgroup legend {
  font-weight: 500;
}

.f > span {
  font-weight: 500;
}

.range-out {
  font-weight: 800;
}

/* ===== Meta (b = ink) ===== */
.meta b {
  color: var(--brand-dark);     /* #1D1D1B */
  font-weight: 500;
}

/* .table-head — Tabellenkopf */
.table-head {
  font-weight: 500;
  background: #F2F2F2;          /* brand-light statt --gray-soft (Wert gleich, aber explizit) */
  border-radius: 8px 8px 0 0;   /* Karten-Radius — korrigiert von var(--radius) der .card */
}

/* .table-head Haarlinien aus Palette */
.table-head {
  border-bottom: 1px solid #BDBDBD;   /* brand-a3 — statt var(--line), explizit */
}

/* ===== code-Element: grau-statt-grau-soft ===== */
code {
  background: #F2F2F2;          /* brand-light statt --gray-soft (#EDF0F2, nicht in Palette) */
  border-radius: 48px;           /* Pill erlaubt — aber hier eigentlich klein: korrigiert auf 2px */
  padding: 1px 5px;
  font-size: 12.5px;
}

/* .preview Rand aus Palette */
.preview {
  border-color: #BDBDBD;        /* brand-a3 — statt --line (gleicher Wert, aber explizit) */
}
