/* ============================================================
   Treino+ · Design system — estilo Apple Fitness
   Preto absoluto, cartões elevados, anéis de atividade,
   volt como cor de ação, SF (system) como voz tipográfica.
   ============================================================ */

:root {
  --bg: #000000;
  --card: #1C1C1E;
  --card-2: #2C2C2E;
  --card-3: #3A3A3C;
  --stroke: rgba(255, 255, 255, 0.08);
  --txt: #FFFFFF;
  --txt-2: rgba(255, 255, 255, 0.64);
  --txt-3: rgba(255, 255, 255, 0.4);

  --ring-move: #FA114F;
  --ring-move-2: #FF6482;
  --ring-ex: #92E82A;
  --ring-ex-2: #D4FB51;
  --ring-stand: #04D9FF;
  --ring-stand-2: #6CECFF;

  --volt: #D7FB4B;
  --volt-ink: #101400;
  --danger: #FF453A;
  --blue: #0A84FF;

  --grad-n1: linear-gradient(135deg, #30D158 0%, #66D4CF 100%);
  --grad-n2: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 100%);
  --grad-n3: linear-gradient(135deg, #FF9F0A 0%, #FF375F 100%);
  --grad-n4: linear-gradient(135deg, #FA114F 0%, #7D2AE8 100%);

  --r-card: 20px;
  --r-pill: 100px;
  --pad: 20px;
  --sidebar-w: 264px;
  --tabbar-h: 76px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;

  --ease-spring: cubic-bezier(0.32, 1.35, 0.5, 1);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--volt); text-decoration: none; }
::selection { background: rgba(215, 251, 75, 0.3); }

:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}

/* ---------- Splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  transition: opacity 0.45s var(--ease-out), visibility 0.45s;
}
.splash.hide { opacity: 0; visibility: hidden; }
.splash-rings svg { animation: splash-spin 1.4s var(--ease-out) infinite; }
@keyframes splash-spin { to { transform: rotate(360deg); } }
.splash-name {
  font-family: var(--font-round);
  font-size: 28px; font-weight: 800; letter-spacing: -0.02em;
}
.splash-name span { color: var(--volt); }

/* ---------- Estrutura ---------- */
.app {
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) var(--pad) calc(var(--tabbar-h) + 28px);
  max-width: 680px;
  margin: 0 auto;
}
.sidebar { display: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  display: flex; justify-content: space-around; align-items: stretch;
  background: rgba(13, 13, 15, 0.78);
  -webkit-backdrop-filter: saturate(1.6) blur(22px);
  backdrop-filter: saturate(1.6) blur(22px);
  border-top: 0.5px solid var(--stroke);
}
.tab-item {
  flex: 1; max-width: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--txt-3);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em;
  border-radius: 12px;
  transition: color 0.2s;
}
.tab-item.active { color: var(--volt); }
.tab-item svg { width: 26px; height: 26px; }

@media (min-width: 900px) {
  .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
    width: var(--sidebar-w);
    padding: 28px 16px 20px;
    border-right: 0.5px solid var(--stroke);
    background: rgba(10, 10, 12, 0.6);
  }
  .app {
    margin-left: var(--sidebar-w);
    max-width: none;
    width: calc(100% - var(--sidebar-w));
    padding: 36px clamp(24px, 5vw, 64px) 64px;
  }
  .page-inner { max-width: 1080px; }
  .brand {
    font-family: var(--font-round);
    font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
    padding: 0 12px 26px;
  }
  .brand span { color: var(--volt); }
  .nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .sidebar-foot { border-top: 0.5px solid var(--stroke); padding-top: 10px; }
  .nav-item {
    display: flex; align-items: center; gap: 12px;
    width: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--txt-2);
    font-size: 15px; font-weight: 600;
    transition: background 0.15s, color 0.15s;
    text-align: left;
  }
  .nav-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--txt); }
  .nav-item.active { background: rgba(215, 251, 75, 0.12); color: var(--volt); }
  .nav-item svg { width: 22px; height: 22px; flex: none; }
}

