/* ==========================================================================
   Wunschliste – Design-Tokens & Themes
   ========================================================================== */

/* ── Theme: Salbeigrün (Standard) ─────────────────────────────────── */
:root, .theme-salbei {
  --bg: #e7eadd;
  --bg-soft: #f1f2e7;
  --surface: #fbfbf5;
  --surface-dim: #f1f1e8;
  --ink: #2f3328;
  --ink-muted: #6c7160;
  --ink-faint: #9aa091;
  --primary: #5b7263;
  --primary-dark: #44574a;
  --primary-contrast: #fbfbf5;
  --accent-plum: #8a5b6b;
  --accent-plum-dark: #6e4656;
  --accent-denim: #4f6d82;
  --accent-denim-dark: #3c5566;
  --border: #d7dcc6;
  --border-soft: #e3e6d6;
  --shadow-sm: 0 1px 2px rgba(40, 44, 32, 0.06);
  --shadow-md: 0 6px 16px rgba(40, 44, 32, 0.10);
  --shadow-lg: 0 14px 32px rgba(40, 44, 32, 0.14);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --font-display: "Quicksand", "Trebuchet MS", sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;
}

/* ── Theme: Lavendel ──────────────────────────────────────────────── */
.theme-lavendel {
  --bg: #ece7f0;
  --bg-soft: #f3f0f6;
  --surface: #faf8fc;
  --surface-dim: #f0edf4;
  --ink: #2d2833;
  --ink-muted: #6b6375;
  --ink-faint: #9b93a3;
  --primary: #6b5b7b;
  --primary-dark: #544765;
  --primary-contrast: #faf8fc;
  --accent-plum: #8b5b7b;
  --accent-plum-dark: #6e4662;
  --accent-denim: #5b6b82;
  --accent-denim-dark: #46536b;
  --border: #d5ccde;
  --border-soft: #e3dceb;
  --shadow-sm: 0 1px 2px rgba(40, 35, 48, 0.06);
  --shadow-md: 0 6px 16px rgba(40, 35, 48, 0.10);
  --shadow-lg: 0 14px 32px rgba(40, 35, 48, 0.14);
}

/* ── Theme: Warmes Erdreich ───────────────────────────────────────── */
.theme-erde {
  --bg: #ece3d5;
  --bg-soft: #f2ece2;
  --surface: #fbf7f1;
  --surface-dim: #f0e9db;
  --ink: #3d3025;
  --ink-muted: #7a6a58;
  --ink-faint: #a89886;
  --primary: #8b6f4f;
  --primary-dark: #6b553c;
  --primary-contrast: #fbf7f1;
  --accent-plum: #8b5b5b;
  --accent-plum-dark: #6e4646;
  --accent-denim: #5b7382;
  --accent-denim-dark: #465b6b;
  --border: #ddd0bc;
  --border-soft: #e8ddce;
  --shadow-sm: 0 1px 2px rgba(50, 40, 30, 0.06);
  --shadow-md: 0 6px 16px rgba(50, 40, 30, 0.10);
  --shadow-lg: 0 14px 32px rgba(50, 40, 30, 0.14);
}

/* ── Theme: Frisches Minzgrün ─────────────────────────────────────── */
.theme-mint {
  --bg: #ddeade;
  --bg-soft: #eaf2ea;
  --surface: #f5faf5;
  --surface-dim: #e8f0e8;
  --ink: #263328;
  --ink-muted: #5b6e5d;
  --ink-faint: #8da08f;
  --primary: #4a8b5c;
  --primary-dark: #3a6b48;
  --primary-contrast: #f5faf5;
  --accent-plum: #8b5b6b;
  --accent-plum-dark: #6e4656;
  --accent-denim: #4f6d82;
  --accent-denim-dark: #3c5566;
  --border: #c4dac6;
  --border-soft: #d6e6d7;
  --shadow-sm: 0 1px 2px rgba(35, 44, 36, 0.06);
  --shadow-md: 0 6px 16px rgba(35, 44, 36, 0.10);
  --shadow-lg: 0 14px 32px rgba(35, 44, 36, 0.14);
}

