/* SabiCook — Mobile-First App Design System (Expo Precursor) */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary: #0e593f;
  --primary-dark: #083c2a;
  --primary-light: #e8f3ed;
  --accent: #d9822b;
  --accent-dark: #b45309;
  --accent-light: #fef5ea;
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-alt: #f0f3ee;
  --text: #16201a;
  --text-muted: #5f6d63;
  --text-subtle: #8b978f;
  --border: #e2e7e1;
  --border-light: #eef2ed;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 999px;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 18px rgba(14, 89, 63, 0.07);
  --shadow-lg: 0 12px 32px rgba(14, 89, 63, 0.12);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
  background: #111a14;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #111a14;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* App Shell — Desktop centered mobile frame, 100% on phones */
.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.25);
  overflow-x: hidden;
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(247, 248, 245, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.app-header-inner {
  height: 62px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.app-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(14, 89, 63, 0.25);
  transform: rotate(-5deg);
}

.app-titles {
  display: flex;
  flex-direction: column;
}

.app-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.app-name span {
  color: var(--primary);
}

.app-subtitle {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.header-saved-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.15s ease;
}

.header-saved-btn:active {
  transform: scale(0.95);
}

.header-saved-btn .heart-icon {
  color: #e53935;
  font-size: 14px;
}

.header-saved-btn .badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
}

/* App Main Content Area */
.app-content {
  flex: 1;
  padding: 16px 16px 90px;
  overflow-y: auto;
}

/* Tab Views */
.tab-view {
  display: none;
  animation: fadeIn 0.22s ease-out;
}

.tab-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* App Cards */
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.hero-card {
  background: linear-gradient(145deg, #0e593f 0%, #157353 100%);
  color: #ffffff;
  border: none;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "◒";
  position: absolute;
  right: -20px;
  bottom: -35px;
  font-size: 150px;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.hero-card h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.hero-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 16px;
}

/* Primary Button */
.app-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(217, 130, 43, 0.35);
  transition: all 0.15s ease;
  user-select: none;
  text-decoration: none;
}

.app-btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(217, 130, 43, 0.25);
}

.app-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.app-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.app-btn-secondary:active {
  transform: scale(0.97);
}

/* Section Titles */
.section-title-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 22px 0 12px;
}

.eyebrow-accent {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.section-title-wrap h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

/* Food of the Day Carousel / Scroll */
.fod-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.fod-scroll::-webkit-scrollbar {
  display: none;
}

.fod-card {
  flex: 0 0 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fod-card:active {
  transform: scale(0.98);
}

.fod-card.fod-spotlight {
  background: linear-gradient(145deg, #fbf7f0 0%, #f2eae0 100%);
  border-color: #ebd6c0;
}

.fod-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.fod-badge {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--accent-dark);
  background: var(--accent-light);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fod-time {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.fod-card h3 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  line-height: 1.25;
}

.fod-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fod-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

.fod-ing-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.fod-ing-preview span, .fod-ing-preview small {
  font-size: 10.5px;
  background: var(--surface-alt);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.fod-open-btn {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  touch-action: manipulation;
}

/* Category Pill Bar */
.cat-pill-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scrollbar-width: none;
}

.cat-pill-bar::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
}

.cat-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(14, 89, 63, 0.25);
}

/* Meal Feed */
.meal-feed {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.feed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feed-card:active {
  transform: scale(0.98);
}

.feed-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.feed-cat {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed-time {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-subtle);
}

.feed-fav-btn {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 15px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease;
  touch-action: manipulation;
}

.feed-fav-btn.is-favorite {
  color: #e53935;
  background: #ffebee;
  border-color: #ffcdd2;
}

.feed-card h3 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.feed-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 10px;
}

.feed-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.feed-pills span {
  font-size: 11px;
  background: var(--surface-alt);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* TAB 2: PANTRY / MATCH STYLES */
.pantry-header-card {
  margin-bottom: 16px;
}

.pantry-header-card h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}

.pantry-header-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
}

