/* ==========================================================
   Jornada Fígado em Foco — estilos
   ========================================================== */
:root {
  --forest: #194D33;
  --forest-2: #123A26;
  --leaf: #4D8750;
  --sage: #A8CC8C;
  --sage-soft: #E9F1E1;
  --sage-mid: #D6E6C8;
  --ivory: #F7F8F2;
  --charcoal: #29332D;
  --muted: #68726B;
  --line: #E3E8DD;
  --white: #FFFFFF;
  --danger: #B0413E;
  --shadow: 0 2px 12px rgba(25, 77, 51, .07);
  --radius: 20px;
  --font-head: 'Outfit', system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--charcoal);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
body.noscroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--forest-2); letter-spacing: -.01em; }

.ic { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 18px; height: 18px; }
.ic.xs { width: 15px; height: 15px; }
.ic.lg { width: 30px; height: 30px; }

/* ---------- App shell ---------- */
.shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding: 0 16px calc(100px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
.shell::before {
  content: '';
  position: absolute;
  top: 70px; right: -40px;
  width: 190px; height: 190px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M20 95C30 60 55 40 90 30C85 65 60 88 20 95Z' fill='%23A8CC8C' opacity='.28'/%3E%3Cpath d='M30 92C25 65 30 35 55 8C70 40 60 70 30 92Z' fill='%23A8CC8C' opacity='.2'/%3E%3C/svg%3E") no-repeat center/contain;
  pointer-events: none;
  z-index: 0;
}
.shell > * { position: relative; z-index: 1; }
.shell.no-tabs { padding-bottom: 40px; }

@media (min-width: 520px) {
  body { background: #E8EDE2; }
  .shell { background: var(--ivory); box-shadow: 0 0 40px rgba(25, 77, 51, .08); }
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 6px;
}
.logo { height: 46px; width: auto; mix-blend-mode: multiply; display: block; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--sage-soft); color: var(--forest);
  display: grid; place-items: center; overflow: hidden;
  border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--sage-mid);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.page-title { margin: 14px 0 18px; }
.page-title h1 { font-size: 32px; line-height: 1.1; font-weight: 700; }
.page-title p { color: var(--muted); font-size: 17px; margin-top: 4px; }

.backbar { display: flex; align-items: center; gap: 8px; padding: 14px 0 4px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 40px; padding: 0 12px 0 6px; border-radius: 12px;
  color: var(--forest); font-weight: 700;
}
.back-btn:hover { background: var(--sage-soft); }
.backbar .spacer { flex: 1; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 14px;
  font-weight: 700; font-size: 16px; white-space: nowrap;
  transition: transform .1s, background .15s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--forest); color: var(--white); }
