.vendas-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: -18px;
  height: calc(100vh - 68px);
  overflow: hidden;
}

/* ── Comanda view ────────────────────────────────────── */

.vendas-comanda-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.vendas-comanda-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--purple);
  flex: 1;
}

.vendas-comanda-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}

.vendas-comanda-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vendas-mesa-info-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vendas-mesa-info-num   { font-size: 1.3rem; font-weight: 800; color: var(--purple); margin: 0; }
.vendas-mesa-info-local { font-size: 0.78rem; color: var(--muted); margin: 0; }

.vc-comanda-list { display: flex; flex-direction: column; gap: 6px; }

.vc-comanda-card {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.12s;
}

.vc-comanda-card:hover,
.vc-comanda-card.active { border-color: var(--purple); }

.vc-comanda-card-head { display: flex; justify-content: space-between; align-items: center; }
.vc-comanda-num       { font-weight: 700; color: var(--purple); font-size: 0.9rem; }
.vc-comanda-total     { font-size: 0.82rem; font-weight: 600; color: #c0392b; }
.vc-comanda-itens-count { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.vc-nova-comanda-btn  { width: 100%; }

.vendas-comanda-main { display: flex; flex-direction: column; gap: 12px; }

.vc-items-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

.vc-items-list { display: flex; flex-direction: column; gap: 4px; }

.vc-item-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 6px;
  border-bottom: 1px solid #f0f0f4;
  font-size: 0.88rem;
}

.vc-item-row:last-child { border-bottom: none; }
.vc-item-name  { font-weight: 600; }
.vc-item-obs   { font-size: 0.74rem; color: var(--muted); }
.vc-item-qty   { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.vc-item-price { font-weight: 700; white-space: nowrap; }

.vc-item-del {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 4px;
}

.vc-totals {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vc-totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 2px 0;
}

.vc-totals-grand {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--purple);
  margin-top: 4px;
}

.vendas-comanda-empty {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 24px 0;
}

/* ── Produto view ────────────────────────────────────── */

.vendas-produto-body     { display: flex; flex-direction: column; gap: 14px; }
.vendas-produto-search-bar { display: flex; gap: 8px; }

.vp-search-input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
}

.vendas-produto-categories { display: flex; gap: 6px; flex-wrap: wrap; }

.vp-cat-btn {
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f5f5f8;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.vp-cat-btn:hover,
.vp-cat-btn.active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

.vendas-produto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.vp-product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.vp-product-card:hover,
.vp-product-card.selected {
  border-color: var(--purple);
  box-shadow: 0 2px 8px rgba(93, 22, 116, 0.12);
}

.vp-product-img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }

.vp-product-img-placeholder {
  width: 64px;
  height: 64px;
  background: #f0eaf5;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.vp-product-name  { font-size: 0.8rem; font-weight: 600; line-height: 1.3; }
.vp-product-price { font-size: 0.82rem; font-weight: 700; color: #1a7a45; }

.vendas-produto-qty-bar {
  background: var(--panel);
  border: 2px solid var(--purple);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.vp-qty-product-name { font-weight: 700; color: var(--purple); flex: 1; min-width: 160px; }
.vp-qty-controls { display: flex; align-items: center; gap: 6px; }

.vp-qty-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f5f5f8;
  font-size: 1.1rem;
  cursor: pointer;
  font-weight: 700;
}

.vp-qty-input {
  width: 60px;
  text-align: center;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1rem;
}

.vp-obs-input {
  flex: 1;
  min-width: 160px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.88rem;
}

/* ── Pagamento view (tela cheia) ─────────────────────── */

.vendas-pagamento-view:not(.hidden) {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 24px;
  flex: 1;
  min-height: 0;
  box-sizing: border-box;
  overflow-y: auto;
}

.vendas-pagamento-body {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 16px;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.vpag-items-resumo {
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 12px;
  font-size: 0.85rem;
  scrollbar-width: thin;
}

.vpag-resumo-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #f0f0f4;
}

.vpag-discount-input {
  width: 110px;
  text-align: right;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.vendas-pagamento-resumo {
  overflow-y: auto;
}

.vendas-pagamento-formas {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.vpag-metodos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.vpag-metodo {
  padding: 10px 18px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.vpag-metodo:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.vpag-metodo.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.vpag-numpad-area  { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.vpag-metodo-label { font-size: 0.82rem; color: var(--muted); font-weight: 700; }

.vpag-valor-input {
  font-size: 1.8rem;
  font-weight: 800;
  text-align: right;
  padding: 10px 14px;
  border: 2px solid var(--purple);
  border-radius: 10px;
  background: var(--bg);
  color: var(--purple);
  width: 100%;
}

.vpag-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 52px);
  gap: 6px;
}

.vpag-num {
  padding: 4px;
  font-size: clamp(0.95rem, 2vh, 1.25rem);
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.1s, border-color 0.1s, transform 0.08s;
  min-height: 36px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vpag-num:hover  { background: var(--bg); border-color: var(--purple); color: var(--purple); }
.vpag-num:active { transform: scale(0.95); }
.vpag-num-zero   { grid-column: span 1; }

.vpag-payments-list  { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }

.vpag-payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0faf4;
  border: 1px solid #a8d5b8;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.88rem;
}

.vpag-payment-del {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
}

.vendas-pagamento-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.vpag-finalizar-btn {
  font-size: 1.05rem;
  font-weight: 800;
  padding: 14px;
  border-radius: 12px;
  background: var(--purple);
  box-shadow: var(--shadow);
  letter-spacing: 0.04em;
  transition: background 0.15s, transform 0.08s;
  width: 100%;
}

.vpag-finalizar-btn:hover {
  background: var(--magenta);
  transform: translateY(-1px);
}

/* ── VC2 (comanda cards nova layout) ─────────────────── */

.vc2-shell {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

/* ── Modal agrupar ── */

.vc2-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.48);
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.vc2-modal-overlay:not(.hidden) { display: flex; }

.vc2-modal {
  background: var(--panel);
  border-radius: 12px;
  padding: 22px 24px;
  min-width: 300px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
}

.vc2-modal-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--purple);
  margin-bottom: 10px;
}

.vc2-modal-info {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.vc2-agrupar-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  max-height: 260px;
  overflow-y: auto;
}

.vc2-agrupar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.vc2-agrupar-item:hover {
  border-color: var(--orange);
  background: rgba(255,61,16,0.05);
  color: var(--orange);
}

.vc2-agrupar-item span:last-child {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 700;
}

.vc2-nome-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.14s;
}

.vc2-nome-input:focus { border-color: var(--purple); }

.vc2-modal-btns {
  display: flex;
  justify-content: flex-end;
}

/* ── Modal itens da comanda ── */

.vc2-itens-modal {
  background: var(--panel);
  border-radius: 12px;
  width: 90%;
  max-width: 760px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.28);
  overflow: hidden;
}

.vc2-itens-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.vc2-itens-modal-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--purple);
  margin: 0;
}

.vc2-itens-modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.1s, color 0.1s;
}

.vc2-itens-modal-close:hover { background: var(--line); color: var(--text); }

.vc2-itens-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.vc2-itens-modal-footer {
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.vc2-itens-modal-footer .vc2-bottom-totals {
  border-top: none;
}

/* botão ver itens */
.vc2-comanda-ver-btn {
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.1);
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 7px 10px;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.1s, color 0.1s;
}

.vc2-comanda-ver-btn:hover { background: rgba(93,22,116,0.1); color: var(--purple); border-color: var(--purple); }

.vc2-sidebar {
  width: 185px;
  min-width: 185px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.8rem;
}