.pantry-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 8px 6px 12px;
}

.search-icon {
  font-size: 15px;
  color: var(--text-muted);
}

.pantry-search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
}

.pantry-search-box input::placeholder {
  color: var(--text-subtle);
}

.search-add-btn {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
}

.app-suggestions {
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
}

.app-suggestions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-light);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.app-suggestions button:last-child {
  border-bottom: none;
}

.app-suggestions button:hover, .app-suggestions button.is-focused {
  background: var(--primary-light);
  color: var(--primary);
}

/* Categorized Ingredient Picker Trays */
.pantry-categories {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.pantry-cat-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 12px;
  scrollbar-width: none;
}

.pantry-cat-tabs::-webkit-scrollbar {
  display: none;
}

.pantry-tab {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pantry-tab.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(14, 89, 63, 0.2);
}

.pantry-trays {
  min-height: 80px;
}

.pantry-tray {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
}

.pantry-tray.active {
  display: flex;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
}

.chip-btn:active {
  transform: scale(0.95);
}

.chip-btn.is-selected {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.chip-btn span {
  font-weight: 800;
  font-size: 13px;
}

/* Pantry Basket Card */
.pantry-basket-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.basket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.basket-header strong {
  font-size: 14.5px;
  font-weight: 800;
}

.basket-count {
  font-size: 11.5px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 800;
  margin-left: 6px;
}

.clear-basket-btn {
  background: none;
  border: none;
  color: #e53935;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.basket-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 44px;
  align-items: center;
  padding: 8px 0 14px;
}

.basket-empty-hint {
  font-size: 12.5px;
  color: var(--text-subtle);
  font-style: italic;
}

.selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: var(--radius-full);
  background: #e8f3ed;
  color: var(--primary);
  border: 1px solid #cce5d7;
  font-size: 12px;
  font-weight: 700;
}

.selected-chip button {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

/* Sabi Chef Pairing Suggestions */
.pairing-wrap {
  border-top: 1px dashed var(--border);
  margin-top: 2px;
  padding-top: 12px;
  animation: fadeIn 0.2s ease-out;
}

.pairing-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.pairing-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pairing-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: var(--radius-full);
  border: 1.5px dashed #b7dcc3;
  background: #f6fbf7;
  color: var(--primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pairing-chip:active {
  transform: scale(0.95);
}

.pairing-chip .pairing-plus {
  font-weight: 800;
  font-size: 13px;
}

.pairing-chip .pairing-count {
  font-size: 10px;
  font-weight: 700;
  color: #5f8a70;
}

/* Sabi Chef AI Assistant Box */
.chef-assistant-card {
  background: linear-gradient(135deg, #f0f7f3 0%, #fdf8ee 100%);
  border: 1px solid #cce3d5;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.25s ease-out;
}

.chef-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.chef-avatar {
  font-size: 24px;
}

.chef-header strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
}

.chef-header small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.chef-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 10px;
}

.chef-unlock-callout {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e0ebdf;
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.unlock-icon {
  font-size: 18px;
}

.unlock-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.unlock-body span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.unlock-chip-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* Results Container */
.results-container {
  margin-top: 10px;
}

.results-empty-state, .saved-empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.empty-icon, .empty-heart {
  font-size: 38px;
  display: block;
  margin-bottom: 10px;
  color: var(--text-subtle);
}

.results-empty-state h3, .saved-empty-state h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 6px;
}

.results-empty-state p, .saved-empty-state p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto 16px;
}

/* Results Filter Segmented Bar */
.results-filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.results-filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Result Cards */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.result-card:active {
  transform: scale(0.98);
}

