/* =============================================
   MuscleEats — Global Styles
   Clean light theme, orange accent
   ============================================= */

:root {
  --orange: #FF6B35;
  --orange-dark: #e05a27;
  --dark: #1a1a1a;
  --mid: #444;
  --muted: #777;
  --border: #e0e0e0;
  --bg: #f8f8f6;
  --white: #ffffff;
  --card-bg: #ffffff;
  --success: #2e7d32;
  --error: #c62828;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 24px rgba(0,0,0,0.13);
  --transition: 0.2s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
}

/* ---- Typography ---- */
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { color: var(--mid); }
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Layout ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section--sm { padding: 3rem 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); }

.btn-outline {
  background: transparent;
  color: var(--dark);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--dark); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  padding: 0.5rem 1rem;
}
.btn-ghost:hover { color: var(--dark); }

.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- Nav ---- */
.nav {
  background: #232743;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 2.5rem;
  max-width: 100%;
}
.nav__logo {
  font-size: 1.4rem;
  font-weight: 300;
  font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
  color: #c8b69a;
  text-decoration: none;
  letter-spacing: 0.2em;
}
.nav__logo:hover { text-decoration: none; }
.nav__logo span { color: #c8b69a; }
.nav__links { display: flex; align-items: center; gap: 1.5rem; }
.nav__links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color var(--transition);
}
.nav__links a:hover { color: #c8b69a; }

/* ---- Hero ---- */
.hero {
  background: var(--white);
  padding: 6rem 1.5rem;
  text-align: center;
}

/* Video hero */
.hero--video {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem;
  background: #111;
  overflow: hidden;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) brightness(0.55);
  transform: scale(1.05); /* prevent blur edges */
}
.hero__video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.5) 100%);
}
.hero__content {
  position: relative;
  z-index: 1;
}
.hero--video .hero__title,
.hero--video h1 {
  color: #ffffff;
  max-width: 700px;
  margin: 0 auto 1.25rem;
}
.hero--video .hero__sub,
.hero--video p {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem;
  max-width: 540px;
  margin: 0 auto 2.5rem;
}
.hero--video .hero__eyebrow {
  background: rgba(255,107,53,0.2);
  color: #ffb38a;
  border: 1px solid rgba(255,107,53,0.4);
}

.hero__eyebrow {
  display: inline-block;
  background: #fff3ef;
  color: var(--orange);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
}
.hero__title { max-width: 700px; margin: 0 auto 1.25rem; }
.hero__sub { font-size: 1.15rem; max-width: 540px; margin: 0 auto 2.5rem; }
.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero__img {
  margin-top: 4rem;
  border-radius: 16px;
  overflow: hidden;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-hover);
}
.hero__img img { width: 100%; display: block; }

