/* ===== Choque Fit — Design System ===== */
:root {
  --bg: #0a0a0a;
  --bg-2: #111114;
  --surface: #18181c;
  --surface-2: #1f1f24;
  --border: #2a2a30;
  --border-strong: #3a3a42;
  --text: #f5f5f7;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --primary: #ef4444;
  --primary-2: #dc2626;
  --primary-glow: rgba(239,68,68,.35);
  --orange: #f97316;
  --green: #22c55e;
  --blue: #3b82f6;
  --yellow: #eab308;
  --gradient: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  --gradient-cool: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --shadow-glow: 0 0 40px rgba(239,68,68,.25);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(at 0% 0%, rgba(239,68,68,.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(249,115,22,.06) 0px, transparent 50%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

input, textarea, select {
  font-family: inherit; font-size: 16px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 14px 16px; width: 100%;
  outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ===== Layout ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 0 20px; }

/* ===== Navbar ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,10,.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; max-width: 1100px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 18px; letter-spacing: -.02em;
}
.brand-logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--gradient); display: grid; place-items: center;
  font-size: 18px; box-shadow: var(--shadow-glow);
}
.brand-logo-img {
  width: 44px; height: 44px; border-radius: 0; object-fit: contain; filter: drop-shadow(0 0 4px rgba(255,140,50,0.3));
}
.nav-links { display: none; gap: 6px; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--text-2); transition: all .15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active {
  color: var(--text); background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.nav-user {
  display: flex; align-items: center; gap: 10px;
}
.nav-burger {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; background: var(--surface);
  border: 1px solid var(--border);
}
.logout-btn {
  background: var(--surface); padding: 8px 14px; border-radius: 999px;
  font-size: 13px; color: var(--text-2);
  border: 1px solid var(--border);
}

@media (min-width: 880px) {
  .nav-links { display: flex; }
  .nav-burger { display: none; }
}


/* ===== Mobile drawer ===== */
.drawer {
  position: fixed; inset: 0; z-index: 100;
  display: none;
}
.drawer.open { display: block; }
.drawer-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 80%; max-width: 300px;
  background: var(--bg-2); border-left: 1px solid var(--border);
  padding: 0; display: flex; flex-direction: column;
  animation: slideIn .25s ease-out;
  overflow-y: auto;
}
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.drawer-logo {
  height: 40px; width: auto; object-fit: contain;
}
.drawer-close {
  width: 36px; height: 36px;
  border-radius: 8px; display: grid; place-items: center;
  font-size: 22px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text);
}
.drawer-links {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 12px;
  flex: 1;
}
.drawer-links a {
  padding: 14px 16px; border-radius: var(--r-md); font-weight: 500;
  font-size: 15px;
  display: flex; align-items: center; gap: 14px;
  border: 1px solid transparent;
  color: var(--text-2);
  transition: all .15s;
}
.drawer-links a:hover, .drawer-links a.active {
  background: var(--surface); border-color: var(--border);
  color: var(--text);
}
.drawer-icon {
  font-size: 20px; width: 24px; text-align: center;
  flex-shrink: 0;
}
.drawer-footer {
  padding: 16px 12px 24px;
  border-top: 1px solid var(--border);
}
.btn-outline {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-2); width: 100%; padding: 12px;
  border-radius: var(--r-md); font-weight: 500; font-size: 14px;
  text-align: center; cursor: pointer;
  transition: all .15s;
}
.btn-outline:hover {
  background: var(--surface); color: var(--text);
}
.btn-block { width: 100%; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: var(--r-md);
  font-weight: 700; font-size: 15px; letter-spacing: .01em;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border);
  transition: all .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--gradient); border-color: transparent;
  box-shadow: 0 8px 24px -8px var(--primary-glow);
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 12px 32px -8px var(--primary-glow); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 18px 28px; font-size: 17px; }

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
}
.card-pad-lg { padding: 28px; }
.card h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; margin-bottom: 14px; }

/* ===== Flash ===== */
.flash {
  margin: 14px 0; padding: 12px 16px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 500;
  border: 1px solid;
}
.flash-success { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); color: #86efac; }
.flash-error { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); color: #fca5a5; }

