/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg: #f8f8f8;
  --surface: #ffffff;
  --surface2: #f0f0f0;
  --border: #e0e0e0;
  --text: #1a1a1a;
  --text2: #666;
  --text3: #999;

  --period: #e8637a;
  --period-light: #fce7ec;
  --period-dark: #c0445e;
  --water: #4a8fd9;
  --water-light: #e5f0fb;
  --gut: #d4885a;
  --gut-light: #fdf0e8;
  --vitamin: #5aac73;
  --vitamin-light: #e8f5ed;
  --sleep: #7c5cbf;
  --sleep-light: #ede9fe;

  --accent: #4a8fd9;   /* default; overridden per-page */
  --tab-h: 60px;
  --header-h: 56px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
}

html.dark {
  --bg: #111827;
  --surface: #1f2937;
  --surface2: #374151;
  --border: #374151;
  --text: #f9fafb;
  --text2: #9ca3af;
  --text3: #6b7280;
  --period-light: #3d1520;
  --water-light: #1a2d42;
  --gut-light: #3d2010;
  --vitamin-light: #1a3325;
  --sleep-light: #2d2150;
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; touch-action: manipulation; }
html { -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overscroll-behavior: none;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}

/* ── Auth Overlay ──────────────────────────────────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.auth-logo {
  font-size: 3rem;
  margin-bottom: 8px;
  line-height: 1;
}

.auth-app-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 4px;
}

.auth-tagline {
  font-size: 0.875rem;
  color: var(--text3);
  margin-bottom: 32px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
  box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent;
}
.btn-google:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.btn-google:active { transform: scale(0.98); }

.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text3);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
}
.auth-input:focus { border-color: var(--water); }

.auth-error {
  font-size: 0.82rem;
  color: #dc2626;
  min-height: 18px;
  text-align: left;
}

.auth-toggle {
  margin-top: 20px;
  background: none;
  border: none;
  color: var(--water);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
  -webkit-tap-highlight-color: transparent;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
.header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-title-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.header h1 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.header-date {
  font-size: 0.7rem;
  color: var(--text3);
  font-weight: 500;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.dark-toggle {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
  color: var(--text);
}
.signout-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: var(--text3);
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.signout-btn:hover { color: var(--text); }

/* ── Bottom Tab Bar ────────────────────────────────────────────────────────── */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--tab-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text3);
  transition: color .15s;
  padding: 8px 0;
  -webkit-tap-highlight-color: transparent;
}
.tab-btn .tab-icon { font-size: 1.4rem; }
.tab-btn.active { color: var(--accent); }
.tab-btn.active .tab-icon { transform: scale(1.1); }

/* ── Pages ─────────────────────────────────────────────────────────────────── */
.page { display: none; padding: 16px; }
.page.active { display: block; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.card-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text2);
  margin-bottom: 14px;
}

/* ── Buttons ────────────────────────────────────────────────────────────────  */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 14px 20px;
  min-height: 50px;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--surface2); color: var(--text); }
