/* /assets/css/app.css — identidade visual AYRA
   O que é: folha de estilo única do aplicativo (tokens, telas de acesso,
            dashboard, treinos, evolução, comunidade, perfil e painel do motor).
   Onde fica: /assets/css/app.css
   Função: aplicar 100% do AYRA-GUIA-VISUAL.md — paleta Noite/Aura/Céu/Vida,
           tipografia Satoshi, cards com borda hairline de 1px, gradiente Aura
           como único elemento de assinatura por tela, sem glow e sem vidro.
   Temas: Black (padrão) e White, via data-theme="black" | "white" no <html>.
   Ordem: carrega DEPOIS de motion.css, para poder sobrescrever. */

/* ===============================================================
   1. TOKENS — fonte da verdade: AYRA-GUIA-VISUAL.md §6
   Nada de hex solto fora deste bloco.
   =============================================================== */
:root {
  /* ---- Marca (imutáveis entre os dois temas) ---- */
  --noite:       #0B0D14;
  --aura:        #6A5CFF;
  --aura-claro:  #8F7BFF;
  --ceu:         #4DBBFF;
  --vida:        #56E1C6;
  --neutro:      #E6E8EC;
  --verde-ok:    #34D986;
  --ambar:       #F5A623;
  --alerta-cor:  #FF5C7A;

  --grad-aura:  linear-gradient(135deg, #8F7BFF 0%, #6A5CFF 55%, #4DBBFF 130%);
  --grad-noite: radial-gradient(120% 90% at 50% 0%, #151046 0%, #0B0D14 60%);
  --glow-aura:  0 0 48px rgb(106 92 255 / 0.35);

  /* ---- Forma ---- */
  --r-xs: 8px;  --r-sm: 12px;  --r-md: 16px;  --r-lg: 20px;  --r-pill: 999px;
  --sp-1: 4px;  --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px; --sp-12: 48px;

  /* ---- Movimento (guia §11) ---- */
  --ease-out: cubic-bezier(0.22, 0.9, 0.3, 1);
  --dur-fast: 150ms;
  --dur-base: 260ms;
  --dur-slow: 450ms;

  /* ---- Tipografia: uma família só ---- */
  --fonte: 'Satoshi', -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* ---- Layout ---- */
  --gap:   1rem;
  --gap-g: 1.5rem;
  --largura-app: 1180px;
  --lateral: 232px;          /* largura da sidebar no desktop (guia §8.6) */

  /* ---- Nomes legados: mantêm o código PHP e as seções antigas
          desta folha funcionando, já falando a paleta AYRA.
          Resolvem por tema, porque apontam para tokens de tema.  ---- */
  --azul:       var(--aura);
  --azul-claro: var(--aura-claro);
  --verde:      var(--vida-text);
  --erro:       var(--alerta-cor);
  --atencao:    var(--ambar);
  --fundo:      var(--bg);
  --fundo-fundo:var(--bg-fundo);
  --superficie: var(--surface-1);
  --superficie-alta: var(--surface-2);
  --branco:     var(--text-1);
  --cinza:      var(--text-3);
  --borda:      var(--border);
  --borda-viva: var(--border-strong);
  --vidro:      var(--surface-1);
  --raio-p:     var(--r-sm);
  --raio:       var(--r-md);
  --raio-g:     var(--r-lg);

  /* Glows desligados: o guia proíbe. Ficam como token para não quebrar
     as dezenas de regras antigas que os chamam. */
  --glow-azul:  none;
  --glow-verde: none;
}

/* ===== TEMA BLACK — padrão, fiel aos prints (guia §4.1) ===== */
:root,
[data-theme="black"] {
  color-scheme: dark;
  --bg:            #0B0D14;
  --bg-fundo:      #07080D;
  --bg-sidebar:    #0D1019;
  --surface-1:     #12151F;
  --surface-2:     #181C29;
  --surface-3:     #1F2433;
  --border:        rgb(255 255 255 / 0.07);
  --border-strong: rgb(255 255 255 / 0.14);
  --text-1:        #F5F6F8;
  --text-2:        #B9BEC9;
  --text-3:        #6E7484;
  --aura-soft:     rgb(106 92 255 / 0.14);
  --ceu-soft:      rgb(77 187 255 / 0.14);
  --vida-soft:     rgb(86 225 198 / 0.14);
  --ambar-soft:    rgb(245 166 35 / 0.14);
  --alerta-soft:   rgb(255 92 122 / 0.14);
  --vida-text:     #56E1C6;
  --ceu-text:      #4DBBFF;
  --shadow-card:   0 8px 28px rgb(0 0 0 / 0.35);
  --sobre-aura:    #FFFFFF;
}

/* ===== TEMA WHITE (guia §4.2) ===== */
[data-theme="white"] {
  color-scheme: light;
  --bg:            #F7F8FA;
  --bg-fundo:      #EEF0F5;
  --bg-sidebar:    #FFFFFF;
  --surface-1:     #FFFFFF;
  --surface-2:     #F1F3F7;
  --surface-3:     #E9ECF2;
  --border:        rgb(11 13 20 / 0.08);
  --border-strong: rgb(11 13 20 / 0.16);
  --text-1:        #0B0D14;
  --text-2:        #3E4453;
  --text-3:        #8A90A0;
  --aura-soft:     rgb(106 92 255 / 0.10);
  --ceu-soft:      rgb(77 187 255 / 0.12);
  --vida-soft:     rgb(86 225 198 / 0.14);
  --ambar-soft:    rgb(245 166 35 / 0.12);
  --alerta-soft:   rgb(255 92 122 / 0.10);
  --vida-text:     #17B894;   /* Vida escurecida p/ passar AA sobre branco */
  --ceu-text:      #1D8FE0;
  --shadow-card:   0 6px 20px rgb(11 13 20 / 0.07);
  --sobre-aura:    #FFFFFF;
}

/* ===============================================================
   2. BASE
   =============================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--fonte);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.55;
  overflow-x: hidden;
  transition:
    background var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out);
}

h1, h2, h3 {
  margin: 0;
  color: var(--text-1);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
h1 { letter-spacing: -0.02em; }
p  { margin: 0; }
a  { color: var(--aura); text-decoration: none; }
[data-theme="white"] a { color: var(--aura); }
img, svg { max-width: 100%; }
strong, b { font-weight: 700; }

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

/* Rótulo de dado — --type-overline do guia */
.rotulo {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.apoio { color: var(--text-3); font-size: 12.5px; }
.verde { color: var(--vida-text); }
.azul  { color: var(--aura); }

/* Uma palavra colorida por headline — assinatura de texto da AYRA (guia §5.2) */
.hl-aura { color: var(--aura); font-style: normal; }
.hl-ceu  { color: var(--ceu-text); font-style: normal; }
.hl-vida { color: var(--vida-text); font-style: normal; }

.pular-para-conteudo {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--aura);
  color: #fff;
  padding: 0.75rem 1rem;
  font-weight: 700;
  border-radius: 0 0 var(--r-sm) 0;
  z-index: 999;
}
.pular-para-conteudo:focus { left: 0; }


/* ===============================================================
   3. MARCA
   =============================================================== */
.marca {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}
.marca__simbolo { flex: none; }
.marca__nome {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.marca__nome span { color: var(--verde); }
.marca__assinatura {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cinza);
}

/* ===============================================================
   4. ELEMENTO ASSINATURA — linha de batimento (ECG)
   Ambiente contínuo: a única animação em loop do projeto.
   =============================================================== */
.ecg { display: block; width: 100%; height: auto; overflow: visible; }
.ecg path {
  fill: none;
  stroke: var(--verde);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.js .ecg--vivo path {
  stroke-dasharray: 60 940;
  animation: ecg-correr 3.2s linear infinite;
}
@keyframes ecg-correr { to { stroke-dashoffset: -1000; } }

/* ===============================================================
   5. FUNDO DAS TELAS DE ACESSO
   =============================================================== */
.tela-auth {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 70% at 50% -10%, rgb(106 92 255 / 0.28), transparent 62%),
    radial-gradient(90% 50% at 50% 108%, rgb(86 225 198 / 0.06), transparent 70%),
    var(--fundo);
}
.tela-auth::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(75% 60% at 50% 25%, #000 30%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.auth {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 27rem;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.auth__marca {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.75rem;
}
.auth__rodape {
  margin-top: auto;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--cinza);
}
.auth__ecg {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

/* ===============================================================
   6. CARTÃO DE VIDRO
   =============================================================== */
.cartao {
  background: var(--vidro);
  border: 1px solid var(--borda);
  border-radius: var(--raio-g);
  padding: 1.5rem 1.25rem;
}
.cartao__titulo { font-size: 1.5rem; }
.cartao__sub { margin-top: 0.375rem; color: var(--cinza); font-size: 0.9375rem; }

/* ===============================================================
   7. FORMULÁRIO
   =============================================================== */
.form { margin-top: 1.5rem; display: grid; gap: 1rem; }

.campo { position: relative; }

.campo input {
  width: 100%;
  height: 3.5rem;
  padding: 1.35rem 1rem 0.5rem;
  background: var(--surface-3);
  border: 1px solid var(--borda-viva);
  border-radius: var(--raio-p);
  color: var(--branco);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.campo input::placeholder { color: transparent; }

.campo label {
  position: absolute;
  left: 1rem;
  top: 1.05rem;
  color: var(--cinza);
  font-size: 1rem;
  pointer-events: none;
  transform-origin: left top;
  transition: transform var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.campo input:focus + label,
.campo input:not(:placeholder-shown) + label {
  transform: translateY(-0.7rem) scale(0.72);
}
.campo input:focus + label { color: var(--azul-claro); }

.campo input:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: var(--glow-azul);
}
.campo input:-webkit-autofill {
  -webkit-text-fill-color: var(--branco);
  -webkit-box-shadow: 0 0 0 1000px var(--surface-3) inset;
}
.campo--erro input { border-color: var(--erro); }
.campo__dica { display: block; margin-top: 0.375rem; font-size: 0.75rem; color: var(--cinza); }
.campo__erro { display: block; margin-top: 0.375rem; font-size: 0.75rem; color: var(--erro); }

/* Botão de mostrar senha */
.campo__olho {
  position: absolute;
  right: 0.375rem;
  top: 0.375rem;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: 10px;
  color: var(--cinza);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.campo__olho:hover { color: var(--branco); }
.campo__olho:active { transform: scale(0.92); }
.campo--olho input { padding-right: 3.25rem; }

/* Força da senha */
.forca { margin-top: 0.5rem; }
.forca__barras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.forca__barras i {
  height: 3px;
  border-radius: 2px;
  background: var(--surface-3);
  transform-origin: left;
  transition: background var(--dur-base) var(--ease-out);
}
.forca__texto { display: block; margin-top: 0.375rem; font-size: 0.75rem; color: var(--cinza); }
.forca[data-nivel="1"] i:nth-child(-n+1) { background: var(--erro); }
.forca[data-nivel="2"] i:nth-child(-n+2) { background: var(--atencao); }
.forca[data-nivel="3"] i:nth-child(-n+3) { background: var(--azul); }
.forca[data-nivel="4"] i { background: var(--verde); }

/* Checkbox */
.aceite {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  font-size: 0.8125rem;
  color: var(--cinza);
  line-height: 1.45;
}
.aceite input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.1rem 0 0;
  accent-color: var(--verde);
}

/* Honeypot: invisível para gente, visível para robô */
.armadilha {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ===============================================================
   8. BOTÕES
   =============================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.375rem;
  padding: 0 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--raio-p);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-align: center;
}
.btn--principal {
  background: var(--verde);
  color: var(--fundo);
  box-shadow: var(--glow-verde);
}
.btn--principal:hover { background: var(--aura-claro); }
.btn--secundario {
  background: transparent;
  border-color: var(--azul);
  color: var(--branco);
}
.btn--secundario:hover { background: rgb(106 92 255 / 0.12); }
.btn--bloco { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.link-forte { color: var(--verde); font-weight: 600; }

/* ===============================================================
   9. ALERTAS
   =============================================================== */
.alerta {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--borda);
  border-left-width: 3px;
  border-radius: var(--raio-p);
  background: var(--surface-2);
  font-size: 0.875rem;
  line-height: 1.45;
}
.alerta--erro    { border-left-color: var(--erro);    color: var(--alerta-cor); }
.alerta--sucesso { border-left-color: var(--verde);   color: var(--vida-text); }
.alerta--aviso   { border-left-color: var(--azul);    color: var(--ceu-text); }
.alerta svg { flex: none; margin-top: 0.1rem; }

/* ===============================================================
   10. DASHBOARD — estrutura
   =============================================================== */
.tela-app {
  background:
    radial-gradient(100% 40% at 50% 0%, rgb(106 92 255 / 0.14), transparent 60%),
    var(--fundo);
  padding-bottom: calc(6.5rem + env(safe-area-inset-bottom));
}

.app {
  width: 100%;
  max-width: var(--largura-app);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Barra superior */
.topo {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--borda);
}
.topo__centro { text-align: center; line-height: 1; }
.icone-btn {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: 12px;
  color: var(--branco);
  cursor: pointer;
  position: relative;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.icone-btn:hover { background: var(--surface-2); }
.icone-btn:active { transform: scale(0.93); }
.icone-btn__ponto {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--verde);
  box-shadow: 0 0 8px var(--verde);
}

/* Saudação */
.saudacao {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.875rem;
  padding: 1.25rem 0 1rem;
}
.avatar {
  width: 3.75rem;
  height: 3.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--verde);
  background: var(--superficie);
  color: var(--verde);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  box-shadow: var(--glow-verde);
}
.saudacao h1 { font-size: 1.375rem; }
.saudacao p { color: var(--cinza); font-size: 0.875rem; margin-top: 0.125rem; }

.sequencia {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  background: var(--superficie);
}
.sequencia strong { font-size: 1.5rem; color: var(--verde); line-height: 1; }
.sequencia__chama {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgb(86 225 198 / 0.35);
  color: var(--verde);
  flex: none;
}

/* Painéis */
.painel {
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 1.125rem 1rem;
}
.painel + .painel, .painel + .metricas, .metricas + .painel { margin-top: 0.875rem; }
.painel__topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.painel__link { font-size: 0.8125rem; font-weight: 500; }

/* ===============================================================
   11. DASHBOARD — anéis de métrica
   =============================================================== */
.metricas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
}
.metrica {
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 0.875rem 0.625rem 1rem;
  text-align: center;
}
.metrica .rotulo {
  display: block;
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.625rem;
  min-height: 2em;
}
.anel { position: relative; width: 100%; max-width: 7rem; margin: 0 auto; aspect-ratio: 1; }
.anel svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anel__trilha { fill: none; stroke: var(--surface-3); stroke-width: 7; }
.anel__valor {
  fill: none;
  stroke: var(--cor, var(--verde));
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: calc(264 - 264 * var(--pct, 0) / 100);
}
.js .anel__valor { animation: anel-encher var(--dur-slow) var(--ease-out) both; }
@keyframes anel-encher { from { stroke-dashoffset: 264; } }

