/* ===== Mess Feedback — Shared Styles ===== */
:root {
  --primary: #ff6b35;
  --primary-dark: #e85a2a;
  --secondary: #2ec4b6;
  --bg: #faf9f7;
  --card-bg: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --star-filled: #ffb703;
  --success: #16a34a;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  min-height: 100vh;
}

.dashboard-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary-dark);
}

.brand-emoji { font-size: 1.6rem; }

.link-btn {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card-bg);
  transition: all 0.15s ease;
}
.link-btn:active { transform: scale(0.96); }

/* Hero */
.hero {
  text-align: center;
  padding: 24px 0 8px;
}
.hero-emoji { font-size: 3rem; margin-bottom: 8px; }
.hero h1 {
  font-size: 1.6rem;
  margin: 0 0 8px;
  line-height: 1.3;
}
.hero p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 auto 24px;
  max-width: 320px;
}

/* Buttons */
.btn-primary {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  text-align: center;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  margin-top: 10px;
  transition: transform 0.12s ease;
}
.btn-secondary:active { transform: scale(0.98); }

/* Steps / cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}

.step-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 14px;
}

/* Meal selector */
.meal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.meal-option {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.meal-option .emoji { font-size: 2rem; display: block; margin-bottom: 6px; }
.meal-option .label { font-size: 0.85rem; font-weight: 600; }
.meal-option.selected {
  border-color: var(--primary);
  background: #fff3ec;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255,107,53,0.2);
}

/* Star rating */
.star-rating {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 4px;
}
.star {
  font-size: 2.6rem;
  color: #e2e2e2;
  cursor: pointer;
  transition: transform 0.1s ease, color 0.15s ease;
  user-select: none;
  line-height: 1;
}
.star.filled { color: var(--star-filled); }
.star:active { transform: scale(1.15); }

.rating-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 18px;
  margin-bottom: 6px;
}

/* Comment */
textarea.comment-box {
  width: 100%;
  min-height: 80px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  background: #fdfdfc;
}
textarea.comment-box:focus {
  outline: none;
  border-color: var(--primary);
}
.char-count {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Photo upload */
.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color 0.15s ease;
  position: relative;
}
.photo-upload-area:active { border-color: var(--primary); }
.photo-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.photo-upload-area .icon { font-size: 1.8rem; display: block; margin-bottom: 6px; }

.photo-preview-wrap {
  position: relative;
  margin-top: 10px;
}
.photo-preview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.photo-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1rem;
  cursor: pointer;
}

/* Progress dots */
.progress-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 18px;
}
.progress-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s ease;
}
.progress-dots .dot.active { background: var(--primary); width: 20px; border-radius: 4px; }

/* Confirmation */
.confirm-wrap {
  text-align: center;
  padding: 60px 0 20px;
}
.confirm-check {
  font-size: 4.5rem;
  margin-bottom: 16px;
  animation: pop 0.4s ease;
}
@keyframes pop {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.confirm-wrap h2 { margin: 0 0 8px; font-size: 1.4rem; }
.confirm-wrap p { color: var(--text-muted); margin-bottom: 28px; }

/* Dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  text-align: center;
}
.stat-card .stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--primary-dark);
}
.stat-card .stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-card .stat-stars {
  color: var(--star-filled);
  font-size: 0.9rem;
  margin-top: 2px;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 24px 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: 8px;
}
.trend-up { background: #dcfce7; color: var(--success); }
.trend-down { background: #fee2e2; color: #dc2626; }
.trend-flat { background: #f1f5f9; color: var(--text-muted); }

.chart-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

/* Comments */
.comment-card {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 10px;
}
.comment-card .comment-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.comment-card .comment-meal {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: #fff3ec;
  padding: 2px 8px;
  border-radius: 999px;
}
.comment-card .comment-stars { color: var(--star-filled); font-size: 0.85rem; }
.comment-card .comment-text { font-size: 0.92rem; color: var(--text); margin: 4px 0; }
.comment-card .comment-time { font-size: 0.75rem; color: var(--text-muted); }

/* Photo gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(5, 1fr); }
}
.gallery-item {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

footer.note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 30px;
}
