* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #eaeaea;
  font-family: 'Inter', system-ui, sans-serif;
}

/* =====================================================
   mobiele app
   ===================================================== */
.app-container {
  max-width: 414px;
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: #ffffff;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .app-container {
    box-shadow: 0 0 40px rgba(0,0,0,0.2);
    border-radius: 14px;
    margin: 20px auto;
  }
}

/* =====================================================
   header
   ===================================================== */
.app-header {
  background: #FFD400;
  padding: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* =====================================================
   ICON BUTTON
   ===================================================== */
.icon-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

/* =====================================================
   SEARCH BAR
   ===================================================== */
.search-bar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #FFD400;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.search-bar.active {
  display: flex;
}

.search-bar i {
  font-size: 18px;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
}

/* =====================================================
   INDEX CONTENT
   ===================================================== */
.app-content {
  padding: 16px;
  padding-bottom: 100px;
}

/* =====================================================
   DAILY RECIPE CARD
   ===================================================== */
.recipe-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.recipe-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* */
.recipe-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: #fff;
  pointer-events: none;
}

.recipe-overlay .heart-btn,
.recipe-overlay button,
.recipe-overlay a {
  pointer-events: auto;
}

.btn-make {
  width: 100%;
  border-radius: 999px;
  margin-top: 10px;
  font-weight: 600;
}

/* =====================================================
   MINI MEALS
   ===================================================== */
.meal-mini img {
  width: 100%;
  height: 140px;       
  object-fit: cover;   
  border-radius: 12px;
}

.meal-mini p {
  margin: 6px 0 0;
  font-weight: 600;
}

.meal-mini small {
  color: #777;
}

/* =====================================================
   RECENT LIST
   ===================================================== */
.meal-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: flex-start;
}

/* thumbnail */
.meal-row img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

/* content */
.meal-row .flex-grow-1 {
  flex: 1;
}

/* hanya TEKS yang non-interaktif */
.meal-row .flex-grow-1 h6,
.meal-row .flex-grow-1 p,
.meal-row .flex-grow-1 small {
  pointer-events: none;
}

/* typography */
.meal-row h6 {
  margin: 0;
}

.meal-row p {
  font-size: 12px;
  color: #777;
  margin: 4px 0 0;
}

/* heart button — DIFOKUSKAN */
.meal-row .heart-btn {
  position: relative;     /* WAJIB biar z-index aktif */
  z-index: 5;
  cursor: pointer;
  pointer-events: auto;   /* DIPAKSA hidup */
}

/* =====================================================
   RECIPE DETAIL HEADER
   ===================================================== */
.detail-header {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
}

.detail-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.header-overlay {
  position: absolute;
  inset: 0;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.55),
    rgba(0,0,0,0.15),
    transparent
  );
  color: #fff;
  pointer-events: none;
}

.header-overlay .heart-btn,
.header-overlay button,
.header-overlay a {
  pointer-events: auto;
}

.header-overlay h4 {
  margin: 0;
  font-weight: 700;
}

.header-overlay h4 span {
  color: #FFD400;
}

/* =====================================================
   RECIPE DETAIL CONTENT
   ===================================================== */
.detail-content {
  padding: 16px;
  padding-bottom: 120px;
}

.detail-content h1 {
  margin: 6px 0 8px;
  font-size: 22px;
}

.author {
  font-size: 13px;
  color: #777;
  margin: 0;
}

.meta {
  font-size: 13px;
  color: #777;
  margin: 8px 0;
}

/* =====================================================
   ACTION ROW
   ===================================================== */
.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0 20px;
}

