/* ===== APP HEADER ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 15, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.app-header-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--sp-4);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.app-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.app-logo-icon { font-size: 24px; line-height: 1; }
.app-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  color: var(--color-text);
}
.app-logo-text span {
  color: var(--color-saffron);
}

.app-header-search {
  flex: 1;
  max-width: 400px;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: var(--sp-3);
  font-size: 14px;
  color: var(--color-text-dim);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: var(--sp-2) var(--sp-3) var(--sp-2) 36px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  color: var(--color-text);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.search-input::placeholder { color: var(--color-text-dim); }
.search-input:focus { border-color: var(--color-saffron); background: var(--color-surface-3); outline: none; }

.app-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}
.app-nav-link {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.app-nav-link:hover { color: var(--color-text); background: var(--color-surface-2); }
.app-nav-link.active { color: var(--color-saffron); background: var(--color-saffron-soft); }

@media (max-width: 680px) {
  .app-nav { display: none; }
  .app-header-search { max-width: none; }
}

/* ===== MOBILE TAB BAR ===== */
.app-tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 15, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--color-border);
  padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 680px) {
  .app-tabbar { display: block; }
  .app-main { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); }
}

.app-tabbar-inner {
  display: flex;
  align-items: stretch;
  height: var(--tabbar-h);
}

.app-tabbar-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-dim);
  transition: color var(--dur-fast);
  padding: var(--sp-2) 0;
}
.app-tabbar-btn:hover { color: var(--color-text-muted); }
.app-tabbar-btn.active { color: var(--color-saffron); }
.app-tabbar-btn .tab-icon { font-size: 20px; line-height: 1; }

.app-tabbar-btn.center-btn {
  flex: 1.2;
}
.tab-fab {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient-saffron);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-saffron);
  transition: transform var(--dur-fast) var(--ease-spring);
}
.app-tabbar-btn.center-btn:hover .tab-fab { transform: scale(1.08); }
.app-tabbar-btn.center-btn.open .tab-fab {
  transform: rotate(45deg) scale(1.05);
  background: var(--color-surface-3);
  box-shadow: none;
}

/* ===== FAB ACTION MENU ===== */
.fab-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.fab-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: all;
  animation: fadeIn 0.15s ease;
}

.fab-menu {
  position: absolute;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--sp-4));
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface-1);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  min-width: 220px;
  overflow: hidden;
  pointer-events: all;
  animation: slideUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.fab-menu-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  transition: background var(--dur-fast);
  border-bottom: 1px solid var(--color-border);
}
.fab-menu-item:last-child { border-bottom: none; }
.fab-menu-item:hover { background: var(--color-surface-2); }
.fab-menu-item:active { background: var(--color-surface-3); }
.fab-menu-icon { font-size: 1.25rem; line-height: 1; width: 1.5rem; text-align: center; }

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===== MAIN CONTENT ===== */
.app-main {
  flex: 1;
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-4);
}

/* ===== CARDS ===== */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med), box-shadow var(--dur-med);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

/* ===== RECIPE CARD ===== */
.recipe-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med), box-shadow var(--dur-med);
  display: flex;
  flex-direction: column;
}
.recipe-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}
.recipe-card:active { transform: translateY(-1px); }

.recipe-card-hero {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-2);
  font-size: 2.5rem;
  position: relative;
  overflow: hidden;
}
.recipe-card-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  filter: url(#noise);
  pointer-events: none;
  opacity: 0.5;
}

.recipe-card-body {
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}

.recipe-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.recipe-card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.recipe-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--sp-2);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px var(--sp-2);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.badge-carb-low { background: var(--color-sage-soft); color: var(--color-sage); border: 1px solid rgba(111,191,159,0.2); }
.badge-carb-mid { background: var(--color-saffron-soft); color: var(--color-saffron); border: 1px solid rgba(244,162,97,0.2); }
.badge-carb-high { background: var(--color-coral-soft); color: var(--color-coral); border: 1px solid rgba(231,111,81,0.2); }

