/* FERMIT — stijlen
   Hoort bij index.html en app.js. Houd de drie bestanden in dezelfde map. */

/* ─── CSS Custom Properties ─────────────────────────────── */
:root {
  /* ── RootsFood Design System v3 ── earthy editorial × handmade retro ── */
  --bg:        #f5ede0;   /* cream */
  --bg-card:   #fdf8ee;   /* card cream */
  --primary:   #3d5226;   /* forest */
  --green:     #6b7a3a;   /* olive */
  --gold:      #d4a843;   /* mustard */
  --gold-light:#edd9a0;   /* mustard light */
  --burgundy:  #7a2e2a;   /* burgundy */
  --ink:       #1a1a0e;   /* ink */
  --text:      #1a1a0e;
  --text-soft: #5c5a48;
  --border:    rgba(26,26,14,0.18);
  --shadow:    3px 3px 0 rgba(26,26,14,0.16);
  --shadow-lg: 6px 6px 0 rgba(26,26,14,0.20);
  --radius:    14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-serif:   'Instrument Serif', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', ui-monospace, monospace;
  --font-hand:    'Caveat', cursive;
  --transition:   0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-h:  64px;
  --tab-h:  52px;
}

/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; outline: none; border: none; background: none; }
a { color: inherit; text-decoration: none; }

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ─── Auth Screen ───────────────────────────────────────── */
#auth-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: fixed;
  inset: 0;
  z-index: 200;
  padding: 1.5rem 1rem;
  background: var(--primary);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#auth-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #6b7a3a 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 80% 100%, rgba(212,168,67,0.15) 0%, transparent 60%);
}
.auth-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}
.auth-box {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  margin: auto 0;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo-wordmark {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1;
}
.auth-logo-sub {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 4px;
}
.auth-leaf { font-size: 2rem; margin-bottom: 0.5rem; display: block; }

.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 1.5rem;
}
.auth-tab {
  flex: 1;
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: all 0.2s;
}
.auth-tab.active {
  background: var(--primary);
  color: white;
}

