/* ============================================================
   Recipe App — Main Stylesheet
   Uses CSS custom properties for theming
   ============================================================ */

:root {
  --color-primary: #e07b39;
  --color-primary-dark: #c4622a;
  --color-primary-light: #f5a97a;
  --color-secondary: #3d7a5c;
  --color-bg: #faf8f5;
  --color-bg-card: #ffffff;
  --color-bg-hover: #f5ede3;
  --color-text: #2c2c2c;
  --color-text-muted: #6b6b6b;
  --color-border: #e0d8cc;
  --color-success: #3d7a5c;
  --color-error: #c0392b;
  --color-warning: #d4830a;
  --color-info: #2471a3;
  --color-tried: #3d7a5c;
  --color-to-try: #e07b39;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ============================================================
   Utilities
   ============================================================ */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.7rem 1.5rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--color-primary-dark); }
.btn-secondary { background: var(--color-secondary); color: #fff; }
.btn-secondary:hover:not(:disabled) { background: #2e5e44; }
.btn-outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover:not(:disabled) { background: var(--color-bg-hover); }
.btn-ghost { background: transparent; color: var(--color-text-muted); border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--color-bg-hover); color: var(--color-text); }
.btn-danger { background: var(--color-error); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #a93226; }
.btn-success { background: var(--color-success); color: #fff; }

/* ============================================================
   Alerts
   ============================================================ */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  border-left: 4px solid transparent;
}
.alert-error { background: #fde8e6; border-color: var(--color-error); color: var(--color-error); }
.alert-success { background: #e6f5ec; border-color: var(--color-success); color: var(--color-success); }
.alert-warning { background: #fef3d8; border-color: var(--color-warning); color: var(--color-warning); }
.alert-info { background: #e1eef7; border-color: var(--color-info); color: var(--color-info); }

/* ============================================================
   Forms
   ============================================================ */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.875rem; margin-bottom: 0.35rem; color: var(--color-text); }
.form-group small { display: block; color: var(--color-text-muted); font-size: 0.78rem; margin-top: 0.25rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="number"], input[type="date"], textarea, select {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  background: #fff;
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(224, 123, 57, 0.18);
}
textarea { resize: vertical; min-height: 100px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.navbar-brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; flex-shrink: 0; }
.navbar-logo { font-size: 1.5rem; }
.navbar-title { font-weight: 700; font-size: 1.05rem; color: var(--color-text); }
.navbar-nav { display: flex; list-style: none; gap: 0.25rem; flex: 1; }
.nav-link {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--color-bg-hover); color: var(--color-text); }
.nav-link.active { background: var(--color-bg-hover); color: var(--color-primary); font-weight: 600; }
.navbar-user { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.navbar-username { font-size: 0.875rem; color: var(--color-text-muted); }
.navbar-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 0.25rem; }

@media (max-width: 768px) {
  .navbar-nav { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--color-bg-card); flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-md); z-index: 99; }
  .navbar-nav.open { display: flex; }
  .navbar-toggle { display: block; }
  .navbar-user { gap: 0.5rem; }
  .navbar-username { display: none; }
}

/* ============================================================
   Page Layout
   ============================================================ */
.page-content { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }
@media (max-width: 600px) { .page-content { padding: 1.25rem 1rem; } }

.page-header { margin-bottom: 1.75rem; }
.page-header h2 { font-size: 1.6rem; font-weight: 700; }
.page-header p { color: var(--color-text-muted); margin-top: 0.25rem; }

/* ============================================================
   Login Screen
   ============================================================ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fdf1e8 0%, #faf8f5 100%);
  padding: 2rem;
}
.login-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.login-title { font-size: 1.75rem; font-weight: 700; color: var(--color-primary); margin-bottom: 0.25rem; }
.login-subtitle { color: var(--color-text-muted); margin-bottom: 1.75rem; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-body { padding: 1.25rem; }
.card-img { width: 100%; height: 180px; object-fit: cover; }
.card-img-placeholder { width: 100%; height: 180px; background: linear-gradient(135deg, #f5ede3, #ecddd0); display: flex; align-items: center; justify-content: center; font-size: 3rem; }

/* ============================================================
   Recipe Grid
   ============================================================ */
.recipes-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  align-items: center;
}
.search-input { flex: 1; min-width: 200px; }
.filter-select { width: auto; min-width: 140px; }

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.recipe-card { cursor: pointer; position: relative; }
.recipe-card-body { padding: 1rem; }
.recipe-card-title { font-weight: 700; font-size: 1rem; margin-bottom: 0.35rem; line-height: 1.35; }
.recipe-card-desc { color: var(--color-text-muted); font-size: 0.83rem; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.recipe-card-meta { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.75rem; font-size: 0.8rem; color: var(--color-text-muted); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.status-tried { background: #e6f5ec; color: var(--color-tried); }
.status-to-try { background: #fef0e6; color: var(--color-to-try); }

.tags-list { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 600;
  background: #f0ece6;
  color: #5a4e42;
  cursor: default;
}
.tag-cuisine { background: #e3eef7; color: #1a5276; }
.tag-difficulty { background: #f9edcc; color: #7d6608; }
.tag-main_ingredient { background: #e8f8f5; color: #1e6e56; }
.tag-dietary { background: #f0e6f6; color: #6c3483; }
.tag-meal_type { background: #fde8d8; color: #a04000; }
.tag.removable { cursor: pointer; padding-right: 0.3rem; }
.tag.removable::after { content: ' ×'; opacity: 0.6; }
.tag.removable:hover { opacity: 0.8; }

.star-rating { color: #f4a11d; letter-spacing: 0.05em; }

/* ============================================================
   Recipe Detail
   ============================================================ */
.recipe-detail-header { display: flex; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.recipe-detail-image { width: 320px; flex-shrink: 0; border-radius: var(--radius-md); overflow: hidden; }
.recipe-detail-image img { width: 100%; object-fit: cover; }
.recipe-detail-info { flex: 1; min-width: 240px; }
.recipe-detail-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.25; }
.recipe-meta-row { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 1rem 0; }
.recipe-meta-item { display: flex; align-items: center; gap: 0.35rem; font-size: 0.875rem; color: var(--color-text-muted); }
.recipe-meta-item span { font-weight: 600; color: var(--color-text); }
.recipe-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }

.recipe-section { margin-bottom: 2rem; }
.recipe-section h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--color-border); }
.ingredients-list { list-style: none; margin: 0; padding: 0; }
.ingredients-list li { padding: 0.5rem 0; border-bottom: 1px solid #f0ece8; display: flex; align-items: baseline; gap: 0.5rem; }
.ingredients-list li::before { content: '•'; color: var(--color-primary); font-weight: bold; }
.ingredient-group-header { font-size: 0.8rem; font-weight: 700; margin: 1.25rem 0 0.25rem; color: var(--color-text-muted, #888); text-transform: uppercase; letter-spacing: 0.05em; }
.steps-list { list-style: none; counter-reset: step-counter; }
.steps-list li { padding: 0.75rem 0 0.75rem 3rem; border-bottom: 1px solid #f0ece8; position: relative; counter-increment: step-counter; }
.steps-list li::before { content: counter(step-counter); position: absolute; left: 0; top: 0.75rem; width: 2rem; height: 2rem; background: var(--color-primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }

.photo-gallery { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.photo-gallery img { width: 160px; height: 120px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; transition: opacity 0.15s; }
.photo-gallery img:hover { opacity: 0.85; }

.notes-section { background: #fffcf5; border: 1px solid #ede8d8; border-radius: var(--radius-md); padding: 1.25rem; }
.notes-section .rating-display { font-size: 1.25rem; }

/* ============================================================
   Import Page
   ============================================================ */
.import-container { max-width: 680px; }
.import-progress { margin-top: 1.5rem; }
.progress-step { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0; }
.progress-step-icon { width: 2rem; height: 2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0; }
.step-pending { background: var(--color-border); color: var(--color-text-muted); }
.step-active { background: var(--color-primary); color: #fff; animation: pulse 1s infinite; }
.step-done { background: var(--color-success); color: #fff; }
.step-error { background: var(--color-error); color: #fff; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.65; } }

/* ============================================================
   Meal Planner
   ============================================================ */
.meal-planner-intro { max-width: 700px; }
.meal-prompt-form { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.5rem; margin-bottom: 2rem; }

.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.75rem; overflow-x: auto; }
.day-column { min-width: 140px; }
.day-header { background: var(--color-primary); color: #fff; text-align: center; padding: 0.5rem; border-radius: var(--radius-sm) var(--radius-sm) 0 0; font-weight: 700; font-size: 0.85rem; }
.meal-cell { background: var(--color-bg-card); border: 1px solid var(--color-border); border-top: none; padding: 0.75rem 0.65rem; }
.meal-cell:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.meal-cell-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); margin-bottom: 0.35rem; }
.meal-cell-title { font-size: 0.8rem; font-weight: 600; line-height: 1.3; }
.meal-cell-title a { color: var(--color-primary); text-decoration: none; }
.meal-cell-title a:hover { text-decoration: underline; }
.meal-cell-empty { color: var(--color-text-muted); font-size: 0.75rem; font-style: italic; }
.meal-cell-external { background: none; border: none; padding: 0; margin: 0; cursor: pointer; color: var(--color-text); font-size: 0.8rem; font-weight: 600; line-height: 1.3; text-align: left; width: 100%; }
.meal-cell-external:hover { color: var(--color-primary); }
.meal-cell-import-hint { font-size: 0.7rem; color: var(--color-text-muted); font-weight: 400; }
.meal-cell-leftover { font-size: 0.8rem; font-weight: 500; color: var(--color-text-muted); font-style: italic; }

.shopping-list-section { margin-top: 2rem; }
.shopping-category { margin-bottom: 1.25rem; }
.shopping-category h4 { font-size: 0.95rem; font-weight: 700; color: var(--color-primary); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.04em; }
.shopping-items { list-style: none; }
.shopping-items li { padding: 0.35rem 0; border-bottom: 1px solid #f0ece8; display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; }
.shopping-items li input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--color-primary); flex-shrink: 0; }
.shopping-items li.checked { text-decoration: line-through; color: var(--color-text-muted); }

.meal-plans-list { display: grid; gap: 1rem; }
.meal-plan-card { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; cursor: pointer; transition: box-shadow 0.15s; }
.meal-plan-card:hover { box-shadow: var(--shadow-md); }

/* ============================================================
   Admin
   ============================================================ */
.admin-tabs { display: flex; gap: 0.5rem; border-bottom: 2px solid var(--color-border); margin-bottom: 1.5rem; }
.admin-tab { padding: 0.6rem 1.1rem; border: none; background: none; cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--color-text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.15s, border-color 0.15s; }
.admin-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 2px solid var(--color-border); font-weight: 700; color: var(--color-text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.data-table td { padding: 0.75rem 0.75rem; border-bottom: 1px solid var(--color-border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--color-bg-hover); }
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg-card); }

/* ============================================================
   Toast Notifications
   ============================================================ */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; z-index: 9999; }
.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  background: #2c2c2c;
  color: #fff;
  box-shadow: var(--shadow-lg);
  min-width: 250px;
  max-width: 380px;
  animation: slide-in 0.25s ease;
}
.toast-success { background: var(--color-success); }
.toast-error { background: var(--color-error); }
.toast-warning { background: var(--color-warning); }
@keyframes slide-in { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slide-out { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
.toast.hiding { animation: slide-out 0.25s ease forwards; }

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 1rem;
  animation: fade-in 0.15s;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--color-bg-card); border-radius: var(--radius-lg); width: 100%; max-width: 540px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--color-border); flex-shrink: 0; }
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--color-text-muted); line-height: 1; padding: 0.1rem; }
.modal-close:hover { color: var(--color-text); }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--color-border); display: flex; gap: 0.75rem; justify-content: flex-end; }

/* ============================================================
   Loading States
   ============================================================ */
.spinner {
  width: 2rem; height: 2rem;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 3rem; color: var(--color-text-muted); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--color-text-muted); }
.empty-state-icon { font-size: 3rem; margin-bottom: 0.75rem; display: block; }
.empty-state h3 { font-size: 1.1rem; color: var(--color-text); margin-bottom: 0.5rem; }

/* ============================================================
   Tag input
   ============================================================ */
.tag-input-area { border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); padding: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.35rem; background: #fff; min-height: 44px; cursor: text; }
.tag-input-area input { border: none; outline: none; flex: 1; min-width: 120px; font-size: 0.875rem; padding: 0.1rem 0.25rem; background: transparent; }
.tag-input-area:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(224,123,57,0.18); }
.tag-suggestions { position: absolute; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); z-index: 50; width: 100%; max-height: 200px; overflow-y: auto; }
.tag-suggestion-item { padding: 0.5rem 0.75rem; cursor: pointer; font-size: 0.875rem; }
.tag-suggestion-item:hover { background: var(--color-bg-hover); }

/* ============================================================
   Pagination
   ============================================================ */
.pagination { display: flex; gap: 0.35rem; align-items: center; justify-content: center; margin-top: 2rem; }
.pagination-btn { min-width: 2.2rem; height: 2.2rem; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1.5px solid var(--color-border); background: #fff; cursor: pointer; font-size: 0.875rem; font-weight: 600; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.pagination-btn:hover:not(:disabled) { border-color: var(--color-primary); color: var(--color-primary); }
.pagination-btn.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   Print styles (shopping list)
   ============================================================ */
@media print {
  .navbar, .btn, .meal-prompt-form, .meal-plans-list, .page-header .btn { display: none !important; }
  .shopping-list-section { margin-top: 0; }
  .shopping-items li input { display: none; }
  body { background: #fff; }
}

/* ============================================================
   Responsive tweaks
   ============================================================ */
@media (max-width: 768px) {
  .recipe-detail-header { flex-direction: column; }
  .recipe-detail-image { width: 100%; }
  .week-grid { grid-template-columns: repeat(4, 140px); }
  .recipe-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .recipes-toolbar { flex-direction: column; }
  .search-input { min-width: 0; }
  .week-grid { grid-template-columns: repeat(3, 140px); }
}
