/* =========================================================
   HyvenFoods — Design System
   Primary: white  |  Secondary: green  |  Tertiary: goldenrod
   ========================================================= */

:root {
  --green-900: #14532d;
  --green-800: #166534;
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;

  --gold-600: #b8860b;
  --gold-500: #d4af37;
  --gold-400: #daa520;
  --gold-100: #faf3d8;
  --gold-50: #fdf9ec;

  --ink-900: #0c0f0d;
  --ink-700: #1f2937;
  --ink-500: #4b5563;
  --ink-400: #6b7280;
  --ink-300: #9ca3af;

  --white: #ffffff;
  --off-white: #f6f8f6;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;

  --red-600: #dc2626;
  --red-50: #fef2f2;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(20, 83, 45, 0.08);
  --shadow: 0 8px 24px rgba(20, 83, 45, 0.1);
  --shadow-lg: 0 18px 45px rgba(20, 83, 45, 0.16);
  --ring: 0 0 0 3px rgba(34, 197, 94, 0.25);

  --header-h: 72px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Poppins', 'Segoe UI', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }

a { color: var(--green-700); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-500); }

ul { list-style: none; }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--ink-900);
  font-weight: 700;
}

::selection { background: var(--gold-500); color: var(--ink-900); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--off-white); }
::-webkit-scrollbar-thumb { background: #cbd5c9; border-radius: 20px; border: 2px solid var(--off-white); }
::-webkit-scrollbar-thumb:hover { background: var(--green-600); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 880px; }

main { flex: 1; }

html, body { overflow-x: hidden; overflow-x: clip; overscroll-behavior-x: none; }
/* Floor of 320px for normal devices — but never wider than the viewport itself,
   otherwise tiny screens (e.g. 280-300px devices) force body-level x-overflow. */
body { min-width: 0; overflow-wrap: break-word; overflow-wrap: anywhere; }
/* 320px floor only when it fits: a classic scrollbar (~10-17px) can shrink the
   layout viewport below 320px even on 321-339px windows, which would pin body
   content left and clip the right edge. Start the floor at 340px instead. */
@media (min-width: 340px) { body { min-width: 320px; } }

.section { padding: 72px 0; }
.section--tinted { background: var(--off-white); }
.section--dark { background: linear-gradient(135deg, var(--green-900), var(--green-700)); }

.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section__title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -0.02em; }
.section__title .accent { color: var(--green-700); }
.section__title .accent--gold { color: var(--gold-500); }
.section__sub { color: var(--ink-500); margin-top: 6px; max-width: 620px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--green-700); background: var(--green-50);
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--green-100);
}
.eyebrow--gold { color: var(--gold-600); background: var(--gold-50); border-color: var(--gold-100); }
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green-600); }
.eyebrow--gold::before { background: var(--gold-500); }

/* ================= Buttons ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 0.95rem;
  padding: 12px 22px; border-radius: 12px; border: 2px solid transparent;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, color 0.18s;
  line-height: 1.2; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--green { background: var(--green-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn--green:hover { background: var(--green-800); color: #fff; box-shadow: var(--shadow); transform: translateY(-2px); }

.btn--gold { background: var(--gold-500); color: var(--ink-900); box-shadow: var(--shadow-sm); }
.btn--gold:hover { background: var(--gold-400); color: var(--ink-900); transform: translateY(-2px); box-shadow: var(--shadow); }

.btn--outline { border-color: var(--green-700); color: var(--green-700); background: transparent; }
.btn--outline:hover { background: var(--green-700); color: #fff; }

.btn--outline-gold { border-color: var(--gold-500); color: var(--gold-600); background: transparent; }
.btn--outline-gold:hover { background: var(--gold-500); color: var(--ink-900); }

.btn--ghost { background: var(--gray-100); color: var(--ink-700); }
.btn--ghost:hover { background: var(--gray-200); }

.btn--danger { background: var(--red-600); color: #fff; }
.btn--danger:hover { background: #b91c1c; color: #fff; }

.btn--white { background: #fff; color: var(--green-800); }
.btn--white:hover { background: var(--green-50); color: var(--green-800); }

.btn--block { width: 100%; }
.btn--sm { padding: 8px 14px; font-size: 0.84rem; border-radius: 9px; }
.btn--lg { padding: 15px 30px; font-size: 1.02rem; border-radius: 14px; }
.btn--icon { width: 40px; height: 40px; padding: 0; border-radius: 10px; }

.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ================= Badges ================= */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  letter-spacing: 0.03em; text-transform: uppercase;
}
.badge--green { background: var(--green-50); color: var(--green-700); }
.badge--gold { background: var(--gold-50); color: var(--gold-600); }
.badge--red { background: var(--red-50); color: var(--red-600); }
.badge--orange { background: #ffedd5; color: #c2410c; }
.badge--gray { background: var(--gray-100); color: var(--ink-500); }

.verified-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  color: #fff; font-size: 0.6rem; flex-shrink: 0;
}

/* ================= Forms ================= */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 7px; color: var(--ink-700); }
.form-group label .req { color: var(--red-600); }

.form-control {
  width: 100%; padding: 12px 15px;
  border: 2px solid var(--gray-200); border-radius: 11px;
  font-size: 0.95rem; font-family: inherit; color: var(--ink-900);
  background: #fff; transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-control:focus { border-color: var(--green-600); box-shadow: var(--ring); }
.form-control::placeholder { color: var(--ink-300); }
textarea.form-control { resize: vertical; min-height: 110px; }

.form-hint { font-size: 0.8rem; color: var(--ink-400); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { color: var(--red-600); font-size: 0.85rem; margin-top: 5px; }

.form-search {
  display: flex; align-items: center; gap: 0;
  background: #fff; border: 2px solid var(--gray-200);
  border-radius: 999px; padding: 4px; transition: box-shadow 0.2s, border-color 0.2s;
  max-width: 520px;
}
.form-search:focus-within { border-color: var(--green-600); box-shadow: var(--ring); }
.form-search input {
  flex: 1; min-width: 0; border: none; outline: none; padding: 10px 16px;
  font-size: 0.95rem; background: transparent; color: var(--ink-900); font-family: inherit;
}
.form-search button {
  background: var(--green-700); color: #fff; border: none; border-radius: 999px;
  padding: 10px 20px; font-weight: 600; font-size: 0.9rem; white-space: nowrap; flex-shrink: 0;
  transition: background 0.2s;
}
.form-search button:hover { background: var(--green-800); }

.select-wrap { position: relative; }
.select-wrap select {
  appearance: none; padding-right: 38px; cursor: pointer;
}
.select-wrap::after {
  content: ''; position: absolute; right: 16px; top: 50%;
  width: 9px; height: 9px; border-right: 2px solid var(--ink-500);
  border-bottom: 2px solid var(--ink-500); transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* Switch */
.switch { position: relative; display: inline-block; width: 50px; height: 27px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: var(--gray-300);
  border-radius: 999px; transition: 0.25s; cursor: pointer;
}
.switch .slider::before {
  content: ''; position: absolute; width: 21px; height: 21px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: 0.25s; box-shadow: var(--shadow-sm);
}
.switch input:checked + .slider { background: var(--green-600); }
.switch input:checked + .slider::before { transform: translateX(23px); }

/* ================= Navbar ================= */
.nav {
  position: sticky; top: 0; z-index: 130;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.7);
  transition: box-shadow 0.25s;
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 18px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand__logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  display: grid; place-items: center; color: #fff; font-size: 1.15rem;
  box-shadow: var(--shadow-sm);
}
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--green-700); letter-spacing: -0.02em; }
.brand__name span { color: var(--gold-500); }
.brand__name .gold { color: var(--gold-500); }

.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__link {
  padding: 9px 15px; border-radius: 10px; font-weight: 600; font-size: 0.93rem;
  color: var(--ink-700); transition: background 0.18s, color 0.18s; white-space: nowrap;
}
.nav__link:hover { background: var(--green-50); color: var(--green-700); }
.nav__link.is-active { color: var(--green-700); background: var(--green-50); }

.nav__menu { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__actions .btn { white-space: nowrap; }
.nav__avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--green-100); transition: border-color 0.2s;
}
.nav__avatar:hover { border-color: var(--gold-500); }
.avatar-fallback {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.95rem;
}

