/* Fórmulas de produção (v20). Janelas usam o visual de pedidos.css (.acp-modal...). */
.acpf-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border-soft); margin-top: 1rem; }
.acpf-tab { border: 0; background: none; padding: .6rem .9rem; font-weight: 600; font-size: .9rem; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.acpf-tab:hover { color: var(--purple); }
.acpf-tab.ativo { color: var(--purple); border-bottom-color: var(--purple); font-weight: 700; }
.acpf-n { margin-left: .25rem; padding: .05rem .5rem; border-radius: var(--r-pill); background: #f3e9fb; font-size: .75rem; }

/* modo Fórmulas: some o resto da tela Produção (cartões de estoque, lista, gráfico) */
.acpf-modo > :not(:first-child):not(#acai-formulas-lista) { display: none !important; }
#acai-formulas-lista:empty { display: none; }
#acai-formulas-lista { margin-top: 1rem; }

.acpf-topo { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.acpf-sub { margin: 0; color: var(--ink-soft); font-size: .9rem; flex: 1 1 260px; }
.acpf-dim { color: var(--ink-soft); font-size: .8rem; }
.acpf-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.acpf-card { background: var(--surface); border-radius: var(--r-lg); padding: 1.1rem 1.2rem; box-shadow: var(--sh-sm); display: flex; flex-direction: column; gap: .8rem; border: 2px solid transparent; min-width: 0; }
.acpf-card.destaque { border-color: var(--purple-l); }
.acpf-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.acpf-card h3 { margin: 0; font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }
.acpf-selo { padding: .2rem .6rem; border-radius: var(--r-pill); background: #f3e9fb; color: var(--purple-d); font-size: .72rem; font-weight: 700; white-space: nowrap; }
.acpf-rende { display: flex; align-items: baseline; gap: .4rem; }
.acpf-rende strong { font-family: var(--f-display); font-size: 1.6rem; line-height: 1; }
.acpf-rende span { color: var(--ink-soft); font-size: .82rem; }
.acpf-barra { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--border-soft); }
.acpf-itens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; }
.acpf-itens li { display: flex; justify-content: space-between; gap: .5rem; }
.acpf-pt { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .5rem; }
.acpf-rodape { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .75rem; color: var(--ink-soft); padding-top: .6rem; border-top: 1px solid var(--border-soft); margin-top: auto; }
.acpf-acoes { display: flex; gap: .5rem; }
.acpf-btn-out { background: var(--surface); border: 1px solid var(--purple-l); color: var(--purple-d); font-weight: 600; }
.acpf-btn-out:hover { background: #f3e9fb; color: var(--purple-d); }
.acpf-btn-ic { width: 44px; flex: 0 0 auto; border: 1px solid var(--border); }
.acpf-nova { min-height: 200px; border: 2px dashed #d9cdea; border-radius: var(--r-lg); background: #fbf9fe; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: var(--purple-d); font-weight: 600; cursor: pointer; }
.acpf-nova small { font-weight: 400; color: var(--ink-soft); }
.acpf-nova:hover { border-color: var(--purple-l); }
.acpf-ic { width: 44px; height: 44px; border-radius: 12px; background: #f3e9fb; color: var(--purple-d); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.acpf-vazio { padding: 2rem; text-align: center; color: var(--ink-soft); }
.acpf-vazio-grande { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 2rem 1.25rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; }
.acpf-vazio-grande span:not(.acpf-ic) { color: var(--ink-soft); max-width: 460px; font-size: .9rem; }
.acpf-info { margin-top: 1rem; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: .9rem 1.1rem; display: flex; gap: .8rem; align-items: flex-start; font-size: .84rem; color: var(--ink-soft); line-height: 1.55; }
.acpf-info strong { color: var(--ink); }
.acpf-ic-info { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; background: var(--sun-s); color: var(--sun-d); display: flex; align-items: center; justify-content: center; }

/* janelas */
.acpf-box-lg { max-width: 600px !important; }
.acpf-modal .acp-modal__box { max-width: 520px; }
.acpf-g2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .75rem; }
.acpf-caixa-roxa, .acpf-caixa { margin: 1rem 0 0; padding: .9rem 1rem 1rem; border-radius: var(--r-md); display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.acpf-caixa-roxa { border: 2px solid var(--purple-l); }
.acpf-caixa { border: 1px solid var(--border); }
.acpf-caixa-roxa legend, .acpf-caixa legend { float: none; width: auto; padding: 0 .4rem; margin: 0; font-size: .85rem; font-weight: 700; color: var(--purple-d); }
.acpf-caixa legend { color: var(--ink); }
.acpf-lin { display: grid; grid-template-columns: minmax(0, 1fr) 130px 44px; gap: .5rem; align-items: center; }
.acpf-lin-ing { grid-template-columns: minmax(0, 1fr) 90px 80px 44px; }
.acpf-lin-cab { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.acpf-x { width: 44px; height: 40px; border: 1px solid #f3c5c3; border-radius: var(--r-sm); background: var(--surface); color: var(--danger-d); display: flex; align-items: center; justify-content: center; }
.acpf-x:disabled { opacity: .35; }
.acpf-add { align-self: flex-start; border: 1px solid var(--border); }
.acpf-resumo { display: flex; justify-content: space-between; gap: .75rem; padding: .7rem .85rem; border-radius: var(--r-sm); background: var(--surface-alt); margin-top: .25rem; }
.acpf-resumo strong { display: block; font-family: var(--f-display); font-size: 1rem; }
.acpf-custo { color: var(--danger-d); }

.acpf-passos { list-style: none; margin: 0; padding: 0 1.5rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: .8rem; font-weight: 600; border-bottom: 1px solid var(--border-soft); }
.acpf-passos li { display: flex; align-items: center; gap: .45rem; padding: .7rem 0; border-bottom: 2px solid transparent; color: var(--ink-soft); margin-bottom: -1px; }
.acpf-passos li span { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; box-sizing: border-box; }
.acpf-passos li.ativo { color: var(--purple); border-bottom-color: var(--purple); }
.acpf-passos li.ativo span { background: var(--purple); border-color: var(--purple); color: #fff; }
.acpf-passos li.feito { color: var(--leaf-d); border-bottom-color: var(--leaf); }
.acpf-passos li.feito span { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.acpf-sem-borda { border: 0; padding: 0; margin: 0; min-width: 0; }
.acpf-sem-borda legend { float: none; }
.acpf-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.acpf-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .85rem; border-radius: var(--r-sm); border: 1px solid var(--border); font-size: .9rem; cursor: pointer; min-height: 44px; box-sizing: border-box; }
.acpf-chip input { accent-color: var(--purple); margin: 0; }
.acpf-chip.ativo { border: 2px solid var(--purple); background: #f3e9fb; color: var(--purple-d); font-weight: 700; }
.acpf-chip-sem { border-style: dashed; color: var(--ink-soft); }
.acpf-stepper { display: flex; gap: .35rem; align-items: center; }
.acpf-stepper .btn { width: 44px; height: 44px; border: 1px solid var(--border); font-weight: 700; font-size: 1.1rem; padding: 0; }
.acpf-stepper input { width: 72px; text-align: center; font-weight: 700; }
.acpf-estoque { padding: .55rem .8rem; border-radius: var(--r-sm); background: var(--surface-alt); }
.acpf-estoque strong { display: block; }
.acpf-previa { border: 2px solid var(--purple-l); border-radius: var(--r-md); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .7rem; }
.acpf-previa-top { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; font-size: .9rem; }
.acpf-grande { font-family: var(--f-display); font-size: 1.25rem; color: var(--purple-d); white-space: nowrap; }
.acpf-separar { padding: .55rem .75rem; border-radius: var(--r-sm); background: var(--sun-s); color: #7a4a06; font-size: .84rem; line-height: 1.5; }
.acpf-preparo summary { cursor: pointer; font-size: .84rem; font-weight: 600; color: var(--purple-d); }
.acpf-preparo div { white-space: pre-line; font-size: .84rem; color: var(--ink-soft); margin-top: .35rem; }
.acpf-tag-formula { display: flex; align-items: center; gap: .55rem; padding: .55rem .8rem; border-radius: var(--r-sm); background: #f3e9fb; color: var(--purple-d); font-size: .85rem; margin-bottom: .9rem; }
.acpf-res { margin-bottom: .6rem; }
.acpf-nota { font-size: .75rem; margin-top: .2rem; }
.acpf-nota-ok { color: var(--leaf-d); }
.acpf-nota-mud { color: #8a5508; }
.acpf-mudou { border: 2px solid var(--sun) !important; }
.acpf-impacto { margin-top: 1rem; border-radius: var(--r-md); background: var(--surface-alt); padding: .8rem 1rem; display: flex; flex-direction: column; gap: .35rem; font-size: .88rem; }
.acpf-imp-tit { font-family: var(--f-display); }
.acpf-imp-lin { display: flex; justify-content: space-between; gap: .75rem; }
.acpf-imp-lin > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.acpf-imp-lin > span:last-child { white-space: nowrap; }
.acpf-imp-tot { border-top: 1px solid var(--border); padding-top: .45rem; margin-top: .2rem; }
.acpf-menos { color: var(--danger-d); } .acpf-mais { color: var(--leaf-d); }
.acpf-atualizar { display: flex; gap: .6rem; align-items: flex-start; margin-top: .9rem; font-size: .85rem; line-height: 1.45; }
.acpf-atualizar input { accent-color: var(--purple); width: 16px; height: 16px; margin-top: 2px; flex: 0 0 auto; }
.acpf-toast { position: fixed; z-index: 1080; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; gap: .6rem; align-items: center;
  max-width: calc(100vw - 32px); background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: var(--r-md); box-shadow: var(--sh-lg); font-size: .9rem; transition: opacity .4s ease; }
.acpf-toast i { color: #6fe39f; }
.acpf-toast--sai { opacity: 0; }

@media (max-width: 520px) {
  .acpf-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acpf-tab { text-align: center; }
  .acpf-topo .btn { width: 100%; justify-content: center; }
  .acpf-g2 { grid-template-columns: minmax(0, 1fr); }
  .acpf-lin { grid-template-columns: minmax(0, 1fr) 104px 44px; }
  .acpf-lin-ing { grid-template-columns: minmax(0, 1fr) 70px 64px 40px; gap: .35rem; }
  .acpf-lin-ing .acpf-x { width: 40px; }
  .acpf-passos { padding: 0 1rem; }
}
