/* ═══════════════════════════════════════════
   GAINMODE v2 — Premium Animated UI
   ═══════════════════════════════════════════ */

:root {
  --cream: #F7F4EF;
  --cream-dark: #EDE8DF;
  --white: #FFFFFF;
  --charcoal: #0F0F0F;
  --charcoal-mid: #1E1E1E;
  --charcoal-soft: #2A2A2A;
  --grey-soft: #6B6B6B;
  --grey-light: #ABABAB;
  --grey-border: #E2DDD6;
  --gold: #C9A96E;
  --gold-light: #E8D5B0;
  --gold-glow: rgba(201,169,110,0.25);
  --success: #3D7A52;
  --success-bg: #EBF5EF;
  --danger: #C0392B;
  --sidebar-w: 220px;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 2px 20px rgba(15,15,15,0.07);
  --shadow-md: 0 8px 32px rgba(15,15,15,0.12);
  --shadow-gold: 0 8px 32px rgba(201,169,110,0.2);
  --ease: cubic-bezier(0.4,0,0.2,1);
  --spring: cubic-bezier(0.34,1.56,0.64,1);
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;scroll-behavior:smooth}
body{font-family:'Sora',sans-serif;background:var(--cream);color:var(--charcoal);min-height:100vh;-webkit-font-smoothing:antialiased;overflow-x:hidden}
svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
button{cursor:pointer;border:none;background:none;font-family:inherit}
input{font-family:inherit}
ul{list-style:none}

/* ═══════════════════════════════════════════
   SPLASH SCREEN
   ═══════════════════════════════════════════ */
#splash {
  position: fixed;
  inset: 0;
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
#splash.hide {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}
.splash-inner { text-align: center; }

.splash-logo {
  width: 80px; height: 80px;
  background: var(--gold);
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  animation: splashPop 0.6s var(--spring) 0.2s both;
  box-shadow: var(--shadow-gold);
}
.splash-g {
  font-family: 'Playfair Display', serif;
  font-size: 40px; font-weight: 700;
  color: var(--charcoal);
}
.splash-brand {
  font-family: 'Playfair Display', serif;
  font-size: 28px; font-weight: 700;
  color: var(--white);
  animation: splashFadeUp 0.5s var(--ease) 0.5s both;
  letter-spacing: 0.02em;
}
.splash-tagline {
  font-size: 13px; color: var(--gold);
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-top: 8px;
  animation: splashFadeUp 0.5s var(--ease) 0.7s both;
}
.splash-loader {
  width: 120px; height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 100px;
  margin: 28px auto 0;
  overflow: hidden;
  animation: splashFadeUp 0.5s var(--ease) 0.8s both;
}
.splash-loader-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 100px;
  animation: splashLoad 1.8s var(--ease) 0.8s forwards;
}

@keyframes splashPop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@keyframes splashFadeUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes splashLoad {
  from { width: 0; }
  to   { width: 100%; }
}

