.content-stack[data-module="caixa"],
.pdv-content[data-module="caixa"] {
  padding: 0;
  overflow: hidden;
  overflow-x: hidden;
  background: #fff;
  height: calc(100vh - var(--topbar-h));
  max-height: calc(100vh - var(--topbar-h));
  min-height: calc(100vh - var(--topbar-h));
  position: relative;
}

.caixa-page-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #fff;
}

.caixa-page-header {
  margin: 0;
  padding: 18px 24px 14px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
}

.caixa-page-header.card.module-panel {
  border-radius: 0;
  box-shadow: none;
}

.caixa-page-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  background: #fff;
}

.caixa-page-content > .module-panel:first-child {
  margin-top: 0 !important;
}

.caixa-page-content > .module-panel {
  border-radius: 0;
  box-shadow: none;
  margin-top: 0 !important;
  border-left: 0;
  border-right: 0;
}

.caixa-page-content > .module-panel + .module-panel {
  border-top: 0;
}

#caixa-panel,
#caixa-movimentos-panel,
.caixa-page-content > .module-panel {
  padding: 18px 24px;
}

.caixa-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 20px;
}
.caixa-aberto  { background: #d1fae5; color: #065f46; }
.caixa-fechado { background: #fee2e2; color: #991b1b; }

.caixa-msg {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  background: #fef9c3;
  color: #854d0e;
}
.caixa-msg.error { background: #fee2e2; color: #991b1b; }
.caixa-msg.success { background: #d1fae5; color: #065f46; }

.caixa-form-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.caixa-form-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}
.caixa-btn-full { width: 100%; margin-top: 4px; }

.caixa-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.caixa-info-card {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 12px 14px;
}
.caixa-info-label { font-size: 0.72rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.caixa-info-val   { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-top: 2px; }

.caixa-acoes-grid {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.caixa-btn-sangria    { background: #f59e0b; color: #fff; border: none; flex: 1; min-width: 120px; }
.caixa-btn-suprimento { background: #10b981; color: #fff; border: none; flex: 1; min-width: 120px; }
.caixa-btn-fechar     { background: #ef4444; color: #fff; border: none; flex: 1; min-width: 120px; }
.caixa-btn-sangria:hover    { background: #d97706; }
.caixa-btn-suprimento:hover { background: #059669; }
.caixa-btn-fechar:hover     { background: #dc2626; }

.caixa-movimentos-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
}

.caixa-movimentos-totais {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  align-items: center;
}
.caixa-total-chip {
  background: #f1f2f4;
  color: #464c54;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.caixa-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.caixa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.caixa-table thead th {
  background: #f1f5f9;
  padding: 8px 12px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  border-bottom: 1px solid #e2e8f0;
}
.caixa-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.caixa-table tbody tr:last-child td { border-bottom: none; }
.caixa-tipo-venda      { color: #10b981; font-weight: 700; }
.caixa-tipo-sangria    { color: #f59e0b; font-weight: 700; }
.caixa-tipo-suprimento { color: #3b82f6; font-weight: 700; }
.caixa-tipo-abertura   { color: #6f7782; font-weight: 700; }
.caixa-val-pos { color: #10b981; font-weight: 700; }
.caixa-val-neg { color: #ef4444; font-weight: 700; }

.caixa-fech-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}
.caixa-fech-row:last-child { border-bottom: none; }
.caixa-fech-label { color: #64748b; font-weight: 600; }
.caixa-fech-val   { font-weight: 800; color: #334155; }

.caixa-btn-ver {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.caixa-btn-ver:hover { background: #e2e8f0; }

.caixa-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.caixa-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.caixa-filter-bar select {
  padding: 4px 8px;
  width: 110px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #334155;
  background: #fff;
  cursor: pointer;
  outline: none;
}
.caixa-filter-bar select:focus { border-color: #E8400E; }

/* ── Celular: movimentos em cartao, sem tabela ─────────────── */
.caixa-vcards { display: none; }
@media (max-width: 700px) {
  .caixa-table-wrap { display: none; }
  .caixa-vcards { display: flex; flex-direction: column; gap: 10px; }
  .caixa-vcard {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: #fff;
  }
  .caixa-vcard-row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
  }
  .caixa-vcard-kv {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    gap: 8px;
  }
  .caixa-vcard-kv > span:first-child { color: #64748b; flex-shrink: 0; }
  .caixa-vcard .caixa-btn-ver { align-self: flex-end; }
}

/* ── Caixa rapido (icone nas telas de venda) ─────────────────────────── */
.cxr-slot { display: inline-flex; margin-left: auto; flex-shrink: 0; }
.vpl-infobar .cxr-slot { margin-left: 8px; }
.cxr-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 38px; padding: 0; margin: 0; border-radius: 10px;
  border: 1.5px solid transparent; cursor: pointer; box-shadow: none; transition: background 0.15s, border-color 0.15s;
}
.cxr-btn svg { display: block; width: 22px; height: 22px; min-width: 22px; flex: none; }
/* sem cores (pedido): cinza neutro; o titulo diz se o caixa esta aberto ou fechado */
.cxr-btn.cxr-fechado, .cxr-btn.cxr-aberto, .cxr-btn.cxr-fechado:focus, .cxr-btn.cxr-aberto:focus { background: #f3f4f6; border-color: #e5e7eb; color: var(--menu-ink, #565d66); }
.cxr-btn.cxr-fechado:hover, .cxr-btn.cxr-aberto:hover { background: #e5e7eb; border-color: #d1d5db; color: var(--menu-ink, #565d66); }
.cxr-menu {
  position: fixed; z-index: 3000; min-width: 180px; padding: 6px; background: #fff;
  border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  display: flex; flex-direction: column; gap: 2px;
}
.cxr-menu.hidden { display: none; }
.cxr-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; margin: 0;
  background: transparent; border: none; border-radius: 8px; box-shadow: none;
  color: #374151; font-size: 0.92rem; font-weight: 600; text-align: left; text-transform: none; cursor: pointer;
}
.cxr-menu button:hover, .cxr-menu button:focus { background: #f3f4f6; color: #374151; }
.cxr-menu .cxr-menu-fechar, .cxr-menu .cxr-menu-fechar:hover, .cxr-menu .cxr-menu-fechar:focus { color: #dc2626; }
.cxr-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cxr-modal { position: fixed; inset: 0; z-index: 3100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, 0.45); }
.cxr-modal.hidden { display: none; }
.cxr-box { width: 100%; max-width: 420px; background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25); }
.cxr-box h3 { margin: 0 0 14px; color: #464c54; }
.cxr-box .form-input { width: 100%; box-sizing: border-box; }
.cxr-acoes { display: flex; gap: 10px; margin-top: 16px; }
.cxr-acoes .btn { flex: 1; }
.cxr-resumo { margin-bottom: 14px; }
.cxr-linha { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 0.9rem; color: #565d66; }
.cxr-linha.cxr-sep { border-top: 2px solid #e2e8f0; margin-top: 4px; padding-top: 7px; }
.cxr-toast {
  position: fixed; left: 50%; top: 72px; transform: translateX(-50%); z-index: 3200;
  padding: 10px 18px; border-radius: 10px; color: #fff; font-weight: 600; font-size: 0.92rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2); max-width: calc(100vw - 32px);
}
.cxr-toast.ok { background: #059669; }
.cxr-toast.erro { background: #dc2626; }
.cxr-toast.hidden { display: none; }


/* sem a linha entre o status e as abas */
.caixa-page-content #caixa-panel { border-bottom: 0; }

/* Coluna Acao dos movimentos: Ver + Reimprimir lado a lado */
.caixa-acoes-cel { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 72px; }
.caixa-vcard .caixa-acoes-cel { justify-content: flex-start; min-width: 0; }
.caixa-vcard .caixa-acoes-cel { margin-top: 8px; }
