.content-stack[data-module="caixa"],
.pdv-content[data-module="caixa"] {
  padding: 0;
  overflow: hidden;
  overflow-x: hidden;
  background: #fff;
  height: calc(100vh - 68px);
  max-height: calc(100vh - 68px);
  min-height: calc(100vh - 68px);
  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: #ef4444; 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: #dc2626; }
.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: #ede9fe;
  color: #5b21b6;
  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-table tbody td.caixa-tipo-venda      { color: #10b981; font-weight: 700; }
.caixa-table tbody td.caixa-tipo-sangria    { color: #ef4444; font-weight: 700; }
.caixa-table tbody td.caixa-tipo-suprimento { color: #3b82f6; font-weight: 700; }
.caixa-table tbody td.caixa-tipo-abertura   { color: #8b5cf6; font-weight: 700; }

.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: #6366f1; }
.caixa-val-pos { color: #10b981; font-weight: 700; }
.caixa-val-neg { color: #ef4444; font-weight: 700; }

.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-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; }