/* ── Theme: Ozeanblau ─────────────────────────────────────────────── */
.theme-ozean {
  --bg: #dde8ee;
  --bg-soft: #eaf1f5;
  --surface: #f4f8fb;
  --surface-dim: #e6eef3;
  --ink: #243038;
  --ink-muted: #556875;
  --ink-faint: #8598a3;
  --primary: #4a758b;
  --primary-dark: #3a5d6b;
  --primary-contrast: #f4f8fb;
  --accent-plum: #8b5b6b;
  --accent-plum-dark: #6e4656;
  --accent-denim: #4f6d82;
  --accent-denim-dark: #3c5566;
  --border: #c4d4de;
  --border-soft: #d6e2ea;
  --shadow-sm: 0 1px 2px rgba(30, 40, 48, 0.06);
  --shadow-md: 0 6px 16px rgba(30, 40, 48, 0.10);
  --shadow-lg: 0 14px 32px rgba(30, 40, 48, 0.14);
}

/* ── Theme: Sonnenblume ───────────────────────────────────────────── */
.theme-sonne {
  --bg: #f2eed8;
  --bg-soft: #f7f4e5;
  --surface: #fdfcf3;
  --surface-dim: #f5f0df;
  --ink: #3d3820;
  --ink-muted: #7a7350;
  --ink-faint: #a89e7a;
  --primary: #b8a030;
  --primary-dark: #8b7820;
  --primary-contrast: #fdfcf3;
  --accent-plum: #8b5b40;
  --accent-plum-dark: #6e4630;
  --accent-denim: #5b6b82;
  --accent-denim-dark: #46536b;
  --border: #e0d9b8;
  --border-soft: #ebe5cc;
  --shadow-sm: 0 1px 2px rgba(50, 46, 28, 0.06);
  --shadow-md: 0 6px 16px rgba(50, 46, 28, 0.10);
  --shadow-lg: 0 14px 32px rgba(50, 46, 28, 0.14);
}

/* ── Theme: Beerenton ─────────────────────────────────────────────── */
.theme-beere {
  --bg: #eedde2;
  --bg-soft: #f5eaed;
  --surface: #fbf4f6;
  --surface-dim: #f2e6ea;
  --ink: #382028;
  --ink-muted: #755058;
  --ink-faint: #a38088;
  --primary: #8b4a5c;
  --primary-dark: #6b3a48;
  --primary-contrast: #fbf4f6;
  --accent-plum: #8b4058;
  --accent-plum-dark: #6e3045;
  --accent-denim: #5b6b82;
  --accent-denim-dark: #46536b;
  --border: #dec4cc;
  --border-soft: #ead6dc;
  --shadow-sm: 0 1px 2px rgba(50, 28, 35, 0.06);
  --shadow-md: 0 6px 16px rgba(50, 28, 35, 0.10);
  --shadow-lg: 0 14px 32px rgba(50, 28, 35, 0.14);
}

/* ── Theme: Schiefergrau ──────────────────────────────────────────── */
.theme-schiefer {
  --bg: #e2e3e0;
  --bg-soft: #edeeeb;
  --surface: #f7f7f5;
  --surface-dim: #eaeaec;
  --ink: #2a2b28;
  --ink-muted: #686960;
  --ink-faint: #969890;
  --primary: #5a6268;
  --primary-dark: #444b50;
  --primary-contrast: #f7f7f5;
  --accent-plum: #7a5b6b;
  --accent-plum-dark: #5e4653;
  --accent-denim: #4a6278;
  --accent-denim-dark: #384b5b;
  --border: #cdcfc8;
  --border-soft: #dbddd6;
  --shadow-sm: 0 1px 2px rgba(38, 38, 35, 0.06);
  --shadow-md: 0 6px 16px rgba(38, 38, 35, 0.10);
  --shadow-lg: 0 14px 32px rgba(38, 38, 35, 0.14);
}