.anel__centro {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.1rem;
}
.anel__centro b { font-size: 1.125rem; font-weight: 700; line-height: 1; }
.anel__centro span { font-size: 0.6875rem; color: var(--cinza); }
.metrica__meta { margin-top: 0.75rem; font-size: 0.6875rem; color: var(--cinza); }
.metrica__meta b { font-weight: 600; color: var(--cor, var(--verde)); }

/* ===============================================================
   12. DASHBOARD — gráfico da semana
   =============================================================== */
.grafico { position: relative; }
.grafico svg { width: 100%; height: auto; display: block; }
.grafico__linha {
  fill: none;
  stroke: var(--azul);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.js .grafico__linha {
  stroke-dasharray: 1200;
  animation: tracar var(--dur-slow) var(--ease-out) both;
}
@keyframes tracar { from { stroke-dashoffset: 1200; } }
.grafico__grade { stroke: var(--surface-3); stroke-width: 1; stroke-dasharray: 3 5; }
.grafico__ponto { fill: var(--azul-claro); }
.grafico__dias {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-top: 0.5rem;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  color: var(--cinza);
  text-align: center;
  text-transform: uppercase;
}

/* ===============================================================
   13. DASHBOARD — resumo do dia
   =============================================================== */
.resumo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.875rem; }
.resumo__item { display: flex; align-items: center; gap: 0.625rem; }
.resumo__icone {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--borda-viva);
  color: var(--cor, var(--verde));
}
.resumo__valor { font-size: 1.0625rem; font-weight: 700; line-height: 1.1; }
.resumo__valor small { font-size: 0.6875rem; font-weight: 500; color: var(--cinza); }
.resumo__rotulo { font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cinza); }

/* ===============================================================
   14. DASHBOARD — card de insight (borda em gradiente azul → verde)
   =============================================================== */
.insight {
  position: relative;
  border-radius: var(--raio);
  padding: 1px;
  background: linear-gradient(120deg, var(--azul), var(--verde));
  margin-top: 0.875rem;
}
.insight__interno {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  border-radius: calc(var(--raio) - 1px);
  background: var(--superficie);
  padding: 1.125rem 1rem;
}
.insight__marca {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--borda-viva);
}
.insight h3 { font-size: 0.9375rem; color: var(--verde); }
.insight p { margin-top: 0.25rem; font-size: 0.875rem; color: var(--text-2); }