.btn-block { width: 100%; }
.btn-sm { font-size: 0.875rem; padding: 10px 14px; min-height: 40px; }
.btn-danger { background: #fee2e2; color: #dc2626; }

/* ── Period Module ──────────────────────────────────────────────────────────── */
.period-page { --accent: var(--period); }

.period-info {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.period-stat {
  flex: 1;
  background: var(--period-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.period-stat .val { font-size: 1.5rem; font-weight: 700; color: var(--period); }
.period-stat .lbl { font-size: 0.72rem; color: var(--text2); margin-top: 2px; }

.cycle-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 14px;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  background: transparent;
  color: var(--text2);
  position: relative;
  cursor: default;
}
.cal-day.period    { background: var(--period); color: #fff; }
.cal-day.predicted { background: var(--period-light); color: var(--period); border: 1.5px dashed var(--period); }
.cal-day.today     { font-weight: 800; }
.cal-day.today::after { content: ''; position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.cal-day.other-month { opacity: 0.3; }
.cal-day.luteal    { background: #ede9fe; color: #7c3aed; }
.cal-day.follicular { background: #ecfdf5; color: #059669; }

.cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}
.cal-header span {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
}

.flow-btns { display: flex; gap: 8px; margin-bottom: 12px; }
.flow-btn {
  flex: 1;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
}
.flow-btn.selected { border-color: var(--period); background: var(--period-light); color: var(--period); }

.symptom-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.chip.selected { border-color: var(--accent); background: var(--period-light); color: var(--period); }

/* ── Water Module ───────────────────────────────────────────────────────────── */
.water-page { --accent: var(--water); }

.water-visual {
  position: relative;
  width: 160px;
  height: 200px;
  margin: 0 auto 24px;
}
.water-glass-bg {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 180px;
  border: 3px solid var(--water);
  border-top: none;
  border-radius: 0 0 24px 24px;
  overflow: hidden;
  background: var(--surface);
}
.water-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #93c5fd 0%, #3b82f6 100%);
  transition: height .4s cubic-bezier(.34,1.56,.64,1);
  border-radius: 0 0 21px 21px;
  z-index: 0;
}
.water-cup-mark {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(74, 143, 217, 0.25);
  z-index: 1;
  pointer-events: none;
}
.water-label {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--water);
  margin-bottom: 4px;
}
.water-sublabel {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text2);
  margin-bottom: 20px;
}

.water-tap {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--water);
  color: #fff;
  border: none;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 20px rgba(74,143,217,.35);
  transition: transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.water-tap:active { transform: scale(0.95); }
.water-tap .drop { font-size: 2.2rem; }

.water-history { display: flex; gap: 6px; align-items: flex-end; height: 60px; }
.water-bar {
  flex: 1;
  background: var(--water-light);
  border-radius: 4px 4px 0 0;
  position: relative;
  overflow: hidden;
  min-height: 4px;
}
.water-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--water);
  border-radius: 4px 4px 0 0;
  transition: height .3s;
}
.water-bar-label {
  text-align: center;
  font-size: 0.6rem;
  color: var(--text3);
  margin-top: 4px;
}

.water-pace-status {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text3);
  margin-bottom: 10px;
  min-height: 18px;
}
.pace-on     { color: var(--water); }
.pace-ahead  { color: #16a34a; }
.pace-behind { color: #dc2626; }

.water-undo-btn {
  display: block;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 24px;
  cursor: pointer;
  margin: 10px auto 0;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.water-undo-btn:active { transform: scale(0.97); }
.water-undo-btn:disabled { opacity: 0.3; cursor: default; transform: none; }

.pace-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.pace-block:last-child { border-bottom: none; }
.pace-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text2);
  min-width: 82px;
}
.pace-block.past   .pace-label { color: var(--text3); }
.pace-block.active .pace-label { color: var(--water); font-weight: 700; }
.pace-status-cell { flex: 1; }
.pace-check   { font-size: 0.8rem; color: #16a34a; font-weight: 700; }
.pace-miss    { font-size: 0.8rem; color: #f97316; font-weight: 600; }
.pace-future  { font-size: 0.8rem; color: var(--text3); }
.pace-bar {
  height: 6px;
  background: var(--water-light);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}
.pace-bar-fill {
  height: 100%;
  background: var(--water);
  border-radius: 999px;
  transition: width .4s;
}
.pace-cur { font-size: 0.75rem; color: var(--water); font-weight: 600; }

/* ── Gut Module ─────────────────────────────────────────────────────────────── */
.gut-page { --accent: var(--gut); }

.bristol-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
}
.bristol-scroll::-webkit-scrollbar { display: none; }

.bristol-card {
  flex: 0 0 100px;
  scroll-snap-align: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  background: var(--surface);
  -webkit-tap-highlight-color: transparent;
}
.bristol-card.selected {
  border-color: var(--gut);
  background: var(--gut-light);
}
.bristol-icon { font-size: 1.8rem; margin-bottom: 6px; }
.bristol-num { font-size: 0.65rem; font-weight: 700; color: var(--text3); text-transform: uppercase; }
.bristol-label { font-size: 0.8rem; font-weight: 600; color: var(--text); margin: 2px 0; }
.bristol-desc { font-size: 0.68rem; color: var(--text2); line-height: 1.3; }

.urgency-btns { display: flex; gap: 8px; margin-bottom: 14px; }
.urgency-btn {
  flex: 1;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
}
.urgency-btn.selected { border-color: var(--gut); background: var(--gut-light); color: var(--gut); }

.pain-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.pain-row label { font-size: 0.85rem; font-weight: 600; color: var(--text2); min-width: 40px; }
.pain-row input[type=range] { flex: 1; accent-color: var(--gut); }
.pain-val { font-size: 0.85rem; font-weight: 700; color: var(--gut); min-width: 16px; text-align: right; }

.gut-log-list { margin-top: 4px; }
.gut-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.gut-entry:last-child { border-bottom: none; }
.gut-entry-icon { font-size: 1.5rem; }
.gut-entry-info { flex: 1; }
.gut-entry-info .main { font-size: 0.9rem; font-weight: 600; }
.gut-entry-info .sub { font-size: 0.75rem; color: var(--text2); margin-top: 1px; }
.gut-entry-time { font-size: 0.72rem; color: var(--text3); }
.gut-entry-del { background: none; border: none; color: var(--text3); font-size: 1.1rem; cursor: pointer; padding: 4px; }

/* ── Vitamins Module ────────────────────────────────────────────────────────── */
.vitamin-page { --accent: var(--vitamin); }

.time-group { margin-bottom: 16px; }
.time-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text3);
  margin-bottom: 8px;
}

