/* ═══════════════════════════════════════════════════════════════════════════
   Nutri+ Mulher — sistema visual (aprovado em 23/10/2026)
   "O app muda de cor com o ciclo": base neutra e UMA cor viva, a da fase.
   Vidro só na navegação; texto sempre sobre fundo sólido.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --ground: #F6F3F8; --surface: #FFFFFF; --surface-2: #EFE9F3; --line: #E6DEEC;
  --ink: #251B2D; --ink-2: #6A5D74; --ink-3: #958AA0;
  --brand: #7445C0; --rose: #D24A7E; --ok: #2A957A; --alerta: #B5412F;
  --f-men: #D24A7E; --f-fol: #2A957A; --f-ovu: #C9801A; --f-lut: #8656CF;
  --phase: var(--f-lut);
  --glass: rgba(255, 255, 255, .64); --glass-line: rgba(255, 255, 255, .75);
  --shadow: 0 1px 2px rgba(40, 20, 60, .05), 0 10px 28px -14px rgba(40, 20, 60, .22);
  --display: 'Bricolage Grotesque', ui-rounded, 'Segoe UI', system-ui, sans-serif;
  --body: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --r1: 10px; --r2: 16px; --r3: 24px; --r4: 32px;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #130F16; --surface: #1D1722; --surface-2: #282030; --line: #33293B;
    --ink: #F2EDF5; --ink-2: #B4A8BE; --ink-3: #85798F;
    --brand: #B08EF2; --rose: #F07CA8; --ok: #5CCBA9; --alerta: #F08A78;
    --f-men: #F07CA8; --f-fol: #5CCBA9; --f-ovu: #F2B455; --f-lut: #B08EF2;
    --glass: rgba(32, 25, 37, .6); --glass-line: rgba(255, 255, 255, .09);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #130F16; --surface: #1D1722; --surface-2: #282030; --line: #33293B;
  --ink: #F2EDF5; --ink-2: #B4A8BE; --ink-3: #85798F;
  --brand: #B08EF2; --rose: #F07CA8; --ok: #5CCBA9; --alerta: #F08A78;
  --f-men: #F07CA8; --f-fol: #5CCBA9; --f-ovu: #F2B455; --f-lut: #B08EF2;
  --glass: rgba(32, 25, 37, .6); --glass-line: rgba(255, 255, 255, .09);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -14px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
[data-fase="men"] { --phase: var(--f-men); }
[data-fase="fol"] { --phase: var(--f-fol); }
[data-fase="ovu"] { --phase: var(--f-ovu); }
[data-fase="lut"] { --phase: var(--f-lut); }

/* ─── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ground); color: var(--ink); font-family: var(--body);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 650; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ─── Estrutura ────────────────────────────────────────────────────────── */
.app { position: relative; min-height: 100dvh; max-width: 560px; margin: 0 auto; overflow-x: clip; }
.aura {
  position: absolute; inset: -80px -60px auto -60px; height: 340px; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 70% at 72% 30%, color-mix(in oklab, var(--phase) 36%, transparent), transparent 70%),
    radial-gradient(50% 60% at 12% 8%, color-mix(in oklab, var(--rose) 14%, transparent), transparent 70%);
  transition: background .5s;
}
.tela { position: relative; z-index: 1; padding: calc(20px + var(--safe-top)) 16px calc(112px + var(--safe-bottom)); display: grid; gap: 14px; }
.tela[data-sem-abas] { padding-bottom: calc(32px + var(--safe-bottom)); }

.topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ola small { display: block; font-size: 13px; color: var(--ink-2); }
.ola h1 { font-size: 30px; line-height: 1.1; }
.titulo-tela { font-size: 30px; line-height: 1.1; }
.sub-tela { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; border: 0; flex-shrink: 0;
  background: linear-gradient(135deg, #E8C7D6, #C7B2E6); color: #5A3B6E;
  font-weight: 700; display: grid; place-items: center; font-size: 15px;
}

/* ─── Cartões ──────────────────────────────────────────────────────────── */
.card { background: var(--surface); border-radius: var(--r3); padding: 16px; box-shadow: var(--shadow); }
.card.vidro {
  background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
}
.card-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.rot { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: -.02em; }
.texto-2 { color: var(--ink-2); font-size: 14px; }
.texto-3 { color: var(--ink-3); font-size: 12.5px; }
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ─── Botões ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  font-weight: 650; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform .18s cubic-bezier(.3, 1.4, .5, 1), opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.pri { background: var(--ink); color: var(--ground); }
.btn.sec { background: var(--surface-2); color: var(--ink); }
.btn.fase { background: var(--phase); color: #fff; }
.btn.contorno { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.cheio { width: 100%; }
.btn.peq { min-height: 38px; padding: 0 16px; font-size: 13.5px; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }

/* ─── Barra de abas (vidro) ────────────────────────────────────────────── */
.abas {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-bottom));
  width: min(528px, calc(100% - 24px)); height: 66px; border-radius: 28px; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: center;
  background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  box-shadow: 0 10px 30px -12px rgba(30, 10, 40, .35);
}
.aba {
  display: grid; justify-items: center; gap: 3px; height: 100%; align-content: center;
  border: 0; background: none; color: var(--ink-3); font-size: 11px; font-weight: 600;
}
.aba svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.aba[aria-current="page"] { color: var(--ink); }
.aba[aria-current="page"] svg { stroke: var(--phase); }
.aba[aria-current="page"]::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--phase); }

/* ─── Fase do ciclo ────────────────────────────────────────────────────── */
.fase-card { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: center; }
.anel { position: relative; width: 104px; height: 104px; }
.anel svg { width: 104px; height: 104px; transform: rotate(-90deg); }
.anel .meio { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1; }
.anel .meio .num { font-size: 28px; }
.anel .meio small { display: block; font-size: 10px; color: var(--ink-3); margin-top: 3px; }
.fase-nome { font-family: var(--display); font-size: 21px; font-weight: 650; color: var(--phase); transition: color .4s; }
.fase-dica { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.linha-ciclo { display: flex; gap: 3px; height: 10px; margin: 12px 0 6px; }
.linha-ciclo i { border-radius: 999px; opacity: .25; }
.linha-ciclo i.on { opacity: 1; }
.linha-ciclo .men { background: var(--f-men); } .linha-ciclo .fol { background: var(--f-fol); }
.linha-ciclo .ovu { background: var(--f-ovu); } .linha-ciclo .lut { background: var(--f-lut); }

/* ─── Listas ───────────────────────────────────────────────────────────── */
.lista { display: grid; }
.linha { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 11px 2px; border-top: 1px solid var(--line); }
.linha:first-child { border-top: 0; }
.linha b { display: block; font-weight: 600; font-size: 14.5px; }
.linha small { display: block; font-size: 12.5px; color: var(--ink-3); }
.linha .k { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.linha.destaque { background: color-mix(in oklab, var(--phase) 10%, transparent); margin: 0 -10px; padding-inline: 12px; border-radius: 16px; border-top-color: transparent; }
.linha.destaque + .linha { border-top-color: transparent; }
.check {
  width: 26px; height: 26px; border-radius: 50%; border: 1.6px solid var(--line); background: none; padding: 0;
  display: grid; place-items: center; transition: background .2s, border-color .2s;
}
.check[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }
.check[aria-pressed="true"]::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--ground); border-bottom: 2px solid var(--ground); transform: rotate(-45deg) translate(1px, -1px); }
.etiqueta { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--phase); color: #fff; margin-left: 6px; vertical-align: 2px; }