/* ===============================================================
   15. DASHBOARD — área do administrador
   =============================================================== */
.admin { margin-top: 1.75rem; }
.admin__cabecalho { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 0.875rem; }
.selo {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.625rem;
  border-radius: 999px;
  border: 1px solid var(--azul);
  color: var(--azul-claro);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.numeros { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.625rem; }
.numero {
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 1rem;
}
.numero b { display: block; font-size: 1.75rem; line-height: 1.1; }
.numero .rotulo { margin-top: 0.25rem; display: block; }

.tabela { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.tabela th {
  text-align: left;
  padding: 0 0 0.625rem;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cinza);
  font-weight: 600;
}
.tabela td { padding: 0.625rem 0; border-top: 1px solid var(--borda); vertical-align: middle; }
.tabela td:last-child, .tabela th:last-child { text-align: right; }
.rolagem { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ===============================================================
   16. DASHBOARD — navegação inferior
   =============================================================== */
.nav-inferior {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
  z-index: 30;
  max-width: 30rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 0.5rem 0.25rem;
  background: var(--surface-2);
  border: 1px solid var(--borda);
  border-radius: 1.375rem;
}
.nav-inferior a,
.nav-inferior button,
.nav-inferior span {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0;
  background: none;
  border: 0;
  color: var(--cinza);
  font-family: inherit;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.nav-inferior a:active, .nav-inferior button:active { transform: scale(0.94); }
.nav-inferior .ativo { color: var(--verde); }
.nav-inferior__acao {
  width: 3.25rem;
  height: 3.25rem;
  display: grid !important;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  background: var(--verde);
  color: var(--fundo);
  box-shadow: var(--glow-verde);
}

/* ===============================================================
   17. MENU DA CONTA (details/summary — sem JS)
   =============================================================== */
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }

.menu__painel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 40;
  width: min(17rem, calc(100vw - 2rem));
  padding: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--borda-viva);
  border-radius: var(--raio);
  box-shadow: var(--shadow-card);
  transform-origin: top left;
}
.js .menu[open] .menu__painel { animation: menu-abrir var(--dur-fast) var(--ease-out) both; }
@keyframes menu-abrir {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
}
.menu__nome { margin-top: 0.5rem; font-weight: 600; }
.menu__email { word-break: break-all; }
.menu__item {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.75rem 0.875rem;
  background: var(--surface-2);
  border: 1px solid var(--borda);
  border-radius: var(--raio-p);
  color: var(--branco);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.menu__item:hover { background: var(--surface-3); }
.menu__item--sair { color: var(--verde); }

/* Divisor de batimento no fim do conteúdo */
.ecg-divisor { margin: 2rem 0 0.5rem; opacity: 0.35; }
.ecg-divisor .ecg path { stroke-width: 1.6; }

/* Itens de navegação que entram numa próxima etapa */
.nav-inferior [aria-disabled="true"] { opacity: 0.45; cursor: default; }
.nav-inferior [aria-disabled="true"]:active { transform: none; }

/* ===============================================================
   18. RESPONSIVO
   =============================================================== */
@media (min-width: 30rem) {
  .metrica .rotulo { font-size: 0.625rem; }
  .anel__centro b { font-size: 1.375rem; }
}

@media (min-width: 48rem) {
  .app { padding: 0 1.5rem; }
  .saudacao { grid-template-columns: auto 1fr auto; padding: 1.75rem 0 1.25rem; }
  .saudacao h1 { font-size: 1.75rem; }
  .sequencia { grid-column: auto; }
  .metricas { gap: 1rem; }
  .metrica { padding: 1.25rem 1rem 1.375rem; }
  .resumo { grid-template-columns: repeat(4, 1fr); }
  .numeros { grid-template-columns: repeat(4, 1fr); }
  .painel { padding: 1.5rem; }
  .painel + .painel, .painel + .metricas, .metricas + .painel, .insight { margin-top: 1rem; }
}

@media (min-width: 64rem) {
  .colunas { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; align-items: start; }
  .colunas > * + * { margin-top: 0; }
}

/* Toque confortável: nada de hover grudado no celular */
@media (hover: none) {
  .mo-lift:hover { transform: none; box-shadow: none; }
}

/* ===============================================================
   19. FORMULÁRIOS DE APLICAÇÃO (perfil e painel do motor)
   Rótulo em cima do campo: numa tela de ajustes, o rótulo flutuante
   atrapalha — a pessoa precisa ver todos os nomes de uma vez.
   =============================================================== */
.form-app { display: block; }

/* Espaço uniforme entre os blocos. Antes isso dependia de .painel + .painel,
   e o primeiro bloco de dentro do <form> ficava colado no card acima. */
.form-app > .painel,
.painel--solto { margin-top: 0.875rem; }

.linha { margin-top: 0.75rem; }
.linha + .linha { margin-top: 1rem; }

/* Dentro de um grid, quem separa é o gap. Margem em item de grid empurra
   a caixa e desalinha a dupla — some com ela. */
.dupla > .linha,
.dupla > .linha + .linha { margin-top: 0; }

.linha > label,
.rotulo-campo {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--cinza);
}

.controle {
  width: 100%;
  height: 3.25rem;
  padding: 0.75rem 0.875rem;
  background: var(--surface-3);
  border: 1px solid var(--borda-viva);
  border-radius: var(--raio-p);
  color: var(--branco);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.controle:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: var(--glow-azul);
}
select.controle {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--cinza) 50%),
                    linear-gradient(135deg, var(--cinza) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}
textarea.controle { height: auto; min-height: 5.5rem; resize: vertical; line-height: 1.5; }
input[type="time"].controle,
input[type="number"].controle { color-scheme: dark; }

.dupla { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.linha--larga { grid-column: 1 / -1; }

/* Dias da semana */
.dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.25rem; }
.dia { position: relative; }
.dia input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.dia span {
  display: grid;
  place-items: center;
  height: 2.75rem;
  border: 1px solid var(--borda-viva);
  border-radius: var(--raio-p);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--cinza);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.dia input:checked + span {
  color: var(--fundo);
  background: var(--verde);
  border-color: var(--verde);
}
.dia input:focus-visible + span { outline: 2px solid var(--azul-claro); outline-offset: 2px; }

.oculto-visual {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ===============================================================
   20. PAINEL DO MOTOR
   =============================================================== */
.botoes { display: grid; gap: 0.5rem; }
.botoes .btn { width: 100%; min-height: 3rem; font-size: 0.9375rem; }

.divisor { margin: 1.25rem 0; border: 0; border-top: 1px solid var(--borda); }

.saida {
  margin: 0;
  padding: 0.875rem;
  background: var(--bg-fundo);
  border: 1px solid var(--borda);
  border-radius: var(--raio-p);
  color: var(--text-2);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 20rem;
  overflow: auto;
}

.marca-gatilho {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--borda-viva);
  font-size: 0.6875rem;
  color: var(--cinza);
  white-space: nowrap;
}

.barra-peso {
  display: block;
  width: 3.5rem;
  height: 4px;
  margin-bottom: 0.25rem;
  border-radius: 2px;
  background: var(--surface-3);
  overflow: hidden;
}
.barra-peso i {
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 1%);
  border-radius: 2px;
  background: linear-gradient(90deg, var(--azul), var(--verde));
}

.btn-mini {
  padding: 0.35rem 0.625rem;
  background: var(--surface-2);
  border: 1px solid var(--borda-viva);
  border-radius: 8px;
  color: var(--cinza);
  font-family: inherit;
  font-size: 0.6875rem;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.btn-mini:hover { color: var(--branco); border-color: var(--azul); }

/* Conversa (visualização do histórico no painel) */
.conversa { display: grid; gap: 0.625rem; }
.balao {
  max-width: 85%;
  padding: 0.625rem 0.875rem;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.45;
}
.balao p { margin: 0; }
.balao__pe { display: block; margin-top: 0.375rem; font-size: 0.625rem; color: var(--cinza); }
.balao--coach {
  justify-self: start;
  background: var(--superficie-alta);
  border: 1px solid var(--borda);
  border-bottom-left-radius: 4px;
}
.balao--pessoa {
  justify-self: end;
  background: rgb(86 225 198 / 0.12);
  border: 1px solid rgb(86 225 198 / 0.28);
  border-bottom-right-radius: 4px;
}

/* Card do próximo toque no dashboard */
.proximo {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-top: 0.875rem;
  padding: 1rem;
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-left: 3px solid var(--azul);
  border-radius: var(--raio);
}
.proximo__hora {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--azul-claro);
  line-height: 1;
  white-space: nowrap;
}

@media (min-width: 48rem) {
  .botoes { grid-template-columns: repeat(2, 1fr); }
  .dupla { gap: 1rem; }
}

