/* App do Rui Anjos · demonstração.
   A mesma linguagem da landing page v2: fundo quase preto, branco quente, amarelo doseado,
   Barlow Condensed nos títulos e Inter no corpo. Pensada primeiro para o telemóvel;
   no computador o aluno vê-se dentro de um telemóvel e o painel do Rui abre em largura total. */

:root {
  --bg: #0b0b0b;
  --bg2: #131313;
  --bg3: #1b1b1b;
  --bg4: #242424;
  --ink: #f3f0ea;
  --ink2: rgba(243, 240, 234, 0.78);
  --mute: #9c978f;
  --mute2: #6f6b65;
  --line: rgba(243, 240, 234, 0.09);
  --line2: rgba(243, 240, 234, 0.16);
  --y: #f4c542;
  --y2: #d9a91f;
  --ysoft: rgba(244, 197, 66, 0.12);
  --yline: rgba(244, 197, 66, 0.35);
  --verde: #74d39a;
  --laranja: #f2a54b;
  --vermelho: #ef6a5b;
  --r-xl: 28px;
  --r-l: 22px;
  --r-m: 16px;
  --r-s: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #060606;
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--y); color: #0b0b0b; }
:focus-visible { outline: 2px solid var(--y); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic.cheio { fill: currentColor; stroke: none; }
.mono { fill: currentColor; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Palco e moldura ---------- */
#palco { min-height: 100dvh; display: flex; align-items: center; justify-content: center; gap: 56px; }
.app {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.lado { display: none; }

@media (min-width: 900px) {
  body { background: radial-gradient(1200px 700px at 70% 20%, #151309 0%, #060606 60%); }
  .app.modo-aluno, .app.modo-ecra, .app.modo-entrada {
    width: 410px;
    height: min(870px, calc(100dvh - 40px));
    border-radius: 48px;
    border: 1px solid var(--line2);
    box-shadow: 0 0 0 9px #141414, 0 0 0 10px #262626, 0 50px 140px rgba(0, 0, 0, 0.7), 0 0 120px rgba(244, 197, 66, 0.06);
  }
  .modo-aluno .demo-pilula { display: none; }
  .lado {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 330px;
  }
  body[data-modo="rui"] .lado { display: none; }
}

/* Texto ao lado do telemóvel (só no computador, para a partilha de ecrã) */
.lado-marca { display: flex; align-items: center; gap: 12px; color: var(--y); }
.lado-marca .mono { width: 46px; }
.lado-marca svg.nome { width: 150px; color: var(--ink); }
.lado h2 { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 0.92; text-transform: uppercase; margin: 0; }
.lado h2 em { font-style: normal; color: var(--y); }
.lado p { margin: 0; color: var(--ink2); font-size: 15px; }
.lado-trocar { display: flex; gap: 8px; padding: 5px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); width: max-content; }
.lado-trocar button { padding: 10px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--mute); }
.lado-trocar button.on { background: var(--y); color: #0b0b0b; }
.lado-nota { font-size: 12.5px !important; color: var(--mute) !important; border-left: 2px solid var(--yline); padding-left: 12px; }

/* ---------- Ecrã principal ---------- */
.ecra {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: calc(var(--st) + 6px) 0 28px;
}
.ecra::-webkit-scrollbar { display: none; }
.ecra-cheio { padding: 0; }
.ecra.sem-scroll { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.sem-scroll > .conversa-ecra { flex: 1; min-height: 0; }
.pad { padding: 0 18px; }
.pilha { display: flex; flex-direction: column; gap: 14px; }
.entra { animation: entra 0.6s var(--ease) both; }
@keyframes entra { from { opacity: 0; transform: translateY(14px); } }
.entra:nth-child(2) { animation-delay: 0.05s; }
.entra:nth-child(3) { animation-delay: 0.1s; }
.entra:nth-child(4) { animation-delay: 0.15s; }
.entra:nth-child(5) { animation-delay: 0.2s; }
.entra:nth-child(6) { animation-delay: 0.25s; }
.entra:nth-child(n+7) { animation-delay: 0.3s; }

/* ---------- Tipografia ---------- */
.display { font-family: var(--display); font-weight: 800; text-transform: uppercase; line-height: 0.9; letter-spacing: 0.002em; margin: 0; }
.rotulo { display: inline-flex; align-items: center; gap: 9px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); margin: 0; }
.rotulo .traco { width: 22px; height: 1.5px; background: var(--y); }
.rotulo.y { color: var(--y); }
.num { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 0.95; }
.y { color: var(--y); }
.mute { color: var(--mute); }
.peq { font-size: 13px; }
.p0 { margin: 0; }

/* ---------- Cabeçalho dos ecrãs ---------- */
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px 16px; }
.topo-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.topo h1 { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 0.9; text-transform: uppercase; margin: 0; }
.topo-dir { display: flex; align-items: center; gap: 8px; }
.marca-mini { width: 30px; color: var(--y); }
.botao-redondo { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); transition: background 0.3s; }
.botao-redondo:active { background: var(--bg3); }
.botao-redondo .ic { width: 20px; height: 20px; }
.ponto-novo { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 99px; background: var(--y); box-shadow: 0 0 0 2px var(--bg2); }
.avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; background: var(--bg3); border: 1px solid var(--line2); font-weight: 600; font-size: 14px; letter-spacing: 0.02em; color: var(--ink); overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.p { width: 34px; height: 34px; font-size: 12px; }
.avatar.g { width: 64px; height: 64px; font-size: 21px; }
.avatar.xg { width: 84px; height: 84px; font-size: 26px; }
.avatar.rui { border-color: var(--yline); }

/* ---------- Cartões ---------- */
.cartao { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px; }
.cartao-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cartao-cab .lnk { font-size: 13px; color: var(--mute); display: inline-flex; align-items: center; gap: 4px; }
.cartao-cab .lnk .ic { width: 16px; height: 16px; }
.cartao h3 { font-size: 16px; font-weight: 600; margin: 0; letter-spacing: -0.005em; }
.cartao p { margin: 0; }
.grelha2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Botões ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--y);
  color: #0b0b0b;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s var(--ease), box-shadow 0.4s;
  box-shadow: 0 10px 30px rgba(244, 197, 66, 0.18);
}
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: translateY(101%); transition: transform 0.55s var(--ease); }
@media (hover: hover) { .btn:hover::before { transform: translateY(0); } }
.btn:active { transform: scale(0.97); }
.btn .ic { width: 20px; height: 20px; }
.btn.largo { width: 100%; }
.btn.fantasma { background: transparent; color: var(--ink); border: 1px solid var(--line2); box-shadow: none; }
.btn.fantasma::before { background: rgba(243, 240, 234, 0.06); }
.btn.fantasma .ic { color: var(--y); }
.btn.peq { min-height: 42px; padding: 0 18px; font-size: 12px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: var(--bg3); border: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--ink2); white-space: nowrap; }
.chip .ic { width: 14px; height: 14px; }
.chip.y { background: var(--ysoft); border-color: var(--yline); color: var(--y); }
.chip.verde { color: var(--verde); background: rgba(116, 211, 154, 0.1); border-color: rgba(116, 211, 154, 0.3); }
.chip.laranja { color: var(--laranja); background: rgba(242, 165, 75, 0.1); border-color: rgba(242, 165, 75, 0.3); }
.chip.vermelho { color: var(--vermelho); background: rgba(239, 106, 91, 0.1); border-color: rgba(239, 106, 91, 0.32); }

