/* ============================================================
   Filicart – Design-System
   Mobile-first, Blau/Teal (am Logo & den Screenshots orientiert),
   heller & dunkler Modus über data-theme.
   ============================================================ */

:root {
  /* Markenfarben */
  --blue: #1488fb;
  --blue-strong: #0e6fe0;
  --navy: #1e2a78;       /* FAB / Akzent (aus Screenshots) */
  --teal: #1ab6a6;       /* Logo */
  --green: #46a33a;      /* Logo-Akzent / "wieder hinzufügen" */
  --red: #e23b4e;

  /* Helles Theme */
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --text: #14233f;
  --muted: #6b7689;
  --border: #e1e7f0;
  --shadow: 0 2px 10px rgba(20, 35, 63, 0.08);
  --shadow-strong: 0 8px 28px rgba(20, 35, 63, 0.18);

  --primary: var(--blue);
  --on-primary: #ffffff;

  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 64px;
  --bar-h: 56px;
  --maxw: 1080px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0e1525;
  --surface: #16203a;
  --surface-2: #1d2942;
  --text: #e7ecf5;
  --muted: #93a1b8;
  --border: #28344f;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  --shadow-strong: 0 10px 30px rgba(0, 0, 0, 0.5);
  --primary: #3b9aff;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }

/* ---- Layout ---------------------------------------------------------- */
.app { min-height: 100%; display: flex; flex-direction: column; }

.content {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + var(--safe-bottom) + 16px);
}

@media (min-width: 768px) {
  .content { padding: 24px 24px 40px; }
}

.page-title { margin: 4px 0 16px; font-size: 1.4rem; font-weight: 700; }

/* ---- App-Bar (mobil: blaue Titelleiste / Desktop: Top-Navigation) ----- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--bar-h);
  padding: 0 16px;
  padding-top: env(safe-area-inset-top, 0px);
  box-shadow: var(--shadow);
}
.appbar-title { font-weight: 700; font-size: 1.15rem; flex: 1; }
.appbar-inner { display: flex; align-items: center; gap: 12px; width: 100%; }
.appbar .brand,
.appbar .nav-top { display: none; }
.appbar .appbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Auf der Home-Seite ist die mobile App-Bar ausgeblendet (Logo im Inhalt). */
body.is-home .appbar { display: none; }

@media (min-width: 768px) {
  .appbar {
    background: var(--surface);
    color: var(--text);
    height: 64px;
    border-bottom: 1px solid var(--border);
    box-shadow: none;
  }
  body.is-home .appbar { display: flex; }
  .appbar-title { display: none; }
  .appbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; border: none; background: none; padding: 0; cursor: pointer; color: var(--text); }
  .appbar .brand img { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; }
  .appbar .nav-top { display: flex; gap: 4px; margin-left: 8px; }
  .appbar .appbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
  .appbar-inner {
    width: 100%; max-width: var(--maxw); margin: 0 auto;
    display: flex; align-items: center; gap: 12px;
  }
}

.nav-top-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  color: var(--muted); font-weight: 600; cursor: pointer;
  background: none; border: none;
}
.nav-top-item .ic { width: 20px; height: 20px; }
.nav-top-item:hover { background: var(--surface-2); color: var(--text); }
.nav-top-item.active { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }

/* ---- Untere Navigation (mobil) --------------------------------------- */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 14px rgba(20, 35, 63, 0.18);
}
@media (min-width: 768px) { .bottom-nav { display: none; } }

.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  background: none; border: none; cursor: pointer;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.66rem; font-weight: 600;
  height: 100%;
}
.nav-item .ic { width: 24px; height: 24px; }
.nav-item.active { color: #fff; }
.nav-item.active .pill {
  background: rgba(255, 255, 255, 0.22);
}
.nav-item .pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 14px; border-radius: 999px; transition: background 0.15s;
}