.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
}
.form-input {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: var(--text);
  transition: border-color 0.2s;
  min-height: 48px;
}
.form-input:focus { border-color: var(--green); }
.form-input::placeholder { color: var(--text-soft); opacity: 0.6; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  width: 100%;
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--green); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(26,26,14,0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-gold {
  background: var(--gold);
  color: var(--primary);
  font-weight: 700;
}
.btn-gold:hover { background: #b8912e; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(212,168,67,0.4); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); background: rgba(26,26,14,0.04); }
.btn-sm { min-height: 36px; padding: 0 1rem; font-size: 0.8rem; width: auto; }
.btn-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  padding: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text-soft);
  font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-message {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* ─── App Shell ─────────────────────────────────────────── */
#app-screen { display: none; flex-direction: column; min-height: 100dvh; }
#app-screen.visible { display: flex; }

/* ─── Header / Nav ──────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  box-shadow: 0 2px 16px rgba(26,26,14,0.3);
}
.header-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.01em;
}
.header-logo span { color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.header-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 0.85rem;
  cursor: pointer;
}
.header-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: all 0.2s;
}
.header-btn:hover { background: rgba(255,255,255,0.1); color: white; }

/* ─── Tab Bar ───────────────────────────────────────────── */
.tab-bar {
  background: var(--bg-card);
  border-bottom: 1.5px solid var(--border);
  display: flex;
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
}
.tab-btn {
  flex: 1;
  height: var(--tab-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-soft);
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.tab-btn svg { width: 18px; height: 18px; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ─── Main Content ──────────────────────────────────────── */
.app-main {
  flex: 1;
  padding: 0.75rem;
  padding-bottom: 5rem;
}

/* ─── View Panels ───────────────────────────────────────── */
.view-panel { display: none; animation: fadeIn 0.25s ease; }
.view-panel.active { display: block; }
.view-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Section Headers ───────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}
.section-title small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ─── Stats Strip ───────────────────────────────────────── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  text-align: center;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 4px;
}

/* ─── Batch Card ─────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.batch-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.batch-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* Module color accents */
.batch-card[data-module="Vital"]     .card-accent { background: #6b7a3a; }
.batch-card[data-module="Jars"]      .card-accent { background: #c0521e; }
.batch-card[data-module="Tsukemono"] .card-accent { background: #8b3a5a; }
.batch-card[data-module="Dough"]     .card-accent { background: #9a7826; }
.batch-card[data-module="Brew"]      .card-accent { background: #3d5226; }
.batch-card[data-module="Milky"]     .card-accent { background: #7a7a5a; }
.batch-card[data-module="Urban"]     .card-accent { background: #3a8b3a; }

.card-accent {
  height: 4px;
  width: 100%;
}
.card-body { padding: 1.1rem 1.1rem 0.8rem; }

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.card-module-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  background: var(--primary);
  border-radius: 4px;
  padding: 2px 8px;
}
.card-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}
.status-actief { background: #6b7a3a; box-shadow: 0 0 0 3px rgba(76,175,80,0.2); animation: pulse 2s infinite; }
.status-voltooid { background: var(--gold); }
.status-mislukt { background: #7a2e2a; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(76,175,80,0.2); }
  50%       { box-shadow: 0 0 0 6px rgba(76,175,80,0.05); }
}

.card-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 2px;
}
.card-category { font-size: 0.78rem; color: var(--text-soft); margin-bottom: 0.75rem; }

/* Progress bar */
.progress-bar-wrap {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 0.4s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-soft);
  margin-bottom: 0.75rem;
}

/* Card actions */
.card-actions {
  border-top: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  display: flex;
  gap: 0.5rem;
}
.card-action-btn {
  flex: 1;
  height: 36px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.card-action-btn:hover { color: var(--primary); border-color: var(--primary); background: rgba(26,26,14,0.04); }
.card-action-btn.gold-action { background: var(--gold-light); border-color: var(--gold); color: var(--primary); }

/* ─── Bubble Animation (Vital Roots) ─────────────────────── */
.card-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: var(--radius);
}
.bubble {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: rgba(107,122,58,0.08);
  animation: rise linear infinite;
}
@keyframes rise {
  0%   { transform: translateY(0) scale(1); opacity: 0.6; }
  100% { transform: translateY(-300px) scale(0.6); opacity: 0; }
}

/* ─── Coach Tips ─────────────────────────────────────────── */
.coach-tip {
  background: linear-gradient(135deg, #fdf8ee, #f8efd9);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text);
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  animation: fadeIn 0.3s ease;
}
.coach-tip-icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1.4; }
.coach-tip-danger { background: linear-gradient(135deg, #f6ece4, #f0ddd3); border-color: #c0521e; }

/* ─── Empty State ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 1.5rem 2rem;
}
.empty-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.empty-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.empty-text { font-size: 0.9rem; color: var(--text-soft); max-width: 280px; margin: 0 auto 1.5rem; line-height: 1.6; }

/* ─── List View ──────────────────────────────────────────── */
.list-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.list-filter-btn {
  height: 32px;
  padding: 0 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text-soft);
  transition: all 0.2s;
}
.list-filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.list-item {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.list-item:hover { box-shadow: var(--shadow); transform: translateX(2px); }
.list-item[data-module="Jars"]      { border-left-color: #c0521e; }
.list-item[data-module="Tsukemono"] { border-left-color: #8b3a5a; }
.list-item[data-module="Dough"]     { border-left-color: #9a7826; }
.list-item[data-module="Brew"]      { border-left-color: #3d5226; }

.list-item-info { flex: 1; min-width: 0; }
.list-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-meta { font-size: 0.72rem; color: var(--text-soft); margin-top: 2px; }
.list-item-right { text-align: right; flex-shrink: 0; }
.list-item-days {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.list-item-days-label { font-size: 0.65rem; color: var(--text-soft); }

/* ─── Calendar View ──────────────────────────────────────── */
.calendar-wrap { }
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.cal-month {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}
.cal-nav { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--border); color: var(--text-soft); transition: all 0.2s; }
.cal-nav:hover { border-color: var(--primary); color: var(--primary); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-day-label {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 0.4rem 0;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 6px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  min-height: 44px;
}
.cal-day:hover { background: rgba(26,26,14,0.06); }
.cal-day.today { background: var(--primary); color: white; }
.cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
}
.cal-day.other-month { color: var(--text-soft); opacity: 0.4; }

.cal-events { margin-top: 1.25rem; }
.cal-event-item {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.cal-event-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.cal-event-name { font-weight: 600; font-size: 0.85rem; }
.cal-event-time { font-size: 0.75rem; color: var(--text-soft); margin-top: 1px; }

.urban-tip {
  background: linear-gradient(135deg, var(--primary), var(--green));
  color: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.urban-tip-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.4rem;
}
.urban-tip-text {
  font-size: 0.9rem;
  line-height: 1.6;
}
.urban-tip-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }

/* ─── FAB ────────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 80;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--primary);
  font-size: 1.6rem;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(212,168,67,0.5);
  transition: all var(--transition);
}
.fab:hover { transform: scale(1.1) rotate(45deg); box-shadow: 0 6px 28px rgba(212,168,67,0.6); }

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,26,14,0.6);
  backdrop-filter: blur(6px);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.modal-overlay.visible { display: flex; animation: overlayIn 0.2s ease; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  overflow-y: auto;
  padding: 1.5rem;
  animation: sheetUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.modal-handle {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 0 auto 1.25rem;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.25rem;
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft);
  font-size: 1.2rem;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--bg); color: var(--primary); }

/* Select styling */
.form-select {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: var(--text);
  min-height: 48px;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6560' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  cursor: pointer;
}
.form-select:focus { border-color: var(--green); }

/* Ingredient list */
.ingredient-list { margin-bottom: 0.75rem; }
.ingredient-row {
  display: grid;
  grid-template-columns: 1fr 80px 70px 36px;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  align-items: center;
}
.ingredient-row .form-input { padding: 0.5rem 0.75rem; min-height: 40px; }

/* Salt calculator */
.salt-calc {
  background: linear-gradient(135deg, #eef0e2, #e9ecda);
  border: 1.5px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
}
.salt-calc-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.75rem;
}
.salt-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.75rem; }
.salt-result {
  background: var(--primary);
  color: white;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}
.salt-result span { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }

/* Rating stars */
.star-rating { display: flex; gap: 0.3rem; margin-bottom: 1rem; }
.star-btn {
  font-size: 1.5rem;
  color: var(--border);
  transition: all 0.15s;
  cursor: pointer;
}
.star-btn.filled { color: var(--gold); }
.star-btn:hover { transform: scale(1.2); color: var(--gold); }

/* Log entries */
.log-entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}
.log-entry-date { font-size: 0.7rem; color: var(--text-soft); margin-bottom: 4px; }
.log-entry-vals { display: flex; gap: 1rem; flex-wrap: wrap; }
.log-val {
  font-size: 0.8rem;
  background: var(--bg);
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--primary);
  font-weight: 600;
}
.log-val.safe { background: rgba(76,175,80,0.15); color: #2e7d32; }
.log-val.danger { background: rgba(229,57,53,0.12); color: #c62828; }

/* Chart canvas */
.chart-wrap {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.chart-wrap canvas { width: 100% !important; height: 160px !important; }

/* Share button */
.share-btn {
  background: linear-gradient(135deg, #1877f2, #3d5226);
  color: white;
  border-radius: var(--radius-sm);
  height: 48px;
  width: 100%;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}
.share-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(24,119,242,0.4); }

/* Toast */
.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary);
  color: white;
  border-radius: 100px;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Responsive */
@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }
  .stat-value { font-size: 1.6rem; }
}
@media (min-width: 768px) {
  .modal-overlay { align-items: center; padding: 2rem; }
  .modal-sheet { border-radius: var(--radius-lg); max-height: 85dvh; }
}

/* Loading spinner */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.spinner.visible { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Auth logos ─────────────────────────────────────────────── */
.auth-rootsfood-logo { width:170px;display:block;margin:0 auto 0.25rem;object-fit:contain;filter:drop-shadow(0 2px 8px rgba(0,0,0,0.1));animation:fadeInDown 0.6s ease both; }
.auth-hero-logo { width:110px;height:110px;display:block;margin:0 auto 0.5rem;object-fit:contain;border-radius:50%;animation:heroFloat 4s ease-in-out infinite,heroEntrance 0.8s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes heroFloat { 0%,100%{transform:translateY(0) rotate(-1deg)} 50%{transform:translateY(-8px) rotate(1deg)} }
@keyframes heroEntrance { from{opacity:0;transform:scale(0.7) translateY(16px)} to{opacity:1;transform:scale(1) translateY(0)} }
@keyframes fadeInDown { from{opacity:0;transform:translateY(-12px)} to{opacity:1;transform:translateY(0)} }

/* ─── Dashboard banner ───────────────────────────────────────── */
.dashboard-banner { position:relative;border-radius:var(--radius);overflow:hidden;margin-bottom:1.25rem;cursor:pointer;box-shadow:var(--shadow); }
.banner-img { width:100%;height:160px;object-fit:cover;display:block; }
.banner-overlay { position:absolute;inset:0;background:linear-gradient(135deg,rgba(26,26,14,0.75),rgba(26,26,14,0.4));display:flex;flex-direction:column;justify-content:center;padding:1.25rem; }
.banner-title { font-family:var(--font-display);font-size:1.4rem;font-weight:700;color:white;line-height:1.1;margin-bottom:0.25rem; }
.banner-sub { font-size:0.78rem;color:rgba(255,255,255,0.85);margin-bottom:0.75rem; }
.banner-btn { display:inline-block;background:var(--gold);color:var(--primary);font-size:0.75rem;font-weight:700;padding:0.35rem 0.9rem;border-radius:100px;width:fit-content; }

/* ─── Module selector ────────────────────────────────────────── */
.module-select-grid { display:grid;grid-template-columns:repeat(2,1fr);gap:0.65rem;margin-bottom:1rem; }
.module-select-card { background:var(--bg-card);border:2px solid var(--border);border-radius:var(--radius);padding:0.85rem 0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.4rem;cursor:pointer;transition:all 0.22s cubic-bezier(0.34,1.56,0.64,1); }
.module-select-card:hover:not(.coming-soon){border-color:var(--green);transform:translateY(-3px);box-shadow:var(--shadow);}
.module-select-card.selected{border-color:var(--gold);background:linear-gradient(135deg,#fdf8ee,#f8efd9);box-shadow:0 4px 20px rgba(212,168,67,0.2);}
.module-select-card.coming-soon{opacity:0.45;cursor:not-allowed;}
.module-select-card img{width:52px;height:52px;object-fit:contain;border-radius:8px;transition:transform 0.25s;}
.module-select-card:hover:not(.coming-soon) img{transform:scale(1.1) rotate(-4deg);}
.module-select-card .mod-label{font-size:0.68rem;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--primary);text-align:center;}
.module-select-card .mod-soon{font-size:0.58rem;color:var(--text-soft);background:var(--bg);border-radius:4px;padding:1px 5px;}

/* ─── FERMIT tip box ─────────────────────────────────────────── */
.fermit-tip-box { background:linear-gradient(135deg,#eef0e2,#e9ecda);border:1.5px solid var(--green);border-radius:var(--radius-sm);padding:0.75rem;flex:1; }
.fermit-tip-header { display:flex;align-items:center;gap:0.5rem;font-size:0.72rem;font-weight:700;color:var(--green);letter-spacing:0.05em;text-transform:uppercase;margin-bottom:0.4rem; }
.fermit-avatar { width:28px;height:28px;border-radius:50%;object-fit:contain;flex-shrink:0; }
.fermit-tip-text { font-size:0.82rem;color:var(--text);line-height:1.5; }

/* ─── Photo upload ───────────────────────────────────────────── */
.photo-upload-btn { display:flex;align-items:center;justify-content:center;gap:0.5rem;min-height:48px;background:var(--bg);border:1.5px dashed var(--border);border-radius:var(--radius-sm);font-size:0.85rem;font-weight:600;color:var(--text-soft);cursor:pointer;transition:all 0.2s; }
.photo-upload-btn:hover { border-color:var(--green);color:var(--primary);background:rgba(107,122,58,0.04); }

/* ─── Animations ─────────────────────────────────────────────── */
.batch-card{animation:cardIn 0.45s cubic-bezier(0.22,1,0.36,1) both;}
.batch-card:nth-child(1){animation-delay:.04s}.batch-card:nth-child(2){animation-delay:.10s}
.batch-card:nth-child(3){animation-delay:.16s}.batch-card:nth-child(4){animation-delay:.22s}
@keyframes cardIn{from{opacity:0;transform:translateY(20px) scale(0.97)}to{opacity:1;transform:translateY(0) scale(1)}}
.progress-bar-fill{position:relative;overflow:hidden;}
.progress-bar-fill::after{content:'';position:absolute;top:0;left:-60%;width:60%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,0.45),transparent);animation:shimmer 2.4s ease-in-out infinite;}
@keyframes shimmer{to{left:120%}}
.fab{animation:fabPulse 3s ease-in-out infinite;}
@keyframes fabPulse{0%,100%{box-shadow:0 4px 20px rgba(212,168,67,0.5)}50%{box-shadow:0 4px 40px rgba(212,168,67,0.8),0 0 0 8px rgba(212,168,67,0.1)}}
.view-panel.active{animation:viewIn 0.28s cubic-bezier(0.22,1,0.36,1) both;}
@keyframes viewIn{from{opacity:0;transform:translateX(10px)}to{opacity:1;transform:translateX(0)}}
.stat-value{transition:color 0.25s,transform 0.25s;}
.stat-card:hover .stat-value{color:var(--gold);transform:scale(1.08);}
.header-logo span{animation:goldPulse 3s ease-in-out infinite;}
@keyframes goldPulse{0%,100%{text-shadow:none}50%{text-shadow:0 0 12px rgba(212,168,67,0.85)}}
.bubble{background:radial-gradient(circle at 30% 30%,rgba(255,255,255,0.35),rgba(107,122,58,0.05));border:1px solid rgba(255,255,255,0.15);}
.auth-particles{position:absolute;inset:0;pointer-events:none;overflow:hidden;}
.auth-particle{position:absolute;border-radius:50%;background:radial-gradient(circle,rgba(212,168,67,0.35),transparent);animation:orbitFloat linear infinite;}
@keyframes orbitFloat{0%{transform:translateY(100vh);opacity:0}8%{opacity:0.45}92%{opacity:0.15}100%{transform:translateY(-15vh) translateX(25px);opacity:0}}

/* ─── Recipe link floating ───────────────────────────────────── */
.recipe-fab { position:fixed;bottom:5.5rem;right:1.5rem;z-index:79;background:var(--primary);color:white;border-radius:100px;padding:0.5rem 1rem;font-size:0.75rem;font-weight:700;display:flex;align-items:center;gap:0.4rem;box-shadow:var(--shadow-lg);text-decoration:none;transition:all 0.2s; }
.recipe-fab:hover{background:var(--green);transform:translateY(-2px);}


/* ── Filter bar ──────────────────────────────────────────── */
.filter-bar{background:var(--bg-card);border:1.5px solid var(--border);border-radius:var(--radius);padding:0.6rem 0.75rem;margin-bottom:0.6rem;display:flex;flex-direction:column;gap:0.4rem;}
.search-wrap{position:relative;display:flex;align-items:center;}
.search-icon{position:absolute;left:0.75rem;width:15px;height:15px;color:var(--text-soft);pointer-events:none;}
.search-input{width:100%;background:var(--bg);border:1.5px solid var(--border);border-radius:var(--radius-sm);padding:0.55rem 0.75rem 0.55rem 2.2rem;font-size:0.875rem;color:var(--text);min-height:40px;transition:border-color 0.2s;}
.search-input:focus{border-color:var(--green);}
.filter-chips{display:flex;gap:0.35rem;flex-wrap:wrap;}
.chip{height:30px;padding:0 0.7rem;border-radius:100px;font-size:0.7rem;font-weight:700;border:1.5px solid var(--border);color:var(--text-soft);background:var(--bg);transition:all 0.2s;cursor:pointer;}
.chip.active{background:var(--primary);color:white;border-color:var(--primary);}
.chip:hover:not(.active){border-color:var(--primary);color:var(--primary);transform:translateY(-1px);}
.sort-sel{height:32px;padding:0 1.4rem 0 0.6rem;border-radius:var(--radius-sm);border:1.5px solid var(--border);background:var(--bg);font-size:0.75rem;color:var(--text);cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6560' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 0.4rem center;background-size:12px;}
/* ── Planning ────────────────────────────────────────────── */
.planning-section{background:linear-gradient(135deg,#eef0e2,#e9ecda);border:1.5px solid rgba(59,100,200,0.2);border-radius:var(--radius);padding:1rem;margin-bottom:1rem;}
.planning-header{font-size:0.7rem;font-weight:800;letter-spacing:0.1em;text-transform:uppercase;color:#3d5226;margin-bottom:0.75rem;}
/* ── Timers ──────────────────────────────────────────────── */
.timer-card{background:white;border:1.5px solid var(--gold);border-radius:var(--radius-sm);padding:0.7rem 1rem;margin-bottom:0.5rem;display:flex;align-items:center;justify-content:space-between;gap:1rem;animation:cardIn 0.3s ease both;}
.timer-display{font-family:var(--font-display);font-size:1.8rem;font-weight:700;color:var(--primary);line-height:1;min-width:90px;}
.timer-display.urgent{color:#7a2e2a;animation:timerPulse 0.8s infinite;}
@keyframes timerPulse{0%,100%{opacity:1}50%{opacity:0.4}}
.timer-label{font-size:0.78rem;color:var(--text-soft);margin-top:2px;}
.timer-stop-btn{width:36px;height:36px;border-radius:50%;background:#7a2e2a;color:white;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;flex-shrink:0;font-size:0.9rem;}
/* ── Photo upload ────────────────────────────────────────── */
.photo-upload-btn{display:flex;align-items:center;justify-content:center;gap:0.5rem;min-height:46px;background:var(--bg);border:1.5px dashed var(--border);border-radius:var(--radius-sm);font-size:0.85rem;font-weight:600;color:var(--text-soft);cursor:pointer;transition:all 0.2s;width:100%;}
.photo-upload-btn:hover{border-color:var(--green);color:var(--primary);background:rgba(107,122,58,0.03);}
/* ── Extra animaties ─────────────────────────────────────── */
@keyframes cardIn{from{opacity:0;transform:translateY(20px) scale(0.96)}to{opacity:1;transform:translateY(0) scale(1)}}
.batch-card:nth-child(1){animation:cardIn 0.4s 0.04s both}
.batch-card:nth-child(2){animation:cardIn 0.4s 0.10s both}
.batch-card:nth-child(3){animation:cardIn 0.4s 0.16s both}
.batch-card:nth-child(4){animation:cardIn 0.4s 0.22s both}
.batch-card:nth-child(5){animation:cardIn 0.4s 0.28s both}
.batch-card:hover{box-shadow:0 16px 48px rgba(26,26,14,0.18);transform:translateY(-4px) scale(1.01);}
.progress-bar-fill{position:relative;overflow:hidden;}
.progress-bar-fill::after{content:'';position:absolute;top:0;left:-60%;width:60%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,0.5),transparent);animation:shimmer 2.2s ease-in-out infinite;}
@keyframes shimmer{to{left:120%}}
.view-panel.active{animation:viewIn 0.3s cubic-bezier(0.22,1,0.36,1) both;}
@keyframes viewIn{from{opacity:0;transform:translateX(12px)}to{opacity:1;transform:translateX(0)}}
.stat-card{transition:all 0.2s;}
.stat-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);}
.stat-card:hover .stat-value{color:var(--gold);}
.stat-value{transition:color 0.2s;}
.fab:hover{transform:scale(1.15) rotate(45deg);}
.list-item:hover{transform:translateX(4px);box-shadow:var(--shadow);}
.card-action-btn:active{transform:scale(0.95);}
.chip:active{transform:scale(0.94);}


/* ── App Tips ──────────────────────────────────────────────── */
.app-tip {
  background: linear-gradient(135deg, #fdf8ee, #f8efd9);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  animation: fadeIn 0.4s ease;
  position: relative;
}
.app-tip-close {
  position: absolute;
  top: 0.5rem; right: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-soft);
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
  padding: 2px 4px;
}
.app-tip-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1.3; }
.app-tip-body { flex: 1; padding-right: 1rem; }
.app-tip-title { font-size: 0.8rem; font-weight: 700; color: var(--primary); margin-bottom: 0.2rem; }
.app-tip-text { font-size: 0.78rem; color: var(--text); line-height: 1.5; margin-bottom: 0.5rem; }
.app-tip-cta {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--primary); color: white;
  border: none; border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.app-tip-cta:hover { background: var(--green); transform: translateY(-1px); }
.app-tip-cta.gold { background: var(--gold); color: var(--primary); }

/* ── Categorie tellers (voorraad) ───────────────────────────── */
.cat-counters {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 1rem;
}
.cat-counter {
  display: flex; align-items: center; gap: 0.3rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem; font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s;
}
.cat-counter:hover, .cat-counter.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}
.cat-counter-num {
  background: var(--gold);
  color: var(--primary);
  border-radius: 100px;
  padding: 0 5px;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 18px;
  text-align: center;
}
.cat-counter.active .cat-counter-num {
  background: white;
}

/* ── Delete knop ────────────────────────────────────────────── */
.delete-btn {
  width: 100%;
  min-height: 44px;
  background: transparent;
  border: 1.5px solid #7a2e2a;
  color: #7a2e2a;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  transition: all 0.2s;
}
.delete-btn:hover {
  background: #7a2e2a;
  color: white;
}
.delete-confirm {
  background: #7a2e2a;
  color: white;
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  text-align: center;
  animation: fadeIn 0.2s ease;
}
.delete-confirm-btns { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.delete-confirm-btns button { flex: 1; min-height: 40px; border-radius: 6px; font-weight: 700; font-size: 0.8rem; cursor: pointer; border: none; }
.delete-yes { background: white; color: #7a2e2a; }
.delete-no  { background: rgba(255,255,255,0.2); color: white; }


/* ── Planning panel in detail ──────────────────────────────── */
.planning-panel {
  background: linear-gradient(135deg, #eef0e2, #e9ecda);
  border: 1.5px solid rgba(59,100,200,0.2);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  animation: fadeIn 0.25s ease;
}
.planning-panel-header {
  font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #3d5226; margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.planning-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.5rem; margin-bottom: 0.75rem;
}
.planning-grid .form-input {
  min-height: 40px; padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
}
.planning-grid label { font-size: 0.65rem; }
.reminder-row {
  display: flex; gap: 0.5rem;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}
.reminder-row .form-input {
  flex: 1; min-height: 40px;
  padding: 0.4rem 0.6rem; font-size: 0.82rem;
}
.reminder-row select {
  flex: 1; min-height: 40px;
  padding: 0.4rem 0.5rem; font-size: 0.82rem;
}
.plan-save-btn {
  width: 100%; min-height: 42px;
  background: #3d5226; color: white;
  border: none; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center;
  justify-content: center; gap: 0.4rem;
}
.plan-save-btn:hover { background: #2a4fb0; transform: translateY(-1px); }
.plan-edit-btn {
  width: 100%; min-height: 42px;
  background: transparent;
  border: 1.5px solid rgba(59,100,200,0.4);
  color: #3d5226; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center;
  justify-content: center; gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.plan-edit-btn:hover {
  background: rgba(59,100,200,0.08);
  border-color: #3d5226;
}
/* Active timer chips in detail */
.timer-chips {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-top: 0.5rem;
}
.timer-chip {
  display: flex; align-items: center; gap: 0.3rem;
  background: white; border: 1.5px solid var(--gold);
  border-radius: 100px; padding: 0.2rem 0.6rem;
  font-size: 0.72rem; font-weight: 700; color: var(--primary);
}
.timer-chip-time {
  font-family: var(--font-display);
  font-size: 0.9rem; font-weight: 700;
}
.timer-chip.urgent { border-color: #7a2e2a; color: #7a2e2a; }
.timer-chip button {
  background: none; border: none; cursor: pointer;
  color: inherit; font-size: 0.7rem; padding: 0; line-height: 1;
}


/* ── Share Preview Modal ────────────────────────────────────── */
.share-preview-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(26,26,14,0.7); backdrop-filter: blur(6px);
  z-index: 300; align-items: flex-end; justify-content: center;
}
.share-preview-overlay.visible { display: flex; animation: overlayIn 0.2s ease; }
.share-preview-sheet {
  background: var(--bg); border-radius: 24px 24px 0 0;
  width: 100%; max-width: 560px; max-height: 90dvh;
  overflow-y: auto; padding: 1.5rem;
  animation: sheetUp 0.3s cubic-bezier(0.22,1,0.36,1);
}
.share-preview-title {
  font-family: var(--font-display); font-size: 1.4rem;
  font-weight: 700; color: var(--primary);
  margin-bottom: 0.25rem;
}
.share-preview-sub {
  font-size: 0.75rem; color: var(--text-soft);
  margin-bottom: 1rem;
}
.share-post-preview {
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  font-size: 0.85rem; line-height: 1.7;
  white-space: pre-wrap; color: var(--text);
  margin-bottom: 1rem; max-height: 320px;
  overflow-y: auto; font-family: var(--font-body);
}
.share-edit-area {
  width: 100%; background: white;
  border: 1.5px solid var(--green);
  border-radius: var(--radius); padding: 1rem;
  font-size: 0.85rem; line-height: 1.7;
  color: var(--text); margin-bottom: 1rem;
  font-family: var(--font-body); resize: vertical;
  min-height: 200px;
}
.share-edit-area:focus { outline: none; }
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.share-copy-btn {
  min-height: 48px; background: var(--primary); color: white;
  border: none; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 0.4rem; transition: all 0.2s;
}
.share-copy-btn:hover { background: var(--green); }
.share-copy-btn.copied { background: #6b7a3a; }
.share-fb-btn {
  min-height: 48px;
  background: linear-gradient(135deg, #1877f2, #3d5226);
  color: white; border: none; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 0.4rem; transition: all 0.2s;
}
.share-fb-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(24,119,242,0.4); }
.share-group-chips {
  display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.share-group-chip {
  height: 28px; padding: 0 0.7rem;
  border-radius: 100px; font-size: 0.7rem; font-weight: 700;
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text-soft); cursor: pointer; transition: all 0.18s;
}
.share-group-chip.active {
  background: #1877f2; color: white; border-color: #1877f2;
}
.share-ingredient-list {
  font-size: 0.8rem; color: var(--text-soft);
  margin-bottom: 0.5rem;
}


/* ── FERMIT AI Chat ─────────────────────────────────────────── */
.chat-fab {
  position: fixed; bottom: 9rem; right: 1.5rem; z-index: 79;
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--green));
  border: 2.5px solid rgba(255,255,255,0.3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 24px rgba(26,26,14,0.45);
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  overflow: visible;
  padding: 0;
}
.chat-fab:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 32px rgba(26,26,14,0.55);
}
.chat-fab:active { transform: scale(0.95); }
.chat-fab-pulse {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--green); opacity: 0;
  animation: chatFabPulse 2.5s ease-out infinite;
  pointer-events: none;
}
@keyframes chatFabPulse {
  0%   { transform: scale(1);    opacity: 0.6; }
  100% { transform: scale(1.5);  opacity: 0; }
}
/* Badge nieuw bericht */
.chat-fab-badge {
  position: absolute; top: -3px; right: -3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #7a2e2a; border: 2px solid white;
  font-size: 0.6rem; font-weight: 800; color: white;
  display: none; align-items: center; justify-content: center;
  z-index: 80;
}
.chat-fab-badge.show { display: flex; }
.chat-fab img { width: 36px; height: 36px; object-fit: contain; border-radius: 50%; }
.chat-fab:hover { transform: scale(1.12); box-shadow: 0 6px 28px rgba(107,122,58,0.5); }
.chat-fab .chat-badge {
  position: absolute; top: 2px; right: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); border: 2px solid white;
  animation: pulse 2s infinite;
}

.chat-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(26,26,14,0.55); backdrop-filter: blur(4px);
  z-index: 250; align-items: flex-end; justify-content: center;
}
.chat-overlay.visible { display: flex; animation: overlayIn 0.2s ease; }

.chat-sheet {
  background: var(--bg); border-radius: 24px 24px 0 0;
  width: 100%; max-width: 560px;
  height: 82dvh; display: flex; flex-direction: column;
  animation: sheetUp 0.3s cubic-bezier(0.22,1,0.36,1);
}
.chat-header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1.5px solid var(--border);
  display: flex; align-items: center; gap: 0.75rem;
  flex-shrink: 0;
}
.chat-header-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: contain; flex-shrink: 0;
}
.chat-header-info { flex: 1; }
.chat-header-name {
  font-family: var(--font-display); font-size: 1.1rem;
  font-weight: 700; color: var(--primary); line-height: 1.1;
}
.chat-header-status {
  font-size: 0.7rem; color: var(--text-soft);
  display: flex; align-items: center; gap: 0.3rem;
}
.chat-header-status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #6b7a3a; display: inline-block;
  animation: pulse 2s infinite;
}
.chat-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: var(--bg); cursor: pointer;
  font-size: 1rem; color: var(--text-soft);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.chat-close:hover { background: var(--border); color: var(--primary); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  scroll-behavior: smooth;
}
.chat-msg {
  max-width: 85%; display: flex; flex-direction: column; gap: 2px;
}
.chat-msg.user { align-self: flex-end; align-items: flex-end; }
.chat-msg.ai   { align-self: flex-start; align-items: flex-start; }

.chat-bubble {
  padding: 0.65rem 0.9rem; border-radius: 16px;
  font-size: 0.85rem; line-height: 1.55; max-width: 100%;
}
.chat-msg.user .chat-bubble {
  background: var(--primary); color: white;
  border-bottom-right-radius: 4px;
}
.chat-msg.ai .chat-bubble {
  background: var(--bg-card); color: var(--text);
  border: 1.5px solid var(--border);
  border-bottom-left-radius: 4px;
}
.chat-msg.ai .chat-bubble a {
  color: var(--green); font-weight: 600; text-decoration: underline;
}
.chat-bubble-time {
  font-size: 0.62rem; color: var(--text-soft);
  padding: 0 0.2rem;
}
.chat-ai-header {
  display: flex; align-items: center; gap: 0.4rem;
  margin-bottom: 0.15rem;
}
.chat-ai-avatar {
  width: 20px; height: 20px; border-radius: 50%;
  object-fit: contain;
}
.chat-ai-name { font-size: 0.68rem; font-weight: 700; color: var(--green); }

.chat-typing {
  display: flex; gap: 4px; padding: 0.65rem 0.9rem;
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: 16px; border-bottom-left-radius: 4px;
  width: fit-content;
}
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-soft); animation: typingDot 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%,60%,100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-suggestions {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
  padding: 0 1rem 0.5rem;
}
.chat-suggestion {
  font-size: 0.72rem; font-weight: 600;
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: 100px; padding: 0.3rem 0.7rem;
  cursor: pointer; transition: all 0.18s; color: var(--primary);
}
.chat-suggestion:hover {
  border-color: var(--green); background: rgba(107,122,58,0.06);
}

.chat-input-wrap {
  padding: 0.75rem 1rem 1rem;
  border-top: 1.5px solid var(--border);
  display: flex; gap: 0.5rem; flex-shrink: 0;
}
.chat-input {
  flex: 1; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 24px;
  padding: 0.6rem 1rem; font-size: 0.875rem;
  color: var(--text); resize: none; min-height: 44px;
  max-height: 120px; outline: none; transition: border-color 0.2s;
  font-family: var(--font-body); line-height: 1.4;
}
.chat-input:focus { border-color: var(--green); }
.chat-send-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: white;
  border: none; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; align-self: flex-end;
}
.chat-send-btn:hover { background: var(--green); transform: scale(1.08); }
.chat-send-btn:disabled { background: var(--border); cursor: not-allowed; transform: none; }


/* ── Statistics Dashboard ───────────────────────────────────── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}
@media(min-width:480px){ .kpi-strip{ grid-template-columns: repeat(4,1fr); } }
.kpi-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
}
.kpi-card.green::before  { background: var(--green); }
.kpi-card.gold::before   { background: var(--gold); }
.kpi-card.red::before    { background: #7a2e2a; }
.kpi-card.blue::before   { background: #3d5226; }
.kpi-value {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 700;
  color: var(--primary); line-height: 1;
  margin-bottom: 2px;
}
.kpi-label {
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-soft);
}
.kpi-sub {
  font-size: 0.7rem; color: var(--text-soft);
  margin-top: 2px;
}
.kpi-icon {
  position: absolute; top: 0.75rem; right: 0.75rem;
  font-size: 1.4rem; opacity: 0.15;
}

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}
.chart-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.65rem;
}
.chart-card.full-width { margin-bottom: 0.65rem; }
.chart-card-title {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-soft); margin-bottom: 0.75rem;
}
.chart-card canvas { width: 100% !important; }
.donut-wrap {
  display: flex; justify-content: center;
  margin-bottom: 0.6rem;
}
.donut-wrap canvas { width: 140px !important; height: 140px !important; }
.donut-legend {
  display: flex; flex-direction: column; gap: 3px;
}
.legend-item {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.7rem; color: var(--text);
}
.legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}
.legend-pct {
  margin-left: auto; font-weight: 700;
  color: var(--text-soft); font-size: 0.65rem;
}

.duration-list { display: flex; flex-direction: column; gap: 0.5rem; }
.duration-item {
  display: flex; align-items: center; gap: 0.5rem;
}
.duration-bar-wrap {
  flex: 1; height: 8px;
  background: var(--bg); border-radius: 4px; overflow: hidden;
}
.duration-bar {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 0.6s ease;
}
.duration-label { font-size: 0.68rem; color: var(--text); min-width: 60px; }
.duration-val { font-size: 0.68rem; color: var(--text-soft); min-width: 32px; text-align: right; }


/* ── Puntensysteem & Ranking ─────────────────────────────────── */
.score-badge {
  display: flex; align-items: center; gap: 0.3rem;
  background: linear-gradient(135deg, var(--gold), #b8912e);
  color: var(--primary); border-radius: 100px;
  padding: 0.2rem 0.65rem; font-size: 0.72rem;
  font-weight: 800; cursor: pointer;
  box-shadow: 0 2px 8px rgba(212,168,67,0.4);
  transition: all 0.2s;
}
.score-badge:hover { transform: scale(1.05); }
.score-badge-icon { font-size: 0.9rem; }

.achievements-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem; margin-bottom: 1rem;
}
.achievement {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 0.75rem;
  text-align: center; transition: all 0.2s;
}
.achievement.unlocked {
  border-color: var(--gold);
  background: linear-gradient(135deg, #fdf8ee, #f8efd9);
  box-shadow: 0 2px 12px rgba(212,168,67,0.2);
}
.achievement.locked { opacity: 0.45; filter: grayscale(0.8); }
.achievement-icon { font-size: 1.8rem; margin-bottom: 0.3rem; }
.achievement-name {
  font-size: 0.7rem; font-weight: 700; color: var(--primary);
  line-height: 1.2; margin-bottom: 0.2rem;
}
.achievement-desc { font-size: 0.62rem; color: var(--text-soft); line-height: 1.4; }
.achievement-pts {
  display: inline-block; margin-top: 0.3rem;
  background: var(--gold); color: var(--primary);
  border-radius: 100px; padding: 1px 7px;
  font-size: 0.62rem; font-weight: 800;
}
.achievement.locked .achievement-pts { background: var(--border); color: var(--text-soft); }

.points-total-card {
  background: linear-gradient(135deg, var(--primary), var(--green));
  border-radius: var(--radius); padding: 1.25rem;
  text-align: center; margin-bottom: 1rem; color: white;
}
.points-total-value {
  font-family: var(--font-display); font-size: 3.5rem;
  font-weight: 700; line-height: 1; color: var(--gold);
}
.points-total-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; opacity: 0.8; margin-top: 4px;
}
.points-total-rank {
  margin-top: 0.5rem; font-size: 0.85rem; opacity: 0.9;
}

.leaderboard-table {
  width: 100%; border-collapse: collapse; margin-bottom: 1rem;
}
.leaderboard-table th {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-soft);
  padding: 0.4rem 0.6rem; text-align: left;
  border-bottom: 1.5px solid var(--border);
}
.leaderboard-table td {
  padding: 0.65rem 0.6rem; font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
}
.leaderboard-table tr.me td { background: rgba(212,168,67,0.08); font-weight: 600; }
.rank-medal { font-size: 1.1rem; }
.rank-num { font-weight: 800; color: var(--text-soft); font-size: 0.85rem; }
.rank-score {
  font-family: var(--font-display); font-weight: 700;
  color: var(--primary); font-size: 1rem;
}
.progress-to-next {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 1rem; margin-bottom: 1rem;
}
.progress-to-next-label { font-size: 0.7rem; color: var(--text-soft); margin-bottom: 0.4rem; }
.level-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--primary); color: white;
  border-radius: 100px; padding: 0.25rem 0.75rem;
  font-size: 0.72rem; font-weight: 700; margin-bottom: 0.6rem;
}


/* ── Profiel modal ──────────────────────────────────────────── */
.profile-avatar-big {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--primary); color: white;
  font-family: var(--font-display); font-size: 1.8rem;
  font-weight: 700; display: flex; align-items: center;
  justify-content: center; margin: 0 auto 0.6rem;
  cursor: pointer; transition: transform 0.2s;
  border: 3px solid var(--gold);
}
.profile-avatar-big:hover { transform: scale(1.05); }
.avatar-picker-wrap { position: relative; display: inline-block; }
.avatar-emoji-grid {
  display: grid; grid-template-columns: repeat(6,1fr);
  gap: 0.3rem; margin-top: 0.5rem;
}
.avatar-opt {
  font-size: 1.4rem; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 0.3rem; cursor: pointer; transition: all 0.15s;
  line-height: 1;
}
.avatar-opt:hover { border-color: var(--gold); transform: scale(1.15); }
.avatar-opt.selected { border-color: var(--gold); background: var(--gold-light); }

.profile-section-title {
  font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-soft); margin: 1rem 0 0.5rem;
  padding-top: 1rem; border-top: 1px solid var(--border);
}
.notif-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
  margin-bottom: 0.4rem;
}
.notif-toggle-btn {
  flex-shrink: 0; height: 34px; padding: 0 1rem;
  border-radius: 100px; font-size: 0.75rem; font-weight: 700;
  border: 1.5px solid var(--green); color: var(--green);
  background: transparent; cursor: pointer; transition: all 0.2s;
  white-space: nowrap;
}
.notif-toggle-btn.active {
  background: var(--green); color: white; border-color: var(--green);
}
.notif-toggle-btn.blocked {
  border-color: #7a2e2a; color: #7a2e2a;
}


/* ── Plan type toggle ────────────────────────────────────────── */
.plan-type-row{display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;}
.ptype{padding:0.7rem 0.5rem;border-radius:var(--radius);border:2px solid var(--border);background:var(--bg-card);cursor:pointer;text-align:center;font-size:0.82rem;font-weight:700;color:var(--text-soft);transition:all 0.2s;display:flex;flex-direction:column;gap:3px;line-height:1.2;}
.ptype.active{border-color:var(--primary);background:rgba(26,26,14,0.05);color:var(--primary);}
.ptype:hover:not(.active){border-color:var(--border);color:var(--text);}
.ptype-sub{font-size:0.6rem;font-weight:500;opacity:0.65;}

/* ── Quick date chips ────────────────────────────────────────── */
.qdc-row{display:flex;flex-wrap:wrap;gap:0.3rem;}
.qdc{height:28px;padding:0 0.65rem;border-radius:100px;font-size:0.7rem;font-weight:700;border:1.5px solid var(--border);background:var(--bg);color:var(--text-soft);cursor:pointer;transition:all 0.18s;}
.qdc:hover{border-color:var(--primary);color:var(--primary);transform:translateY(-1px);}
.qdc.sel{background:var(--primary);color:white;border-color:var(--primary);}

/* ── Timer row ───────────────────────────────────────────────── */
.timer-row{display:grid;grid-template-columns:80px 80px 1fr;gap:0.4rem;align-items:end;}
.timer-col{display:flex;flex-direction:column;gap:3px;}
.timer-num{min-height:44px;padding:0.4rem 0.5rem;text-align:center;}
.timer-lbl{font-size:0.6rem;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;color:var(--text-soft);text-align:center;}

/* ── ICS preview box ─────────────────────────────────────────── */
.ics-box{background:linear-gradient(135deg,#e9ecda,#eef0e2);border:1.5px solid var(--green);border-radius:var(--radius);padding:0.9rem;margin-top:0.75rem;}
.ics-box-title{font-size:0.68rem;font-weight:800;letter-spacing:0.08em;text-transform:uppercase;color:var(--green);margin-bottom:0.5rem;}
.ics-item{display:flex;align-items:flex-start;gap:0.5rem;font-size:0.78rem;color:var(--text);padding:0.25rem 0;border-bottom:1px solid rgba(107,122,58,0.1);}
.ics-item:last-child{border-bottom:none;}
.ics-item-dot{width:18px;flex-shrink:0;text-align:center;}

/* ── Voorraadkast items ──────────────────────────────────────── */
.stock-item{background:var(--bg-card);border:1.5px solid var(--border);border-left:4px solid var(--gold);border-radius:var(--radius-sm);padding:0.8rem 1rem;margin-bottom:0.5rem;display:flex;align-items:center;gap:1rem;cursor:pointer;transition:all 0.2s;}
.stock-item:hover{box-shadow:var(--shadow);transform:translateX(3px);}
.stock-item-info{flex:1;min-width:0;}
.stock-item-name{font-weight:700;font-size:0.9rem;color:var(--primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.stock-item-meta{font-size:0.7rem;color:var(--text-soft);margin-top:2px;}
.stock-badge{flex-shrink:0;text-align:right;}
.stock-badge-days{font-family:var(--font-display);font-size:1.4rem;font-weight:700;color:var(--gold);line-height:1;}
.stock-badge-lbl{font-size:0.6rem;color:var(--text-soft);}

/* ── Active timer chips (zweeft linksonder) ──────────────────── */
#timer-float{position:fixed;bottom:5.5rem;left:1rem;z-index:78;display:flex;flex-direction:column;gap:0.35rem;}
.timer-float-chip{background:white;border:1.5px solid var(--gold);border-radius:100px;padding:0.28rem 0.85rem;display:flex;align-items:center;gap:0.5rem;font-size:0.78rem;font-weight:700;color:var(--primary);box-shadow:0 2px 12px rgba(212,168,67,0.3);}
.timer-float-chip.urgent{border-color:#7a2e2a;color:#7a2e2a;animation:timerPulse 1s infinite;}
.timer-float-chip button{background:none;border:none;cursor:pointer;color:inherit;font-size:0.75rem;padding:0;line-height:1;margin-left:2px;}


/* ── ICS sheet ───────────────────────────────────────────────── */
.ics-info-card {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem;
  margin-bottom: 1rem; font-size: 0.83rem; color: var(--text);
  line-height: 1.5;
}
.ics-type-tabs {
  display: grid; grid-template-columns: repeat(2,1fr);
  gap: 0.4rem; margin-bottom: 1rem;
}
.itt {
  min-height: 56px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text-soft); cursor: pointer; font-size: 0.78rem;
  font-weight: 600; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  transition: all 0.18s;
}
.itt-icon { font-size: 1.3rem; line-height: 1; }
.itt.active { background: var(--primary); color: white; border-color: var(--primary); }
.itt:hover:not(.active) { border-color: var(--primary); color: var(--primary); }
.ics-panel { margin-bottom: 0.75rem; }
.ics-panel-desc {
  font-size: 0.78rem; color: var(--text-soft); line-height: 1.55;
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem; margin-bottom: 0.85rem;
}
.ics-preview {
  background: linear-gradient(135deg,#eef0e2,#e9ecda);
  border: 1.5px solid var(--green); border-radius: var(--radius-sm);
  padding: 0.85rem; margin-bottom: 0.75rem;
}
.ics-preview-title {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--green); margin-bottom: 0.4rem;
}
#ics-preview-content {
  font-size: 0.8rem; color: var(--text); line-height: 1.6;
}
/* ── Timer quick row ──────────────────────────────────────── */
.timer-quick-row, .qdc-row {
  display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.4rem;
}


.auth-link-btn {
  width: 100%; text-align: center; padding: 0.5rem;
  font-size: 0.82rem; color: var(--text-soft);
  background: none; border: none; cursor: pointer;
  text-decoration: underline; transition: color 0.15s;
}
.auth-link-btn:hover { color: var(--primary); }


/* ── RootsFood Hero ─────────────────────────────────────────── */
.rf-hero {
  display: flex; align-items: center; gap: 0.85rem;
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 1rem;
  margin-bottom: 0.6rem; cursor: pointer;
  box-shadow: var(--shadow); transition: all 0.2s;
}
.rf-hero:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.rf-hero-logo { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
.rf-hero-text { flex: 1; min-width: 0; }
.rf-hero-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.rf-hero-sub  { font-size: 0.68rem; color: var(--text-soft); margin-top: 1px; }
.rf-hero-btn  {
  background: var(--primary); color: white; border-radius: 100px;
  padding: 0.3rem 0.85rem; font-size: 0.72rem; font-weight: 700;
  text-decoration: none; white-space: nowrap; transition: all 0.2s; flex-shrink: 0;
}
.rf-hero-btn:hover { background: var(--green); }

/* ── View toggles ────────────────────────────────────────────── */
.vt-group { display: flex; gap: 2px; background: var(--bg); border: 1.5px solid var(--border); border-radius: 8px; padding: 2px; }
.vt-btn { width: 30px; height: 26px; border: none; background: transparent; border-radius: 5px; color: var(--text-soft); cursor: pointer; font-size: 0.9rem; line-height: 1; transition: all 0.15s; }
.vt-btn.active { background: var(--primary); color: white; }
.vt-btn:hover:not(.active) { background: var(--border); }

/* ── Card logo row ───────────────────────────────────────────── */
.card-logo-row {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 0.5rem; padding: 0.85rem 0.85rem 0;
}
.card-cat-logo {
  width: 68px; height: 68px; object-fit: contain;
  flex-shrink: 0; border-radius: 12px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12));
}
.card-cat-logo-placeholder {
  width: 68px; height: 68px; border-radius: 12px;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 700;
  flex-shrink: 0;
}
.card-name-col { flex: 1; min-width: 0; }
.card-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--primary); line-height: 1.2; margin-bottom: 0.35rem; }

/* ── Pulserende categorie tag ────────────────────────────────── */
.card-cat-tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em;
  border-radius: 100px; padding: 3px 9px;
  border: 1px solid currentColor;
}
.status-tag-actief  { color: var(--green); background: rgba(107,122,58,0.08); border-color: rgba(107,122,58,0.25); }
.status-tag-voltooid{ color: var(--gold);  background: rgba(212,168,67,0.1); border-color: rgba(212,168,67,0.3); }
.status-tag-mislukt { color: #7a2e2a;      background: rgba(229,57,53,0.07); border-color: rgba(229,57,53,0.2); }
.status-tag-voorraad { color: #9e3d6b;  background: rgba(123,94,167,0.08); border-color: rgba(123,94,167,0.25); }
.status-tag-verbruikt{ color: #5c5a48;  background: rgba(107,101,96,0.08);  border-color: rgba(107,101,96,0.2); }
.cat-tag-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
  animation: tagPulse 2s ease-in-out infinite;
}
@keyframes tagPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

/* ── Card meta chips ─────────────────────────────────────────── */
.card-meta-row {
  display: flex; flex-wrap: wrap; gap: 0.25rem;
  padding: 0 0.85rem 0.5rem;
}
.card-meta-chip {
  font-size: 0.6rem; font-weight: 700; background: var(--bg);
  border: 1px solid var(--border); border-radius: 100px;
  padding: 2px 7px; color: var(--text-soft);
}
.card-meta-ph  { border-color: #3d5226; color: #3d5226; background: rgba(59,100,200,0.06); }
.card-meta-ics { border-color: var(--green); color: var(--green); background: rgba(107,122,58,0.06); }

/* ── Card icon buttons ───────────────────────────────────────── */
.card-actions { display: flex; border-top: 1px solid var(--border); }
.card-icon-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  min-height: 52px; border: none; background: transparent;
  color: var(--text-soft); cursor: pointer; font-size: 0.6rem;
  font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  transition: all 0.18s; border-right: 1px solid var(--border);
}
.card-icon-btn:last-child { border-right: none; }
.card-icon-btn:hover { background: rgba(26,26,14,0.05); color: var(--primary); }
.card-icon-btn:active { transform: scale(0.93); }
.card-icon-gold { color: var(--primary) !important; }
.card-icon-gold:hover { background: rgba(212,168,67,0.12) !important; }

/* ── Remove old card-body padding (now in logo-row) ─────────── */
.batch-card .card-body { padding: 0; }
.card-category { padding: 0 0.85rem; margin-bottom: 0.4rem; }
.progress-bar-wrap { margin: 0 0.85rem 0.25rem; }
.progress-meta { padding: 0 0.85rem 0.6rem; }

/* ── Compact view ────────────────────────────────────────────── */
#cards-grid.compact { grid-template-columns: 1fr !important; }
#cards-grid.compact .batch-card { display: grid; grid-template-columns: 4px 1fr auto; min-height: 60px; align-items: stretch; }
#cards-grid.compact .card-accent { width: 4px; height: auto; }
#cards-grid.compact .card-logo-row { padding: 0.4rem 0.6rem; gap: 0.5rem; margin-bottom: 0; }
#cards-grid.compact .card-cat-logo { width: 36px; height: 36px; }
#cards-grid.compact .card-cat-logo-placeholder { width: 36px; height: 36px; font-size: 1rem; }
#cards-grid.compact .card-cat-tag { font-size: 0.6rem; }
#cards-grid.compact .card-meta-row,
#cards-grid.compact .progress-bar-wrap,
#cards-grid.compact .progress-meta,
#cards-grid.compact .card-bubbles { display: none !important; }
#cards-grid.compact .card-actions { border-top: none; border-left: 1px solid var(--border); flex-direction: column; min-width: 44px; }
#cards-grid.compact .card-icon-btn { min-height: unset; flex: 1; border-right: none; border-bottom: 1px solid var(--border); font-size: 0.7rem; }
#cards-grid.compact .card-icon-btn span { display: none; }
#cards-grid.compact .card-icon-btn:last-child { border-bottom: none; }
/* ── Large view ──────────────────────────────────────────────── */
#cards-grid.large { grid-template-columns: 1fr !important; }


/* ── Detail modal tabs ────────────────────────────────────────── */
.detail-header { margin-bottom: 0; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); margin-bottom: 0.75rem; }
.detail-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 0.4rem; }
.detail-meta-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.5rem; }
.detail-chip { font-size: 0.72rem; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 2px 8px; color: var(--text-soft); }