/* ---------- Títulos ---------- */
.page-title {
  font-size: 34px; font-weight: 800; letter-spacing: -0.022em; line-height: 1.1;
  margin-bottom: 4px;
}
.page-sub { color: var(--txt-2); font-size: 15px; margin-bottom: 22px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--txt-3);
  margin-bottom: 6px;
}
.section-title {
  font-size: 21px; font-weight: 700; letter-spacing: -0.015em;
  margin: 28px 0 12px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.section-title .link { font-size: 14px; font-weight: 600; }

/* ---------- Cartões ---------- */
.card {
  background: var(--card);
  border-radius: var(--r-card);
  padding: var(--pad);
  border: 0.5px solid var(--stroke);
}
.card + .card { margin-top: 12px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  transition: transform 0.15s var(--ease-spring), opacity 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.96); }
.btn-volt { background: var(--volt); color: var(--volt-ink); }
.btn-volt:hover { background: #E4FF6E; }
.btn-ghost { background: var(--card-2); color: var(--txt); }
.btn-ghost:hover { background: var(--card-3); }
.btn-danger { background: rgba(255, 69, 58, 0.15); color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Anéis de atividade ---------- */
.rings-hero {
  display: flex; align-items: center; gap: clamp(20px, 5vw, 44px);
  padding: 26px var(--pad);
}
.rings-svg { flex: none; }
.ring-track { opacity: 0.16; }
.ring-arc {
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 1.3s var(--ease-out);
}
.rings-legend { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.legend-item { display: flex; flex-direction: column; }
.legend-label {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.legend-value {
  font-family: var(--font-round);
  font-size: 22px; font-weight: 800; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.legend-value small { font-size: 14px; font-weight: 600; color: var(--txt-3); }
.lg-move .legend-label { color: var(--ring-move); }
.lg-ex .legend-label { color: var(--ring-ex); }
.lg-stand .legend-label { color: var(--ring-stand); }

/* ---------- Hoje ---------- */
.greet-date {
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--txt-3);
}
.hero-workout {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  padding: 24px var(--pad);
  min-height: 172px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  isolation: isolate;
}
.hero-workout::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(0,0,0,0.55) 100%);
}
.hero-workout .hw-plan { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }
.hero-workout .hw-name { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.hero-workout .hw-meta { font-size: 14px; font-weight: 600; opacity: 0.85; margin-bottom: 10px; }
.hero-workout .btn { align-self: flex-start; }

.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.stat-tile { padding: 16px var(--pad); }
.stat-tile .st-label { font-size: 13px; font-weight: 600; color: var(--txt-2); display: flex; align-items: center; gap: 6px; }
.stat-tile .st-label svg { width: 16px; height: 16px; }
.stat-tile .st-value {
  font-family: var(--font-round);
  font-size: 30px; font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat-tile .st-value small { font-size: 15px; font-weight: 600; color: var(--txt-3); }

.week-strip { display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; }
.ws-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ws-dot {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-2);
  font-size: 12px; font-weight: 700; color: var(--txt-3);
  border: 1.5px solid transparent;
}
.ws-day.done .ws-dot { background: var(--ring-ex); color: #0A2000; }
.ws-day.sched .ws-dot { border-color: var(--ring-ex); color: var(--ring-ex); }
.ws-day.today .ws-dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--volt); }
.ws-day .ws-lbl { font-size: 10.5px; font-weight: 700; color: var(--txt-3); text-transform: uppercase; }

.tip-card { display: flex; gap: 14px; align-items: flex-start; }
.tip-card .tip-emoji { font-size: 26px; line-height: 1.2; }
.tip-card .tip-title { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.tip-card .tip-body { font-size: 14px; color: var(--txt-2); }

/* ---------- Biblioteca de exercícios ---------- */
.search-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0 calc(var(--pad) * -1);
  padding: 8px var(--pad) 10px;
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: saturate(1.6) blur(20px);
  backdrop-filter: saturate(1.6) blur(20px);
}
.search-field {
  display: flex; align-items: center; gap: 8px;
  background: var(--card);
  border: 0.5px solid var(--stroke);
  border-radius: 12px;
  padding: 10px 14px;
}
.search-field svg { width: 18px; height: 18px; color: var(--txt-3); flex: none; }
.search-field input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none;
  font-size: 16px;
}
.search-field input::placeholder { color: var(--txt-3); }
.chip-row {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 10px 2px 2px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--card);
  border: 0.5px solid var(--stroke);
  font-size: 13.5px; font-weight: 600;
  color: var(--txt-2);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.chip.active { background: var(--volt); color: var(--volt-ink); border-color: var(--volt); }
.select-inline {
  background: var(--card); color: var(--txt-2);
  border: 0.5px solid var(--stroke);
  border-radius: var(--r-pill);
  padding: 7px 12px;
  font-size: 13.5px; font-weight: 600;
  -webkit-appearance: none; appearance: none;
}
.results-count { color: var(--txt-3); font-size: 13px; margin: 12px 2px 10px; }

.ex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
@media (min-width: 900px) {
  .ex-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
}
.ex-card {
  background: var(--card);
  border: 0.5px solid var(--stroke);
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
  display: flex; flex-direction: column;
  transition: transform 0.2s var(--ease-spring), border-color 0.2s;
}
.ex-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.2); }
.ex-thumb {
  aspect-ratio: 1;
  background: #FFFFFF;
  position: relative;
  overflow: hidden;
}
.ex-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ex-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.ex-name { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.ex-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--card-2);
  color: var(--txt-2);
}
.tag-target { background: rgba(250, 17, 79, 0.16); color: #FF6482; }
.ex-fav {
  position: absolute; top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center;
  color: #FFF;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ex-fav svg { width: 17px; height: 17px; }
.ex-fav.on { color: var(--ring-move); }
.sentinel { height: 10px; }

/* ---------- Ficha do exercício (sheet) ---------- */
.sheet-back {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade-in 0.25s var(--ease-out);
}
@media (min-width: 900px) { .sheet-back { align-items: center; } }
@keyframes fade-in { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 620px;
  max-height: 92dvh;
  overflow-y: auto;
  background: #161618;
  border-radius: 24px 24px 0 0;
  animation: sheet-up 0.35s var(--ease-spring);
  overscroll-behavior: contain;
}
@media (min-width: 900px) { .sheet { border-radius: 24px; max-height: 88vh; } }
@keyframes sheet-up { from { transform: translateY(48px); opacity: 0; } }
.sheet-grab {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: center;
  padding: 10px 0 6px;
  background: linear-gradient(#161618 60%, transparent);
}
.sheet-grab::before {
  content: "";
  width: 40px; height: 5px; border-radius: 3px;
  background: var(--card-3);
}
.sheet-close {
  position: absolute; top: 14px; right: 14px; z-index: 6;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--card-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--txt-2);
}
.sheet-close svg { width: 16px; height: 16px; }
.sheet-body { padding: 4px var(--pad) calc(24px + env(safe-area-inset-bottom)); }
.exd-media {
  border-radius: 16px; overflow: hidden;
  background: #FFF;
  aspect-ratio: 1;
  max-height: 340px;
  margin: 6px auto 16px;
  display: flex; align-items: center; justify-content: center;
}
.exd-media img { width: 100%; height: 100%; object-fit: contain; }
.exd-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.exd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.muscle-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.steps { margin-top: 16px; counter-reset: passo; }
.step {
  display: flex; gap: 14px;
  padding: 12px 0;
  border-top: 0.5px solid var(--stroke);
  font-size: 15px; color: var(--txt-2); line-height: 1.5;
}
.step::before {
  counter-increment: passo;
  content: counter(passo);
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--card-2);
  color: var(--volt);
  font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-round);
}
.exd-actions { display: flex; gap: 10px; margin-top: 18px; }
.exd-actions .btn { flex: 1; }