.btn-primary:hover { background: var(--forest-2); }
.btn-outline { background: var(--white); color: var(--forest); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--sage); }
.btn-soft { background: var(--sage-soft); color: var(--forest); }
.btn-soft:hover { background: var(--sage-mid); }
.btn-leaf { background: var(--leaf); color: var(--white); }
.btn-danger { background: var(--white); color: var(--danger); border: 1.5px solid #EBCFCB; }
.btn-block { width: 100%; }
.btn-sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.link-btn { color: var(--leaf); font-weight: 700; font-size: 14px; padding: 6px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  color: var(--forest); flex: none;
}
.icon-btn:hover { background: var(--sage-soft); }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.card + .card { margin-top: 14px; }
.card h3 { font-size: 18px; margin-bottom: 12px; }

.tag {
  display: inline-block; background: var(--sage-mid); color: var(--forest-2);
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.tag.next { background: var(--forest); color: var(--white); }
.pill { background: var(--sage-soft); color: var(--forest); font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }

/* ---------- Greeting / journey ---------- */
.hello { margin: 12px 0 18px; }
.hello h1 { font-size: 34px; line-height: 1.08; font-weight: 700; }
.hello p { color: var(--muted); font-size: 17px; margin-top: 4px; }

.journey-card {
  background: linear-gradient(135deg, #1E5A3C 0%, var(--forest) 55%, #16442D 100%);
  color: var(--white); border-radius: 22px; padding: 20px 20px 18px;
  position: relative; overflow: hidden; display: block;
}
.journey-card::after {
  content: ''; position: absolute; right: -30px; top: -40px; width: 170px; height: 170px;
  border-radius: 50%; background: rgba(168, 204, 140, .12);
}
.journey-card .kicker { font-size: 12px; letter-spacing: .2em; font-weight: 800; color: var(--sage); }
.journey-card h2 { color: var(--white); font-size: 36px; font-weight: 700; margin: 2px 0 2px; }
.journey-card p { font-size: 16px; opacity: .92; }
.journey-card .jc-foot { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.journey-card .bar { flex: 1; height: 9px; background: rgba(255, 255, 255, .18); border-radius: 99px; overflow: hidden; }
.journey-card .bar i { display: block; height: 100%; background: var(--sage); border-radius: 99px; }
.journey-card .jc-link { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.journey-card .jc-badge {
  position: absolute; right: 18px; top: 18px; width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); display: grid; place-items: center; color: var(--sage); z-index: 1;
}
.journey-card .jc-badge .ic { width: 30px; height: 30px; }

.install-card {
  display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 18px;
  box-shadow: var(--shadow); padding: 12px 6px 12px 12px; margin-top: 14px; border: 1.5px solid var(--sage-mid);
}
.install-card img { width: 46px; height: 46px; border-radius: 12px; flex: none; }
.install-card div { flex: 1; min-width: 0; }
.install-card b { font-family: var(--font-head); color: var(--forest-2); display: block; font-size: 16px; }
.install-card span { color: var(--muted); font-size: 13px; line-height: 1.3; display: block; }
.install-card .icon-btn { width: 36px; height: 36px; color: var(--muted); }
.install-step { display: flex; gap: 12px; align-items: flex-start; background: var(--white); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow); font-size: 15px; }
.install-step .t { flex: 1; min-width: 0; }
.install-note { font-size: 14px; color: var(--forest-2); background: var(--sage-soft); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }

/* Ilustrações das telas do celular no tutorial */
.mk { margin-top: 10px; background: #F2F2F7; border: 1px solid #E2E2E8; border-radius: 12px; padding: 8px; font-size: 13px; color: #1c1c1e; font-family: -apple-system, system-ui, sans-serif; }
.mk .ic { color: #007AFF; }
.mk-ios-bar { display: flex; justify-content: space-around; align-items: center; padding: 10px 4px; }
.mk-ios-bar span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; }
.mk-hit { outline: 2.5px solid #E53935; outline-offset: 1px; border-radius: 8px; }
.mk-ios-bar .mk-hit { border-radius: 50%; }
.mk-hit-round { box-shadow: 0 0 0 2.5px #E53935; border-radius: 999px; padding: 2px 8px; }
.mk-list { display: grid; gap: 4px; }
.mk-list div { background: #fff; border-radius: 8px; padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mk-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 4px 2px 8px; font-size: 12px; }
.mk-head b { font-size: 12px; text-align: center; }
.mk-link { color: #007AFF; font-weight: 600; white-space: nowrap; }
.mk-app { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 8px; padding: 8px; }
.mk-app img { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #eee; }
.mk-app b { display: block; font-size: 13px; }
.mk-app small { color: #8e8e93; font-size: 11px; }
.mk-chrome { display: flex; align-items: center; gap: 8px; background: #fff; }
.mk-chrome .ic { color: #5f6368; }
.mk-chrome > span { display: grid; place-items: center; }
.mk-chrome .mk-hit-round { padding: 4px; }
.mk-url { flex: 1; background: #F1F3F4; border-radius: 999px; padding: 6px 10px; color: #3c4043; font-size: 12px; }
.mk-dialog { background: #fff; padding: 12px; display: grid; gap: 10px; }
.mk-dialog .mk-app { padding: 0; }
.mk-actions { display: flex; justify-content: flex-end; gap: 14px; }
.mk-dialog .mk-link { color: #1a73e8; }
.mk-list .ic, .mk-dialog .ic { color: inherit; }

/* Popup centralizado */
#sheet-root.center .sheet {
  top: 50%; bottom: auto; transform: translate(-50%, -50%);
  width: calc(100% - 40px); max-width: 380px; border-radius: 24px; padding: 22px 20px 18px;
  animation: pop .25s cubic-bezier(.2, .8, .2, 1);
}
#sheet-root.center .sheet-handle { display: none; }
@keyframes pop { from { transform: translate(-50%, -46%) scale(.96); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.install-pop { text-align: center; display: flex; flex-direction: column; align-items: center; }
.install-pop img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 6px 18px rgba(25, 77, 51, .18); margin: 6px 0 14px; }
.install-pop h3 { padding: 0; margin-bottom: 6px; }
.install-pop p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }

.install-step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--sage-mid); color: var(--forest-2); font-weight: 800; display: grid; place-items: center; flex: none; font-size: 13px; }
.install-step .ic { vertical-align: -3px; color: var(--forest); }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 26px; }
.quick {
  background: var(--white); border-radius: 18px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px; padding: 16px 14px; font-weight: 700; font-size: 15px;
  color: var(--forest-2);
}
.quick > .ic:first-child { color: var(--forest); width: 28px; height: 28px; }
.quick span { flex: 1; }
.quick .ic.sm { color: var(--muted); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 25px; font-weight: 700; line-height: 1.15; }
.section-head p { margin-top: 2px; }
.chip-link {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  background: var(--sage-soft); color: var(--forest); font-weight: 700; font-size: 14px;
  padding: 8px 12px; border-radius: 12px;
}

.day-progress { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 14px; color: var(--muted); font-weight: 600; }
.day-progress .dots { display: flex; gap: 5px; }
.day-progress .dots i { width: 22px; height: 6px; border-radius: 9px; background: var(--sage-mid); }
.day-progress .dots i.on { background: var(--leaf); }

/* ---------- Food images ---------- */
.food-img { display: grid; place-items: center; overflow: hidden; position: relative; flex: none; }
.food-img img { width: 100%; height: 100%; object-fit: cover; }
.food-img span { line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .12)); }
.food-img.cat-cafe   { background: radial-gradient(circle at 30% 30%, #FFF6DA, #F2DFAE); }
.food-img.cat-almoco { background: radial-gradient(circle at 30% 30%, #F0F6E8, #CFE2BC); }
.food-img.cat-lanche { background: radial-gradient(circle at 30% 30%, #FFF0E4, #F3D3BC); }
.food-img.cat-jantar { background: radial-gradient(circle at 30% 30%, #EAF2EF, #C8DCD5); }
.food-img.big { width: 100%; height: 190px; }
.food-img.big span { font-size: 92px; }
.food-img.md { width: 100%; height: 130px; }
.food-img.md span { font-size: 60px; }
.food-img.sm { width: 84px; height: 84px; border-radius: 16px; }
.food-img.sm span { font-size: 42px; }
.food-img.xs { width: 54px; height: 54px; border-radius: 14px; }
.food-img.xs span { font-size: 28px; }
.food-img.hero { width: 100%; height: 240px; }
.food-img.hero span { font-size: 120px; }

/* ---------- Meal cards (home) ---------- */
.meal-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px; }
.meal-card.hero .mc-body { padding: 16px 18px 18px; }
.meal-card.hero h3 { font-size: 23px; margin: 8px 0 6px; line-height: 1.2; }
.meal-card .meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.meal-card .meta .sep { width: 1px; height: 14px; background: var(--line); margin: 0 6px; }
.meal-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.mc-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; margin-top: 14px; }
.mc-actions .btn-done { grid-column: 1 / -1; }

.meal-card.compact { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px; }
.meal-card.compact h3 { font-size: 17px; margin: 6px 0 4px; line-height: 1.25; }
.meal-card.compact .mc-actions3 { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.meal-card.compact .mc-actions3 .btn { padding: 0 8px; gap: 6px; font-size: 13.5px; }

.meal-card.done { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #FBFCF8; box-shadow: none; border: 1.5px solid var(--line); }
.meal-card.done .food-img { width: 54px; height: 54px; border-radius: 14px; opacity: .75; }
.meal-card.done .food-img span { font-size: 28px; }
.meal-card.done .mc-body { flex: 1; min-width: 0; }
.meal-card.done .tag { white-space: nowrap; font-size: 10.5px; }
.meal-card.done h3 { font-size: 15px; color: var(--muted); text-decoration: line-through; margin-top: 3px; font-family: var(--font-body); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.done-check { width: 28px; height: 28px; border-radius: 50%; background: var(--leaf); color: var(--white); display: grid; place-items: center; flex: none; }
.done-check .ic { width: 16px; height: 16px; stroke-width: 3; }

.celebrate {
  background: var(--sage-soft); border-radius: var(--radius); padding: 18px; text-align: center; margin-bottom: 12px;
  border: 1.5px dashed var(--sage);
}
.celebrate b { font-family: var(--font-head); font-size: 20px; color: var(--forest-2); display: block; }

.step-card {
  width: 100%; display: flex; align-items: center; gap: 14px;
  background: var(--sage-soft); border-radius: var(--radius); padding: 18px; margin-top: 6px;
}
.step-card .cb-big {
  width: 34px; height: 34px; border-radius: 10px; border: 2.5px solid var(--forest);
  display: grid; place-items: center; color: transparent; flex: none; background: var(--white);
}
.step-card.on .cb-big { background: var(--forest); color: var(--white); }
.step-card.on .cb-big .ic { stroke-width: 3; }
.step-card div { flex: 1; }
.step-card b { font-family: var(--font-head); font-size: 18px; color: var(--forest-2); display: block; }
.step-card.on span.txt { text-decoration: line-through; color: var(--muted); }
.step-card .art { font-size: 38px; }

.empty-state { text-align: center; padding: 34px 18px; }
.empty-state .es-ic {
  width: 92px; height: 92px; border-radius: 50%; background: var(--sage-soft); color: var(--forest);
  display: grid; place-items: center; margin: 0 auto 16px;
}
.empty-state .es-ic .ic { width: 44px; height: 44px; }
.empty-state h3 { font-size: 21px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); margin-bottom: 20px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 40;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 12.5px; font-weight: 600; position: relative; padding: 4px 0 8px; }
.tab .ic { width: 26px; height: 26px; }
.tab.active { color: var(--forest); font-weight: 800; }
.tab.active .ic { fill: var(--sage-mid); }
.tab.active::after { content: ''; position: absolute; bottom: 0; width: 46px; height: 4px; border-radius: 4px; background: var(--forest); }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head h3 { margin: 0; font-size: 20px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 0; text-align: center; }
.cal-dow { font-size: 13px; font-weight: 700; color: var(--muted); padding: 4px 0 8px; }
.cal-day {
  position: relative; height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; color: #8A938C; border-radius: 50%; width: 100%; max-width: 46px; margin: 0 auto;
}
.cal-day.in { color: var(--charcoal); }
.cal-day .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--leaf); position: absolute; bottom: 5px; }
.cal-day.complete .dot { width: 14px; height: 4px; border-radius: 4px; background: var(--forest); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--sage); }
.cal-day.sel { background: var(--forest); color: var(--white); box-shadow: none; }
.cal-day.sel .dot { background: var(--white); }
.cal-day:hover:not(.sel) { background: var(--sage-soft); }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 12px; font-size: 13px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); display: inline-block; }
.cal-legend i.bar { width: 14px; height: 4px; border-radius: 4px; background: var(--forest); }
.cal-legend i.ring { background: none; box-shadow: inset 0 0 0 2px var(--sage); width: 12px; height: 12px; }

.plan-day-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0 12px; }
.plan-day-head h2 { font-size: 22px; }
.plan-meal { display: flex; align-items: center; gap: 4px; background: var(--white); border-radius: 18px; box-shadow: var(--shadow); padding: 10px 6px 10px 12px; margin-bottom: 10px; }
.pm-main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.pm-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--sage-soft); color: var(--forest); display: grid; place-items: center; flex: none; position: relative; }
.pm-ic .ok { position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center; border: 2px solid #fff; }
.pm-ic .ok .ic { width: 11px; height: 11px; stroke-width: 3.5; }
.pm-main div { min-width: 0; }
.pm-main b { font-family: var(--font-head); font-size: 17px; color: var(--forest-2); display: block; }
.pm-main span.r { color: var(--muted); font-size: 14.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-meal.is-done span.r { text-decoration: line-through; }
.out-journey { background: var(--white); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); box-shadow: var(--shadow); }

/* ---------- Recipes ---------- */
.search {
  display: flex; align-items: center; gap: 10px; background: var(--white); border-radius: 16px;
  box-shadow: var(--shadow); padding: 0 16px; height: 54px; margin-bottom: 14px;
}
.search input { border: 0; outline: 0; flex: 1; background: transparent; font-size: 16px; min-width: 0; }
.search .ic { color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin: 0 -16px 14px; padding: 0 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; background: var(--white); border-radius: 14px; padding: 10px 16px; font-weight: 700; font-size: 14.5px; box-shadow: var(--shadow); color: var(--forest-2); }
.chip.on { background: var(--forest); color: var(--white); }
.fav-row { display: flex; gap: 10px; margin-bottom: 16px; }
.fav-toggle {
  flex: 1; display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 16px;
  box-shadow: var(--shadow); padding: 14px 16px; font-weight: 700; color: var(--forest-2);
}
.fav-toggle span { flex: 1; }
.fav-toggle.on { background: var(--forest); color: var(--white); }
.fav-toggle.on .ic { fill: currentColor; }

.recipe-feature { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; position: relative; display: block; margin-bottom: 22px; }
.recipe-feature .rf-body { padding: 14px 18px 16px; display: flex; align-items: center; gap: 10px; }
.recipe-feature .rf-body > div { flex: 1; }
.recipe-feature h3 { font-size: 22px; margin: 8px 0 6px; }
.meta-row { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; flex-wrap: wrap; }
.meta-row .sep { width: 1px; height: 14px; background: var(--line); margin: 0 6px; }
.heart-btn {
  position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); display: grid; place-items: center; color: var(--forest); z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.heart-btn.on { color: #C2483F; }
.heart-btn.on .ic { fill: currentColor; }
.recipe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.recipe-tile { background: var(--white); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; position: relative; display: block; }
.recipe-tile .rt-body { padding: 10px 12px 12px; }
.recipe-tile b { font-family: var(--font-head); font-size: 15.5px; color: var(--forest-2); display: block; line-height: 1.25; margin: 6px 0 4px; }
.recipe-tile .tag { font-size: 10px; padding: 3px 8px; }
.recipe-tile .heart-btn { width: 36px; height: 36px; top: 8px; right: 8px; }
.recipe-tile .heart-btn .ic { width: 18px; height: 18px; }

/* Recipe detail */
.recipe-hero { margin: 0 -16px; position: relative; }
.recipe-hero .floating {
  position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; z-index: 2;
}
.recipe-hero .floating .icon-btn, .recipe-hero .floating .heart-btn { position: static; background: rgba(255, 255, 255, .92); border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.recipe-head { background: var(--ivory); border-radius: 24px 24px 0 0; margin: -24px -16px 0; padding: 22px 16px 0; position: relative; z-index: 1; }
.recipe-head h1 { font-size: 28px; line-height: 1.15; margin: 10px 0 10px; }
.serv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--white); border-radius: 18px; box-shadow: var(--shadow); padding: 12px 14px; margin: 18px 0; }
.serv-row b { font-family: var(--font-head); color: var(--forest-2); display: block; }
.ing-list { list-style: none; }
.ing-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.ing-list li:last-child { border-bottom: 0; }
.ing-list li .nm { flex: 1; }
.ing-list li .q { color: var(--muted); font-weight: 700; font-size: 14.5px; text-align: right; }
.ing-list li.got .nm { text-decoration: line-through; color: var(--muted); }
.steps { list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 14px; padding: 10px 0; }
.steps li::before {
  content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--sage-mid); color: var(--forest-2); font-weight: 800; display: grid; place-items: center; font-size: 14px;
}
.tip-box { background: var(--sage-soft); border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; color: var(--forest-2); font-size: 15px; margin-top: 14px; }
.tip-box .ic { color: var(--leaf); }
.meal-cta { margin-top: 18px; }
.meal-cta .note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }
.ing-hint { color: var(--muted); font-size: 14px; margin: -6px 0 6px; }

/* Fluxo das refeições */
.skip-link { display: block; width: 100%; text-align: center; color: var(--danger); font-weight: 700; font-size: 14px; padding: 10px 0 0; }
.skip-link:hover { text-decoration: underline; }
.btn-locked { opacity: .5; }
.done-check.skipped { background: var(--danger); }
.meal-card.done .status { font-size: 12.5px; font-weight: 700; color: var(--leaf); }
.meal-card.done .status.skipped { color: var(--danger); }
.day-progress .dots i.skip { background: var(--danger); }
.pm-ic .ok.skipped { background: var(--danger); }

/* ---------- Checkbox ---------- */
.cb {
  width: 28px; height: 28px; border-radius: 8px; border: 2.2px solid var(--forest);
  display: grid; place-items: center; color: transparent; flex: none; background: var(--white);
}
.cb .ic { width: 17px; height: 17px; stroke-width: 3; }
.cb.on { background: var(--forest); color: var(--white); }

/* ---------- Stepper ---------- */
.stepper { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.stepper button { width: 40px; height: 40px; border-radius: 50%; background: var(--sage-soft); color: var(--forest); display: grid; place-items: center; }
.stepper button:hover { background: var(--sage-mid); }
.stepper .val, .stepper input { width: 46px; text-align: center; font-weight: 800; font-size: 18px; color: var(--forest-2); border: 0; background: transparent; outline: 0; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input { -moz-appearance: textfield; }

/* ---------- Shopping ---------- */
.list-card { display: flex; align-items: center; gap: 14px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.lc-ic { width: 50px; height: 50px; border-radius: 14px; background: var(--sage-soft); color: var(--forest); display: grid; place-items: center; flex: none; }
.lc-body { flex: 1; min-width: 0; }
.lc-body b { font-family: var(--font-head); font-size: 18px; color: var(--forest-2); display: block; }
.lc-body span { color: var(--muted); font-size: 13.5px; }
.mini-bar { height: 6px; background: var(--sage-soft); border-radius: 9px; overflow: hidden; margin-top: 8px; }
.mini-bar i { display: block; height: 100%; background: var(--leaf); border-radius: 9px; }

.list-section { font-size: 20px; margin: 6px 0 12px; }
.list-section-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 14px; }
.list-card.finished { background: #FBFCF8; box-shadow: none; border: 1.5px solid var(--line); }
.list-card.finished .lc-ic { background: var(--leaf); color: var(--white); }
.lc-total { font-family: var(--font-head); font-weight: 700; color: var(--forest); white-space: nowrap; }

.finished-card { background: var(--forest); color: var(--white); border-radius: 20px; padding: 16px 18px; margin-bottom: 12px; }
.finished-card .fc-top { display: flex; align-items: center; gap: 12px; }
.finished-card .fc-top > .ic { width: 38px; height: 38px; padding: 8px; border-radius: 50%; background: var(--leaf); stroke-width: 3; }
.finished-card .fc-top b { font-family: var(--font-head); font-size: 18px; display: block; }
.finished-card .fc-top span { opacity: .85; font-size: 14px; }
.finished-card .fc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.finished-card .fc-stats div { background: rgba(255, 255, 255, .1); border-radius: 14px; padding: 10px 12px; }
.finished-card .fc-stats span { font-size: 12.5px; opacity: .85; display: block; }
.finished-card .fc-stats b { font-family: var(--font-head); font-size: 19px; color: var(--sage); }
.item.readonly .item-main { cursor: default; }
.item.readonly .cb { border-color: var(--line); }
.item.readonly .cb.on { border-color: var(--leaf); background: var(--leaf); }
.item.missed .nm small { color: #A0743A; font-weight: 700; }
.money-input { display: flex; align-items: center; height: 54px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--white); padding: 0 14px; gap: 8px; }
.money-input:focus-within { border-color: var(--leaf); }
.money-input span { font-weight: 800; color: var(--forest); }
.field .money-input input { border: 0; height: 100%; padding: 0; font-size: 20px; font-weight: 700; }

.progress-card { background: var(--sage-soft); border-radius: 18px; padding: 14px 18px 16px; margin-bottom: 12px; }
.progress-card .row { display: flex; justify-content: space-between; font-weight: 800; color: var(--forest-2); margin-bottom: 10px; }
.progress-card .bar { height: 12px; background: var(--sage-mid); border-radius: 99px; overflow: hidden; }
.progress-card .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--forest), var(--leaf)); border-radius: 99px; transition: width .3s; }

.two-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.two-btns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.two-btns.raised .btn { min-width: 0; padding: 0 10px; height: 54px; background: var(--white); box-shadow: var(--shadow); color: var(--forest-2); }

.add-form { background: var(--white); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; display: grid; gap: 10px; }
.add-form .row3 { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; }

.recipe-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.recipe-chips span { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-size: 13px; font-weight: 600; color: var(--forest-2); }

.group { background: var(--white); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px; }
.group-head { width: 100%; display: flex; align-items: center; gap: 12px; background: var(--sage-soft); padding: 12px 16px; font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--forest-2); }
.group-head span { flex: 1; }
.group-head small { font-family: var(--font-body); font-size: 13px; color: var(--muted); font-weight: 700; }
.item { display: flex; align-items: center; gap: 4px; padding: 0 6px 0 16px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item-main { flex: 1; display: flex; align-items: center; gap: 14px; padding: 12px 0; min-width: 0; }
.item-main .nm { flex: 1; min-width: 0; font-size: 16px; }
.item .q { color: var(--charcoal); font-weight: 600; font-size: 15px; white-space: nowrap; }
.item.checked .nm, .item.checked .q { text-decoration: line-through; color: #9AA29C; }
.item .icon-btn { width: 36px; height: 36px; color: var(--muted); }
.hint { background: var(--sage-soft); border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; justify-content: center; font-size: 14px; color: var(--forest-2); margin-top: 6px; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 700; color: var(--forest-2); margin-bottom: 6px; }
.input, .field input, .field select, .add-form input, .add-form select {
  width: 100%; height: 50px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--white);
  padding: 0 14px; font-size: 16px; outline: 0; transition: border-color .15s;
}
.input:focus, .field input:focus, .field select:focus, .add-form input:focus, .add-form select:focus { border-color: var(--leaf); }
.field input[readonly] { background: var(--ivory); color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { background: #FBEDEB; color: var(--danger); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.form-error:empty { display: none; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; max-width: 440px; margin: 0 auto; padding: 40px 22px 30px; display: flex; flex-direction: column; }
.auth .logo { height: 70px; margin: 10px auto 26px; }
.auth h1 { font-size: 30px; line-height: 1.1; }
.auth > p { color: var(--muted); margin: 6px 0 22px; font-size: 16.5px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--sage-soft); border-radius: 14px; padding: 4px; margin-bottom: 20px; }
.seg button { height: 42px; border-radius: 11px; font-weight: 700; color: var(--forest); text-align: center; }
.seg button.on { background: var(--white); box-shadow: var(--shadow); }
.auth .foot { margin-top: auto; padding-top: 30px; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- Profile ---------- */
.profile-top { text-align: center; margin: 10px 0 20px; }
.profile-photo { width: 116px; height: 116px; border-radius: 50%; margin: 0 auto; position: relative; }
.profile-photo .ph { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--sage-soft); color: var(--forest); display: grid; place-items: center; border: 4px solid var(--white); box-shadow: 0 0 0 2px var(--sage-mid); }
.profile-photo .ph img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo .ph .ic { width: 52px; height: 52px; }
.profile-photo .cam { position: absolute; right: 0; bottom: 2px; width: 38px; height: 38px; border-radius: 50%; background: var(--forest); color: #fff; display: grid; place-items: center; border: 3px solid var(--ivory); cursor: pointer; }
.profile-photo .cam .ic { width: 18px; height: 18px; }
.profile-top h2 { font-size: 24px; margin-top: 12px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--white); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 8px; text-align: center; }
.stat b { font-family: var(--font-head); font-size: 22px; color: var(--forest); display: block; }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.menu-list button, .menu-list a { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); font-weight: 600; }
.menu-list > :last-child { border-bottom: 0; }
.menu-list span { flex: 1; }
.menu-list .ic { color: var(--leaf); }
.weight-note { background: var(--sage-soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--forest-2); font-weight: 600; margin-bottom: 14px; }
.disclaimer { font-size: 12.5px; color: var(--muted); text-align: center; margin: 22px 8px 6px; }

/* ---------- Bottom sheet ---------- */
#sheet-root { position: fixed; inset: 0; z-index: 100; display: none; }
#sheet-root.open { display: block; }
.overlay { position: absolute; inset: 0; background: rgba(18, 40, 28, .45); animation: fade .2s ease; }
.sheet {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  background: var(--ivory); border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  animation: up .25s cubic-bezier(.2, .8, .2, 1);
}
.sheet-handle { width: 44px; height: 5px; border-radius: 9px; background: var(--sage-mid); margin: 0 auto 12px; }
.sheet-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.sheet-close:hover { background: var(--sage-soft); }
.sheet h3 { font-size: 22px; padding-right: 40px; margin-bottom: 4px; }
.sheet .sub { color: var(--muted); margin-bottom: 16px; font-size: 15px; }
.sheet .label { font-weight: 800; color: var(--forest-2); font-size: 14px; margin: 6px 0 10px; }
.sheet-foot { position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); background: var(--ivory); padding: 12px 0 calc(20px + env(safe-area-inset-bottom)); margin: 8px 0 calc(-20px - env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
@keyframes up { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.opt { width: 100%; display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 16px; padding: 10px 12px; margin-bottom: 10px; box-shadow: var(--shadow); border: 2px solid transparent; }
.opt.selected { border-color: var(--leaf); }
.opt > div { flex: 1; min-width: 0; }
.opt b { display: block; font-family: var(--font-head); color: var(--forest-2); font-size: 16px; }
.opt span.m { color: var(--muted); font-size: 13.5px; display: inline-flex; align-items: center; gap: 4px; }

.choice { width: 100%; display: flex; align-items: center; gap: 14px; background: var(--white); border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); border: 2px solid transparent; }
.choice:hover { border-color: var(--sage); }
.choice .c-ic { width: 50px; height: 50px; border-radius: 14px; background: var(--sage-soft); color: var(--forest); display: grid; place-items: center; flex: none; }
.choice div { flex: 1; }
.choice b { display: block; font-family: var(--font-head); font-size: 17px; color: var(--forest-2); }
.choice span { color: var(--muted); font-size: 14px; }

.pick-row { background: var(--white); border-radius: 16px; box-shadow: var(--shadow); margin-bottom: 10px; border: 2px solid transparent; overflow: hidden; }
.pick-row.on { border-color: var(--leaf); }
.pick-main { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.pick-main > div { flex: 1; min-width: 0; }
.pick-main b { display: block; font-family: var(--font-head); color: var(--forest-2); font-size: 15.5px; line-height: 1.25; }
.pick-main span { color: var(--muted); font-size: 13px; }
.pick-extra { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 12px; border-top: 1px dashed var(--line); background: #FBFCF8; }
.pick-extra .note { font-size: 13px; color: var(--muted); line-height: 1.3; }
.pick-extra .note b { color: var(--leaf); }
.pick-extra .stepper button { width: 34px; height: 34px; }
.pick-extra .stepper .val { width: 34px; font-size: 16px; }

.day-check { display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer; }
.day-check input { width: 20px; height: 20px; accent-color: var(--forest); }
.day-check span { flex: 1; font-weight: 600; }
.day-check small { color: var(--muted); }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--forest-2); color: var(--white); padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 14.5px;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 200; max-width: calc(100% - 32px); text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 370px) {
  .hello h1, .page-title h1 { font-size: 28px; }
  .quick { font-size: 14px; padding: 14px 10px; }
  .meal-card.compact .mc-actions3 .btn { font-size: 12.5px; }
  .meal-card.compact .mc-actions3 .btn .ic { display: none; }
}
