:root {
  --brand-dark: #1f4f45;
  --brand: #356b61;
  --brand-teal: #509487;
  --brand-coral: #f47a87;
  --cream: #f6f1e7;
  --text: #1c2b27;
  --muted: #7c8b86;
  --error: #c0392b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cream);
}

/* ---------- tela de login ---------- */

.auth-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.auth-hero {
  position: relative;
  flex: 0 0 48vh;
  min-height: 320px;
  background: radial-gradient(120% 100% at 50% 0%, #2c6358 0%, #1a4038 70%, #123028 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding-top: 34px;
}

.auth-hero-title {
  margin: 0 0 22px;
  color: #fff;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
}

.auth-hero img.hero-proof {
  position: relative;
  width: 68%;
  max-width: 270px;
  border-radius: 18px;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.3));
}

.auth-hero .hero-glow {
  position: absolute;
  width: 130%;
  height: 130%;
  top: -30%;
  background: radial-gradient(circle, rgba(244, 122, 135, 0.3), transparent 60%);
  pointer-events: none;
}

.auth-sheet-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 18px;
}

.auth-sheet-brand img { height: 20px; }

.auth-sheet-brand span {
  font-weight: 800;
  font-size: 15px;
  color: var(--brand-dark);
  letter-spacing: -0.01em;
}

.auth-sheet {
  flex: 1;
  background: #fff;
  border-radius: 28px 28px 0 0;
  margin-top: -24px;
  position: relative;
  padding: 28px 26px 40px;
  box-shadow: 0 -10px 40px rgba(18, 48, 40, 0.12);
  display: flex;
  flex-direction: column;
}

.auth-tagline {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14.5px;
  text-align: center;
  line-height: 1.4;
}

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

.auth-form label span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--muted);
}

.auth-form input {
  width: 100%;
  padding: 14px 15px;
  border: 1.5px solid #e6e0d3;
  background: #fbf9f4;
  border-radius: 13px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.auth-form input:focus {
  border-color: var(--brand-teal);
  background: #fff;
}

.auth-error {
  margin: -4px 0 0;
  color: var(--error);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.auth-form button {
  margin-top: 6px;
  padding: 15px;
  border: none;
  border-radius: 13px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.auth-form button:hover { background: var(--brand); }
.auth-form button:active { transform: scale(0.98); }

.auth-foot {
  margin-top: auto;
  padding-top: 24px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

@media (min-width: 480px) {
  .auth-sheet { max-width: 420px; margin-left: auto; margin-right: auto; width: 100%; border-radius: 28px; margin-top: -40px; }
  .auth-body { align-items: center; }
}

/* ---------- dashboard ---------- */

.dash-body { background: var(--cream); }

.dash-page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 88px;
  background: var(--cream);
}

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

.dash-topbar {
  display: flex;
  align-items: center;
  padding: 20px 22px 0;
}

.dash-brand { display: flex; align-items: center; gap: 8px; }
.dash-brand img { height: 22px; }
.dash-brand span {
  font-weight: 800;
  font-size: 15px;
  color: var(--brand-dark);
  letter-spacing: -0.01em;
}

.dash-greeting { padding: 18px 22px 0; }

.dash-greeting h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--brand-dark);
}

.dash-greeting p {
  margin: 3px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

.dash-main {
  padding: 20px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dash-main h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-dark);
}

/* week strip */
.week-strip {
  display: flex;
  justify-content: space-between;
  background: #fff;
  border-radius: 18px;
  padding: 14px 10px;
  box-shadow: 0 4px 14px rgba(28, 43, 39, 0.05);
}

.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.week-day-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1ece0;
}

.week-day--done .week-day-dot { background: var(--brand-teal); color: #fff; }
.week-check { width: 15px; height: 15px; }

.week-day--today .week-day-dot {
  background: #fff;
  border: 2px solid var(--brand-coral);
}

.week-day-label { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.week-day--today .week-day-label { color: var(--brand-coral); }
.week-day--done .week-day-label { color: var(--brand-dark); }

/* hero workout card */
.workout-card {
  position: relative;
  background: linear-gradient(150deg, #2c6358, #1a4038);
  border-radius: 24px;
  padding: 26px 22px 22px;
  color: #fff;
  box-shadow: 0 16px 30px rgba(31, 79, 69, 0.25);
  overflow: hidden;
}

.workout-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 122, 135, 0.28), transparent 70%);
  top: -90px;
  right: -70px;
  pointer-events: none;
}