/* ---------- Planos ---------- */
.plan-card {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  padding: 22px var(--pad);
  min-height: 168px;
  display: flex; flex-direction: column; justify-content: flex-end;
  text-align: left;
  color: #FFF;
  width: 100%;
  transition: transform 0.2s var(--ease-spring);
  isolation: isolate;
}
.plan-card:hover { transform: translateY(-3px); }
.plan-card + .plan-card { margin-top: 14px; }
.plan-card::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.5) 100%);
}
.pc-level {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  margin-bottom: 6px;
}
.pc-dots { display: inline-flex; gap: 3px; }
.pc-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}
.pc-dots i.on { background: #FFF; }
.pc-name { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.pc-tagline { font-size: 14px; font-weight: 500; opacity: 0.9; margin-top: 3px; }
.pc-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-top: 12px;
  font-size: 12.5px; font-weight: 700; opacity: 0.95;
}
.pc-active-badge {
  position: absolute; top: 14px; right: 14px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 800;
}
@media (min-width: 900px) {
  .plan-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .plan-card + .plan-card { margin-top: 0; }
}

/* Detalhe do plano */
.pd-hero {
  border-radius: var(--r-card);
  padding: 26px var(--pad);
  margin-bottom: 16px;
  isolation: isolate;
  position: relative; overflow: hidden;
}
.pd-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.45));
}
.pd-hero .pc-name { font-size: 30px; }
.pd-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0 4px;
}
.pd-stat {
  background: rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 9px 6px;
  text-align: center;
}
.pd-stat b { display: block; font-size: 15px; font-family: var(--font-round); }
.pd-stat span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.85; }
.day-card { padding: 0; overflow: hidden; }
.day-head {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  padding: 16px var(--pad);
  text-align: left;
}
.day-badge {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-round);
  font-size: 19px; font-weight: 800;
  color: #000;
}
.day-head .dh-name { font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; }
.day-head .dh-meta { font-size: 13px; color: var(--txt-2); }
.day-head .dh-chev { margin-left: auto; color: var(--txt-3); transition: transform 0.25s; }
.day-card.open .dh-chev { transform: rotate(90deg); }
.day-exs { display: none; border-top: 0.5px solid var(--stroke); }
.day-card.open .day-exs { display: block; }
.dex {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 10px var(--pad);
  border-top: 0.5px solid var(--stroke);
  text-align: left;
}
.dex:first-child { border-top: 0; }
.dex-thumb {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 10px;
  background: #FFF;
  overflow: hidden;
}
.dex-thumb img { width: 100%; height: 100%; object-fit: contain; }
.dex-name { font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.dex-scheme { font-size: 13px; color: var(--txt-2); font-variant-numeric: tabular-nums; }
.prog-note {
  display: flex; gap: 12px;
  padding: 11px 0;
  border-top: 0.5px solid var(--stroke);
  font-size: 14px; color: var(--txt-2);
}
.prog-note b { color: var(--txt); font-family: var(--font-round); white-space: nowrap; }
.plan-progressbar {
  height: 8px; border-radius: 4px;
  background: var(--card-2);
  overflow: hidden;
  margin: 8px 0 4px;
}
.plan-progressbar i {
  display: block; height: 100%;
  background: var(--volt);
  border-radius: 4px;
  transition: width 0.6s var(--ease-out);
}

/* ---------- Agenda ---------- */
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 14px;
}
.cal-title { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; text-transform: capitalize; }
.cal-nav { display: flex; gap: 8px; }
.cal-nav button {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  color: var(--txt-2);
}
.cal-nav svg { width: 16px; height: 16px; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--txt-3);
  padding: 6px 0;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 14.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--txt-2);
  position: relative;
}
.cal-day:hover { background: var(--card); }
.cal-day.dim { opacity: 0.25; pointer-events: none; }
.cal-day.today { color: var(--volt); font-weight: 800; }
.cal-day.today::before {
  content: "";
  position: absolute; inset: 4px;
  border: 1.5px solid var(--volt);
  border-radius: 10px;
}
.cal-day .cd-dot { width: 6px; height: 6px; border-radius: 50%; }
.cal-day.sched .cd-dot { background: var(--ring-stand); }
.cal-day.done .cd-dot { background: var(--ring-ex); }
.cal-day.missed .cd-dot { background: var(--txt-3); }
.cal-legend {
  display: flex; gap: 16px;
  margin: 14px 2px 0;
  font-size: 12.5px; color: var(--txt-2); font-weight: 600;
}
.cal-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.agenda-next { margin-top: 22px; }
.ag-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0;
  border-top: 0.5px solid var(--stroke);
}
.ag-item:first-child { border-top: 0; }
.ag-date {
  flex: none; width: 48px;
  text-align: center;
  font-family: var(--font-round);
}
.ag-date b { display: block; font-size: 20px; font-weight: 800; line-height: 1.1; }
.ag-date span { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--txt-3); }
.ag-info { min-width: 0; flex: 1; }
.ag-name { font-size: 15px; font-weight: 700; }
.ag-meta { font-size: 13px; color: var(--txt-2); }
.ag-status { font-size: 12px; font-weight: 800; }
.ag-status.done { color: var(--ring-ex); }
.ag-status.sched { color: var(--ring-stand); }

