:root {
  --rosa: #FF1F8E;
  --rosa-osc: #E0127A;
  --vino: #8B0A3C;
  --rosa-claro: #FADCE8;
  --crema: #FFF7FA;
  --choco: #3D2320;
  --choco-suave: #7A5A55;
  --dorado: #F5B301;
  --verde: #1FA25A;
  --rojo: #D7263D;
  --blanco: #FFFFFF;
  --radio: 22px;
  --sombra: 0 6px 18px rgba(139, 10, 60, .10);
  --tab-h: 74px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: #f3e3ea;
  color: var(--choco);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.45;
}
#app {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--crema);
  position: relative;
  box-shadow: 0 0 40px rgba(139, 10, 60, .08);
}
h1, h2, h3 { font-family: "Poppins", "Nunito", sans-serif; font-weight: 800; color: var(--vino); margin: 0; line-height: 1.2; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: var(--vino);
  color: #fff;
}
.topbar h1 { color: #fff; font-size: 20px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .back {
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.15); color: #fff; font-size: 32px; line-height: 1; padding-bottom: 4px; cursor: pointer;
}
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--rosa); color: #fff; text-decoration: none;
  display: grid; place-items: center; font-family: "Poppins"; font-weight: 800; font-size: 19px;
  border: 3px solid rgba(255,255,255,.6);
}

main { padding: 16px 16px calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); }

/* ---------- Menu inferior ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--rosa-claro);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 16px rgba(139,10,60,.08);
}
.tabbar a {
  height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--choco-suave); font-size: 13px; font-weight: 800;
}
.tabbar .ti { font-size: 26px; line-height: 1; filter: grayscale(.6); opacity: .8; }
.tabbar a.on { color: var(--rosa); }
.tabbar a.on .ti { filter: none; opacity: 1; transform: scale(1.1); }
.tabbar a.on::after { content: ""; width: 26px; height: 4px; border-radius: 4px; background: var(--rosa); margin-top: 2px; }

/* ---------- Sub-abas ---------- */
.subtabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 4px; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a {
  flex: 0 0 auto; padding: 10px 18px; border-radius: 999px;
  background: #fff; border: 2px solid var(--rosa-claro);
  text-decoration: none; font-weight: 800; font-size: 16px; color: var(--choco);
}
.subtabs a.on { background: var(--rosa); border-color: var(--rosa); color: #fff; }

/* ---------- Cartões ---------- */
.card {
  background: #fff; border-radius: var(--radio); padding: 18px;
  box-shadow: var(--sombra); margin-bottom: 14px;
}
.card.soft { background: var(--rosa-claro); box-shadow: none; }
.card.soft .progress { background: #fff; }
.card h3 { margin-bottom: 8px; }
.muted { color: var(--choco-suave); font-size: 16px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 12px; }
.section-title h2 { font-size: 21px; }

/* ---------- Botões ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; padding: 12px 18px;
  border: 0; border-radius: 18px; cursor: pointer;
  background: var(--rosa); color: #fff; text-decoration: none;
  font-family: "Poppins", sans-serif; font-weight: 700; font-size: 18px; text-align: center;
  box-shadow: 0 5px 0 var(--rosa-osc);
  transition: transform .08s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--rosa-osc); }
.btn.sec { background: #fff; color: var(--vino); border: 2px solid var(--rosa); box-shadow: none; }
.btn.vino { background: var(--vino); box-shadow: 0 5px 0 #5c0628; }
.btn.wa { background: #25D366; box-shadow: 0 5px 0 #1a9e4b; }
.btn.small { min-height: 46px; font-size: 16px; border-radius: 14px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-big {
  min-height: 84px; font-size: 22px; border-radius: 24px;
  background: linear-gradient(135deg, var(--rosa), #ff5aa9);
}

/* ---------- Formulários ---------- */
label.field { display: block; font-weight: 800; margin-bottom: 14px; }
label.field > span { display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=number], select, textarea {
  width: 100%; min-height: 56px; padding: 12px 14px;
  border: 2px solid var(--rosa-claro); border-radius: 14px; background: #fff;
  font-size: 18px; font-weight: 700;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rosa); }
.input-money { position: relative; }
.input-money::before { content: attr(data-sym); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--choco-suave); }
.input-money input { padding-left: 44px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
  width: 56px; height: 56px; flex: 0 0 56px; border-radius: 50%; border: 0;
  background: var(--rosa); color: #fff; font-size: 30px; font-weight: 800; cursor: pointer;
}
.stepper input { text-align: center; font-size: 24px; }

/* ---------- Saudação / painel ---------- */
.hello h2 { font-size: 28px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.kpi { background: #fff; border-radius: var(--radio); padding: 16px; box-shadow: var(--sombra); }
.kpi .lbl { font-size: 15px; font-weight: 800; color: var(--choco-suave); }
.kpi .val { font-family: "Poppins"; font-weight: 800; font-size: 26px; color: var(--vino); }
.verde { color: var(--verde) !important; }
.rojo { color: var(--rojo) !important; }

.progress { height: 14px; background: var(--rosa-claro); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--rosa), var(--dorado)); border-radius: 99px; transition: width .4s; }