/* ===============================================================
   21. TREINOS E EVOLUÇÃO — componentes de dado real
   =============================================================== */

/* Cabeçalho de página interna */
.hero {
  padding: 1.5rem 0 0.5rem;
}
.hero h1 {
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}
.hero p { margin-top: 0.375rem; color: var(--cinza); font-size: 0.9375rem; }

/* --- A semana, dia a dia --------------------------------------- */
.semana {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.375rem;
}
.dia-treino {
  display: grid;
  justify-items: center;
  gap: 0.375rem;
  padding: 0.625rem 0;
  border-radius: var(--raio-p);
  border: 1px solid transparent;
}
.dia-treino__sigla {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cinza);
}
.dia-treino__marca {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--borda-viva);
  color: var(--cinza);
  font-size: 0.75rem;
  font-weight: 600;
}
.dia-treino--feito .dia-treino__marca {
  background: var(--verde);
  border-color: var(--verde);
  color: var(--fundo);
  box-shadow: var(--glow-verde);
}
.dia-treino--perdido .dia-treino__marca {
  border-color: var(--erro);
  color: var(--erro);
}
.dia-treino--previsto .dia-treino__marca {
  border-color: var(--azul);
  border-style: dashed;
  color: var(--azul-claro);
}
.dia-treino--hoje {
  border-color: var(--borda-viva);
  background: var(--surface-2);
}
.dia-treino--hoje .dia-treino__sigla { color: var(--branco); }

/* Entrada em cascata: a semana se preenche da segunda ao domingo.
   O atraso conta a história — não é enfeite. */
.js .semana .dia-treino {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition: opacity 380ms var(--ease-out), transform 380ms var(--mo-spring);
  transition-delay: calc(var(--i, 0) * 55ms + 120ms);
}
.js.is-loaded .semana .dia-treino { opacity: 1; transform: none; }

/* --- Pontos do mês (constância) -------------------------------- */
.pontos {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 5px;
}
.ponto {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--surface-2);
}
.ponto--leve  { background: rgb(106 92 255 / 0.45); }
.ponto--forte { background: var(--verde); box-shadow: 0 0 8px rgb(86 225 198 / 0.4); }

.js .pontos .ponto {
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--mo-spring);
  transition-delay: calc(var(--i, 0) * 14ms + 160ms);
}
.js.is-loaded .pontos .ponto { opacity: 1; transform: none; }

.legenda {
  display: flex;
  gap: 1rem;
  margin-top: 0.875rem;
  font-size: 0.6875rem;
  color: var(--cinza);
}
.legenda span { display: inline-flex; align-items: center; gap: 0.375rem; }
.legenda i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* --- Número em destaque ---------------------------------------- */
.destaque {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.destaque__valor {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}
.destaque__unidade { font-size: 1rem; color: var(--cinza); font-weight: 500; }

.variacao {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--borda-viva);
}
.variacao--baixa { color: var(--verde); border-color: rgb(86 225 198 / 0.35); }
.variacao--alta  { color: var(--azul-claro); border-color: rgb(106 92 255 / 0.4); }

/* --- Lista de registros ---------------------------------------- */
.registros { display: grid; gap: 0.625rem; }
.registro {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  border: 1px solid var(--borda);
  border-radius: var(--raio-p);
  background: var(--surface-2);
}
.registro__icone {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--borda-viva);
  color: var(--cor, var(--verde));
  flex: none;
}
.registro__texto { font-size: 0.875rem; min-width: 0; }
.registro__data { font-size: 0.6875rem; color: var(--cinza); white-space: nowrap; }

/* --- Tela vazia ------------------------------------------------- */
.vazio {
  text-align: center;
  padding: 2.5rem 1.25rem;
}
.vazio__marca {
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 1px solid var(--borda-viva);
  background: var(--surface-3);
}
.vazio h2 { font-size: 1.125rem; }
.vazio p {
  margin-top: 0.5rem;
  color: var(--cinza);
  font-size: 0.9375rem;
  max-width: 26rem;
  margin-inline: auto;
}
.vazio .btn { margin-top: 1.25rem; }

/* Respiro do pulso no vazio: mostra que o sistema está vivo, esperando. */
.js .vazio__marca svg { animation: respira 3.5s var(--mo-inout) infinite; }
@keyframes respira {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.07); opacity: 1; }
}

/* --- Barras de comparação -------------------------------------- */
.barras { display: grid; gap: 0.75rem; }
.barra-item { display: grid; gap: 0.375rem; }
.barra-item__topo {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
}
.barra-item__trilha {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}
.barra-item__valor {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--azul), var(--verde));
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}
.js .barra-item__valor {
  transform: scaleX(0);
  transition: transform 560ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms + 200ms);
}
.js.is-loaded .barra-item__valor { transform: scaleX(var(--p, 0)); }

@media (min-width: 48rem) {
  .hero { padding: 2rem 0 0.75rem; }
  .hero h1 { font-size: 2.125rem; }
  .destaque__valor { font-size: 3.75rem; }
  .pontos { gap: 7px; }
}

/* ===============================================================
   22. MOVIMENTO REDUZIDO — obrigatório
   O motion.css cobre [data-reveal] e [data-load]. Os componentes das
   telas de treino e evolução escondem por conta própria, então
   precisam ser liberados aqui: quem pede menos movimento continua
   vendo TODO o conteúdo, só sem o deslocamento.
   =============================================================== */
@media (prefers-reduced-motion: reduce) {
  .js .semana .dia-treino,
  .js.is-loaded .semana .dia-treino,
  .js .pontos .ponto,
  .js.is-loaded .pontos .ponto {
    opacity: 1;
    transform: none;
    transition-delay: 0ms;
  }
  .js .barra-item__valor,
  .js.is-loaded .barra-item__valor {
    transform: scaleX(var(--p, 0));
    transition-delay: 0ms;
  }
  .js .vazio__marca svg { animation: none; }
  .js .anel__valor { animation: none; }
  .js .ecg--vivo path { animation: none; stroke-dasharray: none; }
}

/* ===============================================================
   23. ASSISTENTE DE PERFIL — uma pergunta por vez
   Sem JS, todos os passos ficam empilhados e o formulário funciona
   igual. O JS só decide qual está na tela.
   =============================================================== */
.assistente { display: block; }

/* Progresso */
.progresso { margin: 1rem 0 0.75rem; }
.progresso__trilha {
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
  overflow: hidden;
}
.progresso__valor {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--azul), var(--verde));
  transform-origin: left;
  transform: scaleX(var(--p, 0.125));
  transition: transform 420ms var(--ease-out);
}
.progresso__texto {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cinza);
}

/* O passo */
.passo { margin-top: 0.875rem; }
.passo__icone {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.875rem;
  border-radius: 14px;
  border: 1px solid rgb(86 225 198 / 0.3);
  background: rgb(86 225 198 / 0.07);
  color: var(--verde);
}
.passo__titulo { font-size: 1.375rem; letter-spacing: -0.02em; }
.passo__ajuda { margin-top: 0.375rem; color: var(--cinza); font-size: 0.875rem; line-height: 1.5; }
.passo .linha:first-of-type { margin-top: 1.25rem; }
.passo > .linha:first-of-type { margin-top: 1.25rem; }

/* Entrada e saída: só transform e opacity, nada de layout */
.js .assistente[data-pronto] .passo { display: none; }
.js .assistente[data-pronto] .passo.esta-ativo { display: block; }

.js .passo.entrando-direita { animation: passo-entra-direita 280ms var(--ease-out) both; }
.js .passo.entrando-esquerda { animation: passo-entra-esquerda 280ms var(--ease-out) both; }
.js .passo.saindo-esquerda   { animation: passo-sai-esquerda 160ms var(--mo-in) both; }
.js .passo.saindo-direita    { animation: passo-sai-direita 160ms var(--mo-in) both; }

@keyframes passo-entra-direita {
  from { opacity: 0; transform: translate3d(28px, 0, 0) scale(0.98); }
}
@keyframes passo-entra-esquerda {
  from { opacity: 0; transform: translate3d(-28px, 0, 0) scale(0.98); }
}
@keyframes passo-sai-esquerda {
  to { opacity: 0; transform: translate3d(-24px, 0, 0) scale(0.98); }
}
@keyframes passo-sai-direita {
  to { opacity: 0; transform: translate3d(24px, 0, 0) scale(0.98); }
}

/* O atributo hidden precisa vencer o display do componente.
   Sem isso, .btn { display: inline-flex } ignorava o hidden e os botões
   Continuar e Salvar apareciam ao mesmo tempo. */
[hidden] { display: none !important; }

/* Rodapé de comandos */
.assistente__pe {
  display: flex;
  gap: 0.625rem;
  margin-top: 1rem;
  align-items: stretch;
}
.assistente__pe .btn { min-height: 3.375rem; }
.assistente__pe .btn--secundario { flex: 0 0 6.5rem; }