.workout-eyebrow {
  display: block;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  position: relative;
}

.workout-sub {
  margin: 0 0 18px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.4;
  position: relative;
}

.workout-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  position: relative;
}

.workout-badges span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 7px 13px 7px 11px;
  font-size: 13px;
  font-weight: 600;
}

.workout-badges .icon { width: 15px; height: 15px; }

.workout-cta {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: var(--brand-coral);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}

.workout-cta .icon { width: 17px; height: 17px; }
.workout-cta:hover { background: #e56774; }
.workout-cta:active { transform: scale(0.98); }

/* progress ring */
.progress-panel {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 14px rgba(28, 43, 39, 0.05);
}

.ring-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #ece5d4; stroke-width: 10; }
.ring-fill {
  fill: none;
  stroke: var(--brand-coral);
  stroke-width: 10;
  stroke-linecap: round;
}

.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring-label strong { font-size: 18px; color: var(--brand-dark); line-height: 1; }
.ring-label span { font-size: 10px; color: var(--muted); margin-top: 2px; }

.progress-info { flex: 1; }

.progress-workout-num {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-dark);
}

.progress-workout-num span { font-weight: 500; color: var(--muted); }

.progress-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 5px 0 0;
  font-size: 12.5px;
  color: var(--brand-dark);
  font-weight: 600;
}

.progress-detail--muted { color: var(--muted); font-weight: 500; }
.progress-detail .inline-icon { width: 14px; height: 14px; }

/* stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(28, 43, 39, 0.05);
}

.stat-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-badge .icon { width: 17px; height: 17px; }

.stat-badge--flame { background: #fde8de; color: #d9713c; }
.stat-badge--teal { background: #e1f0ec; color: var(--brand-teal); }
.stat-badge--blue { background: #e4edf6; color: #4a7fb0; }
.stat-badge--gold { background: #fbeed2; color: #c8932f; }

.stat-card strong { font-size: 17px; color: var(--brand-dark); }

.stat-label { font-size: 12px; color: var(--muted); }

/* today's routine */
.routine-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(28, 43, 39, 0.05);
  overflow: hidden;
}

.routine-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 14.5px;
  font-weight: 500;
  border-bottom: 1px solid #f1ece0;
}

.routine-list li:last-child { border-bottom: none; }
.routine-check { display: flex; color: var(--brand-teal); }
.routine-check .icon { width: 19px; height: 19px; }

/* tip card */
.tip-card {
  background: #fff;
  border: 1.5px solid #eee4cf;
  border-radius: 18px;
  padding: 20px;
}

.tip-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.tip-head h2 { margin: 0; }

.tip-card p {
  margin: 4px 0 16px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}

.tip-more {
  border: none;
  background: none;
  color: var(--brand);
  font-weight: 700;
  font-size: 13.5px;
  padding: 0;
  cursor: pointer;
}

/* explore */
.explore-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.explore-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: 16px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 4px 14px rgba(28, 43, 39, 0.05);
  transition: transform 0.1s ease;
}

.explore-card:active { transform: scale(0.985); }

.explore-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--cream);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.explore-text { display: flex; flex-direction: column; flex: 1; gap: 2px; }
.explore-text strong { font-size: 14px; }
.explore-text span { font-size: 12.5px; color: var(--muted); }

.explore-arrow { color: #c9c1ae; display: flex; }
.explore-arrow .icon { width: 18px; height: 18px; }

/* bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border-top: 1px solid #ece5d4;
  display: flex;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(28, 43, 39, 0.06);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item .icon { width: 21px; height: 21px; }

.nav-item.active {
  color: var(--brand-coral);
  background: rgba(244, 122, 135, 0.1);
}