/* ═══════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,15,15,0.6);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 8000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease);
  padding: 20px;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  max-width: 360px; width: 100%;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s var(--spring);
  box-shadow: var(--shadow-md);
}
.modal-overlay.show .modal-box { transform: scale(1) translateY(0); }
.modal-icon { font-size: 36px; margin-bottom: 12px; }
.modal-title { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.modal-msg { font-size: 14px; color: var(--grey-soft); line-height: 1.6; margin-bottom: 24px; }
.modal-btns { display: flex; gap: 12px; }
.modal-cancel {
  flex: 1; padding: 13px;
  border: 1.5px solid var(--grey-border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  color: var(--grey-soft);
  transition: all 0.2s var(--ease);
}
.modal-cancel:hover { border-color: var(--charcoal); color: var(--charcoal); }
.modal-confirm {
  flex: 1; padding: 13px;
  background: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  color: var(--white);
  transition: background 0.2s var(--ease);
}
.modal-confirm:hover { background: #a93226; }

/* ═══════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 100px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--charcoal);
  color: var(--white);
  padding: 13px 26px;
  border-radius: 100px;
  font-size: 13.5px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: all 0.3s var(--spring);
  z-index: 7000;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,0.08);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════ */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--charcoal);
  display: flex; flex-direction: column;
  padding: 28px 14px 24px;
  z-index: 100;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 36px; padding: 0 8px;
}
.brand-mark {
  width: 34px; height: 34px;
  background: var(--gold);
  color: var(--charcoal);
  font-family: 'Playfair Display', serif;
  font-weight: 700; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; flex-shrink: 0;
}
.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 17px; font-weight: 600;
  color: var(--white); letter-spacing: 0.02em;
}
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: var(--radius-sm);
  color: var(--grey-light); font-size: 13.5px; font-weight: 500;
  letter-spacing: 0.01em; transition: all 0.2s var(--ease);
  text-align: left; position: relative; overflow: hidden;
}
.nav-btn svg { width: 16px; height: 16px; }
.nav-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  opacity: 0; transition: opacity 0.2s;
}
.nav-btn:hover::before { opacity: 1; }
.nav-btn:hover { color: var(--white); }
.nav-btn.active {
  background: rgba(201,169,110,0.12);
  color: var(--gold);
}
.nav-indicator {
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 0;
  background: var(--gold);
  border-radius: 3px 0 0 3px;
  transition: height 0.3s var(--spring);
}
.nav-btn.active .nav-indicator { height: 20px; }
.sidebar-date { color: var(--grey-soft); font-size: 11px; padding: 0 12px; letter-spacing: 0.05em; text-transform: uppercase; }

/* ═══════════════════════════════════════════
   BOTTOM NAV
   ═══════════════════════════════════════════ */
.bottom-nav {
  display: none; position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(15,15,15,0.97);
  backdrop-filter: blur(20px);
  padding: 8px 4px max(12px, env(safe-area-inset-bottom));
  z-index: 100; justify-content: space-around;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.bnav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 14px; color: #555;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: color 0.2s var(--ease);
  position: relative;
}
.bnav-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  transition: all 0.3s var(--spring);
}
.bnav-btn svg { width: 20px; height: 20px; stroke: currentColor; }
.bnav-btn.active { color: var(--gold); }
.bnav-btn.active .bnav-icon {
  background: rgba(201,169,110,0.15);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 48px 40px;
  max-width: calc(var(--sidebar-w) + 860px);
}

/* ═══════════════════════════════════════════
   SECTION TRANSITIONS
   ═══════════════════════════════════════════ */
.section { display: none; }
.section.active { display: block; }
.section.enter { animation: sectionEnter 0.4s var(--ease) both; }
.section.exit  { animation: sectionExit 0.25s var(--ease) both; }