/* ==========================================================================
   Basis
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 0; }

body {
  background: radial-gradient(ellipse at 20% 0%, var(--bg-soft), var(--bg) 60%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Eigenes Hintergrundbild */
body.has-bg-image { background: var(--bg); }
body.has-bg-image::before {
  content: ""; position: fixed; inset: 0;
  background-image: var(--bg-url);
  background-size: cover; background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2; z-index: 0; pointer-events: none;
}
body.has-bg-image .page { position: relative; z-index: 1; }

a { color: var(--accent-denim); text-underline-offset: 2px; }

h1, h2, h3 {
  font-family: var(--font-display); font-weight: 600;
  color: var(--ink); margin: 0;
  letter-spacing: -0.01em;
}

.page {
  max-width: 1120px; margin: 0 auto;
  padding: 20px 24px 80px;
}

/* --------------------------------------------------------------------
   Kopfzeile — Sticky mit Glass-Effekt, kein Umbruch
   -------------------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;          /* Nie umbrechen */
  margin-bottom: 28px;
  position: sticky; top: 0; z-index: 50;
  padding: 12px 20px;
  margin-left: -20px; margin-right: -20px;
  /* theme-aware glass: surface-Farbe halb-transparent */
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  /* Fallback für ältere Browser */
  background: var(--bg-soft);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.brand {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0; overflow: hidden;   /* Titel kann kürzen */
}

.brand-tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 12px;
  background: var(--primary);
  color: var(--primary-contrast);
  font-size: 20px;
  transform: rotate(-5deg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.brand h1 {
  font-size: 1.45rem; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.topbar-actions {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;   /* Buttons nie zerdrücken */
}

/* Auf sehr kleinen Screens unwichtige Buttons ausblenden */
.btn-topbar-secondary {
  /* standard: sichtbar */
}

@media (max-width: 420px) {
  .btn-topbar-secondary { display: none; }
  .page { padding: 12px 14px 80px; }
  .topbar { margin-left: -14px; margin-right: -14px; padding: 10px 14px; margin-bottom: 16px; }
  .brand h1 { font-size: 1.1rem; }
  .brand-tag { width: 34px; height: 34px; font-size: 17px; }
}

@media (min-width: 421px) and (max-width: 640px) {
  .page { padding: 14px 18px 80px; }
  .topbar { margin-left: -18px; margin-right: -18px; padding: 11px 18px; margin-bottom: 20px; }
  .brand h1 { font-size: 1.25rem; }
  .brand-tag { width: 36px; height: 36px; font-size: 18px; }
}

/* --------------------------------------------------------------------
   Buttons — mind. 44 px Touch-Target auf mobil
   -------------------------------------------------------------------- */

.btn {
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  border: none; border-radius: 10px;
  padding: 10px 20px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--primary); color: var(--primary-contrast);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(0,0,0,0.14);
  transform: translateY(-1px);
}
.btn-primary:active { transform: scale(0.96) translateY(0); }

.btn-secondary {
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary-dark); }

.btn-link-out {
  background: var(--accent-denim); color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.btn-link-out:hover { background: var(--accent-denim-dark); transform: translateY(-1px); }

.btn-ghost {
  background: transparent; color: var(--ink-muted);
  border: 1.5px dashed var(--border);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-muted); }

.btn-danger {
  background: var(--surface); color: var(--accent-plum-dark);
  border: 1.5px solid var(--border);
}
.btn-danger:hover { background: var(--accent-plum); color: #fff; border-color: var(--accent-plum); }

.btn-block { width: 100%; justify-content: center; }

.btn-sm { padding: 7px 14px; font-size: 0.83rem; border-radius: 8px; }

@media (max-width: 640px) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; padding: 8px 14px; }
}

/* --------------------------------------------------------------------
   Formulare & Inputs — 16 px auf mobil (kein iOS-Zoom)
   -------------------------------------------------------------------- */

.field { text-align: left; margin-bottom: 18px; }
.field label {
  display: block; font-size: 0.82rem; font-weight: 700;
  color: var(--ink-muted); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.03em;
}

