@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Playfair+Display:ital,wght@0,700;1,400;1,700&display=swap');

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:       #B8561E;
  --accent-dark:  #964517;
  --accent-light: #F3E0D2;
  --text:         #1C1208;
  --muted:        #7C6E64;
  --border:       #DDD4C4;
  --bg:           #FAF7F2;
  --bg-card:      #F4EFE5;
  --bg-surface:   #EAE4D8;
  --shadow-sm:    0 2px 8px rgba(40,20,8,0.07);
  --shadow-md:    0 8px 28px rgba(40,20,8,0.13);
  --radius:       10px;
  --radius-sm:    6px;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === NAV === */
nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.75rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  font-style: italic;
  color: var(--accent);
  text-decoration: none;
  line-height: 1;
  letter-spacing: 0;
}

.nav-logo .logo-scran { color: var(--text); }

.nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
  margin-left: auto;
}

#nav-auth-btn {
  margin-left: 2.25rem;
}

.nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  order: 2;
}

@media (max-width: 640px) {
  .nav-hamburger { display: block; margin-left: 12px; }

  #main-nav { position: relative; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 0.5rem 0;
    z-index: 99;
  }

  .nav-links.is-open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links > li > a {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    text-align: left;
    box-sizing: border-box;
  }

  #nav-auth-btn {
    order: 1;
    margin-left: auto;
  }
}

/* === MAIN CONTAINER === */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.75rem 1.75rem;
}

/* === PAGE HEADER === */
.page-header { margin-bottom: 2rem; }

.page-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.25px;
  line-height: 1.2;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.page-header p {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* === SEARCH INPUT === */
#search-input {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-card);
  color: var(--text);
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

#search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184,86,30,0.1);
}

#search-input::placeholder {
  color: var(--muted);
  opacity: 0.65;
}

/* === FILTERS === */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.5rem 1.2rem;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
  line-height: 1;
  letter-spacing: 0.01em;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FAF7F2;
  font-weight: 600;
}

/* === RECIPE GRID === */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 1.25rem;
  align-items: start;
  align-items: stretch;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
  font-style: italic;
}

/* === RECIPE CARD === */
.recipe-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s, box-shadow 0.25s;
}

.recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.recipe-card .cook-time-bar {
  margin-top: auto;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.1rem;
  gap: 0.75rem;
}

.card-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  flex: 1;
  color: var(--text);
  min-height: calc(1.1rem * 1.35 * 2);
  display: flex;
  align-items: flex-start;
}

/* === SECTION BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.28rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-breakfast { background: #FEF0D0; color: #7A4E0A; }
.badge-dinner    { background: #DCE9D6; color: #2A5820; }
.badge-tea       { background: #E8DFEF; color: #5A3278; }
.badge-sauces    { background: #F5E0D8; color: #8A3010; }
.badge-dessert   { background: #FCE4EC; color: #9B2D5E; }

/* === CARD STAT GRID === */
.card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}

.stat-block {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.2rem;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.stat-label {
  display: block;
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* === RECIPE PAGE === */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 1.75rem;
  transition: color 0.15s;
}

.back-link:hover { color: var(--accent); }
.back-link svg   { width: 15px; height: 15px; }

.recipe-hero-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.recipe-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.recipe-meta {
  display: flex;
  gap: 1.75rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.recipe-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* macros */
.macros-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.macro-item {
  background: var(--bg-card);
  text-align: center;
  padding: 1.6rem 1rem;
}

.macro-value {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.macro-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* portions control */
.portions-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 0.75rem 0;
}

.portions-control label {
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 500;
}

.portions-control > span {
  font-size: 1rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
  color: var(--text);
}

.portions-control button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  font-family: 'DM Sans', sans-serif;
  line-height: 1;
}

.portions-control button:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* add to list button */

/* recipe body layout */
.recipe-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}

.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* ingredients */
.ingredients-list { list-style: none; }