.sup-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.sup-row.taken {
  background: var(--vitamin-light);
  border-color: var(--vitamin);
}
.sup-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all .15s;
}
.sup-row.taken .sup-check {
  background: var(--vitamin);
  border-color: var(--vitamin);
  color: #fff;
}
.sup-info { flex: 1; }
.sup-name { font-size: 0.95rem; font-weight: 600; }
.sup-dose { font-size: 0.75rem; color: var(--text2); margin-top: 1px; }
.sup-del { background: none; border: none; color: var(--text3); font-size: 1.1rem; cursor: pointer; padding: 6px; }

.adherence-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.adherence-day {
  flex: 1;
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text3);
  gap: 2px;
}
.adherence-day .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}
.adherence-day.logged .dot { background: var(--vitamin); }
.adherence-day.today-adh { border: 1.5px solid var(--vitamin); }

/* ── Add Form ───────────────────────────────────────────────────────────────── */
.add-form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent); }

.time-select-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.time-sel-btn {
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.time-sel-btn.selected { border-color: var(--accent); background: var(--vitamin-light); color: var(--vitamin); }

/* ── Collapse Toggle ─────────────────────────────────────────────────────────  */
.collapse-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 14px;
  cursor: pointer;
  color: var(--text);
}
.collapse-btn .chevron { font-size: 0.8rem; color: var(--text3); transition: transform .2s; }
.collapse-btn.open .chevron { transform: rotate(180deg); }
.collapsible { display: none; }
.collapsible.open { display: block; }

/* ── Empty States ────────────────────────────────────────────────────────────  */
.empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--text3);
  font-size: 0.9rem;
}
.empty .em-icon { font-size: 2.5rem; margin-bottom: 8px; }

/* ── Toast ──────────────────────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f2937;
  color: #f9fafb;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 300;
  white-space: nowrap;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Misc ────────────────────────────────────────────────────────────────────  */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.color-accent { color: var(--accent); }
.mt-2 { margin-top: 8px; }
.next-period-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--period-light);
  color: var(--period);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 14px;
}

/* ── Streak Badge ────────────────────────────────────────────────────────────── */
.streak-badge {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 14px;
  width: fit-content;
}
.streak-badge.visible { display: inline-flex; }
.streak-badge .streak-num { font-size: 1rem; color: var(--accent); }