.ghost-btn {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

/* =====================================================
   SECTIONS
   ===================================================== */
.section {
  margin-bottom: 28px;
}

.section h3 {
  font-size: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =====================================================
   INGREDIENTS
   ===================================================== */
.ingredients {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

.ingredients li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px dashed #eee;
}

.sub {
  font-size: 13px;
  color: #777;
  margin: 12px 0 6px;
}

/* =====================================================
   HEART BUTTON (FINAL FIX)
   ===================================================== */

.heart-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.heart-btn i {
  font-size: 18px;
  color: #333;
  transition: transform 0.15s ease, color 0.15s ease;
}

.heart-btn:hover i {
  transform: scale(1.25);
}

.heart-btn.active i {
  color: #e63946;
}

/* =====================================================
   STEPS
   ===================================================== */
.steps p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px;
}

/* =====================================================
   RATING
   ===================================================== */
.stars i {
  font-size: 20px;
  color: #ccc;
  cursor: pointer;
}

textarea {
  width: 100%;
  min-height: 80px;
  border-radius: 10px;
  border: 1px solid #ddd;
  padding: 10px;
  margin: 10px 0;
  font-family: inherit;
}

.btn-primary {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px;
  background: #FFD400;
  font-weight: 700;
  cursor: pointer;
}

/* =====================================================
   BOTTOM NAV
   ===================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 414px;
  width: 100%;
  background: #FFD400;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  z-index: 20;
}

.bottom-nav a.nav-item {
  text-decoration: none;
  color: inherit;
}

.nav-item {
  text-align: center;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  color: #333;
}

.nav-item i {
  font-size: 18px;
  display: block;
}

.nav-item.active {
  font-weight: 700;
}

/*
login dan signup
*/

.app-content.authorize {
  padding-top: 32px;
}

/* TITLE */
.app-content.authorize h2 {
  margin-bottom: 8px;
}

/* SUBTITLE */
.app-content.authorize .subtitle {
  color: #777;
  margin-bottom: 32px;
}

/* FORM */
.app-content.authorize form {
  width: 100%;
}

/* FORM GROUP */
.app-content.authorize .form-group {
  margin-bottom: 20px;
}

.app-content.authorize .form-group:last-of-type {
  margin-bottom: 28px;
}

/* LABEL */
.app-content.authorize label {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

/* INPUT */
.app-content.authorize input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #ddd;
  margin-top: 8px;
  font-size: 15px;
  box-sizing: border-box;
}

/* BUTTON */
.app-content.authorize #authorizeBtn {
  width: 100%;
  background: #FFD400;
  border: none;
  padding: 14px;
  font-size: 16px;
  border-radius: 999px;
  cursor: pointer;
}

/* SWITCH LINK */
.app-content.authorize .switch-link {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: #777;
}

.app-content.authorize .switch-link a {
  font-weight: 700;
  color: #000;
  text-decoration: none;
}



.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.dashboard-column h3 {
  font-size: 14px;
  margin-bottom: 10px;
}

.meal-card {
  background: #fff;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-bottom: 10px;
}

.plan-tag {
  font-size: 12px;
  margin-bottom: 12px;
  color: #666;
}

.logout-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: #ff4d4f;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.alert-message {
  background: #f0f5ff;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}




.change-password-section {
  background: #fff;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.change-password-section h3 {
  font-size: 16px;
  margin-bottom: 15px;
}

.change-password-form .form-group {
  margin-bottom: 15px;
}

.change-password-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 14px;
  outline: none;
  transition: 0.2s;
}

.change-password-form input:focus {
  border-color: #4CAF50;
}

.primary-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 14px;
  background: #4CAF50;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.2s;
}

.primary-btn:hover {
  opacity: 0.9;
}






/* =========================
   BMI SECTION
========================= */

.bmi-card {
  margin-top: 20px;
  background: #fff;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.bmi-card .form-group {
  margin-bottom: 15px;
}

.bmi-card input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 14px;
}

.bmi-result {
  margin-top: 20px;
  padding: 15px;
  border-radius: 15px;
  background: #f4f6f8;
}

.bmi-result h3 {
  margin-bottom: 8px;
}



/* =========================
   MEAL PLAN SELECT SECTION
========================= */

.meal-plan-section {
  margin-top: 25px;
  padding: 20px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.meal-plan-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
}

.meal-plan-form {
  display: flex;
  flex-direction: column;
}

.meal-plan-group {
  margin-bottom: 15px;
}

.meal-plan-group label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #555;
}

.meal-plan-group select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #ddd;
  font-size: 14px;
  background: #f9f9f9;
  outline: none;
  transition: 0.2s ease;
}

.meal-plan-group select:focus {
  border-color: #4CAF50;
  background: #fff;
}

.meal-plan-btn {
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.meal-plan-btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}