/* ════════════════════════════════════════════════
   DOCE CONTA — Estilo Principal
   ════════════════════════════════════════════════ */

:root {
  color-scheme: light dark;

  /* Cores da marca */
  --pink: #D4537E;
  --pink-dark: #993556;
  --pink-light: #FBEAF0;
  --pink-mid: #F4C0D1;
  --pink-deep: #72243E;

  /* Fundos e superfícies */
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface2: #F5F5F5;

  /* Bordas */
  --border: rgba(0, 0, 0, 0.08);
  --border2: rgba(0, 0, 0, 0.14);

  /* Texto */
  --text: #1A1A1A;
  --text2: #666;
  --text3: #999;

  /* Estados */
  --green: #1D9E75;
  --green-bg: #E1F5EE;
  --amber: #BA7517;
  --amber-bg: #FAEEDA;
  --red: #E24B4A;

  /* Raios */
  --r: 10px;
}

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

html,
body {
  height: 100%;
  background: #e8e0e5;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
}

/* ──────────── SHELL ──────────── */
.shell {
  width: 100%;
  height: 100dvh;
  /* dynamic viewport — desconta barra do browser */
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Desktop: exibe como frame de celular centralizado */
@media (min-width: 600px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #e2e2e2;
  }

  .shell {
    width: 390px;
    height: 844px;
    max-height: 95vh;
    border-radius: 32px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
    overflow: hidden;
  }
}

/* ──────────── TOPBAR ──────────── */
.topbar {
  background: var(--pink-light);
  padding: 14px 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--pink-mid);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
}

.logo-name {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--pink-deep);
  letter-spacing: -0.3px;
}

.back-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(212, 83, 126, 0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.back-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--pink);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.page-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.action-btn {
  font-size: 16px;
  font-weight: 500;
  color: var(--pink);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: color .15s;
}

.action-btn.mod {
  color: var(--pink-dark);
  font-weight: 600;
}

.action-btn.mod::after {
  content: ' ●';
  font-size: 8px;
  vertical-align: super;
  color: var(--pink);
}

.add-recipe-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}

.add-recipe-btn svg {
  width: 15px;
  height: 15px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* ──────────── CONTEÚDO PRINCIPAL ──────────── */
.content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.scr {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  position: relative;
}

.scr.on {
  display: flex;
  animation: scr-in 0.2s ease both;
}

@keyframes scr-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.scroll-body::-webkit-scrollbar {
  display: none;
}

/* ──────────── FAB ──────────── */
@keyframes fab-pop {
  0% {
    transform: scale(0.4) rotate(-15deg);
    opacity: 0;
  }

  65% {
    transform: scale(1.12) rotate(3deg);
  }

  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.fab {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--pink);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(212, 83, 126, 0.45);
  z-index: 20;
  flex-shrink: 0;
  animation: fab-pop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.fab svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
}

.fab:active {
  transform: scale(0.88);
  box-shadow: 0 2px 8px rgba(212, 83, 126, 0.35);
}

/* padding extra no topbar da tela Minha Receita */
.topbar--pad {
  padding-top: 14px;
}

/* ──────────── TOPBAR USER ──────────── */
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  position: relative;
}

.topbar-greeting {
  font-size: 12px;
  font-weight: 500;
  color: var(--pink-deep);
  white-space: nowrap;
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(212, 83, 126, 0.35);
  cursor: pointer;
  user-select: none;
}

.avatar-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  min-width: 160px;
  z-index: 200;
}

.avatar-menu-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
}

.avatar-menu-item:hover {
  background: var(--hover);
}

.avatar-menu-sair {
  color: #dc2626;
}

.plans-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.plans-close-btn:hover {
  background: var(--hover);
}

/* ──────────── BOTTOM NAV ──────────── */
.bottom-nav {
  height: 80px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  padding-top: 8px;
  flex-shrink: 0;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 4px 0;
  transition: transform 0.12s ease;
}

.nav-item:active {
  transform: scale(0.85);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: var(--text3);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item span {
  font-size: 10px;
  color: var(--text3);
  font-weight: 500;
}

.nav-item.on svg {
  stroke: var(--pink);
}

.nav-item.on span {
  color: var(--pink);
}

/* ──────────── BUSCA ──────────── */
.search-frozen {
  padding: 10px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 9px 12px;
}

.search-box svg {
  width: 15px;
  height: 15px;
  stroke: var(--text3);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  outline: none;
  font-family: inherit;
}

.search-box input::placeholder {
  color: var(--text3);
}

.search-clear {
  font-size: 16px;
  color: var(--text3);
  cursor: pointer;
  display: none;
  line-height: 1;
}

.search-clear.show {
  display: block;
}

.search-count {
  font-size: 10px;
  color: var(--text3);
  padding: 4px 14px 0;
}

/* ──────────── RECEITAS LIST ──────────── */
.recipe-item {
  margin: 0 14px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.recipe-item:active {
  background: var(--surface2);
  transform: scale(0.984);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
}

.recipe-info {
  flex: 1;
  min-width: 0;
}

.recipe-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.recipe-meta {
  font-size: 11px;
  color: var(--text3);
}

.recipe-price {
  text-align: right;
  flex-shrink: 0;
}

.recipe-venda {
  font-family: 'DM Serif Display', serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--pink-dark);
  letter-spacing: -0.2px;
}

.recipe-porcao {
  font-size: 10px;
  color: var(--text3);
}

.recipe-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.icon-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn.dup svg {
  stroke: var(--pink);
}

.icon-btn.del svg,
.icon-btn.del-ico svg {
  stroke: var(--red);
}

.icon-btn.edit-ico svg {
  stroke: var(--pink);
}

.empty-state {
  padding: 30px 14px;
  text-align: center;
  color: var(--text3);
  font-size: 13px;
  display: none;
}

.empty-state.show {
  display: block;
}

/* ──────────── TOGGLE SEM FORMA ──────────── */
.sem-forma-toggle {
  margin: 12px 14px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
}

.sf-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.sf-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sf-text strong {
  font-size: 13px;
  color: var(--text);
}

.sf-sub {
  font-size: 11px;
  color: var(--text3);
}

.sf-switch {
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: var(--border);
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.sf-switch.on {
  background: var(--pink);
}

.sf-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.sf-switch.on .sf-knob {
  left: 21px;
}

.sf-unidades {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ──────────── RECIPE THUMBNAIL (lista) ──────────── */
.recipe-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.recipe-thumb-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.recipe-thumb-placeholder svg {
  width: 20px;
  height: 20px;
  stroke: var(--text3);
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ──────────── FOTO DA RECEITA — miniatura no cabeçalho ──────────── */
.rec-foto-mini {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 1.5px dashed var(--pink-mid);
  background: var(--pink-light);
  transition: opacity 0.15s;
}

.rec-foto-mini:active { opacity: 0.75; }

.rec-foto-mini-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rec-foto-mini-placeholder svg {
  width: 22px;
  height: 22px;
  stroke: var(--pink);
  opacity: 0.7;
}

.rec-foto-mini-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rec-foto-mini-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.rec-foto-mini-del svg {
  width: 8px;
  height: 8px;
  stroke: #fff;
}

.rec-foto-pro-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .6px;
  color: #fff;
  background: var(--pink);
  padding: 3px 0;
  display: none;
}

/* ──────────── MODAL DE CROP ──────────── */
.crop-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #000;
  flex-direction: column;
}

.crop-overlay.show {
  display: flex;
}

.crop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 56px;
  flex-shrink: 0;
  background: #111;
  border-bottom: 1px solid #222;
}

.crop-titulo {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.crop-btn-cancel {
  font-size: 14px;
  color: #aaa;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
}

.crop-btn-save {
  font-size: 14px;
  font-weight: 600;
  color: var(--pink);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
}

.crop-body {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.crop-body img {
  display: block;
  max-width: 100%;
}

.crop-hint {
  text-align: center;
  font-size: 11px;
  color: #555;
  padding: 8px 0;
  flex-shrink: 0;
  background: #111;
}

/* ──────────── RECEITA — TOPO ──────────── */
.recipe-name-bar {
  background: var(--pink-light);
  padding: 10px 14px;
  border-bottom: 1px solid var(--pink-mid);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rname-inp {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--pink-mid);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--pink-deep);
  background: #fff;
  font-family: inherit;
  outline: none;
}

.rname-inp::placeholder {
  color: var(--pink-mid);
  font-weight: 400;
}

.recipe-top-inner {
  background: var(--pink-light);
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--pink-mid);
}

.rt-row2 {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: flex-end;
}

.rt-field {
  flex: 1;
  min-width: 0;
  position: relative;
}

.rt-lbl {
  font-size: 9px;
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  height: 16px;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 3px;
}

.info-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-size: 7px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}

