/* =========================================================
   Schriftarten – selbst gehostet (DSGVO-konform)
   Dateien liegen unter: fonts/*.woff2
   ========================================================= */

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/playfair-display-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/playfair-display-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/open-sans-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/open-sans-600.woff2') format('woff2');
}

/* =========================================================
   Design-Tokens
   ========================================================= */
:root {
  /* Farben */
  --color-primary:      #F66F00;
  --color-primary-dark: #c45800;
  --color-accent:       #e8a020;
  --color-bg:           #faf8f3;
  --color-surface:      #ffffff;
  --color-text:         #2c2c2c;
  --color-text-muted:   #6b6b6b;
  --color-border:       #e0ddd5;

  /* Ampelfarben */
  --color-status-active:  #01a651;
  --color-status-ready:   #e8a020;
  --color-status-done:    #888888;
  --color-status-overdue: #EB3E1A;

  /* Typografie */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Open Sans', 'Helvetica Neue', sans-serif;
  --font-size-base: 16px;
  --line-height:    1.6;

  /* Abstände */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;

  /* Radien */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Schatten */
  --shadow-card:     0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-elevated: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* =========================================================
   Reset & Base
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100dvh;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

button {
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
}

/* =========================================================
   Header – minimal, iOS-Stil
   ========================================================= */
.app-header {
  background-color: rgba(250, 248, 243, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top);
}

.header-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--space-xs) var(--space-md);
  display: flex;
  justify-content: flex-end;
}

.header-menu {
  position: relative;
}

.btn-dots {
  padding: var(--space-xs) var(--space-md);
  border-radius: 99px;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  font-size: 1.1rem;
  transition: background-color 0.15s, box-shadow 0.15s;
}

.btn-dots:hover {
  background-color: var(--color-border);
  box-shadow: none;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  border: 1px solid var(--color-border);
  min-width: 180px;
  padding: var(--space-xs) 0;
  z-index: 101;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.95rem;
  color: var(--color-text);
  text-align: left;
  white-space: nowrap;
  transition: background-color 0.15s;
}

.dropdown-item:hover {
  background-color: var(--color-bg);
}

/* =========================================================
   Seiten-Titel (iOS Large Title Stil)
   ========================================================= */
.page-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.page-logo {
  height: 52px;
  width: auto;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-status-overdue);
  line-height: 1;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  background-color: var(--color-bg);
}

.btn-danger {
  background-color: transparent;
  color: var(--color-status-overdue);
  border: 1px solid var(--color-status-overdue);
}

.btn-danger:hover {
  background-color: #fdf0ee;
}

/* =========================================================
   Main & Filter
   ========================================================= */
#app {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-md) calc(var(--space-xl) + 56px + env(safe-area-inset-bottom));
}