/* Cartões de escolha */
.opcoes { display: grid; gap: 0.625rem; margin-top: 1.25rem; }
.opcoes--linha { grid-template-columns: repeat(2, 1fr); }

.opcao {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem;
  border: 1px solid var(--borda-viva);
  border-radius: var(--raio-p);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 200ms var(--ease-out), background 200ms var(--ease-out),
              transform 200ms var(--ease-out);
}
.opcao:active { transform: scale(0.985); }
.opcao input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.opcao__icone {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--borda);
  color: var(--cinza);
  transition: color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.opcao__texto { display: grid; gap: 0.125rem; min-width: 0; }
.opcao__texto strong { font-size: 0.9375rem; font-weight: 600; }
.opcao__texto small { font-size: 0.75rem; color: var(--cinza); line-height: 1.35; }
.opcao__marca {
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--borda-viva);
  color: transparent;
  transition: background 200ms var(--ease-out), border-color 200ms var(--ease-out), color 200ms var(--ease-out);
}

.opcao:has(input:checked) {
  border-color: var(--verde);
  background: rgb(86 225 198 / 0.07);
}
.opcao:has(input:checked) .opcao__icone { color: var(--verde); border-color: rgb(86 225 198 / 0.4); }
.opcao:has(input:checked) .opcao__marca {
  background: var(--verde);
  border-color: var(--verde);
  color: var(--fundo);
}
.opcao:has(input:focus-visible) { outline: 2px solid var(--azul-claro); outline-offset: 2px; }

/* Opção curta: pílula, sem ícone grande */
.opcao--curta {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding: 0.75rem 0.5rem;
}
.opcao--curta .opcao__texto { justify-items: center; }
.opcao--curta .opcao__texto strong { font-size: 0.875rem; }

/* Foto */
.foto-campo { margin-top: 1.5rem; display: grid; gap: 0.75rem; justify-items: center; }
.foto-alvo {
  position: relative;
  width: 9.5rem;
  height: 9.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px dashed rgb(86 225 198 / 0.35);
  background: var(--superficie);
  cursor: pointer;
  overflow: visible;
  transition: border-color 240ms var(--ease-out), transform 240ms var(--mo-spring);
}
.foto-alvo:hover, .foto-alvo:focus-within { border-color: var(--verde); }
.foto-alvo:active { transform: scale(0.97); }
.foto-alvo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.foto-alvo__vazio {
  font-size: 2rem;
  font-weight: 700;
  color: var(--verde);
  letter-spacing: 0.02em;
}
.foto-alvo__botao {
  position: absolute;
  right: 0.25rem;
  bottom: 0.25rem;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--verde);
  color: var(--fundo);
  box-shadow: var(--glow-verde);
}
.foto-alvo--cheia { border-style: solid; border-color: var(--verde); box-shadow: var(--glow-verde); }

/* Avatar com foto (dashboard e topo) */
.avatar--foto { padding: 0; overflow: hidden; }
.avatar--foto img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* Rótulo com ícone dentro */
.linha > label svg, .rotulo-campo svg { vertical-align: -3px; margin-right: 0.25rem; opacity: 0.7; }

@media (min-width: 30rem) {
  .opcoes--linha { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .js .passo.entrando-direita,
  .js .passo.entrando-esquerda,
  .js .passo.saindo-esquerda,
  .js .passo.saindo-direita { animation: none; }
}

/* ===============================================================
   24. DIÁRIO DO SISTEMA (painel do motor)
   Linha compacta e monoespaçada: o objetivo é varrer com o olho e
   achar o erro, não ler bonito.
   =============================================================== */
.filtros { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.5rem; }
.btn-mini--ativo { color: var(--fundo); background: var(--verde); border-color: var(--verde); }

.diario {
  margin-top: 1rem;
  border: 1px solid var(--borda);
  border-radius: var(--raio-p);
  overflow: hidden;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.6875rem;
}
.diario__linha {
  display: grid;
  grid-template-columns: 4.5rem 4.5rem 1fr;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--surface-2);
  align-items: start;
}
.diario__linha:last-child { border-bottom: 0; }
.diario__hora { color: var(--cinza); }
.diario__onde { color: var(--azul-claro); text-transform: uppercase; letter-spacing: 0.04em; }
.diario__texto { color: var(--text-2); word-break: break-word; line-height: 1.5; }
.diario__texto small { display: block; margin-top: 0.25rem; color: var(--cinza); opacity: 0.85; }

.diario__linha--erro  { border-left-color: var(--erro); background: var(--alerta-soft); }
.diario__linha--aviso { border-left-color: var(--atencao); }
.diario__linha--info  { border-left-color: rgb(106 92 255 / 0.5); }
.diario__linha--debug { opacity: 0.65; }

@media (max-width: 30rem) {
  .diario__linha { grid-template-columns: 3.75rem 1fr; }
  .diario__onde { grid-column: 2; }
  .diario__texto { grid-column: 2; }
}

/* Paginação das listas do painel */
.paginacao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 0.875rem;
}
.paginacao__pagina { font-size: 0.6875rem; color: var(--cinza); }
.btn-mini--morto { opacity: 0.35; cursor: default; }

/* ===============================================================
   25. TELA DE PRIMEIRO CONTATO (/comecar)
   Uma tela, um objetivo: abrir a conversa. Tudo aqui empurra para
   o mesmo botão.
   =============================================================== */
.comeco { text-align: center; }

.comeco__selo {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgb(86 225 198 / 0.35);
  background: rgb(86 225 198 / 0.08);
  color: var(--verde);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.comeco__selo::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--verde);
  box-shadow: 0 0 8px var(--verde);
}

.comeco .cartao__sub { max-width: 22rem; margin-inline: auto; }

/* O botão é o herói da tela: respira mais que os outros. */
.comeco__botao {
  margin-top: 1.5rem;
  min-height: 3.75rem;
  font-size: 1.0625rem;
}
.js .comeco__botao { animation: chama-atencao 2.8s var(--mo-inout) 1.2s 2; }
@keyframes chama-atencao {
  0%, 100% { transform: none; }
  50%      { transform: scale(1.025); }
}

.comeco__numero {
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  color: var(--cinza);
  line-height: 1.5;
}
.comeco__numero strong { color: var(--branco); font-size: 1rem; letter-spacing: 0.02em; }

.comeco__lista {
  margin: 1.75rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--borda);
  list-style: none;
  display: grid;
  gap: 0.875rem;
  text-align: left;
}
.comeco__lista li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-2);
}
.comeco__icone {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--borda-viva);
  color: var(--verde);
}

@media (prefers-reduced-motion: reduce) {
  .js .comeco__botao { animation: none; }
}

/* ===============================================================
   26. COMUNIDADE — stories, feed e visor
   =============================================================== */
.app--feed { max-width: 34rem; padding-bottom: calc(7rem + env(safe-area-inset-bottom)); }

/* --- Barra de stories ------------------------------------------ */
.stories {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 0.25rem 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.stories::-webkit-scrollbar { display: none; }

.story {
  flex: none;
  display: grid;
  justify-items: center;
  gap: 0.375rem;
  width: 4.5rem;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  scroll-snap-align: start;
  text-decoration: none;
}
.story__anel {
  position: relative;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, var(--azul), var(--verde));
  transition: transform 200ms var(--mo-spring);
}
.story:active .story__anel { transform: scale(0.94); }
.story__anel--novo { background: none; border: 2px dashed rgb(86 225 198 / 0.4); padding: 2px; }

.story__foto {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--fundo);
  background: var(--superficie);
  color: var(--verde);
  font-size: 0.875rem;
  font-weight: 700;
  overflow: hidden;
}
.story__foto img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.story__mais {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 1.375rem;
  height: 1.375rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--verde);
  color: var(--fundo);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1;
  border: 2px solid var(--fundo);
}
.story__nome {
  font-size: 0.625rem;
  color: var(--cinza);
  max-width: 4.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Post ------------------------------------------------------ */
.feed { display: grid; gap: 1.25rem; }

.post {
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-radius: var(--raio-g);
  overflow: hidden;
}
.post__topo {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 0.875rem;
}
.avatar-mini {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--verde);
  background: var(--fundo);
  color: var(--verde);
  font-size: 0.6875rem;
  font-weight: 700;
  overflow: hidden;
  flex: none;
}
.avatar-mini img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.post__quem { display: grid; line-height: 1.25; min-width: 0; }
.post__quem strong { font-size: 0.875rem; font-weight: 600; }
.post__quem small { font-size: 0.6875rem; color: var(--cinza); }
.post__menu, .post__denuncia { display: flex; }