/* ---------- Barra de separadores (aluno) ---------- */
.tabbar {
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 6px calc(8px + var(--sb));
  background: rgba(11, 11, 11, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 4px; font-size: 10.5px; font-weight: 500; letter-spacing: 0.02em; color: var(--mute2); transition: color 0.3s; }
.tab .ic { width: 24px; height: 24px; transition: transform 0.4s var(--ease); }
.tab.on { color: var(--y); }
.tab.on .ic { transform: translateY(-1px); }
.tab.on::after { content: ''; position: absolute; top: -9px; width: 26px; height: 2px; border-radius: 9px; background: var(--y); box-shadow: 0 0 14px var(--y); }
.tab .badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--y); color: #0b0b0b; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

/* ---------- Pílula da demonstração ---------- */
.demo-pilula { position: absolute; z-index: 40; top: calc(var(--st) + 10px); right: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; background: rgba(20, 20, 20, 0.8); border: 1px dashed var(--yline); color: var(--y); font-size: 10px; font-weight: 700; letter-spacing: 0.16em; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.modo-aluno .demo-pilula, .modo-rui .demo-pilula { top: auto; bottom: calc(var(--sb) + 84px); right: 12px; }

/* ---------- Entrada ---------- */
.entrada { position: relative; min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--st) + 48px) 26px calc(var(--sb) + 30px); overflow: hidden; }
.entrada-fundo { position: absolute; inset: 0; z-index: -2; }
.entrada-fundo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; opacity: 0.55; transform: scale(1.08); animation: respira 14s ease-in-out infinite alternate; }
@keyframes respira { to { transform: scale(1.0); } }
.entrada::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 11, 11, 0.55) 0%, rgba(11, 11, 11, 0.35) 30%, rgba(11, 11, 11, 0.92) 62%, #0b0b0b 100%); }
.entrada-marca { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.entrada-mono { width: 96px; overflow: visible; }
.entrada-mono .traco { fill: none; stroke: var(--y); stroke-width: 6; stroke-dasharray: 3100; stroke-dashoffset: 3100; animation: desenha 1.6s 0.2s var(--ease) forwards; }
.entrada-mono .cheio { fill: var(--y); opacity: 0; animation: enche 0.6s 1.25s ease forwards; }
@keyframes desenha { to { stroke-dashoffset: 0; } }
@keyframes enche { to { opacity: 1; } }
.entrada-nome { width: 220px; color: var(--ink); animation: entra 0.8s 0.9s var(--ease) both; }
.entrada-frase { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 0.95; text-transform: uppercase; margin: 0; animation: entra 0.8s 1.3s var(--ease) both; }
.entrada-frase em { font-style: normal; color: var(--y); }
.entrada-acoes { display: flex; flex-direction: column; gap: 12px; animation: entra 0.8s 1.6s var(--ease) both; }
.entrada-acoes .nota { text-align: center; font-size: 12px; color: var(--mute); margin: 4px 0 0; }

/* ---------- Hoje: o treino do dia ---------- */
.hero-treino { position: relative; display: block; border-radius: var(--r-xl); overflow: hidden; min-height: 360px; background: var(--bg3); isolation: isolate; }
.hero-treino > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.04); transition: transform 1.2s var(--ease); }
.hero-treino:active > img { transform: scale(1.0); }
.hero-treino::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 11, 11, 0.6) 0%, rgba(11, 11, 11, 0.12) 24%, rgba(11, 11, 11, 0.5) 48%, rgba(11, 11, 11, 0.97) 100%); }
.hero-topo .chip { background: rgba(11, 11, 11, 0.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-topo .chip.y { background: rgba(28, 23, 8, 0.78); }
.hero-treino-in { position: absolute; inset: auto 0 0 0; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.hero-treino h2 { font-family: var(--display); font-weight: 800; font-size: 58px; line-height: 0.86; text-transform: uppercase; margin: 0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--ink2); font-size: 13px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .ic { width: 16px; height: 16px; color: var(--y); }
.hero-topo { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; }
.feito-hoje { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-m); background: rgba(116, 211, 154, 0.1); border: 1px solid rgba(116, 211, 154, 0.3); color: var(--verde); font-weight: 600; }

/* A semana: anel e dias */
.semana { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.anel { position: relative; width: 84px; height: 84px; }
.anel svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anel circle { fill: none; stroke-width: 7; }
.anel .fundo { stroke: var(--bg4); }
.anel .frente { stroke: var(--y); stroke-linecap: round; transition: stroke-dashoffset 1.4s var(--ease); filter: drop-shadow(0 0 6px rgba(244, 197, 66, 0.35)); }
.anel-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.anel-txt b { font-family: var(--display); font-size: 30px; line-height: 1; font-weight: 700; }
.anel-txt span { font-size: 10px; color: var(--mute); letter-spacing: 0.12em; text-transform: uppercase; }
.dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; min-width: 0; }
.dia { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 10.5px; color: var(--mute2); font-weight: 600; min-width: 0; }
.dia i { display: grid; place-items: center; width: min(28px, 100%); aspect-ratio: 1 / 1; border-radius: 99px; border: 1.5px solid var(--line2); }
.dia.feito i { background: var(--y); border-color: var(--y); color: #0b0b0b; }
.dia.feito i .ic { width: 15px; height: 15px; stroke-width: 3; }
.dia.hoje { color: var(--ink); }
.dia.hoje i { border-color: var(--ink); border-style: dashed; }
.seq { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.seq-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ysoft); color: var(--y); }
.seq-ic .ic { width: 22px; height: 22px; }
.seq b { font-family: var(--display); font-size: 24px; font-weight: 700; line-height: 1; }
.seq p { font-size: 13px; color: var(--mute); }

/* Mensagem do Rui */
.msg-rui { display: flex; gap: 12px; }
.msg-rui .balao { flex: 1; background: var(--bg3); border-radius: 4px 18px 18px 18px; padding: 12px 14px; font-size: 14.5px; color: var(--ink); }
.msg-rui .quem { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 12px; color: var(--mute); }
.msg-rui .quem b { color: var(--ink); font-size: 13px; }

/* Desafio da equipa */
.desafio-num { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 12px; }
.desafio-num b { font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 0.9; }
.desafio-num span { color: var(--mute); font-size: 14px; }
.barra { position: relative; height: 10px; border-radius: 99px; background: var(--bg4); overflow: hidden; }
.barra i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--y2), var(--y)); transition: width 1.4s var(--ease); box-shadow: 0 0 14px rgba(244, 197, 66, 0.4); }
.barra i.tu { background: var(--ink); box-shadow: none; }
.desafio-rodape { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--mute); }
.pilha-avatares { display: flex; }
.pilha-avatares .avatar { width: 28px; height: 28px; font-size: 10px; margin-left: -8px; border: 2px solid var(--bg2); }
.pilha-avatares .avatar:first-child { margin-left: 0; }