/* ===== Landing ===== */
.hero {
  padding: 80px 20px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(239,68,68,.15), transparent 60%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-2);
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 12px var(--primary);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.hero h1 {
  font-size: clamp(40px, 8vw, 84px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.04em;
  margin-bottom: 20px;
}
.hero h1 .accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-2);
  max-width: 620px; margin: 0 auto 36px;
}
.hero-cta {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

.features {
  padding: 60px 20px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .features { grid-template-columns: repeat(3, 1fr); padding: 80px 20px; } }
.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform .2s, border-color .2s;
}
.feat-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.feat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--gradient);
  display: grid; place-items: center;
  font-size: 24px; margin-bottom: 16px;
  box-shadow: var(--shadow-glow);
}
.feat-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text); text-transform: none; letter-spacing: 0; }
.feat-card p { color: var(--text-2); font-size: 15px; }

.protocol-strip {
  background: var(--surface);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 30px 20px;
  display: flex; gap: 30px; justify-content: center; flex-wrap: wrap;
}
.protocol-strip .stat {
  text-align: center;
}
.protocol-strip .num {
  font-size: 42px; font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.protocol-strip .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin-top: 4px; }

.cta-final {
  padding: 80px 20px;
  text-align: center;
}
.cta-final h2 {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 900;
  line-height: 1; letter-spacing: -.03em;
  margin-bottom: 20px;
}
.cta-final p { color: var(--text-2); margin-bottom: 32px; max-width: 540px; margin-left: auto; margin-right: auto; }

footer.foot {
  border-top: 1px solid var(--border);
  padding: 30px 20px; text-align: center;
  font-size: 13px; color: var(--text-3);
}

/* ===== Login ===== */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 36px 28px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6);
}
.auth-card .brand { justify-content: center; margin-bottom: 8px; font-size: 22px; }
.auth-card h1 { font-size: 26px; font-weight: 800; text-align: center; margin: 8px 0 6px; }
.auth-card .sub { text-align: center; color: var(--text-2); font-size: 14px; margin-bottom: 28px; }
.auth-card .field { margin-bottom: 14px; }
.auth-card label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin-bottom: 8px; }
.auth-card .btn { width: 100%; margin-top: 10px; }
.auth-card .back { display: block; text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-3); }

/* ===== Dashboard ===== */
.dash-wrap { padding: 24px 20px 60px; max-width: 1100px; margin: 0 auto; }

.day-header {
  display: grid; gap: 18px;
  grid-template-columns: 1fr; align-items: stretch;
  margin-bottom: 18px;
}
@media (min-width: 720px) { .day-header { grid-template-columns: 1.4fr 1fr; } }

.day-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 24px;
  position: relative; overflow: hidden;
}
.day-card::before {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 220px; height: 220px;
  background: var(--gradient); opacity: .12;
  border-radius: 50%; filter: blur(30px);
}
.day-card .day-num {
  font-size: 96px; font-weight: 900; line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -.04em;
}
.day-card .day-of { font-size: 14px; color: var(--text-3); text-transform: uppercase; letter-spacing: .12em; margin-top: 4px; }
.day-card .day-greet { margin-top: 18px; font-size: 22px; font-weight: 800; line-height: 1.2; }
.day-card .day-quote { color: var(--text-2); font-size: 14px; margin-top: 6px; }

.ring-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; gap: 10px; }
.ring {
  --p: 0;
  width: 160px; height: 160px; border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-2) 0);
  display: grid; place-items: center;
  position: relative;
  transition: background 0.6s ease;
}
.ring::before {
  content: ''; position: absolute; inset: 12px;
  background: var(--surface); border-radius: 50%;
}
.ring-val {
  position: relative; font-size: 36px; font-weight: 900;
}
.ring-val small { font-size: 14px; color: var(--text-3); margin-left: 2px; }
.ring-lbl { color: var(--text-2); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }

/* Streak badge */
.streak {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(249,115,22,.14); color: #fdba74;
  font-size: 13px; font-weight: 600; margin-top: 16px;
}

/* Workout today */
.workout-today {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 24px;
  margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.workout-today::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent-color, var(--primary));
}
.workout-today .label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); font-weight: 700; }
.workout-today .focus { font-size: 28px; font-weight: 900; letter-spacing: -.02em; margin-top: 4px; }
.workout-today .ex { color: var(--text-2); margin-top: 12px; font-size: 15px; line-height: 1.6; }
.workout-today .cardio-line { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-2); }
.workout-today .note { background: var(--surface-2); border-left: 3px solid var(--primary); padding: 12px 14px; border-radius: 8px; margin-top: 14px; font-size: 14px; color: var(--text); }