.post__imagem {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / var(--proporcao, 1);
  background: var(--bg-fundo);
  overflow: hidden;
}
.post__imagem img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post__acoes { display: flex; align-items: center; gap: 0.25rem; padding: 0.625rem 0.5rem 0.25rem; }
.post__botao {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.625rem;
  background: none;
  border: 0;
  border-radius: 10px;
  color: var(--branco);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--mo-spring);
}
.post__botao:active { transform: scale(0.92); }
.post__botao.esta-curtido { color: var(--verde); }
.js .post__botao.esta-curtido svg { animation: curtida 420ms var(--mo-spring); }
@keyframes curtida {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.post__botao--discreto { color: var(--cinza); margin-left: auto; }
.post__botao--discreto:hover { color: var(--erro); }

.post__legenda {
  padding: 0 0.875rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-2);
}
.post__legenda strong { color: var(--branco); font-weight: 600; margin-right: 0.25rem; }

/* --- Fim do feed ----------------------------------------------- */
.feed__fim { display: grid; place-items: center; padding: 1.5rem 0; }
.feed__carregando { font-size: 0.8125rem; color: var(--cinza); }
.feed__acabou { text-align: center; padding: 2rem 1rem; color: var(--cinza); font-size: 0.8125rem; }

/* --- Visualizador de stories ----------------------------------- */
.visor {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
}
.visor[hidden] { display: none; }

.visor__barras {
  position: absolute;
  top: calc(0.75rem + env(safe-area-inset-top));
  left: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  display: flex;
  gap: 4px;
}
.visor__barra {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.28);
  overflow: hidden;
}
.visor__barra i {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: 2px;
}
.visor__barra--vista i { width: 100%; }
.js .visor__barra--correndo i { animation: story-correr 5s linear forwards; }
@keyframes story-correr { to { width: 100%; } }

.visor__topo {
  position: absolute;
  top: calc(1.75rem + env(safe-area-inset-top));
  left: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.visor__quem { font-size: 0.875rem; font-weight: 600; }

.visor__imagem {
  grid-row: 2;
  width: 100%;
  max-height: 100dvh;
  object-fit: contain;
}
.visor__legenda {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(2rem + env(safe-area-inset-bottom));
  z-index: 3;
  padding: 0 1.25rem;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.45;
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.8);
}

.visor__lado {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  z-index: 2;
  background: none;
  border: 0;
  cursor: pointer;
}
.visor__lado--esq { left: 0; }
.visor__lado--dir { right: 0; width: 65%; }

/* Comunidade ativa no botão central */
.nav-inferior__acao.esta-ativo { box-shadow: 0 0 0 3px rgb(86 225 198 / 0.25), var(--glow-verde); }

/* --- Publicar --------------------------------------------------- */
.publicar-alvo-caixa { margin-bottom: 1rem; }
.publicar-alvo {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  max-height: 22rem;
  border: 2px dashed rgb(86 225 198 / 0.35);
  border-radius: var(--raio);
  background: var(--surface-3);
  color: var(--cinza);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 220ms var(--ease-out);
}
.publicar-alvo:hover, .publicar-alvo:focus-within { border-color: var(--verde); }
.publicar-alvo img { width: 100%; height: 100%; object-fit: cover; }
.publicar-alvo__vazio {
  display: grid;
  justify-items: center;
  gap: 0.625rem;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
  .js .visor__barra--correndo i { animation: none; width: 100%; }
  .js .post__botao.esta-curtido svg { animation: none; }
}

/* Miniatura na moderação do painel */
.moderacao__miniatura {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
}
.publicar-alvo--cheia { border-style: solid; border-color: var(--verde); }

/* ===============================================================
   27. CAMADA AYRA — componentes conforme o AYRA-GUIA-VISUAL.md
   Vem por último de propósito: refina as seções acima sem
   reescrevê-las, para o HTML existente continuar valendo.
   =============================================================== */

/* ---------- 27.1 Marca (guia §2) ---------- */
.marca { gap: 0.75rem; }
.marca__nome {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-indent: 0.28em;          /* compensa o tracking do último caractere */
  text-transform: uppercase;
  color: var(--text-1);
  line-height: 1;
}
.marca__nome span { color: var(--text-1); }   /* wordmark nunca é bicolor */
.marca__assinatura {
  margin-top: 0.5rem;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-3);
}
/* Título de tela interna reaproveita .marca__nome sem virar wordmark */
.topo__centro .marca__nome {
  font-size: 15px;
  letter-spacing: 0.02em;
  text-indent: 0;
  text-transform: none;
}
.topo__centro .marca__assinatura { margin-top: 0.25rem; }
/* No topo do app o nome é a marca, não um título de tela: mantém o tracking. */
.topo__centro .ayra-wordmark {
  font-size: 18px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
}

/* O batimento (ECG) era assinatura do Coach IA. Na AYRA vira hairline. */
.ecg-divisor {
  margin: var(--sp-8) 0 var(--sp-2);
  border-top: 1px solid var(--border);
  opacity: 1;
}
.ecg-divisor .ecg,
.auth__ecg { display: none; }

/* ---------- 27.2 Fundos (guia §3.3) ---------- */
.tela-auth { background: var(--grad-noite); }
[data-theme="white"] .tela-auth {
  background:
    radial-gradient(120% 80% at 50% -10%, var(--aura-soft), transparent 60%),
    var(--bg);
}
.tela-auth::before {
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.6;
}

.tela-app {
  background: var(--bg);
  padding-bottom: calc(6.25rem + env(safe-area-inset-bottom));
}

/* ---------- 27.3 Cards e painéis (guia §7 e §8.1) ---------- */
.painel,
.numero,
.metrica {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: none;
}
.painel { padding: var(--sp-5); }
.painel__topo { margin-bottom: var(--sp-4); }
.painel__topo h2,
.painel__topo h3 { font-size: 17px; font-weight: 700; color: var(--text-1); }
.painel__topo .rotulo { color: var(--text-3); }
.painel__link {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--aura);
}
.cartao {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-5);
  box-shadow: var(--shadow-card);
}
.cartao__titulo { font-size: 22px; letter-spacing: -0.01em; }
.cartao__sub { margin-top: var(--sp-2); color: var(--text-3); font-size: 14px; }

/* Card clicável sobe 2px (guia §11) */
.mo-lift:hover,
.mo-lift:focus-visible {
  transform: translate3d(0, -2px, 0);
  box-shadow: none;
  border-color: var(--border-strong);
}

/* ---------- 27.4 Formulário ---------- */
.campo input,
.form-app input,
.form-app select,
.form-app textarea {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-1);
  font-weight: 500;
}
.campo input:focus,
.form-app input:focus,
.form-app select:focus,
.form-app textarea:focus {
  outline: none;
  border-color: var(--aura);
  box-shadow: 0 0 0 3px var(--aura-soft);
}
.campo input:focus + label { color: var(--aura); }
.campo--erro input { border-color: var(--alerta-cor); }
.campo input:-webkit-autofill {
  -webkit-text-fill-color: var(--text-1);
  -webkit-box-shadow: 0 0 0 1000px var(--surface-3) inset;
}
.forca[data-nivel="1"] i:nth-child(-n+1) { background: var(--alerta-cor); }
.forca[data-nivel="2"] i:nth-child(-n+2) { background: var(--ambar); }
.forca[data-nivel="3"] i:nth-child(-n+3) { background: var(--ceu); }
.forca[data-nivel="4"] i                 { background: var(--vida); }
.aceite input { accent-color: var(--aura); }

/* ---------- 27.5 Botões (guia §8.3 e §8.4) ---------- */
.btn {
  min-height: 3.25rem;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}
/* Gradiente Aura: o elemento assinatura. UM por tela. */
.btn--principal {
  background: var(--grad-aura);
  color: var(--sobre-aura);
  border-color: transparent;
  box-shadow: none;
}
.btn--principal:hover {
  background: var(--grad-aura);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgb(106 92 255 / 0.35);
}
.btn--principal:active { transform: translateY(0); }
.btn--secundario {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-1);
}
.btn--secundario:hover { background: var(--surface-3); }
.btn[disabled] { opacity: 0.5; }
.link-forte { color: var(--aura); font-weight: 700; }