.vc2-sidebar-top {
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.vc2-order-row   { display: flex; justify-content: space-between; gap: 8px; }
.vc2-sidebar-label { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; font-weight: 600; }
.vc2-order-code  { font-size: 1rem; font-weight: 700; color: var(--purple); }
.vc2-order-total-val { font-size: 1rem; font-weight: 700; color: var(--orange); }
.vc2-num-cmds-row { display: flex; justify-content: space-between; align-items: center; }
.vc2-num-value   { font-weight: 700; color: var(--text); font-size: 1rem; }
.vc2-hr          { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
.vc2-section-label { font-size: 0.68rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }

.vc2-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  min-height: 18px;
}

.vc2-info-val    { font-weight: 700; color: var(--text); font-size: 0.85rem; text-align: right; }
.vc2-pessoas-ctrl { display: flex; align-items: center; gap: 6px; }

.vc2-pessoas-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.vc2-pessoas-btn:hover { border-color: var(--purple); color: var(--purple); background: var(--panel); }

#vc-pessoas-count { font-weight: 700; color: var(--text); min-width: 18px; text-align: center; }

.vc2-timer { font-weight: 700; color: var(--orange); font-size: 0.88rem; font-variant-numeric: tabular-nums; }

.vc2-sidebar-footer {
  background: var(--purple);
  padding: 10px 12px;
  text-align: center;
}
.vc2-total-label { font-size: 0.68rem; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.vc2-total-big   { font-size: 1.2rem; font-weight: 900; color: #fff; }

.vc2-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.vc2-topbar { padding: 12px 14px 8px; }

.vc2-section {
  background: var(--panel);
  margin: 0 12px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.vc2-section--cards {
  overflow: hidden;
  margin-top: 10px;
}

.vc2-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--purple);
  margin: 0;
  padding: 8px 12px 6px;
  border-bottom: 1px solid var(--line);
}

.vc2-section--expand {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vc2-section--expand .vc2-table-wrap {
  flex: 1;
  overflow-y: auto;
}

.vc2-comanda-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  padding: 10px 12px 12px;
  max-height: 560px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--orange) #f0f0f0;
}

.vc2-comanda-cards::-webkit-scrollbar { width: 5px; }
.vc2-comanda-cards::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 3px; }
.vc2-comanda-cards::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 3px; }

.vc2-comanda-card {
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  overflow: hidden;
}

.vc2-comanda-card:hover { border-color: var(--orange); }
.vc2-comanda-card.active { border-color: var(--purple); box-shadow: 0 2px 10px rgba(93,22,116,0.25); }
.vc2-comanda-card.fechada { opacity: 0.55; }