/* ── Sleep Module ────────────────────────────────────────────────────────────── */
.sleep-page { --accent: var(--sleep); }

.sleep-timer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
  background: var(--sleep-light);
  color: var(--sleep);
}
.sleep-timer-btn.active {
  background: var(--sleep);
  color: #fff;
}
.sleep-timer-btn:active { transform: scale(0.97); }
.sleep-timer-elapsed {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text3);
  margin-top: 8px;
  min-height: 18px;
  font-weight: 600;
}

.sleep-summary {
  min-height: 60px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sleep-summary-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sleep-dur-big {
  font-size: 2rem;
  font-weight: 800;
  color: var(--sleep);
}

.sleep-dur-sub {
  font-size: 0.8rem;
  color: var(--text2);
  margin-top: 2px;
}

.sleep-meta {
  font-size: 0.8rem;
  color: var(--text3);
}

.sleep-quality-display {
  font-size: 1.6rem;
}

.sleep-duration-preview {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--sleep);
  min-height: 24px;
  margin-bottom: 14px;
}

.sleep-quality-btns {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 6px;
}

.quality-btn {
  flex: 1;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.6rem;
  padding: 10px 4px;
  cursor: pointer;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}

.quality-btn.selected {
  border-color: var(--sleep);
  background: var(--sleep-light);
  transform: scale(1.08);
}

.sleep-quality-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text3);
  padding: 0 2px;
  margin-bottom: 14px;
}

.sleep-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sleep-stat-box {
  background: var(--sleep-light);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}

.ssb-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--sleep);
}

.ssb-lbl {
  font-size: 0.68rem;
  color: var(--text2);
  margin-top: 3px;
}

.sleep-bar {
  flex: 1;
  position: relative;
  background: var(--surface2);
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  overflow: hidden;
}

.sleep-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 3px 3px 0 0;
  transition: height .3s;
}

.sleep-bar-fill.good   { background: var(--sleep); }
.sleep-bar-fill.ok     { background: #a78bfa; }
.sleep-bar-fill.poor   { background: var(--border); }

.sleep-hist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.sleep-hist-row:last-child { border-bottom: none; }
.sleep-hist-emoji { font-size: 1.4rem; }
.sleep-hist-info { flex: 1; }
.sleep-hist-dur { font-size: 0.95rem; font-weight: 700; color: var(--sleep); }
.sleep-hist-times { font-size: 0.75rem; color: var(--text2); margin-top: 1px; }
.sleep-hist-date { font-size: 0.72rem; color: var(--text3); }
.sleep-hist-del { background: none; border: none; color: var(--text3); font-size: 1.1rem; cursor: pointer; padding: 4px; }

/* ── Onboarding Overlay ──────────────────────────────────────────────────────── */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  padding: 32px 24px;
}

.ob-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 400px;
  gap: 16px;
}

.ob-logo {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 4px;
}

.ob-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.ob-title-sm {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.ob-body {
  font-size: 1rem;
  color: var(--text2);
  line-height: 1.5;
  max-width: 300px;
}

.ob-hint {
  font-size: 0.85rem;
  color: var(--text3);
  margin-top: -8px;
}

.ob-btn {
  width: 100%;
  max-width: 320px;
  margin-top: 8px;
}

.ob-tracker-list {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ob-tracker-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color .15s;
  -webkit-tap-highlight-color: transparent;
}

.ob-tracker-row input[type=checkbox] {
  width: 20px;
  height: 20px;
  accent-color: var(--water);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.ob-t-icon { font-size: 1.3rem; }
.ob-t-label { flex: 1; text-align: left; }

.ob-water-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 320px;
}

.ob-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
  text-align: left;
}

.ob-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ob-field-row input {
  flex: 1;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
}
.ob-field-row input:focus { border-color: var(--water); }
.ob-field-row span { font-size: 0.9rem; color: var(--text2); font-weight: 600; }

/* ── Dashboard Page ──────────────────────────────────────────────────────────── */
.dashboard-page { --accent: var(--water); }