.btn-mini {
  border-radius: var(--r-pill);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.btn-mini--ativo { background: var(--aura-soft); color: var(--aura-claro); border-color: transparent; }
[data-theme="white"] .btn-mini--ativo { color: var(--aura); }

/* ---------- 27.6 Alertas ---------- */
.alerta {
  border-radius: var(--r-sm);
  border-left-width: 3px;
  font-size: 13px;
}
.alerta--erro    { background: var(--alerta-soft); border-left-color: var(--alerta-cor); color: var(--text-2); }
.alerta--sucesso { background: var(--vida-soft);   border-left-color: var(--vida-text); color: var(--text-2); }
.alerta--aviso   { background: var(--aura-soft);   border-left-color: var(--aura);      color: var(--text-2); }
.alerta--erro svg    { color: var(--alerta-cor); }
.alerta--sucesso svg { color: var(--vida-text); }
.alerta--aviso svg   { color: var(--aura); }

/* ---------- 27.7 Barra superior ---------- */
.topo {
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
}
.icone-btn { border-radius: var(--r-sm); color: var(--text-2); }
.icone-btn:hover { background: var(--surface-3); color: var(--text-1); }
.icone-btn__ponto { background: var(--aura); box-shadow: none; }

/* Alternador de tema Black / White (guia §12) */
.tema {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
}
.tema:hover { background: var(--surface-3); color: var(--text-1); }
.tema svg { transition: transform var(--dur-base) var(--ease-out); }
.tema:active svg { transform: rotate(-25deg); }
.tema .tema__lua  { display: none; }
.tema .tema__sol  { display: block; }
[data-theme="white"] .tema .tema__lua { display: block; }
[data-theme="white"] .tema .tema__sol { display: none; }

/* ---------- 27.8 Saudação ---------- */
.saudacao { padding: var(--sp-6) 0 var(--sp-5); }
.saudacao h1 { font-size: 28px; letter-spacing: -0.02em; }
.saudacao p { color: var(--text-3); font-size: 13.5px; }
.avatar {
  border: 1px solid var(--border-strong);
  background: var(--aura-soft);
  color: var(--aura-claro);
  box-shadow: none;
  font-weight: 700;
}
[data-theme="white"] .avatar { color: var(--aura); }
.avatar--foto { border-color: var(--border-strong); }

.sequencia {
  background: var(--surface-1);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
}
.sequencia strong { font-size: 26px; color: var(--vida-text); letter-spacing: -0.01em; }
.sequencia__chama {
  border: 1px solid var(--border);
  background: var(--vida-soft);
  color: var(--vida-text);
}

/* ---------- 27.9 Métricas e anéis (guia §8.2 e §8.9) ---------- */
.metricas { gap: var(--sp-3); }
.metrica { padding: var(--sp-4) var(--sp-3) var(--sp-5); }
.metrica .rotulo {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--text-3);
  margin-bottom: var(--sp-3);
}
.anel__trilha { stroke: var(--surface-3); stroke-width: 6; }
.anel__valor  { stroke: var(--cor, var(--aura)); stroke-width: 6; }
.anel__centro b {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.anel__centro span { font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.metrica__meta { margin-top: var(--sp-3); font-size: 11.5px; color: var(--text-3); }
.metrica__meta b { color: var(--cor, var(--aura)); font-weight: 700; }
.js .anel__valor { animation: anel-encher var(--dur-slow) var(--ease-out) both; }

/* ---------- 27.10 Gráfico (guia §9) ---------- */
.grafico__linha { stroke: var(--aura); stroke-width: 2; }
.grafico__ponto { fill: var(--aura); }
.grafico__grade { stroke: var(--border); stroke-dasharray: 0; }
.grafico__dias {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-3);
}

/* ---------- 27.11 Insight (guia §8.8) ---------- */
.insight {
  background: var(--surface-2);
  border: 1px solid var(--aura);
  border-radius: var(--r-sm);
  padding: 0;
}
.insight__interno {
  background: transparent;
  border-radius: inherit;
  padding: var(--sp-4);
}
.insight__marca {
  background: var(--aura-soft);
  border: 0;
}
.insight h3 { font-size: 13px; font-weight: 700; color: var(--aura-claro); }
[data-theme="white"] .insight h3 { color: var(--aura); }
.insight p { font-size: 12.5px; line-height: 1.5; color: var(--text-2); }

/* ---------- 27.12 Badges (guia §8.5) ---------- */
.selo {
  padding: 6px 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--aura-soft);
  color: var(--aura-claro);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}
[data-theme="white"] .selo { color: var(--aura); }
.numero b { font-size: 30px; letter-spacing: -0.01em; color: var(--text-1); }

.tabela th { font-size: 10.5px; letter-spacing: 0.14em; font-weight: 700; }
.tabela td { border-top-color: var(--border); }

/* ---------- 27.13 Item destacado / próximo toque ---------- */
.proximo {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--aura);
  border-radius: var(--r-md);
}
.proximo__hora { color: var(--aura); font-weight: 700; }

/* ---------- 27.14 Menu da conta ---------- */
.menu__painel {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}
.menu__item {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-1);
  font-weight: 500;
}
.menu__item:hover { background: var(--surface-3); }
.menu__item--sair { color: var(--alerta-cor); }

/* ---------- 27.15 Navegação: barra no mobile, sidebar no desktop ---------- */
.nav-inferior {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: var(--sp-2) var(--sp-1);
}
.nav-inferior a,
.nav-inferior button,
.nav-inferior span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-3);
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-inferior .ativo { color: var(--aura); }
.nav-inferior .ativo svg { color: var(--aura); }
.nav-inferior__acao {
  background: var(--grad-aura);
  color: var(--sobre-aura);
  box-shadow: none;
}
.nav-inferior__acao.esta-ativo { box-shadow: 0 0 0 3px var(--aura-soft); }
.nav-inferior__acao span { display: none; }
.nav-inferior__marca { display: none !important; }

@media (min-width: 64rem) {
  /* Sidebar de 232px, item ativo com fundo aura-soft e barra à esquerda */
  .tela-app { padding-left: var(--lateral); padding-bottom: var(--sp-10); }

  .nav-inferior {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--lateral);
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-1);
    padding: var(--sp-5) var(--sp-3);
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    overflow-y: auto;
  }
  .nav-inferior__marca {
    display: flex !important;
    align-items: center;
    gap: 0.625rem;
    padding: 0 var(--sp-3) var(--sp-6);
    color: var(--text-1);
  }
  .nav-inferior__marca b {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-indent: 0.28em;
    text-transform: uppercase;
    color: var(--text-1);
  }
  .nav-inferior a,
  .nav-inferior button {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
  }
  .nav-inferior a:hover { background: var(--surface-2); color: var(--text-1); }
  .nav-inferior .ativo {
    background: var(--aura-soft);
    color: var(--text-1);
  }
  .nav-inferior .ativo::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    border-radius: var(--r-pill);
    background: var(--aura);
  }
  .nav-inferior a:active,
  .nav-inferior button:active { transform: none; }

  .nav-inferior__acao {
    width: auto;
    height: auto;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--text-3);
  }
  .nav-inferior__acao span {
    display: inline;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
  }
  .nav-inferior__acao.esta-ativo {
    background: var(--aura-soft);
    color: var(--text-1);
    box-shadow: none;
  }
  .nav-inferior__acao.esta-ativo::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    border-radius: var(--r-pill);
    background: var(--aura);
  }

  .topo { padding-left: var(--sp-6); padding-right: var(--sp-6); }
  .app  { padding: 0 var(--sp-6); }
}

/* ---------- 27.16 Comunidade, treinos e perfil: acabamento ---------- */
.story__anel { background: var(--grad-aura); }
.story__anel--novo { border-color: var(--aura); }
.dia-treino--feito    { border-color: var(--vida); color: var(--vida-text); }
.dia-treino--hoje     { border-color: var(--aura); }
.dia-treino--perdido  { border-color: var(--border-strong); color: var(--text-3); }
.barra-item__valor    { background: var(--cor, var(--aura)); }
.ponto--leve  { background: var(--aura-soft); }
.ponto--forte { background: var(--aura); box-shadow: none; }
.variacao--baixa { color: var(--vida-text); border-color: var(--vida-soft); }
.variacao--alta  { color: var(--aura); border-color: var(--aura-soft); }
.opcao:has(input:checked) .opcao__icone { color: var(--aura); border-color: var(--aura); }
.progresso__valor { background: var(--grad-aura); }
.destaque__valor  { color: var(--text-1); font-weight: 700; letter-spacing: -0.01em; }

/* ---------- 27.18 Botão de tema nas telas de acesso ---------- */
.auth__tema { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2; }
.auth__marca .marca__simbolo { filter: none; }

/* ---------- 27.19 Índice de Execução — componentes do dashboard ---------- */

/* Barra "Pergunte à AYRA" */
.ayra-pergunte{
  display:flex;align-items:center;gap:.75rem;
  margin:0 0 var(--sp-5);padding:12px 12px 12px 16px;
  background:var(--surface-1);border:1px solid var(--border);
  border-radius:var(--r-md);color:var(--text-3);
  font:500 13.5px/1 'Satoshi',sans-serif;
}
.ayra-pergunte span:first-of-type{flex:1}
.ayra-pergunte:hover{border-color:var(--border-strong)}
.ayra-pergunte__seta{
  width:34px;height:34px;flex:none;display:grid;place-items:center;
  border-radius:var(--r-xs);background:var(--grad-aura);color:var(--sobre-aura);
}