.filter-bar {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.filter-btn {
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
  background-color: var(--color-surface);
  transition: all 0.15s;
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-btn.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* =========================================================
   Batch-Liste & Karten
   ========================================================= */
.batch-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.batch-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s;
}

.batch-card:hover {
  box-shadow: var(--shadow-elevated);
}

.batch-card__body {
  min-width: 0;
}

.batch-card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.batch-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.batch-card__progress {
  margin-bottom: var(--space-sm);
}

.progress-bar {
  height: 6px;
  background-color: var(--color-border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 99px;
  background-color: var(--color-status-active);
  transition: width 0.3s;
}

.batch-card[data-status="ready"] .progress-bar__fill { background-color: var(--color-status-ready); }
.batch-card[data-status="done"]  .progress-bar__fill { background-color: var(--color-status-done); }

.progress-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

.batch-card__notes {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
  white-space: pre-line;
}

.batch-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.batch-card__actions {
  display: flex;
  flex-direction: row;
  gap: var(--space-xs);
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge--active { background-color: #e8f4e1; color: var(--color-status-active); }
.badge--ready  { background-color: #fdf3e0; color: #b87010; }
.badge--done   { background-color: #efefef; color: var(--color-status-done); }

.icon-btn {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: all 0.15s;
}

.icon-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.icon-btn--danger:hover {
  border-color: var(--color-status-overdue);
  color: var(--color-status-overdue);
}

/* =========================================================
   Leer-Zustand
   ========================================================= */
.empty-state {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: var(--space-md);
  color: var(--color-border);
}

.batch-card__meta i {
  font-size: 1em;
  color: var(--color-status-overdue);
}

.empty-text {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

.empty-hint {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

/* =========================================================
   Modal
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 250; /* höher als rezept-detail-overlay (200) + btn-switch-raised (201) */
  padding: var(--space-md);
  overflow: hidden; /* iOS: verhindert horizontalen Scroll durch native Date-Input */
}

@media (min-width: 500px) {
  .modal-overlay {
    align-items: center;
  }
}

.modal {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 90dvh;
  overflow-x: hidden; /* verhindert horizontales Scrollen durch native Date-Input */
  overflow-y: auto;
  padding: var(--space-lg);
  box-shadow: var(--shadow-elevated);
}

@media (min-width: 500px) {
  .modal {
    border-radius: var(--radius-lg);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.modal-header h2 {
  font-size: 1.2rem;
}

.modal-close {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: background-color 0.15s;
}

.modal-close:hover {
  background-color: var(--color-bg);
}

/* =========================================================
   Formular
   ========================================================= */
.batch-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  overflow: hidden; /* iOS: date-Input darf das Formular nicht aufweiten */
  width: 100%;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  overflow: hidden; /* verhindert, dass date-Input die Zeile breiter macht */
}

.form-row--two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-row label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-row input,
.form-row select,
.form-row textarea {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.15s;
  width: 100%;
  min-width: 0; /* iOS: Date-Input überschreibt sonst width: 100% */
}


/* iOS Safari < 18: date-Input ignoriert width:100% wegen internem inline-flex */
.form-row input[type="date"] {
  display: block;
  -webkit-appearance: textfield;
}

.form-row input[type="date"]::-webkit-datetime-edit {
  display: block;
  padding: 0;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(246, 111, 0, 0.15);
}

.form-row input.invalid,
.form-row select.invalid {
  border-color: var(--color-status-overdue);
}

.form-row textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

/* ── Tag-Eingabe ── */
.tag-input-wrapper {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-bg);
  cursor: text;
  transition: border-color 0.15s;
  min-height: 42px;
}

.tag-input-wrapper:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(246, 111, 0, 0.15);
}

.tag-chips {
  display: contents;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #fdeede;
  color: var(--color-primary);
  border-radius: 99px;
  padding: 2px 10px 2px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.tag-chip__remove {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 0;
  line-height: 1;
  font-size: 1rem;
  opacity: 0.6;
  display: flex;
  align-items: center;
}

.tag-chip__remove:hover {
  opacity: 1;
}

#field-tags {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  min-width: 120px;
  padding: var(--space-xs) 0;
  font-size: var(--font-size-base);
  color: var(--color-text);
}

.tag-suggestions {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-elevated);
  list-style: none;
  margin: 0;
  padding: var(--space-xs) 0;
  z-index: 100;
  max-height: 160px;
  overflow-y: auto;
}

.tag-suggestions li {
  padding: var(--space-xs) var(--space-md);
  cursor: pointer;
  font-size: 0.9rem;
}

.tag-suggestions li:hover {
  background-color: #fdeede;
  color: var(--color-primary);
}

/* =========================================================
   Toast
   ========================================================= */
.toast-container {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  pointer-events: none;
}

.toast {
  background-color: var(--color-text);
  color: #fff;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  box-shadow: var(--shadow-elevated);
  animation: toast-in 0.25s ease;
  pointer-events: auto;
}

.toast--success { background-color: var(--color-primary); }
.toast--error   { background-color: var(--color-status-overdue); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Update-Banner
   ========================================================= */
.update-banner {
  position: fixed;
  bottom: calc(var(--space-lg) + 56px + var(--space-sm) + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-md);
  background-color: var(--color-surface);
  border-radius: 99px;
  box-shadow: var(--shadow-elevated);
  white-space: nowrap;
  z-index: 400;
  font-size: 0.875rem;
  color: var(--color-text);
  animation: banner-in 0.3s ease;
}

@keyframes banner-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.btn-update-reload {
  background-color: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 5px 14px;
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-update-reload:active {
  opacity: 0.8;
}

/* =========================================================
   FAB – Floating Action Button
   ========================================================= */
.fab {
  position: fixed;
  bottom: calc(var(--space-lg) + env(safe-area-inset-bottom));
  right: var(--space-lg);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(246, 111, 0, 0.45);
  z-index: 50;
  transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.fab:hover {
  background-color: var(--color-primary-dark);
  box-shadow: 0 6px 18px rgba(246, 111, 0, 0.55);
  transform: scale(1.06);
}

.fab:active {
  transform: scale(0.94);
}

/* =========================================================
   Section-Wechsel (unten links, zwei Pill-Buttons)
   ========================================================= */
.btn-switch-container {
  position: fixed;
  bottom: calc(var(--space-lg) + env(safe-area-inset-bottom));
  left: var(--space-lg);
  display: flex;
  gap: var(--space-xs);
  z-index: 50;
}

.btn-switch {
  padding: var(--space-xs) var(--space-md);
  border-radius: 99px;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-card);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.15s;
  white-space: nowrap;
}

/* hover nur auf Geräten mit echter Maus (kein Touch-Sticky-State auf iOS) */
@media (hover: hover) {
  .btn-switch:hover {
    background-color: var(--color-border);
    box-shadow: none;
  }
}

.btn-switch:active {
  transform: scale(0.95);
}

/* =========================================================
   Rezepte – Liste
   ========================================================= */
.rezept-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background-color: var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.rezept-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background-color: var(--color-surface);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  transition: background-color 0.15s;
  text-decoration: none;
  color: inherit;
  border: none;
  width: 100%;
  text-align: left;
}

.rezept-card:hover,
.rezept-card:focus-visible {
  background-color: #fdf5ec;
  outline: none;
}

.rezept-card__thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background-color: var(--color-bg);
}

.rezept-card__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fdeede;
  color: var(--color-primary);
  font-size: 1.5rem;
}

.rezept-card__body {
  flex: 1;
  min-width: 0;
}

.rezept-card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rezept-card__meta {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.rezept-card__meta i {
  color: var(--color-primary);
  font-size: 0.85em;
}

.rezept-card__arrow {
  color: var(--color-border);
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* Lade- und Fehlerzustände */
.rezept-loading,
.rezept-error,
.rezept-empty {
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.rezept-error {
  color: var(--color-status-overdue);
}

.rezept-error i,
.rezept-loading i {
  margin-right: var(--space-xs);
}

/* =========================================================
   Rezepte – Detailansicht (Vollbild-Overlay)
   ========================================================= */
.rezept-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: var(--color-bg);
  overflow: hidden;
}

.rezept-detail-inner {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
}

.rezept-detail-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgba(250, 248, 243, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--space-sm) var(--space-md);
  padding-top: calc(var(--space-sm) + env(safe-area-inset-top));
  border-bottom: 1px solid var(--color-border);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs) var(--space-md);
  border-radius: 99px;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-card);
  color: var(--color-text);
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s, box-shadow 0.15s;
}

.btn-back:hover {
  background-color: var(--color-border);
  box-shadow: none;
}

.rezept-detail__hero {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
}

.rezept-detail__body {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.rezept-detail__title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  line-height: 1.2;
  color: var(--color-text);
}

.rezept-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.rezept-detail__meta i {
  color: var(--color-primary);
  margin-right: 2px;
}

.rezept-detail__desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.rezept-section__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

.rezept-ingredients {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.rezept-ingredients li {
  font-size: 0.95rem;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.rezept-ingredients li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 8px;
}

.rezept-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  counter-reset: step;
  list-style: none;
}

.rezept-steps li {
  display: flex;
  gap: var(--space-md);
  font-size: 0.95rem;
  line-height: 1.6;
}

.rezept-steps li::before {
  counter-increment: step;
  content: counter(step);
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.rezept-detail__link {
  align-self: flex-start;
  font-size: 0.9rem;
}

/* =========================================================
   Stempel-Wasserzeichen
   ========================================================= */
.stamp-watermark {
  position: fixed;
  bottom: var(--space-sm);
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 220px;
  background-image: url('img/stempel.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

/* =========================================================
   View-Toggle
   ========================================================= */
.view-toggle {
  display: inline-flex;
  gap: 2px;
  background-color: var(--color-border);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: var(--space-lg);
}

.view-btn {
  padding: var(--space-xs) var(--space-md);
  border-radius: calc(var(--radius-md) - 3px);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: all 0.15s;
}

.view-btn.active {
  background-color: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-card);
}

/* =========================================================
   Kalender
   ========================================================= */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  gap: var(--space-md);
}

.cal-month-label {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-text);
  text-align: center;
  flex: 1;
}

.cal-nav {
  font-size: 1.25rem;
  line-height: 1;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text-muted);
  transition: all 0.15s;
}

.cal-nav:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background-color: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cal-weekday {
  background-color: var(--color-bg);
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: var(--space-sm) var(--space-xs);
  letter-spacing: 0.03em;
}

.cal-day {
  background-color: var(--color-surface);
  min-height: 68px;
  padding: var(--space-xs);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-day--empty {
  background-color: var(--color-bg);
}

.cal-day__num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  align-self: flex-start;
}

.cal-day--today .cal-day__num {
  background-color: var(--color-primary);
  color: #fff;
}

.cal-day__events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cal-event {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  cursor: default;
}

.cal-event--ready {
  background-color: #fdf3e0;
  color: #9a6c0a;
}

/* Legende */
.cal-legend {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.cal-legend__item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.cal-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.cal-legend__dot--ready { background-color: #fdf3e0; border: 1px solid #e8a020; }

/* =========================================================
   Einkaufsliste
   ========================================================= */

/* Inline-Formular oben */
.shopping-add-form {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-md) 0;
  align-items: center;
}

.shopping-add-form input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.9rem;
  min-width: 0;
}

.shopping-add-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(246, 111, 0, 0.15);
}

#shopping-field-amount {
  flex: 0 0 80px;
}