/* ─── Seletor de dias / segmentos ──────────────────────────────────────── */
.segmentos { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.segmentos::-webkit-scrollbar { display: none; }
.seg {
  flex: 1 0 auto; min-width: 56px; border: 0; padding: 8px 12px; border-radius: 14px; font-size: 12px;
  color: var(--ink-2); background: var(--surface); box-shadow: var(--shadow); text-align: center;
}
.seg b { display: block; font-family: var(--display); font-size: 15px; color: var(--ink); font-weight: 650; }
.seg[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.seg[aria-pressed="true"] b { color: var(--ground); }

/* ─── Refeição do plano ────────────────────────────────────────────────── */
.ref-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ref-cab h3 { font-size: 19px; }
.opcoes { display: flex; gap: 6px; margin: 10px 0 4px; }
.opcao { border: 0; padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.opcao[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.item:first-child { border-top: 0; }
.item .med { color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: right; }
.item.salada b { color: var(--ok); font-weight: 600; }
.dica-item summary { list-style: none; cursor: pointer; font-size: 12px; color: var(--brand); font-weight: 600; margin-top: 3px; }
.dica-item summary::-webkit-details-marker { display: none; }
.dica-item p { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.macros { display: flex; height: 6px; border-radius: 999px; overflow: hidden; margin: 12px 0 6px; gap: 2px; }
.macros i:nth-child(1) { background: var(--ink); }
.macros i:nth-child(2) { background: color-mix(in oklab, var(--ink) 45%, var(--surface)); }
.macros i:nth-child(3) { background: color-mix(in oklab, var(--ink) 18%, var(--surface)); }
.legenda { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ─── Bloqueado (assinatura) ───────────────────────────────────────────── */
.bloqueado { position: relative; }
.bloqueado > .conteudo { filter: blur(6px); opacity: .6; pointer-events: none; user-select: none; }
.bloqueado > .cadeado {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px;
}
.cadeado .card { max-width: 300px; }

/* ─── Chips (cadastro, condições) ──────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 0; padding: 9px 15px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--surface-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.opcoes-grandes { display: grid; gap: 10px; }
.opcao-grande {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; text-align: left;
  border: 0; padding: 16px 18px; border-radius: var(--r2); background: var(--surface); box-shadow: var(--shadow);
}
.opcao-grande b { display: block; font-weight: 650; font-size: 15.5px; }
.opcao-grande small { display: block; color: var(--ink-3); font-size: 13px; }
.opcao-grande[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink), var(--shadow); }
.opcao-grande .marca { width: 22px; height: 22px; border-radius: 50%; border: 1.6px solid var(--line); }
.opcao-grande[aria-pressed="true"] .marca { border: 7px solid var(--ink); }

/* ─── Formulários ──────────────────────────────────────────────────────── */
.campo { display: grid; gap: 6px; }
.campo label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.campo input, .campo select {
  width: 100%; min-height: 50px; padding: 0 16px; border-radius: var(--r2); border: 0;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 16px;
}
.campo input:focus, .campo select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.campo .erro { font-size: 13px; color: var(--alerta); font-weight: 600; }
.campo-linha { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ─── Barra de progresso ───────────────────────────────────────────────── */
.barra { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--phase); border-radius: 999px; transition: width .4s; }

/* ─── Balanço do dia: consumido × gasto, mesma escala ─────────────────────── */
.bal-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.bal-linha b { font-size: 17px; color: var(--ink); }
.bal-trilho { position: relative; height: 10px; margin-top: 6px; border-radius: 999px; background: var(--surface-2); }
.bal-trilho i, .bal-trilho u { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.bal-trilho i { background: var(--phase); }
.bal-trilho.gasto i { background: var(--ink-2); }
.bal-trilho.gasto u { background: color-mix(in oklab, var(--ink-2) 28%, var(--surface-2)); }
.bal-trilho s { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--ink); }
.bal-aviso { margin: 12px 0 0; padding: 9px 12px; border-radius: var(--r2); background: var(--surface-2); font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) { .bal-trilho i, .bal-trilho u { transition: width .4s; } }

/* ─── Semana (água e treino): 7 bolinhas com a letra do dia, hoje à direita ── */
.semana { display: grid; grid-template-columns: repeat(7, minmax(14px, 1fr)); gap: 2px; text-align: center; font-size: 10.5px; font-weight: 600; color: var(--ink-3); min-width: 0; flex: 1; max-width: 220px; }
.semana i { display: block; width: 10px; height: 10px; border-radius: 50%; margin: 0 auto 4px; background: var(--surface-2); }
.semana i.meio { background: color-mix(in oklab, var(--phase) 55%, var(--surface-2)); }
.semana i.on { background: var(--phase); }
.semana .hoje { color: var(--ink); }

/* ─── Conteúdo (orientações, suplementos) ──────────────────────────────── */
.orient { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.orient:first-of-type { border-top: 0; }
.orient .ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 17px; background: color-mix(in oklab, var(--phase) 14%, var(--surface)); }
.orient b { font-weight: 650; font-size: 14.5px; }
.orient p { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.orient details summary { list-style: none; cursor: pointer; font-size: 12.5px; color: var(--brand); font-weight: 600; margin-top: 6px; }
.orient details summary::-webkit-details-marker { display: none; }
.orient ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.marcador { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.marcador.bom { background: color-mix(in oklab, var(--ok) 14%, var(--surface)); color: var(--ok); }
.marcador.evitar { background: color-mix(in oklab, var(--alerta) 12%, var(--surface)); color: var(--alerta); }
.videos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.video { position: relative; border: 0; padding: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 10; max-width: 100%; background: #2a1630; text-align: left; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video span { position: absolute; left: 10px; right: 10px; bottom: 9px; color: #fff; font-size: 12px; font-weight: 600; line-height: 1.25; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.video::after { content: ""; position: absolute; top: 10px; left: 12px; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .5)); }

/* ─── Folha (bottom sheet) e aviso ─────────────────────────────────────── */
.veu { position: fixed; inset: 0; background: rgba(20, 10, 30, .45); z-index: 40; display: grid; align-items: end; justify-items: center; animation: aparecer .2s; }
.folha {
  width: min(560px, 100%); max-height: 92dvh; overflow-y: auto; background: var(--ground);
  border-radius: 28px 28px 0 0; padding: 10px 18px calc(24px + var(--safe-bottom)); animation: subir .28s cubic-bezier(.2, .9, .3, 1);
}
.folha::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 999px; background: var(--line); margin: 0 auto 14px; }
.folha-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.folha-cab h2 { font-size: 22px; }
.fechar { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 18px; line-height: 1; }
.aviso {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(94px + var(--safe-bottom)); z-index: 50;
  background: var(--ink); color: var(--ground); padding: 12px 18px; border-radius: 16px; font-size: 14px; font-weight: 600;
  max-width: calc(100% - 32px); box-shadow: var(--shadow); animation: aparecer .2s;
}
.aviso.erro { background: var(--alerta); color: #fff; }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes subir { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* ─── Estados ──────────────────────────────────────────────────────────── */
.vazio { text-align: center; padding: 28px 16px; display: grid; gap: 10px; justify-items: center; }
.vazio h3 { font-size: 19px; }
.carregando { display: grid; place-items: center; min-height: 60dvh; }
.giro { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface-2); border-top-color: var(--phase); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.esqueleto { border-radius: var(--r3); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: brilho 1.2s infinite; min-height: 110px; }
@keyframes brilho { to { background-position: -200% 0; } }

/* ─── Assinatura ───────────────────────────────────────────────────────── */
.preco { display: flex; align-items: baseline; gap: 6px; }
.preco .num { font-size: 46px; line-height: 1; }
.preco small { color: var(--ink-2); font-size: 15px; }
.inclui { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.inclui li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.inclui li::before { content: ""; width: 14px; height: 8px; margin: 6px 0 0 3px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.metodos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

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

/* ─── Avisos de saúde (condições que o app não atende, diabetes) ───────── */
.aviso-saude { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--r2); font-size: 13.5px; line-height: 1.5;
  background: color-mix(in oklab, var(--f-ovu) 14%, var(--surface)); color: var(--ink); }
.aviso-saude.grave { background: color-mix(in oklab, var(--alerta) 14%, var(--surface)); }
.aviso-saude b { font-weight: 700; }
.aviso-saude.grave b { color: var(--alerta); }
.aviso-saude p { color: var(--ink-2); }