.nav__toggle { display: none; background: none; border: none; width: 44px; height: 44px; border-radius: 10px; position: relative; }
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ''; position: absolute; left: 12px; width: 20px; height: 2.5px; background: var(--ink-900); border-radius: 4px; transition: 0.25s;
}
.nav__toggle span { top: 20px; }
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }
.nav__toggle.open span { background: transparent; }
.nav__toggle.open span::before { top: 0; transform: rotate(45deg); }
.nav__toggle.open span::after { top: 0; transform: rotate(-45deg); }

.bell-btn { position: relative; width: 42px; height: 42px; border-radius: 11px; background: var(--gray-100); display: grid; place-items: center; }
.bell-btn:hover { background: var(--green-50); }
.bell-btn .dot { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 4px; background: var(--red-600); color: #fff; border-radius: 999px; border: 2px solid #fff; font-size: 0.66rem; font-weight: 700; line-height: 1; display: grid; place-items: center; }

/* Slim the desktop nav between 1101px-1240px so links + actions never overflow the right edge */
@media (max-width: 1240px) and (min-width: 1101px) {
  .nav__inner { gap: 10px; }
  .nav__menu { gap: 6px; }
  .nav__actions { gap: 6px; }
  .nav__link { padding: 8px 11px; font-size: 0.87rem; }
  .nav__actions .btn { padding: 8px 12px; font-size: 0.82rem; }
  .brand__name { font-size: 1.2rem; }
  .brand__logo { width: 38px; height: 38px; font-size: 1.05rem; }
}

@media (max-width: 1100px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: fixed; top: var(--header-h); left: 0; right: 0; width: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 16px 20px 22px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 90; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav__menu.open { transform: translateY(0); }
  .nav__links { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav__link { padding: 13px 16px; font-size: 1rem; }
  .nav__actions {
    flex-direction: column; align-items: stretch; gap: 8px;
    margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--gray-200);
  }
  .nav__actions .btn { width: 100%; justify-content: center; }
  .nav__actions .inline-form { width: 100%; }
  .nav__actions .bell-btn, .nav__actions .nav__avatar-link { align-self: center; }
}

/* ================= Hero ================= */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(212, 175, 55, 0.16), transparent 60%),
    radial-gradient(900px 520px at -10% 10%, rgba(34, 197, 94, 0.16), transparent 55%),
    linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 55%, #0d7a3e 100%);
  color: #fff; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hero__inner { position: relative; z-index: 1; padding: 90px 20px 100px; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18); color: #fef9c3; padding: 7px 15px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; }
.hero__title { font-size: clamp(2.3rem, 5.4vw, 3.6rem); color: #fff; letter-spacing: -0.03em; line-height: 1.08; margin: 20px 0 16px; }
.hero__title .gold { color: var(--gold-500); }
.hero__title .green-light { color: #86efac; }
.hero__sub { color: rgba(255, 255, 255, 0.85); font-size: 1.08rem; max-width: 520px; margin-bottom: 30px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 34px; margin-top: 42px; flex-wrap: wrap; }
.hero__stat b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: #fff; }
.hero__stat span { color: rgba(255, 255, 255, 0.72); font-size: 0.85rem; }

.hero__visual { position: relative; }
.hero__plate {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 6px solid rgba(255, 255, 255, 0.25);
  aspect-ratio: 1 / 1.05; background: var(--green-50);
  display: grid; place-items: center; color: var(--green-200);
}
.hero__plate img { width: 100%; height: 100%; object-fit: cover; }
.hero__chip { position: absolute; display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.96); color: var(--ink-900);
  padding: 10px 16px; border-radius: 14px; box-shadow: var(--shadow-lg);
  font-size: 0.85rem; font-weight: 600; animation: float 5s ease-in-out infinite;
}
.hero__chip--tl { top: 22px; left: -18px; }
.hero__chip--br { bottom: 26px; right: -14px; animation-delay: 2.4s; }
.hero__chip .emoji { font-size: 1.25rem; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* Hero floating mini-cards (home) */
.hero__mini {
  position: absolute; display: flex; align-items: center; gap: 12px; z-index: 2;
  background: rgba(255, 255, 255, 0.97); color: var(--ink-900);
  padding: 10px 14px; border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: float 5s ease-in-out infinite;
}
.hero__mini--chef { top: 22px; left: -22px; padding-right: 18px; }
.hero__mini--dish { bottom: 22px; right: -16px; animation-delay: 2.2s; }
.hero__mini-avatar {
  width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  border: 3px solid #fff; box-shadow: var(--shadow-sm);
}
.hero__mini-avatar img, .hero__mini--dish > img { width: 100%; height: 100%; object-fit: cover; }
.hero__mini--dish > img { width: 54px; height: 54px; border-radius: 12px; }
.hero__mini-body { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.hero__mini-body b { font-size: 0.9rem; }
.hero__mini-body span { font-size: 0.78rem; color: var(--ink-500); max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero__mini-badge {
  position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--green-600); color: #fff; font-size: 0.7rem;
  display: grid; place-items: center; border: 2px solid #fff;
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; padding: 60px 20px; gap: 40px; }
  .hero__visual { max-width: 420px; margin: 0 auto; width: 100%; }
  .hero__chip--tl, .hero__mini--chef { left: 0; }
  .hero__chip--br, .hero__mini--dish { right: 0; }
}

/* ================= Page hero collage (about / services) ================= */
.page-hero { position: relative; overflow: hidden; padding: 80px 0 110px; }
.hero-collage {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  max-width: 980px; margin: 54px auto 0; position: relative; z-index: 1;
}
.hero-collage__item {
  position: relative; border-radius: 18px; overflow: hidden;
  aspect-ratio: 4 / 4.6; box-shadow: var(--shadow-lg);
  border: 4px solid rgba(255, 255, 255, 0.22); transform: translateY(14px);
}
.hero-collage__item--tall { transform: translateY(-14px); }
.hero-collage__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.hero-collage__item:hover img { transform: scale(1.08); }
.hero-collage__tag {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  background: rgba(13, 31, 20, 0.8); color: #fff; backdrop-filter: blur(4px);
  padding: 7px 10px; border-radius: 10px; font-size: 0.78rem; font-weight: 600; text-align: center;
}
@media (max-width: 760px) {
  .hero-collage { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 40px; }
  .hero-collage__item, .hero-collage__item--tall { transform: none; }
}

/* ================= Cards ================= */
.grid { display: grid; gap: 24px; }
.grid > * { min-width: 0; }
.grid--sidebar { grid-template-columns: minmax(0, 1fr) 340px; }
.grid--sidebar > * { min-width: 0; }
@media (max-width: 960px) { .grid--sidebar { grid-template-columns: 1fr; } }
.grid--dishes { grid-template-columns: repeat(3, 1fr); }
.grid--chefs { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1024px) { .grid--dishes, .grid--chefs { grid-template-columns: repeat(2, 1fr); } .grid--4, .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--dishes, .grid--chefs, .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.dish-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--gray-200); transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  display: flex; flex-direction: column; position: relative;
}
.dish-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--green-100); }
.dish-card__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--gray-100); }
.dish-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.dish-card:hover .dish-card__img img { transform: scale(1.06); }
.dish-card__img .badge { position: absolute; top: 12px; left: 12px; }
.dish-card__img .dish-card__fav {
  position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92); border: none; display: grid; place-items: center;
  font-size: 1rem; color: var(--ink-900); transition: 0.2s; box-shadow: var(--shadow-sm);
}
@media (hover: hover) {
  .dish-card__img .dish-card__fav:hover { transform: scale(1.12); color: var(--red-600); }
}
.dish-card__img .dish-card__fav.is-active { color: var(--red-600); }

.dish-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dish-card__title { font-size: 1.08rem; font-weight: 700; }
.dish-card__meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--ink-500); font-size: 0.82rem; }
.dish-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.dish-card__chef { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--gray-100); font-size: 0.86rem; color: var(--ink-500); }
.dish-card__chef img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.dish-card__foot { display: flex; gap: 10px; margin-top: 4px; }
.dish-card__foot .btn { flex: 1; }
.dish-card__foot .btn--ghost { flex: 0 0 auto; color: var(--ink-900); }
@media (hover: hover) {
  .dish-card__foot .btn--ghost:hover { color: var(--red-600); }
}
.dish-card__foot .btn--ghost.is-active { color: var(--red-600); background: var(--red-50); }

