/* =====================================================================
   Painel do cardápio — complementa css/style.css
   ===================================================================== */
.painel { background: var(--creme); }

/* ---------- entrar ---------- */
.entrar {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(120% 90% at 50% 10%, #5e3b29 0%, var(--marrom) 45%, var(--marrom-2) 100%);
}
.entrar__caixa { width: 100%; max-width: 380px; padding: 28px 24px 24px; border-radius: 24px; background: var(--papel); box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .5); }
.entrar__caixa > img { width: 72px; height: auto; margin: 0 auto 8px; }
.entrar h1 { margin: 0; text-align: center; font: 700 28px/1.1 var(--serif); color: var(--marrom); }
.entrar__sub { margin: 4px 0 22px; text-align: center; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--dourado-texto); }
.entrar .montador__erro { margin-top: 12px; }
.entrar__voltar { display: block; margin-top: 16px; text-align: center; font-size: 14px; color: var(--dourado-texto); text-decoration: none; }
.entrar__voltar:hover { text-decoration: underline; }
.entrar__texto { margin: -8px 0 18px; text-align: center; font-size: 14px; line-height: 1.5; color: var(--texto); }
.entrar__trocar { display: block; width: 100%; margin-top: 14px; padding: 6px; border: 0; background: none; font: 500 14px/1.3 var(--sans); color: var(--marrom); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#codigo { text-transform: uppercase; letter-spacing: .12em; }

.marcar { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 14px; color: var(--texto); cursor: pointer; }
.marcar input { width: 20px; height: 20px; accent-color: var(--marrom); flex: none; }

/* ---------- topo e abas ---------- */
.estado {
  min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(212, 175, 55, .35);
  background: rgba(255, 255, 255, .06); color: #e9d6a6; font: 500 12.5px/1 var(--sans); white-space: nowrap; cursor: default;
}
.estado[data-estado="salvando"], .estado[data-estado="pendente"] { color: #f3e2b5; border-color: rgba(212, 175, 55, .7); }
.estado[data-estado="erro"] { background: #b3261e; border-color: #b3261e; color: #fff; cursor: pointer; }

.abas { position: sticky; top: var(--topo-h); z-index: 20; background: rgba(247, 239, 227, .95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linha); }
.abas__in { max-width: 760px; margin: 0 auto; padding: 8px 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.abas button { min-height: 42px; border: 1px solid var(--linha); border-radius: 12px; background: var(--papel); font: 500 15px/1 var(--sans); color: var(--texto-2); }
.abas button.ativa { background: var(--marrom); border-color: var(--marrom); color: #f3e2b5; }

.painel__in { max-width: 760px; margin: 0 auto; padding: 16px 16px 96px; }
.faixa { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: #fdf3dc; border: 1px solid #ecd59a; font-size: 14px; color: var(--texto); }

/* ---------- categorias e produtos ---------- */
.cat { margin-bottom: 14px; padding: 6px 14px 10px; border-radius: var(--raio); background: var(--papel); border: 1px solid var(--linha); box-shadow: var(--sombra); }
.cat__topo { display: flex; align-items: center; gap: 10px; padding: 8px 0 10px; border-bottom: 1px solid var(--linha); }
.cat__nome { all: unset; flex: 1; min-width: 0; cursor: pointer; }
.cat__nome strong { font: 700 23px/1.1 var(--serif); color: var(--marrom); }
.cat__nome em { font: 400 22px/1 var(--script); color: var(--dourado-texto); font-style: normal; }
.cat__nome small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--texto-2); }
.cat__nome u { color: var(--dourado-texto); text-underline-offset: 2px; }
.cat__nome:focus-visible { outline: 2px solid var(--dourado); outline-offset: 4px; border-radius: 6px; }

.ordem { display: flex; gap: 4px; flex: none; }
.ordem button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--linha); background: #fff; color: var(--marrom); font-size: 15px; line-height: 1; }
.ordem button:disabled { opacity: .3; cursor: default; }
.ordem--mini { flex-direction: column; gap: 2px; }
.ordem--mini button { width: 28px; height: 24px; border-radius: 8px; font-size: 12px; }

.linhas { list-style: none; margin: 0; padding: 0; }
.linha { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f1e6d4; }
.linhas__vazio { padding: 14px 0; font-size: 14px; color: var(--texto-2); }
.linha__abrir { all: unset; flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.linha__abrir:focus-visible { outline: 2px solid var(--dourado); outline-offset: 2px; border-radius: 10px; }
.linha__abrir img { flex: none; width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: radial-gradient(circle, #fffdf8, #f0e1c8); }
.linha__abrir span { min-width: 0; display: flex; flex-direction: column; }
.linha__abrir strong { font: 600 16px/1.2 var(--sans); color: var(--marrom); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linha__abrir small { font-size: 13px; color: var(--texto-2); }
.linha__abrir small b { color: var(--erro); font-weight: 500; }
.linha--off img { opacity: .45; filter: grayscale(.6); }
.linha--off strong { color: var(--texto-2); }

.chave { position: relative; flex: none; width: 46px; height: 28px; cursor: pointer; }
.chave input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chave i { position: absolute; inset: 0; border-radius: 999px; background: #d9cbb4; transition: background .2s ease; pointer-events: none; }
.chave i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s ease; }
.chave input:checked + i { background: var(--whats); }
.chave input:checked + i::after { transform: translateX(18px); }
.chave input:focus-visible + i { outline: 2px solid var(--dourado); outline-offset: 2px; }

.btn-texto { display: block; width: 100%; margin-top: 4px; padding: 12px 4px; border: 0; background: none; text-align: left; font: 500 15px/1 var(--sans); color: var(--dourado-texto); }
.btn--perigo { border-color: #e7b9b4; color: var(--erro); background: transparent; }

/* ---------- editores (janelas) ---------- */
.editor__topo { position: relative; flex: none; padding: 18px 60px 14px 20px; border-bottom: 1px solid var(--linha); }
.editor__topo h3 { margin: 0; font: 700 24px/1.2 var(--serif); color: var(--marrom); }
.editor__topo .fechar { top: 50%; transform: translateY(-50%); box-shadow: none; background: var(--creme); }
.editor__corpo { flex: 1; overflow-y: auto; padding: 16px 20px 6px; }
.editor__rodape { flex: none; display: flex; justify-content: space-between; gap: 10px; padding: 12px 20px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--linha); background: var(--papel); }
.editor__rodape .btn--marrom { flex: 1; max-width: 240px; margin-left: auto; }

.foto-campo { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.foto-campo__img { position: relative; flex: none; width: 108px; height: 108px; border-radius: 16px; overflow: hidden; background: radial-gradient(circle at 50% 42%, #fffdf8 0%, #f4e7d1 60%, #e9d7ba 100%); border: 1px solid var(--linha); }
.foto-campo__img img { width: 100%; height: 100%; object-fit: cover; }
.foto-campo__btns { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.foto-campo__btns .btn { min-height: 42px; padding: 0 16px; cursor: pointer; }
.foto-campo__btns small { font-size: 12.5px; color: var(--texto-2); line-height: 1.35; }
.girando { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 250, 243, .75); }
.girando::after { content: ""; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--linha); border-top-color: var(--dourado-2); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

.campo select {
  width: 100%; min-height: 46px; padding: 11px 36px 11px 14px; border-radius: 12px; border: 1.5px solid var(--linha); font-size: 16px; appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234b2e20' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.campo input:disabled { background: #f4eee5; color: var(--texto-2); }
.campo input.invalido, .tam input.invalido { border-color: var(--erro); }

/* ---------- blocos (bolos e ajustes) ---------- */
.bloco { margin-bottom: 14px; padding: 16px; border-radius: var(--raio); background: var(--papel); border: 1px solid var(--linha); box-shadow: var(--sombra); }
.bloco h2 { margin: 0 0 4px; font: 700 22px/1.2 var(--serif); color: var(--marrom); }
.bloco > .nota:first-of-type { margin: 0 0 12px; }
.bloco--leve { background: transparent; box-shadow: none; border-style: dashed; }
.bloco--leve .nota { margin: 0 0 12px; }

.tam { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px 40px 12px 0; border-bottom: 1px solid #f1e6d4; }
.tam__nome { grid-column: 1 / -1; }
.tam .campo { margin: 0; }
.tam .campo > span { font-size: 12px; margin-bottom: 4px; }
.tam input { min-height: 42px; padding: 9px 12px; }
.tam__info { grid-column: 1 / -1; }
.remover { position: absolute; top: 34px; right: 0; width: 32px; height: 32px; border-radius: 50%; border: 1px solid #e7b9b4; background: #fff; color: var(--erro); font-size: 18px; line-height: 1; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.tag { display: inline-flex; align-items: center; gap: 2px; padding: 6px 4px 6px 12px; border-radius: 999px; background: #fff; border: 1.5px solid var(--linha); font-size: 14px; }
.tag button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--texto-2); font-size: 17px; line-height: 1; }
.tag button:hover { background: #fbe9e7; color: var(--erro); }
.tags__add { display: flex; gap: 8px; }
.tags__add input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--linha); background: #fff; font-size: 16px; }
.tags__add input:focus { outline: none; border-color: var(--dourado); }
.tags__add .btn { min-height: 44px; padding: 0 16px; flex: none; }

.decos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.deco-item { display: flex; flex-direction: column; padding: 0; border-radius: 14px; overflow: hidden; border: 1.5px solid var(--linha); background: #fff; text-align: center; }
.deco-item img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.deco-item span { padding: 7px 4px; font: 600 14px/1.15 var(--serif); color: var(--marrom); }
.deco-item--novo { justify-content: center; align-items: center; min-height: 120px; border-style: dashed; background: #fdf8ef; color: var(--dourado-texto); }
.deco-item--novo b { font-size: 30px; line-height: 1; font-weight: 400; }

@media (min-width: 640px) {
  .tam { grid-template-columns: 1fr 110px 90px 1.4fr; padding-right: 44px; }
  .tam__nome, .tam__info { grid-column: auto; }
  .remover { top: 36px; }
  .decos { grid-template-columns: repeat(5, 1fr); }
  .cat { padding: 6px 18px 10px; }
}
@media (max-width: 380px) {
  .topo__marca span { font-size: 14px; }
  .estado { padding: 0 9px; font-size: 11.5px; }
}

/* ---------- regiões, complementos e Pix ---------- */
.regiao, .compl { position: relative; display: grid; grid-template-columns: 1fr 104px; gap: 8px; padding: 8px 40px 8px 0; border-bottom: 1px solid #f1e6d4; }
.regiao .campo, .compl .campo { margin: 0; }
.regiao .campo > span, .compl .campo > span { font-size: 12px; margin-bottom: 4px; }
.regiao input, .compl input { min-height: 42px; padding: 9px 12px; }
.regiao input.invalido, .compl input.invalido { border-color: var(--erro); }
.regiao .remover, .compl .remover { top: 30px; }
.compl { grid-template-columns: 1fr 96px; }
.foto-campo__img--qr img { object-fit: contain; background: #fff; }
.btn-texto--perigo { width: auto; padding: 4px 0; color: var(--erro); }
.editor__sub { margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--linha); font: 700 18px/1.2 var(--serif); color: var(--marrom); }
