/* ── Mama Strong ── Pregnancy-safe fitness app */
/* Mobile-first, soft pink, warm & encouraging */

:root {
  --pink: #e8a0b4;
  --pink-dark: #d4819a;
  --pink-light: #fce4ec;
  --pink-bg: #fdf2f5;
  --rose: #f5b7b1;
  --blush: #fde8ef;
  --cream: #fef9f4;
  --card: #ffffff;
  --text: #4a3f44;
  --text-soft: #8a7b82;
  --muted: #b8a8ae;
  --border: #f0dce3;
  --green: #81c784;
  --green-light: #e8f5e9;
  --gold: #f4c542;
  --radius: 16px;
  --shadow: 0 2px 16px rgba(200, 120, 140, 0.10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--pink-bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Top Bar ── */
.top-bar {
  background: white;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo-small { font-weight: 700; font-size: 18px; }
.logo-small .logo-emoji { }
.logo-text { color: var(--pink-dark); }
.logout-link { color: var(--muted); font-size: 14px; text-decoration: none; }

/* ── Container ── */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

/* ── Login Page ── */
.login-page, .setup-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #fce4ec 0%, #fdf2f5 50%, #fef9f4 100%);
}
.login-card, .setup-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 28px;
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.logo { font-size: 32px; font-weight: 800; color: var(--pink-dark); margin-bottom: 4px; }
.logo-emoji { font-size: 36px; }
.subtitle { color: var(--text-soft); font-size: 14px; margin-bottom: 24px; }

.login-card input {
  width: 100%;
  padding: 14px;
  font-size: 22px;
  text-align: center;
  border: 2px solid var(--border);
  border-radius: 12px;
  outline: none;
  letter-spacing: 6px;
}
.login-card input:focus { border-color: var(--pink); }

.login-card button, .btn-primary {
  width: 100%;
  padding: 14px;
  margin-top: 14px;
  background: var(--pink-dark);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.login-card button:active, .btn-primary:active { background: var(--pink); }
.error-msg { color: #e63946; font-size: 13px; margin-top: 12px; }

/* ── Setup ── */
.setup-card h2 { font-size: 20px; margin-bottom: 4px; color: var(--text); }
.week-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
}
.week-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: white;
  font-size: 24px;
  font-weight: 700;
  color: var(--pink-dark);
  cursor: pointer;
}
.week-btn:active { background: var(--blush); }
.week-picker input {
  width: 64px;
  text-align: center;
  font-size: 32px;
  font-weight: 800;
  border: none;
  background: transparent;
  color: var(--text);
}
.week-label { color: var(--pink-dark); font-weight: 600; margin-bottom: 16px; }

/* ── Home ── */
.hero-card {
  background: linear-gradient(135deg, var(--pink-dark), var(--pink));
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 16px;
  color: white;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.hero-card::after {
  content: "";
  position: absolute;
  bottom: -20px; left: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.trimester-badge {
  display: inline-block;
  background: rgba(255,255,255,0.25);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  backdrop-filter: blur(4px);
}
.week-display { font-size: 18px; opacity: 0.9; }
.week-display strong { font-size: 42px; font-weight: 800; letter-spacing: -1px; }

/* ── Progress bar ── */
.progress-section { margin-bottom: 16px; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.progress-bar-bg {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--pink-dark));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ── Quote ── */
.quote-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  text-align: center;
  border-left: 4px solid var(--pink);
}
.quote-text {
  font-size: 15px;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
}
.quote-author {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 8px;
}
.quote-icon {
  font-size: 24px;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* ── Today Card ── */
.today-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 16px;
}
.today-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.today-name { font-size: 20px; font-weight: 700; margin: 6px 0 16px; color: var(--pink-dark); }
.rest-note { color: var(--text-soft); font-size: 14px; margin-bottom: 12px; }

.btn-start {
  display: inline-block;
  background: var(--pink-dark);
  color: white;
  padding: 14px 40px;
  border-radius: 30px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.1s;
}
.btn-start:active { transform: scale(0.97); }
.btn-secondary { background: var(--rose); }
.btn-secondary:active { background: var(--pink); }

.stats-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  flex: 1;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 12px;
  text-align: center;
}
.stat-num { font-size: 28px; font-weight: 800; color: var(--pink-dark); }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat-card.highlight {
  background: var(--green-light);
  color: #2e7d32;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.btn-link { display: block; text-align: center; color: var(--pink-dark); font-size: 14px; text-decoration: none; font-weight: 600; }

/* ── Workout ── */
.workout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.workout-badge {
  background: var(--pink-dark);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.trimester-badge-sm { font-size: 13px; color: var(--muted); }

/* Rest Timer */
.rest-timer {
  background: var(--pink-dark);
  color: white;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
  animation: pulse 1s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.85; } }
.timer-display { font-size: 48px; font-weight: 800; font-variant-numeric: tabular-nums; }
.btn-stop-timer {
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  padding: 8px 24px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 8px;
}
.hidden { display: none !important; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 4px;
  font-weight: 700;
  font-size: 15px;
  color: var(--pink-dark);
  margin-top: 8px;
  border-bottom: 1px solid var(--border);
}
.section-duration { font-weight: 400; font-size: 12px; color: var(--muted); }

.exercise-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin: 8px 0;
  transition: background 0.2s;
}
.exercise-card.done {
  background: var(--green-light);
  opacity: 0.75;
}
.ex-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ex-name { font-weight: 700; font-size: 15px; flex: 1; color: var(--text); }
.ex-meta { text-align: right; flex-shrink: 0; }
.ex-reps { font-weight: 600; color: var(--pink-dark); font-size: 14px; }
.ex-sets { color: var(--muted); font-size: 12px; margin-left: 4px; }
.ex-equip { display: block; font-size: 11px; color: var(--text-soft); margin-top: 2px; }
.ex-cue { font-size: 13px; color: #777; margin: 6px 0 10px; line-height: 1.4; }
.ex-actions { display: flex; gap: 8px; }
.btn-demo {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--pink);
  background: white;
  color: var(--pink-dark);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}
.btn-demo:active { background: var(--blush); }
.btn-check {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--pink-dark);
  background: white;
  color: var(--pink-dark);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-check.done { background: var(--pink-dark); color: white; border-color: var(--pink-dark); }

/* ── Finish ── */
.finish-section {
  margin-top: 24px;
  padding: 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.rpe-prompt label { font-weight: 700; font-size: 15px; display: block; margin-bottom: 10px; color: var(--text); }
.rpe-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.rpe-bubbles { display: flex; gap: 6px; }
.rpe-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: white;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.rpe-btn.selected { background: var(--pink-dark); color: white; border-color: var(--pink-dark); }
.btn-finish {
  width: 100%;
  padding: 16px;
  margin-top: 16px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.btn-finish:disabled { background: var(--border); color: var(--muted); cursor: default; }

/* ── History ── */
.history-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.history-date { font-weight: 600; font-size: 14px; min-width: 80px; color: var(--text); }
.history-day { flex: 1; font-size: 13px; color: var(--text-soft); }
.history-status { font-size: 12px; color: var(--muted); }

.empty-state { text-align: center; padding: 40px 20px; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { color: var(--muted); }

/* ── Action Grid (Water + Kegels) ── */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.action-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  text-align: center;
}
.action-icon { font-size: 28px; margin-bottom: 4px; }
.action-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.water-counter { font-size: 22px; font-weight: 800; color: var(--pink-dark); margin-bottom: 8px; }
.water-btn {
  background: var(--pink-light);
  color: var(--pink-dark);
  border: 2px solid var(--pink);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.water-btn:active { background: var(--pink); color: white; }

/* ── Feature Grid ── */
.feature-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feature-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.feature-card:active { background: var(--blush); }
.feature-done { opacity: 0.7; }
.feature-icon { font-size: 24px; flex-shrink: 0; }
.feature-text { flex: 1; }
.feature-title { font-weight: 700; font-size: 14px; }
.feature-desc { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.feature-arrow { font-size: 18px; color: var(--muted); flex-shrink: 0; }

/* ── Belly Journal ── */
.journal-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 8px;
}
.journal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.journal-week {
  font-weight: 700;
  font-size: 15px;
  color: var(--pink-dark);
}
.journal-date {
  font-size: 12px;
  color: var(--muted);
}
.journal-note {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}
.journal-empty {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}
.journal-textarea {
  width: 100%;
  min-height: 100px;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-family: var(--font);
  resize: vertical;
}
.journal-textarea:focus { border-color: var(--pink); outline: none; }
.journal-save-btn {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  background: var(--pink-dark);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.journal-save-btn:disabled { background: var(--border); color: var(--muted); cursor: default; }
.journal-saved { color: var(--green); font-weight: 600; font-size: 13px; margin-top: 6px; }

/* ── Checklist ── */
.checklist-section { margin-bottom: 20px; }
.checklist-title { font-weight: 700; font-size: 16px; margin-bottom: 8px; color: var(--pink-dark); }
.checklist-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.checklist-card.done { opacity: 0.6; background: var(--green-light); }
.checklist-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--pink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 12px;
}
.checklist-check.checked { background: var(--pink-dark); border-color: var(--pink-dark); color: white; }
.checklist-text { flex: 1; }
.checklist-item-name { font-weight: 600; font-size: 14px; }
.checklist-item-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.checklist-week { font-size: 11px; color: var(--pink); font-weight: 600; margin-top: 2px; }

/* ── Milestones ── */
.milestone-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.milestone-card.unlocked { background: var(--green-light); }
.milestone-icon { font-size: 24px; flex-shrink: 0; }
.milestone-name { font-weight: 600; font-size: 14px; }
.milestone-desc { font-size: 12px; color: var(--text-soft); }
.milestone-status { margin-left: auto; font-size: 20px; flex-shrink: 0; }
.milestone-progress {
  text-align: center;
  padding: 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.milestone-progress-num { font-size: 36px; font-weight: 800; color: var(--pink-dark); }
.milestone-progress-label { font-size: 13px; color: var(--muted); }