.rt-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rt-inp {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--pink-mid);
  border-radius: 7px;
  font-size: 13px;
  color: var(--pink);
  font-weight: 600;
  background: #fff;
  font-family: inherit;
  outline: none;
}

.rt-unit {
  font-size: 11px;
  color: var(--pink);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ──────────── CARDS DE RESULTADO ──────────── */
.rt-results {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 7px;
  margin-bottom: 8px;
}

.rt-res {
  background: #fff;
  border: 1px solid var(--pink-mid);
  border-radius: 8px;
  padding: 8px 9px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.rt-res-lbl {
  font-size: 11px;
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  margin-bottom: 4px;
}

.rt-res-val {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--pink-deep);
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.rt-res-val.venda {
  font-size: 18px;
  color: var(--pink-dark);
}

.rt-res--destaque {
  background: #fff;
  border: 2px solid var(--pink);
  box-shadow: 0 4px 18px rgba(212, 83, 126, 0.22);
  transform: scale(1.06);
  position: relative;
  z-index: 1;
}

.rt-res--destaque .rt-res-lbl {
  color: var(--pink);
  font-size: 10px;
  letter-spacing: 0.8px;
}

.rt-res--destaque .rt-res-val {
  color: var(--pink) !important;
  font-size: 22px !important;
  font-weight: 700;
}

.rt-res-val.empty {
  color: var(--text3);
  font-size: 12px;
}

/* ──────────── SELETOR DE FORMA (combo box) ──────────── */
.forma-sel-combo {
  width: 100%;
  padding: 9px 36px 9px 12px;
  border: 1px solid var(--pink-mid);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pink);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23D4537E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  margin-bottom: 8px;
  cursor: pointer;
  outline: none;
}

/* ──────────── CARD DE COMPLETUDE ──────────── */
.card-completude {
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  margin: 8px 0 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
}

.card-completude.amber {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid rgba(186, 117, 23, 0.22);
}

.card-completude.red {
  background: #FDEAEA;
  color: var(--red);
  border: 1px solid rgba(226, 75, 74, 0.22);
}

.card-completude.green {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(29, 158, 117, 0.25);
}

/* ──────────── SIMULAR PORÇÃO ──────────── */
#porcao-wrap {
  margin-bottom: 16px;
}

/* ──────────── AVISO PREÇO DESATUALIZADO ──────────── */
#aviso-preco-desatualizado {
  gap: 10px;
  align-items: flex-start;
  background: #fff8ec;
  border: 1px solid #f5c518;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #7a5200;
  margin-top: 12px;
  line-height: 1.5;
}

/* ──────────── BOTÃO VISÃO GERAL ──────────── */
.visao-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--pink-mid);
  border-radius: 8px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pink-dark);
  cursor: pointer;
  font-family: inherit;
}

.visao-btn svg {
  width: 15px;
  height: 15px;
  stroke: var(--pink);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visao-btn-revenda {
  border-color: #7c3aed44;
  color: #7c3aed;
  margin-top: 6px;
}
.visao-btn-revenda svg {
  stroke: #7c3aed;
}

/* ──────────── REVENDA ──────────── */
.rv-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.rv-inputs .rt-field {
  flex: 1;
}
.rv-alert {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  text-align: center;
}
.rv-alert-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.rv-alert-warn {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid #fde68a;
}
.rv-alert-ok {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(29,158,117,.25);
}
.rv-table td:last-child {
  text-align: right;
  font-weight: 600;
}

/* ──────────── BOTÃO BAIXAR RECEITA ──────────── */
.baixar-btn {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s, background .15s;
}

.baixar-btn:hover {
  border-color: var(--pink);
  color: var(--pink);
  background: rgba(214, 63, 126, .04);
}

.baixar-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.baixar-pro {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--pink);
  background: rgba(214, 63, 126, .1);
  border-radius: 4px;
  padding: 2px 5px;
  margin-left: 2px;
}