/* Home in der Mitte: größer und hervorgehoben */
.nav-item.home { flex: 0 0 auto; }
.nav-item.home .home-circle {
  width: 58px; height: 58px; margin-top: -22px;
  border-radius: 50%;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-strong);
  border: 4px solid var(--primary);
}
.nav-item.home .ic { width: 28px; height: 28px; color: #fff; }
.nav-item.home.active .home-circle { background: var(--blue-strong); }

/* ---- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer;
  background: var(--surface-2); color: var(--text);
  transition: filter 0.15s, background 0.15s;
}
.btn:hover { filter: brightness(0.98); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.ghost { background: transparent; border-color: var(--border); }
.btn.danger { background: var(--red); color: #fff; }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 12px; font-size: 0.85rem; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Formulare ------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }

/* ---- Karten / Listen ------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.card h2 { margin: 0 0 12px; font-size: 1.05rem; }
.card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title h2 { margin: 0; }

.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .sub { color: var(--muted); font-size: 0.82rem; }
.row-title { font-weight: 600; }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.center { text-align: center; }
.spacer { height: 12px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
  font-size: 0.76rem; font-weight: 600;
}
.chip.me { background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--teal); }
.chip.default { background: color-mix(in srgb, var(--navy) 14%, transparent); color: var(--primary); }

.banner {
  display: flex; align-items: center; gap: 12px;
  background: color-mix(in srgb, var(--blue) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--border));
  color: var(--text);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px;
}
.banner.warn { background: color-mix(in srgb, #f4a528 16%, var(--surface)); border-color: #f4a528; }

/* ---- Home ------------------------------------------------------------ */
.home-logo { text-align: center; padding: 16px 0 6px; }
.home-logo img { width: 116px; height: 116px; background: #fff; border-radius: 24px; padding: 8px; box-shadow: 0 4px 18px rgba(20,35,63,.14); }
.home-logo .name { font-size: 1.6rem; font-weight: 800; letter-spacing: 0.5px; margin-top: 4px; }
.home-logo .tag { color: var(--muted); font-size: 0.9rem; }

.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; text-align: center; box-shadow: var(--shadow); cursor: pointer;
  position: relative;
}
.tile .ic { width: 30px; height: 30px; color: var(--primary); }
.tile .t { font-weight: 700; margin-top: 8px; }
.tile .s { color: var(--muted); font-size: 0.78rem; }
.tile.soon { opacity: 0.75; cursor: default; }
.tile .soon-badge { position: absolute; top: 8px; right: 8px; font-size: 0.62rem; }

.group-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.group-current {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; font-weight: 700;
}

/* ---- Gruppen-Dropdown (Gruppenauswahl auf der Startseite) -------------- */
.group-drop { position: relative; margin-bottom: 4px; }
.group-drop-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 2px solid var(--primary);
  color: var(--text); font-weight: 700; font-size: 1rem; cursor: pointer;
  text-align: left; transition: background 0.15s;
}
.group-drop-btn:hover { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.group-drop-btn .grow { flex: 1; }
.group-drop-btn .ic:last-child { color: var(--muted); transition: transform 0.2s; }
.group-drop-menu.open ~ * { /* nichts */ }
.group-drop:has(.group-drop-menu.open) .group-drop-btn .ic:last-child { transform: rotate(180deg); }
.group-drop-menu {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  z-index: 20; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-strong);
  padding: 6px;
}
.group-drop-menu.open { display: block; }
.group-drop-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px; border: none; background: none; cursor: pointer;
  color: var(--text); font-weight: 600; font-size: 0.92rem; border-radius: 8px; text-align: left;
}
.group-drop-item:hover { background: var(--surface-2); }
.group-drop-item.active {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  cursor: default;
}
.group-drop-item.active .ic { color: var(--primary); }
.group-drop-item .grow { flex: 1; }

/* Mitglieder-Chips auf der Startseite (nur Anzeige, keine Aktionen) */
.group-members-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 6px; }

/* Kein-Gruppe-Hinweis für gruppenspezifische Bereiche */
.no-group-state {
  max-width: 480px; margin: 40px auto; padding: 32px 20px; text-align: center;
}
.no-group-state h2 { margin: 12px 0 10px; font-size: 1.3rem; }
.no-group-state p { color: var(--muted); line-height: 1.6; margin: 0 0 20px; }

/* ---- Auth ------------------------------------------------------------ */
.auth-wrap {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px calc(40px + var(--safe-bottom));
}
.auth-card { width: 100%; max-width: 400px; }
.auth-logo { text-align: center; margin-bottom: 18px; }
.auth-logo img { width: 92px; height: 92px; }
.auth-logo .name { font-size: 1.5rem; font-weight: 800; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.tab { flex: 1; text-align: center; padding: 9px; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--muted); border: none; background: none; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.linkish { background: none; border: none; color: var(--primary); cursor: pointer; font-weight: 600; padding: 0; }

/* ---- Onboarding-Leer-Zustand (Erklärungslisten in leeren Bereichen) ------ */
.onboard-list {
  list-style: none; margin: 0 auto 16px; padding: 0;
  max-width: 320px; text-align: left;
}
.onboard-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 0; font-size: 0.9rem; color: var(--muted);
}
.onboard-list li .ic { color: var(--teal); width: 18px; height: 18px; flex-shrink: 0; }

/* Info-Box für komplexere Erklärungen (z. B. Vorlagen vs. Packliste) */
.onboard-info-box {
  max-width: 340px; margin: 8px auto 20px;
  background: color-mix(in srgb, var(--blue) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--border));
  border-radius: var(--radius-sm); padding: 14px 16px;
  text-align: left;
}
.onboard-info-title { font-weight: 700; font-size: 0.92rem; margin-bottom: 2px; }

/* ---- Modal ----------------------------------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(10, 18, 35, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 600px) { .modal-backdrop { align-items: center; } }
.modal-backdrop.modal--top { align-items: flex-start; }
.modal-backdrop.modal--top .modal { border-radius: 0 0 18px 18px; margin-top: 56px; max-height: 80vh; }
.modal {
  background: var(--surface); width: 100%; max-width: 460px;
  border-radius: 18px 18px 0 0; padding: 20px;
  box-shadow: var(--shadow-strong);
  max-height: 88vh; overflow: auto;
}
@media (min-width: 600px) { .modal { border-radius: 18px; } }
.modal h3 { margin: 0 0 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ---- Toast ----------------------------------------------------------- */
.toast-root {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 16px + var(--safe-bottom));
  z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