@keyframes sectionEnter {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes sectionExit {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* Staggered card animations */
.card-stagger { opacity: 0; transform: translateY(20px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.card-stagger.visible { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════
   SECTION HEADER
   ═══════════════════════════════════════════ */
.section-header { margin-bottom: 32px; }
.section-eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 6px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700; color: var(--charcoal); line-height: 1.1;
}
.section-subtitle { margin-top: 6px; color: var(--grey-soft); font-size: 14px; }

/* ═══════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  border: 1px solid var(--grey-border);
  position: relative; overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.card-dark {
  background: var(--charcoal);
  border-color: rgba(255,255,255,0.06);
  color: var(--white);
}
.card-label {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--grey-soft); margin-bottom: 16px;
}
.card-label.light { color: rgba(255,255,255,0.4); }

/* ═══════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════ */
.dashboard-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }

/* Streak */
.streak-card { padding: 32px 24px; text-align: center; }
.streak-number {
  font-family: 'Playfair Display', serif;
  font-size: 72px; font-weight: 700; color: var(--gold);
  line-height: 1; margin: 8px 0 4px;
  text-shadow: 0 0 40px var(--gold-glow);
}
.card-sub { font-size: 12px; color: rgba(255,255,255,0.4); letter-spacing: 0.06em; }
.streak-flame {
  position: absolute; top: 16px; right: 18px;
  font-size: 28px;
  animation: flamePulse 2s ease-in-out infinite;
}
@keyframes flamePulse {
  0%,100% { transform: scale(1) rotate(-3deg); }
  50%      { transform: scale(1.12) rotate(3deg); }
}

/* Quote */
.quote-card { }
.quote-text {
  font-family: 'Playfair Display', serif;
  font-size: 16px; font-style: italic;
  line-height: 1.65; color: var(--charcoal); margin-bottom: 12px;
}
.quote-author { font-size: 12px; color: var(--grey-soft); font-weight: 600; letter-spacing: 0.04em; }

/* Summary */
.summary-card { grid-column: 1 / -1; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.summary-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 8px;
  border-right: 1px solid var(--grey-border);
}
.summary-item:last-child { border-right: none; }
.summary-val {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 700; color: var(--charcoal);
}
.summary-key { font-size: 11px; color: var(--grey-soft); margin-top: 4px; }

/* Preview */
.checklist-preview-card { }
.preview-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.preview-item { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.preview-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--grey-border); flex-shrink: 0;
  transition: background 0.3s var(--ease), transform 0.3s var(--spring);
}
.preview-dot.done { background: var(--success); transform: scale(1.2); }
.preview-text.done { color: var(--grey-light); text-decoration: line-through; }
.link-btn { font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: 0.06em; transition: opacity 0.2s; }
.link-btn:hover { opacity: 0.65; }

/* Weight mini */
.weight-mini-card { }
.weight-range { display: flex; justify-content: space-between; font-size: 13px; color: var(--grey-soft); margin-bottom: 10px; }
.weight-goal { font-weight: 700; color: var(--gold); }
.weight-current-text { font-size: 12px; color: var(--grey-soft); margin-top: 8px; }

/* ═══════════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════════ */
.progress-bar-wrap {
  width: 100%; height: 8px;
  background: var(--cream-dark); border-radius: 100px; overflow: hidden;
}
.large-bar { height: 12px; }
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, #E8C87A 100%);
  border-radius: 100px;
  transition: width 0.8s var(--ease);
  position: relative;
}
.progress-bar-fill::after {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 30px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
  animation: shimmer 2s ease-in-out infinite;
}
@keyframes shimmer {
  0%,100% { opacity: 0; }
  50%      { opacity: 1; }
}
.progress-bar-caption { margin-top: 10px; font-size: 13px; color: var(--grey-soft); text-align: center; }

/* ═══════════════════════════════════════════
   ROUTINE
   ═══════════════════════════════════════════ */
.routine-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.routine-header-row .card-label { margin-bottom: 0; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--cream); display: flex; align-items: center; justify-content: center;
  color: var(--grey-soft); transition: all 0.2s var(--ease);
}
.icon-btn:hover { background: var(--charcoal); color: var(--white); transform: rotate(180deg); }
.icon-btn.danger:hover { background: #fee; color: var(--danger); transform: none; }
.icon-btn svg { width: 15px; height: 15px; }

.checklist { display: flex; flex-direction: column; gap: 4px; }
.checklist-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 14px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s var(--ease);
  border: 1.5px solid transparent; user-select: none;
}
.checklist-item:hover { background: var(--cream); }
.checklist-item.checked { background: var(--success-bg); border-color: #C3DBC9; }
.checklist-item:active { transform: scale(0.98); }

.check-box {
  width: 24px; height: 24px; border: 2px solid var(--grey-border);
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.25s var(--spring);
}
.checklist-item.checked .check-box {
  background: var(--success); border-color: var(--success);
  transform: scale(1.05);
  box-shadow: 0 0 0 4px rgba(61,122,82,0.15);
}
.check-box svg { width: 13px; height: 13px; stroke: white; stroke-width: 3; opacity: 0; transition: all 0.2s var(--ease) 0.05s; transform: scale(0.5); }
.checklist-item.checked .check-box svg { opacity: 1; transform: scale(1); }

.check-label { font-size: 14px; font-weight: 500; color: var(--charcoal); flex: 1; transition: color 0.2s; }
.checklist-item.checked .check-label { color: var(--grey-soft); text-decoration: line-through; }
.check-time { font-size: 11.5px; color: var(--grey-light); font-weight: 500; }

.routine-footer { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--grey-border); }
.routine-progress-wrap { height: 6px; background: var(--cream-dark); border-radius: 100px; overflow: hidden; margin-bottom: 8px; }
.routine-progress-fill { height: 100%; background: var(--success); border-radius: 100px; transition: width 0.5s var(--ease); }
.routine-progress-text { font-size: 12px; color: var(--grey-soft); text-align: right; }