.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
}

.dash-detail-btn {
  background: none;
  border: none;
  color: var(--water);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
}

.dash-tracker-card {
  cursor: pointer;
  transition: box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.dash-tracker-card:active { transform: scale(0.99); }

.dash-arrow {
  font-size: 1.4rem;
  color: var(--text3);
  font-weight: 300;
}

.dash-progress-wrap {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--water-light);
  border-radius: 999px;
  overflow: hidden;
}

.dash-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .4s cubic-bezier(.34,1.56,.64,1);
}

.dash-progress-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
}

.dash-tracker-body {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text2);
  font-weight: 500;
}

.dash-sleep-dur {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sleep);
}

.dash-count {
  font-size: 1rem;
  font-weight: 700;
  color: var(--vitamin);
}
.dash-count-done { color: #16a34a; }

/* ── Back button (period details) ────────────────────────────────────────────── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--water);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 8px;
  -webkit-tap-highlight-color: transparent;
}

/* ── Settings Panel ──────────────────────────────────────────────────────────── */
.settings-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: var(--text2);
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}
.settings-btn:hover { color: var(--text); }

.settings-panel {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 400;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}

.settings-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.settings-close-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text3);
  padding: 8px;
  border-radius: 50%;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.settings-close-btn:hover { color: var(--text); }

.settings-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.settings-section {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 8px;
}

.settings-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text3);
  padding: 14px 18px 8px;
}

.settings-tracker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  font-weight: 500;
}

.settings-account-row {
  padding: 12px 18px 14px;
  font-size: 0.875rem;
  color: var(--text2);
  border-top: 1px solid var(--border);
}

/* ── Toggle Switch ───────────────────────────────────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  transition: background .2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--water);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}


/* ── Dashboard streak badge ───────────────────────────────────────────────── */
.dash-streak-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
}

/* ── Settings sleep goal ─────────────────────────────────────────────────── */
.settings-goal-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.settings-goal-input-wrap input {
  width: 56px;
  padding: 6px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.9rem;
  text-align: center;
}

.settings-goal-unit {
  font-size: 0.85rem;
  color: var(--text2);
}

.settings-goal-hint {
  font-size: 0.75rem;
  color: var(--text3);
  margin-top: 6px;
  padding: 0 18px;
  margin-bottom: 8px;
}

/* ── Monthly Calendar Component ─────────────────────────────────────────────── */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-nav-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text2);
  cursor: pointer;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}
.cal-nav-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.cal-nav-btn:disabled { opacity: 0.3; cursor: default; }
.cal-nav-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.cal-day.active { font-weight: 700; }

/* ── Cup size stepper ────────────────────────────────────────────────────────── */
.cup-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 14px 0 12px;
}
.cup-step-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--water);
  background: none;
  color: var(--water);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.cup-step-btn:disabled { opacity: 0.3; cursor: default; }
.cup-step-btn:active:not(:disabled) { background: var(--water); color: #fff; }
.cup-step-val {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}
.cup-step-val span:first-child {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--water);
  line-height: 1.1;
}
.cup-step-unit {
  font-size: 0.72rem;
  color: var(--text3);
  font-weight: 500;
  margin-top: 2px;
}

/* ── Gut extra fields row ─────────────────────────────────────────────────────  */
.gut-fields-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.gut-field-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.gut-field-group label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.gut-field-group input {
  width: 100%;
  padding: 9px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
  height: 40px;
  line-height: 1.2;
}
.gut-field-group input[type="time"] { font-size: 0.85rem; }

/* ── Streak start text ───────────────────────────────────────────────────────── */
.streak-start {
  font-weight: 500;
  opacity: 0.85;
}

/* ── Tab bar: 6 items ────────────────────────────────────────────────────────── */
.tab-btn { font-size: 0.6rem; padding: 4px 2px; gap: 2px; }
.tab-btn .tab-icon { font-size: 1.2rem; }