/* Faixa de KPIs: rolagem lateral no mobile, grade no desktop */
.kpis{
  display:grid;grid-auto-flow:column;grid-auto-columns:minmax(9.5rem,1fr);
  gap:var(--sp-3);overflow-x:auto;scroll-snap-type:x mandatory;
  padding-bottom:var(--sp-2);margin-bottom:var(--sp-4);
  -webkit-overflow-scrolling:touch;scrollbar-width:none;
}
.kpis::-webkit-scrollbar{display:none}
.ayra-kpi{
  position:relative;scroll-snap-align:start;
  background:var(--surface-1);border:1px solid var(--border);
  border-radius:var(--r-md);padding:var(--sp-4);
  display:flex;flex-direction:column;gap:var(--sp-2);min-width:0;
}
.ayra-kpi__topo{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2)}
.ayra-kpi__label{font:500 13px/1 'Satoshi',sans-serif;color:var(--text-3)}
.ayra-kpi__valor{
  font:700 30px/1 'Satoshi',sans-serif;color:var(--text-1);letter-spacing:-.01em;
}
.ayra-kpi__valor small{font-size:16px;font-weight:700;color:var(--text-3)}
.ayra-kpi__nota{font:500 11.5px/1.3 'Satoshi',sans-serif;color:var(--text-3)}
.ayra-kpi__barra{
  height:5px;border-radius:var(--r-pill);background:var(--surface-3);overflow:hidden;
}
.ayra-kpi__barra i{
  display:block;height:100%;border-radius:inherit;
  transition:width var(--dur-slow) var(--ease-out);
}
/* O card do score é o destaque: ocupa duas colunas e leva a linha de tendência */
.ayra-kpi--score{grid-row:span 1}
.ayra-kpi--score .ayra-kpi__valor{font-size:42px}
.ayra-kpi__linha{width:100%;height:38px;margin-top:auto;display:block}

/* Card "Próxima ação sugerida" */
.ayra-card__titulo{font:700 17px/1.3 'Satoshi',sans-serif;color:var(--text-1)}
.ayra-acao__corpo{display:flex;gap:var(--sp-4);align-items:flex-start;margin-bottom:var(--sp-4)}
.ayra-acao__icone{
  flex:none;width:48px;height:48px;display:grid;place-items:center;
  border-radius:50%;background:var(--aura-soft);
}
.ayra-acao__corpo strong{display:block;font-size:15px;color:var(--text-1);margin-bottom:2px}
.ayra-acao__corpo p{margin-top:2px}

/* Lista de hábitos com barrinha */
.ayra-habito{display:flex;align-items:center;gap:var(--sp-3);padding:10px 0}
.ayra-habito__label{font:500 13px/1.3 'Satoshi',sans-serif;color:var(--text-2);flex:1;min-width:5rem}
.ayra-habito__bar{
  flex:1;max-width:110px;height:5px;border-radius:var(--r-pill);
  background:var(--surface-3);overflow:hidden;
}
.ayra-habito__bar i{
  display:block;height:100%;border-radius:inherit;
  transition:width var(--dur-slow) var(--ease-out);
}
.ayra-habito__valor{font:500 12px/1 'Satoshi',sans-serif;color:var(--text-3);white-space:nowrap}
.ayra-habito__check{
  width:20px;height:20px;flex:none;border-radius:50%;display:grid;place-items:center;
  font-size:11px;border:1.5px solid var(--border-strong);color:transparent;
}
.ayra-habito__check--ok{background:var(--verde-ok);border-color:var(--verde-ok);color:#0B0D14}

/* Cards de insight */
.ayra-insight{
  background:var(--surface-2);border:1px solid var(--aura);
  border-radius:var(--r-sm);padding:var(--sp-4);margin-bottom:var(--sp-3);
}
.ayra-insight--positivo{border-color:var(--verde-ok)}
.ayra-insight--atencao{border-color:var(--ambar)}
.ayra-insight__titulo{
  display:block;font:700 13px/1 'Satoshi',sans-serif;
  color:var(--aura-claro);margin-bottom:6px;
}
[data-theme="white"] .ayra-insight__titulo{color:var(--aura)}
.ayra-insight--positivo .ayra-insight__titulo{color:var(--verde-ok)}
.ayra-insight--atencao .ayra-insight__titulo{color:var(--ambar)}
.ayra-insight p{font:400 12.5px/1.5 'Satoshi',sans-serif;color:var(--text-2);margin:0}

/* Aviso objetivo (ex: refeição sem caloria contou zero) */
.ayra-aviso{
  margin-top:var(--sp-3);padding:10px 12px;
  background:var(--ambar-soft);border-radius:var(--r-xs);
  font:500 12.5px/1.45 'Satoshi',sans-serif;color:var(--text-2);
}

/* Badges de estado */
.selo--peso{background:var(--surface-3);color:var(--text-3)}
.selo--off{background:var(--surface-3);color:var(--text-3)}
.selo--vivo{background:var(--vida-soft);color:var(--vida-text)}

/* Linha de suplemento / medicamento na tela de metas */
.ayra-item{
  display:flex;align-items:center;gap:var(--sp-3);
  padding:10px 0;border-bottom:1px solid var(--border);
}
.ayra-item:last-of-type{border-bottom:0}
.ayra-item__nome{flex:1;font:500 13.5px/1.3 'Satoshi',sans-serif;color:var(--text-1)}
.ayra-item__hora{font:500 12px/1 'Satoshi',sans-serif;color:var(--text-3);white-space:nowrap}
.ayra-add{display:flex;flex-wrap:wrap;gap:var(--sp-2);margin-top:var(--sp-4)}
.ayra-add input{flex:1;min-width:6rem;margin:0}
.ayra-add input[type="time"]{flex:0 0 7rem}
.ayra-add .btn{flex:0 0 auto;min-height:2.75rem;padding:0 1rem}

/* Recurso ainda indisponível */
.ayra-off{opacity:.72}
.ayra-off .ayra-card__titulo{display:flex;align-items:center;gap:.5rem}
.ayra-off .btn[disabled]{cursor:not-allowed}

/* Peso na tela de saúde */
.ayra-peso{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-4);flex-wrap:wrap}
.ayra-peso__valor{display:block;font:700 34px/1 'Satoshi',sans-serif;color:var(--text-1);letter-spacing:-.01em}
.ayra-peso__valor small{font-size:16px;color:var(--text-3);margin-left:2px}

@media (min-width:48rem){
  .kpis{grid-auto-flow:row;grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));overflow:visible}
  .ayra-kpi--score{grid-column:span 2}
  .ayra-habito__bar{max-width:150px}
}

/* ---------- 27.20 Painel do motor ---------- */

/* Bloco de resposta crua da API. Rola sozinho: JSON da Evolution é comprido. */
.json{
  margin:var(--sp-3) 0 0;padding:var(--sp-3);
  background:var(--surface-3);border:1px solid var(--border);
  border-radius:var(--r-xs);overflow-x:auto;max-height:22rem;
  font:400 11.5px/1.5 ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  color:var(--text-2);white-space:pre;tab-size:2;
}
.json--curto{max-height:8rem;margin-top:var(--sp-2)}

/* Fila de botões de ação que quebra linha no mobile */
.botoes-linha{display:flex;flex-wrap:wrap;gap:var(--sp-2);align-items:center}
.botoes-linha form{margin:0}
.botoes-linha .btn{min-height:2.75rem;padding:0 1rem;font-size:13px}

/* Lista de números cadastrados, para copiar no teste de envio */
.painel__ajuda{margin:var(--sp-2) 0 var(--sp-3)}
.painel__ajuda summary{cursor:pointer;font-size:12.5px}
.lista-numeros{list-style:none;margin:var(--sp-3) 0 0;padding:0}
.lista-numeros li{
  display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);
  padding:7px 0;border-bottom:1px solid var(--border);font-size:13px;
}
.lista-numeros li:last-child{border-bottom:0}
.lista-numeros code{
  font:500 12.5px/1 ui-monospace,Menlo,Consolas,monospace;
  color:var(--text-1);background:var(--surface-3);
  padding:4px 8px;border-radius:var(--r-xs);user-select:all;
}

/* Tabela larga não pode estourar a tela no celular */
.tabela-rolagem{overflow-x:auto;-webkit-overflow-scrolling:touch}
.tabela-rolagem .tabela{min-width:34rem}

/* code solto dentro de parágrafo */
.painel code{
  font:500 12.5px/1 ui-monospace,Menlo,Consolas,monospace;
  color:var(--text-1);background:var(--surface-3);
  padding:2px 6px;border-radius:4px;
}

/* ---------- 27.17 Movimento reduzido (guia §11) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}