/* ── Cabeçalho: nome + renomear ── */
.vc2-comanda-card-head {
  background: var(--purple);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding: 7px 9px;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.vc2-comanda-card.active .vc2-comanda-card-head { background: #4a1070; border-bottom-color: rgba(255,255,255,0.2); }
.vc2-comanda-card.fechada .vc2-comanda-card-head { background: #9ca3af; border-bottom-color: rgba(255,255,255,0.15); }

.vc2-comanda-num { font-weight: 700; font-size: 0.84rem; flex: 1; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vc2-comanda-card.active .vc2-comanda-num { color: #fff; }

/* ── Botões da comanda: duas linhas ── */
.vc2-comanda-card-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 8px 7px;
  border-bottom: 1px solid var(--line);
}

.vc2-comanda-card-actions-row1,
.vc2-comanda-card-actions-row2 {
  display: flex;
  align-items: center;
  gap: 5px;
}

.vc2-comanda-open-btn {
  background: var(--orange);
  border: none;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 9px 10px;
  line-height: 1.3;
  flex: 1;
  transition: background 0.1s;
  white-space: nowrap;
  text-align: center;
}
.vc2-comanda-open-btn:hover { background: var(--orange-dark); }

.vc2-comanda-fechar-btn {
  background: #1a7a45;
  border: none;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 8px;
  line-height: 1.3;
  flex: 1;
  transition: background 0.1s;
  text-align: center;
}
.vc2-comanda-fechar-btn:hover { background: #145e35; }

.vc2-comanda-action-btn {
  background: #c0392b;
  border: none;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 8px;
  line-height: 1.3;
  flex: 1;
  transition: background 0.1s;
  text-align: center;
}
.vc2-comanda-action-btn:hover { background: #a93226; }

/* ── Corpo: info ── */
.vc2-comanda-card-body {
  padding: 8px 10px;
  font-size: 0.77rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vc2-comanda-status { font-size: 0.62rem; border-radius: 10px; padding: 2px 5px; font-weight: 600; flex-shrink: 0; }
.vc2-comanda-status.aberta  { background: #e6f9ef; color: #1a7a45; }
.vc2-comanda-status.fechada { background: var(--bg); color: var(--muted); }

.vc2-comanda-valor { color: var(--orange); font-weight: 700; font-size: 0.85rem; margin-top: 2px; }

.vc2-add-comanda-card {
  border: 2px dashed var(--line);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--orange);
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.12s, border-color 0.12s;
  min-height: 175px;
}

.vc2-add-comanda-card:hover { background: var(--panel); border-color: var(--orange); }
.vc2-add-icon { font-size: 2.2rem; line-height: 1; color: var(--orange); }

.vc2-products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.vc2-products-header .vc2-section-title { border-bottom: none; padding: 7px 0 6px; flex: 1; }

.vc2-search-box { display: flex; gap: 6px; align-items: center; }

.vc2-search-box input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.82rem;
  width: 180px;
}

.vc2-search-box button {
  background: var(--orange);
  border: none;
  color: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85rem;
}

.vc2-table-wrap { overflow-x: auto; }

.vc2-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.vc2-items-table th {
  background: var(--bg);
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.vc2-items-table th.tc,
.vc2-items-table td.tc { text-align: center; }

.vc2-items-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.vc2-item-row:last-child td { border-bottom: none; }
.vc2-item-row:hover td      { background: var(--bg); }
.vc2-item-name { font-weight: 600; color: var(--purple); }
.vc2-item-obs  { color: var(--muted); font-size: 0.78rem; }

.fw { font-weight: 700; color: var(--purple); }

.vc2-item-edit-btn,
.vc2-item-del-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 7px;
  cursor: pointer;
  font-size: 0.85rem;
  margin: 0 2px;
  transition: background 0.1s;
}

.vc2-item-edit-btn:hover { background: var(--bg); border-color: var(--blue); color: var(--blue); }
.vc2-item-del-btn { color: #c0392b; border-color: #f5c0bb; }
.vc2-item-del-btn:hover { background: #fdf2f1; }
.vc2-table-empty { text-align: center; color: var(--muted); padding: 24px; font-size: 0.85rem; }

.vc2-bottom-totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.vc2-total-cell {
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-right: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--muted);
}

.vc2-total-cell:last-child { border-right: none; }
.vc2-total-cell strong { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.vc2-total-cell--grand { background: var(--panel); }
.vc2-total-cell--grand strong { color: var(--purple); font-size: 0.95rem; }

.vc2-field-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.vc2-action-bar {
  display: flex;
  margin-top: auto;
  background: var(--panel);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.vc2-action-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 18px 6px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  text-transform: uppercase;
}

.vc2-action-btn:last-child { border-right: none; }
.vc2-action-btn:hover { background: var(--bg); color: var(--purple); }
.vc2-action-btn--fechar { color: var(--orange); font-weight: 800; }
.vc2-action-btn--fechar:hover { background: var(--orange); color: #fff; }

/* Cores individuais dos botoes da barra de acoes */
#vendas-sem-comanda      { background: #3b82f6; color: #fff; border-right-color: rgba(0,0,0,0.1); }
#vendas-sem-comanda:hover { background: #2563eb; color: #fff; }

#vendas-nova-comanda      { background: #10b981; color: #fff; border-right-color: rgba(0,0,0,0.1); }
#vendas-nova-comanda:hover { background: #059669; color: #fff; }

#vendas-vincular-comanda      { background: var(--purple); color: #fff; border-right-color: rgba(0,0,0,0.1); }
#vendas-vincular-comanda:hover { background: #4a1070; color: #fff; }

#vendas-transferir-comanda      { background: #64748b; color: #fff; border-right-color: rgba(0,0,0,0.1); }
#vendas-transferir-comanda:hover { background: #475569; color: #fff; }

#vendas-btn-fechar      { background: #ef4444; color: #fff; font-weight: 800; border-right-color: rgba(0,0,0,0.1); }
#vendas-btn-fechar:hover { background: #dc2626; color: #fff; }

.vc2-transferir-tabs,
.vc2-agrupar-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.vc2-agrupar-tab {
  flex: 1;
  padding: 7px 12px;
  border-radius: 6px;
  border: 2px solid #d1d5db;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.vc2-agrupar-tab.active {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
}

.vc2-agrupar-tab:not(.active):hover {
  border-color: var(--purple);
  color: var(--purple);
}

.vc2-transferir-tab {
  flex: 1;
  padding: 7px 12px;
  border-radius: 6px;
  border: 2px solid #d1d5db;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.vc2-transferir-tab.active {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
}

.vc2-transferir-tab:not(.active):hover {
  border-color: var(--purple);
  color: var(--purple);
}

/* ── VPL (lançamento POS split) ──────────────────────── */

.vpl-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #f0f2f5;
}

.vpl-infobar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 16px;
  height: 64px;
  flex-shrink: 0;
  overflow-x: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.09);
}

.vpl-back-btn {
  background: var(--purple);
  border: none;
  color: #fff;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  margin-right: 20px;
  transition: background 0.15s;
  flex-shrink: 0;
  line-height: 1;
}

.vpl-back-btn:hover { background: var(--magenta); }

.vpl-info-sep {
  width: 1px;
  height: 32px;
  background: var(--line);
  margin: 0 18px;
  flex-shrink: 0;
}

.vpl-info-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.vpl-info-label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1;
}

.vpl-info-item strong {
  color: var(--purple);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.vpl-info-val-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vpl-status-badge { border-radius: 10px; padding: 2px 9px; font-size: 0.66rem; font-weight: 700; line-height: 1.4; }
.vpl-aberta  { background: #3ecf70; color: #0b3d1f; }
.vpl-fechada { background: #9ca3af; color: #fff; }

.vpl-body { display: flex; flex: 1; overflow: hidden; gap: 0; }

.vpl-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #d0d7e6;
  background: #fff;
}

.vpl-search-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.vpl-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 14px;
  font-size: 0.88rem;
  background: #f5f7fa;
}

.vpl-search-bar button {
  background: var(--orange);
  border: none;
  color: #fff;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.1s;
}

.vpl-search-bar button:hover { background: var(--orange-dark); }

.vpl-categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex-shrink: 0;
  background: #eef0f4;
  padding: 10px 14px;
  border-bottom: 1px solid #d8dce6;
  scrollbar-width: none;
  align-items: center;
}

.vpl-categories::-webkit-scrollbar { display: none; }

.vpl-cat-btn {
  border: none;
  border-radius: 22px;
  background: #fff;
  color: #4b5563;
  padding: 8px 20px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

.vpl-cat-btn:hover {
  background: var(--purple);
  color: #fff;
  transform: translateY(-1px);
}

.vpl-cat-btn.active {
  background: var(--purple);
  color: #fff;
}

.vpl-product-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0;
  align-content: start;
  padding: 8px;
}

.vpl-product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1px solid #e8ecf2;
  border-radius: 6px;
  margin: 3px;
  background: #fff;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
  text-align: center;
}

.vpl-product-card:hover  { background: rgba(255, 61, 16, 0.04); border-color: var(--orange); transform: translateY(-1px); }
.vpl-product-card:active { transform: scale(0.97); }

.vpl-product-img { width: 80px; height: 70px; object-fit: contain; border-radius: 4px; }

.vpl-product-img-placeholder {
  width: 80px;
  height: 70px;
  background: #f0f2f5;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #9ca3af;
}

.vpl-product-name  { font-size: 0.75rem; font-weight: 600; color: var(--text); line-height: 1.2; text-transform: uppercase; }
.vpl-product-price { font-size: 0.8rem; font-weight: 700; color: var(--orange); }

.vpl-right {
  width: 400px;
  min-width: 340px;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  overflow: hidden;
}

.vpl-items-header {
  background: var(--bg);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 14px 16px;
  flex-shrink: 0;
  border-bottom: 2px solid var(--orange);
}

.vpl-items-table-wrap { flex: 1; overflow-y: auto; background: #fff; }

.vpl-items-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }

.vpl-items-table thead th {
  background: #f0f2f5;
  color: #6b7280;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 7px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.vpl-items-table thead th.tc { text-align: center; }
.vpl-th-qtd { width: 44px; }

.vpl-item-row td {
  padding: 9px 10px;
  border-bottom: 1px solid #f0f2f5;
  color: #374151;
  vertical-align: middle;
}

.vpl-item-row:last-child td  { border-bottom: none; }
.vpl-item-row.selected td    { background: rgba(255, 61, 16, 0.06); }
.vpl-item-row:hover td       { background: var(--bg); }
.vpl-item-row.selected:hover td { background: rgba(255, 61, 16, 0.1); }

.vpl-td-qty { font-weight: 700; text-align: center; color: var(--text); }
.vpl-item-name-cell .vpl-item-name { font-weight: 600; color: var(--text); text-transform: uppercase; font-size: 0.78rem; }
.vpl-item-obs { font-size: 0.7rem; color: #9ca3af; margin-top: 1px; }

.vpl-item-actions { display: flex; gap: 4px; justify-content: center; }

.vpl-edit-btn, .vpl-del-btn {
  background: none;
  border: 1px solid #d0d7e6;
  border-radius: 5px;
  padding: 3px 7px;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1;
  transition: background 0.1s;
}

.vpl-edit-btn { color: var(--blue); }
.vpl-edit-btn:hover { background: #edf3f8; }
.vpl-del-btn { color: #c0392b; border-color: #f5c0bb; }
.vpl-del-btn:hover { background: #fdf2f1; }
.vpl-empty-row { text-align: center; color: #9ca3af; padding: 24px; font-size: 0.82rem; }

.vpl-item-editor {
  background: rgba(93, 22, 116, 0.05);
  border-top: 2px solid var(--orange);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.vpl-item-editor-title { font-size: 0.82rem; font-weight: 700; color: var(--text); }

.vpl-editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.vpl-editor-row label {
  color: #6b7280;
  font-weight: 600;
  min-width: 28px;
  font-size: 0.75rem;
}

.vpl-editor-row input[type="text"],
.vpl-editor-row input[type="number"] {
  flex: 1;
  border: 1px solid #d0d7e6;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 0.82rem;
}

.vpl-qty-ctrl { display: flex; align-items: center; gap: 4px; }

.vpl-qty-ctrl button {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid #d0d7e6;
  background: #fff;
  color: #374151;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.vpl-qty-ctrl input {
  width: 50px;
  text-align: center;
  border: 1px solid #d0d7e6;
  border-radius: 5px;
  padding: 4px;
  font-size: 0.85rem;
}

.vpl-editor-btns { display: flex; gap: 8px; justify-content: flex-end; }

.vpl-editor-btns button {
  padding: 5px 14px;
  border-radius: 5px;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.vpl-obs-section {
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
  background: #fff;
}

.vpl-obs-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.vpl-obs-section textarea {
  width: 100%;
  border: 1px solid #d0d7e6;
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 0.8rem;
  resize: none;
  color: #374151;
  background: #f9fafc;
}

.vpl-totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid #e5e7eb;
  flex-shrink: 0;
  background: #f5f7fa;
}

.vpl-total-cell {
  padding: 11px 12px;
  border-right: 1px solid #e5e7eb;
  text-align: center;
}

.vpl-total-cell:last-child { border-right: none; }
.vpl-total-label { font-size: 0.65rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.vpl-total-val   { font-size: 0.9rem; font-weight: 700; color: #374151; }
.vpl-total-grand { background: var(--panel); }
.vpl-total-grand .vpl-total-val { font-size: 1rem; color: var(--orange); font-weight: 800; }

.vpl-actions {
  display: flex;
  flex-shrink: 0;
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.vpl-action-btn {
  flex: 1;
  border: none;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 16px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: background 0.12s, color 0.12s;
}

.vpl-action-btn:last-child { border-right: none; }
.vpl-action-btn:hover { background: var(--bg); color: var(--orange); }
.vpl-action-icon { font-size: 1.1rem; line-height: 1; }
.vpl-fechar-btn      { background: var(--orange); color: #fff; }
.vpl-fechar-btn:hover { background: var(--orange-dark); color: #fff; }
.vpl-finalizar-btn      { background: var(--purple); color: #fff; }
.vpl-finalizar-btn:hover { background: var(--magenta); color: #fff; }

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 1400px) {
  .vpl-right           { width: 360px; min-width: 300px; }
}

@media (max-width: 1200px) {
  .vpl-right           { width: 320px; min-width: 280px; }
  .vpl-product-grid    { grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); }
  .vc2-sidebar         { width: 180px; min-width: 180px; }
}

@media (max-width: 1050px) {
  .vpl-right           { width: 290px; min-width: 250px; }
  .vpl-product-grid    { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); }
  .vc2-sidebar         { width: 150px; min-width: 150px; }
}

@media (max-width: 900px) {
  .vc2-shell           { flex-direction: column; }
  .vc2-sidebar         { width: 100%; min-width: unset; flex: 0 0 auto; }
  .vc2-sidebar-top     { flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .vc2-sidebar-footer  { padding: 8px 12px; }
  .vc2-order-row       { flex: 1; }
  .vc2-bottom-totals   { grid-template-columns: repeat(2, 1fr); }
  .vc2-action-bar      { flex-wrap: wrap; }
  .vc2-action-btn      { flex: 1 1 45%; min-height: 48px; }
  .vc2-section         { margin: 0 8px 8px; }

  /* VPL coluna: produtos em cima, itens embaixo */
  .vpl-body            { flex-direction: column; overflow-y: auto; }
  .vpl-left            { flex: 0 0 auto; min-height: 280px; max-height: 55vh; border-right: none; border-bottom: 1px solid #d0d7e6; }
  .vpl-right           { width: 100%; min-width: unset; flex: 0 0 auto; overflow: visible; }
  .vpl-items-table-wrap { max-height: 240px; }
  .vpl-totals          { grid-template-columns: repeat(2, 1fr); }
  .vpl-product-grid    { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }

  /* Pagamento responsivo */
  .vendas-pagamento-body        { grid-template-columns: 1fr; }
  .vendas-pagamento-formas      { max-height: 70vh; overflow-y: auto; }
  .vpag-metodo                  { flex: 1 1 calc(50% - 4px); }
}

@media (max-width: 820px) {
  .vendas-shell        { margin: -12px; height: calc(100vh - 82px); }
  .vendas-pagamento-view:not(.hidden) { padding: 10px 12px; }
  .vpl-infobar         { height: auto; min-height: 52px; flex-wrap: wrap; gap: 6px; padding: 8px 12px; }
  .vpl-info-sep        { display: none; }
  .vpl-back-btn        { margin-right: 8px; }
}
