:root {
  --bg: #f7f2ea;
  --surface: #fffdf8;
  --surface-alt: #ede6d9;
  --text: #2e3a45;
  --text-muted: #7a7468;
  --primary: #6bb8e8;
  --primary-dark: #4a9bc9;
  --primary-light: #e0f3fc;
  --hero-bg: #b8dff5;
  --hero-bg-soft: #e5f4fc;
  --accent: #5ba8d9;
  --accent-dark: #3d8ab5;
  --accent-light: #ebe4d6;
  --gold: #d4c4a8;
  --gold-light: #f5efe4;
  --border: #e0d6c8;
  --shadow: 0 2px 12px rgba(45, 42, 38, 0.06);
  --shadow-lg: 0 8px 32px rgba(45, 42, 38, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Heebo', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--hero-bg-soft) 0%, var(--hero-bg) 55%, #a8d4f0 100%);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 40px 24px 32px;
  margin: 0 -16px 24px;
  color: var(--text);
  text-align: center;
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 12px;
  color: #3d6d8a;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #2d5a78;
}

.subtitle {
  color: #4a7088;
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.stat-card.highlight {
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(107, 184, 232, 0.4);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #2d5a78;
}

.stat-value small {
  font-size: 0.8rem;
  font-weight: 400;
}

.progress-bar-container {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  height: 12px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid rgba(107, 184, 232, 0.25);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6bb8e8, #5ba8d9);
  border-radius: 10px;
  transition: width 0.6s ease;
}

.progress-text {
  font-size: 0.9rem;
  color: #4a7088;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
}

.tab {
  flex: 1;
  min-width: fit-content;
  padding: 10px 14px;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab:hover {
  background: var(--surface-alt);
}

.tab.active {
  background: var(--primary);
  color: white;
}

/* Panels */
.panel {
  display: none;
}

.panel.active {
  display: block;
}

.panel-header {
  margin-bottom: 24px;
}

.panel-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.panel-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Daily Habits */
.daily-habits {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.daily-habits h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.habit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.habit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.habit-item:hover {
  border-color: var(--primary-light);
}

.habit-item input {
  display: none;
}

.habit-item input:checked + .habit-icon {
  transform: scale(1.2);
}

.habit-item:has(input:checked) {
  background: var(--primary-light);
  border-color: var(--primary);
}

.habit-icon {
  font-size: 1.4rem;
  transition: transform 0.2s;
}

.habit-item span:last-child {
  font-size: 0.9rem;
  font-weight: 500;
}

.workout-day-only.hidden {
  opacity: 0.4;
  pointer-events: none;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

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

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 8px;
}

/* Calendar */
.calendar-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.calendar-header h3 {
  font-size: 1.1rem;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.calendar-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.dot.complete { background: var(--accent); }
.dot.partial { background: var(--gold); }
.dot.rest { background: #d4cfc6; }
.dot.future { background: var(--border); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 4px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: default;
  position: relative;
  transition: transform 0.15s;
}

.cal-day.complete {
  background: var(--accent);
  color: white;
}

.cal-day.partial {
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid var(--gold);
}

.cal-day.rest {
  background: #ece8e1;
  color: var(--text-muted);
}

.cal-day.future {
  background: var(--surface-alt);
  color: var(--border);
}

.cal-day.today {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  font-weight: 700;
}

.cal-day.clickable {
  cursor: pointer;
}

.cal-day.clickable:hover {
  transform: scale(1.15);
  z-index: 1;
}

/* Streak */
.streak-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.streak-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.streak-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.streak-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Workouts */
.workout-schedule {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.workout-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-right: 4px solid var(--primary);
}

.workout-day {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.workout-card h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.duration {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.workout-content {
  margin-top: 16px;
}

.workout-content h4 {
  font-size: 0.9rem;
  color: var(--accent);
  margin: 12px 0 4px;
}

.workout-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.workout-content ul {
  list-style: none;
  padding: 0;
}

.workout-content li {
  padding: 4px 0;
  font-size: 0.9rem;
  padding-right: 16px;
  position: relative;
}

.workout-content li::before {
  content: '•';
  color: var(--primary);
  position: absolute;
  right: 0;
  font-weight: bold;
}

.tips-card {
  background: var(--gold-light);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid rgba(212, 196, 168, 0.5);
}

.tips-card h3 {
  margin-bottom: 12px;
}

.tips-card ul {
  list-style: none;
}

.tips-card li {
  padding: 6px 0;
  font-size: 0.9rem;
  padding-right: 16px;
  position: relative;
}

.tips-card li::before {
  content: '→';
  position: absolute;
  right: 0;
  color: var(--gold);
}

/* Food Diary */
.food-date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.btn-icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--primary-dark);
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.food-date-label {
  text-align: center;
  min-width: 160px;
}

.food-date-label input[type="date"] {
  width: 100%;
}

#food-date-display {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.food-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.food-summary-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
  box-shadow: var(--shadow);
}

.food-summary-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.food-summary-item.over .food-summary-value {
  color: #c45c5c;
}

.food-summary-item.ok .food-summary-value {
  color: var(--accent-dark);
}

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

.food-macros-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.food-macro-item {
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  border: 1px solid rgba(212, 196, 168, 0.4);
}

.food-macro-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.food-macro-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.food-goal-edit {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.food-goal-edit label {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-secondary {
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.food-form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.food-form-grid {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

.food-name-label {
  grid-column: 1 / -1;
}

select,
input[type="text"] {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--bg);
}

select:focus,
input[type="text"]:focus {
  outline: 2px solid var(--primary-light);
  border-color: var(--primary);
}

.food-entries {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.food-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 16px;
  font-size: 0.95rem;
}

.food-meal-group {
  margin-bottom: 20px;
}

.food-meal-group:last-child {
  margin-bottom: 0;
}

.food-meal-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.food-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--surface-alt);
}

.food-entry:last-child {
  border-bottom: none;
}

.food-entry-info {
  flex: 1;
  min-width: 0;
}

.food-entry-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.food-entry-macros {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.food-entry-macros span {
  background: var(--surface-alt);
  padding: 2px 8px;
  border-radius: 4px;
}

.food-entry-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.food-entry-calories {
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
}

.food-meal-total {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 8px;
  text-align: right;
  line-height: 1.5;
}

/* Meal Ideas */
.meal-ideas-form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.meal-ideas-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.idea-name-label,
.idea-notes-label {
  grid-column: 1 / -1;
}

.meal-ideas-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.filter-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 20px;
  font-family: var(--font);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.meal-ideas-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meal-idea-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-right: 4px solid var(--accent);
}

.meal-idea-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.meal-idea-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.meal-idea-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.meal-idea-notes {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.meal-idea-macros {
  font-size: 0.8rem;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.btn-use-idea {
  width: 100%;
  padding: 10px;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-use-idea:hover {
  background: var(--primary);
  color: white;
}

/* AI Food */
.ai-food-card {
  background: linear-gradient(135deg, var(--primary-light), var(--surface));
  border: 1px solid rgba(107, 184, 232, 0.35);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.ai-food-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--primary-dark);
}

.ai-food-card > p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.ai-food-card textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--surface);
  resize: vertical;
  margin-bottom: 12px;
}

.ai-food-card textarea:focus {
  outline: 2px solid var(--primary-light);
  border-color: var(--primary);
}

.ai-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
  min-height: 1.2em;
}

.ai-status.error {
  color: #c45c5c;
}

.ai-status.loading {
  color: var(--primary-dark);
}

.ai-result {
  margin-top: 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.ai-result.hidden {
  display: none;
}

.ai-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.ai-result-macros {
  font-size: 0.9rem;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.ai-result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-result-actions .btn-primary,
.ai-result-actions .btn-secondary {
  flex: 1;
  min-width: 140px;
}

.api-key-setup {
  margin-top: 16px;
  font-size: 0.85rem;
}

.api-key-setup summary {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 500;
}

.api-key-hint {
  margin: 10px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.api-key-hint a {
  color: var(--primary-dark);
}

.api-key-row {
  display: flex;
  gap: 8px;
}

.api-key-row input {
  flex: 1;
  min-width: 0;
}

.api-key-hint.small {
  margin-top: 4px;
  font-size: 0.75rem;
}

.gemini-steps {
  background: var(--gold-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  line-height: 1.6;
}

.gemini-steps ol {
  margin: 8px 20px 0 0;
  padding: 0;
}

.gemini-steps li {
  margin-bottom: 4px;
}

.gemini-steps a {
  color: var(--primary-dark);
  font-weight: 500;
}

.provider-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.provider-settings {
  margin-bottom: 8px;
}

.provider-settings.hidden {
  display: none;
}

.project-id-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 10px;
}

.btn-test-key {
  margin-top: 12px;
  width: 100%;
}

.api-key-status {
  font-size: 0.8rem;
  color: var(--accent-dark);
  margin-top: 8px;
  min-height: 1.2em;
  line-height: 1.4;
}

.api-key-status.warn {
  color: #c45c5c;
}

/* Forms */
.weigh-form, .measure-form, .food-form, .meal-ideas-form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-row label, .form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  flex: 1;
  min-width: 120px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

input[type="date"],
input[type="number"] {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--bg);
}

input:focus {
  outline: 2px solid var(--primary-light);
  border-color: var(--primary);
}

.form-row .btn-primary {
  width: auto;
  flex-shrink: 0;
  padding: 10px 24px;
}

/* Chart */
.chart-container {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  height: 280px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  background: var(--surface-alt);
  padding: 12px 16px;
  text-align: right;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.data-table .positive {
  color: var(--accent);
  font-weight: 600;
}

.data-table .negative {
  color: var(--primary);
  font-weight: 600;
}

.btn-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 4px;
}

.btn-delete:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* Milestones */
.milestones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.milestone-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
}

.milestone-card.achieved {
  border: 2px solid var(--accent);
  background: var(--accent-light);
}

.milestone-card.achieved::after {
  content: '✓';
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

.milestone-card.current {
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-lg);
}

.milestone-weight {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

.milestone-card.achieved .milestone-weight {
  color: var(--accent);
}

.milestone-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.milestone-day {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.motivation-card {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}

.motivation-card h3 {
  margin-bottom: 20px;
}

.journey-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.journey-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}

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

/* Footer */
footer {
  text-align: center;
  padding: 32px 0 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .stats-row { grid-template-columns: 1fr; }
  .habit-grid { grid-template-columns: 1fr; }
  .calendar-grid { grid-template-columns: repeat(10, 1fr); }
  .streak-card { grid-template-columns: 1fr; }
  .journey-stats { grid-template-columns: repeat(2, 1fr); }
  .form-row { flex-direction: column; }
  .form-row .btn-primary { width: 100%; }
  .tabs { gap: 2px; }
  .food-macros-summary { grid-template-columns: 1fr; }
  .food-form-grid {
    grid-template-columns: 1fr;
  }
  .food-summary { grid-template-columns: 1fr; }
  .food-goal-edit { flex-direction: column; align-items: stretch; }
}