/* ──────────── ÁREA PRO ──────────── */
.area-pro-wrap {
  margin-top: 8px;
  border: 1px solid rgba(214, 63, 126, .25);
  border-radius: 12px;
  padding: 10px 10px 8px;
  background: linear-gradient(135deg, rgba(214,63,126,.04) 0%, rgba(214,63,126,.08) 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.area-pro-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--pink);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.area-pro-icon {
  width: 12px;
  height: 12px;
  fill: var(--pink);
  stroke: none;
  flex-shrink: 0;
}
.area-pro-wrap .baixar-btn,
.area-pro-wrap .visao-btn {
  margin-top: 0;
}

/* ──────────── MODAL ALERTA INGREDIENTE ──────────── */
.alerta-ing-header {
  text-align: center;
  padding: 12px 0 18px;
}

.alerta-ing-icone {
  font-size: 28px;
  margin-bottom: 8px;
}

.alerta-ing-titulo {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.alerta-ing-sub {
  font-size: 12px;
  color: var(--text3);
}

.alerta-rec-item {
  padding: 10px 12px;
  background: var(--surface2);
  border-radius: 8px;
  margin-bottom: 6px;
}

.alerta-rec-nome {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.alerta-rec-valores {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.alerta-rec-old {
  color: var(--text3);
  text-decoration: line-through;
}

.alerta-rec-seta {
  color: var(--text3);
  font-size: 10px;
}

.alerta-rec-new {
  font-weight: 600;
}

.alerta-rec-new.subiu {
  color: #dc2626;
}

.alerta-rec-new.baixou {
  color: var(--green);
}

.alerta-rec-delta {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.alerta-rec-delta.subiu {
  background: #fef2f2;
  color: #dc2626;
}

.alerta-rec-delta.baixou {
  background: var(--green-bg);
  color: var(--green);
}

/* ──────────── MODAL PLANO NECESSÁRIO ──────────── */
.plano-req-hero {
  text-align: center;
  padding: 16px 8px 20px;
}

.plano-req-icon {
  font-size: 34px;
  margin-bottom: 10px;
}

.plano-req-titulo {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.plano-req-sub {
  font-size: 13px;
  color: var(--text3);
}

.plano-req-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
}

.plano-req-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text2);
  background: var(--surface2);
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.4;
}

.plano-req-check {
  color: var(--pink);
  font-weight: 700;
  flex-shrink: 0;
}

/* ──────────── ÁREA DE IMPRESSÃO / PDF ──────────── */
#print-area {
  display: none;
}

@media print {
  body>*:not(#print-area) {
    display: none !important;
  }

  #print-area {
    display: block !important;
    padding: 24px;
    font-family: Arial, sans-serif;
    color: #222;
    font-size: 12px;
  }
}

.print-doc {
  max-width: 800px;
  margin: 0 auto;
}

.print-header {
  text-align: center;
  border-bottom: 2px solid #d63f7e;
  padding-bottom: 14px;
  margin-bottom: 22px;
}

.print-logo {
  font-size: 10px;
  font-weight: 700;
  color: #d63f7e;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.print-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}

.print-meta {
  font-size: 11px;
  color: #999;
}

.print-section {
  margin-bottom: 22px;
}

.print-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: #d63f7e;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
  margin-bottom: 10px;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.print-table th {
  background: #f7f7f7;
  text-align: left;
  padding: 6px 8px;
  font-weight: 600;
  border-bottom: 2px solid #ddd;
}

.print-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #f0f0f0;
}

.print-table .tot-row td {
  font-weight: 700;
  background: #fff5f9;
  border-top: 2px solid #d63f7e;
  border-bottom: none;
}

.print-table .r {
  text-align: right;
}

.print-summary {
  display: flex;
  gap: 12px;
  margin: 18px 0;
}

.print-sum-box {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  background: #f7f7f7;
  border-radius: 8px;
}

.print-sum-lbl {
  font-size: 10px;
  color: #999;
  margin-bottom: 4px;
}

.print-sum-val {
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

.print-sum-val.pink {
  color: #d63f7e;
}

.print-footer {
  text-align: center;
  font-size: 10px;
  color: #ccc;
  border-top: 1px solid #eee;
  padding-top: 12px;
  margin-top: 20px;
}

/* ──────────── TOOLTIP ──────────── */
.tooltip {
  display: none;
  position: fixed;
  width: 210px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 11px;
  color: var(--text2);
  line-height: 1.5;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  --arrow-left: 14px;
}

.tooltip.show {
  display: block;
}

.tooltip strong {
  color: var(--text);
  font-weight: 600;
}

/* Seta aponta para o botão i — posição controlada por --arrow-left */
.tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  left: var(--arrow-left);
  width: 8px;
  height: 8px;
  background: var(--surface);
  border-top: 1px solid var(--border2);
  border-left: 1px solid var(--border2);
  transform: rotate(45deg);
  margin-left: -4px;
}

/* Tooltip abre para cima: seta fica embaixo apontando para baixo */
.tooltip[data-tip-above="1"]::before {
  top: auto;
  bottom: -5px;
  transform: rotate(225deg);
}

/* ──────────── CONTROLES DE ACORDEÃO ──────────── */
.acc-controls {
  display: flex;
  gap: 8px;
  padding: 10px 14px 2px;
}

.acc-ctrl {
  flex: 1;
  padding: 7px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--surface);
  font-size: 11px;
  color: var(--text2);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  font-weight: 500;
}

/* ──────────── ACORDEÃO ──────────── */
.cad-acc {
  margin: 8px 14px 0;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
}

.cad-acc:last-child {
  margin-bottom: 14px;
}

.cad-head {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  background: var(--surface2);
  gap: 9px;
  user-select: none;
  border-radius: var(--r);
  transition: background 0.15s;
}

.cad-head:active {
  background: var(--pink-light);
}

.cad-ico {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: -0.3px;
}

.ico-pk {
  background: #FBEAF0;
  color: #993556;
}

.ico-am {
  background: #FAEEDA;
  color: #854F0B;
}

.ico-tl {
  background: #E1F5EE;
  color: #0F6E56;
}

.ico-pp {
  background: #EEEDFE;
  color: #3C3489;
}

.ico-bl {
  background: #E6F1FB;
  color: #185FA5;
}

.ico-cfg {
  background: #F1EFE8;
  color: #444441;
}

.ico-mo {
  background: #FDE8F0;
  color: #72243E;
}

.cad-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.cad-count {
  font-size: 10px;
  color: var(--text3);
  margin-right: 2px;
}