/* Checklist */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 32px 0 14px;
}
.section-head h2 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.section-head .meta { font-size: 13px; color: var(--text-3); }

.checklist {
  display: grid; gap: 10px;
}
.check-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: all .15s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.check-item:hover { border-color: var(--border-strong); }
.check-item.done {
  background: rgba(34,197,94,.06);
  border-color: rgba(34,197,94,.3);
}
.check-item .ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 22px; flex-shrink: 0;
}
.check-item.done .ico { background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.3); }
.check-item .body { flex: 1; min-width: 0; }
.check-item .body strong { font-size: 15px; font-weight: 700; display: block; }
.check-item .body span { color: var(--text-3); font-size: 13px; }
.check-item.done .body strong { text-decoration: line-through; color: var(--text-2); }
.check-item .toggle {
  width: 28px; height: 28px; border-radius: 8px;
  border: 2px solid var(--border-strong);
  display: grid; place-items: center; flex-shrink: 0;
  transition: all .15s;
}
.check-item.done .toggle {
  background: var(--green); border-color: var(--green);
}
.check-item .toggle svg { width: 16px; height: 16px; opacity: 0; transition: opacity .15s; }
.check-item.done .toggle svg { opacity: 1; }

/* Water tracker */
.water-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 22px; margin-bottom: 18px; }
.water-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.water-head .title { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); font-weight: 700; }
.water-head .amt { font-size: 32px; font-weight: 900; }
.water-head .amt small { font-size: 14px; color: var(--text-3); }
.water-bar {
  height: 14px; background: var(--surface-2); border-radius: 999px; overflow: hidden;
  border: 1px solid var(--border); margin-bottom: 16px;
}
.water-fill {
  height: 100%; background: var(--gradient-cool);
  border-radius: 999px; transition: width .4s ease;
  box-shadow: 0 0 12px rgba(59,130,246,.5);
}
.water-cups { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.water-cup {
  flex: 1; min-width: 30px; height: 38px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 16px;
}
.water-cup.filled { background: var(--gradient-cool); border-color: transparent; box-shadow: 0 0 8px rgba(59,130,246,.4); }
.water-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.water-actions .btn { flex: 1; min-width: 110px; }

/* Cardio input */
.cardio-row {
  display: flex; gap: 10px; align-items: center; margin-top: 12px;
}
.cardio-row input { width: 90px; }
.cardio-row span { color: var(--text-2); font-size: 14px; }

/* Quick links */
.quick-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) { .quick-grid { grid-template-columns: repeat(4, 1fr); } }
.quick-link {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all .15s; min-height: 100px;
}
.quick-link:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.quick-link .ico { font-size: 24px; }
.quick-link .lbl { font-size: 14px; font-weight: 700; }
.quick-link .desc { font-size: 12px; color: var(--text-3); }

/* ===== Cronograma ===== */
.week-grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .week-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .week-grid { grid-template-columns: repeat(3, 1fr); } }

.day-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px;
  position: relative; overflow: hidden;
  transition: transform .2s;
}
.day-block:hover { transform: translateY(-2px); }
.day-block.today { border-color: var(--primary); box-shadow: 0 0 30px -8px var(--primary-glow); }
.day-block::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent-color, var(--primary));
}
.day-block .badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-3); font-weight: 700; margin-bottom: 4px;
}
.day-block .today-tag {
  display: inline-block; font-size: 10px; padding: 3px 8px; border-radius: 4px;
  background: var(--primary); color: #fff; font-weight: 800; letter-spacing: .08em;
  margin-left: 6px;
}
.day-block h3 { font-size: 22px; font-weight: 900; letter-spacing: -.02em; margin: 4px 0 12px; text-transform: none; color: var(--text); }
.day-block .ex { color: var(--text-2); font-size: 14px; line-height: 1.55; }
.day-block .cardio { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }

/* ===== Plano alimentar ===== */
.meal-list { display: grid; gap: 14px; }
.meal-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px;
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
}
.meal-time {
  background: var(--gradient); border-radius: 14px;
  padding: 14px 16px; min-width: 90px;
  text-align: center; box-shadow: var(--shadow-glow);
}
.meal-time .icon { font-size: 28px; line-height: 1; }
.meal-time .clock { font-size: 14px; font-weight: 800; margin-top: 6px; color: #fff; }
.meal-body h3 { font-size: 18px; text-transform: none; letter-spacing: -.01em; color: var(--text); margin-bottom: 8px; font-weight: 700; }
.meal-body .main { color: var(--text); font-size: 15px; line-height: 1.55; margin-bottom: 4px; }
.meal-body .drink { color: var(--text-2); font-size: 14px; }
.meal-body .macros { margin-top: 10px; font-size: 12px; color: var(--text-3); padding: 6px 10px; background: var(--surface-2); border-radius: 6px; display: inline-block; }

.supp-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .supp-grid { grid-template-columns: repeat(3, 1fr); } }
.supp-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 18px;
}
.supp-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.supp-card .dose { color: var(--orange); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.supp-card .why { color: var(--text-2); font-size: 13px; }

/* ===== Coach ===== */
.insight-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .insight-grid { grid-template-columns: repeat(2, 1fr); } }
.insight-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
  position: relative; overflow: hidden;
}
.insight-card .icon-bg {
  position: absolute; right: -10px; top: -10px;
  font-size: 80px; opacity: .06;
}
.insight-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 10px; text-transform: none; letter-spacing: -.01em; color: var(--text); }
.insight-card p { color: var(--text-2); font-size: 14px; line-height: 1.65; }

/* ===== Compras ===== */
.shopping-tabs { display: flex; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.shopping-tabs button {
  padding: 10px 20px; font-weight: 700; color: var(--text-3);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  font-size: 14px;
}
.shopping-tabs button.active { color: var(--text); border-color: var(--primary); }
.shopping-list { display: grid; gap: 8px; }
.shop-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md);
  cursor: pointer;
}
.shop-item.bought { opacity: .55; }
.shop-item.bought .name { text-decoration: line-through; }
.shop-item .toggle {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--border-strong); flex-shrink: 0;
  display: grid; place-items: center;
}
.shop-item.bought .toggle { background: var(--green); border-color: var(--green); }
.shop-item.bought .toggle svg { opacity: 1; }
.shop-item .toggle svg { width: 14px; height: 14px; opacity: 0; }
.shop-item .name { flex: 1; font-size: 15px; }