.detail-tabs {
  display: flex; gap: 0; margin-bottom: 1rem;
  background: var(--bg); border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); overflow: hidden;
}
.dtab {
  flex: 1; min-height: 42px; border: none; background: transparent;
  font-size: 0.8rem; font-weight: 600; color: var(--text-soft);
  cursor: pointer; transition: all 0.18s; border-right: 1px solid var(--border);
}
.dtab:last-child { border-right: none; }
.dtab.active { background: var(--primary); color: white; }
.dtab:hover:not(.active) { background: rgba(26,26,14,0.06); color: var(--primary); }
.detail-tab-content { animation: fadeIn 0.2s ease; }
.detail-section { margin-bottom: 1rem; }
.section-label {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-soft);
  margin-bottom: 0.5rem;
}
.detail-actions-row { background: var(--bg); border-radius: var(--radius-sm); padding: 0.75rem; }

/* ── Photo grid ───────────────────────────────────────────────── */
.photo-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 0.5rem;
}
.photo-grid-item {
  border-radius: 8px; overflow: hidden;
  border: 1.5px solid var(--border); cursor: pointer;
}
.photo-grid-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.photo-grid-date { font-size: 0.62rem; color: var(--text-soft); padding: 3px 6px; }
.photo-grid-caption { font-size: 0.7rem; color: var(--text); padding: 2px 6px 4px; }