.btn-shopping-add {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: opacity 0.15s, transform 0.15s;
}

.btn-shopping-add:active {
  opacity: 0.8;
  transform: scale(0.92);
}

/* Listencontainer */
.shopping-list__items {
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0 var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Einzelner Listeneintrag */
.shopping-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-sm);
  border-radius: var(--radius-sm);
  background-color: var(--color-surface);
  transition: background-color 0.1s;
}

.shopping-item:hover {
  background-color: var(--color-bg);
}

/* Checkbox-Button */
.shopping-item__check {
  flex-shrink: 0;
  font-size: 1.2rem;
  color: var(--color-text-muted);
  padding: 2px;
  transition: color 0.15s, transform 0.1s;
}

.shopping-item--checked .shopping-item__check {
  color: var(--color-status-active);
}

.shopping-item__check:active {
  transform: scale(0.85);
}

/* Name */
.shopping-item__name {
  flex: 1;
  font-size: 0.95rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopping-item--checked .shopping-item__name {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

/* Menge (klickbar zum Bearbeiten) */
.shopping-item__amount {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background-color 0.1s;
}

.shopping-item__amount:hover {
  background-color: var(--color-border);
}

.shopping-item__amount--empty {
  opacity: 0.4;
}

/* Inline-Input für Mengen-Bearbeitung */
.shopping-item__amount-input {
  width: 70px;
  font-size: 0.85rem;
  padding: 2px 6px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
}

.shopping-item__amount-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(246, 111, 0, 0.2);
}

/* Löschen-Button */
.shopping-item__delete {
  flex-shrink: 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background-color 0.15s;
  opacity: 0;
}

.shopping-item:hover .shopping-item__delete,
.shopping-item--checked .shopping-item__delete {
  opacity: 1;
}

.shopping-item__delete:hover {
  color: var(--color-status-overdue);
  background-color: rgba(235, 62, 26, 0.08);
}

/* Trennlinie "Erledigt" */
.shopping-divider {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-lg) var(--space-md) var(--space-xs);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.shopping-divider::before,
.shopping-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--color-border);
}