input[type="text"],
input[type="password"],
input[type="url"],
textarea,
select.select-field {
  width: 100%;
  font-family: var(--font-body); font-size: 0.95rem;
  padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
}

input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

textarea { resize: vertical; min-height: 80px; }

/* Verhindert iOS-Zoom beim Antippen von Inputs */
@media (max-width: 640px) {
  input[type="text"],
  input[type="password"],
  input[type="url"],
  textarea,
  select,
  select.select-field,
  .picker-select,
  .inline-input,
  .full-textarea {
    font-size: 1rem !important;
  }
}

/* --------------------------------------------------------------------
   Login-Karten
   -------------------------------------------------------------------- */

.auth-shell {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-card {
  background: var(--surface); border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
  padding: 36px 28px; max-width: 400px; width: 100%;
  text-align: center;
}
.auth-icon {
  width: 72px; height: 72px; margin: 0 auto 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  background: var(--bg-soft); color: var(--primary-dark);
}
.auth-card.admin .auth-icon { background: #f1e6e9; color: var(--accent-plum-dark); }
.auth-card h2 { font-size: 1.4rem; margin-bottom: 4px; }
.auth-card p.subtitle { color: var(--ink-muted); font-size: 0.9rem; margin: 0 0 24px; }

.error-msg {
  background: #fef0f0; color: var(--accent-plum-dark);
  border-radius: 10px; padding: 12px 16px;
  font-size: 0.88rem; margin-bottom: 20px;
  border: 1px solid #f5d0d0;
}
.back-link {
  display: inline-block; margin-top: 20px;
  font-size: 0.85rem; color: var(--ink-muted); text-decoration: none;
}
.back-link:hover { color: var(--accent-denim); }

/* --------------------------------------------------------------------
   Flash-Meldungen
   -------------------------------------------------------------------- */

.flash-stack { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.flash {
  background: var(--surface); border: 1px solid var(--border-soft);
  color: var(--ink); border-radius: 10px;
  padding: 12px 18px; font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.25s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------
   Listen-Auswahl + Kategorie-Filter
   -------------------------------------------------------------------- */

.list-picker {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 24px; flex-wrap: wrap;
}

.picker-label {
  font-family: var(--font-body); font-weight: 700;
  font-size: 0.82rem; color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap;
}

.picker-select {
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.95rem; padding: 10px 40px 10px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--ink);
  cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa091' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  min-width: 150px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.picker-select:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.picker-select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

.tab-star { font-size: 0.7rem; color: var(--ink-faint); }

/* Auf mobil: Selects strecken, damit sie die volle Breite ausnutzen */
@media (max-width: 640px) {
  .list-picker { gap: 8px; }
  .picker-select { flex: 1; min-width: 0; }
}

/* --------------------------------------------------------------------
   Wunsch-Karten — Grid
   -------------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ── Einzelne Karte ───────────────────────────────────────────────── */

.card {
  background: var(--surface); border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid var(--border-soft);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
}
.card:active { transform: scale(0.98); box-shadow: var(--shadow-sm); }
.card.is-reserved { opacity: 0.7; }
.card.is-reserved:hover { opacity: 0.85; }

.card-media {
  aspect-ratio: 4/3; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-media img { transform: scale(1.03); }
.card-media .placeholder { font-size: 44px; color: var(--ink-faint); }

.card-body {
  padding: 16px 18px 18px;
  display: flex; flex-direction: column; gap: 8px; flex: 1;
}
.card-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.05rem; line-height: 1.3;
}
.card-desc {
  color: var(--ink-muted); font-size: 0.85rem;
  line-height: 1.5; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-actions {
  display: flex; flex-direction: column; gap: 8px; margin-top: 4px;
}

/* Reserviert-Stempel */
.tag-stamp {
  position: absolute; top: 12px; right: -6px;
  background: var(--accent-plum); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 0.72rem;
  padding: 5px 13px 5px 16px;
  clip-path: polygon(12% 0%, 100% 0%, 100% 100%, 12% 100%, 0% 50%);
  transform: rotate(3deg); box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  display: flex; align-items: center; gap: 4px; z-index: 2;
}
.tag-stamp::after {
  content: ""; position: absolute; left: 7px; top: 50%;
  width: 4px; height: 4px; margin-top: -2px; border-radius: 50%;
  background: rgba(255,255,255,0.8);
}

.undo-link {
  background: none; border: none; color: var(--ink-muted);
  font-size: 0.75rem; text-decoration: underline; cursor: pointer;
  padding: 0; align-self: flex-start;
  -webkit-tap-highlight-color: transparent;
}
.undo-link:hover { color: var(--accent-plum-dark); }

/* ── Mobile-Karten: horizontale Zeile ────────────────────────────── */

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; gap: 10px; }

  .card {
    flex-direction: row;
    border-radius: 14px;
    align-items: stretch;
  }
  .card:hover { transform: none; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
  .card:active { transform: scale(0.98); }

  .card-media {
    width: 88px; height: 88px;
    aspect-ratio: unset; flex-shrink: 0;
    border-radius: 14px 0 0 14px;
    align-self: stretch;
  }

  .card-body {
    padding: 12px 14px; gap: 4px; flex: 1; min-width: 0;
    justify-content: center;
  }

  .card-title {
    font-size: 0.95rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  /* Beschreibung + Desktop-Aktionen ausblenden */
  .card-desc { display: none; }
  .card-actions { display: none; }

  /* Kompakter Status-Hinweis auf mobil */
  .card-mobile-status {
    font-size: 0.75rem; color: var(--accent-plum-dark);
    font-weight: 600;
  }

  .tag-stamp {
    font-size: 0.6rem; padding: 4px 10px 4px 12px;
    top: 8px; right: -4px;
  }
}

/* Desktop: mobile-only Elemente ausblenden */
@media (min-width: 641px) {
  .card-mobile-status { display: none; }
}

/* --------------------------------------------------------------------
   Leerer Zustand
   -------------------------------------------------------------------- */

.empty-state {
  text-align: center; padding: 80px 20px; color: var(--ink-muted);
}
.empty-state .emoji {
  font-size: 56px; display: block; margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}
.empty-state h2 { margin-bottom: 8px; color: var(--ink); font-size: 1.3rem; }
.empty-state p { font-size: 0.95rem; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* --------------------------------------------------------------------
   Admin-Tabs — horizontal scrollbar, kein Wrapping
   -------------------------------------------------------------------- */

.admin-tabs {
  display: flex; gap: 0;
  flex-wrap: nowrap;              /* Nie umbrechen */
  overflow-x: auto;               /* Horizontal scrollbar wenn nötig */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;          /* Firefox */
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-soft);
  position: sticky; top: 64px; z-index: 40;
  background: color-mix(in srgb, var(--bg-soft) 92%, transparent);
  background: var(--bg-soft);
  background: color-mix(in srgb, var(--bg-soft) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  margin-left: -24px; margin-right: -24px; padding: 0 24px;
}
.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.88rem; padding: 14px 18px;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  color: var(--ink-muted);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s ease, border-color 0.2s ease;
  display: inline-flex; align-items: center; gap: 6px;
  -webkit-tap-highlight-color: transparent;
}
.admin-tab:hover { color: var(--ink); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
  .admin-tabs {
    margin-left: -18px; margin-right: -18px; padding: 0 18px;
    top: 55px;
  }
  .admin-tab { padding: 12px 14px; font-size: 0.82rem; }
}

@media (max-width: 420px) {
  .admin-tabs { margin-left: -14px; margin-right: -14px; padding: 0 14px; top: 52px; }
  .admin-tab { padding: 11px 12px; font-size: 0.8rem; gap: 4px; }
}

/* --------------------------------------------------------------------
   Admin: Panels & Formulare
   -------------------------------------------------------------------- */

.panel {
  background: var(--surface); border-radius: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  padding: 24px; margin-bottom: 20px;
}
.panel h2 { font-size: 1.15rem; margin-bottom: 4px; }
.panel p.hint { color: var(--ink-muted); font-size: 0.85rem; margin: 4px 0 20px; line-height: 1.5; }

@media (max-width: 640px) {
  .panel { padding: 18px 16px; }
}

.image-toggle { display: flex; gap: 8px; margin-bottom: 14px; }
.image-toggle label {
  flex: 1; text-align: center; border: 1.5px solid var(--border);
  border-radius: 10px; padding: 10px 12px;
  font-size: 0.85rem; font-weight: 600; color: var(--ink-muted);
  cursor: pointer; transition: all 0.2s ease; user-select: none;
}
.image-toggle input { display: none; }
.image-toggle label.active { border-color: var(--primary); background: var(--bg-soft); color: var(--primary-dark); }
.image-input-group { display: none; }
.image-input-group.active { display: block; }

select.select-field {
  font-family: var(--font-body);
  padding: 12px 40px 12px 14px;
  cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236c7160' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.inline-form { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.inline-input {
  font-family: var(--font-body); font-size: 0.9rem;
  padding: 10px 14px; border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--ink); flex: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.inline-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

/* Inline-Formulare auf mobil stacken */
@media (max-width: 500px) {
  .inline-form { flex-wrap: wrap; width: 100%; }
  .inline-input { min-width: 0; }
  .inline-form .btn { width: 100%; justify-content: center; }
}

/* --------------------------------------------------------------------
   Admin: Listen-Verwaltung
   -------------------------------------------------------------------- */

.list-admin { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list-admin li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); background: var(--bg-soft);
}
.list-admin li.inactive { opacity: 0.55; }
.list-name { font-weight: 600; font-size: 0.92rem; display: inline-flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.list-status-badge {
  font-size: 0.65rem; font-weight: 600; padding: 2px 7px;
  border-radius: 999px; background: var(--surface-dim); color: var(--ink-faint);
}
.list-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 540px) {
  .list-admin li { flex-wrap: wrap; }
  .list-name { width: 100%; }
  .list-actions { width: 100%; }
  .list-actions .btn { flex: 1; min-width: 80px; }
}

/* --------------------------------------------------------------------
   Admin: Wünsche-Liste & Move
   -------------------------------------------------------------------- */

.manage-list { display: flex; flex-direction: column; gap: 10px; }

.manage-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); background: var(--surface);
}
.manage-thumb {
  width: 52px; height: 52px; border-radius: 10px; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; font-size: 20px; color: var(--ink-faint);
}
.manage-thumb img { width: 100%; height: 100%; object-fit: cover; }
.manage-info { flex: 1; min-width: 0; }
.manage-info .title { font-weight: 600; font-size: 0.95rem; }

.status-pill {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  padding: 2px 9px; border-radius: 999px;
  background: var(--bg-soft); color: var(--primary-dark);
}
.status-pill.reserved { background: #f1e6e9; color: var(--accent-plum-dark); }

.list-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-muted);
  margin-left: 4px; vertical-align: middle;
}

.manage-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; align-items: center; }