/* ── Agenda items ─────────────────────────────────────────────── */
.agenda-item {
  display: flex; align-items: flex-start; gap: 0.6rem;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.65rem 0.75rem;
  margin-bottom: 0.4rem;
}
.agenda-item.expired { opacity: 0.55; }
.agenda-item-icon { font-size: 1.3rem; flex-shrink: 0; }
.agenda-item-info { flex: 1; min-width: 0; }
.agenda-item-label { font-size: 0.82rem; font-weight: 600; color: var(--primary); margin-bottom: 2px; }
.agenda-item-time { font-size: 0.72rem; font-weight: 700; color: var(--green); }
.agenda-item-time.expired { color: var(--text-soft); }
.agenda-item-date { font-size: 0.65rem; color: var(--text-soft); margin-top: 2px; }


/* ── Verbruikt styling ───────────────────────────────────────── */
.card-icon-consume { color: var(--green) !important; }
.card-icon-consume:hover { background: rgba(107,122,58,0.1) !important; }
.card-icon-consumed { color: var(--text-soft) !important; opacity: 0.5; }
.consume-btn {
  background: transparent; border: 1.5px solid var(--green);
  color: var(--green); border-radius: 6px;
  padding: 0.25rem 0.65rem; font-size: 0.72rem; font-weight: 700;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
}
.consume-btn:hover { background: var(--green); color: white; }
.consumed-badge {
  font-size: 0.72rem; font-weight: 700; color: var(--text-soft);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.25rem 0.65rem;
}
.stock-actions { margin-top: 0.4rem; }
/* Klikbaar stat-card hover */
.stat-card[onclick]:hover { background: var(--bg); box-shadow: var(--shadow); }