/* Chefs footer inside dish cards (stacked avatars) */
.dish-card__chefs {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 10px; min-height: 42px; flex-wrap: wrap;
}
.dish-card__chefs-label { font-size: 0.8rem; color: var(--ink-500); }
.dish-card__chefs-label--empty { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-400); font-size: 0.8rem; }
.dish-card__chefs-label--empty strong { color: var(--ink-500); font-weight: 600; }

/* Overlapping circular chef avatars */
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack__item {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  border: 2px solid #fff; margin-left: -10px; flex-shrink: 0;
  display: grid; place-items: center; text-decoration: none;
  background: var(--green-700); color: #fff;
  font-size: 0.72rem; font-weight: 700; line-height: 1;
  box-shadow: var(--shadow-sm); transition: transform 0.15s ease;
}
.avatar-stack__item:first-child { margin-left: 0; }
.avatar-stack__item:hover { transform: translateY(-3px); }
.avatar-stack__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-stack__more { background: var(--ink-700); }
.avatar-stack--lg .avatar-stack__item { width: 44px; height: 44px; margin-left: -12px; font-size: 0.8rem; }

/* Detail hero: chefs who cooked this dish */
.detail-hero__chefs { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.detail-hero__chefs-label { color: rgba(255, 255, 255, 0.75); font-size: 0.85rem; font-weight: 600; }
.detail-hero__chefs-link { color: var(--gold-500); font-size: 0.85rem; font-weight: 700; text-decoration: none; }
.detail-hero__chefs-link:hover { text-decoration: underline; }

.chef-card {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-200);
  padding: 26px 22px; text-align: center; transition: transform 0.22s, box-shadow 0.22s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.chef-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.chef-card__avatar { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 4px solid var(--green-50); }
.chef-card__name { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: 1.05rem; font-weight: 700; }
.chef-card__spec { color: var(--green-700); font-size: 0.85rem; font-weight: 600; }
.chef-card__loc { color: var(--ink-400); font-size: 0.82rem; display: inline-flex; align-items: center; gap: 5px; }
.chef-card__foot { margin-top: 12px; display: flex; gap: 10px; width: 100%; justify-content: center; }

/* Feature / spotlight card */
.spotlight {
  border-radius: var(--radius-lg); overflow: hidden; background: #fff;
  border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: 1fr 1fr; min-height: 320px;
}
.spotlight__img { position: relative; min-height: 260px; }
.spotlight__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spotlight__img .badge { position: absolute; top: 16px; left: 16px; }
.spotlight__body { padding: 34px 34px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.spotlight__title { font-size: 1.7rem; letter-spacing: -0.02em; }
.spotlight__desc { color: var(--ink-500); }
@media (max-width: 760px) { .spotlight { grid-template-columns: 1fr; } .spotlight__img { min-height: 200px; } }
@media (max-width: 600px) { .spotlight__body { padding: 40px 24px; } }

/* ================= Ranked lists ================= */
.rank-item { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 13px; background: #fff; border: 1px solid var(--gray-200); transition: box-shadow 0.2s, transform 0.2s; }
.rank-item:hover { box-shadow: var(--shadow-sm); transform: translateX(4px); }
.rank-item__num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--gold-500); width: 40px; text-align: center; flex-shrink: 0; }
.rank-item img { width: 62px; height: 62px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.rank-item__info { flex: 1; min-width: 0; }
.rank-item__name { font-weight: 700; display: flex; align-items: center; gap: 6px; font-size: 0.98rem; }
.rank-item__sub { color: var(--ink-400); font-size: 0.82rem; }
.rank-item__stat { color: var(--green-700); font-weight: 700; font-size: 0.85rem; white-space: nowrap; }

/* ================= Auth pages ================= */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1.1fr; }
.auth__panel {
  background: linear-gradient(160deg, var(--green-900), var(--green-700) 70%, #0b6b38);
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth__panel::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px); background-size: 24px 24px; }
.auth__panel > * { position: relative; z-index: 1; }
.auth__panel-quote { font-size: 1.5rem; line-height: 1.45; font-family: var(--font-display); max-width: 460px; }
.auth__panel-quote .gold { color: var(--gold-500); }
.auth__panel-foot { font-size: 0.85rem; color: rgba(255,255,255,0.75); }

.auth__form { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.auth__card { width: 100%; max-width: 430px; }
.auth__card .brand { margin-bottom: 26px; }
.auth__title { font-size: 1.8rem; letter-spacing: -0.02em; margin-bottom: 6px; }
.auth__sub { color: var(--ink-500); margin-bottom: 26px; }

.role-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--gray-100); padding: 5px; border-radius: 12px; margin-bottom: 22px; }
.role-tabs button {
  border: none; background: transparent; padding: 10px; border-radius: 9px;
  font-weight: 700; font-size: 0.92rem; color: var(--ink-500); transition: 0.2s;
}
.role-tabs button.is-active { background: #fff; color: var(--green-700); box-shadow: var(--shadow-sm); }

.auth__foot { text-align: center; margin-top: 22px; font-size: 0.9rem; color: var(--ink-500); }
.auth__sep { display: flex; align-items: center; gap: 12px; color: var(--ink-300); font-size: 0.8rem; margin: 20px 0; }
.auth__sep::before, .auth__sep::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth__panel { display: none; }
}