.ingredients-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.ingredients-list li:last-child { border-bottom: none; }

.ing-qty {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8125rem;
  margin-left: 1rem;
  white-space: nowrap;
}

/* method */
.method-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: start;
}

.method-list li {
  display: flex;
  gap: 1rem;
}

.step-num {
  width: 26px;
  height: 26px;
  min-width: 26px;
  background: var(--accent);
  color: #FAF7F2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 0.22rem;
}

.step-text {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text);
}

/* reviews section */
#avg-rating { margin: 0.5rem 0 1.25rem; }

#review-text {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  resize: vertical;
  min-height: 90px;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-card);
  color: var(--text);
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}

#review-text:focus { border-color: var(--accent); }
#review-text::placeholder { color: var(--muted); opacity: 0.65; }

#submit-btn {
  margin-top: 10px;
  padding: 10px 24px;
  background: var(--accent);
  color: #FAF7F2;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}

#submit-btn:hover { background: var(--accent-dark); }

/* === SHOPPING LIST PAGE === */
.shopping-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.panel-header h2 {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.panel-actions { display: flex; gap: 0.4rem; }

.btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  transition: all 0.15s;
  line-height: 1;
}

.btn-sm:hover      { border-color: var(--accent); color: var(--accent); }
.btn-primary       { background: var(--accent); border-color: var(--accent); color: #FAF7F2; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #FAF7F2; }

/* recipe picker */
.recipe-picker { padding: 0.25rem 0; }

.picker-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.picker-item:last-child { border-bottom: none; }
.picker-item:hover      { background: var(--bg-surface); }

.picker-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.picker-item label { cursor: pointer; flex: 1; }

.picker-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.picker-detail {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* shopping list output */
.list-content {
  padding: 1.4rem 1.25rem;
  min-height: 300px;
}

.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--muted);
}

.empty-icon { font-size: 2rem; margin-bottom: 0.5rem; }

.empty-state p { font-size: 0.9rem; line-height: 1.6; }

.category-group         { margin-bottom: 2rem; }
.category-group:last-child { margin-bottom: 0; }

.cat-title {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--accent);
  padding-bottom: 0.4rem;
  border-bottom: 1.5px solid var(--accent-light);
  margin-bottom: 0.25rem;
}

.item-list { list-style: none; }

.item-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.item-list li:last-child { border-bottom: none; }

.item-qty {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  margin-left: 1rem;
  white-space: nowrap;
}

/* === RESPONSIVE === */
.recipe-banner-image { height: 280px; }