/* ── Verbruikt knop op kaart ─────────────────────────────────── */
.card-icon-verbruikt {
  color: #9e3d6b !important;
}
.card-icon-verbruikt:hover {
  background: rgba(123,94,167,0.1) !important;
  color: #9e3d6b !important;
}
.card-verbruikt-badge {
  color: #9e3d6b !important;
  opacity: 0.6;
}

/* ── Stock item verbeteringen ────────────────────────────────── */
.stock-verbruikt { border-left-color: #9e3d6b !important; opacity: 0.8; }
.verbruikt-badge {
  display: inline-block; font-size: 0.65rem; font-weight: 700;
  color: #9e3d6b; background: rgba(123,94,167,0.1);
  border: 1px solid rgba(123,94,167,0.3); border-radius: 100px;
  padding: 1px 7px; margin-top: 2px;
}
.stock-verbruikt-btn {
  font-size: 0.65rem; font-weight: 700;
  background: rgba(123,94,167,0.1); border: 1px solid rgba(123,94,167,0.3);
  color: #9e3d6b; border-radius: 100px; padding: 2px 8px; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.stock-verbruikt-btn:hover { background: #9e3d6b; color: white; }
.stock-detail-btn {
  font-size: 0.65rem; font-weight: 600;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-soft); border-radius: 100px; padding: 2px 8px; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.stock-detail-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ── Stats strip 5-kolommen ──────────────────────────────────── */
.stats-strip { grid-template-columns: repeat(5, 1fr) !important; }


/* ── Basisrecept box ─────────────────────────────────────────── */
.basisrecept-box {
  background: linear-gradient(135deg,#eef0e2,#e9ecda);
  border: 1.5px solid var(--green); border-radius: var(--radius-sm);
  padding: 0.85rem; margin-bottom: 0.5rem;
}
.basisrecept-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--green); margin-bottom: 0.65rem;
}
.recept-link {
  font-size: 0.68rem; font-weight: 700; color: var(--primary);
  text-decoration: none; background: white; border-radius: 100px;
  padding: 2px 8px; border: 1px solid var(--green);
  transition: all 0.15s; white-space: nowrap;
}
.recept-link:hover { background: var(--green); color: white; }
.recept-stappen { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.5rem; }
.recept-stap {
  display: flex; align-items: flex-start; gap: 0.5rem;
  font-size: 0.79rem; color: var(--text); line-height: 1.45;
}
.recept-stap-num {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); color: white;
  font-size: 0.62rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.recept-tip {
  font-size: 0.74rem; color: var(--primary); font-weight: 600;
  background: rgba(107,122,58,0.08); border-radius: 6px;
  padding: 0.4rem 0.6rem;
}


/* ── Modal close btn ─────────────────────────────────────────── */
.modal-close-btn {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text-soft); cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; margin-top: 2px;
}
.modal-close-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ── Card ingrediënten ───────────────────────────────────────── */
.card-ingredients {
  display: flex; flex-wrap: wrap; gap: 0.2rem;
  padding: 0 0.85rem 0.35rem;
}
.card-ingr {
  font-size: 0.58rem; font-weight: 600;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 100px; padding: 1px 6px; color: var(--text-soft);
}
.card-ingr-more { background: var(--primary); color: white; border-color: var(--primary); }
.card-last-log {
  font-size: 0.65rem; color: var(--text-soft);
  padding: 0 0.85rem 0.35rem; line-height: 1.3;
  font-style: italic;
}

