:root {
  --green: #7CC04B;
  --green-dark: #5fa83a;
  --yellow: #F5C518;
  --navy: #1f2e3d;
  --mint: #dff3f3;
  --cream: #fbf7e4;
  --white: #ffffff;
  --ink-soft: #46586a;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Garante que o atributo "hidden" realmente esconda (senão um display: do CSS o ignora
   — era o bug que deixava a tela do código de barras grudada por cima do app) */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: 'Quicksand', system-ui, sans-serif;
  color: var(--navy);
  background: var(--mint);
  overflow: hidden;
  user-select: none;
}

#app { position: relative; height: 100dvh; width: 100%; max-width: 480px; margin: 0 auto; }

/* ===== Aviso: abriu dentro do Instagram/Facebook ===== */
.ig-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  box-shadow: 0 4px 14px rgba(31,46,61,.28);
}
.ig-banner__close { flex: none; background: none; border: none; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; padding: 4px; }

/* ===== Screens ===== */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: env(safe-area-inset-top) 28px env(safe-area-inset-bottom);
}
.screen.is-active { display: flex; animation: fade .45s ease both; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ===== Splash ===== */
.splash { background: var(--mint); align-items: center; justify-content: center; }

.mascot--bounce { animation: bounce 1.4s ease-in-out infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ===== Welcome ===== */
.welcome { background: var(--white); justify-content: space-between; overflow: hidden; }
.welcome__top { padding-top: 24%; z-index: 2; }

.brand {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--navy);
}
.brand span { color: var(--green); }

.tagline {
  margin-top: 10px;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-soft);
}