/* ================= Dashboard layout ================= */
.dash { display: grid; grid-template-columns: 252px 1fr; min-height: calc(100vh - var(--header-h)); }
.dash__side {
  background: #fff; border-right: 1px solid var(--gray-200);
  padding: 24px 16px; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.dash__nav { display: flex; flex-direction: column; gap: 4px; }
.dash__link {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: 11px; font-weight: 600; font-size: 0.92rem; color: var(--ink-500); transition: 0.18s;
}
.dash__link:hover { background: var(--green-50); color: var(--green-700); }
.dash__link.is-active { background: var(--green-700); color: #fff; box-shadow: var(--shadow-sm); }
.dash__link .dash__count { margin-left: auto; background: var(--gold-500); color: var(--ink-900); font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.dash__link.is-active .dash__count { background: #fff; }

.dash__main { padding: 30px 34px 60px; min-width: 0; }
.dash__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.dash__title { font-size: 1.6rem; letter-spacing: -0.02em; }
.dash__crumb { color: var(--ink-400); font-size: 0.84rem; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 20px; display: flex; align-items: center; gap: 16px; transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; flex-shrink: 0; }
.stat-card__icon--green { background: var(--green-50); }
.stat-card__icon--gold { background: var(--gold-50); }
.stat-card__icon--gray { background: var(--gray-100); }
.stat-card__value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.stat-card__label { color: var(--ink-500); font-size: 0.84rem; }

@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

/* Dash burger (mobile only) */
.dash__burger { display: none; background: none; border: none; padding: 0; cursor: pointer; }
.dash__backdrop { display: none; }

@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }

  .dash__burger {
    display: inline-flex; align-items: center; justify-content: center;
    position: relative;
    width: 28px; height: 28px; margin: 14px 0 0 16px;
    background: #fff; border: 1px solid var(--gray-200); border-radius: 8px;
    box-shadow: var(--shadow-sm); z-index: 105;
  }
  .dash__burger span, .dash__burger span::before, .dash__burger span::after {
    content: ''; position: absolute; left: 8px; width: 12px; height: 2px;
    background: var(--ink-900); border-radius: 4px; transition: 0.25s;
  }
  .dash__burger span { top: 13px; }
  .dash__burger span::before { top: -4px; }
  .dash__burger span::after { top: 4px; }
  .dash__burger.open span { background: transparent; }
  .dash__burger.open span::before { top: 0; transform: rotate(45deg); }
  .dash__burger.open span::after { top: 0; transform: rotate(-45deg); }

  .dash__side {
    position: fixed; top: var(--header-h); bottom: 0; left: 0;
    width: 268px; max-width: 85vw;
    border-right: 1px solid var(--gray-200); border-bottom: none;
    padding: 18px 14px; height: auto;
    overflow-y: auto; z-index: 120;
    transform: translateX(-105%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
  }
  .dash__side.open { transform: translateX(0); }
  .dash__nav { flex-direction: column; align-items: stretch; gap: 4px; }

  .dash__backdrop {
    display: block; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: rgba(12, 15, 13, 0.5); backdrop-filter: blur(2px);
    z-index: 115; opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
  }
  .dash__backdrop.open { opacity: 1; pointer-events: auto; }

  .dash__main { padding: 22px 16px 50px; }
}
@media (max-width: 560px) { .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; } }

/* Panel */
.panel { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel__head { padding: 18px 22px; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.panel__title { font-size: 1.05rem; font-weight: 700; }
.panel__body { padding: 22px; }

/* ================= Tables ================= */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; max-width: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; padding: 12px 14px; background: var(--off-white); color: var(--ink-500); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; white-space: nowrap; }
.table tr:hover td { background: var(--green-50); }
.table .user-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
@media (max-width: 900px) {
  .table-wrap .table { min-width: 620px; }
}
.table .user-cell img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.table .user-cell a.dish-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.table .icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: var(--gray-100); color: var(--ink-500); text-decoration: none; font-size: 0.8rem; line-height: 1; transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.table .icon-btn:hover { background: var(--green-100); color: var(--green-700); transform: translateY(-1px); }

/* ================= Toasts / alerts ================= */
.alert { padding: 14px 18px; border-radius: 12px; font-size: 0.92rem; margin-bottom: 18px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid; }
.alert--success { background: var(--green-50); border-color: var(--green-100); color: var(--green-800); }
.alert--error { background: var(--red-50); border-color: #fecaca; color: var(--red-600); }
.alert--warning { background: var(--gold-50); border-color: var(--gold-100); color: var(--gold-600); }

.toasts { position: fixed; top: 18px; right: 22px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast { background: var(--ink-900); color: #fff; padding: 14px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 0.9rem; display: flex; gap: 10px; align-items: flex-start; animation: slideIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.toast--success { background: var(--green-700); }
.toast--error { background: var(--red-600); }
.toast--gold { background: var(--gold-500); color: var(--ink-900); }
.toast.hide { animation: slideOut 0.3s forwards; }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideOut { to { transform: translateX(120%); opacity: 0; } }

/* ================= Scroll to top ================= */
.scroll-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 95;
  width: 46px; height: 46px; border-radius: 13px; border: none; cursor: pointer;
  display: grid; place-items: center;
  background: var(--green-700); color: #fff;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background 0.2s ease;
}
.scroll-top svg { display: block; }
.scroll-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--green-800); }
.scroll-top:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }
@media (max-width: 600px) { .scroll-top { right: 16px; bottom: 16px; width: 42px; height: 42px; border-radius: 11px; } }

/* ================= Contact page ================= */
.contact-info { display: grid; gap: 16px; }
.contact-info__item { display: flex; gap: 14px; align-items: flex-start; }
.contact-info__icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; font-size: 1.1rem; }
.contact-info__item h4 { font-size: 0.95rem; margin: 1px 0 2px; }
.contact-info__item a { color: var(--ink-600); font-size: 0.92rem; }
.contact-info__item a:hover { color: var(--green-700); }
.contact-info__item p { color: var(--ink-400); font-size: 0.82rem; margin: 0; }
.contact-social { display: grid; gap: 10px; }
.contact-social a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--gray-200); border-radius: 12px; color: var(--ink-700); font-size: 0.92rem; font-weight: 600; text-decoration: none; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.contact-social .cs-icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: var(--gray-100); color: var(--ink-700); transition: background 0.2s, color 0.2s; }
.contact-social a:hover { border-color: var(--green-600); background: var(--green-50); color: var(--green-700); transform: translateX(3px); }
.contact-social a:hover .cs-icon { background: var(--green-700); color: #fff; }
.contact-social .cs-handle { margin-left: auto; color: var(--ink-400); font-weight: 500; font-size: 0.85rem; }

/* ================= Infinite scroll ================= */
.scroll-sentinel { height: 1px; }
.scroll-loader { display: flex; justify-content: center; padding: 30px 0; }
.scroll-loader.hidden, .scroll-end.hidden { display: none; }
.spinner { width: 38px; height: 38px; border: 4px solid var(--green-100); border-top-color: var(--green-700); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scroll-end { text-align: center; padding: 22px 0 10px; color: var(--ink-400); font-size: 0.88rem; }

/* Skeleton */
.skeleton { position: relative; overflow: hidden; background: var(--gray-100); border-radius: 12px; }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ================= Modal ================= */
.modal-backdrop { position: fixed; inset: 0; background: rgba(12, 15, 13, 0.55); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 200; padding: 18px; opacity: 0; pointer-events: none; transition: opacity 0.22s; }
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal { background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; padding: 28px; transform: translateY(16px) scale(0.98); transition: transform 0.22s; }
.modal-backdrop.open .modal { transform: none; }
.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal__title { font-size: 1.2rem; }
.modal__close { background: var(--gray-100); border: none; width: 36px; height: 36px; border-radius: 10px; font-size: 1.1rem; color: var(--ink-500); }
.modal__close:hover { background: var(--red-50); color: var(--red-600); }

/* ================= Recipe / detail ================= */
.detail-hero { background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: #fff; padding: 56px 0 74px; position: relative; overflow: hidden; }
.detail-hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px); background-size: 24px 24px; }
.detail-hero .container { position: relative; z-index: 1; }
.detail-hero__title { color: #fff; font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -0.02em; margin: 14px 0 8px; }
.detail-hero__sub { color: rgba(255,255,255,0.85); max-width: 640px; }
.detail-hero__badges { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.detail-hero__badges .badge { background: rgba(255,255,255,0.15); color: #fff; }

.gallery { margin-top: -44px; position: relative; z-index: 2; }
.gallery__main { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 6px solid #fff; aspect-ratio: 16 / 8; background: var(--gray-100); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 12px; }
.gallery__thumbs button { border: 3px solid #fff; border-radius: 12px; overflow: hidden; padding: 0; background: none; box-shadow: var(--shadow-sm); aspect-ratio: 4/3; transition: transform 0.2s; }
.gallery__thumbs button:hover { transform: scale(1.04); }
.gallery__thumbs button.is-active { border-color: var(--gold-500); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.recipe-tabs { display: flex; gap: 8px; border-bottom: 2px solid var(--gray-100); margin-bottom: 26px; overflow-x: auto; }
.recipe-tab { background: none; border: none; padding: 13px 20px; font-weight: 700; font-size: 0.95rem; color: var(--ink-500); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.recipe-tab:hover { color: var(--green-700); }
.recipe-tab.is-active { color: var(--green-700); border-color: var(--gold-500); }

.recipe-pane { display: none; animation: fadeUp 0.3s ease; scroll-margin-top: calc(var(--header-h) + 20px); }
.recipe-pane.is-active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.ing-list li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--gray-200); align-items: flex-start; }
.ing-list li::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--green-600); margin-top: 8px; flex-shrink: 0; }

.step-list { counter-reset: step; display: grid; gap: 14px; }
.step-item { display: flex; gap: 16px; padding: 18px; background: var(--off-white); border-radius: var(--radius); border: 1px solid var(--gray-100); }
.step-item__num { counter-increment: step; width: 38px; height: 38px; border-radius: 50%; background: var(--green-700); color: #fff; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }

.chef-strip { display: flex; align-items: center; gap: 14px; background: var(--off-white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 14px 18px; }
.chef-strip img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.chef-strip__name { font-weight: 700; display: flex; align-items: center; gap: 6px; }

/* Chef cards inside the dish recipe "Chefs" tab (clean vertical layout) */
.grid-recipe-chefs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.chef-mini {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 22px 16px 18px; background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius); transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.chef-mini:hover { box-shadow: var(--shadow-sm); border-color: var(--green-100); transform: translateY(-3px); }
.chef-mini__avatar {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 4px solid var(--green-50);
  font-size: 1.9rem; display: inline-flex; align-items: center; justify-content: center;
}
.chef-mini__name { font-weight: 700; display: flex; align-items: center; gap: 6px; justify-content: center; font-size: 0.98rem; }
.chef-mini__avatar.avatar-initial { width: 88px; height: 88px; border-radius: 50%; font-size: 1.9rem; }
.chef-mini__meta { color: var(--ink-400); font-size: 0.82rem; line-height: 1.4; }
.chef-mini .btn { width: 100%; justify-content: center; margin-top: 4px; }
@media (max-width: 480px) { .grid-recipe-chefs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }

.review-card { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 18px; }
.review-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.review-card__head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.review-card__name { font-weight: 700; font-size: 0.94rem; }
.review-card__date { color: var(--ink-400); font-size: 0.78rem; }
.review-card__stars { color: var(--gold-500); font-size: 0.95rem; margin-left: auto; }

.stars { color: var(--gold-500); letter-spacing: 2px; }
.stars--input { font-size: 1.6rem; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.stars--input input { display: none; }
.stars--input label { cursor: pointer; color: var(--gray-300); transition: color 0.15s, transform 0.15s; }
.stars--input label:hover, .stars--input label:hover ~ label { color: var(--gold-500); transform: scale(1.15); }
.stars--input input:checked ~ label { color: var(--gold-500); }

/* ================= Chef profile ================= */
.chef-hero { background: linear-gradient(135deg, var(--green-900), var(--green-700)); position: relative; overflow: hidden; }
.chef-hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px); background-size: 24px 24px; }
.chef-hero__inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 34px; padding: 54px 20px 60px; flex-wrap: wrap; }
.chef-hero img.chef-avatar { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; border: 5px solid rgba(255,255,255,0.3); box-shadow: var(--shadow-lg); }
.chef-hero__info { flex: 1; min-width: 260px; color: #fff; }
.chef-hero__name { color: #fff; font-size: 1.65rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chef-hero__meta { display: flex; gap: 20px; margin: 12px 0 18px; flex-wrap: wrap; color: rgba(255,255,255,0.85); font-size: 0.92rem; }
.chef-hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.chef-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { width: 42px; height: 42px; border-radius: 11px; background: var(--gray-100); display: grid; place-items: center; color: var(--ink-700); font-size: 1.05rem; transition: 0.2s; }
.socials a svg { display: block; }
.socials a:hover { background: var(--green-700); color: #fff; transform: translateY(-3px); }
.info-list a { color: var(--green-700); text-decoration: none; word-break: break-word; }
.info-list a:hover { text-decoration: underline; }

.info-list { display: grid; gap: 12px; }
.info-list li { display: flex; gap: 12px; padding: 12px 14px; background: var(--off-white); border-radius: 10px; font-size: 0.92rem; }
.info-list li b { min-width: 110px; color: var(--ink-500); font-weight: 600; }

/* ================= Footer ================= */
.footer { background: var(--ink-900); color: rgba(255,255,255,0.75); margin-top: auto; }
.footer__top { padding: 64px 0 44px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.footer__brand .brand__name { color: #fff; }
.footer__brand p { font-size: 0.9rem; margin: 14px 0 18px; max-width: 300px; }
.footer h5 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer__links { display: grid; gap: 9px; }
.footer__links a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer__links a:hover { color: var(--gold-500); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; font-size: 0.82rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer__bottom span:first-child b { color: var(--gold-500); }
@media (max-width: 900px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__top { grid-template-columns: 1fr; } }

/* ================= Misc ================= */
.divider { height: 1px; background: var(--gray-200); border: none; margin: 22px 0; }

.add-row-btn { width: 100%; border-style: dashed; border-width: 1.5px; border-color: var(--green-600); color: var(--green-700); background: var(--green-50); padding: 12px; margin-top: 4px; font-weight: 600; transition: background 0.18s, color 0.18s; }
.add-row-btn:hover { background: var(--green-100); color: var(--green-800); }

.empty-state { text-align: center; padding: 60px 20px; }
.empty-state__icon { width: 74px; height: 74px; border-radius: 50%; background: var(--green-50); color: var(--green-600); display: grid; place-items: center; margin: 0 auto 18px; font-size: 1.8rem; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 6px; }
.empty-state p { color: var(--ink-500); margin-bottom: 20px; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--gray-200); font-weight: 600; font-size: 0.9rem; color: var(--ink-700); }
.pagination a:hover { border-color: var(--green-600); color: var(--green-700); }
.pagination .is-current { background: var(--green-700); color: #fff; border-color: var(--green-700); }

.filters-bar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 16px 0; }
.filters-bar .form-search { flex: 1; min-width: 220px; }

.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--gray-200); background: #fff; font-weight: 600; font-size: 0.86rem; color: var(--ink-500); transition: 0.2s; }
.filter-chip:hover { border-color: var(--green-600); color: var(--green-700); }
.filter-chip.is-active { background: var(--green-700); color: #fff; border-color: var(--green-700); }

.breadcrumb { font-size: 0.85rem; color: var(--ink-400); margin-bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.breadcrumb a { color: var(--green-700); }

.prose p { margin-bottom: 14px; color: var(--ink-500); }
.prose h3 { margin: 24px 0 10px; }
.prose ul { list-style: disc; padding-left: 22px; color: var(--ink-500); display: grid; gap: 8px; }
.prose li::marker { color: var(--gold-500); }

.hidden { display: none !important; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.plan { background: #fff; border: 2px solid var(--gray-200); border-radius: var(--radius-lg); padding: 30px 26px; text-align: center; transition: 0.25s; position: relative; display: flex; flex-direction: column; }
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--green-200); }
.plan--featured { border-color: var(--gold-500); box-shadow: 0 14px 34px rgba(212,175,55,0.18); }
.plan--featured::before { content: 'BEST VALUE'; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--gold-500); color: var(--ink-900); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; padding: 5px 14px; border-radius: 999px; }
.plan__name { font-size: 1.15rem; font-weight: 800; }
.plan__price { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; color: var(--green-700); margin: 12px 0 2px; }
.plan__price small { font-size: 1rem; color: var(--ink-400); font-weight: 600; }
.plan__period { color: var(--ink-400); font-size: 0.86rem; margin-bottom: 20px; }
.plan__features { text-align: left; display: grid; gap: 10px; margin-bottom: 24px; }
.plan__features li { display: flex; gap: 9px; align-items: flex-start; font-size: 0.9rem; color: var(--ink-500); }
.plan__features li::before { content: '\2713'; color: var(--green-600); font-weight: 800; flex-shrink: 0; }
.plan .btn { margin-top: auto; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }

.avatar-initial { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, var(--green-600), var(--green-800)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; flex-shrink: 0; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

.bg-green-gradient { background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: #fff; }
.text-gold { color: var(--gold-500); }


/* Chat */
.chat { display: grid; grid-template-columns: 300px 1fr; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); background: #fff; overflow: hidden; min-height: 520px; }
.chat__list { border-right: 1px solid var(--gray-200); background: var(--off-white); display: flex; flex-direction: column; }
.chat__list-head { padding: 14px 18px; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.04em; color: var(--ink-400); border-bottom: 1px solid var(--gray-200); background: #fff; }
.chat__threads { overflow-y: auto; max-height: 600px; }
.chat__thread-link { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--gray-100); text-decoration: none; transition: background 0.18s; position: relative; }
.chat__thread-link:hover { background: #fff; }
.chat__thread-link.is-active { background: #fff; box-shadow: inset 3px 0 0 var(--green-600); }
.chat__avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.chat__avatar--initial { background: linear-gradient(135deg, var(--green-600), var(--green-800)); color: #fff; display: grid; place-items: center; font-weight: 800; }
.chat__thread-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.chat__thread-name { font-weight: 700; font-size: 0.9rem; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__thread-last { font-size: 0.8rem; color: var(--ink-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__unread { background: var(--green-600); color: #fff; font-size: 0.72rem; font-weight: 800; border-radius: 999px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px; }
.chat__empty { color: var(--ink-400); font-size: 0.9rem; text-align: center; padding: 22px 14px; }

.chat__thread { display: flex; flex-direction: column; min-width: 0; }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--gray-200); background: #fff; }
.chat__name { font-weight: 800; font-size: 0.98rem; }
.chat__sub { font-size: 0.8rem; color: var(--ink-400); }
.chat__body { flex: 1; overflow-y: auto; max-height: 440px; padding: 20px 18px; display: flex; flex-direction: column; gap: 12px; background: var(--off-white); }
.chat__msg { max-width: 72%; align-self: flex-start; display: grid; gap: 3px; }
.chat__msg--mine { align-self: flex-end; }
.chat__bubble { background: #fff; border: 1px solid var(--gray-200); border-radius: 14px 14px 14px 4px; padding: 10px 14px; font-size: 0.92rem; line-height: 1.5; color: var(--ink-800); white-space: pre-wrap; word-break: break-word; }
.chat__msg--mine .chat__bubble { background: var(--green-600); color: #fff; border-color: var(--green-600); border-radius: 14px 14px 4px 14px; }
.chat__time { font-size: 0.7rem; color: var(--ink-400); padding: 0 4px; }
.chat__msg--mine .chat__time { text-align: right; }
.chat__form { display: flex; gap: 10px; align-items: flex-end; padding: 14px 18px; border-top: 1px solid var(--gray-200); background: #fff; }
.chat__input { flex: 1; resize: none; margin: 0; }
.chat__placeholder { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; padding: 40px 24px; gap: 6px; }
.chat__placeholder-icon { font-size: 2.6rem; }
.chat__placeholder h3 { margin: 8px 0 4px; }
.chat__placeholder p { color: var(--ink-400); max-width: 320px; }

@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; }
  .chat__list { max-height: 220px; border-right: none; border-bottom: 1px solid var(--gray-200); }
  .chat__threads { max-height: 220px; }
}

/* ================= Global responsive refinements ================= */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section { padding: 52px 0; }
  .page-hero { padding: 56px 0 80px; }
  .hero-collage { margin-top: 36px; }
  .section__head { flex-direction: column; align-items: flex-start; }
  .section__head .btn { align-self: flex-start; }
  .panel__body { padding: 18px; }
  .panel__head { padding: 16px 18px; }
  .footer__top { padding: 48px 0 36px; }
  .dash__header { flex-direction: column; align-items: flex-start; }
  .gallery__thumbs { grid-template-columns: repeat(3, 1fr); }
  .spotlight__body { padding: 26px 22px; }
  .plan { padding: 26px 20px; }
  .toasts { right: 14px; left: 14px; max-width: none; }
  .modal { padding: 22px; }
  .auth__card { max-width: 400px; }
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .hero__inner { padding: 56px 16px 64px; gap: 34px; }
  .hero__title { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__stats { gap: 20px; }
  .hero__stat b { font-size: 1.35rem; }
  .hero__stat span { font-size: 0.78rem; }
  .hero__mini { padding: 8px 10px; border-radius: 13px; }
  .hero__mini--chef { left: 0; top: 8px; }
  .hero__mini--dish { right: 0; bottom: 8px; }
  .hero__mini-avatar, .hero__mini--dish > img { width: 40px; height: 40px; }
  .hero__mini-body b { font-size: 0.82rem; }
  .hero__mini-body span { font-size: 0.72rem; }
  .filters-bar .select-wrap { flex: 1 1 100%; }
  .filters-bar .select-wrap select { width: 100%; }
  .filters-bar .form-search { flex: 1 1 100%; min-width: 0; max-width: none; }
  .info-list li { flex-direction: column; gap: 4px; }
  .info-list li b { min-width: 0; }
  .rank-item { gap: 12px; padding: 12px; }
  .rank-item img { width: 52px; height: 52px; }
  .rank-item__num { width: 30px; font-size: 1.2rem; }
  .auth__form { padding: 28px 16px; }
  .dash__main { padding: 18px 14px 44px; }
  .dash__side { padding: 10px 14px; }
  .stat-card { padding: 16px; }
  .chef-hero__inner { padding: 40px 16px 44px; gap: 22px; justify-content: center; text-align: center; }
  .chef-hero__info { min-width: 0; }
  .chef-hero__meta { justify-content: center; }
  .detail-hero { padding: 40px 0 60px; }
  .gallery__main { aspect-ratio: 16 / 11; }
  .review-card { padding: 15px; }
  .table th, .table td { padding: 10px 12px; }
  .footer__bottom { justify-content: center; text-align: center; }
  .brand__name { font-size: 1.15rem; }
  .section__title { font-size: 1.6rem; }
  .dash__title { font-size: 1.35rem; }
  .empty-state { padding: 44px 16px; }
  .modal-backdrop { padding: 12px; }
}

@media (max-width: 400px) {
  .hero-collage { gap: 8px; }
  .hero-collage__item { border-radius: 12px; border-width: 3px; }
  .hero-collage__tag { font-size: 0.66rem; padding: 5px 8px; }
  .plan__price { font-size: 2rem; }
  .step-item { flex-direction: column; }
  .step-item__num { width: 34px; height: 34px; }
  .chef-card__foot { flex-direction: column; align-items: stretch; }
  .chef-card__foot .btn { width: 100%; }
}

/* =========================================================
   Fluid & responsive refinements
   ========================================================= */

/* Never let long words, emails or links blow the layout open */
.dash__main,
.panel__body,
.prose,
.info-list,
.chat__bubble,
.rank-item__info,
.dish-card__body,
.contact-info__item,
.chef-hero__info { min-width: 0; overflow-wrap: anywhere; }

/* Uniform, visible keyboard focus for interactive elements */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[role='button']:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }

/* Anchored sections clear the sticky header when jump-linked */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Rows of cards/strips must wrap instead of overflowing narrow screens */
.dish-card__foot,
.chef-strip,
.chat__head,
.chat__form { flex-wrap: wrap; }
.rank-item .btn,
.rank-item form { flex-shrink: 0; }

/* Dynamic ingredient / procedure rows (admin + chef forms) */
.form-group.dynamic-row { display: flex; gap: 10px; align-items: center; }
.form-group.dynamic-row > .form-control,
.form-group.dynamic-row > textarea { flex: 1 1 auto; min-width: 0; }
.form-group.dynamic-row .step-item__num { flex-shrink: 0; }
.form-group.dynamic-row .btn.row-remove { flex-shrink: 0; margin: 0; }

/* Notification list items */
.notif-item { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.notif-item > div { flex: 1 1 0; min-width: 0; }
.notif-item > .btn { flex: 0 0 auto; }
@media (max-width: 700px) { .notif-item__msg { display: none; } }

/* Highlighted spotlight variants (homepage) */
.cta-card {
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  border: none; color: #fff;
}
.cta-card .spotlight__body {
  text-align: center; align-items: center;
  padding: clamp(40px, 7vw, 56px) clamp(20px, 6vw, 40px);
}
.cta-card .spotlight__title { color: #fff; }
.cta-card p { color: rgba(255, 255, 255, 0.85); max-width: 460px; }
.cta-card .hero__actions { justify-content: center; }

.spotlight--dark { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.15); }
.spotlight--dark .spotlight__title { color: #fff; }
.spotlight--dark .spotlight__body p { color: rgba(255, 255, 255, 0.8); }

.eyebrow--on-dark { color: #fde68a; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); }

/* Stat cards must never push their label out of the card */
.stat-card { min-width: 0; }
.stat-card > div:last-child { min-width: 0; }

/* Chat polish */
.chat__thread-main,
.chat__head > div { min-width: 0; }
.chat__thread-link { min-width: 0; }

/* Move recipe tabs onto their own line below the action buttons */
@media (max-width: 640px) {
  .recipe-tabs { width: 100%; }
  .recipe-tab { flex: 1; text-align: center; padding: 12px 10px; font-size: 0.9rem; }
}

/* Chef profile hero actions stack into friendly tap targets */
@media (max-width: 600px) {
  .chef-hero__actions { justify-content: center; }
}
@media (max-width: 480px) {
  .chef-hero__actions { flex-direction: column; align-items: stretch; width: 100%; }
  .chef-hero__actions .btn { width: 100%; justify-content: center; }
}

/* Dashboard main keeps breathing room on smaller laptops */
@media (max-width: 1200px) and (min-width: 901px) {
  .dash__main { padding: 26px 24px 54px; }
}

@media (max-width: 480px) {
  .dash__header > .btn,
  .dash__header > a.btn { width: 100%; justify-content: center; }

  .chef-hero__name { font-size: 1.05rem; }

  .section__head .btn { width: 100%; justify-content: center; }

  .filters-bar .btn { flex: 1 1 100%; justify-content: center; }
  .filters-bar .form-search button { padding: 10px 16px; }

  .gallery__thumbs { gap: 8px; }
  .gallery__thumbs button { border-radius: 9px; border-width: 2px; }

  .dash__header .form-search { max-width: 100% !important; }

  .chat__msg { max-width: 88%; }
  .chat__head { gap: 8px; }

  .auth__form { padding: 28px 16px; align-content: safe center; }
  .role-tabs button { padding: 11px 6px; font-size: 0.88rem; }

  .stat-grid { gap: 12px; }
  .stat-card { padding: 14px; gap: 12px; }
  .stat-card__icon { width: 44px; height: 44px; font-size: 1.2rem; border-radius: 11px; }
  .stat-card__value { font-size: 1.3rem; }

  .rank-item { gap: 10px; }
  .rank-item img { width: 46px; height: 46px; border-radius: 10px; }
  .rank-item__num { width: 26px; font-size: 1.1rem; }

  .hero__inner { padding: 44px 16px 52px; }
  .hero__stat { flex: 1 1 40%; }
}

@media (max-width: 360px) {
  .plan__features li { font-size: 0.86rem; }
  .plan { padding: 24px 16px; }
  .badge { font-size: 0.66rem; padding: 3px 8px; }
}

/* =========================================================
   Password visibility toggle
   ========================================================= */
.password-field { position: relative; }
.password-field .form-control { padding-right: 46px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: none; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--ink-400); border-radius: 9px;
  transition: color 0.18s, background 0.18s;
}
.password-toggle:hover { color: var(--green-700); background: var(--green-50); }
.password-toggle:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }
.password-toggle.is-visible { color: var(--green-700); }
.password-toggle svg { width: 19px; height: 19px; }

/* =========================================================
   Email notification toggle row
   ========================================================= */
.notif-toggle { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.notif-toggle .switch { flex-shrink: 0; }
@media (max-width: 480px) {
  .notif-toggle { align-items: flex-start; }
  .notif-toggle .switch { margin-top: 2px; }
  .notif-toggle-panel .panel__body { padding: 16px; }
}
@media (max-width: 560px) {
  .notif-toggle { flex-direction: column; align-items: stretch; gap: 14px; }
  .notif-toggle .switch { align-self: flex-start; }
  .notif-toggle .btn { width: 100%; justify-content: center; }
}

/* =========================================================
   Chef profile: mobile column ordering
   ========================================================= */
.chef-profile-col { min-width: 0; }
@media (min-width: 761px) {
  .chef-profile-col { display: flex; flex-direction: column; }
  .chef-profile-col .chef-profile-about { order: 1; }
  .chef-profile-col .chef-profile-custom { order: 2; }
  .chef-profile-col .chef-profile-repertoire { order: 3; }
  .chef-profile-col .chef-profile-reviews { order: 4; }
}
@media (max-width: 760px) {
  .chef-profile-col { display: flex; flex-direction: column; }
  .chef-profile-col > * { order: 10; }
  .chef-profile-col .chef-profile-about { order: 1; }
  .chef-profile-col .chef-profile-custom { order: 2; }
  .chef-profile-col .chef-profile-repertoire { order: 3; }
  .chef-profile-col .chef-profile-reviews { order: 4; }
  .chef-hero__inner { flex-direction: column; align-items: center; gap: 18px; text-align: center; }
  .chef-hero__info { display: flex; flex-direction: column; align-items: center; width: 100%; }
  .chef-hero__name { width: 100%; justify-content: center; font-size: 1.15rem; }
  .chef-hero__info > p { font-size: 0.88rem; }
  .chef-hero__meta { justify-content: center; }
  .chef-hero__actions { justify-content: center; }
}

/* =========================================================
   Repertoire rows: stack name + actions on narrow screens
   ========================================================= */
.rank-item--stack { flex-wrap: wrap; }
@media (max-width: 620px) {
  .rank-item--stack .rank-item__info { flex: 1 1 100%; order: 2; }
  .rank-item--stack img { order: 1; }
  .rank-item--stack .rank-item__info .rank-item__name { white-space: normal; overflow-wrap: anywhere; }
  .rank-item--stack > .btn, .rank-item--stack > form { order: 3; }
}

/* =========================================================
   Chat: mobile full-height conversation with back button
   ========================================================= */
.chat__back {
  display: none; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: none; border-radius: 8px;
  background: var(--gray-100); color: var(--ink-700); cursor: pointer;
  font-size: 0.95rem; flex-shrink: 0; transition: background 0.18s, color 0.18s;
}
.chat__back:hover { background: var(--green-50); color: var(--green-700); }
.chat__partner {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  text-decoration: none; color: inherit; border-radius: 12px;
  padding: 4px 10px 4px 4px; transition: background 0.18s;
}
a.chat__partner:hover { background: var(--green-50); color: inherit; }
.chat__partner .chat__avatar { width: 36px; height: 36px; flex-shrink: 0; }
.chat__partner-info { min-width: 0; display: grid; gap: 2px; }
.chat__partner-info .chat__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .chat { display: block; }
  .chat:not(.is-open) .chat__thread { display: none; }
  .chat.is-open .chat__list { display: none; }
  .chat.is-open .chat__thread { height: 100%; min-height: 0; }
  .chat.is-open .chat__body { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
  .chat__back { display: inline-flex; }
  .chat__head { flex-wrap: nowrap; }
  .chat__form { flex-direction: column; align-items: stretch; gap: 8px; }
  .chat__form .chat__input { width: 100%; }
  .chat__form .btn { width: 100%; justify-content: center; }
}
@media (max-width: 900px) {
  .dash--chat-open .dash__burger, .dash--chat-open .dash__backdrop { display: none !important; }
}
@media (max-width: 760px) {
  body.chat-open .nav { display: none; }
  body.chat-open { overflow: hidden; }
  .dash--chat-open { display: block; min-height: 0; height: 100dvh; overflow: hidden; }
  .dash--chat-open .dash__header { display: none; }
  .dash--chat-open .dash__main { padding: 0; height: 100dvh; overflow: hidden; }
  .dash--chat-open .chat { height: 100dvh; min-height: 0; max-height: 100dvh; border-radius: 0; }
  .dash--chat-open .chat.is-open .chat__thread { height: 100%; min-height: 0; overflow: hidden; }
  .dash--chat-open .chat.is-open .chat__body { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .dash--chat-open .chat__head { padding: 8px 12px; gap: 8px; }
  .dash--chat-open .chat__back { width: 30px; height: 30px; border-radius: 8px; font-size: 0.9rem; }
  .dash--chat-open .chat__partner { gap: 8px; padding: 2px 8px 2px 2px; }
  .dash--chat-open .chat__partner .chat__avatar { width: 32px; height: 32px; }
  .dash--chat-open .chat__partner-info .chat__name { font-size: 0.9rem; }
  .dash--chat-open .chat__partner-info .chat__sub { font-size: 0.72rem; }
  .dash--chat-open .chat__form { flex-direction: row; align-items: flex-end; gap: 8px; padding: 8px 12px; }
  .dash--chat-open .chat__form .chat__input { width: auto; flex: 1; min-width: 0; height: 52px; min-height: 52px; max-height: 52px; font-size: 0.9rem; line-height: 1.3; padding: 10px 14px; resize: none; overflow-y: auto; }
  .dash--chat-open .chat__form .btn { width: auto; flex-shrink: 0; height: 52px; padding: 0 18px; justify-content: center; font-size: 0.9rem; }
}

/* =========================================================
   Dark mode
   ========================================================= */
html[data-theme='dark'] {
  --green-900: #0b3d22;
  --green-800: #0f512c;
  --green-700: #16a34a;
  --green-600: #22c55e;
  --green-500: #4ade80;
  --green-100: #16311f;
  --green-50: #13231a;

  --gold-600: #e3b93b;
  --gold-500: #d4af37;
  --gold-400: #e5c55c;
  --gold-100: #3a3115;
  --gold-50: #2a2412;

  --ink-900: #f3f6f4;
  --ink-700: #d1d9d4;
  --ink-500: #a3ada6;
  --ink-400: #8b958e;
  --ink-300: #6b756e;

  --white: #12151a;
  --off-white: #171b21;
  --gray-100: #1d2229;
  --gray-200: #2a3038;
  --gray-300: #3a424c;

  --red-600: #ef4444;
  --red-50: #3a1d1d;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 45px rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 3px rgba(74, 222, 128, 0.3);
}

html[data-theme='dark'] body { color: var(--ink-900); background: var(--white); }
html[data-theme='dark'] h1, html[data-theme='dark'] h2, html[data-theme='dark'] h3,
html[data-theme='dark'] h4, html[data-theme='dark'] h5 { color: var(--ink-900); }
html[data-theme='dark'] ::-webkit-scrollbar-track { background: var(--off-white); }
html[data-theme='dark'] ::-webkit-scrollbar-thumb { background: #3a424c; border-color: var(--off-white); }

html[data-theme='dark'] .nav { background: rgba(18, 21, 26, 0.88); border-bottom-color: var(--gray-200); }
html[data-theme='dark'] .section--tinted { background: var(--off-white); }
html[data-theme='dark'] .panel, html[data-theme='dark'] .dish-card, html[data-theme='dark'] .chef-card,
html[data-theme='dark'] .rank-item, html[data-theme='dark'] .chat, html[data-theme='dark'] .chat__list-head,
html[data-theme='dark'] .chat__head, html[data-theme='dark'] .chat__form, html[data-theme='dark'] .spotlight,
html[data-theme='dark'] .plan, html[data-theme='dark'] .step-item, html[data-theme='dark'] .review-card,
html[data-theme='dark'] .notif-item, html[data-theme='dark'] .chef-mini, html[data-theme='dark'] .table th,
html[data-theme='dark'] .table td { background: var(--off-white); border-color: var(--gray-200); }
html[data-theme='dark'] .form-control { background: var(--white); color: var(--ink-900); border-color: var(--gray-200); }
html[data-theme='dark'] .form-control:focus { border-color: var(--green-600); }
html[data-theme='dark'] .chat__thread-link:hover, html[data-theme='dark'] .chat__thread-link.is-active { background: var(--gray-100); }
html[data-theme='dark'] .chat__thread-link { border-bottom-color: var(--gray-200); }
html[data-theme='dark'] .chat__list { background: var(--off-white); border-right-color: var(--gray-200); }
html[data-theme='dark'] .chat__bubble { background: var(--white); border-color: var(--gray-200); color: var(--ink-800, var(--ink-900)); }
html[data-theme='dark'] .chat__msg--mine .chat__bubble { background: var(--green-700); border-color: var(--green-700); color: #fff; }
html[data-theme='dark'] .chat__placeholder p, html[data-theme='dark'] .chat__empty { color: var(--ink-400); }
html[data-theme='dark'] .rank-item { background: var(--off-white); border-color: var(--gray-200); }
html[data-theme='dark'] .nav__menu { background: var(--white); }
html[data-theme='dark'] .btn--ghost { background: var(--gray-100); color: var(--ink-700); }
html[data-theme='dark'] .btn--ghost:hover { background: var(--gray-200); }
html[data-theme='dark'] .btn--outline { border-color: var(--green-600); color: var(--green-500); }
html[data-theme='dark'] .btn--outline:hover { background: var(--green-700); color: #fff; }
html[data-theme='dark'] .btn--white { background: var(--white); color: var(--green-500); }
html[data-theme='dark'] .avatar-stack__item, html[data-theme='dark'] .chat__avatar--initial { border-color: var(--off-white); }
html[data-theme='dark'] .chef-card { background: var(--off-white); }
html[data-theme='dark'] .section__sub, html[data-theme='dark'] .form-hint { color: var(--ink-400); }
html[data-theme='dark'] .footer { background: var(--off-white); border-top-color: var(--gray-200); }
html[data-theme='dark'] .switch .slider { background: var(--gray-300); }
html[data-theme='dark'] .password-toggle:hover { background: var(--gray-100); color: var(--green-500); }
html[data-theme='dark'] .chat__back { background: var(--gray-100); color: var(--ink-700); }
html[data-theme='dark'] .chat__back:hover { background: var(--green-50); color: var(--green-500); }
html[data-theme='dark'] .admin-top { background: #0d1117; border-bottom-color: #1d2229; }
html[data-theme='dark'] .admin-top .brand__name { color: #fff; }
html[data-theme='dark'] .admin-side { background: #0d1117; }
html[data-theme='dark'] .admin-side .dash__link { color: rgba(255,255,255,0.68); }
html[data-theme='dark'] .admin-side .dash__link:hover { background: rgba(255,255,255,0.08); color: #fff; }
html[data-theme='dark'] .admin-side .dash__link.is-active { background: var(--gold-500); color: var(--ink-900); }
html[data-theme='dark'] .admin-side .dash__section { color: rgba(255,255,255,0.4); }

/* User/chef dashboards keep their white sidebar in dark mode — pin text black for contrast */
html[data-theme='dark'] .dash__side:not(.admin-side) { background: #fff; }
html[data-theme='dark'] .dash__side:not(.admin-side) .dash__link { color: #0c0f0d; }
html[data-theme='dark'] .dash__side:not(.admin-side) .dash__link:hover { background: var(--green-50); color: var(--green-700); }
html[data-theme='dark'] .dash__side:not(.admin-side) .dash__link.is-active { background: var(--green-700); color: #fff; }
html[data-theme='dark'] .dash__side:not(.admin-side) .dash__link .dash__count { background: var(--gold-500); color: var(--ink-900); }
html[data-theme='dark'] .dash__burger { background: #fff; border-color: var(--gray-200); }
html[data-theme='dark'] .dash__burger span,
html[data-theme='dark'] .dash__burger span::before,
html[data-theme='dark'] .dash__burger span::after { background: #0c0f0d; }
html[data-theme='dark'] .stat-card { background: #fff; }
html[data-theme='dark'] .stat-card__value { color: #0c0f0d; }
html[data-theme='dark'] .stat-card__label { color: #4b5563; }

/* =========================================================
   Extra-tiny screens (<=340px): keep everything on-canvas,
   nothing clipped, no horizontal scroll — even without
   the overflow-x safety net.
   ========================================================= */
@media (max-width: 340px) {
  .container { padding: 0 12px; }

  /* Nav: shrink brand so logo + hamburger always fit */
  .nav__inner { gap: 8px; }
  .brand { gap: 8px; min-width: 0; }
  .brand__logo { width: 36px; height: 36px; font-size: 1rem; }
  .brand__name { font-size: 1.02rem; letter-spacing: -0.01em; }
  .nav__toggle { width: 40px; height: 40px; flex-shrink: 0; }
  .nav__toggle span, .nav__toggle span::before, .nav__toggle span::after { left: 10px; width: 18px; }
  .nav__toggle span { top: 18px; }
  .nav__menu { padding: 14px 16px; }

  .hero__inner { padding: 40px 12px 48px; gap: 30px; }
  .hero__mini { padding: 7px 9px; gap: 9px; }
  .hero__mini-avatar, .hero__mini--dish > img { width: 38px; height: 38px; }
  .hero__mini-body b { font-size: 0.78rem; }
  .hero__mini-body span { max-width: 108px; }
  .hero__mini-badge { width: 20px; height: 20px; font-size: 0.65rem; }

  .section { padding: 44px 0; }
  .page-hero { padding: 48px 0 66px; }
  .section__title { font-size: 1.45rem; }
  .section__sub { font-size: 0.94rem; }

  .hero-collage { margin-top: 28px; }
  .hero-collage__tag { font-size: 0.62rem; padding: 5px 7px; }

  .panel__body { padding: 16px; }
  .panel__head { padding: 14px 16px; }

  .filters-bar { gap: 10px; }
  .filters-bar .form-search { min-width: 0; }
  .form-search button { padding: 10px 14px; }

  .form-row { gap: 12px; }
  .role-tabs button { padding: 9px 4px; font-size: 0.82rem; }
  .auth__form { padding: 26px 12px; }

  .chef-hero__inner { padding: 32px 12px 38px; gap: 20px; }
  .chef-hero img.chef-avatar { width: 108px; height: 108px; }
  .detail-hero { padding: 32px 0 50px; }
  .detail-hero__title { font-size: 1.6rem; }
  .gallery__thumbs { gap: 6px; }

  .info-list li { padding: 10px 12px; }
  .rank-item { gap: 8px; padding: 10px; }
  .rank-item img { width: 44px; height: 44px; }
  .rank-item__num { width: 22px; font-size: 1rem; }

  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 14px 16px; }

  .toasts { right: 10px; left: 10px; }
  .scroll-top { right: 10px; bottom: 10px; }
  .modal-backdrop { padding: 10px; }
  .modal { padding: 18px; }

  .footer__top { padding: 40px 0 28px; }
  .footer__bottom { flex-direction: column; align-items: center; text-align: center; }
}