@media (min-width: 768px) { .toast-root { bottom: 24px; } }
.toast {
  pointer-events: auto;
  background: var(--text); color: var(--surface);
  padding: 11px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  box-shadow: var(--shadow-strong); max-width: 90vw;
  animation: toast-in 0.18s ease;
}
.toast.error { background: var(--red); color: #fff; }
.toast.success { background: var(--green); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- Sonstiges ------------------------------------------------------- */
.icon-btn {
  background: none; border: none; cursor: pointer; color: inherit;
  width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .ic { width: 22px; height: 22px; }

.empty { text-align: center; color: var(--muted); padding: 32px 12px; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

/* ---- Icons ----------------------------------------------------------- */
/* Standardgröße für alle Inline-SVG-Icons. Spezifischere Regeln (Nav,
   Kacheln, Buttons …) überschreiben das im jeweiligen Kontext. Ohne diese
   Basisgröße bläht das SVG auf breiten Desktops unkontrolliert auf. */
.ic { width: 22px; height: 22px; flex: none; }
.list-row > .ic { color: var(--muted); }
.btn .ic { width: 18px; height: 18px; }
.chip .ic { width: 14px; height: 14px; }
.banner .ic { width: 22px; height: 22px; color: #b9791f; }
/* Großes Hero-Icon in Platzhalter-Bereichen */
.home-logo .ic { width: 72px; height: 72px; color: var(--primary); }

/* ---- Einkaufsliste --------------------------------------------------- */
/* Listen-Menü (aufklappbar) */
.shop-listbar { position: relative; margin-bottom: 14px; }
.shop-listbar-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-weight: 700; font-size: 1rem; cursor: pointer;
  box-shadow: var(--shadow);
}
.shop-listbar-btn .grow { flex: 1; text-align: left; }
.shop-listmenu {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  z-index: 20; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-strong);
  padding: 6px; max-height: 60vh; overflow: auto;
}
.shop-listmenu.open { display: block; }
.shop-listmenu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 10px; border: none; background: none; cursor: pointer;
  color: var(--text); font-weight: 600; font-size: 0.92rem; border-radius: 8px; text-align: left;
}
.shop-listmenu-item .grow { flex: 1; }
.shop-listmenu-item:hover { background: var(--surface-2); }
.shop-listmenu-item.active { color: var(--primary); }
.shop-listmenu-item.danger { color: var(--red); }

/* Eingabe + Vorschläge */
.shop-addbar { position: relative; margin-bottom: 12px; }
.shop-addbar-row { display: flex; align-items: stretch; gap: 8px; }
.shop-addbar-row .grow { flex: 1; }
.shop-add-btn { padding: 0 16px; }
.shop-suggest {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  z-index: 20; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-strong);
  padding: 6px; max-height: 50vh; overflow: auto;
}
.shop-suggest.open { display: block; }
.shop-suggest-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: none; background: none; cursor: pointer;
  color: var(--text); font-size: 0.92rem; border-radius: 8px; text-align: left;
}
.shop-suggest-item .grow { flex: 1; }
.shop-suggest-item:hover { background: var(--surface-2); }
.shop-suggest-item .ic { width: 18px; height: 18px; color: var(--muted); }

/* Sortier-Umschalter */
.shop-sort { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.shop-sort .ic { width: 18px; height: 18px; color: var(--muted); }

/* Sektions-Überschrift (Kategorie / "Kürzlich gebraucht") */
.shop-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700; color: var(--muted);
  margin: 16px 2px 4px; text-transform: uppercase; letter-spacing: 0.4px;
}
.shop-section-title .ic { width: 16px; height: 16px; }

/* Artikel-Zeile */
.shop-items { display: flex; flex-direction: column; }
.shop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 2px; border-bottom: 1px solid var(--border);
}
.shop-item:last-child { border-bottom: none; }
.shop-check {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface); cursor: pointer;
}
.shop-check:hover { border-color: var(--green); }
.shop-item-body {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; border: none; background: none; cursor: pointer; text-align: left; color: var(--text);
}
.shop-cat { color: var(--muted); }
.shop-item-name { display: block; font-weight: 600; }
.shop-item-sub { display: block; color: var(--muted); font-size: 0.8rem; }
.shop-item-qty { color: var(--muted); font-size: 0.85rem; white-space: nowrap; flex-shrink: 0; }
.shop-item.checked .shop-item-name { color: var(--muted); text-decoration: line-through; }
.shop-readd {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--green); background: transparent; color: var(--green);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.shop-readd:hover { background: color-mix(in srgb, var(--green) 14%, transparent); }
.shop-readd .ic { width: 16px; height: 16px; }