/* ── Status chip in detail ───────────────────────────────────── */
.status-chip-actief   { background: rgba(107,122,58,0.1);  color: var(--green); border-color: rgba(107,122,58,0.3)!important; }
.status-chip-voltooid { background: rgba(212,168,67,0.1); color: var(--gold);  border-color: rgba(212,168,67,0.3)!important; }
.status-chip-mislukt  { background: rgba(229,57,53,0.08); color: #7a2e2a;     border-color: rgba(229,57,53,0.2)!important; }
.status-chip-voorraad { background: rgba(123,94,167,0.08); color: #9e3d6b;    border-color: rgba(123,94,167,0.25)!important; }
.status-chip-verbruikt{ background: rgba(107,101,96,0.08); color: var(--text-soft); border-color: rgba(107,101,96,0.2)!important; }

/* ── Verbruikt button state ──────────────────────────────────── */
.card-icon-consume  { color: #9e3d6b !important; }
.card-icon-consume:hover { background: rgba(123,94,167,0.1) !important; }
.card-icon-consumed { color: #9e3d6b !important; opacity: 0.45; cursor: default !important; }

/* ── Recept preview bij categorie keuze ─────────────────────── */
.cat-recipe-box {
  background: linear-gradient(135deg,#eef0e2,#e9ecda);
  border: 1.5px solid var(--green); border-radius: var(--radius-sm);
  padding: 0.85rem; margin-bottom: 0.5rem;
}
.cat-recipe-title {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--green); margin-bottom: 0.6rem;
}
.cat-recipe-step {
  display: flex; align-items: flex-start; gap: 0.4rem;
  font-size: 0.78rem; color: var(--text); line-height: 1.45; margin-bottom: 0.25rem;
}
.cat-recipe-num {
  flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%;
  background: var(--primary); color: white;
  font-size: 0.58rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.cat-recipe-tip {
  font-size: 0.73rem; color: var(--primary); font-weight: 600;
  background: rgba(107,122,58,0.08); border-radius: 6px; padding: 0.35rem 0.6rem; margin-top: 0.4rem;
}
.cat-recipe-link {
  display: block; margin-top: 0.5rem; font-size: 0.72rem; font-weight: 700;
  color: var(--primary); text-decoration: none;
}
.cat-recipe-link:hover { text-decoration: underline; }
.cat-tip-preview {
  display: flex; align-items: flex-start; gap: 0.5rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.65rem 0.75rem;
  font-size: 0.8rem; color: var(--text); line-height: 1.5;
}
.fermit-avatar-sm { font-size: 1.3rem; flex-shrink: 0; }


/* ── Recept ingrediënten ─────────────────────────────────────── */
.recept-omschrijving {
  font-size: 0.78rem; color: var(--text-soft); font-style: italic;
  line-height: 1.5; margin-bottom: 0.65rem;
}
.recept-ingr-title, .recept-stappen-title {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--primary);
  margin-bottom: 0.4rem; margin-top: 0.5rem;
}
.recept-ingr-list { margin-bottom: 0.5rem; }
.recept-ingr-item {
  display: flex; align-items: baseline; gap: 0.5rem;
  font-size: 0.78rem; color: var(--text); padding: 2px 0;
  border-bottom: 1px solid rgba(107,122,58,0.08);
}
.recept-ingr-item:last-child { border-bottom: none; }
.recept-ingr-qty {
  flex-shrink: 0; font-weight: 700; color: var(--primary);
  min-width: 55px; font-size: 0.76rem;
}
.recept-ingr-naam { color: var(--text); line-height: 1.4; }


/* ── Bewerk knop op kaart ────────────────────────────────────── */
.card-icon-edit { color: #3d5226 !important; }
.card-icon-edit:hover { background: rgba(59,100,200,0.1) !important; }


/* ── Toggle switch ────────────────────────────────────────────── */
.ranking-toggle-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 0.5rem; padding: 0.75rem;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
}
.toggle-switch {
  position: relative; flex-shrink: 0;
  width: 44px; height: 24px; cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border); border-radius: 100px;
  transition: 0.25s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%;
  transition: 0.25s; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }


/* ── Urban Roots ──────────────────────────────────────────────── */
.urban-fase-btns { display:grid; grid-template-columns:repeat(2,1fr); gap:0.4rem; margin-bottom:0.5rem; }
.fase-btn { min-height:42px; border-radius:var(--radius-sm); border:1.5px solid var(--border); background:var(--bg); font-size:0.78rem; font-weight:600; color:var(--text-soft); cursor:pointer; transition:all 0.18s; padding:0.4rem 0.65rem; text-align:left; }
.fase-btn:hover { border-color:var(--green); color:var(--green); background:rgba(107,122,58,0.05); }
.fase-btn.active { background:var(--primary); color:white; border-color:var(--primary); }

/* Groei stadia */
.groei-stadia { display:flex; align-items:center; overflow-x:auto; margin-bottom:0.85rem; padding:0.25rem 0; }
.groei-stap { display:flex; flex-direction:column; align-items:center; gap:2px; flex-shrink:0; min-width:52px; opacity:0.35; transition:all 0.3s; }
.groei-stap.active,.groei-stap.done { opacity:1; }
.groei-stap.active .groei-emoji { transform:scale(1.25); }
.groei-emoji { font-size:1.35rem; display:block; transition:transform 0.3s; }
.groei-label { font-size:0.58rem; font-weight:700; color:var(--text-soft); text-align:center; }
.groei-stap.active .groei-label { color:var(--green); font-weight:800; }
.groei-lijn { flex:1; height:2px; background:var(--border); min-width:8px; margin:0 2px; margin-bottom:12px; transition:background 0.3s; }
.groei-lijn.done { background:var(--green); }

/* Water checklist */
.water-check-section { margin-bottom:0.85rem; }
.water-check-title { font-size:0.68rem; font-weight:800; letter-spacing:0.08em; text-transform:uppercase; color:#3d5226; margin-bottom:0.5rem; }
.water-actions { display:grid; grid-template-columns:1fr 1fr; gap:0.4rem; margin-bottom:0.5rem; }
.water-action-btn { min-height:44px; border-radius:var(--radius-sm); border:1.5px solid #3d5226; color:#3d5226; background:transparent; font-size:0.78rem; font-weight:700; cursor:pointer; transition:all 0.2s; }
.water-action-btn.voeding { border-color:var(--green); color:var(--green); }
.water-action-btn.done { background:rgba(59,100,200,0.1); cursor:default; }
.water-action-btn.voeding.done { background:rgba(107,122,58,0.1); }
.water-history { display:flex; gap:0.35rem; }
.water-day { text-align:center; flex:1; }
.water-day-icon { font-size:1.1rem; }
.water-day-lbl { font-size:0.55rem; color:var(--text-soft); margin-top:2px; }

/* Bladgezondheid */
.blade-btn { padding:0.35rem 0.65rem; border-radius:100px; border:1.5px solid var(--border); background:var(--bg); font-size:0.75rem; font-weight:600; color:var(--text-soft); cursor:pointer; transition:all 0.18s; }
.blade-btn.active { background:var(--primary); color:white; border-color:var(--primary); }

/* Oogst */
.oogst-section { margin-bottom:0.85rem; }


/* ── Foto op kaarten ────────────────────────────────────────── */
.card-photo-banner { position:relative; height:90px; overflow:hidden; border-radius:0; margin-bottom:0; }
.card-photo-img { width:100%; height:100%; object-fit:cover; display:block; cursor:pointer; transition:transform 0.3s; }
.card-photo-banner:hover .card-photo-img { transform:scale(1.04); }
.card-photo-overlay { position:absolute; inset:0; background:linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.25)); }

/* ── Voorraadkast met foto ───────────────────────────────────── */
.stock-item { display:flex; align-items:center; gap:0.75rem; cursor:pointer; }
.stock-photo { width:52px; height:52px; border-radius:8px; overflow:hidden; flex-shrink:0; background:var(--bg); }
.stock-photo img { width:100%; height:100%; object-fit:cover; }
.stock-logo img { object-fit:contain; padding:4px; }
.stock-logo-placeholder { width:52px; height:52px; border-radius:8px; background:var(--primary); color:white; display:flex; align-items:center; justify-content:center; font-size:1.4rem; font-weight:700; flex-shrink:0; }


/* ── Urban form CSS-klasse aanpak ───────────────────────────── */
form.is-urban #non-urban-fields { display: none !important; }
form.is-urban #urban-fields     { display: block !important; }
form.is-urban .non-urban-plan   { display: none !important; }
form.is-urban .urban-plan       { display: block !important; }
form:not(.is-urban) #urban-fields  { display: none !important; }
form:not(.is-urban) .urban-plan    { display: none !important; }


/* ── Stock Urban item ────────────────────────────────────────── */
.stock-urban { border-left: 3px solid var(--green); }
.fase-badge-mini {
  font-size:0.62rem; font-weight:700; color:var(--green);
  background:rgba(107,122,58,0.1); border-radius:4px;
  padding:2px 6px; white-space:nowrap;
}

/* ── Album view ──────────────────────────────────────────────── */
#cards-grid.album {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 0.5rem;
}
@media (min-width:480px) { #cards-grid.album { grid-template-columns: repeat(3,1fr) !important; } }

#cards-grid.album {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 0.5rem;
}
@media (min-width:480px) { #cards-grid.album { grid-template-columns: repeat(3,1fr) !important; } }

#cards-grid.album .batch-card {
  border-radius: 14px; overflow: hidden;
  position: relative; aspect-ratio: 3/4;
  border: none; box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  cursor: pointer;
}
/* Foto vult volledige kaart */
#cards-grid.album .card-photo-banner {
  position: absolute; inset: 0; height: 100%; z-index: 1;
}
#cards-grid.album .card-photo-banner .card-photo-img {
  width: 100%; height: 100%; object-fit: cover;
}
#cards-grid.album .card-photo-banner .card-photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 35%, rgba(0,0,0,0) 65%);
}
/* Kaarten zonder foto: groene achtergrond */
#cards-grid.album .batch-card .card-album-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--primary), #556b2c);
  z-index: 0;
}
/* Info onderaan */
#cards-grid.album .card-album-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0.6rem 0.75rem; z-index: 3; color: white;
}
#cards-grid.album .card-album-name {
  font-family: var(--font-display); font-size: 0.85rem;
  font-weight: 700; line-height: 1.2; margin-bottom: 2px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