/* Footer: Erledigte löschen */
.shopping-footer {
  padding: var(--space-md) var(--space-md) var(--space-xl);
  display: flex;
  justify-content: center;
}

/* Leer-Zustand */
.shopping-empty {
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.shopping-empty__hint {
  font-size: 0.85rem;
  margin-top: var(--space-sm);
  opacity: 0.7;
}

/* Warenkorb-Icon in der Zutaten-Liste */
.rezept-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.rezept-section__header .rezept-section__title {
  margin-bottom: 0;
}

.btn-add-all-ingredients {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--color-primary);
  transition: background-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn-add-all-ingredients:hover {
  background-color: var(--color-primary);
  color: #fff;
}

.rezept-ingredient {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.btn-add-ingredient {
  flex-shrink: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, background-color 0.15s;
}

.rezept-ingredient:hover .btn-add-ingredient,
.rezept-ingredient:focus-within .btn-add-ingredient {
  opacity: 1;
}

.btn-add-ingredient:hover {
  color: var(--color-primary);
  background-color: rgba(246, 111, 0, 0.08);
}

/* Auf Touch-Geräten: Icon immer sichtbar */
@media (hover: none) {
  .btn-add-ingredient {
    opacity: 1;
  }
  .shopping-item__delete {
    opacity: 1;
  }
}

/* =========================================================
   Utilities
   ========================================================= */
[hidden] { display: none !important; }

/* =========================================================
   Info-Modal
   ========================================================= */
.modal-overlay--centered {
  align-items: center; /* Info-Modal mittig statt als Bottom-Sheet */
}

.modal--info {
  max-width: 360px;
  border-radius: var(--radius-lg);
}

.info-body {
  padding-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* App-Name + Logo */
.info-app {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0 var(--space-xs);
}

.info-app__logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.info-app__name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
}

.info-app__version {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Trennlinie */
.info-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-xs) 0;
}

/* Copyright-Zeile */
.info-copy {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Links (E-Mail + Website) */
.info-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.15s;
}

.info-link:hover {
  opacity: 0.75;
}

/* "Made with ♥" */
.info-made {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-align: center;
  padding-top: var(--space-xs);
}

.info-heart {
  color: var(--color-status-overdue);
}

/* =========================================================
   Responsive – Mobile
   ========================================================= */
@media (max-width: 500px) {
  /* Karten-Seitenabstand etwas reduzieren */
  .batch-card {
    padding: var(--space-md);
  }
}