.badge-time { background: var(--color-surface-2); color: var(--color-text-muted); border: 1px solid var(--color-border); }

.badge-split { cursor: default; }
.badge-split-pasta { background: var(--color-split-pasta-soft); color: var(--color-split-pasta); border: 1px solid rgba(184,169,224,0.2); }
.badge-split-rijst { background: var(--color-split-rijst-soft); color: var(--color-split-rijst); border: 1px solid rgba(123,167,196,0.2); }
.badge-split-other { background: var(--color-split-other-soft); color: var(--color-split-other); border: 1px solid rgba(244,162,97,0.2); }

.badge-category { background: var(--color-surface-3); color: var(--color-text-muted); border: 1px solid var(--color-border); }

.badge-oven { background: var(--color-coral-soft); color: var(--color-coral); border: 1px solid rgba(231,111,81,0.2); }

/* ===== STAR RATING ===== */
.star-rating {
  display: flex;
  gap: 2px;
}
.star-rating .star {
  font-size: 16px;
  cursor: pointer;
  color: var(--color-text-dim);
  transition: color var(--dur-fast), transform var(--dur-fast) var(--ease-spring);
  line-height: 1;
}
.star-rating .star.filled { color: var(--color-saffron); }
.star-rating .star:hover { transform: scale(1.2); }
.star-rating.readonly .star { cursor: default; pointer-events: none; }
.star-rating.readonly .star:hover { transform: none; }

/* ===== HEART BUTTON ===== */
.heart-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--color-text-dim);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  transition: color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast) var(--ease-spring);
}
.heart-btn:hover { color: var(--color-coral); background: var(--color-surface-3); }
.heart-btn.active { color: var(--color-coral); background: var(--color-coral-soft); border-color: rgba(231,111,81,0.3); }
.heart-btn:active { transform: scale(0.9); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
}
.btn:disabled { opacity: 0.5; pointer-events: none; }

.btn-primary {
  background: var(--gradient-saffron);
  color: #0A0F14;
  box-shadow: 0 2px 8px rgba(244, 162, 97, 0.3);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(244, 162, 97, 0.45); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover { background: var(--color-surface-3); border-color: var(--color-border-strong); }

.btn-sage {
  background: var(--gradient-sage);
  color: #0A0F14;
}
.btn-sage:hover { box-shadow: 0 4px 16px rgba(111, 191, 159, 0.35); transform: translateY(-1px); }

.btn-ghost {
  color: var(--color-text-muted);
}
.btn-ghost:hover { color: var(--color-text); background: var(--color-surface-2); }

.btn-danger {
  background: var(--color-coral-soft);
  color: var(--color-coral);
  border: 1px solid rgba(231,111,81,0.3);
}
.btn-danger:hover { background: rgba(231,111,81,0.2); }

.btn-sm { padding: var(--sp-1) var(--sp-3); font-size: var(--fs-xs); border-radius: var(--radius-sm); }
.btn-lg { padding: var(--sp-3) var(--sp-6); font-size: var(--fs-body); border-radius: var(--radius-lg); }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }

/* ===== FORM ELEMENTS ===== */
.form-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.form-label { font-size: var(--fs-sm); font-weight: 600; color: var(--color-text); }
.form-hint { font-size: var(--fs-xs); color: var(--color-text-dim); }
.form-error { font-size: var(--fs-xs); color: var(--color-danger); }

.input, .textarea, .select {
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: var(--fs-sm);
  transition: border-color var(--dur-fast), background var(--dur-fast);
  width: 100%;
}
.input::placeholder, .textarea::placeholder { color: var(--color-text-dim); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--color-saffron);
  background: var(--color-surface-3);
  outline: none;
}
.textarea { resize: vertical; min-height: 80px; }
.select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239AA8B8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--sp-4);
  animation: fade-in var(--dur-fast) var(--ease-out);
}
@media (min-width: 480px) {
  .modal-overlay { align-items: center; }
}