#cards-grid.album .card-album-cat {
  font-size: 0.6rem; opacity: 0.85;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
/* Actieknoppen album */
#cards-grid.album .card-album-actions {
  position: absolute; top: 0.5rem; right: 0.5rem;
  display: flex; flex-direction: column; gap: 0.3rem; z-index: 4;
}
#cards-grid.album .album-action-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,0.5); border: none;
  color: white; cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); transition: background 0.18s;
  -webkit-backdrop-filter: blur(6px);
}
#cards-grid.album .album-action-btn:hover { background: rgba(0,0,0,0.7); }
/* Verberg alles behalve foto en album-specifieke elementen */
#cards-grid.album .card-body,
#cards-grid.album .card-actions,
#cards-grid.album .card-accent { display: none !important; }


/* ── Stock badges ────────────────────────────────────────────── */
.stock-badge {
  font-size:0.6rem; font-weight:600;
  background:var(--bg); border:1px solid var(--border);
  color:var(--text-soft); border-radius:4px; padding:1px 5px;
}
.stock-badge.green { background:rgba(107,122,58,0.1); color:var(--green); border-color:rgba(107,122,58,0.2); }
.stock-badge.blue  { background:rgba(59,100,200,0.08); color:#3d5226; border-color:rgba(59,100,200,0.2); }
.stock-urban { border-left:3px solid var(--green) !important; }


/* ── Tuin tab ────────────────────────────────────────────────── */
.tuin-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:0.6rem; }
@media(min-width:480px){.tuin-grid{grid-template-columns:repeat(3,1fr);}}

/* Tuin kaart — portret fotokaart */
.tuin-card {
  position:relative; border-radius:14px; overflow:hidden;
  aspect-ratio:3/4; cursor:pointer;
  box-shadow:0 4px 16px rgba(0,0,0,0.15); transition:all 0.2s;
  background:linear-gradient(135deg,var(--primary),#556b2c);
}
.tuin-card:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(0,0,0,0.2); }
.tuin-card-done { opacity:0.65; }

.tuin-photo { position:absolute; inset:0; }
.tuin-photo img { width:100%; height:100%; object-fit:cover; display:block; }
.tuin-photo-placeholder {
  position:absolute; inset:0;
  background:linear-gradient(135deg,var(--primary),#556b2c);
  display:flex; align-items:center; justify-content:center;
  font-size:3.5rem;
}

/* Verloop onderaan voor tekst */
.tuin-card::after {
  content:''; position:absolute; inset:0;
  background:linear-gradient(to top,rgba(0,0,0,0.82) 40%,rgba(0,0,0,0) 70%);
  z-index:1; pointer-events:none;
}

.tuin-info {
  position:absolute; bottom:0; left:0; right:0;
  padding:0.6rem 0.7rem; z-index:2; color:white;
}
.tuin-name {
  font-family:var(--font-display); font-size:0.9rem;
  font-weight:700; line-height:1.2; margin-bottom:2px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  text-shadow:0 1px 3px rgba(0,0,0,0.4);
}
.tuin-meta { font-size:0.62rem; opacity:0.85; margin-bottom:3px; }
.tuin-badges { display:flex; flex-wrap:wrap; gap:0.2rem; margin-bottom:0; }
.tuin-days { display:none; }

.tuin-actions {
  position:absolute; top:0.5rem; right:0.5rem;
  display:flex; flex-direction:column; gap:0.3rem; z-index:3;
}
.tuin-btn {
  width:34px; height:34px; border-radius:50%;
  border:none; background:rgba(0,0,0,0.45);
  cursor:pointer; font-size:1rem; color:white;
  display:flex; align-items:center; justify-content:center;
  backdrop-filter:blur(4px); transition:background 0.15s;
}
.tuin-btn:hover { background:rgba(0,0,0,0.7); }
.tuin-btn-next { font-size:0.8rem; font-weight:700; }


/* ── Voorraad weergave: compact ─────────────────────────────── */
#stock-container.stock-compact .stock-item {
  padding: 0.4rem 0.6rem;
}
#stock-container.stock-compact .stock-photo {
  width: 38px; height: 38px;
}
#stock-container.stock-compact .stock-photo-placeholder {
  width: 38px; height: 38px; font-size: 1rem;
}
#stock-container.stock-compact .stock-item-meta,
#stock-container.stock-compact .stock-verbruikt-btn { 
  display: none; 
}
#stock-container.stock-compact .stock-item-name {
  font-size: 0.82rem;
}

/* ── Voorraad weergave: foto/groot ───────────────────────────── */
#stock-container.stock-large {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
#stock-container.stock-large .stock-item {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
}
#stock-container.stock-large .stock-photo {
  width: 100%; height: 120px;
  border-radius: 0;
}
#stock-container.stock-large .stock-photo img { 
  width: 100%; height: 100%; object-fit: cover; 
}
#stock-container.stock-large .stock-photo-placeholder,
#stock-container.stock-large .stock-logo {
  width: 100%; height: 80px; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
#stock-container.stock-large .stock-logo img {
  width: 100%; height: 100%; object-fit: contain; padding: 0.5rem;
}
#stock-container.stock-large .stock-item-info {
  padding: 0.5rem 0.6rem;
}
#stock-container.stock-large .stock-item-name {
  font-size: 0.85rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
#stock-container.stock-large > div > div:last-child { 
  display: none; 
}