/* Próximo compromisso */
.proximo { display: flex; align-items: center; gap: 14px; }
.proximo-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--bg3); color: var(--y); flex-shrink: 0; }
.proximo-txt { flex: 1; min-width: 0; }
.proximo-txt b { display: block; font-size: 15px; }
.proximo-txt span { font-size: 13px; color: var(--mute); }

/* ---------- Plano ---------- */
.plano-cab { padding: 18px; border-radius: var(--r-xl); background: linear-gradient(135deg, #1d1a10 0%, #131313 55%); border: 1px solid var(--yline); }
.plano-cab h2 { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 0.9; text-transform: uppercase; margin: 8px 0 6px; }
.plano-semanas { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin: 16px 0 10px; }
.plano-semanas i { height: 6px; border-radius: 9px; background: var(--bg4); }
.plano-semanas i.feita { background: var(--y); }
.plano-semanas i.atual { background: linear-gradient(90deg, var(--y) 50%, var(--bg4) 50%); }
.treino-linha { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: center; padding: 10px; border-radius: var(--r-l); background: var(--bg2); border: 1px solid var(--line); transition: border-color 0.3s; }
.treino-linha:active { border-color: var(--line2); }
.treino-linha img { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; }
.treino-linha b { display: block; font-family: var(--display); font-weight: 700; font-size: 23px; line-height: 1; text-transform: uppercase; margin: 4px 0 6px; }
.treino-linha .mute { font-size: 12.5px; }
.treino-linha .seta { color: var(--mute); }
.treino-letra { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--y); font-weight: 600; }

/* Detalhe de um treino */
.detalhe-capa { position: relative; height: 300px; overflow: hidden; }
.detalhe-capa img { width: 100%; height: 100%; object-fit: cover; }
.detalhe-capa::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 11, 11, 0.3) 0%, rgba(11, 11, 11, 0) 30%, rgba(11, 11, 11, 0.7) 75%, #0b0b0b 100%); }
.detalhe-voltar { position: absolute; z-index: 2; top: calc(var(--st) + 14px); left: 14px; }
.detalhe-capa-in { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 6px; }
.detalhe-capa-in h1 { font-family: var(--display); font-weight: 800; font-size: 54px; line-height: 0.86; text-transform: uppercase; margin: 8px 0 0; }
.ex-linha { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ex-linha:last-child { border-bottom: 0; }
.ex-linha .n { font-family: var(--display); font-size: 20px; color: var(--mute2); font-weight: 700; }
.ex-linha b { display: block; font-size: 15px; font-weight: 600; }
.ex-linha span { font-size: 12.5px; color: var(--mute); }
.ex-linha .tem-video { color: var(--y); }
.nota-rui { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-m); background: var(--ysoft); border: 1px solid var(--yline); font-size: 14px; }
.nota-rui .avatar { width: 34px; height: 34px; }
.rodape-fixo { position: sticky; bottom: 0; padding: 14px 18px calc(14px + var(--sb)); background: linear-gradient(180deg, rgba(11, 11, 11, 0), var(--bg) 35%); }

