/* FitFênix: área de membros. Coluna única estilo aplicativo, barra de abas fixa embaixo. */
:root {
  --bg: #070707;
  --surface: #121214;
  --surface-2: #1a1a1d;
  --line: #2a2a2e;
  --fg: #f2f2f2;
  --muted: #a3a3a8;
  --accent: #39ff14;
  --on-accent: #061003;
  --danger: #ff7a7a;
  --display: 'Barlow Condensed', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --glow: rgba(57, 255, 20, 0.16);
  --glow-forte: rgba(57, 255, 20, 0.45);
  --logo: none;
  --radius: 14px;
  --gutter: 20px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.shell {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-inline: var(--gutter);
  padding-block: 0 calc(88px + env(safe-area-inset-bottom, 0px));
}
.shell.sem-abas { padding-block: 0 32px; }

/* Topo */
.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 16px 12px;
}
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.marca img { width: 36px; height: 36px; object-fit: contain; }
.marca span { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: 2px; color: var(--accent); line-height: 1; }
.icone-btn {
  width: 44px; height: 44px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 12px;
  background: transparent; color: var(--fg); cursor: pointer; text-decoration: none;
}
.voltar {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 12px 0 6px;
  border: 0; background: transparent; color: var(--muted);
  font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none;
}
.faixa-demo {
  margin-inline: calc(var(--gutter) * -1);
  padding: 8px var(--gutter);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* Tipografia */
.conteudo { display: flex; flex-direction: column; gap: 16px; padding-block: 8px 24px; }
.rotulo { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.rotulo.verde { color: var(--accent); }
h1 {
  margin: 0;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(34px, 9vw, 44px); line-height: 1.02; letter-spacing: 0.5px;
  text-transform: uppercase; text-wrap: balance;
}
h2 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.25; text-wrap: balance; }
.sub { margin: 0; color: var(--muted); font-size: 15px; }
.cabeca { display: flex; flex-direction: column; gap: 6px; }

/* Cartões e listas */
.cartao {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.cartao.destaque { border-color: var(--accent); }
.lista { display: flex; flex-direction: column; gap: 10px; }
.linha {
  display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--fg); text-decoration: none;
}
.linha .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.linha .t { font-weight: 700; font-size: 16px; line-height: 1.25; }
.linha .d { color: var(--muted); font-size: 13px; line-height: 1.35; }
.linha .seta { flex: none; color: var(--muted); display: flex; }
.marca-item {
  flex: none; width: 34px; height: 34px; border-radius: 17px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #3c3c42; color: var(--muted);
  font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums;
}
.marca-item.feito { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 18px; width: 100%;
  border: 0; border-radius: 12px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none;
}
.btn.contorno { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn.discreto { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 600; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.link-btn { background: none; border: 0; padding: 0; min-height: 44px; color: var(--accent); font-weight: 600; cursor: pointer; text-align: left; }

progress {
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 8px; border: 0; border-radius: 4px; overflow: hidden;
  background: var(--line); display: block;
}
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.prog { display: flex; flex-direction: column; gap: 6px; }
.prog small { color: var(--muted); font-size: 13px; }

/* Leitura */
.leitura { display: flex; flex-direction: column; gap: 14px; max-width: 65ch; }
.leitura p { margin: 0; font-size: 17px; line-height: 1.6; }
.leitura h2 { margin-top: 10px; font-family: var(--display); font-size: 26px; letter-spacing: 0.3px; text-transform: uppercase; color: var(--accent); }
.leitura ul, .leitura ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 17px; line-height: 1.5; }
.leitura li::marker { color: var(--accent); font-weight: 700; }
.dica, .aviso {
  border-radius: var(--radius); padding: 14px 16px; font-size: 16px; line-height: 1.5;
  background: var(--surface-2); border: 1px solid var(--line);
}
.dica strong { color: var(--accent); }
.aviso { color: var(--muted); font-size: 14px; }
.kv { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kv div { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.kv div:first-child { border-top: 0; }
.kv dt { font-weight: 600; }
.kv dd { margin: 0; color: var(--muted); text-align: right; flex: 1 1 180px; min-width: 0; }
.numeros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.numeros div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.numeros b { font-family: var(--display); font-size: 32px; line-height: 1; text-transform: uppercase; }
.numeros div:last-child b { color: var(--accent); }
.numeros span { color: var(--muted); font-size: 13px; }

/* Treino */
.pilulas { display: flex; flex-wrap: wrap; gap: 8px; }
.pilula {
  min-width: 52px; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--muted);
  font-family: var(--display); font-weight: 700; font-size: 22px; cursor: pointer;
}
.pilula[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: transparent; }
.exercicios { display: flex; flex-direction: column; }
.ex {
  display: flex; align-items: center; gap: 14px;
  min-height: 62px; padding: 10px 0;
  border-top: 1px solid var(--line); cursor: pointer;
}
.ex:first-child { border-top: 0; }
.ex input { flex: none; width: 26px; height: 26px; margin: 0; accent-color: var(--accent); }
.ex .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ex .n { font-weight: 600; font-size: 16px; line-height: 1.3; }
.ex .s { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.ex .o { color: var(--accent); font-size: 13px; }
.ex input:checked + .txt .n { color: var(--muted); text-decoration: line-through; }

/* Cardápio */
.macros { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.macros div { background: var(--surface-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.macros b { font-size: 20px; font-variant-numeric: tabular-nums; }
.macros span { color: var(--muted); font-size: 13px; }
.refeicao h2 { color: var(--accent); font-size: 18px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.refeicao h2 small { color: var(--muted); font-weight: 500; font-size: 13px; }
.refeicao ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* Formulários */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label { font-weight: 600; font-size: 14px; }
.campo input {
  min-height: 52px; padding: 0 14px; width: 100%;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
}
.campo input::placeholder { color: #77777d; }
.mensagem { border-radius: 12px; padding: 12px 14px; font-size: 15px; background: var(--surface-2); border: 1px solid var(--line); }
.mensagem.erro { border-color: var(--danger); color: var(--danger); }
.mensagem.ok { border-color: var(--accent); }
.entrada { display: flex; flex-direction: column; gap: 20px; padding-block: 40px 24px; }
.entrada .logo { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.entrada .logo img { width: 84px; height: 84px; object-fit: contain; }
.entrada .logo span { font-family: var(--display); font-weight: 700; font-size: 40px; letter-spacing: 3px; color: var(--accent); line-height: 1; }
.entrada form { display: flex; flex-direction: column; gap: 14px; }
.centro { text-align: center; }

/* Abas */
.abas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: #0b0b0c; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.abas nav { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.abas a {
  min-height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600;
}
.abas a[aria-current="page"] { color: var(--accent); }

.rodape { margin-top: auto; padding-block: 16px 8px; color: #7d7d84; font-size: 12px; line-height: 1.5; }
.protegido { -webkit-user-select: none; user-select: none; }

@media (prefers-reduced-motion: no-preference) {
  .linha, .btn, .pilula { transition: border-color 0.15s ease, opacity 0.15s ease; }
}

/* Fênix esverdeada ao fundo: só na entrada e no topo do Início */
.heroi {
  position: relative; isolation: isolate; overflow: hidden;
  margin-inline: calc(var(--gutter) * -1);
  padding: 28px var(--gutter) 12px var(--gutter);
  min-height: 190px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  background: radial-gradient(ellipse 64% 50% at 84% 50%, var(--glow), transparent);
}
.heroi::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  right: -18px; top: 4px; width: 190px; height: 190px;
  background: var(--accent); opacity: 0.13;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}
.entrada .logo { position: relative; isolation: isolate; }
.entrada .logo::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: -40px; width: 300px; height: 300px; transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
}
.entrada .logo img { filter: drop-shadow(0 0 22px var(--glow-forte)); }