.input-row { display: flex; gap: 10px; }
.gm-input {
  flex: 1; padding: 13px 16px;
  border: 1.5px solid var(--grey-border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--charcoal); background: var(--cream);
  outline: none; transition: all 0.2s var(--ease);
}
.gm-input:focus { border-color: var(--gold); background: var(--white); box-shadow: 0 0 0 4px var(--gold-glow); }
.gm-input::placeholder { color: var(--grey-light); }
.gm-btn {
  padding: 13px 22px; background: var(--charcoal); color: var(--white);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; transition: all 0.2s var(--ease); white-space: nowrap;
}
.gm-btn:hover { background: #333; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.gm-btn:active { transform: scale(0.97); }

/* ═══════════════════════════════════════════
   NUTRITION
   ═══════════════════════════════════════════ */
.macro-banner {
  display: flex; align-items: center; justify-content: center;
  gap: 28px; padding: 28px 24px; margin-bottom: 14px;
  flex-wrap: wrap;
}
.macro-ring-wrap { position: relative; width: 110px; height: 110px; flex-shrink: 0; }
.macro-ring { width: 110px; height: 110px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 10; }
.ring-fill { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray 1s var(--ease); }
.cal-ring { stroke: var(--gold); }
.pro-ring { stroke: #5BC47F; }
.macro-ring-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.macro-big {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700; color: var(--white); line-height: 1;
}
.macro-unit { font-size: 10px; color: rgba(255,255,255,0.4); letter-spacing: 0.06em; margin-top: 2px; }
.macro-targets { display: flex; flex-direction: column; gap: 10px; }
.macro-target-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255,255,255,0.5); }
.mdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cal-dot { background: var(--gold); }
.pro-dot { background: #5BC47F; }

.quick-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.quick-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 8px; border: 1.5px solid var(--grey-border);
  border-radius: var(--radius-sm); background: var(--cream);
  gap: 4px; cursor: pointer; transition: all 0.2s var(--ease);
  position: relative; overflow: hidden;
}
.quick-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--gold);
  opacity: 0; transition: opacity 0.2s;
  border-radius: var(--radius-sm);
}
.quick-btn:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow-gold); }
.quick-btn:active { transform: scale(0.95); }
.quick-icon { font-size: 26px; line-height: 1; position: relative; z-index: 1; }
.quick-name { font-size: 11px; font-weight: 700; color: var(--charcoal); text-align: center; position: relative; z-index: 1; }
.quick-macros { font-size: 10px; color: var(--grey-soft); text-align: center; position: relative; z-index: 1; }

/* Quick-add pop animation */
.quick-btn.popped { animation: quickPop 0.35s var(--spring); }
@keyframes quickPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.92); }
  70%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.custom-meal-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; }