/* ---------- Durante o treino ---------- */
.player { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.player-topo { position: absolute; z-index: 5; top: 0; left: 0; right: 0; padding: calc(var(--st) + 12px) 14px 0; display: grid; grid-template-columns: 42px 1fr 42px; gap: 10px; align-items: center; }
.player-topo .titulo { text-align: center; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink2); font-weight: 600; }
.player-topo .tempo { display: block; font-family: var(--display); font-size: 22px; letter-spacing: 0.02em; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.segmentos { position: absolute; z-index: 5; left: 14px; right: 14px; top: calc(var(--st) + 64px); display: flex; gap: 4px; }
.segmentos i { flex: 1; height: 3px; border-radius: 9px; background: rgba(243, 240, 234, 0.2); overflow: hidden; }
.segmentos i.feito { background: var(--y); }
.segmentos i.atual { background: var(--ink); }
.player-media { position: relative; height: 44%; min-height: 250px; flex-shrink: 0; overflow: hidden; background: #000; }
.player-media video, .player-media > img { width: 100%; height: 100%; object-fit: cover; }
.player-media > img { animation: kenburns 12s ease-in-out infinite alternate; }
.player-media > img.media-fundo { position: absolute; inset: 0; filter: blur(22px) brightness(0.42) saturate(1.1); transform: scale(1.2); animation: none; }
.player-media video.media-video { position: relative; object-fit: contain; padding-top: calc(var(--st) + 60px); padding-bottom: 38px; }
.player-media:has(video) { height: 47%; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.12) translateY(-2%); } }
.player-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 11, 11, 0.7) 0%, rgba(11, 11, 11, 0) 34%, rgba(11, 11, 11, 0) 64%, #0b0b0b 100%); pointer-events: none; }
.media-etq { position: absolute; z-index: 2; left: 14px; bottom: 16px; display: flex; gap: 8px; }
.player-corpo { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 18px 18px; scrollbar-width: none; }
.player-corpo::-webkit-scrollbar { display: none; }
.player-corpo h2 { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 0.9; text-transform: uppercase; margin: 0 0 8px; }
.ex-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.dica { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink2); margin-bottom: 16px; }
.dica .ic { width: 18px; height: 18px; color: var(--y); margin-top: 2px; }
.series { display: flex; flex-direction: column; gap: 8px; }
.serie-cab, .serie { display: grid; grid-template-columns: 34px 1fr 74px 74px 50px; gap: 8px; align-items: center; }
.serie-cab { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute2); font-weight: 600; padding: 0 2px; }
.serie { padding: 6px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); transition: background 0.35s, border-color 0.35s; }
.serie .n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 99px; background: var(--bg3); font-weight: 700; font-size: 13px; }
.serie .ant { font-size: 12px; color: var(--mute); line-height: 1.25; }
.serie input { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg); text-align: center; font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--ink); -moz-appearance: textfield; }
.serie input::-webkit-outer-spin-button, .serie input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.serie input:focus { outline: none; border-color: var(--y); }
.serie input:disabled { opacity: 0.35; }
.serie .ok { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 99px; border: 1.5px solid var(--line2); color: var(--mute); transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.3s var(--ease); }
.serie .ok .ic { width: 20px; height: 20px; stroke-width: 2.6; }
.serie.feita { background: rgba(244, 197, 66, 0.07); border-color: var(--yline); }
.serie.feita .ok { background: var(--y); border-color: var(--y); color: #0b0b0b; animation: pop 0.45s var(--ease); }
.serie.feita .n { background: var(--y); color: #0b0b0b; }
.serie.feita input, .serie.feita input:disabled { border-color: transparent; background: transparent; opacity: 1; color: var(--ink); }
@keyframes pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.player-rodape { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px 18px calc(12px + var(--sb)); border-top: 1px solid var(--line); background: var(--bg); }
.player-rodape .btn.fantasma { padding: 0 18px; }

/* Descanso entre séries */
.descanso { position: absolute; z-index: 8; left: 10px; right: 10px; bottom: calc(10px + var(--sb)); padding: 20px; border-radius: var(--r-xl); background: rgba(24, 24, 24, 0.96); border: 1px solid var(--line2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6); display: grid; grid-template-columns: 118px 1fr; gap: 18px; align-items: center; animation: sobe 0.5s var(--ease); }
@keyframes sobe { from { transform: translateY(110%); } }
.descanso .anel { width: 118px; height: 118px; }
.descanso .anel circle { stroke-width: 6; }
.descanso .anel .frente { transition: stroke-dashoffset 1s linear; }
.descanso .anel-txt b { font-size: 34px; }
.descanso-dir { display: flex; flex-direction: column; gap: 10px; }
.descanso-dir .seguinte { font-size: 12.5px; color: var(--mute); }
.descanso-dir .seguinte b { display: block; color: var(--ink); font-size: 14px; }
.descanso-botoes { display: flex; gap: 6px; }
.descanso-botoes button { flex: 1; height: 40px; border-radius: 99px; background: var(--bg4); font-size: 13px; font-weight: 600; }
.descanso-botoes button.saltar { background: var(--y); color: #0b0b0b; }

/* ---------- Fim do treino ---------- */
.fim { min-height: 100%; padding: calc(var(--st) + 34px) 18px calc(var(--sb) + 26px); display: flex; flex-direction: column; gap: 16px; }
.fim-topo { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.fim-check { width: 92px; height: 92px; }
.fim-check circle { fill: var(--y); transform-origin: 50% 50%; animation: pop 0.6s var(--ease) both; }
.fim-check path { fill: none; stroke: #0b0b0b; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: desenha 0.6s 0.35s var(--ease) forwards; }
.fim h1 { font-family: var(--display); font-weight: 800; font-size: 64px; line-height: 0.86; text-transform: uppercase; margin: 0; }
.fim-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fim-stats div { padding: 14px 10px; border-radius: var(--r-m); background: var(--bg2); border: 1px solid var(--line); text-align: center; }
.fim-stats b { display: block; font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1; }
.fim-stats span { font-size: 11px; color: var(--mute); letter-spacing: 0.08em; text-transform: uppercase; }
.recorde { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-m); background: var(--ysoft); border: 1px solid var(--yline); }
.recorde .ic { color: var(--y); width: 24px; height: 24px; }
.recorde b { display: block; font-size: 14px; }
.recorde span { font-size: 12.5px; color: var(--ink2); }
.conquista-nova { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-l); background: linear-gradient(135deg, #2a230c, #151515 70%); border: 1px solid var(--yline); animation: brilho 2.4s ease-in-out 3; }
@keyframes brilho { 50% { box-shadow: 0 0 40px rgba(244, 197, 66, 0.25); } }
.sentir { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sentir button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); font-size: 10.5px; color: var(--mute); line-height: 1.15; text-align: center; transition: all 0.3s var(--ease); }
.sentir button i { display: block; width: 26px; height: 26px; border-radius: 99px; border: 2px solid currentColor; position: relative; }
.sentir button.on { background: var(--ysoft); border-color: var(--y); color: var(--y); transform: translateY(-2px); }
.sentir button i::after { content: ''; position: absolute; left: 50%; top: 50%; width: calc(var(--n) * 4px + 2px); height: calc(var(--n) * 4px + 2px); transform: translate(-50%, -50%); border-radius: 99px; background: currentColor; opacity: 0.85; }
.campo { width: 100%; min-height: 84px; padding: 14px; border-radius: var(--r-m); border: 1px solid var(--line2); background: var(--bg2); resize: none; font-size: 14.5px; line-height: 1.45; }
.campo:focus { outline: none; border-color: var(--y); }
input.campo { min-height: 50px; }

/* ---------- Progresso ---------- */
.stat { padding: 16px; border-radius: var(--r-l); background: var(--bg2); border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--display); font-size: 44px; font-weight: 700; line-height: 0.9; margin: 8px 0 4px; }
.stat b small { font-size: 18px; color: var(--mute); margin-left: 3px; font-weight: 600; }
.stat span { font-size: 12.5px; color: var(--mute); }
.grafico { width: 100%; height: 150px; }
.grafico text { fill: var(--mute2); font-size: 10px; font-family: var(--body); }
.grafico .b { fill: var(--bg4); }
.grafico .b.ok { fill: var(--y); }
.grafico .linha { fill: none; stroke: var(--y); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.grafico .area { fill: url(#grad-y); }
.grafico .meta { stroke: var(--line2); stroke-dasharray: 3 4; }
.grafico .pt { fill: var(--bg); stroke: var(--y); stroke-width: 2.5; }
.pr-linha { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pr-linha:last-child { border-bottom: 0; }
.pr-linha b { font-size: 14.5px; font-weight: 600; }
.pr-linha span { display: block; font-size: 12px; color: var(--mute); }
.pr-linha .val { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--y); text-align: right; }
.medalhas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.medalha { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 11.5px; color: var(--ink2); line-height: 1.2; }
.escudo { position: relative; display: grid; place-items: center; width: 70px; height: 76px; clip-path: polygon(0 0, 100% 0, 100% 64%, 50% 100%, 0 64%); background: var(--bg3); color: var(--mute2); }
.escudo .ic { width: 28px; height: 28px; margin-top: -8px; }
.medalha.ganha .escudo { background: linear-gradient(160deg, #ffd864, var(--y2)); color: #0b0b0b; }
.medalha.ganha .escudo .ic { stroke-width: 2.2; }
.medalha .prog { font-size: 10.5px; color: var(--mute); }
.medalha.nova .escudo { animation: brilho2 1.6s ease-in-out 4; }
@keyframes brilho2 { 50% { filter: drop-shadow(0 0 14px rgba(244, 197, 66, 0.7)); } }

/* ---------- Equipa ---------- */
.evento { position: relative; overflow: hidden; border-radius: var(--r-l); border: 1px solid var(--line); min-height: 200px; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; isolation: isolate; }
.evento > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.evento::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 11, 11, 0.2), rgba(11, 11, 11, 0.94) 78%); }
.evento h3 { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 0.9; text-transform: uppercase; margin: 6px 0 4px; }
.evento-acoes { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.feed-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-item p { font-size: 14px; line-height: 1.35; }
.feed-item p b { font-weight: 600; }
.feed-item .quando { font-size: 11.5px; color: var(--mute2); margin-top: 2px; }
.forca { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line2); font-size: 12px; font-weight: 600; color: var(--ink2); transition: all 0.3s var(--ease); }
.forca .ic { width: 16px; height: 16px; }
.forca.on { background: var(--y); color: #0b0b0b; border-color: var(--y); }
.forca.on .ic { animation: pop 0.45s var(--ease); }

/* ---------- Conversa ---------- */
.conversa-ecra { display: flex; flex-direction: column; height: 100%; }
.conversa-cab { display: flex; align-items: center; gap: 12px; padding: calc(var(--st) + 10px) 18px 12px; border-bottom: 1px solid var(--line); }
.conversa-cab b { display: block; font-size: 16px; }
.conversa-cab span { font-size: 12px; color: var(--verde); }
.mensagens { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: none; }
.mensagens::-webkit-scrollbar { display: none; }
.msg-dia { align-self: center; font-size: 11px; color: var(--mute2); letter-spacing: 0.1em; text-transform: uppercase; margin: 10px 0 4px; }
.msg { max-width: 82%; padding: 10px 13px; border-radius: 18px; font-size: 14.5px; line-height: 1.4; animation: entra 0.4s var(--ease) both; }
.msg small { display: block; margin-top: 4px; font-size: 10.5px; opacity: 0.6; text-align: right; }
.msg.dele { align-self: flex-start; background: var(--bg3); border-bottom-left-radius: 6px; }
.msg.meu { align-self: flex-end; background: var(--y); color: #0b0b0b; border-bottom-right-radius: 6px; }
.msg-video { position: relative; width: 190px; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; margin-bottom: 6px; background: #000; }
.msg-video video, .msg-video img { width: 100%; height: 100%; object-fit: cover; }
.msg-video .play { position: absolute; inset: 0; display: grid; place-items: center; }
.msg-video .play span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 99px; background: rgba(11, 11, 11, 0.6); color: #fff; backdrop-filter: blur(6px); }
.msg-audio { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.msg-audio .play-a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 99px; background: var(--y); color: #0b0b0b; flex-shrink: 0; }
.msg-audio .onda { flex: 1; display: flex; align-items: center; gap: 2px; height: 26px; }
.msg-audio .onda i { flex: 1; border-radius: 9px; background: var(--mute); }
.msg-audio.a-tocar .onda i { background: var(--y); }
.msg-chamada { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--yline); min-width: 230px; }
.msg-chamada .ic { color: var(--y); }
.escrever { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + var(--sb)); border-top: 1px solid var(--line); background: var(--bg); }
.escrever textarea { flex: 1; min-height: 44px; max-height: 120px; padding: 11px 15px; border-radius: 22px; border: 1px solid var(--line2); background: var(--bg2); resize: none; font-size: 14.5px; line-height: 1.4; }
.escrever textarea:focus { outline: none; border-color: var(--yline); }
.escrever .enviar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 99px; background: var(--y); color: #0b0b0b; flex-shrink: 0; }
.escrever .camara { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line); color: var(--ink2); flex-shrink: 0; }

/* ---------- Perfil ---------- */
.perfil-topo { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 8px 18px 6px; }
.perfil-topo h1 { font-family: var(--display); font-weight: 800; font-size: 38px; line-height: 0.9; text-transform: uppercase; margin: 0; }
.linha-def { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.linha-def:last-child { border-bottom: 0; }
.linha-def .ic { color: var(--y); }
.linha-def div { flex: 1; min-width: 0; }
.linha-def b { display: block; font-size: 14.5px; font-weight: 600; }
.linha-def span { font-size: 12.5px; color: var(--mute); }
.interruptor { position: relative; width: 50px; height: 30px; border-radius: 99px; background: var(--bg4); transition: background 0.3s; flex-shrink: 0; }
.interruptor::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 99px; background: var(--ink); transition: transform 0.35s var(--ease); }
.interruptor.on { background: var(--y); }
.interruptor.on::after { transform: translateX(20px); background: #0b0b0b; }

/* ---------- Folhas (painéis que sobem) ---------- */
.folha-fundo { position: absolute; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: aparece 0.3s ease both; }
@keyframes aparece { from { opacity: 0; } }
.folha { position: absolute; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 90%; overflow-y: auto; padding: 10px 18px calc(22px + var(--sb)); border-radius: 30px 30px 0 0; background: var(--bg2); border-top: 1px solid var(--line2); animation: sobe 0.45s var(--ease) both; scrollbar-width: none; }
.folha::-webkit-scrollbar { display: none; }
.folha-pega { width: 42px; height: 5px; border-radius: 9px; background: var(--line2); margin: 0 auto 14px; }
.folha h2 { font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 0.92; text-transform: uppercase; margin: 0 0 6px; }
.folha .sub { color: var(--mute); font-size: 14px; margin: 0 0 16px; }
.folha.sair { animation: desce 0.3s ease forwards; }
.folha-fundo.sair { animation: aparece 0.3s ease reverse forwards; }
@keyframes desce { to { transform: translateY(105%); } }
.opcoes-lista { display: flex; flex-direction: column; gap: 8px; }
.opcao { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-m); background: var(--bg3); border: 1px solid var(--line); text-align: left; width: 100%; }
.opcao .ic { color: var(--y); }
.opcao b { display: block; font-size: 14.5px; }
.opcao span { font-size: 12.5px; color: var(--mute); }
.escala { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.escala button { height: 46px; border-radius: 14px; background: var(--bg3); border: 1px solid var(--line); font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--mute); }
.escala button.on { background: var(--y); border-color: var(--y); color: #0b0b0b; }
.escala-legenda { display: flex; justify-content: space-between; font-size: 11px; color: var(--mute2); margin-top: 6px; }
.campo-rot { display: block; font-size: 12px; font-weight: 600; color: var(--ink2); margin: 16px 0 8px; letter-spacing: 0.02em; }
.video-pre { width: 100%; max-height: 52vh; border-radius: 18px; background: #000; object-fit: contain; }

/* ---------- Instalar no telemóvel ---------- */
.passos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.passos li { display: grid; grid-template-columns: 30px 1fr 44px; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-m); background: var(--bg3); border: 1px solid var(--line); }
.passo-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 99px; background: var(--y); color: #0b0b0b; font-weight: 700; font-size: 14px; }
.passos b { display: block; font-size: 14.5px; }
.passos div span { font-size: 12.5px; color: var(--mute); }
.passo-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--bg); color: var(--y); }
.passo-ic .ic { width: 24px; height: 24px; }
.passo-ic img { width: 44px; height: 44px; border-radius: 11px; }
.qr { display: block; width: 216px; height: 216px; margin: 6px auto 0; border-radius: 18px; background: #f3f0ea; }
.nota-instalar { display: inline-flex; align-items: center; justify-content: center; gap: 8px; align-self: center; padding: 9px 16px; border-radius: 99px; color: var(--y); font-size: 13px; font-weight: 600; border: 1px dashed var(--yline); }
.nota-instalar .ic { width: 16px; height: 16px; }
.aviso-instalar { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 10px; align-items: center; padding: 12px; border-radius: var(--r-l); background: linear-gradient(135deg, #1f1a0c, var(--bg2) 70%); border: 1px solid var(--yline); }
.aviso-instalar img { width: 44px; height: 44px; border-radius: 11px; }
.aviso-instalar b { display: block; font-size: 14.5px; }
.aviso-instalar span { display: block; font-size: 12.5px; color: var(--mute); }
.aviso-instalar .fechar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 99px; color: var(--mute); }
.aviso-instalar .fechar .ic { width: 18px; height: 18px; }
.link-copiar { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.link-copiar .campo { min-height: 44px; padding: 10px 14px; font-size: 13px; color: var(--ink2); }
.aviso-safari { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 12px 14px; border-radius: var(--r-m); background: var(--ysoft); border: 1px solid var(--yline); font-size: 13px; color: var(--ink2); }
.aviso-safari .ic { width: 18px; height: 18px; color: var(--y); margin-top: 1px; }
.lado-instalar { display: flex; flex-direction: column; gap: 12px; }
.lado-instalar .btn { width: max-content; }
.lado-qr { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 20px; background: var(--bg2); border: 1px solid var(--line); }
.lado-qr[hidden] { display: none; }
.lado-qr img { width: 132px; height: 132px; border-radius: 12px; flex-shrink: 0; }
.lado .lado-qr p { font-size: 12.5px; color: var(--ink2); }

/* No iPhone, campos com letra abaixo de 16px fazem o Safari aproximar o ecrã ao escrever. */
@supports (-webkit-touch-callout: none) {
  .campo, .escrever textarea, .procurar input, .notas-rui { font-size: 16px; }
}

/* ---------- Avisos ---------- */
.toast { position: absolute; z-index: 90; left: 50%; bottom: calc(var(--sb) + 96px); transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 99px; background: var(--ink); color: #0b0b0b; font-size: 13.5px; font-weight: 600; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); display: flex; align-items: center; gap: 8px; animation: toast 3.2s var(--ease) forwards; pointer-events: none; }
.toast .ic { width: 18px; height: 18px; }
.toast.y { background: var(--y); }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 16px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 8px); } }
.notif { position: absolute; z-index: 95; top: calc(var(--st) + 10px); left: 10px; right: 10px; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 22px; background: rgba(36, 36, 36, 0.94); border: 1px solid var(--line2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); animation: notif 5.2s var(--ease) forwards; text-align: left; }
.notif img { width: 40px; height: 40px; border-radius: 11px; }
.notif .t { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--mute); text-transform: uppercase; letter-spacing: 0.08em; }
.notif b { display: block; font-size: 14px; margin-top: 1px; }
.notif p { margin: 0; font-size: 13.5px; color: var(--ink2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@keyframes notif { 0% { transform: translateY(-140%); } 8%, 90% { transform: translateY(0); } 100% { transform: translateY(-140%); } }
canvas.festa { position: absolute; inset: 0; z-index: 70; pointer-events: none; width: 100%; height: 100%; }

/* ---------- Painel do Rui ---------- */
.app.modo-rui { max-width: none; }
.nav-rui { position: relative; z-index: 20; flex-shrink: 0; order: 2; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 6px calc(8px + var(--sb)); background: rgba(11, 11, 11, 0.94); border-top: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.nav-rui .marca-nav { display: none; }
.nav-rui .tab { font-size: 10.5px; }
.nav-rui .sair-rui { display: none; }
.rui-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 12px 18px 18px; }
.rui-cab h1 { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 0.9; text-transform: uppercase; margin: 6px 0 0; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { padding: 14px; border-radius: var(--r-m); background: var(--bg2); border: 1px solid var(--line); }
.kpi span { font-size: 12px; color: var(--mute); }
.kpi b { display: block; font-family: var(--display); font-size: 38px; font-weight: 700; line-height: 0.95; margin-top: 6px; }
.kpi b small { font-size: 16px; color: var(--mute); font-weight: 600; margin-left: 2px; }
.kpi.alerta b { color: var(--vermelho); }
.kpi .tend { font-size: 11.5px; margin-top: 4px; display: block; }
.alerta-item { display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 14px; border-radius: var(--r-l); background: var(--bg2); border: 1px solid var(--line); }
.alerta-item.risco { border-color: rgba(239, 106, 91, 0.35); }
.alerta-item.novo { border-color: var(--yline); background: linear-gradient(135deg, #1f1a0c, var(--bg2) 60%); }
.alerta-item .quem b { font-size: 15px; }
.alerta-item .quem { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.alerta-item .quem span { font-size: 11.5px; color: var(--mute2); white-space: nowrap; }
.alerta-item p { margin: 3px 0 10px; font-size: 13.5px; color: var(--ink2); }
.alerta-acoes { display: flex; flex-wrap: wrap; gap: 6px; }
.alerta-acoes button, .alerta-acoes a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 99px; background: var(--bg3); border: 1px solid var(--line2); font-size: 12.5px; font-weight: 600; }
.alerta-acoes .pri { background: var(--y); color: #0b0b0b; border-color: var(--y); }
.alerta-acoes .ic { width: 15px; height: 15px; }
.semaforo { width: 10px; height: 10px; border-radius: 99px; display: inline-block; flex-shrink: 0; }
.semaforo.ok { background: var(--verde); box-shadow: 0 0 10px rgba(116, 211, 154, 0.5); }
.semaforo.atencao { background: var(--laranja); box-shadow: 0 0 10px rgba(242, 165, 75, 0.5); }
.semaforo.risco { background: var(--vermelho); box-shadow: 0 0 10px rgba(239, 106, 91, 0.5); }
.filtros { display: flex; gap: 6px; overflow-x: auto; padding: 0 18px 4px; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.filtros button { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--ink2); }
.filtros button.on { background: var(--ink); color: #0b0b0b; border-color: var(--ink); }
.procurar { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line); }
.procurar input { flex: 1; background: none; border: 0; outline: none; font-size: 14.5px; }
.procurar .ic { color: var(--mute); width: 18px; height: 18px; }
.aluno-linha { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.aluno-linha:last-child { border-bottom: 0; }
.aluno-linha b { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.aluno-linha .mute { font-size: 12.5px; }
.adesao { text-align: right; }
.adesao b { display: block; font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1; justify-content: flex-end; }
.adesao span { font-size: 11px; color: var(--mute2); }
.ficha-topo { display: flex; align-items: center; gap: 16px; padding: 6px 18px 18px; }
.ficha-topo h1 { font-family: var(--display); font-weight: 800; font-size: 36px; line-height: 0.9; text-transform: uppercase; margin: 0 0 6px; }
.semanas-barras { display: flex; align-items: flex-end; gap: 6px; height: 90px; }
.semanas-barras div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; height: 100%; }
.semanas-barras i { display: block; border-radius: 4px; background: var(--y); min-height: 3px; }
.semanas-barras i.falhou { background: var(--bg4); }
.semanas-barras span { font-size: 9.5px; color: var(--mute2); text-align: center; }
.checkin-grelha { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.checkin-grelha div { padding: 10px; border-radius: 14px; background: var(--bg3); text-align: center; }
.checkin-grelha b { display: block; font-family: var(--display); font-size: 24px; font-weight: 700; line-height: 1; }
.checkin-grelha span { font-size: 10.5px; color: var(--mute); text-transform: uppercase; letter-spacing: 0.06em; }
.treino-hist { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.treino-hist:last-child { border-bottom: 0; }
.treino-hist b { font-size: 14px; font-weight: 600; }
.treino-hist .q { font-size: 12px; color: var(--mute); text-align: right; }
.treino-hist p { grid-column: 1 / -1; font-size: 13px; color: var(--ink2); margin: 0; font-style: italic; }
.notas-rui { width: 100%; min-height: 90px; padding: 12px; border-radius: 14px; border: 1px dashed var(--line2); background: transparent; resize: vertical; font-size: 14px; }
.notas-rui:focus { outline: none; border-color: var(--yline); }
.respostas-rapidas { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.respostas-rapidas button { padding: 8px 12px; border-radius: 99px; background: var(--bg3); border: 1px solid var(--line2); font-size: 13px; }
.respostas-rapidas button:active { background: var(--ysoft); border-color: var(--yline); }
.fb-item { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; padding: 10px; border-radius: var(--r-l); background: var(--bg2); border: 1px solid var(--line); text-align: left; width: 100%; }
.fb-item .mini { position: relative; width: 72px; height: 88px; border-radius: 14px; overflow: hidden; background: var(--bg3); display: grid; place-items: center; color: var(--y); }
.fb-item .mini img, .fb-item .mini video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fb-item .mini .ic { position: relative; z-index: 2; width: 26px; height: 26px; }
.fb-item b { display: block; font-size: 14.5px; }
.fb-item span { font-size: 12.5px; color: var(--mute); }
.fb-item.novo { border-color: var(--yline); }
.vazio { padding: 30px 18px; text-align: center; color: var(--mute); font-size: 14px; }
.vazio .ic { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--mute2); }
.duas-col { display: flex; flex-direction: column; gap: 14px; }

@media (min-width: 900px) {
  .app.modo-rui { flex-direction: row; height: 100dvh; }
  .nav-rui { order: 0; width: 248px; display: flex; flex-direction: column; gap: 4px; padding: 26px 16px; border-top: 0; border-right: 1px solid var(--line); background: var(--bg); }
  .nav-rui .marca-nav { display: flex; align-items: center; gap: 10px; padding: 0 10px 26px; color: var(--y); }
  .nav-rui .marca-nav .mono { width: 34px; }
  .nav-rui .marca-nav svg.nome { width: 120px; color: var(--ink); }
  .nav-rui .tab { flex-direction: row; gap: 12px; padding: 12px 14px; border-radius: 14px; font-size: 14px; color: var(--ink2); }
  .nav-rui .tab.on { background: var(--bg2); color: var(--y); }
  .nav-rui .tab.on::after { display: none; }
  .nav-rui .tab .badge { position: static; margin-left: auto; }
  .nav-rui .sair-rui { display: flex; margin-top: auto; }
  .modo-rui .ecra { padding-top: 26px; }
  .modo-rui .ecra > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
  .modo-rui .rui-cab h1 { font-size: 56px; }
  .modo-rui .kpis { grid-template-columns: repeat(4, 1fr); }
  .duas-col { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: start; }
  .modo-rui .demo-pilula { top: 22px; bottom: auto; right: 26px; }
  .modo-rui .folha { left: 50%; right: auto; width: 520px; transform: translateX(-50%); bottom: 24px; border-radius: 30px; border: 1px solid var(--line2); max-height: calc(100dvh - 48px); animation: sobeCentro 0.45s var(--ease) both; }
  @keyframes sobeCentro { from { transform: translate(-50%, 40px); opacity: 0; } }
  .modo-rui .folha.sair { animation: aparece 0.25s ease reverse forwards; }
  .modo-rui .toast { bottom: 30px; }
  .modo-rui .notif { left: auto; right: 24px; width: 380px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Versão real (8 nov 2026): entrar, convites, avaliação inicial, avisos ---------- */
.sub { color: var(--mute); font-size: 14px; margin: 0; }
.campo.linha { min-height: 50px; padding: 12px 14px; }
select.campo.linha { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.campo-linha { display: flex; flex-direction: column; gap: 6px; }
.campo-linha > span { font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.entrada-form-pilha { gap: 16px !important; }
.entrada-form { display: flex; flex-direction: column; gap: 12px; }
.entrada .nota a { color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.entrada .sub { color: var(--ink2); }
.peq-frase { font-size: 30px !important; }
.erro-form { margin: 0; color: var(--vermelho); font-size: 13.5px; }
.erro-form[hidden] { display: none; }
.aviso-form { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: var(--r-m); background: var(--ysoft); border: 1px solid var(--yline); color: var(--ink); font-size: 13.5px; }
.aviso-form .ic { color: var(--y); flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.aviso-form[hidden] { display: none; }
.roda { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--y); animation: gira 0.8s linear infinite; vertical-align: -3px; }
@keyframes gira { to { transform: rotate(360deg); } }
.a-abrir { height: 100%; min-height: 60dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; color: var(--y); }
.a-abrir .mono { width: 72px; }
.sem-rede { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(86px + var(--sb)); z-index: 30; display: flex; align-items: center; gap: 6px; margin: 0; padding: 7px 12px; border-radius: 99px; background: var(--bg3); border: 1px solid var(--line2); color: var(--ink2); font-size: 12px; white-space: nowrap; }
.sem-rede .ic { width: 14px; height: 14px; color: var(--y); }
.modo-rui .sem-rede { bottom: 18px; }
.caixa-aceitar { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--r-m); background: var(--bg3); border: 1px solid var(--line2); font-size: 13.5px; color: var(--ink); cursor: pointer; }
.caixa-aceitar input { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--y); margin: 0; }
.caixa-aceitar a { color: var(--y); text-decoration: underline; text-underline-offset: 3px; }
.parq-linha { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.parq-linha:last-of-type { border-bottom: 0; }
.parq-linha p { margin: 0; font-size: 14px; color: var(--ink); }
.sim-nao { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sim-nao button { min-height: 42px; border-radius: 99px; background: var(--bg3); border: 1px solid var(--line2); font-weight: 600; font-size: 13px; color: var(--ink2); }
.sim-nao button.on[data-v="nao"] { background: var(--ysoft); border-color: var(--yline); color: var(--y); }
.sim-nao button.on[data-v="sim"] { background: rgba(239, 106, 91, 0.12); border-color: rgba(239, 106, 91, 0.4); color: var(--vermelho); }
.anamnese h1 { font-size: 46px; }
.anamnese-mono { width: 54px; color: var(--y); }
.texto-legal h1 { font-size: 44px; }
.texto-legal h3 { margin: 18px 0 0; font-size: 16px; }
.texto-legal p, .texto-legal li { color: var(--ink2); font-size: 14.5px; line-height: 1.6; }
.texto-legal ul { margin: 0; padding-left: 20px; }
.btn.perigo { background: var(--vermelho); color: #0b0b0b; }
.player-rodape > :only-child { grid-column: 1 / -1; }
.treino-hist { background: none; border: 0; border-bottom: 1px solid var(--line); color: inherit; font: inherit; }
.alerta-acoes a.pri { background: var(--y); color: #0b0b0b; border-color: var(--y); }
@media (min-width: 900px) {
  .app.modo-entrada, .app.modo-ecra, .app.modo-aluno { margin: 0 auto; }
}