/* ---------- Receitas ---------- */
.cover {
  position: relative; border-radius: 18px; overflow: hidden;
  aspect-ratio: 16 / 10; display: grid; place-items: center;
  font-size: 74px;
}
.cover .emoji { filter: drop-shadow(0 8px 10px rgba(0,0,0,.18)); }
.badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--dorado); color: var(--choco); font-weight: 900; font-size: 13px;
  padding: 4px 10px; border-radius: 999px; letter-spacing: .5px; font-family: "Poppins";
}
.play {
  position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.92); display: grid; place-items: center; font-size: 16px; color: var(--rosa);
}
.fav {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); font-size: 22px; cursor: pointer; display: grid; place-items: center;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rcard { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); text-decoration: none; display: block; overflow: hidden; }
.rcard .cover { border-radius: 0; font-size: 56px; }
.rcard .body { padding: 10px 12px 12px; }
.rcard .name { font-weight: 800; font-size: 16px; line-height: 1.25; color: var(--choco); }
.rcard .meta { font-size: 14px; color: var(--choco-suave); font-weight: 700; margin-top: 2px; }
.paga {
  display: inline-block; margin-top: 6px; padding: 3px 9px; border-radius: 999px;
  background: #E3F6EB; color: var(--verde); font-weight: 900; font-size: 13px;
}
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--rosa-claro);
  background: #fff; font-weight: 800; font-size: 15px; cursor: pointer;
}
.chip.on { background: var(--vino); border-color: var(--vino); color: #fff; }
.search { position: relative; margin-bottom: 12px; }
.search input { padding-left: 48px; border-radius: 999px; }
.search::before { content: "🔍"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 18px; }

.ficha { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ficha div { background: var(--rosa-claro); border-radius: 14px; padding: 10px 6px; text-align: center; }
.ficha b { display: block; font-size: 17px; color: var(--vino); font-family: "Poppins"; }
.ficha small { font-size: 13px; font-weight: 700; color: var(--choco-suave); }

.check {
  display: flex; align-items: center; gap: 14px; padding: 12px 4px;
  border-bottom: 1px dashed var(--rosa-claro); cursor: pointer;
}
.check:last-child { border-bottom: 0; }
.check input { width: 28px; height: 28px; accent-color: var(--rosa); flex: 0 0 28px; }
.check.done .txt { text-decoration: line-through; opacity: .55; }
.check .qty { font-weight: 900; color: var(--vino); white-space: nowrap; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 16px 52px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; border-radius: 50%; background: var(--rosa); color: #fff;
  display: grid; place-items: center; font-weight: 900; font-family: "Poppins";
}

/* ---------- Vídeo ---------- */
.video { position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-soon { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; font-weight: 800; }
.video-soon span { display: block; font-size: 64px; }
.foto-receta { aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: #f3e3ea; box-shadow: var(--sombra); }
.foto-receta img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-receta span { font-size: 96px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.18)); }

/* ---------- Modo cozinha ---------- */
.cocina { position: fixed; inset: 0; z-index: 50; background: var(--vino); color: #fff; display: flex; flex-direction: column; padding: calc(20px + env(safe-area-inset-top)) 22px calc(22px + env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto; }
.cocina .top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.cocina .x { width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 26px; cursor: pointer; }
.cocina .paso { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.cocina .num { font-family: "Poppins"; font-weight: 800; font-size: 22px; color: var(--dorado); margin-bottom: 14px; }
.cocina .txt { font-size: 30px; line-height: 1.35; font-weight: 800; }
.cocina .nav { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.cocina .btn.sec { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }

/* ---------- Calculadora ---------- */
.result {
  background: linear-gradient(160deg, #fff 0%, #fff 60%, #FFF0F6 100%);
  border: 3px solid var(--rosa-claro);
}
.result .line { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--rosa-claro); gap: 10px; }
.result .line:last-child { border-bottom: 0; }
.result .line b { font-family: "Poppins"; font-size: 22px; white-space: nowrap; }
.result .big { text-align: center; padding: 14px 0 6px; }
.result .big .lbl { font-weight: 800; color: var(--choco-suave); }
.result .big .val { font-family: "Poppins"; font-weight: 800; font-size: 46px; line-height: 1.1; }
.alerta {
  background: #FDE7EA; color: var(--rojo); border: 2px solid var(--rojo);
  border-radius: 16px; padding: 12px 14px; font-weight: 900; margin-top: 12px; text-align: center;
}
.sim { font-size: 20px; font-weight: 800; line-height: 1.6; }
.sim input { display: inline-block; width: 90px; min-height: 48px; text-align: center; margin: 0 4px; }
.ing-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--rosa-claro); }
.ing-row:last-child { border-bottom: 0; }
.ing-row .n { font-weight: 800; }
.ing-row .s { font-size: 14px; color: var(--choco-suave); font-weight: 700; }
.ing-row input { width: 120px; min-height: 50px; text-align: right; }
.price-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; grid-column: 1 / -1; }
.price-edit input { width: 100%; }
.price-edit label { font-size: 13px; font-weight: 800; color: var(--choco-suave); }
.custom-ing { background: var(--crema); border-radius: 16px; padding: 12px; margin-bottom: 10px; position: relative; }
.custom-ing .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 8px; }
.custom-ing .grid3 label { font-size: 13px; font-weight: 800; color: var(--choco-suave); }
.custom-ing .grid3 input { min-height: 48px; padding: 8px; font-size: 16px; }
.del { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; font-size: 16px; }

/* ---------- Vender ---------- */
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--rosa-claro); }
.pick:last-child { border-bottom: 0; }
.pick input[type=checkbox] { width: 28px; height: 28px; accent-color: var(--rosa); flex: 0 0 28px; }
.pick .em { font-size: 30px; }
.pick .price { width: 110px; flex: 0 0 110px; }
.pick .price input { min-height: 48px; text-align: right; }
.templates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tpl { border: 3px solid transparent; border-radius: 16px; padding: 10px 6px; text-align: center; cursor: pointer; font-weight: 800; font-size: 14px; background: #fff; box-shadow: var(--sombra); }
.tpl.on { border-color: var(--rosa); }
.tpl .sw { height: 48px; border-radius: 10px; margin-bottom: 6px; }
.menu-preview { width: 100%; border-radius: 18px; box-shadow: var(--sombra); display: block; }
.msg { white-space: pre-wrap; background: var(--crema); border-radius: 16px; padding: 14px; font-size: 17px; margin: 10px 0 12px; border-left: 5px solid var(--rosa); }
.day { display: flex; gap: 14px; align-items: flex-start; }
.day .n {
  flex: 0 0 52px; height: 52px; border-radius: 50%; background: var(--rosa-claro); color: var(--vino);
  display: grid; place-items: center; font-family: "Poppins"; font-weight: 800; font-size: 14px; text-align: center; line-height: 1.05;
}
.day.done .n { background: var(--dorado); color: var(--choco); font-size: 24px; }
.seal { text-align: center; padding: 22px 16px; background: linear-gradient(160deg, #FFF4CF, #FFE08A); border-radius: var(--radio); margin-bottom: 14px; }
.seal .medal { font-size: 72px; }

/* ---------- Guias ---------- */
.tip { display: flex; gap: 12px; align-items: flex-start; }
.tip .n { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--dorado); display: grid; place-items: center; font-weight: 900; }

/* ---------- Diversos ---------- */
.empty { text-align: center; padding: 30px 16px; color: var(--choco-suave); font-weight: 700; }
.empty .big { font-size: 56px; }
.soon { position: relative; opacity: .95; }
.soon .tag { position: absolute; top: 14px; right: 14px; background: var(--dorado); font-weight: 900; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--choco); color: #fff; padding: 14px 22px; border-radius: 999px; font-weight: 800;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: 90%; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; width: 100%; height: 100%; }

/* Abertura / cadastro */
.splash { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 20px 40px; }
.splash img { width: 78%; max-width: 320px; display: block; margin: 0 auto 10px; }
.splash .slogan { text-align: center; font-weight: 800; font-size: 20px; color: var(--vino); margin-bottom: 22px; }
.onb #topbar, .onb #tabbar, .cook #tabbar { display: none; }
.onb main { padding-bottom: 24px; }

@media (min-width: 520px) {
  body { padding: 0; }
}

/* Lista do Recetario */
.rcard { position: relative; }
.rrow {
  position: relative; display: flex; align-items: center; gap: 14px;
  background: #fff; border-radius: var(--radio); box-shadow: var(--sombra);
  padding: 12px 56px 12px 12px; margin-bottom: 12px; text-decoration: none;
}
.rrow .thumb { width: 78px; height: 78px; flex: 0 0 78px; border-radius: 18px; display: grid; place-items: center; font-size: 42px; }
.rrow .name { font-weight: 800; font-size: 17px; line-height: 1.25; }
.rrow .meta { font-size: 14px; color: var(--choco-suave); font-weight: 700; }
.rrow .fav { top: 50%; transform: translateY(-50%); background: var(--crema); }
.mini-badge { background: var(--dorado); color: var(--choco); font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 99px; vertical-align: middle; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: " ▾"; color: var(--rosa); }
details[open] > summary::after { content: " ▴"; }

/* Bolinha de receitas novas na aba */
.tabbar .ti { position: relative; }
.dot {
  position: absolute; top: -6px; right: -12px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 99px; background: var(--rojo); color: #fff; font: 900 12px/20px "Nunito", sans-serif;
  text-align: center; border: 2px solid #fff;
}
.dot[hidden] { display: none; }
button:disabled { opacity: .6; }
