:root {
  --recipe-green: #2d6a4f;
  --recipe-dark:  #1b4332;
  --recipe-light: #d8f3dc;
  --accent:       #e76f51;
  --cream:        #fdf8f0;
  --completed-opacity: 0.35;
}

/* ---- Navbar ---- */
.navbar {
  background: linear-gradient(135deg, var(--recipe-dark) 0%, var(--recipe-green) 100%);
  padding: 0.6rem 1rem;
}
.navbar-brand { font-size: 1.2rem; letter-spacing: 0.5px; }

/* ---- Page title ---- */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--recipe-dark);
}

/* ---- Stat cards ---- */
.stat-card {
  background: var(--cream);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.2rem 1rem;
  text-align: center;
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.stat-icon { font-size: 1.6rem; color: var(--recipe-green); margin-bottom: 4px; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--recipe-dark); line-height: 1.1; }
.stat-label { font-size: 0.8rem; color: #6c757d; text-transform: uppercase; letter-spacing: 0.5px; }

/* ---- Recipe cards ---- */
.recipe-card { border-radius: 10px; border: 1px solid #e2e8f0; transition: box-shadow 0.2s; }
.recipe-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.recipe-card-img { height: 160px; object-fit: cover; border-radius: 10px 10px 0 0; }
.recipe-card-img-placeholder {
  height: 160px;
  display: flex; align-items: center; justify-content: center;
  background: var(--recipe-light);
  color: var(--recipe-green);
  font-size: 2.5rem;
  border-radius: 10px 10px 0 0;
}
.recipe-card-img-link { display: block; }

/* ---- Tag badges ---- */
.badge-cuisine { background-color: #2d6a4f; color: #fff; font-size: 0.7rem; margin-right: 3px; }
.badge-dish    { background-color: #e76f51; color: #fff; font-size: 0.7rem; margin-right: 3px; }
.badge-ingredient { background-color: #6c757d; color: #fff; font-size: 0.7rem; margin-right: 3px; }

/* ---- Filter bar ---- */
.filter-bar { background: #f8f9fa; border-radius: 8px; padding: 0.75rem; }

/* ---- Controls bar (recipe detail) ---- */
.controls-bar {
  background: var(--cream);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.5rem 1rem;
}

/* ---- Multiplier stepper ---- */
.multiplier-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mult-value {
  min-width: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--recipe-dark);
}

/* ---- Unit toggle ---- */
.unit-toggle-btn { font-size: 0.8rem; }

/* ---- Ingredient rows (detail view) ---- */
.ingredient-row { transition: opacity 0.2s; }
.ingredient-row:hover { background-color: var(--recipe-light) !important; }
.ingredient-row.completed-item td { opacity: var(--completed-opacity); text-decoration: line-through; }
.qty-cell { font-weight: 600; color: var(--recipe-dark); }

/* ---- Step blocks (detail view) ---- */
.step-block { transition: opacity 0.2s; }
.step-block:hover { background-color: var(--recipe-light) !important; }
.step-block.completed-item { opacity: var(--completed-opacity); }
.step-block.completed-item .step-text { text-decoration: line-through; }
.step-badge { min-width: 24px; flex-shrink: 0; }

/* Scalable quantity spans */
.scalable-qty {
  font-weight: 600;
  color: var(--recipe-dark);
  border-bottom: 1px dashed var(--recipe-green);
}

/* ---- Favorite star ---- */
.fav-star { background: none; border: none; line-height: 1; }
.fav-star:hover { transform: scale(1.2); }

/* ---- Login page ---- */
.login-page { background: linear-gradient(135deg, var(--recipe-dark) 0%, var(--recipe-green) 100%); }
.login-page .card { border: none; border-radius: 16px; }

/* ---- Completed items (shopping list) ---- */
.completed-item { opacity: var(--completed-opacity); }
.completed-item .item-name { text-decoration: line-through; }

/* ---- General ---- */
.required::after { content: " *"; color: #dc3545; }
.prose p { margin-bottom: 0.5rem; }

/* ---- Print styles ---- */
@media print {
  .navbar, .controls-bar, .btn, form, .card-footer, #pairingResult,
  .filter-bar, .shopping-item .btn { display: none !important; }
  body { background: white; color: black; font-size: 12px; }
  .stat-card { box-shadow: none; border: 1px solid #ccc; }
}
