/* SamVend Mobile - mesma linha visual do SamClinic (fundo claro, cartões brancos),
   com a identidade do SamWeb (ver /brand/SAMWEB_IDENTIDADE.md).
   Sempre claro, mesmo com o celular em modo escuro. */
: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;
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --linha: #EDF0F4;
  --texto: #1A2230;
  --texto-suave: #6B7788;
  --texto-fraco: #A3ADBA;
  --alerta: #B4740E;
  --alerta-bg: #FDF1E1;
  --erro: #C23B32;
  --erro-bg: #FBEAE8;
  --sombra: 0 1px 2px rgba(20, 30, 45, .04), 0 6px 16px rgba(20, 30, 45, .06);
  --sombra-nav: 0 -2px 12px rgba(20, 30, 45, .07);
}
* { 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; }
.suave { color: var(--texto-suave); font-size: 13px; line-height: 1.5; }
.centroTxt { text-align: center; margin: 2px 0 10px; font-size: 12px; }

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

/* ---------- barra do topo ---------- */
.appbar {
  background: linear-gradient(155deg, var(--azul), var(--azul-escuro)); color: #fff;
  padding: calc(16px + env(safe-area-inset-top)) 16px 18px;
  border-radius: 0 0 24px 24px; position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; gap: 10px;
}
.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; }
.appbar .sub.link { cursor: pointer; display: flex; align-items: center; gap: 4px; }
.appbar .sub.link svg { width: 12px; height: 12px; opacity: .8; flex: 0 0 auto; }
.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:active { background: rgba(255, 255, 255, .26); }
.icone-bt.sair:hover, .icone-bt.sair:active { background: #C0392B; }
.icone-bt svg { width: 20px; height: 20px; }
.avatar {
  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;
}

/* ---------- conteúdo ---------- */
.conteudo { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 16px 16px 28px; }
.cartao { background: var(--card); border-radius: 18px; padding: 18px; margin-bottom: 14px; box-shadow: var(--sombra); }
.cartao h2 { font-size: 14.5px; font-weight: 700; margin: 0 0 4px; }
.cartao .meta { font-size: 12.5px; color: var(--texto-suave); margin-bottom: 12px; line-height: 1.5; }
.titulo-secao { display: flex; justify-content: space-between; align-items: center; margin: 6px 4px 10px; }
.titulo-secao h2 { font-size: 14px; font-weight: 700; color: var(--texto); }
.titulo-secao button { width: auto; padding: 6px 10px; font-size: 12.5px; background: var(--azul-claro); color: var(--azul); box-shadow: none; }

/* ---------- 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 {
  width: 100%; padding: 13px 15px; 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;
}
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 15px center; padding-right: 38px;
}
input:focus, select:focus { outline: none; border-color: var(--azul); background-color: #fff; }
input::placeholder { color: var(--texto-fraco); }

/* ---------- botões ---------- */
button { font-size: 15px; font-weight: 700; border: 0; border-radius: 12px; padding: 13px 16px; cursor: pointer;
  font-family: inherit; transition: transform .08s, opacity .15s; background: var(--bg); color: var(--texto); }
button:active { transform: scale(.98); }
button:disabled { opacity: .5; box-shadow: none; }
.btn-primario { width: 100%; background: var(--azul); color: #fff; box-shadow: 0 4px 12px rgba(20, 163, 184, .28); }
.btn-sucesso { width: 100%; background: var(--verde); color: #fff; box-shadow: 0 4px 12px rgba(31, 122, 77, .28); }
.btn-secundario { width: 100%; background: var(--azul-claro); color: var(--azul); }
.btn-perigo { background: var(--erro-bg); color: var(--erro); }
.btn-grande { padding: 15px 16px; font-size: 16px; }
.btn-menu {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--card);
  padding: 13px 12px; border-radius: 14px; font-weight: 600; color: var(--texto);
}
.btn-menu:active { background: var(--bg); }
.btn-menu .bolha { width: 38px; height: 38px; }

/* ---------- login ---------- */
.login { margin: auto; width: 100%; max-width: 400px; padding: 28px 20px; }
.login .marca { text-align: center; margin-bottom: 22px; }
.login .marca img { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 8px 22px rgba(20, 163, 184, .28); margin: 0 auto 14px; display: block; }
.login .marca h1 { font-size: 22px; font-weight: 800; color: var(--azul-escuro); }
.login .marca p { font-size: 13px; color: var(--texto-suave); margin-top: 4px; }
.link-sistemas { display: block; text-align: center; margin-top: 18px; color: var(--azul); font-size: 13.5px; font-weight: 600; text-decoration: none; }

/* ---------- listas / itens ---------- */
.lista { display: block; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--linha); }
.item:last-child { border-bottom: 0; }
.item.clicavel { cursor: pointer; margin: 0 -6px; padding: 12px 6px; border-radius: 12px; }
.item.clicavel:active { background: var(--bg); }
.bolha {
  width: 42px; height: 42px; 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; }
.bolha.verde { background: var(--verde-claro); color: var(--verde); }
.item .corpo { flex: 1; min-width: 0; }
.item .linha1 { font-weight: 700; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.item .linha2 { font-size: 12.5px; color: var(--texto-suave); margin-top: 3px; }
.item .valor { font-weight: 800; font-size: 14.5px; white-space: nowrap; color: var(--texto); }
.item .seta { color: var(--texto-fraco); flex: 0 0 auto; }
.item .seta svg { width: 17px; height: 17px; }
.item.novo { animation: destaque 1.2s ease; }
@keyframes destaque { from { background: var(--verde-claro); } to { background: transparent; } }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px 2px 6px; border-radius: 99px; margin-left: 4px; vertical-align: 1px; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.tag-grade { background: var(--azul-claro); color: var(--azul); }
.tag-erro { background: var(--erro-bg); color: var(--erro); }
.vazio { font-size: 13px; color: var(--texto-suave); text-align: center; padding: 34px 10px; line-height: 1.6; }
.vazio svg { width: 38px; height: 38px; color: var(--texto-fraco); margin: 0 auto 10px; }

/* ---------- venda ---------- */
.leitura {
  display: flex; gap: 8px; align-items: center; background: var(--card); border-radius: 18px;
  padding: 10px; box-shadow: var(--sombra); margin-bottom: 14px;
}
.leitura input { flex: 1; min-width: 0; margin: 0; border: 0; background: var(--bg); padding: 12px 12px; }
.leitura input:focus { background: #fff; box-shadow: inset 0 0 0 1.5px var(--azul); }
.btn-camera {
  width: 48px; height: 48px; padding: 0; flex: 0 0 auto; border-radius: 12px;
  background: var(--azul); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(20, 163, 184, .28);
}
.btn-camera svg { width: 22px; height: 22px; }
.qtdBox { display: flex; align-items: center; gap: 2px; background: var(--bg); border-radius: 12px; padding: 3px; flex: 0 0 auto; }
.qtdBox button { width: 34px; height: 40px; padding: 0; background: transparent; color: var(--azul); font-size: 20px; line-height: 1; }
.qtdBox span { min-width: 22px; text-align: center; font-weight: 800; font-size: 15px; }
.qtdBox.grande { background: var(--bg); padding: 4px; }
.qtdBox.grande button { width: 52px; height: 48px; background: var(--card); box-shadow: var(--sombra); font-size: 22px; }
.qtdBox.grande input { border: 0; background: transparent; text-align: center; font-size: 20px; font-weight: 800; padding: 8px; }
.comentario:not(:empty) {
  background: var(--alerta-bg); color: var(--alerta); border-radius: 12px; padding: 11px 13px;
  font-size: 12.5px; font-weight: 600; line-height: 1.5; margin-bottom: 14px;
}
.tela-venda .conteudo { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

.rodape {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: #fff; box-shadow: var(--sombra-nav);
  display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
}
.rodape .totais { flex: 1; min-width: 0; }
.rodape .totais small { font-size: 12px; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rodape .totais b { font-size: 22px; font-weight: 800; color: var(--azul-escuro); }
.rodape .btn-sucesso { width: auto; min-width: 132px; }

/* ---------- faturar ---------- */
.total-destaque { text-align: center; padding: 22px 18px; }
.total-destaque small { font-size: 12.5px; color: var(--texto-suave); font-weight: 600; }
.total-destaque b { display: block; font-size: 34px; font-weight: 800; color: var(--azul-escuro); margin-top: 4px; letter-spacing: -.5px; }
.troco { font-weight: 700; font-size: 14px; margin: -6px 0 6px; }
.troco.ok { color: var(--verde); }
.troco.falta { color: var(--erro); }

/* ---------- concluída ---------- */
.concluida { margin: auto; width: 100%; max-width: 420px; padding: 28px 20px; text-align: center; }
.concluida .check {
  width: 84px; height: 84px; border-radius: 99px; background: var(--verde-claro); color: var(--verde);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.concluida .check svg { width: 42px; height: 42px; }
.concluida h1 { font-size: 22px; font-weight: 800; }
.concluida p { color: var(--texto-suave); font-size: 14px; margin-top: 8px; line-height: 1.5; }
.concluida .trocoGrande:not(:empty) { margin: 18px 0 4px; font-size: 22px; font-weight: 800; color: var(--verde); }
.concluida .acoes { margin-top: 26px; display: grid; gap: 10px; }
.concluida .acoes-imprimir { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- modais (folha de baixo) ---------- */
.modal { display: none; position: fixed; inset: 0; z-index: 20; background: rgba(15, 25, 40, .38); align-items: flex-end; justify-content: center; }
.modal.topo { z-index: 40; }
.modal.aberto { display: flex; animation: aparece .15s ease; }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
.caixa {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--card);
  border-radius: 24px 24px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  animation: sobe .18s ease;
}
@keyframes sobe { from { transform: translateY(24px); } to { transform: none; } }
.caixa::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 99px; background: var(--linha); margin: 0 auto 14px; }
.caixa h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.caixa .suave { margin-bottom: 14px; }
.caixa.alta { height: 88vh; display: flex; flex-direction: column; }
.rolagem { flex: 1; overflow: auto; margin-top: 4px; }
.botoes { display: flex; gap: 10px; margin-top: 16px; }
.botoes button { flex: 1; }
.alerta { background: var(--alerta-bg); color: var(--alerta); padding: 11px 13px; border-radius: 12px; font-size: 13px; font-weight: 600; line-height: 1.5; margin-bottom: 14px; }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.grade button { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--bg); padding: 14px 8px; border: 1.5px solid var(--linha); }
.grade button b { font-size: 17px; color: var(--azul-escuro); }
.grade button small { font-size: 11.5px; color: var(--texto-suave); font-weight: 600; }
.grade button.zerado b { color: var(--texto-fraco); }
.grade button:active { border-color: var(--azul); background: var(--azul-claro); }

/* ---------- câmera ---------- */
.modal.camera { background: #000; align-items: stretch; z-index: 30; }
.caixaCamera { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; }
.caixaCamera video { flex: 1; width: 100%; object-fit: cover; background: #000; min-height: 0; }
.mira { position: absolute; left: 9%; right: 9%; top: 34%; height: 22%; border-radius: 18px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); border: 2.5px solid rgba(255, 255, 255, .9); }
.cmUltimo { position: absolute; left: 16px; right: 16px; top: calc(16px + env(safe-area-inset-top)); color: #fff;
  background: rgba(20, 30, 45, .7); padding: 12px 14px; border-radius: 14px; text-align: center; font-size: 14px; font-weight: 600; }
.cmBotoes { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: #000; }
.cmBotoes .qtdBox { background: rgba(255, 255, 255, .12); }
.cmBotoes .qtdBox button { color: #fff; }
.cmBotoes .qtdBox span { color: #fff; }
.cmBotoes .btn-primario { width: auto; min-width: 140px; }

/* ---------- avisos ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translate(-50%, 10px); z-index: 60;
  width: max-content; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 14px;
  background: var(--texto); color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.4;
  box-shadow: 0 8px 24px rgba(20, 30, 45, .25); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.visivel { opacity: 1; transform: translate(-50%, 0); }
.toast.erro { background: var(--erro); }
.carregando { display: none; position: fixed; inset: 0; z-index: 50; background: rgba(245, 247, 250, .45); align-items: center; justify-content: center; }
.carregando.visivel { display: flex; }
.giro { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--azul-claro); border-top-color: var(--azul); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* parcelas com tipo de documento próprio */
.parcela { border-bottom: 1px solid var(--linha); padding-bottom: 10px; margin-bottom: 2px; }
.parcela:last-child { border-bottom: 0; padding-bottom: 0; }
.parcela .item { border-bottom: 0; padding-bottom: 6px; }
.parcela select { padding: 9px 36px 9px 12px; font-size: 14px; border-radius: 10px; background-color: var(--bg); border-color: transparent; font-weight: 600; color: var(--azul-escuro); }

/* ---------- fase 5: troca, serviços, ótica e receber contas no celular ---------- */
.oculto { display: none !important; }

/* aniversariantes na tela inicial */
.aniv-cel { border-left: 4px solid #E7730F; padding: 0; }
.aniv-topo { width: 100%; display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: transparent; box-shadow: none;
  font-size: 14px; font-weight: 800; color: var(--texto); text-align: left; border-radius: inherit; }
.aniv-topo .qtd { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--texto-suave); }
.aniv-topo .qtd.tem-hoje { color: #C2600B; }
.aniv-topo svg { width: 18px; height: 18px; flex: none; color: var(--texto-fraco); transition: transform .15s; }
.aniv-cel.aberto .aniv-topo svg { transform: rotate(90deg); }
.aniv-lista { padding: 0 16px 12px; }
.aniv-cel .rot { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-fraco); margin: 10px 0 2px; }
.aniv-p { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linha); }
.aniv-p:last-child { border-bottom: 0; }
.aniv-p.hoje { background: #FFF3E6; border: 0; border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; }
.aniv-p .t { flex: 1; min-width: 0; }
.aniv-p .t b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.aniv-p .t span { font-size: 12.5px; color: var(--texto-suave); }
.bt-whats { display: inline-flex; align-items: center; gap: 5px; flex: none; border-radius: 10px; padding: 8px 10px; background: var(--verde-claro);
  color: var(--verde); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.bt-whats svg { width: 17px; height: 17px; }
.aniv-mais { width: 100%; margin-top: 8px; padding: 9px; background: var(--bg); color: var(--azul); font-weight: 700; font-size: 13px; box-shadow: none; }

.dois-bt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.dois-bt .btn-grande { padding-left: 8px; padding-right: 8px; font-size: 14.5px; }

/* cadastro do cliente (só ver) */
.cf-nome { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.cf-sub { font-size: 12.5px; color: var(--texto-suave); margin: 3px 0 10px; }
.cf-bloq { display: inline-block; background: var(--erro-bg); color: var(--erro); font-size: 11px; font-weight: 800; border-radius: 99px; padding: 2px 8px; margin-left: 6px; vertical-align: 2px; }
.cf-sec { border-top: 1px solid var(--linha); padding: 12px 0; }
.cf-sec h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-fraco); }
.cf-linha { display: flex; align-items: center; gap: 8px; padding: 5px 0; flex-wrap: wrap; }
.cf-linha .r { color: var(--texto-suave); font-size: 12.5px; width: 100%; }
.cf-linha .v { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cf-end { font-size: 15px; font-weight: 600; line-height: 1.45; }
.cf-bt { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 9px 12px; background: var(--azul-claro); color: var(--azul);
  font-size: 13px; font-weight: 700; text-decoration: none; }
.cf-bt svg { width: 16px; height: 16px; }
.cf-obs { white-space: pre-line; font-size: 14px; }

/* consulta de produtos */
.consulta-det { background: var(--bg); border-radius: 14px; padding: 14px; margin: 6px 0 10px; }
.consulta-det .cd-nome { font-weight: 800; font-size: 15px; overflow-wrap: anywhere; }
.consulta-det .cd-info { font-size: 12.5px; color: var(--texto-suave); margin: 4px 0 10px; }
.consulta-det .cd-preco { font-size: 22px; font-weight: 800; color: var(--verde); margin-bottom: 10px; }
.grade-est { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.grade-est div { background: var(--card); border: 1.5px solid var(--linha); border-radius: 12px; padding: 9px 6px; text-align: center; }
.grade-est div b { display: block; font-size: 16px; color: var(--azul-escuro); }
.grade-est div small { font-size: 12px; color: var(--texto-suave); font-weight: 600; }
.grade-est div.zerado b { color: var(--texto-fraco); }
.linha-lanca { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.linha-lanca > input { flex: 1; }
.linha-lanca .qtd-curta { flex: 0 0 64px; text-align: center; }
.linha-lanca > button { flex: 0 0 auto; width: auto; padding: 0 16px; height: 46px; }
.linha-lanca label { flex: 1; }
.ot-lado { font-weight: 700; margin: 6px 0; }
.ot-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.ot-grade label { margin: 0; }
.ot-grade input { text-align: center; padding: 10px 6px; }
/* Grau lançado na ficha do cliente (GRAU_CLI): data, observação, ações do histórico. */
.ot-grade.ot-extra { grid-template-columns: 1fr 2fr; }
.ot-grade.ot-extra input { text-align: left; }
.ot-liga { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13.5px; }
.ot-liga input { width: auto; margin: 0; }
.cp-acao { border: 0; background: none; padding: 4px 0 4px 12px; color: var(--azul); font: inherit; font-weight: 600; text-decoration: underline; }
.cp-lancar { margin-bottom: 8px; }
.cp-lancar button { width: 100%; }
.cp-hist summary { font-size: 12.5px; font-weight: 600; color: var(--azul); margin: 6px 0; }
.troco-rc { flex: 1; display: flex; flex-direction: column; font-size: 12.5px; font-weight: 600; color: var(--texto-suave); }
.troco-rc b { font-size: 20px; color: var(--verde); line-height: 46px; }
.item.marcada { background: var(--azul-claro); border-radius: 12px; }
.item.vencida .valor { color: var(--erro); }
.item.credito .linha1, .item.credito .valor { color: var(--verde); }

/* Compras anteriores (ficha do cliente) */
.cp-venda { border: 1px solid var(--linha); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.cp-venda.aberta { border-color: var(--azul); }
.cp-linha { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; width: 100%; padding: 10px 12px; border: 0; background: transparent; text-align: left; font: inherit; color: inherit; }
.cp-data { font-weight: 700; }
.cp-valor { font-weight: 800; text-align: right; white-space: nowrap; }
.cp-info { grid-column: 1 / -1; grid-row: 2; color: var(--texto-suave); font-size: 12.5px; }
.cp-itens { padding: 4px 12px 10px; border-top: 1px solid var(--linha); }
.cp-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 7px 0; border-bottom: 1px dashed var(--linha); }
.cp-item:last-child { border-bottom: 0; }
.cp-prod { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.cp-prod small { display: block; font-weight: 400; color: var(--texto-suave); font-size: 12px; }
.cp-qtd { grid-column: 1; color: var(--texto-suave); font-size: 12.5px; }
.cp-item .cp-valor { grid-column: 2; grid-row: 1; }
/* ótica: grau (receita) da venda na ficha do cliente */
.cp-ultgrau { border: 1px solid var(--azul); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.cp-grau-t { font-weight: 700; font-size: 12.5px; margin: 6px 0 4px; }
.cp-grau-t span { font-weight: 400; color: var(--texto-suave); margin-left: 6px; }
.cp-grau { width: 100%; border-collapse: collapse; margin-bottom: 6px; table-layout: fixed; }
.cp-grau th, .cp-grau td { border: 1px solid var(--linha); padding: 5px 2px; text-align: center; overflow-wrap: anywhere; }
.cp-grau thead th { color: var(--texto-suave); font-size: 10.5px; font-weight: 700; }
.cp-grau tbody th { font-size: 12px; }
.cp-grau td { font-weight: 700; font-size: 13px; }
.cp-selo { display: inline-block; padding: 0 7px; border-radius: 9px; background: var(--azul); color: #fff; font-size: 11px; font-weight: 700; }

/* Busca por nome/referência ao lado da câmera; parcelas editáveis (dinheiro + PIX). */
.btn-busca { background: var(--azul-claro); color: var(--azul); box-shadow: none; }
.parcela-edita { display: flex; gap: 8px; align-items: center; }
.parcela-edita .pValor { flex: 0 0 116px; width: 116px; text-align: right; padding: 9px 12px; font-size: 15px; font-weight: 700; border-radius: 10px; }
.parcela-edita select { flex: 1; min-width: 0; }
.parcela-edita .pTira { flex: 0 0 auto; width: 38px; height: 38px; padding: 0; font-size: 22px; line-height: 1; background: transparent; color: var(--erro); box-shadow: none; }
#ftSoma:not(:empty) { margin: 10px 0 0; }