/* ---- Plans / Pricing cards ---- */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.plan-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  transition: border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.plan-card .btn { margin-top: auto; }
.plan-card:hover, .plan-card.selected {
  border-color: var(--orange);
  box-shadow: var(--shadow-hover);
}
.plan-card--popular::before {
  content: 'Most Popular';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--orange);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 1rem;
  border-radius: 50px;
  white-space: nowrap;
}
.plan-card__meals { font-size: 3.5rem; font-weight: 900; color: var(--dark); line-height: 1; }
.plan-card__label { font-size: 0.9rem; font-weight: 600; color: var(--muted); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.plan-card__price { font-size: 2rem; font-weight: 800; color: var(--dark); }
.plan-card__price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan-card__perks { list-style: none; margin: 1.25rem 0 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.plan-card__perks li { font-size: 0.9rem; color: var(--mid); display: flex; gap: 0.5rem; align-items: flex-start; }
.plan-card__perks li::before { content: '✓'; color: var(--orange); font-weight: 700; flex-shrink: 0; }

/* ---- How it works ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.step-card { text-align: center; }
.step-card__num {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.step-card__title { font-weight: 700; margin-bottom: 0.4rem; }

/* ---- Section header ---- */
.section-header { text-align: center; margin-bottom: 1rem; }
.section-header p { max-width: 520px; margin: 0.5rem auto 0; }

/* ---- Menu grid ---- */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.meal-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.meal-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.meal-card.selected { border-color: var(--orange); }
.meal-card.selected .meal-card__check { opacity: 1; }
.meal-card__dietary {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
  white-space: nowrap;
}
.dietary--veg {
  background: rgba(34, 197, 94, 0.18);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.dietary--pesc {
  background: rgba(59, 130, 246, 0.18);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.dietary--meat {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.3);
}
.meal-card__check {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  width: 28px; height: 28px;
  background: var(--orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.9rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.meal-card__img-wrap {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  display: block;
}
.meal-card__img-wrap:hover .meal-card__img,
.meal-card__img-wrap:hover .meal-card__img-placeholder {
  filter: brightness(0.88);
}
.meal-card__cart-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.cart-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  touch-action: manipulation;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 1.1rem; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--dark);
  transition: background var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.cart-btn:hover { background: var(--bg); border-color: var(--dark); }
.cart-btn--plus { border-color: var(--orange); color: var(--orange); }
.cart-btn--plus:hover { background: #fff3ef; }
.cart-btn__count {
  min-width: 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
}
.meal-card__img { width: 100%; height: 180px; object-fit: cover; background: var(--bg); }
.meal-card__img-placeholder { width: 100%; height: 180px; background: linear-gradient(135deg, #f0ede8, #e8e3dc); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.meal-card__body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.meal-card__name { font-weight: 700; font-size: 1rem; margin-bottom: 0.15rem; color: var(--dark); }
.meal-card__subtitle { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.3rem; flex: 1; }
.meal-card__desc { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; }
.meal-card__macros { display: flex; gap: 1rem; }
.meal-card__macro { font-size: 0.8rem; font-weight: 600; color: var(--mid); }
.meal-card__macro span { color: var(--orange); }

/* ---- FAQ ---- */
.faq { max-width: 700px; margin: 2rem auto 0; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item__q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item__q::after { content: '+'; font-size: 1.3rem; color: var(--orange); transition: transform var(--transition); flex-shrink: 0; }
.faq-item.open .faq-item__q::after { transform: rotate(45deg); }
.faq-item__a { display: none; padding-bottom: 1rem; font-size: 0.95rem; }
.faq-item.open .faq-item__a { display: block; }

/* ---- Forms ---- */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--dark); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--white);
  color: var(--dark);
  transition: border-color var(--transition);
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--orange);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-error { font-size: 0.85rem; color: var(--error); margin-top: 0.35rem; display: none; }
.form-error.visible { display: block; }

/* ---- Auth card ---- */
.auth-wrapper {
  min-height: calc(100vh - 65px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
}
.auth-card__logo { text-align: center; margin-bottom: 0.5rem; font-size: 1.8rem; font-weight: 900; }
.auth-card__logo span { color: var(--orange); }
.auth-card__title { text-align: center; font-size: 1.4rem; font-weight: 700; margin-bottom: 0.25rem; }
.auth-card__sub { text-align: center; font-size: 0.9rem; color: var(--muted); margin-bottom: 2rem; }
.auth-card__footer { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; color: var(--muted); }

/* ---- Dashboard ---- */
.dash-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; padding: 2rem 0; }
.dash-sidebar {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  position: sticky;
  top: 80px;
}
.dash-sidebar__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.75rem;
}
.dash-sidebar__name { font-weight: 700; font-size: 1rem; }
.dash-sidebar__plan { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }
.dash-nav { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; }
.dash-nav a,
.dash-nav__btn {
  display: flex; gap: 0.6rem; align-items: center;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem; font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.dash-nav a:hover, .dash-nav a.active,
.dash-nav__btn:hover, .dash-nav__btn.active { background: #fff3ef; color: var(--orange); }
.dash-main { min-width: 0; }

.dash-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.dash-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.dash-card__title { font-weight: 700; font-size: 1.1rem; }

/* Deadline banner */
.deadline-banner {
  background: #fff8e1;
  border: 1.5px solid #ffe082;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: flex; gap: 0.75rem; align-items: center;
}
.deadline-banner--locked {
  background: #fce4ec;
  border-color: #f48fb1;
}
.deadline-banner__icon { font-size: 1.3rem; flex-shrink: 0; }

/* Meal selection counter */
.selection-counter {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}
.counter-bar { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.counter-bar__fill { height: 100%; background: var(--orange); border-radius: 3px; transition: width 0.3s ease; }

/* ---- Admin ---- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th { text-align: left; padding: 0.75rem 1rem; border-bottom: 2px solid var(--border); font-weight: 600; color: var(--mid); }
.admin-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg); }

/* ---- Analytics chart toggles ---- */
.toggle-group {
  display: inline-flex;
  gap: 0.25rem;
  background: linear-gradient(135deg, #f5f5f3 0%, #ececea 100%);
  border: 1px solid #d8d8d5;
  border-radius: 8px;
  padding: 0.25rem;
}
.chart-metric-btn, .chart-period-btn, .dish-period-btn, .costs-period-btn, .profit-period-btn {
  background: none;
  border: none;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: 5px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.chart-metric-btn:hover, .chart-period-btn:hover, .dish-period-btn:hover, .costs-period-btn:hover, .profit-period-btn:hover { color: var(--dark); }
.chart-metric-btn.active, .chart-period-btn.active, .dish-period-btn.active, .costs-period-btn.active, .profit-period-btn.active {
  background: white;
  color: var(--orange);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.menu-filter-btn {
  background: #f5f5f3;
  border: 1px solid #d8d8d5;
  border-radius: 20px;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  font-family: inherit;
}
.menu-filter-btn:hover { color: var(--dark); border-color: #bbb; }
.menu-filter-btn.active { background: var(--orange); color: #fff; border-color: var(--orange); }

.chart-kpi {
  background: var(--bg);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}
.chart-kpi__label { font-size: 0.75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.chart-kpi__value { font-size: 1.5rem; font-weight: 900; color: var(--dark); }
.chart-kpi__delta { font-size: 0.8rem; font-weight: 600; margin-top: 0.1rem; }
.chart-kpi__delta--up { color: #2e7d32; }
.chart-kpi__delta--down { color: #c62828; }
.chart-kpi__delta--neutral { color: var(--muted); }

/* ---- Meal detail popup ---- */
.meal-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.meal-popup-overlay.open { opacity: 1; }

.meal-popup {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(0,0,0,0.25);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s ease;
}
.meal-popup-overlay.open .meal-popup {
  transform: translateY(0) scale(1);
}
.meal-popup__body { padding: 1.5rem; }
.meal-popup__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.meal-popup__title { font-size: 1.3rem; font-weight: 800; color: var(--dark); }
.meal-popup__close {
  background: var(--bg);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: background var(--transition);
}
.meal-popup__close:hover { background: var(--border); color: var(--dark); }
.meal-popup__subtitle { color: var(--dark); font-size: 0.95rem; font-weight: 500; margin-bottom: 0.75rem; line-height: 1.5; }
.meal-popup__divider { border: none; border-top: 1px solid var(--border); margin: 0 0 1rem; }
.meal-popup__desc { color: var(--mid); font-size: 0.95rem; margin-bottom: 1.25rem; line-height: 1.6; }
.meal-popup__macros {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.meal-popup__macro {
  background: var(--bg);
  border-radius: 8px;
  padding: 0.85rem 0.5rem;
  text-align: center;
}
.meal-popup__macro-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--orange);
}
.meal-popup__macro-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.2rem;
}

/* ---- Toast notification ---- */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  background: var(--dark);
  color: white;
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  animation: slideIn 0.3s ease;
  display: flex; gap: 0.6rem; align-items: center;
  max-width: 320px;
}
.toast--success { background: #2e7d32; }
.toast--error { background: var(--error); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%; max-width: 480px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  transform: scale(0.95); transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal__close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); }
.modal__close:hover { color: var(--dark); }

/* ---- Badge ---- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
}
.badge--green { background: #e8f5e9; color: #2e7d32; }
.badge--orange { background: #fff3ef; color: var(--orange); }
.badge--grey { background: #f0f0f0; color: var(--muted); }

/* ---- Billing table ---- */
.billing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.billing-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1.5px solid var(--border);
}
.billing-table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.billing-table tr:last-child td { border-bottom: none; }
.billing-table tr:hover td { background: var(--bg); }
.billing-table .billing-amount { font-weight: 700; }
.billing-table .billing-download {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border: 1.5px solid var(--orange);
  border-radius: 6px;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.billing-table .billing-download:hover {
  background: var(--orange);
  color: white;
  text-decoration: none;
}

/* ---- Footer ---- */
.footer {
  background: #232743;
  color: rgba(255,255,255,0.5);
  padding: 3rem 1.5rem;
  font-size: 0.9rem;
}
.footer__inner { max-width: 100%; padding: 0 2.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.footer__left { display: flex; flex-direction: column; gap: 0.3rem; }
.footer__right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.footer__links { display: flex; gap: 1.5rem; }
.footer__logo {
  font-size: 1.2rem;
  font-weight: 300;
  font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
  color: #c8b69a;
  letter-spacing: 0.2em;
}
.footer__logo span { color: #c8b69a; }
.footer a { color: rgba(255,255,255,0.5); }
.footer a:hover { color: #c8b69a; }

/* ---- Checkout steps ---- */
.checkout-steps { display: flex; gap: 0; margin-bottom: 3rem; }
.checkout-step {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 3px solid var(--border);
  transition: color var(--transition), border-color var(--transition);
}
.checkout-step.active { color: var(--orange); border-color: var(--orange); }
.checkout-step.done { color: var(--success); border-color: var(--success); }

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.hidden { display: none !important; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Guest cart bar ---- */
.cart-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  width: calc(100% - 3rem);
  max-width: 960px;
  background: rgba(30, 32, 54, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 0.85rem 1.25rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  animation: floatUp 0.3s ease;
}
@keyframes floatUp { from { transform: translateX(-50%) translateY(20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
.cart-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.cart-bar__info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
}
.cart-bar__slots {
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
}
.cart-bar__right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.cart-bar__total {
  font-size: 1.05rem;
  font-weight: 800;
  color: #c8b69a;
}
.cart-bar__plan-label {
  display: none;
}
.cart-bar__progress {
  margin-top: 0.75rem;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
}
.cart-bar__progress-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 2px;
  width: 0%;
  transition: width 0.25s ease;
}
.cart-bar__error {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #ff8a80;
  text-align: center;
}
@media (max-width: 600px) {
  .cart-bar { width: calc(100% - 1.5rem); bottom: 0.75rem; padding: 0.65rem 0.875rem; border-radius: 12px; }
  .cart-bar__inner { gap: 0.5rem; flex-wrap: wrap; }
  .cart-bar__info { font-size: 0.8rem; gap: 0.5rem; flex: 1; min-width: 0; }
  .cart-bar__right { flex-shrink: 0; }
  .cart-bar__total { font-size: 0.9rem; }
  .cart-bar__slots { display: none; }
}

/* ---- Admin mobile fixes ---- */
.admin-two-col { grid-template-columns: 1fr 1fr; }
.admin-kpi-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.mobile-only { display: none; }
.filter-select {
  appearance: none;
  background: linear-gradient(135deg, #f5f5f3 0%, #ececea 100%) 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='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  border: 1px solid #d8d8d5;
  border-radius: 8px;
  padding: 0.45rem 2.25rem 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  font-family: inherit;
}
.filter-select:focus { outline: none; border-color: var(--orange); }
@media (max-width: 700px) {
  .admin-two-col { grid-template-columns: 1fr; }
  .admin-kpi-grid { grid-template-columns: 1fr 1fr; }
  .toggle-group { display: none; }
  .mobile-only { display: block; }
}

/* ---- How it works card ---- */
.how-it-works-card {
  background: linear-gradient(135deg, #f8f6f2 0%, #f0ede6 50%, #ede8df 100%);
  border-radius: 20px;
  padding: 3rem 3.5rem;
  border: 1px solid rgba(0,0,0,0.05);
}
.how-it-works-card .step-card { text-align: left; }
.how-it-works-card .step-card__num { margin: 0 0 1rem; }

/* ---- Plan card hover effect ---- */
.plan-card {
  transition: border-color var(--transition), box-shadow var(--transition), transform 0.22s ease;
}
.plan-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0,0,0,0.13);
  border-color: var(--orange);
}

/* ---- Menu carousel ---- */
.carousel-wrapper {
  overflow: hidden;
  margin: 2rem -1.5rem 0;
  padding: 0.5rem 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.carousel-track {
  display: flex;
  gap: 24px;
  padding: 0 1.5rem;
  will-change: transform;
}
.carousel-card {
  flex: 0 0 300px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.carousel-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--orange); }
.carousel-card .meal-card__body { padding: 1rem; }

/* ---- FAQ width fix ---- */
.faq { max-width: 800px; margin: 2rem auto 0; }

/* ---- Hamburger nav ---- */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  margin-left: auto;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  background: #232743;
  padding: 0.5rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.nav__mobile-menu.open { display: flex; }
.nav__mobile-menu a {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
}
.nav__mobile-menu a:last-child { border-bottom: none; margin-top: 0.75rem; }
.nav__mobile-menu a:hover { color: #c8b69a; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; }
  .nav__links .hide-mobile { display: none; }
  .nav__hamburger { display: flex; }
  .how-it-works-card { padding: 2rem 1.5rem; }
  .carousel-card { flex: 0 0 260px; }
}
@media (max-width: 480px) {
  .hero { padding: 4rem 1rem; }
  .auth-card { padding: 1.75rem 1.25rem; }
  .nav__inner { padding: 0.6rem 1rem; }
  .nav__logo { font-size: 1.2rem; }
}