/* ── Tally icon in auth ──────────────────────────────────────────────────────── */
.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.header-tally-icon {
  width: 26px;
  height: 26px;
  color: var(--text2);
}
.dark-toggle:hover .header-tally-icon { color: var(--text); }
.tally-icon {
  width: 64px;
  height: 64px;
  color: var(--accent);
}

/* ── Phase banner ──────────────────────────────────────────────────────────── */
.phase-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--phase-color, var(--period));
  color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.phase-name { font-size: .95rem; font-weight: 700; }
.phase-day  { font-size: .75rem; opacity: .85; margin-top: 2px; }
.phase-info-btn {
  background: rgba(255,255,255,.2);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: .8rem;
  cursor: pointer;
  white-space: nowrap;
}
.phase-tooltip-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.phase-tooltip-card p { margin: 0; font-size: .88rem; color: var(--text2); line-height: 1.5; }

/* ── Calendar legend ──────────────────────────────────────────────────────── */
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  font-size: .72rem;
  color: var(--text3);
  align-items: center;
}
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 3px;
}
.period-dot     { background: var(--period); }
.predicted-dot  { background: #f9a8d4; }
.follicular-dot { background: #bbf7d0; }
.ovulation-dot  { background: #fde68a; }
.luteal-dot     { background: #ddd6fe; }
.fertile-dot    { background: #6ee7b7; }

/* ── Fertile window + ovulation calendar cells ────────────────────────────── */
.cal-day.fertile-window {
  background: #6ee7b7 !important;
  color: #064e3b !important;
  border-radius: 50%;
}
.cal-day.ovulation {
  background: #fde68a !important;
  color: #78350f !important;
  border-radius: 50%;
  font-weight: 700;
}

/* ── Moon phase in calendar ───────────────────────────────────────────────── */
.cal-moon {
  display: block;
  font-size: .55rem;
  line-height: 1;
  margin-top: 1px;
}

/* ── Fertile badge ────────────────────────────────────────────────────────── */
.fertile-badge {
  font-size: .8rem;
  color: #065f46;
  background: #d1fae5;
  padding: 6px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
}
.dark .fertile-badge { background: #064e3b; color: #6ee7b7; }

/* ── Symptom intensity chips ──────────────────────────────────────────────── */
.chip.intensity-mild     { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.chip.intensity-moderate { background: #fed7aa; color: #9a3412; border-color: #fb923c; }
.chip.intensity-severe   { background: #fecaca; color: #7f1d1d; border-color: #f87171; }
.dark .chip.intensity-mild     { background: #78350f; color: #fef08a; border-color: #d97706; }
.dark .chip.intensity-moderate { background: #7c2d12; color: #fed7aa; border-color: #ea580c; }
.dark .chip.intensity-severe   { background: #7f1d1d; color: #fecaca; border-color: #ef4444; }
.chip-custom { border-style: dashed; }

/* ── Insight items ────────────────────────────────────────────────────────── */
.insight-item {
  font-size: .85rem;
  color: var(--text2);
  line-height: 1.5;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.insight-item:last-child { border-bottom: none; }

/* ── Settings select ──────────────────────────────────────────────────────── */
.settings-select {
  width: calc(100% - 36px);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text1);
  font-size: .9rem;
  margin: 8px 18px 4px;
  appearance: auto;
  display: block;
}

/* ── Info badge tooltip ───────────────────────────────────────────────────── */
.info-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text3);
  color: var(--bg);
  font-size: .65rem;
  cursor: pointer;
  font-style: normal;
  vertical-align: middle;
  margin-left: 4px;
}
.global-tooltip {
  position: absolute;
  z-index: 9999;
  background: #1a1a2e;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .82rem;
  max-width: 220px;
  line-height: 1.5;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  display: none;
}
.dark .global-tooltip { background: #fff; color: #1a1a2e; }

/* ── Period log EC/intimate sections ─────────────────────────────────────── */
#ec-log-section, #intimate-log-section {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ── Food trigger chips (same as symptom chips) ───────────────────────────── */
#food-trigger-chips { margin: 8px 0 14px; }

/* ── PIN lock overlay ─────────────────────────────────────────────────────── */
.pin-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 24px;
}
.pin-card {
  width: 100%;
  max-width: 320px;
  text-align: center;
}
.pin-logo { margin-bottom: 16px; }
.pin-tally-icon {
  width: 48px;
  height: 48px;
  color: var(--period);
}
.pin-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 24px;
}
.pin-dots, .pin-setup-dots {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 12px;
}
.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  transition: background .15s, border-color .15s;
}
.pin-dot.filled {
  background: var(--period);
  border-color: var(--period);
}
.pin-error {
  font-size: .82rem;
  color: #dc2626;
  min-height: 18px;
  margin-bottom: 16px;
}
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 260px;
  margin: 0 auto;
}
.pin-key {
  aspect-ratio: 1;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .1s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  min-height: 56px;
}
.pin-key:active { background: var(--surface2); transform: scale(0.95); }
.pin-key-empty { visibility: hidden; }
.pin-key-del { font-size: 1rem; }
@keyframes pin-shake {
  0%,100%  { transform: translateX(0); }
  20%,60%  { transform: translateX(-8px); }
  40%,80%  { transform: translateX(8px); }
}
.pin-shake { animation: pin-shake .4s ease; }

/* ── Onboarding tally SVG ──────────────────────────────────────────────────── */
.ob-tally-icon {
  width: 64px;
  height: 64px;
  color: var(--period);
}

/* ── Menopause mode header ─────────────────────────────────────────────────── */
.meno-mode-header {
  background: var(--sleep-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.meno-mode-header strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.meno-mode-header p {
  font-size: .85rem;
  color: var(--text2);
  line-height: 1.5;
  margin: 0;
}

/* ── Prediction unreliable message ────────────────────────────────────────── */
.prediction-unreliable-msg {
  font-size: .82rem;
  color: var(--text3);
  font-style: italic;
  padding: 8px 0 4px;
  line-height: 1.4;
}

/* ── Fertile window active alert ──────────────────────────────────────────── */
.fertile-alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #d1fae5;
  border: 1.5px solid #6ee7b7;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.dark .fertile-alert-banner { background: #064e3b; border-color: #065f46; }
.fertile-alert-icon { font-size: 1.4rem; flex-shrink: 0; }
.fertile-alert-text { flex: 1; }
.fertile-alert-text strong {
  display: block;
  font-size: .9rem;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 2px;
}
.dark .fertile-alert-text strong { color: #6ee7b7; }
.fertile-alert-dates {
  font-size: .8rem;
  color: #047857;
}
.dark .fertile-alert-dates { color: #a7f3d0; }

/* ── Symptom pattern card ─────────────────────────────────────────────────── */
.symptom-pattern-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.symptom-pattern-row:last-child { border-bottom: none; }
.symptom-pattern-name {
  color: var(--text);
  font-weight: 500;
  text-transform: capitalize;
}
.symptom-pattern-range {
  color: var(--text3);
  font-size: .78rem;
}

/* ── Supplement reorder buttons ───────────────────────────────────────────── */
.sup-reorder {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-right: 6px;
}
.sup-move-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text2);
  font-size: .7rem;
  line-height: 1;
  padding: 2px 5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .1s;
}
.sup-move-btn:active { background: var(--border); }
.sup-move-btn:disabled { opacity: 0.3; cursor: default; }

/* ── Adherence summary text ───────────────────────────────────────────────── */
.adherence-summary-text {
  text-align: center;
  font-size: .82rem;
  color: var(--text3);
  margin-top: 8px;
  font-weight: 500;
}

/* ── PIN forgot button ────────────────────────────────────────────────────── */
.pin-forgot-btn {
  display: block;
  margin: 20px auto 0;
  background: none;
  border: none;
  font-size: .8rem;
  color: var(--text3);
  cursor: pointer;
  padding: 8px;
  text-decoration: underline;
  -webkit-tap-highlight-color: transparent;
}
.pin-forgot-btn:hover { color: var(--text2); }