.cad-arr {
  font-size: 12px;
  color: var(--text3);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.cad-arr.open {
  transform: rotate(180deg);
}

.cad-add {
  padding: 9px 12px;
  background: var(--surface2);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
}

.cad-items {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.cad-items.open {
  max-height: 1800px;
  border-top: 1px solid var(--border);
}

/* ──────────── INPUTS COMPARTILHADOS ──────────── */
.a-sel {
  flex: 1;
  min-width: 0;
  padding: 7px 5px;
  border: 1px solid var(--border2);
  border-radius: 7px;
  font-size: 11px;
  color: var(--text);
  background: var(--surface);
  font-family: inherit;
}

.a-qty {
  flex: 0 0 56px;
  width: 56px;
  padding: 7px 5px;
  border: 1px solid var(--border2);
  border-radius: 7px;
  font-size: 12px;
  text-align: center;
  color: var(--text);
  background: var(--surface);
  font-family: inherit;
  outline: none;
}

.a-btn {
  padding: 7px 12px;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.a-btn-sm {
  padding: 6px 11px;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.a-inp {
  flex: 1;
  padding: 7px 9px;
  border: 1px solid var(--border2);
  border-radius: 7px;
  font-size: 12px;
  color: var(--text);
  background: var(--surface);
  font-family: inherit;
  outline: none;
}

.a-inp-sm {
  width: 90px;
  flex: none;
  padding: 7px 8px;
  border: 1px solid var(--border2);
  border-radius: 7px;
  font-size: 12px;
  color: var(--text);
  background: var(--surface);
  font-family: inherit;
  outline: none;
}

.a-sel-sm {
  padding: 7px 5px;
  border: 1px solid var(--border2);
  border-radius: 7px;
  font-size: 11px;
  color: var(--text);
  background: var(--surface);
  font-family: inherit;
}

/* ──────────── AUTOCOMPLETE ──────────── */
.ac-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
}

.ac-inp {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border2);
  border-radius: 7px;
  font-size: 12px;
  color: var(--text);
  background: var(--surface);
  font-family: inherit;
  outline: none;
}

.un-lbl {
  padding: 7px 8px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 7px;
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
}

.ac-drop {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 9px;
  z-index: 200;
  display: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  max-height: 200px;
  overflow-y: auto;
}

.ac-opt {
  padding: 10px 13px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ac-opt:last-child {
  border-bottom: none;
}

.ac-opt:active {
  background: var(--surface2);
}

.ac-un {
  font-size: 10px;
  color: var(--text3);
}

/* ──────────── ITENS DA RECEITA ──────────── */
.it {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  gap: 7px;
}

.it:last-of-type {
  border-bottom: none;
}

.it-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.it-name {
  font-size: 12px;
  color: var(--text);
  white-space: normal;
  line-height: 1.3;
}

.it-qty {
  font-size: 11px;
  color: var(--text3);
  white-space: nowrap;
}

.it-cost {
  font-family: 'DM Serif Display', serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--pink-dark);
  min-width: 58px;
  text-align: right;
  letter-spacing: -0.1px;
}

.it-del {
  font-size: 17px;
  color: var(--text3);
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}

/* ──────────── TABELAS (ingredientes, cadastros) ──────────── */
.tbl-row {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.tbl-row:last-child {
  border-bottom: none;
}

.tbl-name {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tbl-unit {
  font-size: 11px;
  color: var(--text3);
  flex-shrink: 0;
}

.tbl-info {
  flex: 1;
  min-width: 0;
}

.tbl-info .tbl-name {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.3;
}

.tbl-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px;
  flex-wrap: wrap;
}

.tbl-price {
  font-size: 12px;
  font-weight: 500;
  color: var(--pink-dark);
  min-width: 120px;
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
}

.tbl-icons {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.equip-cat {
  padding: 7px 12px 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}


/* ──────────── CONFIGURAÇÕES ──────────── */
.cfg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.cfg-row:last-child {
  border-bottom: none;
}

.cfg-lbl {
  font-size: 13px;
  color: var(--text);
  flex: 1;
}

.cfg-inp {
  width: 110px;
  padding: 6px 8px;
  border: 1px solid var(--border2);
  border-radius: 7px;
  font-size: 12px;
  text-align: right;
  color: var(--text);
  background: var(--surface2);
  font-family: inherit;
  outline: none;
}

.cfg-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.cfg-badge.on {
  background: var(--green-bg);
  color: var(--green);
}

.cfg-badge.off {
  background: var(--surface2);
  color: var(--text3);
}

.cfg-info {
  margin: 10px 14px 14px;
  background: var(--amber-bg);
  border-radius: var(--r);
  padding: 10px 13px;
  font-size: 11px;
  color: var(--amber);
  line-height: 1.6;
  font-weight: 500;
}

/* ──────────── BADGES ──────────── */
.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

.badge-g {
  background: var(--green-bg);
  color: var(--green);
}

.badge-a {
  background: var(--amber-bg);
  color: var(--amber);
}

.badge-pk {
  background: var(--pink-light);
  color: var(--pink-dark);
}

.badge-excluido {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  background: #fee2e2;
  color: #dc2626;
  vertical-align: middle;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.it-deleted .it-name {
  color: var(--text3);
  text-decoration: line-through;
}

.it-deleted .it-cost {
  color: var(--text3);
}

/* ──────────── LOADING OVERLAY ──────────── */
#loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 9999;
}

.loading-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--pink-light);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-msg {
  font-size: 12px;
  color: var(--text3);
}

/* ──────────── TOAST ──────────── */
.toast {
  position: absolute;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(16px) scale(0.94);
  background: #1A1A1A;
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 500;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.toast svg {
  width: 14px;
  height: 14px;
  stroke: #4ade80;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  flex-shrink: 0;
}

/* ──────────── MODAIS ──────────── */
.modal-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 300;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 16px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text3);
}

.modal-sub {
  padding: 4px 16px 10px;
  font-size: 13px;
  color: var(--text2);
  flex-shrink: 0;
}

.modal-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 16px;
}

.modal-scroll::-webkit-scrollbar {
  display: none;
}

.modal-btns {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-cancel {
  flex: 1;
  padding: 13px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  background: var(--surface2);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.modal-del {
  flex: 1;
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: var(--red);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}

.modal-ok {
  flex: 1;
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: var(--pink);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}

/* ──────────── VISÃO GERAL TABELA ──────────── */
.vg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 10px 0;
}

.vg-table th {
  background: var(--surface2);
  padding: 8px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border);
}

.vg-table th:not(:first-child) {
  text-align: right;
}

.vg-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.vg-table td:not(:first-child) {
  text-align: right;
}

.vg-table tr:last-child td {
  border-bottom: none;
}

.vg-table .tot-row td {
  font-weight: 600;
  color: var(--pink-dark);
  background: var(--pink-light);
  border-top: 1px solid var(--pink-mid);
}

.vg-info {
  background: var(--green-bg);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
}

.vg-info-line {
  font-size: 12px;
  color: #0F6E56;
  margin-bottom: 4px;
  font-weight: 500;
}

.vg-info-line:last-child {
  margin-bottom: 0;
}

.vg-info-line strong {
  font-weight: 700;
}


/* ──────────── MODAL FIELD LABEL ──────────── */
.modal-field-lbl {
  font-size: 11px;
  color: var(--text2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 6px;
}

/* ──────────── LISTA FILTRADA DE INGREDIENTES ──────────── */
.ing-lista-header {
  padding: 7px 12px;
  font-size: 10px;
  font-weight: 700;
  color: var(--pink-deep);
  background: var(--pink-light);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--pink-mid);
}

.ing-lista-filtrada {
  border: 2px solid var(--pink);
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(212, 83, 126, 0.12);
  max-height: 200px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ing-lista-filtrada::-webkit-scrollbar {
  display: none;
}

.ing-lista-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  gap: 8px;
}

.ing-lista-item:last-child {
  border-bottom: none;
}

.ing-lista-item:active,
.ing-lista-item.selected {
  background: var(--pink-light);
}

.ing-lista-item-nome {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.ing-lista-item-detalhe {
  font-size: 11px;
  color: var(--text3);
  text-align: right;
}

/* ═══════════════════════════════════════════════════
   DESKTOP — layout sidebar (≥ 960px)
   ═══════════════════════════════════════════════════ */
@media (min-width: 960px) {

  /* ── body / fundo ── */
  body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #ede8e4;
    min-height: 100vh;
  }

  /* ── Shell: grade 2 colunas ── */
  .shell {
    width: 100%;
    max-width: 1300px;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: grid;
    grid-template-areas:
      "header  header"
      "sidebar main  ";
    grid-template-columns: 220px 1fr;
    grid-template-rows: auto 1fr;
  }

  /* ── Topbar ── */
  .topbar {
    grid-area: header;
    padding: 10px 36px 12px;
  }

  .topbar--pad {
    padding-top: 10px;
  }

  /* ── Sidebar ── */
  .bottom-nav {
    grid-area: sidebar;
    width: 220px;
    height: 100%;
    border-top: none;
    border-right: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 0 20px;
    background: var(--surface);
  }

  .nav-item {
    flex-direction: row;
    gap: 12px;
    padding: 11px 18px;
    margin: 1px 10px;
    border-radius: 10px;
    justify-content: flex-start;
  }

  .nav-item:hover {
    background: var(--surface2);
  }

  .nav-item.on {
    background: var(--pink-light);
  }

  .nav-item:active {
    transform: none;
  }

  .nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .nav-item span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text2);
  }

  .nav-item.on span {
    color: var(--pink);
    font-weight: 600;
  }

  /* ── Conteúdo principal: padding horizontal uniforme ── */
  .content {
    grid-area: main;
    background: var(--bg);
    overflow: hidden;
    padding: 0 36px;
    /* todo o conteúdo fica insetado da borda */
  }

  .scr.on {
    animation: none;
  }

  /* ── Reset de margens laterais (o padding do .content já posiciona) ── */
  .scroll-body,
  .search-frozen,
  .search-count,
  .acc-controls,
  .recipe-name-bar,
  .recipe-top-inner {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  /* Barra de busca */
  .search-frozen {
    padding-left: 0;
    padding-right: 0;
    padding-top: 16px;
    background: transparent;
    border-bottom: none;
  }

  .search-count {
    padding-left: 0;
    padding-right: 0;
  }

  .acc-controls {
    padding-left: 0;
    padding-right: 0;
  }

  .scroll-body {
    padding-bottom: 40px;
  }

  #s-receitas .scroll-body {
    padding-bottom: 80px;
  }

  /* Acordeões: fill total (padding já está no .content) */
  .scroll-body .cad-acc {
    margin-left: 0;
    margin-right: 0;
  }

  .cfg-info {
    margin-left: 0;
    margin-right: 0;
  }

  /* ── Minha Receita: name-bar + top-inner como card unificado ── */
  .recipe-name-bar {
    margin-top: 20px;
    padding: 14px 20px;
    border: 1px solid var(--pink-mid);
    border-bottom: none;
    border-radius: var(--r) var(--r) 0 0;
  }

  .recipe-top-inner {
    padding: 18px 20px 12px;
    border: 1px solid var(--pink-mid);
    border-top: none;
    border-radius: 0 0 var(--r) var(--r);
  }

  /* ── FAB ── */
  .fab {
    right: 28px;
    bottom: 28px;
  }

  /* ── Modais: centralizados, tamanho fixo ── */
  .modal-overlay {
    justify-content: center;
    align-items: center;
  }

  .modal {
    border-radius: 16px;
    margin-bottom: 0;
    max-width: 480px;
    width: 100%;
  }

  /* ════════════════════════════════════════
     FONTES, CAMPOS E BOTÕES MAIORES NO DESKTOP
     ════════════════════════════════════════ */

  /* ── Topbar ── */
  .logo-mark {
    width: 34px;
    height: 34px;
    font-size: 12px;
    border-radius: 9px;
  }

  .logo-name {
    font-size: 22px;
  }

  .topbar-greeting {
    font-size: 14px;
  }

  .topbar-avatar {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .back-btn {
    width: 38px;
    height: 38px;
  }

  .page-title {
    font-size: 19px;
  }

  .action-btn {
    font-size: 16px;
  }

  /* ── Nome da receita ── */
  .rname-inp {
    font-size: 22px;
    padding: 14px 16px;
  }

  /* ── Labels e unidades ── */
  .rt-lbl {
    font-size: 12px;
    height: auto;
    margin-bottom: 6px;
    letter-spacing: 0.6px;
  }

  .rt-unit {
    font-size: 15px;
  }

  /* ── Inputs de rendimento / margem / perda ── */
  .rt-inp {
    font-size: 18px;
    padding: 12px 14px;
  }

  /* ── Cards de resultado (Custo / Preço / Lucro) ── */
  .rt-results {
    gap: 20px;
  }

  .rt-res {
    padding: 16px 18px;
  }

  .rt-res-lbl {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .rt-res-val {
    font-size: 22px;
  }

  .rt-res-val.venda {
    font-size: 28px;
  }

  /* ── Botão visão geral ── */
  .visao-btn {
    font-size: 15px;
    padding: 12px 16px;
  }

  .visao-btn svg {
    width: 18px;
    height: 18px;
  }

  /* ── Card completude ── */
  .card-completude {
    font-size: 13px;
    padding: 12px 16px;
  }

  /* ── Controles de accordion ── */
  .acc-ctrl {
    font-size: 13px;
    padding: 9px 14px;
  }

  /* ── Cabeçalho de accordion ── */
  .cad-head {
    padding: 14px 16px;
  }

  .cad-ico {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  .cad-title {
    font-size: 15px;
  }

  .cad-count {
    font-size: 12px;
  }

  .cad-arr {
    font-size: 14px;
  }

  /* ── Área de adição (add forms) ── */
  .cad-add {
    padding: 12px 16px;
    gap: 10px;
  }

  /* ── Inputs gerais ── */
  .a-inp,
  .a-inp-sm {
    font-size: 15px;
    padding: 9px 11px;
  }

  .a-sel,
  .a-sel-sm {
    font-size: 15px;
    padding: 9px 8px;
  }

  .a-qty {
    font-size: 15px;
    padding: 9px 6px;
    flex: 0 0 68px;
    width: 68px;
  }

  .ac-inp {
    font-size: 15px;
    padding: 9px 11px;
  }

  .un-lbl {
    font-size: 13px;
    padding: 9px 10px;
  }

  /* ── Botões de ação ── */
  .a-btn {
    font-size: 20px;
    padding: 9px 16px;
    border-radius: 9px;
  }

  .a-btn-sm {
    font-size: 15px;
    padding: 9px 16px;
    border-radius: 9px;
  }

  /* ── Linhas de tabela (ingredientes / cadastros) ── */
  .tbl-row {
    padding: 13px 16px;
  }

  .tbl-name {
    font-size: 15px;
  }

  .tbl-sub {
    font-size: 13px;
    margin-top: 4px;
  }

  .tbl-price {
    font-size: 14px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .icon-btn svg {
    width: 16px;
    height: 16px;
  }

  /* ── Itens dentro de receita ── */
  .it {
    padding: 12px 16px;
  }

  .it-name {
    font-size: 14px;
  }

  .it-qty {
    font-size: 13px;
  }

  .it-cost {
    font-size: 15px;
  }

  /* ── Lista de receitas ── */
  .recipe-item {
    padding: 16px 18px;
    margin: 0 0 10px;
    border-radius: 12px;
  }

  .recipe-name {
    font-size: 17px;
    margin-bottom: 4px;
  }

  .recipe-meta {
    font-size: 13px;
  }

  .recipe-venda {
    font-size: 20px;
  }

  .recipe-porcao {
    font-size: 12px;
  }

  .icon-btn.dup,
  .icon-btn.del {
    width: 34px;
    height: 34px;
  }

  /* ── Busca (receitas e ingredientes) ── */
  .search-box {
    padding: 12px 16px;
    border-radius: 12px;
  }

  .search-box input {
    font-size: 16px;
  }

  .search-box svg {
    width: 18px;
    height: 18px;
  }

  .search-count {
    font-size: 12px;
    padding-top: 6px;
  }

  /* ── Configurações ── */
  .cfg-row {
    padding: 14px 18px;
  }

  .cfg-lbl {
    font-size: 15px;
  }

  .cfg-inp {
    font-size: 15px;
    padding: 8px 12px;
    width: 130px;
    border-radius: 9px;
  }

  .cfg-info {
    font-size: 13px;
    padding: 14px 18px;
  }

  .cfg-badge {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 7px;
  }

  /* ── Seletor de forma (dropdown) ── */
  .forma-sel-combo {
    font-size: 15px;
    padding: 12px 14px;
    margin-bottom: 12px;
  }

  /* ── Ing selector (busca na receita) ── */
  .ing-lista-item {
    padding: 13px 16px;
  }

  .ing-lista-item-nome {
    font-size: 15px;
  }

  .ing-lista-item-detalhe {
    font-size: 13px;
  }

  /* ── Limite de largura do conteúdo (evita esticamento em monitores largos) ── */
  .scroll-body,
  .recipe-name-bar,
  .recipe-top-inner {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  .search-frozen,
  .search-count,
  .acc-controls {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
}

.ing-lista-vazio {
  padding: 14px 12px;
  font-size: 12px;
  color: var(--text3);
  text-align: center;
}

/* ═══════════════════════════════════════════════════
   TELA DE AUTENTICAÇÃO
   ═══════════════════════════════════════════════════ */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: linear-gradient(145deg, #fce8f0 0%, #fdf4f8 60%, #fef9fb 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.auth-box {
  margin: auto 0;
}

.auth-box {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(212, 83, 126, 0.13), 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 32px 28px 28px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

/* Abas login / registro */
.auth-tabs {
  display: flex;
  background: var(--surface2);
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}

.auth-tab {
  flex: 1;
  padding: 9px 0;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text3);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.on {
  background: #fff;
  color: var(--pink);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

/* Formulários */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.auth-inp {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.18s;
  box-sizing: border-box;
}

select.auth-inp {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.auth-inp:focus {
  border-color: var(--pink);
  background: #ffffff;
}

.auth-error {
  font-size: 13px;
  color: #dc2626;
  min-height: 16px;
  text-align: center;
}

.auth-btn {
  width: 100%;
  padding: 13px;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(212, 83, 126, 0.35);
  transition: transform 0.14s, box-shadow 0.14s;
}

.auth-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(212, 83, 126, 0.25);
}

.auth-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text3);
  margin: 0;
}

.auth-btn-ghost {
  width: 100%;
  padding: 11px;
  background: transparent;
  color: var(--text3);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.auth-btn-ghost:hover {
  border-color: var(--text2);
  color: var(--text2);
}

.auth-link {
  background: none;
  border: none;
  color: var(--pink);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s;
}

.auth-link:hover {
  text-decoration-color: var(--pink);
}

/* ──────────── BANNER TRIAL ──────────── */
.trial-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff8e6;
  color: #7a4a00;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 14px;
  border-bottom: 1px solid #ffd27a;
  flex-shrink: 0;
}

.trial-banner-btn {
  margin-left: auto;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.trial-banner-close {
  background: none;
  border: none;
  color: #7a4a00;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
}

/* ──────────── BANNER PWA ──────────── */
.pwa-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  flex-shrink: 0;
}

.pwa-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pwa-banner-text strong {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.pwa-banner-text span {
  font-size: 11px;
  color: var(--text3);
}

.pwa-banner-btn {
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.pwa-banner-close {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
}

/* ── Tela de planos ── */
.plans-box {
  max-width: 480px;
  position: relative;
}

@media (min-width: 820px) {
  .plans-box {
    max-width: 980px;
  }

  .plan-card {
    padding: 20px 18px;
  }

  .plan-features {
    gap: 6px;
  }
}

.plans-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 500px) {
  .plans-grid {
    flex-direction: row;
  }
}

.plan-card {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.14s;
}

.plan-card:hover {
  border-color: var(--pink);
  box-shadow: 0 4px 18px rgba(212, 83, 126, 0.15);
  transform: translateY(-2px);
}

.plan-card:active {
  transform: scale(0.97);
}

.plan-destaque {
  border-color: var(--pink);
  background: var(--pink-light);
}

.plan-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pink);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.plan-nome {
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-economia {
  background: rgba(212, 83, 126, 0.15);
  color: var(--pink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: none;
  line-height: 1;
  flex-shrink: 0;
}

.plans-garantia {
  text-align: center;
  font-size: 12px;
  color: var(--text3);
  font-weight: 500;
}

.plan-preco {
  font-size: 22px;
  font-weight: 700;
  color: var(--pink);
  font-family: 'DM Serif Display', serif;
}

.plan-periodo {
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
}

.plan-features {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.plan-features li {
  font-size: 11.5px;
  color: var(--text2);
  padding-left: 16px;
  position: relative;
  line-height: 1.45;
  text-align: left;
}

.plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--pink);
  font-weight: 700;
  font-size: 11.5px;
}

@media (min-width: 820px) {
  .plan-features li {
    font-size: 13px;
  }
  .plan-features li::before {
    font-size: 13px;
  }
}

.plan-status-badge {
  display: none;
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text3);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .4px;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  text-transform: uppercase;
}

.plan-card.plan-atual .plan-status-badge,
.plan-card.plan-indisponivel .plan-status-badge {
  display: block;
}

.plan-card.plan-atual {
  opacity: 0.65;
  pointer-events: none;
}

.plan-card.plan-indisponivel {
  opacity: 0.4;
  pointer-events: none;
}

/* ── Bloco de conta em Configurações ── */
.cfg-conta {
  margin: 0 14px 14px;
}

.cfg-conta-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cfg-conta-info {
  flex: 1;
  min-width: 0;
}

.cfg-conta-nome {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.cfg-conta-email {
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cfg-conta-status {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
}

.status-ativo {
  background: #dcfce7;
  color: #15803d;
}

.status-trial {
  background: #fef3c7;
  color: #92400e;
}

.status-alerta {
  background: #fee2e2;
  color: #dc2626;
}

.cfg-logout-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.cfg-logout-btn:hover {
  border-color: #dc2626;
  color: #dc2626;
}

.trial-topbar-chip {
  background: rgba(212, 83, 126, 0.12);
  color: var(--pink);
  border: 1px solid rgba(212, 83, 126, 0.3);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s;
}

.trial-topbar-chip:hover {
  background: rgba(212, 83, 126, 0.22);
}

.cfg-conta-vencimento {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

.cfg-suporte-link {
  font-size: 11px;
  color: var(--text3);
  text-decoration: none;
  margin-top: 6px;
  display: block;
}

.cfg-suporte-link:hover {
  color: var(--pink);
}

.plans-benefits {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(212, 83, 126, 0.07);
  border-radius: 12px;
  padding: 12px 16px;
}

.plans-benefit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
}

.plans-benefit-item span {
  color: var(--pink);
  font-weight: 700;
  font-size: 14px;
}

/* ── Toggle switch ── */
.cfg-toggle-row {
  align-items: center;
  gap: 12px;
}

.cfg-toggle-hint {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

.toggle-sw {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-sw input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--surface2);
  border-radius: 26px;
  transition: background .2s;
  border: 1.5px solid var(--border2);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-sw input:checked+.toggle-slider {
  background: var(--pink);
  border-color: var(--pink);
}

.toggle-sw input:checked+.toggle-slider::before {
  transform: translateY(-50%) translateX(18px);
}

.cfg-assinar-btn {
  margin-top: 8px;
  padding: 7px 14px;
  background: var(--pink);
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}

.cfg-assinar-btn:hover {
  opacity: 0.85;
}

/* Desktop: cfg-conta sem margem lateral */
@media (min-width: 960px) {
  .cfg-conta {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ════════════════════════════════════════════════
   TUTORIAL DE BOAS-VINDAS
   ════════════════════════════════════════════════ */
#tutorial-overlay {
  position: absolute;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  backdrop-filter: blur(3px);
}

.tutorial-card {
  background: var(--surface);
  border-radius: 24px;
  width: 100%;
  max-width: 340px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

.tutorial-pular {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.15);
  border: none;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-family: inherit;
  z-index: 1;
  transition: background .15s;
}

.tutorial-pular:hover {
  background: rgba(0, 0, 0, 0.28);
}

.tutorial-topo {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s;
}

.tutorial-icone {
  font-size: 72px;
  line-height: 1;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.12));
}

.tutorial-body {
  padding: 24px 24px 0;
  text-align: center;
  min-height: 110px;
}

.tutorial-titulo {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}

.tutorial-texto {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
}

.tutorial-footer {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.tutorial-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.tutorial-dot {
  height: 6px;
  width: 6px;
  border-radius: 3px;
  background: var(--border2);
  transition: width .25s, background .25s;
}

.tutorial-dot.on {
  width: 22px;
  background: var(--pink);
}

.tutorial-btn {
  width: 100%;
  padding: 14px;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(212, 83, 126, 0.35);
  transition: opacity .15s, transform .12s;
}

.tutorial-btn:active {
  transform: scale(0.97);
  opacity: .9;
}

/* ════════════════════════════════════════════════
   CARDS DE DELIVERY NA RECEITA
   ════════════════════════════════════════════════ */
#delivery-cards {
  margin-top: 10px;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.delivery-cards-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.delivery-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}

.delivery-card-nome {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.delivery-card-pct {
  font-size: 11px;
  font-weight: 500;
  color: var(--text3);
  background: var(--border2);
  border-radius: 4px;
  padding: 1px 5px;
}

.delivery-card-val {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

/* ════════════════════════════════════════════════
   SPOTLIGHT TOUR
   ════════════════════════════════════════════════ */
#tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

#tour-spotlight {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72), 0 0 0 3px var(--pink);
}

@keyframes tour-tip-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#tour-tooltip {
  position: fixed;
  z-index: 10001;
  left: 16px;
  right: 16px;
  background: var(--surface);
  border-radius: 18px;
  padding: 20px 20px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  animation: tour-tip-in 0.22s ease both;
}

.tour-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tour-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.tour-pular {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--text3);
  cursor: pointer;
  font-family: inherit;
  padding: 4px 0 4px 12px;
}

.tour-text {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
  margin: 0 0 18px;
}

.tour-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tour-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.tour-dot {
  height: 6px;
  width: 6px;
  border-radius: 3px;
  background: var(--border2);
  transition: width .25s, background .25s;
}

.tour-dot.on {
  width: 18px;
  background: var(--pink);
}

.tour-btn {
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(212, 83, 126, 0.35);
  transition: opacity .15s, transform .12s;
}

.tour-btn:active {
  transform: scale(0.96);
  opacity: .9;
}

/* ════════════════════════════════════════════════
   MODO ESCURO — automático pelo sistema
   ════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {

  /* ── Variáveis ── */
  :root {
    --bg: #131313;
    --surface: #1E1E1E;
    --surface2: #272727;
    --border: rgba(255, 255, 255, 0.08);
    --border2: rgba(255, 255, 255, 0.15);
    --text: #F0F0F0;
    --text2: #A0A0A0;
    --text3: #5E5E5E;
    --pink-light: #2A1520;
    --pink-mid: #5C2E42;
    --pink-deep: #F0A0BF;
    --green-bg: #0C2A1E;
    --amber-bg: #2A1E08;
    --amber: #D4952A;
  }

  /* ── Fundo externo (desktop e mobile) ── */
  html,
  body {
    background: #0E0E0E;
  }

  /* ── Tela de autenticação ── */
  .auth-screen {
    background: var(--bg);
  }

  .auth-box {
    background: var(--surface);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
  }

  /* ── Overlay dos modais ── */
  .modal-overlay {
    background: rgba(0, 0, 0, 0.70);
  }

  /* ── Avatar menu ── */
  .avatar-menu {
    background: rgba(28, 28, 28, 0.94);
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  }

  .avatar-menu-item {
    color: var(--text);
  }

  /* ── Inputs auth: fundo branco + rosa forte (contraste intencional) ── */
  .auth-inp {
    background: #ffffff !important;
    color: #C0305A;
    -webkit-text-fill-color: #C0305A;
    border-color: #D4537E;
    caret-color: #C0305A;
  }

  .auth-inp:focus {
    background: #ffffff !important;
    border-color: #C0305A;
    box-shadow: 0 0 0 3px rgba(212, 83, 126, 0.18);
  }

  .auth-inp:-webkit-autofill,
  .auth-inp:-webkit-autofill:hover,
  .auth-inp:-webkit-autofill:focus,
  .auth-inp:-webkit-autofill:active {
    -webkit-text-fill-color: #C0305A !important;
    caret-color: #C0305A;
  }

  /* ── Aba ativa da tela de auth ── */
  .auth-tab.on {
    background: #fff;
    color: #C0305A;
  }

  /* ── Inputs e selects: placeholder mais visível ── */
  input::placeholder,
  textarea::placeholder {
    color: var(--text3);
    opacity: 1;
  }

  /* ── Scrollbar sutil ── */
  ::-webkit-scrollbar {
    width: 4px;
  }

  ::-webkit-scrollbar-track {
    background: transparent;
  }

  ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
  }
}

/* ── Tabela Nutricional ── */
.rec-tipo-wrap {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.rec-tipo-wrap .sf-tipo-toggle {
  flex: 1;
  margin: 0;
}
.sub-receita-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  background: #7c3aed;
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.6;
}
.sf-tipo-toggle {
  display: flex;
  margin: 10px 0 4px;
  border: 1px solid var(--pink-mid);
  border-radius: 8px;
  overflow: hidden;
}
.sf-tipo-btn {
  flex: 1;
  border: none;
  background: none;
  padding: 7px 0;
  font-size: 13px;
  cursor: pointer;
  color: var(--text2);
  font-family: inherit;
  transition: background .15s, color .15s;
}
.sf-tipo-btn.active {
  background: var(--pink);
  color: #fff;
  font-weight: 600;
}
.nutri-tip {
  background: var(--pink-light);
  border-left: 3px solid var(--pink);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text2);
  margin-bottom: 12px;
}
.nutri-tip-ex {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--text3);
}
/* badges de status nutricional na lista de ingredientes */
.nutri-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.6;
}
.nutri-tag--manual {
  background: #8b5cf6;
  color: #fff;
}
.nutri-tag--add {
  background: transparent;
  color: var(--pink);
  border: 1px solid var(--pink-mid);
  cursor: pointer;
  font-family: inherit;
}
.nutri-tag--add:active { opacity: .7; }

/* mantém compatibilidade com código legado */
.nutri-tag-off {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  background: #f97316;
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.6;
}

/* cad-items com max-height maior para listas longas (ingredientes) */
.cad-items--tall.open {
  max-height: 5000px;
}

/* badge de contagem no accordion de nutrição */
.nutri-acc-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--surface3);
  color: var(--text3);
  flex-shrink: 0;
}
.nutri-acc-badge--warn {
  background: #fef3c7;
  color: #92400e;
}
.nutri-acc-badge--ok {
  background: #d1fae5;
  color: #065f46;
}
.nutri-acc-hint {
  font-size: 12px;
  color: var(--text3);
  padding: 10px 14px 8px;
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}
.nutri-acc-add {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.btn-nutri-add {
  width: 100%;
  padding: 9px 14px;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.btn-nutri-add:active { opacity: .85; }
.nutri-acc-sublabel {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 10px 14px 4px;
}
.nutri-acc-empty {
  padding: 14px;
  font-size: 12px;
  color: var(--text3);
  text-align: center;
}

/* rótulo superior padrão (padrão modal-edit-ing inline) */
.lbl-upper {
  font-size: 11px;
  color: var(--text2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 6px;
}

/* ── Modal: Dados Nutricionais Manual ── */
.nutri-manual-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nutri-manual-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nutri-manual-lbl {
  flex: 1;
  font-size: 13px;
  color: var(--text1);
}
.nutri-manual-inp {
  width: 90px !important;
  flex-shrink: 0;
  text-align: right;
}
.nutri-manual-remover {
  color: #ef4444 !important;
  border-color: #fca5a5 !important;
}

/* ══════════════════════════════════════════════
   TELA DE CARDÁPIO
   ══════════════════════════════════════════════ */

.cd-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cd-logo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text3);
  font-size: 11px;
  transition: border-color 0.15s;
  flex-shrink: 0;
}

.cd-logo-placeholder:hover {
  border-color: var(--pink);
  color: var(--pink);
}

.cd-logo-del-btn {
  font-size: 12px;
  color: var(--text3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
}

.cd-logo-del-btn:hover { color: var(--red); }

.cd-entrega-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text2);
  padding: 2px 0;
}

