/* ═══════════════════════════════════════════════════════════════
   Foodhome — Design-System
   Konvention gemäss Leitfaden (frontend-engineer.md):
   CSS-Variablen zentral, Klassen mit Seiten-/Komponenten-Präfix (fh-*)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --fh-primary: #2f9e44;        /* Frischgrün */
  --fh-primary-dark: #237032;
  --fh-accent: #f59f00;         /* Warm-Amber */
  --fh-danger: #e03131;
  --fh-text: #212529;           /* Anthrazit */
  --fh-bg: #f8f9fa;
  --fh-card-radius: 0.75rem;
  --fh-bottomnav-height: 4rem;
}

body {
  background-color: var(--fh-bg);
  color: var(--fh-text);
}

/* ── Top-Navbar ─────────────────────────────────────────────── */
.fh-navbar {
  background-color: var(--fh-primary);
}

.fh-navbar .navbar-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── Mobile Bottom-Navigation ───────────────────────────────── */
.fh-bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--fh-bottomnav-height);
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  z-index: 1030;
  padding-bottom: env(safe-area-inset-bottom);
}

.fh-bottomnav__item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  text-decoration: none;
  color: var(--fh-text);
  font-size: 0.7rem;
  line-height: 1;
}

.fh-bottomnav__item .fh-bottomnav__icon {
  font-size: 1.4rem;
  line-height: 1.2;
}

.fh-bottomnav__item--active {
  color: var(--fh-primary);
  font-weight: 600;
}

/* Scan als hervorgehobener Zentral-Button */
.fh-bottomnav__item--scan .fh-bottomnav__icon {
  background: var(--fh-primary);
  color: #fff;
  border-radius: 50%;
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -1.2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Unter der Bottom-Nav Platz lassen, damit Inhalt nicht verdeckt wird */
@media (max-width: 991.98px) {
  main.fh-main {
    padding-bottom: calc(var(--fh-bottomnav-height) + 1.5rem);
  }
}

@media (min-width: 992px) {
  .fh-bottomnav {
    display: none;
  }
}

/* ── Inventarliste ──────────────────────────────────────────── */
.fh-inv-item {
  border-radius: var(--fh-card-radius);
  margin-bottom: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.fh-inv-item--warning {
  border-left: 4px solid var(--fh-danger);
}

.fh-inv-item__name {
  font-weight: 600;
}

.fh-inv-item__meta {
  font-size: 0.85rem;
  color: #6c757d;
}

/* MHD-Badges: Text + Farbe (WCAG — nicht nur Farbe) */
.fh-badge-expiry-over {
  background-color: var(--fh-danger);
}

.fh-badge-expiry-soon {
  background-color: var(--fh-accent);
  color: var(--fh-text);
}

.fh-badge-expiry-ok {
  background-color: #dee2e6;
  color: var(--fh-text);
}

/* ── Dashboard-Schnellzugriff ───────────────────────────────── */
.fh-quickgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
}

.fh-quickgrid .fh-quickcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 0.5rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--fh-card-radius);
  text-decoration: none;
  color: var(--fh-text);
  font-weight: 600;
  font-size: 0.9rem;
}

.fh-quickcard__icon {
  font-size: 1.8rem;
  line-height: 1;
}

/* ── Auth-Karten ────────────────────────────────────────────── */
.fh-auth-card {
  max-width: 26rem;
  margin: 2.5rem auto;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--fh-card-radius);
  padding: 1.75rem;
}

/* ── Buttons in Primärfarbe ─────────────────────────────────── */
.btn-primary {
  --bs-btn-bg: var(--fh-primary);
  --bs-btn-border-color: var(--fh-primary);
  --bs-btn-hover-bg: var(--fh-primary-dark);
  --bs-btn-hover-border-color: var(--fh-primary-dark);
  --bs-btn-active-bg: var(--fh-primary-dark);
  --bs-btn-active-border-color: var(--fh-primary-dark);
}