.meal-log { display: flex; flex-direction: column; gap: 4px; }
.meal-empty { font-size: 13.5px; color: var(--grey-light); padding: 16px 0; text-align: center; }
.meal-entry {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--cream); border: 1px solid var(--grey-border);
  animation: mealSlideIn 0.3s var(--spring) both;
}
@keyframes mealSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.meal-entry-name { font-size: 13.5px; font-weight: 600; color: var(--charcoal); }
.meal-entry-macros { font-size: 12px; color: var(--grey-soft); }
.meal-delete {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--grey-light); font-size: 18px; line-height: 1;
  transition: all 0.2s var(--ease);
}
.meal-delete:hover { background: #fee; color: var(--danger); }

/* ═══════════════════════════════════════════
   WORKOUT
   ═══════════════════════════════════════════ */
.day-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.day-tab {
  padding: 9px 18px; border-radius: 100px;
  border: 1.5px solid var(--grey-border);
  font-size: 13px; font-weight: 700;
  color: var(--grey-soft); background: var(--white);
  transition: all 0.2s var(--ease); letter-spacing: 0.02em;
}
.day-tab:hover { border-color: var(--gold); color: var(--charcoal); }
.day-tab.active {
  background: var(--charcoal); border-color: var(--charcoal);
  color: var(--white); box-shadow: var(--shadow-md);
}

.workout-day-title { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.workout-day-sub { font-size: 13px; color: var(--gold); font-weight: 600; margin-bottom: 20px; letter-spacing: 0.04em; }

.exercise-list { display: flex; flex-direction: column; gap: 4px; }
.exercise-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s var(--ease);
  border: 1.5px solid transparent;
}
.exercise-item:hover { background: var(--cream); }
.exercise-item.done { background: var(--success-bg); border-color: #C3DBC9; }
.exercise-item:active { transform: scale(0.98); }

.ex-box {
  width: 22px; height: 22px; border: 2px solid var(--grey-border);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.25s var(--spring);
}
.exercise-item.done .ex-box {
  background: var(--success); border-color: var(--success);
  transform: scale(1.05);
  box-shadow: 0 0 0 4px rgba(61,122,82,0.12);
}
.ex-box svg { width: 12px; height: 12px; stroke: white; stroke-width: 3; opacity: 0; transition: all 0.2s 0.05s; transform: scale(0.5); }
.exercise-item.done .ex-box svg { opacity: 1; transform: scale(1); }
.ex-name { font-size: 14px; font-weight: 500; color: var(--charcoal); flex: 1; transition: color 0.2s; }
.exercise-item.done .ex-name { color: var(--grey-soft); text-decoration: line-through; }

.workout-footer {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--grey-border);
  display: flex; align-items: center; justify-content: space-between;
}
.workout-count { font-size: 13px; color: var(--grey-soft); }
.workout-done-badge {
  display: none; padding: 7px 16px;
  background: var(--success-bg); color: var(--success);
  border-radius: 100px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; animation: badgePop 0.4s var(--spring);
}
.workout-done-badge.visible { display: block; }
@keyframes badgePop {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.rest-day-card { text-align: center; padding: 60px 24px; }
.rest-day-icon { font-size: 52px; margin-bottom: 16px; }
.rest-day-title { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.rest-day-sub { font-size: 14px; color: var(--grey-soft); line-height: 1.6; }

/* ═══════════════════════════════════════════
   PROGRESS
   ═══════════════════════════════════════════ */
.tag {
  background: var(--cream-dark); color: var(--grey-soft);
  font-size: 9px; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; letter-spacing: 0.08em; text-transform: uppercase; margin-left: 4px;
}
.chart-wrap {
  height: 180px; display: flex; align-items: flex-end;
  gap: 6px; padding: 12px 0 0;
  border-bottom: 1px solid var(--grey-border);
  position: relative; overflow: hidden;
}
.chart-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--grey-light); font-size: 13.5px;
}
.chart-bar-wrap {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; min-width: 0; height: 100%; justify-content: flex-end; gap: 4px;
}
.chart-bar {
  width: 100%;
  background: linear-gradient(to top, var(--gold), var(--gold-light));
  border-radius: 4px 4px 0 0; min-height: 4px;
  transition: height 0.7s var(--ease);
  animation: barRise 0.6s var(--ease) both;
}
@keyframes barRise {
  from { transform: scaleY(0); transform-origin: bottom; }
  to   { transform: scaleY(1); }
}
.chart-label { font-size: 9px; color: var(--grey-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.weight-log-list { display: flex; flex-direction: column; gap: 4px; }
.weight-log-entry {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-radius: var(--radius-sm); background: var(--cream);
  font-size: 13.5px; animation: mealSlideIn 0.3s var(--spring) both;
}
.weight-log-val { font-weight: 700; color: var(--charcoal); }
.weight-log-date { color: var(--grey-soft); font-size: 12px; }

/* ═══════════════════════════════════════════
   CALENDAR
   ═══════════════════════════════════════════ */
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.cal-month-title { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; }
.cal-nav-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--cream); font-size: 20px; color: var(--charcoal);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease);
}
.cal-nav-btn:hover { background: var(--charcoal); color: white; transform: scale(1.05); }
.cal-weekdays { display: grid; grid-template-columns: repeat(7,1fr); margin-bottom: 8px; }
.cal-weekdays span { text-align: center; font-size: 11px; font-weight: 700; color: var(--grey-light); letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.cal-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 13px; font-weight: 500; color: var(--charcoal);
  transition: all 0.2s var(--ease);
}
.cal-cell.empty { visibility: hidden; }
.cal-cell.today { background: var(--charcoal); color: white; font-weight: 700; }
.cal-cell.complete { background: var(--success); color: white; }
.cal-cell.partial { background: var(--gold-light); color: var(--charcoal); }
.cal-legend { display: flex; gap: 16px; margin-top: 16px; font-size: 12px; color: var(--grey-soft); align-items: center; flex-wrap: wrap; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.dot-complete { background: var(--success); }
.dot-partial { background: var(--gold-light); border: 1px solid var(--gold); }
.dot-today { background: var(--charcoal); }

/* ═══════════════════════════════════════════
   FOUNDER
   ═══════════════════════════════════════════ */
.founder-hero { text-align: center; padding: 48px 24px 36px; }
.founder-avatar {
  width: 90px; height: 90px; background: var(--charcoal); color: var(--gold);
  font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; letter-spacing: 0.05em;
  box-shadow: 0 0 0 4px var(--gold-glow), var(--shadow-md);
  animation: founderFloat 4s ease-in-out infinite;
}
@keyframes founderFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.founder-name { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.founder-tagline { font-size: 13px; color: var(--gold); font-weight: 600; letter-spacing: 0.08em; }
.founder-bio { font-size: 15px; line-height: 1.8; color: var(--charcoal-soft); }
.founder-stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 14px; }
.founder-stat { text-align: center; padding: 24px 12px; }
.founder-stat-num { display: block; font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; color: var(--charcoal); margin-bottom: 6px; }
.founder-stat-label { font-size: 11.5px; color: var(--grey-soft); }
.philosophy-list { display: flex; flex-direction: column; gap: 14px; }
.philosophy-list li { font-size: 14px; line-height: 1.65; color: var(--charcoal-soft); }
.version-text { font-size: 13px; color: var(--grey-light); }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  .main-content { margin-left: 0; padding: 24px 18px 110px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2,1fr); }
  .quick-grid { grid-template-columns: repeat(2,1fr); }
  .custom-meal-form { grid-template-columns: 1fr 1fr; }
  .custom-meal-form .gm-btn { grid-column: 1/-1; }
  .founder-stats-grid { grid-template-columns: 1fr 1fr; }
  .macro-banner { gap: 18px; }
}
@media (max-width: 420px) {
  .day-tabs { gap: 6px; }
  .day-tab { padding: 8px 12px; font-size: 12px; }
  .streak-number { font-size: 56px; }
  .macro-ring-wrap { width: 90px; height: 90px; }
  .macro-ring { width: 90px; height: 90px; }
  .macro-big { font-size: 18px; }
}