.welcome__bottom { z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-bottom: 12px; }
.mascot--yoga { margin-bottom: -22px; animation: sway 3s ease-in-out infinite; }
@keyframes sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* decorações flutuantes */
.welcome__deco { position: absolute; z-index: 1; font-size: 56px; line-height: 1; }
.deco-tree {
  top: -34px; right: -28px;
  width: 150px; height: 150px;
  background: radial-gradient(circle at 50% 55%, #4f8a2e 0 60%, transparent 61%);
  border-radius: 50%;
}
.deco-tree::after { content: ""; position: absolute; bottom: 10px; left: 44%; width: 22px; height: 26px; background: var(--yellow); border-radius: 4px; }
.deco-shoe { top: 25%; left: 22px; font-size: 54px; }
.deco-tomato { top: 44%; left: -22px; font-size: 84px; }
.deco-flower { top: 50%; right: 30px; font-size: 56px; }

/* ===== Aceite ===== */
.aceite { background: var(--mint); align-items: center; justify-content: center; }
.aceite__box { background: #fff; border-radius: 22px; padding: 28px 24px; max-width: 360px; width: 100%; text-align: center; box-shadow: 0 10px 30px rgba(31,46,61,.12); }
.aceite__title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 26px; color: var(--navy); margin-bottom: 12px; }
.aceite__text { font-size: 15px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 12px; }
.aceite__text a { color: var(--green-dark); font-weight: 600; }
.aceite .btn--primary { width: 100%; max-width: none; margin-top: 8px; font-size: 17px; padding: 17px 24px; }

/* ===== Carrossel ===== */
.carousel { background: var(--white); padding: 0; }
.carousel__track {
  flex: 1;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.carousel__track::-webkit-scrollbar { display: none; }

.slide {
  min-width: 100%;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 32px;
  gap: 26px;
}

.slide__art {
  width: 230px; height: 230px;
  border-radius: 34px;
  display: grid;
  place-items: center;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 64px;
}
.slide__art--mint { background: var(--mint); }
.slide__art--cream { background: var(--cream); grid-template-columns: 1fr; font-size: 96px; }

.slide__title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.25;
  color: var(--navy);
}
.slide__sub { font-size: 16px; color: var(--ink-soft); line-height: 1.5; max-width: 300px; }

.carousel__footer { padding: 0 28px 26px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.dots { display: flex; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #cdd6dd; transition: .3s; }
.dot.is-active { width: 24px; border-radius: 5px; background: var(--navy); }

/* ===== Quiz ===== */
.quiz { background: var(--white); padding: 0; }
.quiz__head { display: flex; align-items: center; gap: 14px; padding: 18px 28px 6px; }
.quiz__back { background: none; border: none; font-size: 26px; color: var(--navy); cursor: pointer; line-height: 1; padding: 0 4px; }
.progress { flex: 1; height: 7px; background: #eef1f3; border-radius: 4px; overflow: hidden; }
.progress__bar { height: 100%; width: 0; background: var(--green); border-radius: 4px; transition: width .35s ease; }

.quiz__body { flex: 1; padding: 30px 28px 10px; display: flex; flex-direction: column; }
.quiz__title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 27px; line-height: 1.25; color: var(--navy); margin-bottom: 8px; }
.quiz__hint { font-size: 15px; color: var(--ink-soft); margin-bottom: 12px; }

.options { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.option {
  display: flex; align-items: center; gap: 14px;
  background: #f6f8f9; border: 2px solid transparent; border-radius: 16px;
  padding: 18px 20px; cursor: pointer; text-align: left; font-family: inherit;
  transition: border-color .15s, background .15s;
}
.option:active { transform: scale(.99); }
.option.is-selected { border-color: var(--green); background: #f1f9ea; }
.option__icon {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: var(--mint); color: var(--navy); font-weight: 700;
  display: grid; place-items: center; font-size: 18px;
}
.option.is-selected .option__icon { background: var(--green); color: #fff; }
.option__text { display: flex; flex-direction: column; gap: 2px; }
.option__label { font-size: 18px; font-weight: 600; color: var(--navy); }
.option__hint { font-size: 13px; color: var(--ink-soft); }

.num-wrap { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-top: 40px; }
.num-input {
  width: 150px; border: none; border-bottom: 3px solid var(--green);
  font-family: 'Quicksand', sans-serif; font-weight: 700; font-size: 52px;
  text-align: center; color: var(--navy); background: transparent; outline: none;
}
.num-input::-webkit-outer-spin-button, .num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-unit { font-size: 22px; font-weight: 600; color: var(--ink-soft); }

.quiz__foot { padding: 12px 28px 26px; }
.quiz__foot .btn--primary { width: 100%; max-width: none; }
.btn--primary:disabled { opacity: .4; box-shadow: none; cursor: default; }

/* ===== Resultado (meta) ===== */
.goalresult { background: var(--mint); align-items: center; justify-content: center; text-align: center; gap: 4px; }
.goalresult__label { font-size: 18px; color: var(--ink-soft); margin-top: 8px; }
.goalresult__kcal { font-family: 'Quicksand', sans-serif; font-weight: 700; font-size: 64px; color: var(--navy); line-height: 1.1; }
.goalresult__kcal small { font-size: 24px; font-weight: 600; color: var(--ink-soft); }
.macros { display: flex; gap: 12px; margin: 26px 0 30px; }
.macro { background: #fff; border-radius: 16px; padding: 16px 18px; min-width: 84px; }
.macro__val { display: block; font-size: 22px; font-weight: 700; color: var(--navy); }
.macro__name { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.goalresult .btn--primary { width: 100%; max-width: 320px; }

/* ===== Dashboard ===== */
.dash { background: var(--white); padding: 0; }
.dash__head { display: flex; justify-content: space-between; align-items: center; padding: calc(env(safe-area-inset-top) + 18px) 24px 8px; }
.dash__hi { font-size: 22px; font-weight: 700; color: var(--navy); }
.dash__date { font-size: 14px; color: var(--ink-soft); }
.dash__scroll { flex: 1; overflow-y: auto; padding: 6px 24px 0; }
.dash__scroll::-webkit-scrollbar { display: none; }

.ring-wrap { position: relative; width: 184px; height: 184px; margin: 14px auto 0; }
.ring { width: 184px; height: 184px; }
#ring-fg { transition: stroke-dashoffset .6s ease, stroke .3s; }
.ring__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.ring__num { font-size: 42px; font-weight: 700; color: var(--navy); line-height: 1; }
.ring__sub { font-size: 14px; color: var(--ink-soft); }
.ring__left { text-align: center; font-size: 15px; font-weight: 600; color: var(--ink-soft); margin-top: 8px; }

.macro-bars { display: flex; flex-direction: column; gap: 13px; margin: 22px 0 4px; }
.mb__top { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-soft); margin-bottom: 5px; font-weight: 500; }
.mb__track { height: 9px; background: #eef1f3; border-radius: 5px; overflow: hidden; }
.mb__fill { height: 100%; border-radius: 5px; transition: width .5s ease; }

.meals { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.meal { background: #f8f9fa; border-radius: 18px; padding: 16px 18px; }
.meal__head { display: flex; justify-content: space-between; align-items: center; }
.meal__name { font-size: 17px; font-weight: 700; color: var(--navy); }
.meal__kcal { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.food-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #eef1f3; margin-top: 8px; }
.food-row:first-of-type { margin-top: 10px; }
.food-row__name { flex: 1; font-size: 15px; color: var(--navy); }
.food-row__name small { color: var(--ink-soft); margin-left: 7px; font-size: 12px; }
.food-row__kcal { font-size: 15px; font-weight: 600; color: var(--navy); }
.food-row__del { background: #fbeceb; border: none; color: #d8483b; width: 30px; height: 30px; min-width: 30px; border-radius: 50%; font-size: 19px; cursor: pointer; line-height: 30px; text-align: center; padding: 0; flex: none; }
.food-row__del:active { background: #f6d6d3; }
.qty__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.qty-chip { background: #f1f9ea; border: 1.5px solid #d8ecc4; color: var(--green-dark); font-family: inherit; font-weight: 700; font-size: 14px; padding: 9px 13px; border-radius: 999px; cursor: pointer; }
.qty-chip:active { background: #e3f3d3; }
.qty-chip--g { background: #eef4f8; border-color: #d8e3ec; color: var(--navy); }
.meal__add { width: 100%; margin-top: 12px; background: none; border: none; color: var(--green-dark); font-family: inherit; font-weight: 700; font-size: 15px; cursor: pointer; padding: 9px; border-radius: 12px; }
.meal__add:active { background: #f1f9ea; }

.fab { position: absolute; right: 22px; bottom: calc(env(safe-area-inset-bottom) + 22px); width: 62px; height: 62px; border-radius: 50%; background: var(--navy); border: none; box-shadow: 0 10px 24px rgba(31,46,61,.3); display: grid; place-items: center; cursor: pointer; z-index: 5; }
.fab:active { transform: scale(.94); }

/* ===== Paywall / Premium ===== */
.paywall { background: #fff; padding: calc(env(safe-area-inset-top) + 22px) 26px calc(env(safe-area-inset-bottom) + 22px); overflow-y: auto; align-items: stretch; justify-content: flex-start; }
.paywall::-webkit-scrollbar { display: none; }
.paywall__close { position: absolute; top: calc(env(safe-area-inset-top) + 14px); right: 18px; background: none; border: none; font-size: 22px; color: var(--ink-soft); cursor: pointer; z-index: 2; line-height: 1; }
.paywall__hero { text-align: center; margin: 4px 0 20px; }
.paywall__title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 30px; color: var(--navy); margin-top: 8px; }
.paywall__title span { color: #c9962a; }
.paywall__sub { font-size: 15px; color: var(--ink-soft); margin-top: 5px; }

.benefits { list-style: none; display: flex; flex-direction: column; gap: 13px; margin: 4px 0 22px; }
.benefits li { display: flex; align-items: center; gap: 13px; font-size: 16px; color: var(--navy); font-weight: 500; }
.benefit__ic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: #f1f9ea; display: grid; place-items: center; font-size: 19px; }

.plans { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 3px; text-align: left; background: #f8f9fa; border: 2px solid #eef1f3; border-radius: 16px; padding: 16px 18px; cursor: pointer; font-family: inherit; }
.plan.is-selected { border-color: var(--green); background: #f1f9ea; }
.plan__badge { position: absolute; top: -10px; right: 16px; background: #c9962a; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; letter-spacing: .4px; }
.plan__name { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.plan__price { font-size: 25px; font-weight: 700; color: var(--navy); }
.plan__price small { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.plan__note { font-size: 12px; color: var(--ink-soft); }

.paywall .btn--primary { width: 100%; max-width: none; }
.paywall__fine { text-align: center; font-size: 12px; color: var(--ink-soft); margin-top: 13px; line-height: 1.5; }
.paywall__restore { background: none; border: none; color: var(--ink-soft); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; margin: 12px auto 0; display: block; }
.paywall__altcta { background: none; border: none; color: var(--green-dark); font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; margin: 10px auto 0; display: block; padding: 6px; }

/* ===== Toast / pulso / vazio ===== */
.toast { position: absolute; left: 50%; bottom: 100px; transform: translate(-50%, 18px); background: var(--navy); color: #fff; font-size: 14px; font-weight: 600; padding: 12px 20px; border-radius: 26px; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 30; box-shadow: 0 10px 26px rgba(31,46,61,.32); max-width: calc(100% - 48px); text-align: center; }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.ring-wrap.pulse { animation: ringpulse .5s ease; }
@keyframes ringpulse { 0% { transform: scale(1); } 42% { transform: scale(1.06); } 100% { transform: scale(1); } }
.meal-empty { font-size: 13px; color: #b8c0c6; padding: 10px 0 2px; }

/* ===== Foto com IA ===== */
.photo { background: #fff; padding: 0; }
.photo__head { display: flex; align-items: center; gap: 12px; padding: calc(env(safe-area-inset-top) + 14px) 20px 10px; }
.photo__close { background: none; border: none; font-size: 22px; color: var(--navy); cursor: pointer; line-height: 1; }
.photo__title { flex: 1; font-size: 17px; font-weight: 700; color: var(--navy); }
.badge-premium { background: #fff3d6; color: #9a7b14; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 20px; }
.photo__img-wrap { height: 200px; background: #eef1f3; overflow: hidden; }
.photo__img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo__body { flex: 1; overflow-y: auto; padding: 18px 22px calc(env(safe-area-inset-bottom) + 18px); }
.photo__body::-webkit-scrollbar { display: none; }

.analyzing { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 54px 0; text-align: center; }
.analyzing p { font-size: 18px; font-weight: 700; color: var(--navy); }
.analyzing span { font-size: 14px; color: var(--ink-soft); }
.spinner { width: 46px; height: 46px; border: 5px solid #eef1f3; border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pf-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--navy); font-size: 16px; }
.pf-total { color: var(--green-dark); }
.pf-hint { font-size: 13px; color: var(--ink-soft); margin: 5px 0 14px; }
.pf-list { display: flex; flex-direction: column; }
.pf-row { display: flex; align-items: center; gap: 8px; padding: 11px 0; border-bottom: 1px solid #eef1f3; }
.pf-name { flex: 1; min-width: 0; font-family: inherit; font-size: 15px; color: var(--navy); border: none; border-bottom: 1px dashed #cdd6dd; background: transparent; padding: 4px 2px; outline: none; }
.pf-name:focus { border-bottom-color: var(--green); }
.pf-grams { width: 58px; padding: 7px 6px; border: 2px solid #eef1f3; border-radius: 9px; font-family: inherit; font-size: 15px; text-align: center; color: var(--navy); outline: none; }
.pf-grams:focus { border-color: var(--green); }
.pf-grams::-webkit-outer-spin-button, .pf-grams::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pf-unit { font-size: 13px; color: var(--ink-soft); }
.pf-kcal { width: 52px; text-align: right; font-weight: 600; color: var(--navy); font-size: 15px; }
.pf-del { background: none; border: none; color: #c2cad0; font-size: 20px; cursor: pointer; line-height: 1; }
.pf-meal-label { font-size: 14px; color: var(--ink-soft); margin: 20px 0 9px; font-weight: 500; }
.meal-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.meal-chip { background: #f6f8f9; border: 2px solid transparent; border-radius: 22px; padding: 9px 15px; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--navy); cursor: pointer; }
.meal-chip.is-selected { background: #f1f9ea; border-color: var(--green); }
.photo__body .btn--primary { width: 100%; max-width: none; }
.photo-err { text-align: center; padding: 34px 10px 8px; }
.photo-err__ic { font-size: 44px; margin-bottom: 12px; }
.photo-err__msg { font-size: 16px; color: var(--ink-soft); line-height: 1.5; margin: 0 auto 22px; max-width: 300px; }
.photo-err .btn--ghost { width: 100%; max-width: none; margin-top: 6px; }
.pf-upsell { margin-top: 18px; padding: 16px 16px 18px; border-radius: 16px; background: #f1f9ea; border: 1.5px solid #cdeccd; text-align: center; }
.pf-upsell p { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: var(--navy); }
.pf-upsell .btn--primary { width: 100%; max-width: none; }

/* ===== Folha de busca ===== */
.sheet { position: absolute; inset: 0; z-index: 20; }
.sheet[hidden] { display: none; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(31,46,61,.42); opacity: 0; transition: opacity .25s; }
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 26px 26px 0 0; padding: 10px 22px calc(env(safe-area-inset-bottom) + 20px); height: 78%; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .28s ease; }
.sheet.is-open .sheet__panel { transform: translateY(0); }
.sheet__grip { width: 42px; height: 5px; border-radius: 3px; background: #dde3e7; margin: 6px auto 14px; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet__title { font-size: 18px; font-weight: 700; color: var(--navy); }
.sheet__close { background: #f1f4f6; border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 17px; color: var(--ink-soft); cursor: pointer; line-height: 1; flex: none; }
.qty__back { align-self: flex-start; background: none; border: none; color: var(--green-dark); font-family: inherit; font-weight: 600; font-size: 15px; cursor: pointer; padding: 0; margin-bottom: 2px; }
.search-input { width: 100%; padding: 14px 16px; border: 2px solid #eef1f3; border-radius: 14px; font-family: inherit; font-size: 16px; outline: none; color: var(--navy); }
.search-input:focus { border-color: var(--green); }
.results { margin-top: 14px; overflow-y: auto; flex: 1; }
.results::-webkit-scrollbar { display: none; }
.results__hint { color: var(--ink-soft); font-size: 14px; text-align: center; padding: 22px 0; }
.ai-estimate { width: 100%; margin-top: 14px; background: #f1f9ea; border: 1.5px dashed var(--green); border-radius: 14px; color: var(--green-dark); font-family: inherit; font-weight: 700; font-size: 15.5px; padding: 16px; cursor: pointer; text-align: center; }
.ai-estimate:active { transform: scale(.99); }
.result { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: none; border: none; border-bottom: 1px solid #eef1f3; padding: 13px 2px; cursor: pointer; text-align: left; font-family: inherit; }
.result__name { font-size: 15px; color: var(--navy); flex: 1; }
.result__name small { color: var(--ink-soft); }
.result__kcal { font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap; }
.result__kcal small { color: var(--ink-soft); font-weight: 400; }
.qa__label { font-size: 12px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; margin: 16px 2px 2px; }
.qty__nameRow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qty__fav { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; line-height: 1; cursor: pointer; color: #e6b800; padding: 4px 6px; flex: none; }
.qty__fav-ic { font-size: 22px; line-height: 1; }
.qty__fav-tx { font-size: 12.5px; font-weight: 600; color: #7a8894; white-space: nowrap; }
.qty__fav:active { transform: scale(1.08); }

/* Ofensiva */
.streak { display: inline-block; margin-top: 6px; background: #fff3e0; color: #e07b1a; font-size: 12.5px; font-weight: 700; padding: 3px 11px; border-radius: 999px; }

.app-version { text-align: center; color: #c2cad0; font-size: 11px; font-weight: 600; margin-top: 18px; }

/* Botão e scanner de código de barras */
.barcode-btn { width: 100%; margin-top: 10px; background: #1f2e3d; color: #fff; border: none; border-radius: 14px; padding: 12px; font-family: inherit; font-weight: 700; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.barcode-btn span { font-size: 18px; }
.barcode-btn:active { transform: scale(.98); }
.scanner { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; }
.scanner__head { display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top) + 14px) 18px 12px; color: #fff; }
.scanner__title { font-size: 16px; font-weight: 700; }
.scanner__close { background: rgba(255,255,255,.18); border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.scanner__stage { position: relative; flex: 1; overflow: hidden; }
.scanner__reader { width: 100%; height: 100%; }
.scanner__reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.scanner__status { color: #fff; text-align: center; font-size: 14px; padding: 16px 24px 6px; }
.scanner__retry { display: block; margin: 0 auto calc(env(safe-area-inset-bottom) + 20px); background: #7CC04B; color: #fff; border: none; font-family: inherit; font-weight: 700; font-size: 15px; padding: 12px 24px; border-radius: 999px; cursor: pointer; }
.scanner__retry:active { transform: scale(.97); }
.scanner__head-btns { display: flex; align-items: center; gap: 10px; }
.scanner__torch { background: rgba(255,255,255,.18); border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.scanner__torch.is-on { background: #F5C518; }
.scanner__manual { display: flex; gap: 8px; padding: 4px 24px calc(env(safe-area-inset-bottom) + 18px); }
.scanner__manual input { flex: 1; min-width: 0; border: none; border-radius: 12px; padding: 13px; font-family: inherit; font-size: 15px; color: #1f2e3d; }
.scanner__manual input::-webkit-outer-spin-button, .scanner__manual input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.scanner__manual button { background: #fff; color: #1f2e3d; border: none; border-radius: 12px; padding: 13px 18px; font-family: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.scanner__manual button:active { transform: scale(.97); }

/* Configurações (⚙️) */
.cfg-item { width: 100%; text-align: left; background: #f8f9fa; border: none; border-radius: 14px; padding: 16px; font-family: inherit; font-size: 16px; font-weight: 600; color: var(--navy); cursor: pointer; margin-bottom: 12px; }
.cfg-item:active { transform: scale(.99); }
.cfg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f8f9fa; border-radius: 14px; padding: 14px 16px; font-size: 16px; font-weight: 600; color: var(--navy); }
.cfg-note { font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin-top: 8px; }
.inst-lead { font-size: 16px; color: var(--navy); font-weight: 600; margin-bottom: 12px; }
.inst-steps { margin: 0 0 6px; padding-left: 26px; }
.inst-steps li { padding: 8px 0; font-size: 16px; color: var(--navy); line-height: 1.45; }
.inst-note { font-size: 15px; color: var(--green-dark); font-weight: 700; margin-top: 6px; }
.backup-rem { background: #fff8e6; border: 1px solid #f2e0a8; border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; }
.backup-rem > span { display: block; font-size: 14px; color: #6b5a20; line-height: 1.5; }
.backup-rem__btns { display: flex; gap: 10px; margin-top: 12px; }
.backup-rem__do { flex: 1; background: var(--green); color: #fff; border: none; border-radius: 11px; padding: 11px; font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.backup-rem__x { background: none; border: none; color: var(--ink-soft); font-family: inherit; font-weight: 600; font-size: 14px; cursor: pointer; padding: 11px 8px; }
.cfg-toggle { width: 52px; height: 30px; border-radius: 999px; border: none; background: #cdd6dd; position: relative; cursor: pointer; transition: background .2s; flex: none; }
.cfg-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; }
.cfg-toggle.is-on { background: #7CC04B; }
.cfg-toggle.is-on::after { left: 25px; }

/* Resumo / Relatório */
.report { background: var(--white); padding: 0; }
.report__head { display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top) + 16px) 20px 10px; }
.report__back { background: #f1f4f6; border: none; width: 38px; height: 38px; border-radius: 50%; font-size: 20px; color: var(--navy); cursor: pointer; }
.report__title { font-size: 18px; font-weight: 700; color: var(--navy); }
.report__tabs { display: flex; gap: 8px; padding: 6px 20px 14px; }
.report__tab { flex: 1; background: #f1f4f6; border: none; border-radius: 12px; padding: 11px; font-family: inherit; font-weight: 700; font-size: 15px; color: var(--ink-soft); cursor: pointer; }
.report__tab.is-on { background: var(--navy); color: #fff; }
.report__body { flex: 1; overflow-y: auto; padding: 4px 20px 30px; }
.rcards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rcard { background: #f8f9fa; border-radius: 16px; padding: 16px; text-align: center; }
.rcard b { display: block; font-size: 26px; font-weight: 700; color: var(--navy); }
.rcard span { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.report__ctitle { font-size: 15px; font-weight: 700; color: var(--navy); margin: 22px 0 10px; }
.report__chart { width: 100%; height: 140px; display: block; }
.report__legend { display: flex; gap: 16px; justify-content: center; margin-top: 10px; font-size: 12px; color: var(--ink-soft); flex-wrap: wrap; }
.rl { display: inline-flex; align-items: center; gap: 5px; }
.rl i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.rl i.dash { width: 14px; height: 0; border-top: 2px dashed #1f2e3d; border-radius: 0; }
.report__empty { text-align: center; color: var(--ink-soft); padding: 50px 20px; font-size: 15px; }

/* Pratos por região */
.qa-regions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.qa-region { background: #f1f9ea; border: 1.5px solid #cdeccd; border-radius: 999px; padding: 9px 14px; font-family: inherit; font-weight: 700; font-size: 14px; color: var(--green-dark); cursor: pointer; }
.qa-region:active { transform: scale(.97); }

/* Jejum intermitente */
.fast { background: #faf3e6; border-radius: 18px; padding: 14px 16px; margin-top: 18px; }
.fast__head { display: flex; justify-content: space-between; align-items: center; }
.fast__title { font-size: 16px; font-weight: 700; color: var(--navy); }
.fast__pct { font-size: 14px; font-weight: 700; color: #9C6630; }
.fast__protos { display: flex; gap: 8px; margin: 12px 0; }
.fast__proto { flex: 1; background: #fff; border: 1.5px solid #eaddc4; border-radius: 12px; padding: 10px; font-family: inherit; font-weight: 700; font-size: 14px; color: var(--navy); cursor: pointer; }
.fast__proto.is-on { border-color: #9C6630; background: #f3e7d0; }
.fast__bar { height: 10px; background: #efe6d3; border-radius: 6px; overflow: hidden; margin: 12px 0 8px; }
.fast__fill { height: 100%; border-radius: 6px; transition: width .4s; }
.fast__time { font-size: 14px; font-weight: 600; color: var(--navy); text-align: center; margin-bottom: 12px; }
.fast__btn { width: 100%; border: none; border-radius: 12px; padding: 12px; font-family: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.fast__btn--start { background: #9C6630; color: #fff; }
.fast__btn--stop { background: #fff; border: 1.5px solid #d8c9ab; color: #9C6630; }
.fast__btn:active { transform: scale(.98); }
.fast__note { font-size: 12px; color: var(--ink-soft); text-align: center; margin-top: 10px; }

/* Selo de saúde (Nutri-Score / NOVA) */
.hbrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.hb { display: inline-flex; align-items: center; gap: 6px; background: #f1f4f6; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--navy); }
.hb__dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* Cabeçalho: botão de perfil + navegação de dias */
.dash__head-right { display: flex; align-items: center; gap: 10px; }
.icon-btn { background: #f1f4f6; border: none; width: 38px; height: 38px; border-radius: 50%; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.icon-btn:active { transform: scale(.93); }
.daynav { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 2px 0 14px; }
.daynav__btn { background: #f1f4f6; border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; color: var(--navy); cursor: pointer; line-height: 1; }
.daynav__btn:disabled { opacity: .3; cursor: default; }
.daynav__btn:active:not(:disabled) { transform: scale(.92); }
.daynav__label { font-size: 15px; font-weight: 700; color: var(--navy); min-width: 92px; text-align: center; }

/* Peso */
.weight { background: #f4f9ef; border-radius: 18px; padding: 14px 16px; margin-top: 18px; }
.weight__head { display: flex; justify-content: space-between; align-items: center; }
.weight__title { font-size: 16px; font-weight: 700; color: var(--navy); }
.weight__now { font-size: 15px; font-weight: 700; color: var(--green-dark); }
.weight__delta { font-size: 12px; font-weight: 700; margin-left: 5px; }
.weight__delta.is-up { color: #e0731a; }
.weight__delta.is-down { color: #3a9d2f; }
.weight__chart { width: 100%; height: 90px; display: block; margin: 10px 0; }
.weight__hint { font-size: 13px; color: var(--ink-soft); text-align: center; padding: 16px 4px; }
.weight__row { display: flex; gap: 10px; }
.weight__row input { flex: 1; min-width: 0; border: 1.5px solid #d8e6cd; border-radius: 12px; padding: 9px 12px; font-family: inherit; font-size: 15px; color: var(--navy); background: #fff; }
.weight__save { background: #7CC04B; border: none; color: #fff; font-family: inherit; font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 12px; cursor: pointer; white-space: nowrap; }
.weight__save:active { transform: scale(.97); }

/* Água */
.water { background: #eef7fc; border-radius: 18px; padding: 14px 16px; margin-top: 18px; }
.water__head { display: flex; justify-content: space-between; align-items: center; }
.water__title { font-size: 16px; font-weight: 700; color: var(--navy); }
.water__count { font-size: 13px; color: #2f80a8; font-weight: 600; }
.water__drops { display: flex; gap: 4px; margin: 12px 0; flex-wrap: wrap; }
.water__drop { background: none; border: none; font-size: 22px; cursor: pointer; filter: grayscale(1) opacity(.35); padding: 0; line-height: 1; transition: filter .15s, transform .1s; }
.water__drop.is-full { filter: none; }
.water__drop:active { transform: scale(1.2); }
.water__ctrls { display: flex; gap: 10px; }
.water__btn { flex: 1; background: #fff; border: 1.5px solid #cfe6f3; color: #2f80a8; font-family: inherit; font-weight: 700; font-size: 15px; padding: 9px; border-radius: 12px; cursor: pointer; }
.water__btn--add { background: #2f9ad6; border-color: #2f9ad6; color: #fff; flex: 2; }
.water__btn:active { transform: scale(.97); }
.qty { padding: 16px 4px; display: flex; flex-direction: column; gap: 16px; }
.qty__name { font-size: 19px; font-weight: 700; color: var(--navy); }
.qty__row { display: flex; align-items: center; gap: 10px; }
.qty__row input { width: 120px; padding: 12px; border: 2px solid var(--green); border-radius: 12px; font-family: inherit; font-size: 22px; font-weight: 700; text-align: center; color: var(--navy); outline: none; }
.qty__row input::-webkit-outer-spin-button, .qty__row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty__calc { font-size: 14px; color: var(--ink-soft); line-height: 1.7; }
.qty__calc .mdot { font-size: 11px; vertical-align: middle; }
.qty .btn--primary { width: 100%; max-width: none; }

/* ===== Modais (Termos / Privacidade) ===== */
.modal { position: absolute; inset: 0; z-index: 40; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(31,46,61,.45); opacity: 0; transition: opacity .25s; }
.modal.is-open .modal__backdrop { opacity: 1; }
.modal__card { position: absolute; left: 0; right: 0; bottom: 0; top: 7%; background: #fff; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .28s ease; }
.modal.is-open .modal__card { transform: translateY(0); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 12px; border-bottom: 1px solid #eef1f3; }
.modal__title { font-size: 18px; font-weight: 700; color: var(--navy); }
.modal__close { background: #f1f4f6; border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 17px; color: var(--ink-soft); cursor: pointer; flex: none; }
.modal__body { flex: 1; overflow-y: auto; padding: 18px 22px calc(env(safe-area-inset-bottom) + 22px); }
.modal__body::-webkit-scrollbar { display: none; }
.modal__body h2 { font-size: 17px; color: var(--navy); margin: 20px 0 7px; }
.modal__body p, .modal__body li { font-size: 14.5px; color: #2e3e4d; line-height: 1.6; margin-bottom: 9px; }
.modal__body ul { padding-left: 20px; }
.modal__body a { color: var(--green-dark); }
.modal__body strong { color: var(--navy); }
.modal__body .alert { background: #fff5f4; border: 1px solid #f6c9c3; border-radius: 12px; padding: 13px 15px; margin: 14px 0; }
.modal__body .alert strong { color: #c0392b; }
.modal__body .ok { background: #f1f9ea; border: 1px solid #c6e6ab; border-radius: 12px; padding: 13px 15px; margin: 14px 0; }
.modal__body .foot { text-align: center; color: var(--ink-soft); font-size: 12px; margin-top: 22px; }

/* ===== Botões ===== */
.btn {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 19px;
  border: none;
  border-radius: 40px;
  padding: 19px 64px;
  cursor: pointer;
  transition: transform .12s ease, opacity .2s;
}
.btn:active { transform: scale(.96); }
.btn--primary { background: var(--navy); color: #fff; width: 100%; max-width: 320px; box-shadow: 0 8px 22px rgba(31,46,61,.22); }
.btn--ghost { background: transparent; color: var(--ink-soft); font-size: 15px; padding: 12px 20px; }

.login-row { margin-top: 14px; font-size: 16px; color: var(--ink-soft); font-weight: 500; }
.link-chip { background: #eef1f3; border: none; border-radius: 10px; padding: 6px 14px; font-family: inherit; font-weight: 600; font-size: 16px; color: var(--navy); cursor: pointer; }
.legal-row { margin-top: 10px; font-size: 13px; color: var(--ink-soft); }
.legal-row a { color: var(--ink-soft); }
.paywall__fine a { color: var(--ink-soft); text-decoration: underline; }