.move-form { margin: 0; }
.move-select {
  font-family: var(--font-body); font-size: 0.8rem;
  padding: 7px 28px 7px 10px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--ink-muted); cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236c7160' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  max-width: 150px; min-height: 36px;
}
.move-select:focus { outline: none; border-color: var(--primary); }

@media (max-width: 600px) {
  .manage-row { flex-wrap: wrap; gap: 10px; }
  .manage-info { order: 1; width: calc(100% - 66px); }
  .manage-thumb { order: 0; }
  .manage-actions {
    order: 2; width: 100%;
    justify-content: flex-end; gap: 6px;
  }
  .manage-actions .btn { flex: 1; min-width: 80px; max-width: 160px; }
  .move-select { max-width: unset; flex: 1; }
}

/* --------------------------------------------------------------------
   Design-Tab: Themes & Hintergrundbild
   -------------------------------------------------------------------- */

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 8px;
}
.theme-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 10px; border-radius: var(--radius-md);
  border: 2px solid var(--border); cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background: var(--surface);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.theme-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.theme-card.selected { border-color: var(--primary); background: var(--bg-soft); }
.theme-card input[type="radio"] { display: none; }
.theme-swatch {
  width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid var(--border-soft);
}

/* Theme-Swatch-Farben */
.theme-salbei   { background: linear-gradient(135deg, #e7eadd 40%, #5b7263 100%); }
.theme-lavendel { background: linear-gradient(135deg, #ece7f0 40%, #6b5b7b 100%); }
.theme-erde     { background: linear-gradient(135deg, #ece3d5 40%, #8b6f4f 100%); }
.theme-mint     { background: linear-gradient(135deg, #ddeade 40%, #4a8b5c 100%); }
.theme-ozean    { background: linear-gradient(135deg, #dde8ee 40%, #4a758b 100%); }
.theme-sonne    { background: linear-gradient(135deg, #f2eed8 40%, #b8a030 100%); }
.theme-beere    { background: linear-gradient(135deg, #eedde2 40%, #8b4a5c 100%); }
.theme-schiefer { background: linear-gradient(135deg, #e2e3e0 40%, #5a6268 100%); }

.theme-label {
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.85rem; color: var(--ink); text-align: center;
}

/* Icon-Buttons */
.icon-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.icon-btn {
  font-size: 1.3rem; padding: 8px 10px; min-height: 44px; min-width: 44px;
  border: 2px solid var(--border-soft); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
  line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { border-color: var(--primary); transform: scale(1.1); }
.icon-btn.active { border-color: var(--primary); background: var(--bg-soft); box-shadow: var(--shadow-sm); }

/* --------------------------------------------------------------------
   Detail-Seite
   -------------------------------------------------------------------- */

.detail-card {
  background: var(--surface); border-radius: 20px;
  box-shadow: var(--shadow-md); overflow: hidden;
  border: 1px solid var(--border-soft);
}

.detail-media {
  aspect-ratio: 16/9; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; max-height: 480px;
}
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-placeholder { font-size: 80px; color: var(--ink-faint); }

.detail-body { padding: 32px 36px 36px; }
.detail-body h2 { font-size: 1.6rem; margin-bottom: 10px; }

.category-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
  background: var(--primary); color: var(--primary-contrast);
  margin-right: 8px; vertical-align: middle;
}
.detail-list-badge {
  display: inline-block; font-size: 0.75rem;
  color: var(--ink-muted); vertical-align: middle;
}

.detail-section {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}
.detail-section h3 {
  font-size: 0.85rem; font-weight: 600;
  color: var(--ink-muted); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.detail-section p { color: var(--ink); font-size: 0.95rem; line-height: 1.6; margin: 0; }
.detail-section.hints {
  background: #fffdf0; border-left: 3px solid #e6b800;
  padding: 14px 18px; border-radius: 0 12px 12px 0; border-top: none; margin-top: 18px;
}
.detail-section.hints h3 { color: #8b7800; }

.detail-actions { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 640px) {
  .detail-body { padding: 20px 18px 24px; }
  .detail-body h2 { font-size: 1.3rem; }
  .detail-media { max-height: 260px; }
}

/* --------------------------------------------------------------------
   Admin: Bild-Vorschau & Passwort-Formulare
   -------------------------------------------------------------------- */

.bg-preview {
  max-width: 400px; border-radius: var(--radius-md);
  overflow: hidden; border: 1px solid var(--border-soft);
  margin-bottom: 8px;
}
.bg-preview img { width: 100%; display: block; }

.pw-form { margin-bottom: 24px; }
.pw-grid { display: flex; flex-direction: column; gap: 10px; }
.pw-grid input { width: 100%; }

.edit-panel { border-left: 3px solid var(--primary); }

.date-badge {
  font-size: 0.65rem; font-weight: 500;
  color: var(--ink-faint); margin-left: 6px; vertical-align: middle;
}
.done-row { opacity: 0.55; }

.full-textarea {
  width: 100%; font-family: var(--font-body); font-size: 0.9rem;
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--ink);
}
.full-textarea:focus { outline: none; border-color: var(--primary); }