.result-card.is-ready {
  border: 1.5px solid #b7dcc3;
  background: linear-gradient(180deg, #fbfdfb 0%, #ffffff 60%);
  box-shadow: 0 3px 12px rgba(46, 125, 50, 0.08);
}

.result-card.is-unlock {
  border: 1.5px solid #f0d3ae;
  background: linear-gradient(180deg, #fffdf9 0%, #ffffff 60%);
  box-shadow: 0 3px 12px rgba(217, 130, 43, 0.07);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.match-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.match-badge.badge-ready {
  background: #e8f5e9;
  color: #2e7d32;
}

.match-badge.badge-unlock {
  background: #fff3e0;
  color: #b45309;
}

.result-card h3 {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.result-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 10px;
}

.result-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.result-pills .pill-have {
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.result-pills .pill-need {
  background: #ffebee;
  color: #c62828;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.result-pills .pill-need-soft {
  background: #fff8e1;
  color: #b26a00;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* TAB 4: MORE / SETTINGS */
.promo-card {
  background: linear-gradient(135deg, #fdf8ee 0%, #faecd7 100%);
  border: 1px solid #ebd9c0;
}

.promo-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.promo-card h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.promo-card p {
  font-size: 13px;
  color: #5d4a36;
  line-height: 1.5;
  margin-bottom: 14px;
}

.settings-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row:active {
  background: var(--surface-alt);
}

.chevron {
  color: var(--text-subtle);
  font-size: 18px;
}

.text-danger {
  color: #d32f2f;
}

.app-about {
  text-align: center;
  padding: 10px 16px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

[hidden],
.sheet-overlay[hidden],
.recipe-sheet[hidden],
.app-cookie-banner[hidden] {
  display: none !important;
}

/* SLIDE-UP RECIPE DETAIL SHEET */
.sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 150;
}

.sheet-overlay.is-open {
  display: block !important;
  animation: fadeIn 0.2s ease-out;
}

.recipe-sheet {
  display: none;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  flex-direction: column;
  overflow: hidden;
}

.recipe-sheet.is-open {
  display: flex !important;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(100%); }
  to { transform: translateX(-50%) translateY(0); }
}

.sheet-handle {
  width: 38px;
  height: 5px;
  background: #d4ded0;
  border-radius: 3px;
  margin: 12px auto 4px;
  cursor: pointer;
}

.sheet-header {
  padding: 6px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.sheet-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sheet-cat-badge, .sheet-time-badge, .sheet-diff-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.sheet-cat-badge {
  background: var(--primary-light);
  color: var(--primary);
}

.sheet-time-badge, .sheet-diff-badge {
  background: var(--surface-alt);
  color: var(--text-muted);
}

.sheet-close-btn {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
}

.sheet-body {
  padding: 16px 18px 40px;
  overflow-y: auto;
}

.sheet-body h2 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
  line-height: 1.2;
}

.sheet-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

.sheet-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

.sheet-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.sheet-action-btn:active {
  transform: scale(0.96);
}

.sheet-action-btn.is-favorite {
  background: #ffebee;
  color: #d32f2f;
  border-color: #ffcdd2;
}

.sheet-share-group {
  display: flex;
  gap: 6px;
}

.sheet-section {
  margin-bottom: 20px;
}

.sheet-sec-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sheet-sec-title span {
  font-size: 14.5px;
  font-weight: 800;
}

.sheet-sec-title small {
  font-size: 11.5px;
  color: var(--primary);
  font-weight: 600;
}

/* Interactive Checklist */
.checklist-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.check-item.checked {
  background: #eef7f2;
  border-color: #cde6d7;
  color: var(--text-muted);
}

.check-item.checked span {
  text-decoration: line-through;
  color: var(--text-subtle);
}

.sheet-tip-box {
  background: #fdf8ee;
  border: 1px solid #faecd7;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 14px;
}

.sheet-tip-box strong {
  display: block;
  font-size: 12.5px;
  color: #7d5b1d;
  margin-bottom: 4px;
}

.sheet-tip-box p {
  font-size: 12.5px;
  color: #5d4a36;
  line-height: 1.45;
  margin: 0;
}

/* BOTTOM TAB BAR (EXPO NATIVE STYLE) */
.app-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 68px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  background: none;
  border: none;
  color: var(--text-subtle);
  font-family: inherit;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.tabbar-item:active {
  transform: scale(0.92);
}

.tabbar-icon {
  font-size: 20px;
  line-height: 1;
}

.tabbar-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tabbar-item.active {
  color: var(--primary);
}

.tabbar-item.active .tabbar-icon {
  transform: translateY(-1px);
}

.tabbar-badge {
  position: absolute;
  top: 8px;
  right: calc(50% - 18px);
  background: #e53935;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  min-width: 16px;
  text-align: center;
}

/* Toast Notification */
.app-toast {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e2822;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 300;
  animation: toastPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Cookie Notice */
.app-cookie-banner {
  position: fixed;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 456px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
}

.app-cookie-banner strong {
  display: block;
  font-size: 12px;
  color: var(--text);
}

.app-cookie-banner p {
  color: var(--text-muted);
  margin: 2px 0 0;
  line-height: 1.35;
}

.cookie-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.cookie-btns button {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.cookie-btns .cookie-accept {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Fullscreen on Mobile Phones */
@media (max-width: 480px) {
  body {
    background: var(--bg);
  }
  .app-shell {
    box-shadow: none;
  }
}

/* HEADER BACK BUTTON */
.header-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.header-back-btn:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}

.header-logout-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #fdf2f2;
  border: 1px solid #f8d7da;
  border-radius: 999px;
  color: #c92a2a;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-logout-btn:hover {
  background: #fa5252;
  color: #fff;
}

/* KIDS LUNCHBOX SPOTLIGHT BANNER */
.home-lunch-banner {
  background: linear-gradient(135deg, rgba(235, 142, 38, 0.07) 0%, rgba(246, 248, 246, 0.98) 100%);
  border: 1.5px solid rgba(235, 142, 38, 0.32);
  border-radius: 22px;
  padding: 16px 18px;
  margin: 14px 0 18px;
  box-shadow: 0 4px 16px rgba(235, 142, 38, 0.08);
}

.lunch-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-dark);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.lunch-banner-content h3 {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 5px;
  line-height: 1.3;
}

.lunch-banner-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 12px;
}

.lunch-banner-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.lunch-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: 9px 15px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 12.5px;
  box-shadow: 0 4px 12px rgba(14, 89, 63, 0.2);
  transition: transform 0.15s ease;
}

.lunch-banner-btn:hover {
  transform: translateY(-1px);
}

.lunch-banner-subtle-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ADMIN PORTAL STYLES */
.admin-card {
  padding: 20px;
  margin-bottom: 16px;
}

.admin-card h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-login-card {
  text-align: center;
  padding: 32px 20px;
  margin-top: 20px;
}

.admin-lock-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(14, 89, 63, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 14px;
}

.form-group {
  margin-bottom: 14px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
}

.form-hint {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 13.5px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 89, 63, 0.12);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 14px;
}

.toggle-info strong {
  display: block;
  font-size: 13.5px;
  color: var(--text);
}

.toggle-info small {
  font-size: 12px;
  color: var(--text-muted);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  border-radius: 24px;
  transition: 0.2s;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.switch input:checked + .switch-slider {
  background-color: var(--primary);
}

.switch input:checked + .switch-slider:before {
  transform: translateX(20px);
}

.admin-alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-alert-success {
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  color: #2e7d32;
}

.admin-alert-error {
  background: #ffebee;
  border: 1px solid #ffcdd2;
  color: #c62828;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.stat-pill {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 10px 12px;
}

.stat-pill-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-pill-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
}

/* LEGAL PAGES STYLING */
.legal-card {
  padding: 22px 18px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.legal-section {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}

.legal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
}

.legal-section p {
  font-size: 13.5px;
  color: #46554b;
  margin: 0 0 8px;
  line-height: 1.55;
}

.legal-note {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
}

