:root { --mp: #b91c1c; --mp-dark: #7f1d1d; }
body { background: #f4f5f7; font-size: .95rem; }
.bg-mp { background: linear-gradient(90deg, var(--mp-dark), var(--mp)); }
.btn-mp { background: var(--mp); color: #fff; border: 0; }
.btn-mp:hover { background: var(--mp-dark); color: #fff; }
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card-header { background: #fff; font-weight: 600; }
.table td, .table th { vertical-align: middle; }
.table-sm td, .table-sm th { padding: .35rem .5rem; }
.kpi { font-size: 1.6rem; font-weight: 700; }
.kpi-label { font-size: .8rem; text-transform: uppercase; color: #6c757d; letter-spacing: .03em; }
.text-money { white-space: nowrap; }
.ac-wrap { position: relative; }
.ac-list { position: absolute; z-index: 1060; left: 0; right: 0; top: 100%; max-height: 340px; overflow-y: auto;
  background: #fff; border: 1px solid #dee2e6; border-radius: .375rem; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.ac-item { padding: .45rem .7rem; cursor: pointer; border-bottom: 1px solid #f1f1f1; }
.ac-item:hover, .ac-item.sel { background: #fdecec; }
.ac-item small { color: #6c757d; }
#itens input.form-control-sm { min-width: 70px; }
.estoque-neg { color: #dc3545; font-weight: 600; }
.login-box { max-width: 380px; margin: 8vh auto; }
.nowrap { white-space: nowrap; }
@media print {
  body { background: #fff; font-size: 12px; }
  .card { box-shadow: none; }
}
.ac-foto { width: 42px; height: 42px; object-fit: cover; border-radius: 4px; border: 1px solid #eee; flex: none; }
.ac-semfoto { display: inline-flex; align-items: center; justify-content: center; background: #f5f5f5; color: #bbb; }
.kbd { font-size: .7rem; border: 1px solid rgba(255,255,255,.5); border-radius: 3px; padding: 0 3px; margin-left: 2px; opacity: .8; }
.navbar .nav-link { white-space: nowrap; padding-left: .45rem !important; padding-right: .45rem !important; }
@media (max-width: 1300px) { .navbar-brand { font-size: 1rem; } }

/* ---------- Balcão (venda) ---------- */
.ac-list.ac-larga { max-height: min(62vh, 560px); box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.acr { display: flex; gap: .75rem; align-items: center; }
.acr img { width: 54px; height: 54px; object-fit: contain; border-radius: 6px; border: 1px solid #eee; background: #fff; flex: none; }
.acr-txt { flex: 1; min-width: 0; }
.acr-desc { font-size: 1.05rem; line-height: 1.25; }
.acr-desc b { margin-right: .35rem; }
.acr-sub { font-size: .86rem; color: #6c757d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acr-dir { text-align: right; flex: none; min-width: 120px; }
.acr-preco { font-size: 1.25rem; font-weight: 700; color: #b91c1c; white-space: nowrap; }
.acr-est { font-size: .82rem; font-weight: 600; padding: .1rem .45rem; border-radius: 1rem; white-space: nowrap; }
.acr-est.ok { background: #dcfce7; color: #166534; } .acr-est.zero { background: #fee2e2; color: #991b1b; }
.balcao-busca .form-control-lg { font-size: 1.25rem; padding: .7rem 1rem; }
.balcao-busca .btn { font-size: 1rem; }
.itens-balcao { font-size: 1rem; }
.itens-balcao thead th { font-size: .85rem; text-transform: uppercase; letter-spacing: .02em; color: #555; padding: .6rem .5rem; }
.itens-balcao td { padding: .55rem .5rem; vertical-align: middle; }
.itens-balcao .form-control-sm { font-size: 1rem; padding: .35rem .5rem; }
.itens-balcao input[data-k="descricao"] { font-weight: 600; border-color: transparent; background: transparent; padding-left: 0; }
.itens-balcao input[data-k="descricao"]:focus { border-color: #86b7fe; background: #fff; padding-left: .5rem; }
.itens-balcao .tot-item { font-size: 1.1rem; }
.itens-vazio { padding: 3rem 1rem !important; font-size: 1.05rem; }
.resumo-balcao .total-grande { font-size: 2.4rem; font-weight: 800; color: #b91c1c; line-height: 1; white-space: nowrap; }
.resumo-balcao .btn-finalizar { font-size: 1.25rem; padding: .6rem 1.4rem; white-space: nowrap; }


.input-group > .ac-wrap { flex: 1 1 auto; width: 1%; min-width: 0; }
.input-group > .ac-wrap > .form-control { width: 100%; border-radius: 0; height: 100%; }
.itens-balcao textarea[data-k="descricao"] { font-weight: 600; border-color: transparent; background: transparent; padding: .2rem 0; resize: none; overflow: hidden; line-height: 1.3; font-size: 1rem; }
.itens-balcao textarea[data-k="descricao"]:focus { border-color: #86b7fe; background: #fff; padding: .2rem .5rem; }
.resumo-balcao details summary { cursor: pointer; font-size: .85rem; color: #6c757d; }

.resumo-col { position: sticky; bottom: 0; z-index: 20; padding-bottom: .5rem; }
.resumo-balcao { box-shadow: 0 -6px 18px rgba(0,0,0,.14); border-top: 3px solid #b91c1c; }
.cli-balcao .form-control-sm { font-size: .95rem; }
.cli-balcao #cli_busca_box > .ac-wrap { flex: 3 1 300px; min-width: 220px; }
.cli-balcao #cli_busca_box > .ac-wrap > input { width: 100%; }
.itens-balcao textarea[data-k="descricao"] { min-height: 0; margin-bottom: .1rem; }
.itens-balcao td small { display: inline-block; margin-top: 0; }
/* celular: barra do total no fim da página (não fixa) e busca em cima dos botões */
@media (max-width: 767.98px) {
  .resumo-col { position: static; }
  .balcao-busca .input-group { flex-wrap: wrap; }
  .balcao-busca .input-group > .ac-wrap { flex: 1 1 calc(100% - 48px); }
  .balcao-busca .input-group > .btn { flex: 1 1 40%; border-radius: 0 0 .375rem .375rem; }
  .resumo-balcao .total-grande { font-size: 2rem; }
}

.acr-cat { opacity: .55; }
.acr-cat .acr-preco { color: #6c757d; }
.acr-aviso { padding: .35rem .25rem; font-size: .92rem; color: #495057; }