@media (max-width: 800px) {
  .recipe-body,
  .shopping-layout    { grid-template-columns: 1fr; }
  .recipe-title       { font-size: 2.1rem; }
  .macros-strip       { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .recipe-banner-image { height: 360px; }
}

@media (max-width: 480px) {
  main                { padding: 1.5rem 1rem; }
  .nav-inner          { padding: 0 1rem; }
  .nav-logo           { font-size: 1.3rem; }
  .card-stats,
  .macros-strip       { grid-template-columns: repeat(2, 1fr); }
  .recipe-title       { font-size: 1.75rem; }
  .macro-value        { font-size: 1.7rem; }
  .page-header h1     { font-size: 1.85rem; }
}

/* === PRINT === */
@media print {
  /* shared */
  nav,
  .back-link,
  .portions-control,
  .recipe-banner-image,
  #add-btn,
  #share-btn,
  #avg-rating,
  #review-form,
  #review-list,
  .panel-header .panel-actions,
  .shopping-picker-panel,
  .page-header p      { display: none !important; }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  main { padding: 1rem; max-width: 100%; }

  /* recipe page */
  .recipe-title       { font-size: 1.5rem; margin-bottom: 0.5rem; color: #000; }
  .recipe-hero-top    { margin-bottom: 0.5rem; }
  .recipe-meta        { margin-bottom: 0.75rem; color: #555; }
  .macros-strip       { grid-template-columns: repeat(4,1fr); margin-bottom: 1.25rem; border: 1px solid #ccc; background: #ccc; }
  .macro-item         { background: #fff; padding: 0.75rem 0.5rem; }
  .macro-value        { font-size: 1.25rem; color: #000; }
  .macro-label        { color: #555; }
  .recipe-body        { grid-template-columns: 200px 1fr; gap: 1.5rem; }
  .section-label      { color: #000; border-bottom-color: #000; }
  .ingredients-list li { border-bottom-color: #ddd; font-size: 0.85rem; padding: 0.4rem 0; }
  .ing-qty            { color: #555; }
  .step-num           { background: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .step-text          { font-size: 0.85rem; line-height: 1.6; }
  .badge              { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* shopping list page */
  .shopping-layout    { display: block; }
  .panel              { border: none; box-shadow: none; background: none; }
  .panel-header       { background: none; border-bottom: 2px solid #000; padding-left: 0; }
  .panel-header h2    { color: #000; }
  .cat-title          { color: #000; border-bottom-color: #ccc; }
  .item-list li       { border-bottom-color: #ddd; }
  .list-content       { padding: 0; }

  .page-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #000;
  }
}


/* --------------------------------------------------------------------------
   Search bar row (index.html)
   -------------------------------------------------------------------------- */

.search-bar-row {
  padding: 0 0 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.search-bar-row input {
  flex: 1;
  box-sizing: border-box;
}

.sort-select {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}

.result-count {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 1rem;
}


/* --------------------------------------------------------------------------
   Recipe cards (index.html)
   -------------------------------------------------------------------------- */

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 0;
  color: var(--muted);
  transition: color 0.15s;
}

.fav-btn--active {
  color: #e85d5d;
}

.card-cooktime {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 0.9rem;
  color: var(--muted);
}

.card-cooktime span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.card-footer-label {
  text-align: center;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}


/* --------------------------------------------------------------------------
   Empty and not-found states
   -------------------------------------------------------------------------- */

.empty-state--full {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
}

.empty-state__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.empty-state__body {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.btn-primary-sm {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: #FAF7F2;
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  cursor: pointer;
}

.btn-primary-sm:hover {
  background: var(--accent-dark);
}

.not-found-state {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--muted);
}

.not-found-state__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}


/* --------------------------------------------------------------------------
   Recipe page
   -------------------------------------------------------------------------- */

.recipe-banner-wrap {
  position: relative;
  width: 100%;
  margin: 1rem 0;
}

.recipe-hero-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 1.25rem 1.5rem;
  margin: -2.5rem 1rem 0;
  position: relative;
}

.recipe-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}


.btn-primary {
  padding: 11px 28px;
  background: var(--accent);
  color: #FAF7F2;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
  letter-spacing: 0.01em;
}

.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
  padding: 11px 20px;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.15s;
  letter-spacing: 0.01em;
  box-sizing: border-box;
}

.btn-secondary:hover { background: var(--bg-card); }

.ratings-loading {
  font-size: 0.875rem;
  color: var(--muted);
}

.reviews-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  max-width: 600px;
}

.review-list {
  margin-bottom: 1.75rem;
}

.review-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.review-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.review-text {
  font-size: 0.875rem;
  color: var(--text);
  margin: 0 0 4px;
}

.review-date {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

.review-thanks {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 12px;
}

.reviews-empty {
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
}

.avg-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avg-rating-label {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

.star { font-size: 20px; }
.star--filled { color: #E8970A; }
.star--empty  { color: #D0C4B8; }

.review-form-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  margin-bottom: 12px;
}

.star-picker {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.star-picker-star {
  font-size: 28px;
  cursor: pointer;
  transition: color 0.1s;
  user-select: none;
}


/* --------------------------------------------------------------------------
   Shopping page
   -------------------------------------------------------------------------- */

.shopping-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
}

.shopping-empty__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.shopping-empty__body {
  margin-bottom: 1rem;
}

.picker-item__link {
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}

.picker-item__link .picker-name {
  display: block;
}

.picker-item__controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.portion-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  line-height: 1;
}

.portion-count {
  font-size: 0.875rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  color: var(--text);
}

.portion-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.remove-btn {
  padding: 4px 10px;
  border: 1px solid #F5C5B8;
  background: #FDF0EB;
  color: #9B3A20;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}

.remove-btn:hover { background: #FAE0D8; }

.btn-danger {
  color: #9B3A20;
  border-color: #F5C5B8;
}

.weekly-totals {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.weekly-totals__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.weekly-totals__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
}

.weekly-total-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.weekly-total-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ingredient-row {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ingredient-row--checked {
  opacity: 0.4;
}

.ingredient-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  font-size: 11px;
}

.ingredient-checkbox--checked {
  background: var(--accent);
}

.ingredient-name {
  flex: 1;
}

.ingredient-row--checked .ingredient-name {
  text-decoration: line-through;
}


/* --------------------------------------------------------------------------
   Planner page (moved from planner.html <style> block)
   -------------------------------------------------------------------------- */

.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.week-nav__label h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.week-nav__btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
}

.week-nav__btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.week-nav__btn--today {
  background: var(--accent);
  color: #FAF7F2;
  border-color: var(--accent);
}

.week-nav__right {
  display: flex;
  gap: 8px;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 2rem;
}

.day-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.day-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.day-header--today { color: var(--accent); }

.day-date {
  font-size: 0.65rem;
  color: var(--muted);
  text-align: center;
  margin-top: -2px;
}

.meal-slot {
  min-height: 64px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.meal-slot:hover {
  background: var(--bg-card);
  border-color: var(--accent);
}

.meal-slot-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.slot-recipe {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 26px 5px 7px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text);
  position: relative;
  line-height: 1.3;
}

.slot-btns {
  position: absolute;
  top: 3px;
  right: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.slot-btns .remove-slot { position: static; }

.slot-macros {
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

.remove-slot {
  position: absolute;
  top: 4px;
  right: 5px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.remove-slot:hover { color: #9B3A20; }

.day-totals {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.day-total-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.day-total-lbl {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
}

.batch-summary { margin-bottom: 2rem; }

.batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 0.75rem;
}

.batch-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.batch-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.batch-card-meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.planner-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg, 12px);
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-search {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-search input {
  width: 100%;
  box-sizing: border-box;
}

.modal-list {
  overflow-y: auto;
  flex: 1;
  padding: 0.5rem;
}

.modal-recipe {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  margin-bottom: 4px;
}

.modal-recipe:hover { background: var(--bg); border-color: var(--border); }

.modal-recipe--selected {
  border-color: var(--accent);
  background: var(--bg);
}

.modal-recipe-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.modal-recipe-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.modal-remove {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid #F5C5B8;
  background: #FDF0EB;
  color: #9B3A20;
  margin-bottom: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}

.modal-remove:hover { background: #FAE0D8; }


/* --------------------------------------------------------------------------
   Planner responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .week-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding-bottom: 8px;
  }
  .day-col {
    flex: 0 0 220px;
  }
  .week-nav__label h2 { font-size: 0.875rem; }
}
/* ==========================================================================
   Auth styles — append to styles.css
   ========================================================================== */

/* Nav sign in button */
.nav-signin-btn {
  padding: 6px 16px;
  background: var(--accent);
  color: #FAF7F2;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}

.nav-signin-btn:hover { background: var(--accent-dark); }

/* Nav avatar */
.nav-user-menu { position: relative; }

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #FAF7F2;
  border: none;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.nav-avatar:hover { background: var(--accent-dark); }

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
}

.user-menu-email {
  padding: 10px 14px;
  font-size: 0.75rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  background: none;
  border: none;
  font-size: 0.875rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
}

.user-menu-item:hover { background: var(--bg-surface); }

/* Auth modal */
.auth-modal { max-width: 380px; }

.auth-modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 20px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  width: 100%;
}

.auth-google-btn:hover { background: var(--bg-card); border-color: #aaa; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-card);
  color: var(--text);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.auth-input:focus { border-color: var(--accent); }
.auth-input::placeholder { color: var(--muted); opacity: 0.65; }

.auth-submit {
  width: 100%;
  padding: 11px;
  font-size: 0.9rem;
}

.auth-toggle-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.8125rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  text-align: center;
  padding: 0;
}

.auth-toggle-btn:hover { text-decoration: underline; }

.auth-error {
  background: #FDF0EB;
  border: 1px solid #F5C5B8;
  color: #9B3A20;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.8125rem;
}

.shopping-loading {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 2rem;
}
/* ==========================================================================
   Admin styles — append to styles.css
   ========================================================================== */

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.admin-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.admin-loading {
  color: var(--muted);
  padding: 4rem 0;
  font-size: 0.9rem;
}

.admin-form { max-width: 860px; }

.admin-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.admin-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.admin-section-header .admin-section-title { margin-bottom: 0; }

.admin-section-sub {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.admin-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }

/* Image upload */
.image-upload-area {
  width: 100%;
  max-width: 400px;
  height: 180px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s;
  position: relative;
}

.image-upload-area:hover { border-color: var(--accent); }

.image-upload-placeholder {
  text-align: center;
  color: var(--muted);
}

.image-upload-placeholder span {
  font-size: 2rem;
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.image-upload-placeholder p { font-size: 0.8125rem; }

.image-preview-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-upload-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 0.75rem;
  text-align: center;
  padding: 6px;
}

.admin-remove-image {
  margin-top: 0.5rem;
  background: none;
  border: none;
  color: #9B3A20;
  font-size: 0.8125rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  padding: 0;
}

/* Ingredient and step list items */
.admin-list { display: flex; flex-direction: column; gap: 8px; }

.admin-empty {
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
}

.admin-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.admin-list-num {
  width: 22px;
  height: 22px;
  min-width: 22px;
  background: var(--accent);
  color: #FAF7F2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.admin-ing-name   { flex: 3; }
.admin-ing-amount { flex: 1; }
.admin-ing-unit   { flex: 1.5; }

.admin-list-item input,
.admin-list-item textarea {
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-card);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.admin-list-item input:focus,
.admin-list-item textarea:focus { border-color: var(--accent); }

.admin-step-item { align-items: flex-start; }

.admin-step-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-step-fields input  { width: 100%; }
.admin-step-fields textarea { width: 100%; min-height: 80px; resize: vertical; }

.admin-list-actions {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}

.admin-move-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--muted);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
}

.admin-move-btn:hover { border-color: var(--accent); color: var(--accent); }

.admin-move-btn-placeholder { width: 26px; height: 26px; display: block; }

.admin-remove-btn {
  width: 26px;
  height: 26px;
  border: 1px solid #F5C5B8;
  background: #FDF0EB;
  color: #9B3A20;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-remove-btn:hover { background: #FAE0D8; }

/* Form actions */
.admin-form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 0.5rem;
  padding-bottom: 4rem;
}

/* Preview overlay */
.preview-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  overflow-y: auto;
}

.preview-bar {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 10;
}

.preview-bar-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  flex: 1;
}

.preview-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.75rem;
}

/* Admin edit button on cards */
.card-admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.15s;
  flex-shrink: 0;
}

.card-admin-btn:hover { background: var(--accent); color: #FAF7F2; border-color: var(--accent); }

/* Responsive */
@media (max-width: 640px) {
  .admin-grid-2 { grid-template-columns: 1fr; }
  .admin-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .admin-grid-6 { grid-template-columns: repeat(3, 1fr); }
  .admin-list-item { flex-wrap: wrap; }
  .admin-ing-name   { flex: 1 1 100%; }
  .admin-ing-amount,
  .admin-ing-unit   { flex: 1; }
  .admin-list-actions { flex-direction: row; }
}

/* Recipe action buttons */
.recipe-actions {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 2rem;
}
.recipe-actions > * {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  padding: 11px 16px;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
}
@media (max-width: 640px) {
  .recipe-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .recipe-actions > :first-child {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   Profile page
   ========================================================================== */

.profile-layout {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.avatar-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #FAF7F2;
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.profile-tab-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.profile-tab {
  flex: 1;
  padding: 0.6rem 1rem;
  border: none;
  background: var(--bg-card);
  color: var(--muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.profile-tab.active {
  background: var(--accent);
  color: #FAF7F2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  box-sizing: border-box;
}

.form-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label.radio-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  cursor: pointer;
}

label.radio-label input[type="radio"] {
  width: auto;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.range-slider {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.targets-section {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.targets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.profile-save-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 2rem;
}

.profile-save-status {
  font-size: 0.85rem;
  color: var(--muted);
}

.profile-save-status--success { color: #3a7c4a; }
.profile-save-status--error   { color: #b83a1e; }

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}

/* ==========================================================================
   Macro progress bars (shopping list)
   ========================================================================== */

.macro-progress-section {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.macro-bars {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.macro-bar-row {}

.macro-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.macro-bar-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.macro-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.macro-bar-fill--green  { background: #3a7c4a; }
.macro-bar-fill--amber  { background: #c47c1a; }
.macro-bar-fill--red    { background: #b83a1e; }

/* ==========================================================================
   Planner traffic lights
   ========================================================================== */

.day-totals--green { border-left: 3px solid #3a7c4a; }
.day-totals--amber { border-left: 3px solid #c47c1a; }
.day-totals--red   { border-left: 3px solid #b83a1e; }

.day-progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin: 4px 0;
  overflow: hidden;
}

.day-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.weekly-overview {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.weekly-total-value.tl-green { color: #3a7c4a; }
.weekly-total-value.tl-amber { color: #c47c1a; }
.weekly-total-value.tl-red   { color: #b83a1e; }

/* ==========================================================================
   Suggestions (shopping list)
   ========================================================================== */

.suggestions-section {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.suggestion-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.suggestion-info {
  min-width: 0;
}

.suggestion-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* ==========================================================================
   Planner — copy buttons & modal filter (planner.html)
   ========================================================================== */

/* Per-slot copy button stacked below remove inside .slot-btns */
.copy-slot-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.copy-slot-btn:hover { color: var(--accent); }

/* Per-day copy button in day header */
.copy-day-btn {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.copy-day-btn:hover { color: var(--accent); background: var(--accent-light); }

/* Modal section filter row */
.modal-filter-row {
  display: flex;
  gap: 6px;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.modal-filter-btn {
  padding: 4px 10px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-card);
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s;
}

.modal-filter-btn:hover:not(.modal-filter-btn--active) {
  border-color: var(--accent);
  color: var(--accent);
}

.modal-filter-btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FAF7F2;
}

/* Copy modal */
.copy-modal { max-width: 340px; }

.copy-modal-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 50vh;
  overflow-y: auto;
}

.copy-modal-desc {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.copy-day-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 5px 0;
  color: var(--text);
}

.copy-day-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.copy-modal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ==========================================================================
   Planner — modal recipe suggestions
   ========================================================================== */

.modal-suggestions {
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  padding: 8px;
  margin-bottom: 4px;
}

.modal-suggestions-label {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin: 0 0 6px 4px;
}

.modal-recipe--suggested {
  background: rgba(255, 255, 255, 0.55);
}

.modal-recipe--suggested:hover {
  background: var(--bg);
  border-color: var(--border);
}

.modal-full-list-label {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding: 8px 12px 4px;
  margin: 0;
}