.modal {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  padding: var(--sp-6);
  width: 100%;
  max-width: 440px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slide-up var(--dur-med) var(--ease-out);
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h3);
  color: var(--color-text);
  margin-bottom: var(--sp-2);
}
.modal-body { color: var(--color-text-muted); font-size: var(--fs-sm); line-height: var(--lh-normal); }
.modal-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); justify-content: flex-end; }

/* ===== TOAST ===== */
.toast-root {
  position: fixed;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--sp-3));
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  align-items: center;
  pointer-events: none;
  width: min(calc(100% - 32px), 400px);
}
@media (min-width: 680px) {
  .toast-root { bottom: var(--sp-5); }
}

.toast {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text);
  box-shadow: var(--shadow-lg);
  animation: slide-up var(--dur-med) var(--ease-out);
  pointer-events: auto;
  width: 100%;
  text-align: center;
  border: 1px solid var(--color-border-strong);
}
.toast-success { background: var(--color-surface-2); border-color: rgba(111,191,159,0.3); }
.toast-success::before { content: '✓ '; color: var(--color-sage); }
.toast-error { background: var(--color-surface-2); border-color: rgba(231,111,81,0.3); }
.toast-error::before { content: '✕ '; color: var(--color-coral); }
.toast-info { background: var(--color-surface-2); }

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-9) var(--sp-5);
  gap: var(--sp-3);
}
.empty-state-icon { font-size: 3rem; line-height: 1; }
.empty-state-title { font-family: var(--font-display); font-weight: 800; color: var(--color-text); }
.empty-state p { max-width: 280px; }

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--color-text);
}

/* ===== RECIPE GRID ===== */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-4);
}
@media (max-width: 400px) {
  .recipe-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
}

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
  align-items: center;
}
.filter-chip {
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--dur-fast);
  white-space: nowrap;
}
.filter-chip:hover { border-color: var(--color-border-strong); color: var(--color-text); }
.filter-chip.active { background: var(--color-saffron-soft); border-color: rgba(244,162,97,0.3); color: var(--color-saffron); }

/* ===== SPLIT SECTION ===== */
.split-toggle-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast);
  text-align: left;
}
.split-toggle-btn:hover { background: var(--color-surface-3); border-color: var(--color-border-strong); }
.split-toggle-btn.open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: none; }
.split-toggle-label { flex: 1; font-size: var(--fs-sm); font-weight: 600; color: var(--color-text); }
.split-toggle-arrow { font-size: var(--fs-xs); color: var(--color-text-dim); transition: transform var(--dur-med) var(--ease-out); }
.split-toggle-btn.open .split-toggle-arrow { transform: rotate(180deg); }

.split-section {
  border: 1px solid var(--color-border);
  border-top: none;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  overflow: hidden;
  display: none;
}
.split-section.open { display: block; animation: fade-in var(--dur-fast) var(--ease-out); }
.split-section-inner { padding: var(--sp-4); background: var(--color-surface-1); }

/* ===== STEP TIMER ===== */
.step-item {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--color-border);
}
.step-item:last-child { border-bottom: none; }
.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-saffron-soft);
  color: var(--color-saffron);
  font-size: var(--fs-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-body { flex: 1; }
.step-text { font-size: 1.125rem; color: var(--color-text); line-height: var(--lh-normal); }
.step-timer-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--sp-2);
  padding: 3px var(--sp-2);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  background: var(--color-saffron-soft);
  color: var(--color-saffron);
  border: 1px solid rgba(244,162,97,0.2);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.step-timer-btn:hover { background: rgba(244,162,97,0.2); }
.step-timer-btn.running { background: rgba(231,111,81,0.15); color: var(--color-coral); border-color: rgba(231,111,81,0.3); }
.step-timer-group {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  margin-top: var(--sp-2);
}
.step-timer-reset-btn {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: rgba(244,162,97,0.1);
  color: var(--color-saffron);
  border: 1px solid rgba(244,162,97,0.2);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast);
}
.step-timer-reset-btn:hover { background: rgba(244,162,97,0.2); }
.step-timer-display {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-saffron);
  min-width: 48px;
  display: inline-block;
}