/* ===== Progresso ===== */
.progress-summary { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 24px; }
@media (min-width: 720px) { .progress-summary { grid-template-columns: repeat(4, 1fr); } }
.metric-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 18px;
}
.metric-card .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 700; margin-bottom: 6px; }
.metric-card .val { font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.metric-card .delta { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.metric-card .delta.down { color: var(--green); }
.metric-card .delta.up { color: var(--primary); }

.weight-form { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 24px; }
@media (min-width: 720px) { .weight-form { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; } }
.weight-form label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 700; margin-bottom: 6px; display: block; }

.history-table {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.history-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.history-table th, .history-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.history-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 700; background: var(--surface-2); }
.history-table tr:last-child td { border-bottom: 0; }
.history-table .pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.history-table .pill.ok { background: rgba(34,197,94,.15); color: #86efac; }
.history-table .pill.mid { background: rgba(234,179,8,.15); color: #fde047; }
.history-table .pill.bad { background: rgba(239,68,68,.15); color: #fca5a5; }

/* ===== Notes ===== */
.notes-card { margin-top: 24px; }
.notes-card textarea { min-height: 80px; resize: vertical; }
.notes-card .save-row { display: flex; justify-content: flex-end; margin-top: 10px; gap: 8px; align-items: center; }
.notes-card .saved { font-size: 12px; color: var(--green); opacity: 0; transition: opacity .2s; }
.notes-card .saved.show { opacity: 1; }

/* ===== Misc ===== */
.center { text-align: center; }
.muted { color: var(--text-3); }
.empty {
  text-align: center; padding: 40px 20px;
  color: var(--text-3); font-size: 14px;
}
hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }

/* Page heading */
.page-head { margin: 24px 0 24px; }
.page-head h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.page-head p { color: var(--text-2); margin-top: 8px; font-size: 15px; max-width: 600px; }

/* Animations */
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
.pop { animation: pop .25s ease; }

/* ===== Workout Tracker ===== */
.workout-exercises { display: flex; flex-direction: column; gap: 20px; }
.exercise-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.exercise-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.exercise-header h3 { margin: 0; font-size: 16px; }
.exercise-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gradient); color: #fff; font-weight: 700; font-size: 13px;
  margin-right: 10px;
}
.exercise-name { display: inline; }
.btn-add-set {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--primary); padding: 6px 14px; border-radius: var(--r-md);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.sets-table { padding: 12px 16px; }
.sets-header, .set-row {
  display: grid; grid-template-columns: 50px 1fr 1fr 1fr 44px;
  gap: 8px; align-items: center; padding: 6px 0;
}
.sets-header { font-size: 11px; text-transform: uppercase; color: var(--text-2); letter-spacing: .06em; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 4px; }
.set-num { font-weight: 700; color: var(--text-2); text-align: center; font-size: 14px; }
.input-sm {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  padding: 8px 10px; border-radius: var(--r-sm); font-size: 14px; text-align: center;
  width: 100%; transition: border-color .15s;
}
.input-sm:focus { border-color: var(--primary); outline: none; }
.btn-save-set {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: 16px; cursor: pointer;
  display: grid; place-items: center; transition: all .15s;
}
.btn-save-set.saved { background: var(--success); color: #fff; border-color: var(--success); }
.cardio-card { border-left: 3px solid var(--primary); }
.coach-tip { border-left: 3px solid var(--warning); background: rgba(234,179,8,.06); }

/* History compact */
.history-compact { display: flex; flex-direction: column; gap: 12px; }
.history-day { background: var(--surface); padding: 14px 18px; border-radius: var(--r-md); border: 1px solid var(--border); }
.history-date { font-weight: 700; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.history-ex { font-size: 14px; padding: 2px 0; }

/* ===== Chat Page ===== */
.chat-page .page-head { margin-bottom: 16px; }
.calorie-bar-wrap { margin-bottom: 16px; }
.calorie-bar {
  height: 12px; background: var(--surface-2); border-radius: 99px;
  overflow: hidden; border: 1px solid var(--border);
}
.calorie-fill {
  height: 100%; border-radius: 99px;
  background: var(--gradient); transition: width .5s ease;
}
.calorie-fill.warn { background: linear-gradient(90deg, var(--warning), #f59e0b); }
.calorie-fill.over { background: linear-gradient(90deg, var(--danger), #dc2626); }
.calorie-info {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; font-size: 13px;
}
.meals-today {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}
.meal-chip {
  background: var(--surface); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 99px; font-size: 12px;
}
.meal-cal { font-weight: 700; color: var(--primary); margin-right: 4px; }

.chat-container {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  height: calc(100vh - 340px); min-height: 400px;
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-welcome { text-align: center; padding: 40px 20px; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.suggest-btn {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 10px 16px; border-radius: 99px; font-size: 13px; color: var(--text);
  cursor: pointer; transition: all .15s;
}
.suggest-btn:hover { border-color: var(--primary); color: var(--primary); }

.chat-msg { max-width: 85%; }
.chat-user { align-self: flex-end; }
.chat-assistant { align-self: flex-start; }
.msg-bubble {
  padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5;
  word-wrap: break-word;
}
.chat-user .msg-bubble {
  background: var(--gradient); color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-assistant .msg-bubble {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.msg-time { font-size: 11px; color: var(--text-2); margin-top: 4px; padding: 0 4px; }
.chat-user .msg-time { text-align: right; }

.chat-input {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--border); background: var(--bg-2);
}
.chat-input input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  padding: 12px 16px; border-radius: 99px; color: var(--text); font-size: 14px;
}
.chat-input input:focus { border-color: var(--primary); outline: none; }
#chat-send {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gradient); border: none; color: #fff;
  font-size: 18px; cursor: pointer; display: grid; place-items: center;
  flex-shrink: 0;
}
#chat-send:disabled { opacity: .5; }

/* Typing indicator */
.dot-pulse {
  display: inline-flex; gap: 4px;
}
.dot-pulse::before, .dot-pulse::after, .dot-pulse {
  content: '';
}
@keyframes dotPulse { 0%,80%,100% { opacity: .3; } 40% { opacity: 1; } }
.typing .msg-bubble::after {
  content: '...';
  animation: dotPulse 1.4s infinite;
}

/* ===== Mobile responsive for new pages ===== */
@media (max-width: 600px) {
  .sets-header, .set-row {
    grid-template-columns: 36px 1fr 1fr 1fr 36px;
    gap: 4px;
  }
  .input-sm { padding: 6px 4px; font-size: 13px; }
  .exercise-header { padding: 12px 14px; }
  .sets-table { padding: 8px 10px; }
  .chat-container { height: calc(100vh - 300px); min-height: 350px; }
  .chat-messages { padding: 12px; }
  .msg-bubble { padding: 10px 12px; font-size: 13px; }
}
