/* SamFood - mesas, comanda e cozinha. Mesma linha visual do SamVend Mobile,
   com a identidade do SamWeb (ver /brand/SAMWEB_IDENTIDADE.md). Sempre claro. */
:root {
  color-scheme: light;
  --samweb-turquesa: #14A3B8;
  --samweb-azul: #0A4D7A;
  --samweb-turquesa-claro: #BDEFF2;
  --azul: var(--samweb-turquesa);
  --azul-escuro: var(--samweb-azul);
  --azul-claro: #E1F5F7;
  --verde: #1F7A4D;
  --verde-claro: #E6F4EC;
  --ambar: #B4740E;
  --ambar-claro: #FDF1E1;
  --erro: #C23B32;
  --erro-claro: #FBEAE8;
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --linha: #E6EAF0;
  --texto: #1A2230;
  --texto-suave: #6B7788;
  --texto-fraco: #A3ADBA;
  --sombra: 0 1px 2px rgba(20, 30, 45, .04), 0 6px 16px rgba(20, 30, 45, .06);
  --sombra-forte: 0 2px 4px rgba(20, 30, 45, .06), 0 12px 28px rgba(20, 30, 45, .12);
  --raio: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--texto);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
body { min-height: 100vh; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }
small { display: block; }
.oculto { display: none !important; }
/* escolha NFC-e / NF-e na conferência do cliente */
.escolha-nota { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 14px; }
.escolha-nota span { color: #5B6B7B; margin-right: 4px; }
.escolha-nota button { flex: 1; padding: 9px 10px; border: 1px solid #D5DCE4; border-radius: 10px; background: #fff; font: inherit; font-weight: 600; color: inherit; }
.escolha-nota button.ativo { background: var(--azul); color: #fff; border-color: var(--azul); }
.suave { color: var(--texto-suave); font-size: 13px; line-height: 1.5; }
.centro { text-align: center; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- telas ---------- */
.tela { display: none; min-height: 100vh; flex-direction: column; }
.tela.ativa { display: flex; }

/* ---------- topo ---------- */
.appbar {
  background: linear-gradient(155deg, var(--azul), var(--azul-escuro)); color: #fff;
  padding: calc(12px + env(safe-area-inset-top)) 16px 14px;
  position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 10px;
}
.appbar.escura { background: linear-gradient(155deg, #22303F, #141C26); }
.appbar .quem { flex: 1; min-width: 0; }
.appbar h1 { font-size: 16.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .sub { font-size: 12.5px; opacity: .85; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icone-bt {
  width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .14);
  color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; cursor: pointer; padding: 0;
}
.icone-bt:hover { background: rgba(255, 255, 255, .22); }
.icone-bt.sair:hover { background: #C0392B; }
.icone-bt svg { width: 20px; height: 20px; }
.avatar, .logo-p {
  width: 40px; height: 40px; border-radius: 99px; background: rgba(255, 255, 255, .92); color: var(--azul-escuro);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex: 0 0 auto;
}
.logo-p { color: #22303F; }
.logo-p svg { width: 22px; height: 22px; }
.chip-garcom {
  margin-top: 3px; border: 0; background: rgba(255, 255, 255, .16); color: #fff; border-radius: 99px;
  padding: 3px 10px 3px 7px; font: inherit; font-size: 12px; display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer; max-width: 100%;
}
.chip-garcom svg { width: 13px; height: 13px; flex: 0 0 auto; }
.chip-garcom span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-garcom.vazio { background: #FDF1E1; color: var(--ambar); font-weight: 700; }

.alterna { display: flex; background: rgba(0, 0, 0, .18); border-radius: 12px; padding: 3px; gap: 2px; flex: 0 0 auto; }
.alterna button {
  border: 0; background: transparent; color: rgba(255, 255, 255, .8); font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 11px; border-radius: 9px; display: flex; align-items: center; gap: 6px; cursor: pointer;
}
.alterna button svg { width: 17px; height: 17px; }
.alterna button.ativo { background: #fff; color: var(--azul-escuro); }
.appbar.escura .alterna button.ativo { color: #22303F; }

/* ---------- conteúdo ---------- */
.conteudo { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 16px 16px 28px; }
.conteudo.largo { max-width: 1400px; }
.cartao { background: var(--card); border-radius: var(--raio); padding: 16px; margin-bottom: 14px; box-shadow: var(--sombra); }

/* ---------- formulários ---------- */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--texto-suave); margin: 0 0 6px; }
.campo { margin-bottom: 14px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--linha); border-radius: 12px;
  font-size: 16px; background: #FBFCFD; color: var(--texto); font-family: inherit; appearance: none; -webkit-appearance: none;
}
textarea { resize: vertical; min-height: 84px; }
select {
  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='%236B7788' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--azul); background-color: #fff; }
input::placeholder, textarea::placeholder { color: var(--texto-fraco); }

/* ---------- botões ---------- */
.btn {
  border: 0; border-radius: 12px; padding: 11px 16px; font: inherit; font-size: 14.5px; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  transition: transform .06s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn.primario { background: var(--azul); color: #fff; }
.btn.primario:hover { background: var(--azul-escuro); }
.btn.sucesso { background: var(--verde); color: #fff; }
.btn.sucesso:hover { background: #17603C; }
.btn.sec { background: var(--azul-claro); color: var(--azul); }
.btn.sec:hover { background: #DCE8F4; }
.btn.perigo { background: var(--erro-claro); color: var(--erro); }
.btn.grande { width: 100%; padding: 15px 16px; font-size: 16px; border-radius: 14px; }
.btn.pequeno { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.btn.pequeno svg { width: 15px; height: 15px; }
.btn-menu {
  width: 100%; border: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 600; color: var(--texto);
  display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-radius: 12px; cursor: pointer; text-align: left;
}
.btn-menu:hover { background: var(--bg); }
.btn-menu.perigo { color: var(--erro); }
.btn-menu.perigo .bolha { background: var(--erro-claro); color: var(--erro); font-size: 20px; }
.bolha {
  width: 38px; height: 38px; border-radius: 12px; background: var(--azul-claro); color: var(--azul);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; font-weight: 800; font-size: 13px;
}
.bolha svg { width: 19px; height: 19px; }

/* ---------- login ---------- */
.login { width: 100%; max-width: 400px; margin: 0 auto; padding: 48px 18px; }
.login .marca { text-align: center; margin-bottom: 22px; }
.login .logo {
  width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 12px; color: #fff;
  background: linear-gradient(155deg, var(--azul), var(--azul-escuro)); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sombra-forte);
}
.login .logo svg { width: 38px; height: 38px; }
.login h1 { font-size: 24px; }
.login .marca p { color: var(--texto-suave); margin-top: 4px; }
.link-rodape { display: block; text-align: center; margin-top: 18px; color: var(--azul); font-size: 13.5px; font-weight: 600; text-decoration: none; }

/* ---------- mapa de mesas ---------- */
.barra-mesas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 14px; }
.barra-mesas .direita { display: flex; align-items: center; gap: 8px; }
.busca-mesa { flex: 0 1 260px; min-width: 200px; }
.busca-mesa input { font-size: 16px; font-weight: 600; }
.filtros { display: flex; gap: 6px; flex-wrap: wrap; }
.filtros button {
  border: 1.5px solid var(--linha); background: #fff; color: var(--texto-suave); font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 12px; border-radius: 99px; cursor: pointer; display: flex; gap: 6px; align-items: center;
}
.filtros button b { font-weight: 800; color: var(--texto); }
.filtros button.ativo { background: var(--azul); border-color: var(--azul); color: #fff; }
.filtros button.ativo b { color: #fff; }

.grade-mesas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mesa {
  position: relative; border: 0; text-align: left; font: inherit; color: var(--texto); cursor: pointer;
  background: var(--card); border-radius: var(--raio); box-shadow: var(--sombra); padding: 12px 13px 13px;
  min-height: 118px; display: flex; flex-direction: column; gap: 4px; border-top: 5px solid var(--verde);
  transition: transform .08s, box-shadow .15s;
}
.mesa:hover { box-shadow: var(--sombra-forte); }
.mesa:active { transform: scale(.98); }
.mesa .cab { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 6px; }
.mesa .nome { font-size: 22px; font-weight: 800; letter-spacing: -.3px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mesa .nome.longo { font-size: 17px; }
.mesa .estado { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--verde); white-space: nowrap; }
.mesa .valor { font-size: 17px; font-weight: 800; margin-top: auto; }
.mesa .pe { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.mesa .info { font-size: 12px; color: var(--texto-suave); display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; min-width: 0; }
.mesa .info span { overflow: hidden; text-overflow: ellipsis; }
.mesa .info svg { width: 13px; height: 13px; flex: 0 0 auto; }
.mesa .livre-txt { margin-top: auto; font-size: 13px; color: var(--texto-fraco); }
.mesa .cli { margin-top: auto; font-size: 12.5px; font-weight: 700; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mesa .cli + .valor { margin-top: 0; }
.mesa.ocupada { border-top-color: var(--azul); background: linear-gradient(180deg, #F3F8FD, #fff 60%); }
.mesa.ocupada .estado { color: var(--azul); }
.mesa.conta { border-top-color: var(--ambar); background: linear-gradient(180deg, #FFF8EE, #fff 60%); }
.mesa.conta .estado { color: var(--ambar); }
.mesa.indisponivel { border-top-color: var(--texto-fraco); background: #EEF1F5; cursor: default; opacity: .75; }
.mesa.indisponivel .estado { color: var(--texto-suave); }
.mesa .cozinha-badge {
  flex: 0 0 auto; display: flex; align-items: center; gap: 4px;
  background: var(--ambar-claro); color: var(--ambar); font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 99px;
}
.mesa .cozinha-badge svg { width: 14px; height: 14px; }
.mesa.demorada .info.tempo { color: var(--erro); font-weight: 700; }

/* ---------- comanda ---------- */
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: var(--ambar-claro); color: #7A4E08; padding: 10px 16px; font-size: 14px;
}
.abas-comanda { display: flex; gap: 6px; padding: 12px 16px 0; background: var(--bg); position: sticky; top: 66px; z-index: 5; }
.abas-comanda button {
  flex: 1; border: 0; background: #E4E9F0; color: var(--texto-suave); font: inherit; font-size: 14.5px; font-weight: 700;
  padding: 10px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.abas-comanda button b { background: rgba(0, 0, 0, .08); border-radius: 99px; padding: 1px 8px; font-size: 12.5px; }
.abas-comanda button.ativo { background: var(--azul); color: #fff; }
.abas-comanda button.ativo b { background: rgba(255, 255, 255, .22); }

.comanda-corpo { flex: 1; width: 100%; max-width: 1400px; margin: 0 auto; padding: 12px 16px 110px; }
.painel { display: none; }
.painel.ativo { display: block; }

.busca-linha { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.busca { flex: 1; position: relative; }
.busca svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--texto-fraco); }
.busca input { padding-left: 40px; background: #fff; }
.qtdBox { display: flex; align-items: center; background: #fff; border: 1.5px solid var(--linha); border-radius: 12px; flex: 0 0 auto; }
.qtdBox button {
  width: 40px; height: 44px; border: 0; background: transparent; font-size: 22px; font-weight: 700; color: var(--azul); cursor: pointer;
}
.qtdBox span { min-width: 26px; text-align: center; font-weight: 800; font-size: 16px; }
/* quantidade digitada (1,5 kg): o número do seletor é um campo */
.qtdBox input#cdQtd { width: 56px; border: 0; background: transparent; text-align: center; font: inherit; font-weight: 800; font-size: 16px; padding: 0; color: var(--texto); outline: none; }
.qtdBox:focus-within { border-color: var(--azul); }
.qtdBox.destaque { border-color: var(--azul); background: var(--azul-claro); }
.qtdBox.grande { margin: 4px 0 16px; }
.qtdBox.grande button { width: 56px; height: 52px; }
.qtdBox.grande input { border: 0; text-align: center; font-size: 20px; font-weight: 800; background: transparent; padding: 8px 0; }

.grupos { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 4px; scrollbar-width: thin; }
.grupos button {
  flex: 0 0 auto; border: 1.5px solid var(--linha); background: #fff; color: var(--texto); font: inherit; font-size: 14px; font-weight: 700;
  padding: 9px 14px; border-radius: 99px; cursor: pointer; white-space: nowrap;
}
.grupos button.ativo { background: var(--azul-escuro); border-color: var(--azul-escuro); color: #fff; }

.produtos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.produto {
  border: 0; background: var(--card); box-shadow: var(--sombra); border-radius: 14px; padding: 12px; min-height: 92px;
  font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; color: var(--texto); position: relative;
  transition: transform .06s, box-shadow .15s;
}
.produto:hover { box-shadow: var(--sombra-forte); }
.produto:active { transform: scale(.97); }
.produto .pn { padding-right: 16px; font-size: 14px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.produto .pp { margin-top: auto; font-size: 14.5px; font-weight: 800; color: var(--azul); }
.produto .pc { position: absolute; top: 9px; right: 9px; color: var(--ambar); }
.produto .pc svg { width: 16px; height: 16px; }
.produto.flash { animation: flash .45s ease; }
@keyframes flash { 0% { background: var(--verde-claro); } 100% { background: var(--card); } }
.produto .qtd-na-comanda {
  position: absolute; bottom: 10px; right: 10px; min-width: 24px; height: 24px; border-radius: 99px; background: var(--verde); color: #fff;
  font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 6px; box-shadow: var(--sombra);
}

.lista-itens { padding: 6px 6px 4px; }
.titulo-lista { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 10px 6px; }
.titulo-lista h2 { font-size: 15px; }
.lista { display: flex; flex-direction: column; }
.item {
  display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 12px; cursor: pointer;
  border-bottom: 1px solid var(--linha);
}
.item:last-child { border-bottom: 0; }
.item:hover { background: var(--bg); }
.item .corpo { flex: 1; min-width: 0; }
.item .linha1 { font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.item .linha2 { font-size: 12.5px; color: var(--texto-suave); margin-top: 2px; }
.item .valor { font-weight: 800; font-size: 14.5px; white-space: nowrap; }
.item.novo { animation: destaque 1.2s ease; }
@keyframes destaque { 0% { background: var(--verde-claro); } 100% { background: transparent; } }
.tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 99px; margin-left: 6px; vertical-align: 1px; }
.tag.cozinha { background: var(--ambar-claro); color: var(--ambar); }
.tag.pronto { background: var(--verde-claro); color: var(--verde); }
.tag.grade { background: var(--azul-claro); color: var(--azul); }
/* [Food] ModoLancamento=Busca: busca/leitor em destaque e resultado em lista */
.ver-grupos {
  flex: 0 0 auto; height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--linha);
  background: #fff; color: var(--azul); font-weight: 700; font-size: 13.5px; cursor: pointer;
}
.ver-grupos:hover { border-color: var(--azul); }
.modo-busca .busca input { font-size: 17px; padding-top: 14px; padding-bottom: 14px; }
.modo-busca .grupos { display: none; }
.modo-busca .produtos { display: block; }
/* vista em lista (botão Lista/Cards, guardado por aparelho): uma linha por produto, mais produtos na tela */
.produtos.lista, .produtos.lista .rapido .rgrade { display: flex; flex-direction: column; gap: 0; }
.produtos.lista .produto { flex-direction: row; align-items: center; gap: 10px; min-height: 0; padding: 10px 14px; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--linha); }
.produtos.lista .produto:first-child { border-radius: 14px 14px 0 0; }
.produtos.lista .produto:last-child { border-radius: 0 0 14px 14px; border-bottom: 0; }
.produtos.lista .produto:only-child { border-radius: 14px; }
.produtos.lista .produto .pn { flex: 1; padding-right: 0; -webkit-line-clamp: 1; font-size: 14.5px; }
.produtos.lista .produto .pp { margin: 0; white-space: nowrap; }
.produtos.lista .produto .pc { position: static; order: -1; }
.produtos.lista .produto .qtd-na-comanda { position: static; }
.produtos.lista .produto.mini { min-height: 0; padding: 9px 14px; gap: 10px; }
.produtos.lista .produto.mini .pn { -webkit-line-clamp: 1; }
.plista { background: var(--card); border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; }
.plinha, .plista .pcab {
  display: grid; grid-template-columns: 90px minmax(0, 1fr) 130px 80px 100px; gap: 10px; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--linha); font-size: 14px;
}
.plista .pcab { font-size: 12px; font-weight: 700; color: var(--texto-suave); text-transform: uppercase; letter-spacing: .03em; background: var(--bg); }
.plinha { cursor: pointer; }
.plinha:last-child { border-bottom: 0; }
.plinha:hover { background: var(--azul-claro); }
.plinha.sel { background: var(--azul); color: #fff; }
.plinha.sel .suave, .plinha.sel .pp { color: #fff; }
.plinha.flash { animation: flash .45s ease; }
.plinha .pn { font-weight: 700; display: flex; align-items: center; min-width: 0; }
.plinha .pnt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plinha .tag-grade, .plinha .qtd-na-comanda { flex: 0 0 auto; }
.plinha .pp { font-weight: 800; color: var(--azul); text-align: right; }
.plinha .pe { text-align: right; }
.plinha .tag-grade { font-size: 11px; font-weight: 700; color: var(--ambar); background: var(--ambar-claro); border-radius: 6px; padding: 1px 6px; margin-left: 6px; }
.plinha.sel .tag-grade { color: var(--ambar); }
.plinha .qtd-na-comanda {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; margin-left: 8px; padding: 0 6px;
  border-radius: 99px; background: var(--verde); color: #fff; font-size: 12px; font-weight: 800; vertical-align: middle;
}
.rapido .rtit { font-size: 12px; font-weight: 700; color: var(--texto-suave); text-transform: uppercase; letter-spacing: .03em; margin: 4px 2px 8px; }
.rapido .rgrade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 18px; }
.produto.mini { min-height: 68px; padding: 10px 12px; gap: 4px; }
.produto.mini .pn { font-size: 13px; -webkit-line-clamp: 2; }
.produto.mini .pp { font-size: 13.5px; }
.produto.mini .qtd-na-comanda { bottom: 8px; right: 8px; min-width: 22px; height: 22px; font-size: 12px; }
.pdica { text-align: center; margin: 6px auto 12px; }
.pdica b { color: var(--texto); }
.pdica kbd { font: inherit; font-weight: 700; background: #fff; border: 1px solid var(--linha); border-radius: 6px; padding: 0 6px; }
@media (max-width: 700px) {
  .plinha, .plista .pcab { grid-template-columns: minmax(0, 1fr) 90px; }
  .plinha .pc2, .plinha .pr, .plinha .pe, .plista .pcab .pc2, .plista .pcab .pr, .plista .pcab .pe { display: none; }
  .plinha .pnt { white-space: normal; }
}

.vazio { text-align: center; color: var(--texto-suave); padding: 26px 12px; font-size: 14px; line-height: 1.5; }
.vazio svg { width: 34px; height: 34px; margin: 0 auto 8px; color: var(--texto-fraco); }

.totais { padding: 12px 16px; }
.totais .linha { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; color: var(--texto-suave); }
.totais .linha b { color: var(--texto); font-weight: 700; }
.totais .linha.total { border-top: 1px solid var(--linha); margin-top: 6px; padding-top: 10px; font-size: 17px; color: var(--texto); }
.totais .linha.total b { font-size: 20px; font-weight: 800; }
.obs { background: #FFF8E6; border: 1px dashed #E7C77C; color: #6B4A08; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.acoes-comanda { display: flex; gap: 8px; flex-wrap: wrap; }
.acoes-comanda .btn { flex: 1 1 140px; }

.rodape {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; background: #fff; box-shadow: 0 -2px 14px rgba(20, 30, 45, .09);
  display: flex; align-items: center; gap: 14px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}
.rodape .totais-rodape { flex: 1; min-width: 0; }
.rodape .totais-rodape small { color: var(--texto-suave); font-size: 12.5px; }
.rodape .totais-rodape b { font-size: 22px; font-weight: 800; }
.rodape .btn.grande { width: auto; flex: 0 0 auto; padding: 14px 20px; }

/* tablet/computador: cardápio e comanda lado a lado */
@media (min-width: 900px) {
  .abas-comanda { display: none; }
  .comanda-corpo { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; padding-bottom: 28px; }
  .painel { display: block; }
  .painel.pedido { position: sticky; top: 82px; }
  .rodape { position: static; box-shadow: none; background: transparent; padding: 0; margin-top: 12px; }
  #tComanda .rodape { position: fixed; right: 16px; left: auto; bottom: 16px; width: 390px; background: #fff; box-shadow: var(--sombra-forte); border-radius: 18px; padding: 12px 14px; }
  .painel.pedido { padding-bottom: 96px; }
}

/* ---------- cozinha ---------- */
.tela.cozinha { background: #EEF1F5; }
.grade-cozinha { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; align-items: start; }
.ticket { background: #fff; border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; border-top: 6px solid var(--verde); }
.ticket.atencao { border-top-color: var(--ambar); }
.ticket.atrasado { border-top-color: var(--erro); }
.ticket.novo { animation: chegou 1.6s ease; }
@keyframes chegou { 0%, 40% { box-shadow: 0 0 0 4px rgba(31, 122, 77, .45), var(--sombra); } 100% { box-shadow: var(--sombra); } }
.ticket .tcab { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 12px 14px 8px; }
.ticket .tmesa { font-size: 24px; font-weight: 800; line-height: 1.1; }
.ticket .tinfo { font-size: 12.5px; color: var(--texto-suave); margin-top: 2px; }
.ticket .ttempo { font-size: 15px; font-weight: 800; padding: 4px 9px; border-radius: 99px; background: var(--verde-claro); color: var(--verde); white-space: nowrap; }
.ticket.atencao .ttempo { background: var(--ambar-claro); color: var(--ambar); }
.ticket.atrasado .ttempo { background: var(--erro-claro); color: var(--erro); }
.ticket .tobs { margin: 0 14px 8px; background: #FFF8E6; border: 1px dashed #E7C77C; color: #6B4A08; border-radius: 10px; padding: 7px 10px; font-size: 13.5px; font-weight: 600; }
.ticket .titens { display: flex; flex-direction: column; }
.titem {
  border: 0; border-top: 1px solid var(--linha); background: #fff; font: inherit; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--texto);
}
.titem:hover { background: #F7FAF8; }
.titem .tq { font-size: 20px; font-weight: 800; min-width: 38px; }
.titem .tp { flex: 1; font-size: 16px; font-weight: 700; line-height: 1.3; }
.titem .tp small { font-weight: 500; color: var(--texto-suave); font-size: 12.5px; }
.titem .tok {
  width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--linha); display: flex; align-items: center; justify-content: center; color: transparent; flex: 0 0 auto;
}
.titem .tok svg { width: 18px; height: 18px; }
.titem:hover .tok { border-color: var(--verde); color: var(--verde); }
.titem.saindo { opacity: .35; pointer-events: none; }
.ticket .trodape { padding: 10px 14px 12px; border-top: 1px solid var(--linha); }
.ticket .trodape .btn { width: 100%; }
.cozinha-vazia { text-align: center; color: var(--texto-suave); padding: 70px 20px; font-size: 16px; }
.cozinha-vazia svg { width: 54px; height: 54px; margin: 0 auto 12px; color: var(--texto-fraco); }

/* ---------- modais ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(15, 23, 33, .45); display: none; align-items: flex-end; justify-content: center; z-index: 20;
}
.modal.topo { z-index: 30; }
.modal.aberto { display: flex; animation: aparece .15s ease; }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
.caixa {
  background: #fff; width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 92vh; overflow-y: auto; animation: sobe .2s ease;
}
@keyframes sobe { from { transform: translateY(30px); } to { transform: none; } }
@media (min-width: 700px) {
  .modal { align-items: center; }
  .caixa { border-radius: 20px; }
}
.caixa h3 { font-size: 18px; margin-bottom: 4px; }
.caixa > .suave { margin-bottom: 14px; }
.caixa.alta { min-height: 60vh; display: flex; flex-direction: column; }
.rolagem { flex: 1; overflow-y: auto; margin: 10px 0; min-height: 120px; }
.nome-consumidor { display: flex; gap: 8px; margin-bottom: 12px; }
.nome-consumidor input { flex: 1; min-width: 0; }
.nome-consumidor .btn { flex: 0 0 auto; }
.botoes { display: flex; gap: 10px; margin-top: 12px; }
.botoes .btn { flex: 1; }
.botoes.coluna { flex-direction: column; }
.alerta { background: var(--ambar-claro); color: #7A4E08; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.opcoes-grade, .opcoes-pct { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 6px 0 4px; }
.opcoes-grade button, .opcoes-pct button {
  border: 1.5px solid var(--linha); background: #fff; border-radius: 12px; padding: 12px 8px; font: inherit; font-weight: 700; cursor: pointer;
}
.opcoes-grade button small { font-weight: 500; color: var(--texto-suave); font-size: 11.5px; margin-top: 2px; }
.opcoes-grade button.zerado { opacity: .55; }
.opcoes-pct { margin-bottom: 14px; }
.opcoes-pct button.ativo { border-color: var(--azul); background: var(--azul-claro); color: var(--azul); }
.grade-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; align-content: start; }
.grade-mini button {
  border: 1.5px solid var(--linha); border-top: 4px solid var(--verde); background: #fff; border-radius: 12px; padding: 12px 6px;
  font: inherit; font-size: 17px; font-weight: 800; cursor: pointer;
}
.total-destaque { background: var(--azul-claro); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; }
.total-destaque small { color: var(--azul); font-size: 12.5px; font-weight: 600; width: 100%; }
.total-destaque b { font-size: 26px; color: var(--azul-escuro); }
/* botão Desconto dentro da caixa do total: fundo branco para não sumir no azul-claro da caixa */
.total-destaque .btn { margin-left: auto; background: #fff; border: 1px solid #C9DCEE; }
.total-destaque .btn:hover { background: #F2F7FC; }
.troco { font-weight: 800; font-size: 15px; margin: -6px 0 12px; }
.troco.ok { color: var(--verde); }
.troco.falta { color: var(--erro); }
.parcelas:not(:empty) { border: 1px solid var(--linha); border-radius: 12px; padding: 4px 12px; margin-bottom: 6px; }
.parcelas .linha { display: flex; justify-content: space-between; font-size: 13.5px; padding: 7px 0; border-bottom: 1px solid var(--linha); }
.parcelas .linha:last-child { border-bottom: 0; }
.check { width: 64px; height: 64px; border-radius: 99px; background: var(--verde-claro); color: var(--verde); margin: 4px auto 12px; display: flex; align-items: center; justify-content: center; }
.check svg { width: 34px; height: 34px; }
.troco-grande:not(:empty) { text-align: center; font-size: 24px; font-weight: 800; color: var(--verde); margin: 10px 0 14px; }

/* ---------- toast / carregando ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  background: #1A2230; color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 14px; z-index: 50; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 14px; box-shadow: var(--sombra-forte); transition: opacity .2s, transform .2s;
}
.toast.visivel { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.erro { background: var(--erro); }
.toast button { border: 0; background: rgba(255, 255, 255, .18); color: #fff; font: inherit; font-weight: 800; padding: 6px 10px; border-radius: 9px; cursor: pointer; }
#tComanda.ativa ~ .toast { bottom: 96px; }
.carregando { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(245, 247, 250, .45); z-index: 40; }
.carregando.visivel { display: flex; }
.giro { width: 38px; height: 38px; border-radius: 99px; border: 4px solid var(--azul-claro); border-top-color: var(--azul); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* celular estreito */
@media (max-width: 560px) {
  .alterna button span { display: none; }
  .alterna button { padding: 8px 10px; }
  .grade-mesas { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; }
  .mesa { min-height: 104px; padding: 10px 11px; }
  .mesa .nome { font-size: 19px; }
  .mesa .valor { font-size: 15px; }
  .mesa .pe { flex-wrap: wrap; }
  .produtos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .barra-mesas .direita .suave { display: none; }
  .filtros { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; }
  .busca-mesa { flex: 1 1 100%; }
  .filtros button { flex: 0 0 auto; }
}

/* ---------- conferência do cliente antes da NFC-e ---------- */
.caixa.larga { max-width: 640px; }
.pendencias { display: grid; gap: 6px; margin: 4px 0 12px; }
.pendencias:empty { display: none; }
.pendencias .p { border-radius: 10px; padding: 9px 12px; font-weight: 600; font-size: 13.5px; }
.pendencias .p.erro { background: var(--erro-claro); color: var(--erro); }
.pendencias .p.aviso { background: var(--ambar-claro); color: #7A4E08; }
.pendencias .p.ok { background: var(--verde-claro); color: var(--verde); }
.form-cli { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-cli .c2 { grid-column: span 2; }
.form-cli .campo { margin-bottom: 10px; }
.form-cli label.marcar { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--texto); margin: 0 0 12px; }
.form-cli label.marcar input { width: 20px; height: 20px; appearance: auto; -webkit-appearance: auto; }
.form-cli .com-botao { display: flex; gap: 6px; }
.form-cli input.erro, .form-cli select.erro { border-color: var(--erro); background: var(--erro-claro); }
.form-cli input.aviso { border-color: var(--ambar); }
@media (max-width: 520px) { .form-cli { grid-template-columns: 1fr; } .form-cli .c2 { grid-column: auto; } }

/* ---------- cliente na comanda e pagamento em vários tipos de documento ---------- */
.cliente-card, .cliente-conta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.cliente-card { border: 0; cursor: pointer; padding: 12px 14px; font: inherit; margin-bottom: 12px; }
.cliente-card:disabled { cursor: default; }
.cliente-card:disabled .cc-acao { display: none; }
.cliente-card .bolha, .cliente-conta .bolha { width: 36px; height: 36px; border-radius: 99px; background: var(--azul-claro); color: var(--azul);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cliente-card .bolha svg, .cliente-conta .bolha svg { width: 18px; height: 18px; }
.cc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cc-txt small { font-size: 12px; color: var(--texto-suave); font-weight: 600; }
.cc-txt b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-acao { color: var(--azul); font-weight: 700; font-size: 13.5px; }
.cliente-conta { border: 1px solid var(--linha); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; }
.pagamentos { display: grid; gap: 8px; margin-bottom: 8px; }
.pag { display: grid; grid-template-columns: 1fr 130px 40px; gap: 8px; align-items: center; }
.pag input { text-align: right; }
.pag input[readonly] { background: #F1F4F8; color: var(--texto-suave); }
.pag .tirar { height: 44px; border: 0; border-radius: 12px; background: var(--erro-claro); color: var(--erro); font-size: 20px; cursor: pointer; }
.pag .tirar.invisivel { visibility: hidden; }
.falta-pag { font-weight: 700; font-size: 13.5px; margin-top: 6px; }
.falta-pag.falta { color: var(--erro); }

/* Caixa (modal das mesas): totais por tipo de documento */
/* consulta de preço (mesas) */
.mp-prod { border: 1px solid var(--linha); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.mp-prod .nome { font-weight: 800; font-size: 16px; line-height: 1.3; }
.mp-prod .preco { font-size: 30px; font-weight: 800; color: var(--azul); margin: 6px 0 2px; }
.mp-prod .preco small { font-size: 14px; font-weight: 600; color: var(--texto-suave); }
.mp-prod .det { color: var(--texto-suave); font-size: 13px; line-height: 1.5; }
.mp-prod .det .neg { color: var(--erro); font-weight: 700; }
.mp-lista { max-height: 50vh; overflow: auto; border: 1px solid var(--linha); border-radius: 14px; margin-bottom: 12px; }
.mp-lista button { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; background: none; border: 0; border-bottom: 1px solid var(--linha); font: inherit; color: var(--texto); cursor: pointer; }
.mp-lista button:last-child { border-bottom: 0; }
.mp-lista button small { display: block; color: var(--texto-suave); font-size: 12px; }
.mp-lista button b { white-space: nowrap; }

/* Vendas recebidas (botão Vendas das mesas) e os itens da venda na janela da conta */
.vendas-filtro { display: flex; gap: 8px; margin-top: 8px; }
.vendas-filtro input { flex: 1; min-width: 0; }
.vendas-filtro select { width: auto; flex: none; }
#mvLista .item { cursor: pointer; }
.itens-venda { max-height: 34vh; overflow-y: auto; border: 1px solid var(--linha); border-radius: 14px; margin: 10px 0 14px; }
.itens-venda .linha-tot { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--linha); font-size: 14px; }
.itens-venda .linha-tot.total { font-weight: 800; font-size: 16px; }
.cx-totais { border: 1px solid var(--linha); border-radius: 14px; padding: 4px 12px; margin-bottom: 12px; }
.cx-totais .linha { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.cx-totais .linha + .linha { border-top: 1px solid var(--linha); }
.cx-totais .linha.total { font-weight: 700; font-size: 16px; }
.cx-totais .neg { color: var(--erro); }