/* ===== WEEK GRID ===== */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--sp-3);
  overflow-x: auto;
  padding-bottom: var(--sp-2);
}
@media (max-width: 800px) {
  .week-grid { grid-template-columns: 1fr; }
}

.week-day-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-3);
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  transition: border-color var(--dur-fast);
}
.week-day-today {
  border-color: rgba(244, 162, 97, 0.35);
  background: linear-gradient(180deg, rgba(244,162,97,0.07) 0%, #141B23 60%);
}

/* Card header: day name left, date right */
.week-day-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-1);
}
.week-day-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.week-day-today .week-day-label { color: var(--color-saffron); }
.week-day-date {
  font-size: 12px;
  color: var(--color-text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Body: vertical on desktop (cards are narrow), horizontal on mobile */
.week-day-body { display: flex; flex-direction: column; gap: var(--sp-1); }
.week-day-emoji { font-size: 1.4rem; line-height: 1; }
.week-day-info { min-width: 0; }
.week-day-recipe-name {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  cursor: pointer;
  transition: color var(--dur-fast);
}
.week-day-recipe-name:hover { color: var(--color-saffron); }

/* Badges: row layout, auto-sized (nooit gestretcht) */
.week-day-meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: var(--sp-1);
}

/* Split toggle */
.week-split-toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: var(--sp-1);
}

/* Empty day */
.week-day-empty {
  color: var(--color-text-dim);
  font-size: var(--fs-xs);
  padding: var(--sp-1) 0;
}

/* Placeholder day */
.week-day-placeholder {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) 0;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-style: italic;
}
.week-day-placeholder-icon { font-size: 1.1rem; flex-shrink: 0; }
.week-day-placeholder-text { font-weight: 500; }

/* Day action buttons */
.week-day-actions {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.week-day-actions .btn { font-size: 12px; }

/* ===== WEEK DAY CARD — MOBIEL (1 kolom, volle breedte) ===== */
@media (max-width: 800px) {
  .week-day-card { padding: var(--sp-4); gap: var(--sp-3); }

  .week-day-label { font-size: var(--fs-sm); }

  /* Horizontaal: emoji links, info rechts */
  .week-day-body {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--sp-3);
  }
  .week-day-emoji { font-size: 2rem; flex-shrink: 0; padding-top: 2px; }
  .week-day-info { flex: 1; }

  .week-day-recipe-name { font-size: var(--fs-body); }

  .week-day-meta { margin-top: var(--sp-2); gap: var(--sp-1); }

  .week-split-toggle { font-size: var(--fs-sm); margin-top: var(--sp-2); }

  .week-swap-btn { font-size: var(--fs-xs); }
}

/* ===== SWAP PICKER MODAL ===== */
.swap-recipe-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  background: var(--color-surface-1);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: background 120ms, border-color 120ms;
}
.swap-recipe-row:hover {
  background: var(--color-surface-2);
  border-color: var(--color-border);
}
.swap-recipe-row--active {
  border-color: var(--color-sage);
  background: rgba(111,191,159,0.08);
}
.swap-recipe-emoji {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}
.swap-recipe-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.swap-recipe-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.swap-recipe-meta {
  font-size: 13px;
  color: var(--color-text-dim);
}

/* ===== INGREDIENT LIST ===== */
.ingredient-group { display: flex; flex-direction: column; gap: var(--sp-1); margin-bottom: var(--sp-3); }
.ingredient-group:last-child { margin-bottom: 0; }
.ingredient-group-label {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding-bottom: var(--sp-1);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--sp-1);
}
.ingredient-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.ingredient-item {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-size: 1.125rem;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--color-border);
}
.ingredient-item:last-child { border-bottom: none; }
.ingredient-amount { font-weight: 600; color: var(--color-saffron); min-width: 60px; flex-shrink: 0; }
.ingredient-name { color: var(--color-text); flex: 1; }
.ingredient-extra { color: var(--color-text-dim); font-size: 1rem; }