/* ── App loader ──────────────────────────────────────────────── */
#app-loader {
  position:fixed; inset:0; background:var(--bg);
  z-index:150; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:1rem;
  transition: opacity 0.4s;
}
#app-loader img { width:72px; height:72px; object-fit:contain; animation:loaderPulse 1.4s ease-in-out infinite; }
@keyframes loaderPulse { 0%,100%{transform:scale(1);opacity:1;} 50%{transform:scale(0.85);opacity:0.6;} }
.loader-text { font-family:var(--font-display); font-size:1.1rem; font-weight:700; color:var(--primary); }
.loader-dots { display:flex; gap:6px; }
.loader-dots span { width:8px; height:8px; border-radius:50%; background:var(--primary); animation:loaderDot 1.2s infinite; }
.loader-dots span:nth-child(2){animation-delay:0.2s;}
.loader-dots span:nth-child(3){animation-delay:0.4s;}
@keyframes loaderDot { 0%,60%,100%{transform:translateY(0);opacity:0.4;} 30%{transform:translateY(-6px);opacity:1;} }


.card-ai-tip {
  display:flex; align-items:center; gap:0.4rem;
  margin:0 0.6rem 0.4rem;
  background:rgba(212,168,67,0.08);
  border:1px solid rgba(212,168,67,0.25);
  border-radius:8px; padding:0.35rem 0.6rem;
  font-size:0.68rem; color:var(--primary);
  cursor:pointer; line-height:1.4; transition:all 0.18s;
}
.card-ai-tip:hover { background:rgba(212,168,67,0.15); }
.card-ai-tip span { flex:1; }
.card-ai-tip img { border-radius:50%; opacity:0.9; }
.card-ai-tip-urgent {
  background:rgba(229,57,53,0.06);
  border-color:rgba(229,57,53,0.25);
  color:#c0392b;
}


.status-tag-tuin { background:rgba(76,175,80,0.12); color:#6b7a3a; border-color:rgba(76,175,80,0.3); }
.status-tag-tuin .cat-tag-pulse { background:#6b7a3a; }

/* ═══ ROOTSFOOD DESIGN SYSTEM V3 — RESTYLE LAYER ═══════════════════════
   Earthy editorial × handmade retro. Sticker-esthetiek: inkt-randen +
   harde offset-schaduwen, Bricolage display, Instrument Serif accenten,
   Caveat voor handgeschreven details. */

/* Sticker-kaarten: inktrand + harde schaduw, hover = "indrukken" */
.batch-card,
.stat-card,
.list-item,
.module-select-card {
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}
.batch-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translate(-2px, -2px);
}
.batch-card:active,
.module-select-card:active {
  box-shadow: 1px 1px 0 rgba(26,26,14,0.16);
  transform: translate(2px, 2px);
}
.module-select-card.selected {
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--gold);
}
.module-select-card.coming-soon { border-color: var(--border); box-shadow: none; }

/* Knoppen als stickers */
.btn-primary,
.btn-gold {
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-primary:hover, .btn-gold:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.btn-primary:active, .btn-gold:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-outline { border-width: 2px; }

/* FAB: mustard sticker */
.fab {
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
}
.fab:hover { transform: scale(1.06) rotate(45deg); box-shadow: 5px 5px 0 var(--ink); }

/* Typografie-accenten */
.section-title { font-weight: 800; letter-spacing: -0.02em; }
.section-title small {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--green);
}
.auth-logo-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: none;
}
.stat-value { font-weight: 800; }
.stat-label { font-family: var(--font-mono); letter-spacing: 0.1em; }

/* Tab bar: dikkere forest-onderstreping */
.tab-btn { border-bottom-width: 3px; }
.tab-btn.active { font-weight: 700; }

/* Modal-sheet met inktrand */
.modal-sheet {
  border: 2px solid var(--ink);
  border-bottom: none;
  box-shadow: 0 -4px 0 rgba(26,26,14,0.14);
}
.modal-handle { background: var(--ink); opacity: 0.35; }

/* Toast als inkt-sticker */
.toast {
  background: var(--ink);
  border: 2px solid var(--gold);
  box-shadow: 3px 3px 0 rgba(212,168,67,0.55);
}

/* Toegankelijkheid: zichtbare focus + reduced motion */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── RootsFood categorie-dropdown + teller (lijstweergave) ────────── */
.list-cat-row{display:flex;gap:0.5rem;flex-wrap:wrap;align-items:center;}
.cat-sel{height:34px;padding:0 1.8rem 0 0.7rem;border-radius:var(--radius-sm);border:1.5px solid var(--border);background:var(--bg-card);font-size:0.78rem;font-weight:600;color:var(--text);cursor:pointer;appearance:none;max-width:240px;box-shadow:var(--shadow);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233d5226' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 0.55rem center;background-size:13px;}
.cat-sel:focus{border-color:var(--green);outline:none;}
.rf-count{font-size:0.72rem;font-weight:800;letter-spacing:0.02em;color:var(--primary);white-space:nowrap;margin-left:auto;background:var(--gold-light);border:1.5px solid rgba(212,168,67,0.5);border-radius:100px;padding:0.25rem 0.7rem;}

/* ── Urban Roots — Zaai / Onderhoud / Oogst kalender ──────────────── */
.rf-kal{background:var(--bg-card);border:1.5px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:0.85rem;margin-bottom:0.75rem;}
.rf-kal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:0.5rem;margin-bottom:0.65rem;}
.rf-kal-eyebrow{font-size:0.6rem;font-weight:800;letter-spacing:0.1em;text-transform:uppercase;color:var(--text-soft);}
.rf-kal-title{font-family:var(--font-display);font-size:1.15rem;font-weight:700;color:var(--primary);line-height:1.1;}
.rf-kal-link{font-size:0.7rem;font-weight:800;color:var(--green);text-decoration:none;white-space:nowrap;flex-shrink:0;}
.rf-kal-link:hover{text-decoration:underline;}
.rf-kal-months{display:grid;grid-template-columns:repeat(6,1fr);gap:3px;margin-bottom:0.8rem;}
@media(min-width:480px){.rf-kal-months{grid-template-columns:repeat(12,1fr);}}
.kal-m{height:30px;border:1.5px solid var(--border);background:var(--bg);border-radius:7px;font-size:0.68rem;font-weight:700;color:var(--text-soft);cursor:pointer;transition:all 0.15s;padding:0;}
.kal-m:hover:not(.active){border-color:var(--primary);color:var(--primary);transform:translateY(-1px);}
.kal-m.active{background:var(--primary);color:#fff;border-color:var(--primary);}
.kal-m.kal-now:not(.active){border-color:var(--gold);color:var(--gold);background:rgba(212,168,67,0.08);}
.rf-kal-cols{display:grid;grid-template-columns:1fr;gap:0.5rem;}
@media(min-width:560px){.rf-kal-cols{grid-template-columns:repeat(3,1fr);}}
.rf-kal-col{background:var(--bg);border:1.5px solid var(--border);border-radius:var(--radius-sm);padding:0.6rem 0.65rem;}
.rf-kal-col-h{font-family:var(--font-display);font-size:0.85rem;font-weight:700;margin-bottom:0.4rem;color:var(--primary);}
.rf-kal-col ul{list-style:none;margin:0;padding:0;}
.rf-kal-col li{font-size:0.75rem;line-height:1.5;color:var(--text);padding-left:0.85rem;position:relative;margin-bottom:0.15rem;}
.rf-kal-col li::before{content:'';position:absolute;left:0;top:0.52em;width:5px;height:5px;border-radius:50%;background:currentColor;opacity:0.45;}
.rf-kal-zaai{border-left:4px solid var(--green);}
.rf-kal-ond{border-left:4px solid var(--gold);}
.rf-kal-oogst{border-left:4px solid var(--burgundy);}
.rf-kal-foot{font-size:0.72rem;color:var(--text-soft);margin-top:0.65rem;padding-top:0.5rem;border-top:1px dashed var(--border);}
/* ── Kaarten ⇄ Lijst schakelaar (RootsFood-archiefstijl) ── */
.rf-viewswitch{display:flex;gap:3px;background:var(--bg);border:1.5px solid var(--border);border-radius:100px;padding:3px;margin-bottom:0.6rem;box-shadow:var(--shadow);}
.rf-vs{flex:1;height:34px;border:none;background:transparent;border-radius:100px;font-family:var(--font-display);font-size:0.8rem;font-weight:700;color:var(--text-soft);cursor:pointer;transition:all 0.18s;}
.rf-vs.active{background:var(--primary);color:#fff;}
.rf-vs:hover:not(.active){color:var(--primary);}
/* ── Lijst: groepering per categorie + logo ── */
.list-group{margin-bottom:1.1rem;}
.list-group-head{display:flex;align-items:center;gap:0.6rem;padding:0.35rem 0.15rem 0.5rem;border-bottom:2px solid var(--border);margin-bottom:0.6rem;}
.list-group-logo{width:34px;height:34px;object-fit:contain;flex-shrink:0;filter:drop-shadow(0 1px 3px rgba(0,0,0,0.12));}
.list-group-emoji{width:34px;height:34px;display:flex;align-items:center;justify-content:center;font-size:1.25rem;background:var(--gold-light);border-radius:9px;flex-shrink:0;}
.list-group-name{font-family:var(--font-display);font-size:1rem;font-weight:700;color:var(--primary);flex:1;min-width:0;}
.list-group-count{font-size:0.72rem;font-weight:800;color:var(--text-soft);background:var(--bg);border:1.5px solid var(--border);border-radius:100px;padding:0.15rem 0.6rem;}
.list-group-items{display:flex;flex-direction:column;}
/* ── Helpdesk ─────────────────────────────────────────────── */
.help-search{width:100%;height:42px;padding:0 0.9rem;border:1.5px solid var(--border);border-radius:var(--radius-sm);background:var(--bg);font-family:inherit;font-size:0.85rem;color:var(--text);margin-bottom:0.75rem;}
.help-search:focus{outline:none;border-color:var(--green);}
.help-item{border:1.5px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-card);margin-bottom:0.45rem;overflow:hidden;}
.help-q{width:100%;display:flex;align-items:center;gap:0.6rem;padding:0.7rem 0.8rem;background:none;border:none;font-family:var(--font-display);font-size:0.88rem;font-weight:700;color:var(--primary);text-align:left;cursor:pointer;}
.help-q:hover{background:var(--bg);}
.help-q-ico{width:26px;height:26px;display:flex;align-items:center;justify-content:center;background:var(--gold-light);border-radius:7px;font-size:0.9rem;flex-shrink:0;}
.help-q-arrow{margin-left:auto;font-size:0.7rem;color:var(--text-soft);transition:transform 0.2s;}
.help-item.open .help-q-arrow{transform:rotate(90deg);}
.help-a{display:none;padding:0 0.8rem 0.8rem 0.8rem;font-size:0.82rem;line-height:1.6;color:var(--text);}
.help-item.open .help-a{display:block;}
.help-a b{color:var(--primary);}
.help-a ol,.help-a ul{margin:0.4rem 0 0.4rem 1.1rem;padding:0;}
.help-a li{margin-bottom:0.25rem;}
.help-empty{text-align:center;padding:1.5rem 1rem;color:var(--text-soft);font-size:0.82rem;}
.help-foot{margin-top:0.75rem;padding-top:0.75rem;border-top:1px dashed var(--border);font-size:0.78rem;color:var(--text-soft);text-align:center;}
.help-foot a{color:var(--green);font-weight:700;text-decoration:none;}