/* ---------- Formulários / sheets ---------- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13.5px; font-weight: 700; color: var(--txt-2); margin-bottom: 7px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--card-2);
  border: 0.5px solid var(--stroke);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 16px;
  color: var(--txt);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--volt); }
.form-textarea { min-height: 90px; resize: vertical; }
.dow-picker { display: flex; gap: 7px; }
.dow-btn {
  flex: 1;
  aspect-ratio: 1;
  max-width: 48px;
  border-radius: 50%;
  background: var(--card-2);
  font-size: 13px; font-weight: 700;
  color: var(--txt-2);
  transition: background 0.15s, color 0.15s;
}
.dow-btn.on { background: var(--volt); color: var(--volt-ink); }
.seg {
  display: flex;
  background: var(--card-2);
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}
.seg button {
  flex: 1;
  padding: 9px 6px;
  border-radius: 9px;
  font-size: 13.5px; font-weight: 700;
  color: var(--txt-2);
}
.seg button.on { background: var(--card-3); color: var(--txt); }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 0;
  border-top: 0.5px solid var(--stroke);
}
.switch-row:first-child { border-top: 0; }
.switch-row .sw-label { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.switch-row .sw-label svg { width: 17px; height: 17px; flex: none; }
.switch-row .sw-sub { font-size: 12.5px; color: var(--txt-3); }
.switch {
  position: relative;
  width: 50px; height: 30px;
  border-radius: 15px;
  background: var(--card-3);
  transition: background 0.2s;
  flex: none;
}
.switch::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #FFF;
  transition: transform 0.2s var(--ease-spring);
}
.switch.on { background: var(--ring-ex); }
.switch.on::after { transform: translateX(20px); }

/* ---------- Player de treino ---------- */
.player {
  position: fixed; inset: 0; z-index: 120;
  background: var(--bg);
  display: flex; flex-direction: column;
  animation: fade-in 0.3s var(--ease-out);
  overflow-y: auto;
}
.player-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) var(--pad) 10px;
  position: sticky; top: 0;
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  z-index: 5;
}
.player-head .ph-title { font-size: 15px; font-weight: 700; }
.player-head .ph-count { font-size: 12.5px; color: var(--txt-2); font-variant-numeric: tabular-nums; }
.player-head button { color: var(--txt-2); font-weight: 700; font-size: 14px; padding: 8px; }
.player-body {
  flex: 1;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 8px var(--pad) 32px;
  display: flex; flex-direction: column;
}
.pl-media {
  border-radius: 20px;
  background: #FFF;
  overflow: hidden;
  aspect-ratio: 1;
  max-height: 46dvh;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.pl-media img { width: 100%; height: 100%; object-fit: contain; }
.pl-name { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.pl-scheme {
  font-size: 15px; color: var(--txt-2); font-weight: 600;
  margin: 4px 0 14px;
  font-variant-numeric: tabular-nums;
}
.set-dots { display: flex; gap: 8px; margin-bottom: 18px; }
.set-dot {
  flex: 1; height: 46px;
  border-radius: 13px;
  background: var(--card);
  border: 0.5px solid var(--stroke);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-round);
  font-size: 15px; font-weight: 800;
  color: var(--txt-3);
  transition: background 0.2s, color 0.2s, transform 0.15s var(--ease-spring);
}
.set-dot:active { transform: scale(0.94); }
.set-dot.done { background: var(--ring-ex); color: #0A2000; border-color: transparent; }
.set-dot.now { border-color: var(--volt); color: var(--volt); }
.pl-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.pl-nav { display: flex; gap: 10px; }
.pl-nav .btn { flex: 1; }
.rest-overlay {
  position: fixed; inset: 0; z-index: 130;
  background: rgba(0, 0, 0, 0.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  animation: fade-in 0.2s;
}
.rest-ring { position: relative; width: 210px; height: 210px; }
.rest-ring svg { transform: rotate(-90deg); }
.rest-ring .rr-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-round);
  font-size: 56px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.rest-label { font-size: 15px; font-weight: 700; color: var(--txt-2); text-transform: uppercase; letter-spacing: 0.08em; }
.done-screen {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 24px;
}
.done-screen .ds-rings { margin-bottom: 8px; }
.done-screen h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.done-screen p { color: var(--txt-2); font-size: 15px; max-width: 300px; }
.done-stats { display: flex; gap: 26px; margin: 18px 0 10px; }
.done-stats div { text-align: center; }
.done-stats b {
  display: block;
  font-family: var(--font-round);
  font-size: 26px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.done-stats span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--txt-3); }

/* ---------- Equipe ---------- */
.pro-card { display: flex; gap: 16px; align-items: center; }
.pro-avatar {
  flex: none;
  width: 62px; height: 62px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-round);
  font-size: 22px; font-weight: 800;
  color: #000;
}
.pro-info { flex: 1; min-width: 0; }
.pro-name { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.pro-role { font-size: 13px; color: var(--txt-2); }
.pro-cred { font-size: 12px; color: var(--txt-3); margin-top: 2px; }
.wa-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: 7px;
  background: #25D366; color: #04220E;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 800;
}
.wa-btn svg { width: 18px; height: 18px; }
.weight-chart { margin-top: 6px; }
.weight-chart svg { width: 100%; height: auto; display: block; }
.nutri-grid { display: grid; gap: 12px; }
@media (min-width: 900px) { .nutri-grid { grid-template-columns: 1fr 1fr; } }
.checkin-log { font-size: 14px; color: var(--txt-2); }
.checkin-log li { list-style: none; padding: 9px 0; border-top: 0.5px solid var(--stroke); display: flex; justify-content: space-between; gap: 10px; }
.checkin-log li:first-child { border-top: 0; }
.checkin-log b { color: var(--txt); font-variant-numeric: tabular-nums; }

/* ---------- Toast ---------- */
#toast-root {
  position: fixed;
  bottom: calc(var(--tabbar-h) + 18px);
  left: 50%; transform: translateX(-50%);
  z-index: 150;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: max-content; max-width: 92vw;
  pointer-events: none;
}
@media (min-width: 900px) { #toast-root { bottom: 28px; } }
.toast {
  background: var(--card-2);
  border: 0.5px solid var(--stroke);
  color: var(--txt);
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: 14.5px; font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  animation: toast-in 0.35s var(--ease-spring);
  display: flex; align-items: center; gap: 8px;
}
.toast svg { width: 17px; height: 17px; color: var(--ring-ex); }
@keyframes toast-in { from { transform: translateY(14px); opacity: 0; } }
.toast.bye { opacity: 0; transform: translateY(8px); transition: 0.3s; }

/* ---------- Vazio ---------- */
.empty {
  text-align: center;
  padding: 42px 20px;
  color: var(--txt-2);
}
.empty .e-emoji { font-size: 40px; margin-bottom: 10px; }
.empty b { display: block; color: var(--txt); font-size: 16px; margin-bottom: 4px; }
.empty p { font-size: 14px; max-width: 300px; margin: 0 auto; }

/* util */
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