/* ===== SCALE CONTROL ===== */
.scale-control {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: var(--sp-1) var(--sp-2);
}
.scale-control .scale-label { font-size: var(--fs-xs); color: var(--color-text-dim); white-space: nowrap; }
.scale-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-surface-3);
  color: var(--color-text);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast);
}
.scale-btn:hover { background: var(--color-saffron-soft); color: var(--color-saffron); }
.scale-value { font-weight: 700; font-size: var(--fs-sm); color: var(--color-text); min-width: 20px; text-align: center; }

/* ===== PROGRESS / LOADING INLINE ===== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-saffron);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== BRING STATUS ===== */
.bring-status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.bring-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-dim);
}
.bring-dot.online { background: var(--color-sage); box-shadow: 0 0 6px var(--color-sage-glow); }
.bring-dot.offline { background: var(--color-coral); }

/* ===== BRING PREVIEW MODAL ITEMS ===== */
.bring-preview-item {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  margin-bottom: 4px;
}
.bring-preview-new {
  background: rgba(111, 191, 159, 0.12);
  color: var(--color-text);
  border: 1px solid rgba(111, 191, 159, 0.25);
}
.bring-preview-exists {
  background: var(--color-surface-2);
  color: var(--color-text-dim);
  text-decoration: line-through;
  opacity: 0.6;
}

/* ===== BRING MODAL INTERACTIVE ===== */
.modal-dialog {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  padding: var(--sp-5);
  width: 100%;
  max-width: 440px;
  max-height: 82vh;
  overflow-y: auto;
  animation: slide-up var(--dur-med) var(--ease-out);
}
.modal-dialog--wide { max-width: 480px; }
.bring-modal-section { margin-bottom: var(--sp-4); }
.bring-modal-section-label {
  font-size: var(--fs-xs);
  color: var(--color-text-dim);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.bring-modal-store-label {
  font-size: var(--fs-sm);
  color: var(--color-saffron);
  font-weight: 700;
  margin: var(--sp-3) 0 var(--sp-2);
  padding-bottom: var(--sp-1);
  border-bottom: 1px solid var(--color-border);
}
.bring-modal-cat-label {
  font-size: var(--fs-xs);
  color: var(--color-text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: var(--sp-2) 0 var(--sp-1) 0;
  padding: 2px var(--sp-2);
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  display: inline-block;
}
.bring-modal-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.bring-modal-row--inlist { opacity: 0.75; }
.bring-modal-check-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 1;
  cursor: pointer;
  font-size: var(--fs-sm);
}
.bring-modal-name { flex: 1; }
.bring-modal-name--skip { opacity: 0.4; text-decoration: line-through; }
.bring-modal-name--exists { color: var(--color-text-dim); }
.bring-modal-tag {
  font-size: 12px;
  background: rgba(111,191,159,0.15);
  color: var(--color-sage);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: var(--sp-1);
  vertical-align: middle;
}
.bring-modal-spec {
  width: 90px;
  padding: 3px 8px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: var(--fs-xs);
}
.bring-modal-existing-spec {
  font-size: var(--fs-xs);
  color: var(--color-text-dim);
  margin-left: var(--sp-1);
}
.bring-modal-inlist-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: 1;
  flex-wrap: wrap;
}
.bring-modal-check-label--remove {
  opacity: 0.6;
  margin-left: auto;
}
.bring-modal-addqty-label {
  font-size: var(--fs-xs);
  color: var(--color-sage);
  font-weight: 600;
  white-space: nowrap;
}
.bring-modal-reexport-warning {
  font-size: var(--fs-xs);
  color: var(--color-warning);
  background: rgba(244,162,97,0.1);
  border: 1px solid rgba(244,162,97,0.2);
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-3);
}

/* ===== SHOPPING PREVIEW ===== */
.shop-preview { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.shop-store-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-dim);
  margin-bottom: var(--sp-2);
}
.shop-item-list { display: flex; flex-direction: column; gap: var(--sp-1); }
.shop-item {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  padding: 2px 0;
  border-bottom: 1px solid var(--color-border);
}
.shop-item strong { color: var(--color-text); }