/* ── Produto no cardápio ── */
.cd-produto {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: var(--surface2);
  transition: opacity 0.15s;
}

.cd-produto--off {
  opacity: 0.4;
}

.cd-prod-foto {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.cd-prod-sem-foto {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
}

.cd-prod-dados {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cd-prod-nome {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.cd-desc-inp {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 12px;
  color: var(--text2);
  outline: none;
}

.cd-desc-inp:focus { border-color: var(--pink); }

.cd-preco-inp {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pink);
  outline: none;
}

.cd-preco-inp:focus { border-color: var(--pink); }

.cd-mv-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 99px;
  cursor: pointer;
  font-size: 11px;
  color: var(--text2);
  opacity: 0.5;
  padding: 3px 8px;
  transition: opacity .2s, background .2s, color .2s;
  white-space: nowrap;
}
.cd-mv-btn--on {
  opacity: 1;
  background: #ffeef5;
  border-color: var(--pink);
  color: var(--pink);
  font-weight: 600;
}

.cd-pag-section { display: flex; flex-direction: column; gap: 8px; }
.cd-pag-title { font-size: 12px; color: var(--text2); font-weight: 500; }
.cd-pag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cd-pag-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 5px 12px;
  user-select: none;
}
.cd-pag-item input { accent-color: var(--pink); cursor: pointer; }