/* Sort-Dropdown in „Kürzlich gebraucht"-Kopfzeile */
.shop-recent-sort-sel {
  margin-left: auto;
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted, var(--muted));
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
[data-theme="dark"] .shop-recent-sort-sel {
  background: var(--surface-2, var(--surface));
}

/* ═══════════════════════════════════════════════════════
   Rezepte
═══════════════════════════════════════════════════════ */
.recipe-group-header { font-weight: 600; font-size: .9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 16px 0 6px; }
.recipe-card { background: var(--surface); border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; cursor: pointer; transition: box-shadow .15s; border: 1px solid var(--border); }
.recipe-card:hover { box-shadow: 0 2px 12px var(--shadow); }
.recipe-card-title { font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.recipe-card-meta { display: flex; gap: 10px; font-size: .82rem; color: var(--muted); align-items: center; flex-wrap: wrap; }
.recipe-detail-header { display: flex; align-items: center; gap: 10px; padding: 4px 0 12px; }
.recipe-detail-back { background: none; border: none; cursor: pointer; color: var(--blue); font-size: .95rem; padding: 4px 0; font-weight: 600; }
.recipe-image { width: 100%; max-height: 280px; object-fit: contain; background: var(--surface-2); border-radius: 12px; margin-bottom: 12px; }
.recipe-meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.portions-control { display: flex; align-items: center; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.portions-control button { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--blue); background: none; color: var(--blue); font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.portions-control button:hover { background: color-mix(in srgb, var(--blue) 12%, transparent); }
.portions-default-hint { font-size: .8rem; color: var(--muted); }
.portions-reset { border-radius: 50% !important; width: 28px !important; height: 28px !important; font-size: .95rem !important; padding: 0 !important; }
.portions-label { min-width: 80px; text-align: center; font-weight: 600; }
.recipe-section-title { font-weight: 700; font-size: 1.1rem; margin: 20px 0 10px; }
.recipe-ingredient-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.recipe-ingredient-row span:last-child { text-align: right; color: var(--muted); }
.recipe-step-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.recipe-step-num { font-weight: 700; color: var(--blue); min-width: 24px; flex-shrink: 0; }
.recipe-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.recipe-form-steps, .recipe-form-ingredients { display: flex; flex-direction: column; gap: 8px; }
.recipe-form-step, .recipe-form-ingredient { display: flex; gap: 8px; align-items: flex-start; }
.recipe-form-step textarea, .recipe-form-ingredient input { flex: 1; min-width: 0; }
.recipe-form-step .icon-btn, .recipe-form-ingredient .icon-btn { flex-shrink: 0; }
.recipe-search { width: 100%; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-size: .95rem; margin-bottom: 12px; box-sizing: border-box; }
.recipe-search:focus { outline: none; border-color: var(--blue); }
.recipe-empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.flex { display: flex; }
.flex.between { justify-content: space-between; }
.grow { flex: 1; }

/* Autocomplete-Widget für Zutateneingabe */
.autocomplete-list { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); z-index: 100; max-height: 200px; overflow-y: auto; }
.autocomplete-item { padding: 8px 12px; cursor: pointer; font-size: .9rem; display: flex; align-items: center; }
.autocomplete-item:hover { background: var(--surface-2); }

/* Fullscreen-Formular für Rezept-Erstellung/Bearbeitung */
.recipe-form-fullscreen { padding: 0 0 80px; }

/* Keywords unter dem Rezepttitel */
.recipe-keywords { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.recipe-keyword { font-size: .75rem; background: var(--surface-2); color: var(--muted); border-radius: 20px; padding: 2px 10px; border: 1px solid var(--border); }

/* Beschreibung in der Detail-Ansicht */
.recipe-description { color: var(--muted); font-size: .93rem; margin: 0 0 14px; line-height: 1.5; }

/* Rezept-Nutzer-Header (Gruppierungsheader für Rezepte nach Nutzer) */
.recipe-user-header {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  padding: 8px 0 4px;
  margin-top: 4px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

/* Listen-Auswahl-Sheet */
.list-picker-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.list-picker-sheet { background: var(--surface); border-radius: 18px 18px 0 0; padding: 24px 20px; width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 8px; }

/* ═══════════════════════════════════════════════════════
   Finanzen
═══════════════════════════════════════════════════════ */
.finance-entry {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow .15s, transform .12s;
}
.finance-entry:hover { box-shadow: var(--shadow-strong); transform: translateY(-1px); }
.finance-entry:active { transform: translateY(0); }
.finance-entry-body { flex: 1; min-width: 0; }
.finance-entry-title { font-weight: 600; font-size: .97rem; }
.finance-entry-meta { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.finance-entry-amount { font-weight: 700; font-size: 1.05rem; white-space: nowrap; color: var(--text); }
.finance-entry-amount.settlement { color: var(--green); }

.finance-balance-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.finance-balance-row:last-child { border-bottom: none; }
.finance-balance-name { font-weight: 600; }
.finance-balance-value { font-weight: 700; }
.finance-balance-value.positive { color: var(--green); }
.finance-balance-value.negative { color: #e53e3e; }

.finance-debt-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .9rem;
}
.finance-debt-row:last-child { border-bottom: none; }
.finance-debt-names { flex: 1; }
.finance-debt-amount { font-weight: 700; white-space: nowrap; }

/* SVG-Verlaufsdiagramm */
.finance-chart-wrap { width: 100%; overflow-x: auto; padding: 8px 0 16px; }
.finance-chart-title { font-weight: 700; font-size: 1rem; margin: 16px 0 8px; }
.finance-chart-empty { color: var(--muted); font-size: .9rem; padding: 24px 0; text-align: center; }

/* Eingabeformular Splits */
.finance-splits-header { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 8px; }
.finance-splits-list { display: flex; flex-direction: column; gap: 8px; }
.finance-split-row { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
/* Versteckte native Checkbox – optisch durch .finance-split-checkbox ersetzt */
.finance-split-check {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.finance-split-checkbox {
  width: 22px; height: 22px; flex-shrink: 0;
  border: 2px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, box-shadow .15s;
  position: relative;
}
.finance-split-checkbox::after {
  content: '';
  width: 6px; height: 10px;
  border: 2.5px solid transparent;
  border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
  transition: opacity .12s;
}
.finance-split-check:checked + .finance-split-checkbox {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}
.finance-split-check:checked + .finance-split-checkbox::after {
  border-color: #fff;
  opacity: 1;
}
.finance-split-check:focus-visible + .finance-split-checkbox {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent);
}
.finance-split-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-split-input { width: 80px; text-align: right; }
.finance-split-input:disabled { opacity: .4; background: var(--surface-2); cursor: not-allowed; }
.finance-split-euro { color: var(--muted); font-size: .9rem; width: 14px; }

/* Flash-Animation wenn Gesamtbetrag aus Splits berechnet wird */
@keyframes finance-flash {
  0%   { background: color-mix(in srgb, var(--blue) 30%, var(--surface)); }
  100% { background: var(--surface); }
}
.finance-amount-flash { animation: finance-flash .5s ease-out; }

/* FAB (Floating Action Button) */
.fab {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: transform .15s, box-shadow .15s;
}
.fab:hover { transform: translateX(-50%) scale(1.08); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.fab:active { transform: translateX(-50%) scale(.96); }
.fab .ic { width: 26px; height: 26px; }

/* ---- Icon-Varianten ------------------------------------------------------ */
.ic-left { transform: rotate(90deg); display: inline-block; }

/* ---- Subpage (Detail / Formular ersetzt ganzen Content-Bereich) ---------- */
.subpage-wrap { display: flex; flex-direction: column; min-height: 100%; }
.subpage-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.subpage-header h3 {
  position: absolute; left: 0; right: 0;
  margin: 0; text-align: center; font-size: 1rem; font-weight: 700;
  pointer-events: none;
}
.subpage-header span { visibility: hidden; }
.subpage-back { flex-shrink: 0; }
.subpage-body { flex: 1; padding-bottom: 32px; }

/* ---- Datumsgruppen in der Ausgabenliste ---------------------------------- */
.finance-date-separator {
  font-size: .95rem; font-weight: 700; color: var(--text);
  padding: 20px 0 8px;
  display: flex; align-items: center; gap: 10px;
}
.finance-date-separator::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.finance-date-separator:first-child { padding-top: 4px; }

/* ---- Detail-Ansicht ------------------------------------------------------ */
.finance-detail-hero { margin-bottom: 10px; }
.finance-detail-title { font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.finance-detail-amount { font-size: 2rem; font-weight: 800; color: var(--primary); margin-top: 4px; }
.finance-detail-category {
  display: inline-block; font-size: .8rem; font-weight: 600;
  background: color-mix(in srgb, var(--teal) 15%, transparent);
  color: var(--teal); border-radius: 999px; padding: 2px 10px; margin-bottom: 10px;
}
.finance-detail-meta { font-size: .88rem; color: var(--muted); margin-bottom: 20px; }
.finance-detail-section { font-size: .9rem; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.finance-detail-splits { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.finance-detail-split-row { display: flex; justify-content: space-between; font-size: .92rem; padding: 8px 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.finance-detail-split-amt { font-weight: 700; }
.finance-receipt-wrap { margin-bottom: 8px; }
.finance-receipt-img { display: block; width: 100%; border-radius: var(--radius); object-fit: contain; }
.finance-receipt-wrap .btn { margin-top: 8px; }

/* ---- Verlauf: Controls & Charts ----------------------------------------- */
.finance-chart-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: flex-end; }
.finance-chart-range { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.finance-chart-range label { font-size: .82rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.finance-chart-range .input { width: 130px; padding: 8px 10px; font-size: .88rem; }
.finance-chart-gran { display: flex; align-items: center; gap: 6px; }
.finance-chart-gran label { font-size: .82rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.finance-chart-gran .input { width: 130px; padding: 8px 10px; font-size: .88rem; }
.finance-chart-section { margin-top: 4px; }
.finance-legend-row { display: flex; align-items: center; gap: 8px; font-size: .88rem; margin-bottom: 4px; }
.finance-legend-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.finance-legend-total { font-size: .82rem; color: var(--muted); margin-top: 8px; }
.finance-chart-legend { margin: 12px 0 18px; }
.finance-pie-title { font-weight: 700; font-size: .95rem; margin: 18px 0 10px; }
.finance-pie-wrap { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.finance-pie-legend { display: flex; flex-direction: column; gap: 5px; padding-top: 8px; }

/* ═══════════════════════════════════════════════════════════
   AUFGABEN
═══════════════════════════════════════════════════════════ */

.task-cal-wrap {
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}

.task-cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.task-cal-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.task-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.task-cal-weekday {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-secondary);
  padding: 4px 0;
  font-weight: 600;
}

.task-cal-cell {
  text-align: center;
  padding: 6px 2px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}

.task-cal-cell:hover:not(.empty) {
  background: rgba(20, 136, 251, 0.10);
}

.task-cal-cell.today {
  font-weight: 700;
  color: var(--blue);
}

.task-cal-cell.selected {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.task-cal-cell.empty {
  cursor: default;
}

.task-cal-dot {
  display: block;
  width: 5px;
  height: 5px;
  background: var(--teal);
  border-radius: 50%;
  margin: 2px auto 0;
}

.task-cal-cell.selected .task-cal-dot {
  background: #fff;
}

.task-list-outer {
  margin-top: 4px;
}

/* Task-Karte (analog zu .finance-entry) */
.task-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 8px;
  transition: box-shadow .15s, transform .12s;
}

.task-card-body {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.task-card-body:hover .task-card-title {
  color: var(--blue);
}

.task-card-title {
  font-weight: 600;
  font-size: .97rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-card-meta {
  font-size: .8rem;
  color: var(--muted);
  margin-top: 3px;
}

.task-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* Haken-Button */
.task-check-btn {
  color: var(--text-secondary);
  border: 2px solid var(--border);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .2s, border-color .2s, color .2s;
}
.task-check-done {
  background: var(--green) !important;
  border-color: var(--green) !important;
  color: #fff !important;
}
.task-check-disabled { color: var(--border) !important; border-color: var(--border) !important; cursor: not-allowed; }


/* Aufgaben-Übersicht (Info-Zeilen in der Card) */
.task-overview-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border); gap: 12px;
}
.task-overview-row:last-child { border-bottom: none; }
.task-overview-row--chips { align-items: flex-start; }
.task-overview-label { font-size: .82rem; color: var(--muted); font-weight: 600; flex-shrink: 0; }
.task-overview-chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }

.task-empty {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 24px 0;
}

.task-member-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0;
}

.task-member-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════
   Packliste
═══════════════════════════════════════════════════════ */

/* Dropdown: Abschnitts-Überschriften (Packlisten / Vorlagen) */
.listmenu-section-header {
  padding: 8px 12px 4px; font-size: .72rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
}

/* Items-Liste */
.pack-items { display: flex; flex-direction: column; }
.pack-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 2px; border-bottom: 1px solid var(--border); min-height: 48px;
}
.pack-item:last-child { border-bottom: none; }

/* Checkbox (runder Kreis, wie Einkaufsliste) */
.pack-item-check {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s;
}
.pack-item-check:hover:not(:disabled) { border-color: var(--green); }
.pack-item-check.is-checked { border-color: var(--green); background: var(--green); color: #fff; }
.pack-item-check:disabled { cursor: default; opacity: .35; }
.pack-item-check .ic { width: 14px; height: 14px; }

/* Item-Name */
.pack-item-name {
  flex: 1; min-width: 0; font-weight: 600; font-size: .95rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pack-item.checked .pack-item-name { color: var(--muted); text-decoration: line-through; }
.pack-item.irrelevant { opacity: .45; }

/* Zuweisungs-Chips (welche Person trägt das) */
.pack-item-assignments { display: flex; gap: 4px; flex-wrap: wrap; flex-shrink: 0; }
.pack-item-assignments .chip { font-size: .72rem; padding: 1px 8px; height: auto; line-height: 1.6; }

/* Menge (rechts, vor den Aktions-Buttons) */
.pack-item-qty { color: var(--text); font-size: 1rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; }

/* Vorlagen-Bereich */
.pack-templates-section { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
.pack-template-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 2px; border-bottom: 1px solid var(--border);
}
.pack-template-row:last-child { border-bottom: none; }
.pack-template-row .pack-item-name { font-weight: 600; font-size: .95rem; flex: 1; }

/* Vorlage-Items-Editor im Dialog */
.pack-template-items { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.pack-template-item-row { display: flex; gap: 8px; align-items: center; }
.pack-template-item-row .input { flex: 1; }

/* Mitglieder-Auswahl im Item-Dialog */
.pack-member-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }

/* Drag-Handle */
.pack-drag-handle {
  flex: none; width: 32px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: grab; color: var(--muted);
  border-radius: 6px; touch-action: none;
  transition: color .15s, background .15s;
}
.pack-drag-handle:hover { color: var(--text); background: var(--surface-2); }
.pack-drag-handle:active { cursor: grabbing; }
.pack-drag-handle .ic { width: 22px; height: 22px; }

/* Schwebendes Item während des Drags */
.pack-item--dragging {
  opacity: .75;
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  border-radius: var(--radius-sm);
}

/* Platzhalter (zeigt Zielposition) */
.pack-drag-ph {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border: 2px dashed color-mix(in srgb, var(--primary) 50%, transparent);
  border-radius: 8px; box-sizing: border-box;
}

/* Aktionsleiste unter den Items */
.pack-actions-bar { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

/* Vorlage-Schnellwahl-Label */
.pack-apply-label { font-size: .8rem; font-weight: 600; color: var(--muted); margin: 0; }

/* Vorlage-Chips-Zeile */
.pack-apply-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pack-apply-chips .chip { cursor: pointer; gap: 5px; }
.pack-apply-chips .chip .ic { width: 13px; height: 13px; }

/* Meta-Zeile der Vorlagen-Bearbeitung */
.pack-tpl-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.pack-tpl-meta-info { display: flex; gap: 8px; align-items: center; }

/* Vorlage-auf-Packliste-anwenden Sektion (in Vorlagenansicht unten) */
.pack-tpl-apply-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }

/* ---- Item-Dialog: Zuweisung -------------------------------------------- */
/* „Allen zuweisen"-Toggle-Button */
.pack-assign-all-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 14px; margin-top: 4px;
  border-radius: var(--radius-sm); border: 2px solid var(--border);
  background: var(--surface); color: var(--text);
  font-size: .92rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.pack-assign-all-btn:hover { border-color: var(--primary); }
.pack-assign-all-btn.active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}
.pack-assign-all-btn .ic { width: 18px; height: 18px; }

/* Mitglieder-Chips im Dialog */
.pack-assign-members { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pack-assign-member-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 20px;
  border: 2px solid var(--border); background: var(--surface);
  color: var(--text); font-size: .88rem; font-weight: 500; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.pack-assign-member-chip:hover { border-color: var(--primary); }
.pack-assign-member-chip.selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}
.pack-assign-member-chip .ic { width: 15px; height: 15px; }

.task-modal {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-cal-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.task-cal-today-btn {
  font-size: 0.7rem;
  padding: 1px 8px;
  opacity: 0.7;
}

.task-row-clickable {
  cursor: pointer;
}

.task-row-clickable:hover .task-row-title {
  color: var(--blue);
}

.task-detail {
  padding: 8px 0;
}

.task-detail-back {
  margin-bottom: 12px;
}

.task-detail-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.task-detail-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-detail-row {
  align-items: flex-start;
}

.tageszeit-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.tageszeit-btn {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 20px;
}

.field-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ── Aufgaben: Kommend-Ansicht ─────────────────────────────────────────────── */

.tasks-upcoming-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 4px;
}

.tasks-upcoming-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.tasks-upcoming-select {
  flex: 1;
  max-width: 180px;
  padding: 5px 10px;
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════
   Essen Swipen
═══════════════════════════════════════════════════════ */

/* Tab-Leiste */
.swipe-tabs {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.swipe-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: calc(var(--radius) - 4px);
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.swipe-tab.active { background: var(--primary); color: #fff; }
.swipe-tab .ic { width: 18px; height: 18px; }

/* Session-Auswahl */
.swipe-session-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 24px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.swipe-session-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  margin-bottom: 16px;
}
.swipe-session-icon .ic { width: 36px; height: 36px; }

/* Karten-Bereich: kein extra Padding, Höhe wird über .swipe-card gesteuert */
.swipe-content {
  padding-bottom: 0;
}
.swipe-card-outer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  user-select: none;
}

/* Die eigentliche Tinder-Karte: volle Breite, reicht bis zu den Aktions-Buttons */
.swipe-card {
  position: relative;
  width: 100%;
  /* 16px padding-top + 62px tabs + 90px buttons + 8px puffer = 176px */
  height: calc(100dvh - var(--bar-h) - var(--nav-h) - var(--safe-bottom) - 176px);
  min-height: 300px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 44px rgba(0,0,0,0.28);
  cursor: grab;
  will-change: transform;
  touch-action: none;
}
.swipe-card:active { cursor: grabbing; }

/* Blur-Hintergrund: gleiches Bild, stark unscharf, füllt alles */
.swipe-card-bg {
  position: absolute;
  inset: -30px;
  background-size: cover;
  background-position: center;
  filter: blur(22px);
  transform: scale(1.08);
}
.swipe-card-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.28);
}

/* Vordergrundbild: vollständig sichtbar, nicht zugeschnitten */
.swipe-card-fg {
  position: absolute;
  inset: 0 0 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.swipe-card-fg img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 14px rgba(0,0,0,0.45));
}

/* Placeholder wenn kein Bild vorhanden */
.swipe-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1e2a78 0%, #1ab6a6 100%);
}
.swipe-card-placeholder .ic { width: 88px; height: 88px; color: rgba(255,255,255,0.65); }

/* Info-Overlay am unteren Rand */
.swipe-card-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 70px 20px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, transparent 100%);
  color: #fff;
  pointer-events: none;
}
.swipe-card-title {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 5px;
  text-shadow: 0 1px 5px rgba(0,0,0,0.6);
}
.swipe-card-meta {
  font-size: 0.88rem;
  opacity: 0.88;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.swipe-card-meta .ic { width: 14px; height: 14px; }

/* LIKE / NOPE / SUPER Stempel */
.swipe-stamp {
  position: absolute;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 5px 14px;
  border-radius: 8px;
  border: 4px solid currentColor;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.08s;
}
.swipe-stamp-like  { top: 36px; left: 22px; color: #2ecc71; transform: rotate(-18deg); }
.swipe-stamp-nope  { top: 36px; right: 22px; color: #e23b4e; transform: rotate(18deg); }
.swipe-stamp-super { bottom: 110px; left: 50%; transform: translateX(-50%); color: #3b9aff; }

/* Aktions-Buttons: fest über der Menüleiste */
.swipe-actions {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 24px 14px;
  z-index: 35;
  background: linear-gradient(to top, var(--bg) 65%, transparent);
}
@media (min-width: 768px) { .swipe-actions { bottom: 16px; } }
.swipe-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: var(--surface);
  box-shadow: 0 4px 18px rgba(0,0,0,0.16);
  transition: transform 0.12s, box-shadow 0.12s;
}
.swipe-btn:hover  { transform: scale(1.1); box-shadow: 0 6px 22px rgba(0,0,0,0.22); }
.swipe-btn:active { transform: scale(0.93); }
.swipe-btn:disabled { opacity: 0.4; pointer-events: none; }

.swipe-btn.superdislike { width: 54px; height: 54px; color: #e23b4e; }
.swipe-btn.dislike      { width: 66px; height: 66px; color: #f39c12; }
.swipe-btn.like         { width: 66px; height: 66px; color: #2ecc71; }
.swipe-btn.superlike    { width: 54px; height: 54px; color: #3b9aff; }
.swipe-btn.superdislike .ic,
.swipe-btn.superlike .ic { width: 22px; height: 22px; }
.swipe-btn.dislike .ic,
.swipe-btn.like .ic     { width: 28px; height: 28px; }

/* Fertig-Zustand */
.swipe-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 24px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  gap: 6px;
  width: 100%;
}
.swipe-done .ic { width: 60px; height: 60px; color: var(--teal); margin-bottom: 4px; }

/* Ergebnisse */
.swipe-ergebnis-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 2px;
}
.swipe-result-list { display: flex; flex-direction: column; gap: 10px; }

.swipe-result-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  box-shadow: var(--shadow);
  border-left: 4px solid transparent;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.12s;
}
.swipe-result-row:hover { box-shadow: var(--shadow-strong); transform: translateY(-1px); }
.swipe-result-row--match { border-left-color: #2ecc71; }

.swipe-result-thumb {
  width: 52px; height: 52px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--navy), var(--teal));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.swipe-result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.swipe-result-thumb .ic { width: 24px; height: 24px; color: rgba(255,255,255,0.7); }

.swipe-result-info { flex: 1; min-width: 0; }
.swipe-result-title {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.swipe-result-votes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }

.swipe-match-badge {
  display: inline-flex; align-items: center; gap: 4px;
  color: #2ecc71; font-size: 0.82rem; font-weight: 700;
  background: color-mix(in srgb,#2ecc71 12%,transparent);
  border: 1px solid #2ecc71; border-radius: 20px;
  padding: 2px 8px; margin-bottom: 4px;
}
.swipe-match-badge .ic { width: 13px; height: 13px; }

.swipe-result-score {
  font-weight: 700;
  font-size: 1.5rem;
  min-width: 40px;
  text-align: right;
  flex-shrink: 0;
}
.swipe-result-score.pos { color: #2ecc71; }
.swipe-result-score.neg { color: #e23b4e; }

.swipe-vote-chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.72rem; padding: 2px 7px;
  border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.swipe-vote-chip.like       { background: color-mix(in srgb,#2ecc71 14%,transparent); border-color:#2ecc71; }
.swipe-vote-chip.superlike  { background: color-mix(in srgb,#3b9aff 14%,transparent); border-color:#3b9aff; }
.swipe-vote-chip.dislike    { background: color-mix(in srgb,#f39c12 14%,transparent); border-color:#f39c12; }
.swipe-vote-chip.superdislike { background: color-mix(in srgb,#e23b4e 14%,transparent); border-color:#e23b4e; }
.swipe-vote-name { font-weight: 600; }

/* ---- Logo-Anpassungen ------------------------------------------------- */
/* Logo-Block im Home nur auf Mobilgeräten (Appbar zeigt Logo auf Desktop) */
@media (min-width: 768px) {
  .home-logo { display: none; }
}

/* auth-logo braucht ebenfalls hellen Hintergrund für Dark Mode */
.auth-logo img {
  background: #fff;
  border-radius: 16px;
  padding: 6px;
}
