/* OSPrimeApp 5.7 — Caixa do balcão */
#page-caixa,
#page-caixa > .panel {
  min-width: 0;
}
#page-caixa .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.caixa-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 18px 20px;
}
.caixa-topo h2 {
  margin: 4px 0 6px;
}
.caixa-topo p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted, #9bb0cc);
}
.caixa-topo-acoes {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

/* A lista usa toda a largura para conferir produtos e valores sem rolar. */
.caixa-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.caixa-codigo-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
/* O campo do código é o alvo principal da tela: fonte grande, porque quem
   digita aqui normalmente está lendo números pequenos de uma etiqueta. */
#caixaCodigo {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .04em;
}

.caixa-camera {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line, #294a6d);
  border-radius: 14px;
  background: #050d17;
}
.caixa-camera video {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  background: #000;
}
.caixa-camera-acoes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
}

.caixa-lista-painel .table-wrap {
  margin-bottom: 12px;
}
/* Os campos dentro da tabela não podem esticar a coluna. */
#caixaTabela .caixa-qtd {
  width: 78px;
}
#caixaTabela .caixa-preco {
  width: 104px;
}
#caixaTabela td small {
  display: block;
  color: var(--muted, #9bb0cc);
  font-size: 11px;
}

.caixa-fecho {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
}

.caixa-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 13px 15px;
  border: 1px solid #28415f;
  border-radius: 14px;
  background: #0d1929;
}
.caixa-total span {
  display: block;
  color: var(--muted, #9bb0cc);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.caixa-total strong {
  font-size: 27px;
  line-height: 1.1;
}
.caixa-lucro {
  text-align: right;
}
.caixa-lucro b {
  font-size: 17px;
  color: #34dd91;
}
.caixa-lucro b.negative {
  color: #ff6c83;
}

.caixa-finalizar {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}

/* No celular tudo empilha. O código fica no topo porque é o primeiro gesto:
   bipar. A lista vem logo abaixo, e o total e o botão fecham a tela. */
@media (max-width: 900px) {
  .caixa-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .caixa-topo {
    padding: 15px 16px;
  }
  .caixa-topo-acoes {
    width: 100%;
  }
  .caixa-topo-acoes .btn {
    flex: 1 1 0;
    min-width: 0;
  }
  .caixa-codigo-form {
    grid-template-columns: 1fr;
  }
  .caixa-fecho {
    grid-template-columns: 1fr;
  }
  .caixa-camera video {
    max-height: 260px;
  }
  .caixa-total strong {
    font-size: 24px;
  }
}

/* Campo com botão de ler ao lado (cadastro de peça).

   O botão fica colado no campo, não numa linha própria: a ação pertence
   àquele campo e só a ele. No celular o campo já é o alvo grande, então o
   botão encolhe para caber ao lado em vez de empurrar o layout. */
.campo-com-leitor {
  display: flex;
  gap: 7px;
  align-items: stretch;
}
.campo-com-leitor > input {
  flex: 1 1 auto;
  min-width: 0;
}
.campo-com-leitor > .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.campo-leitor-box {
  overflow: hidden;
  border: 1px solid var(--line, #294a6d);
  border-radius: 14px;
  background: #050d17;
}
.campo-leitor-box video {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  background: #000;
}
.campo-leitor-acoes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
}

/* Balcão: busca compacta, tabela ampla e fechamento com valores legíveis. */
#page-caixa .caixa-entrada { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(0, 1.5fr); gap: 8px 24px; align-items: center; }
#page-caixa .caixa-entrada .panel-head { margin: 0; }
#page-caixa .caixa-entrada .help-text { grid-column: 2; margin: 0; }
#page-caixa .caixa-entrada .caixa-camera,
#page-caixa .caixa-resultados { grid-column: 1 / -1; }
#page-caixa #caixaCodigo { font-size: 16px; font-weight: 500; letter-spacing: 0; }
#page-caixa .caixa-resultados { border-top: 1px solid var(--line); margin-top: 12px; }
#page-caixa .caixa-resultado { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
#page-caixa .caixa-resultado small { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; }
#page-caixa .caixa-resultado b { overflow-wrap: anywhere; }
#page-caixa .caixa-resultado strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
#page-caixa #caixaTabela { width: 100%; }
#page-caixa #caixaTabela th { font-size: 12px; }
#page-caixa #caixaTabela td { padding-top: 14px; padding-bottom: 14px; font-variant-numeric: tabular-nums; }
#page-caixa #caixaTabela td:first-child { width: 45%; white-space: normal; overflow-wrap: anywhere; }
#page-caixa #caixaTabela td small { font-size: 12px; margin-top: 5px; }
#page-caixa #caixaTabela input { min-height: 44px; font-variant-numeric: tabular-nums; }
#page-caixa #caixaTabela button { min-height: 44px; }
#page-caixa .caixa-fecho { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 8px; gap: 16px; }
#page-caixa .caixa-total { background: var(--panel, #0d1929); padding: 20px; }
#page-caixa .caixa-total span { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; margin-bottom: 6px; }
#page-caixa .caixa-total strong { font-size: 32px; font-variant-numeric: tabular-nums; }
#page-caixa button:disabled { cursor: not-allowed; opacity: .5; }
@media(max-width: 768px) {
 #page-caixa .caixa-entrada { grid-template-columns: minmax(0, 1fr); gap: 14px; }
 #page-caixa .caixa-entrada .help-text { grid-column: 1; }
 #page-caixa #caixaTabela { min-width: 0 !important; width: 100% !important; max-width: 100%; display: block; }
 #page-caixa #caixaTabela thead { display: none; }
 #page-caixa #caixaTabela tbody { display: grid; gap: 12px; }
 #page-caixa #caixaTabela tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--line); padding-bottom: 12px; }
 #page-caixa #caixaTabela td { display: block; min-width: 0 !important; width: auto !important; border: 0; padding: 8px; }
 #page-caixa #caixaTabela td:first-child { width: auto; grid-column: 1 / -1; }
 #page-caixa #caixaTabela td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
 #page-caixa #caixaTabela input { width: 100%; }
 #page-caixa #caixaTabela td:last-child { align-self: end; text-align: right; }
 #page-caixa .caixa-resultado { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
 #page-caixa .caixa-resultado > div { grid-column: 1 / -1; }
 #page-caixa .caixa-total { padding: 16px; gap: 10px; }
 #page-caixa .caixa-total strong { font-size: 28px; }
}

/* ===== OSPrimeApp 5.8 — COCKPIT EXECUTIVO DE FECHAMENTO DIÁRIO ===== */
#page-closing {
  min-width: 0;
}
#page-closing svg {
  max-width: 24px;
  max-height: 24px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
}
.closing-panel {
  padding: 24px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 24px;
  background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 40%),
              radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.06), transparent 50%),
              linear-gradient(180deg, #091322 0%, #060b14 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
}

/* 1. COCKPIT HERO SUPERIOR */
.closing-cockpit {
  display: grid;
  grid-template-columns: 1.4fr 1.6fr;
  gap: 20px;
  padding: 22px;
  background: linear-gradient(145deg, rgba(16, 29, 49, 0.75), rgba(9, 18, 33, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  margin-bottom: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}
.closing-cockpit::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #0ea5e9, #6366f1, #10b981, #f59e0b);
}

.cockpit-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.cockpit-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.closing-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.closing-brand-logo {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  object-fit: contain;
  border-radius: 12px;
  background: #0d1b2e;
  padding: 4px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  display: block;
}
.cockpit-icon-badge {
  width: 48px;
  height: 48px;
  max-width: 48px;
  max-height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
  flex-shrink: 0;
}
.cockpit-icon-badge svg {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
}
.cockpit-titles h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
}
.cockpit-titles p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #94a3b8;
}

/* Controles de Data e Ações do Cockpit */
.cockpit-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.closing-date-bar {
  display: inline-flex;
  align-items: center;
  background: #060e19;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 4px 8px;
  gap: 6px;
}
.closing-date-bar input[type="date"] {
  background: transparent !important;
  border: none !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 4px 6px !important;
  outline: none !important;
  cursor: pointer;
}
.date-nav-btn {
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.date-nav-btn:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

.cockpit-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn.btn-action-glow {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.btn.btn-action-glow svg {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
  flex-shrink: 0;
}
.btn.btn-action-glow:hover {
  border-color: #38bdf8;
  background: #1e3352;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}
.btn.btn-action-save {
  background: linear-gradient(135deg, #0284c7, #2563eb) !important;
  color: #fff !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}
.btn.btn-action-save:hover {
  filter: brightness(1.15);
}
.btn.btn-action-wa {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  color: #fff !important;
  border: 1px solid #34d399 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}
.btn.btn-action-wa:hover {
  filter: brightness(1.15);
}
.btn.btn-action-csv {
  background: linear-gradient(135deg, #065f46, #047857) !important;
  color: #fff !important;
  border: 1px solid rgba(52, 211, 153, 0.45) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25) !important;
}
.btn.btn-action-csv:hover {
  filter: brightness(1.15);
}
.closing-store-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  letter-spacing: 0.02em;
}
.cockpit-trend-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  line-height: 1.2;
}
.cockpit-trend-badge.up {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.cockpit-trend-badge.down {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.cash-bill-batch {
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  color: #94a3b8 !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  cursor: pointer !important;
  line-height: 1 !important;
  min-width: 24px !important;
  height: 24px !important;
}
.cash-bill-batch:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

/* Lado Direito: Grande Saldo e Métricas Rápidas */
.cockpit-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: rgba(6, 13, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
}
.cockpit-main-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cockpit-balance-label {
  font-size: 11.5px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cockpit-balance-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-weight: 700;
}
.cockpit-balance-val {
  font-size: 34px;
  font-weight: 900;
  color: #38bdf8;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  text-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
  margin-top: 4px;
}
.cockpit-mini-metric {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cockpit-mini-metric small {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
}
.cockpit-mini-metric b {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.metric-in b { color: #34d399; }
.metric-out b { color: #f87171; }
.metric-profit b { color: #fbbf24; }
.metric-ticket b { color: #c084fc; }

/* 2. BARRA DE ABAS SEGMENTADAS (ESTILO iOS / macOS DARK) */
.closing-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(9, 18, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 6px;
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}
.closing-tabs-bar::-webkit-scrollbar { display: none; }

.closing-tab-btn,
.btn.closing-tab-btn {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 9px 16px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: #94a3b8 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}
.closing-tab-btn:hover,
.btn.closing-tab-btn:hover {
  color: #f1f5f9 !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  background: rgba(56, 189, 248, 0.08) !important;
}
.closing-tab-btn.active,
.btn.closing-tab-btn.active {
  background: linear-gradient(135deg, #0284c7, #2563eb) !important;
  color: #ffffff !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
}
.closing-tab-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Áreas de conteúdo de cada aba */
.closing-tab-pane {
  display: none;
  animation: fadeInPane 0.25s ease-out;
}
.closing-tab-pane.active {
  display: block;
}
@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 3. ABA 1: VISÃO GERAL & KPIs */
.closing-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.closing-kpi-grid .today-card {
  background: linear-gradient(145deg, rgba(16, 29, 48, 0.75), rgba(11, 21, 36, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.closing-kpi-grid .today-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.closing-kpi-grid .today-card .kpi-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 4px;
}
.closing-kpi-grid .today-card .kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}
.closing-kpi-grid .today-card b {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.closing-kpi-grid .today-card.kpi-income {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.12), rgba(6, 78, 59, 0.2));
  border-color: rgba(52, 211, 153, 0.35);
}
.closing-kpi-grid .today-card.kpi-income b { color: #34d399; }
.closing-kpi-grid .today-card.kpi-income .kpi-ico { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.closing-kpi-grid .today-card.kpi-expense {
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.1), rgba(127, 29, 29, 0.18));
  border-color: rgba(248, 113, 113, 0.35);
}
.closing-kpi-grid .today-card.kpi-expense b { color: #f87171; }
.closing-kpi-grid .today-card.kpi-expense .kpi-ico { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.closing-kpi-grid .today-card.kpi-balance {
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.14), rgba(30, 58, 138, 0.22));
  border-color: rgba(56, 189, 248, 0.4);
}
.closing-kpi-grid .today-card.kpi-balance b { color: #38bdf8; }
.closing-kpi-grid .today-card.kpi-balance .kpi-ico { background: rgba(14, 165, 233, 0.2); color: #38bdf8; }

.closing-kpi-grid .today-card.kpi-profit {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.1), rgba(120, 53, 15, 0.18));
  border-color: rgba(251, 191, 36, 0.35);
}
.closing-kpi-grid .today-card.kpi-profit b { color: #fbbf24; }
.closing-kpi-grid .today-card.kpi-profit .kpi-ico { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

/* Distribuição de Pagamentos em Barra Multicor */
.closing-pay-summary-box {
  background: linear-gradient(145deg, rgba(16, 29, 48, 0.7), rgba(9, 18, 32, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 22px;
}
.closing-pay-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.closing-pay-summary-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}
.closing-pay-multi-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}
.closing-pay-slice {
  height: 100%;
  transition: width 0.4s ease;
  position: relative;
}
.closing-pay-slice:hover { filter: brightness(1.2); }

.closing-pay-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.closing-pay-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s;
}
.closing-pay-item:hover {
  background: rgba(56, 189, 248, 0.07);
  border-color: rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}
.closing-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.closing-pay-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
}
.closing-pay-val {
  font-size: 15px;
  font-weight: 800;
  color: #38bdf8;
  font-variant-numeric: tabular-nums;
}
.closing-pay-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #94a3b8;
}
.closing-pay-meta b {
  color: #34d399;
}

/* 4. ABA 2: CONFERÊNCIA DA GAVETA & CALCULADORA DE CÉDULAS */
.close-cash-conference-card {
  background: linear-gradient(145deg, rgba(15, 28, 48, 0.85), rgba(9, 18, 33, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 22px;
}
.conference-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.conference-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.conf-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: confPulse 2s infinite;
  flex-shrink: 0;
}
@keyframes confPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.conference-title h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #f1f5f9;
}
.conference-title p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

/* Painel de Auditoria de Diferença Superior */
.conference-top-audit {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 16px;
  margin-bottom: 20px;
}
.conf-metric-card {
  background: rgba(11, 20, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.conf-metric-label {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 4px;
}
.conf-metric-val {
  font-size: 26px;
  font-weight: 900;
  color: #38bdf8;
  font-variant-numeric: tabular-nums;
  margin: 4px 0;
}
.conf-metric-sub {
  font-size: 11.5px;
  color: #64748b;
}

.conf-currency-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #060e1a;
  border: 2px solid #234168;
  border-radius: 10px;
  padding: 4px 12px;
  transition: all 0.2s;
}
.conf-currency-input-wrap:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
.conf-currency-symbol {
  font-size: 16px;
  font-weight: 800;
  color: #38bdf8;
}
.conf-currency-input-wrap input {
  width: 100%;
  border: none !important;
  background: transparent !important;
  color: #ffffff !important;
  font-size: 24px !important;
  font-weight: 900 !important;
  font-variant-numeric: tabular-nums;
  padding: 4px 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Card Visual de Diferença */
.conf-diff-card {
  background: rgba(14, 23, 40, 0.85);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.conf-diff-visual {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.conf-diff-icon {
  font-size: 28px;
  line-height: 1;
}
.conf-diff-text {
  font-size: 15px;
  font-weight: 700;
  color: #94a3b8;
  line-height: 1.35;
}

.conf-diff-card.diff-exact {
  border: 2px solid #10b981;
  background: rgba(16, 185, 129, 0.1);
}
.conf-diff-card.diff-exact .conf-diff-text { color: #34d399; }

.conf-diff-card.diff-surplus {
  border: 2px solid #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}
.conf-diff-card.diff-surplus .conf-diff-text { color: #38bdf8; }

.conf-diff-card.diff-shortage {
  border: 2px solid #ef4444;
  background: rgba(239, 68, 68, 0.1);
}
.conf-diff-card.diff-shortage .conf-diff-text { color: #f87171; }

/* A CALCULADORA DE CÉDULAS DA GAVETA */
.cash-drawer-box {
  background: #070e1a;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}
.cash-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.cash-drawer-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cash-drawer-total {
  font-size: 14px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 4px 10px;
  border-radius: 8px;
}

.cash-drawer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.cash-bill-slot {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.cash-bill-slot:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.04);
}
.cash-bill-stripe {
  position: absolute;
  top: 0; left: 0; bottom: 0; width: 4px;
}
.stripe-200 { background: #a3a3a3; }
.stripe-100 { background: #38bdf8; }
.stripe-50 { background: #f97316; }
.stripe-20 { background: #eab308; }
.stripe-10 { background: #ef4444; }
.stripe-5 { background: #a855f7; }
.stripe-2 { background: #3b82f6; }
.stripe-coins { background: #10b981; }

.cash-bill-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-left: 6px;
}
.cash-bill-label {
  font-size: 12px;
  font-weight: 800;
  color: #f1f5f9;
}
.cash-bill-subtotal {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.cash-bill-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cash-bill-btn,
.btn.cash-bill-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #cbd5e1 !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  flex-shrink: 0 !important;
}
.cash-bill-btn:hover,
.btn.cash-bill-btn:hover {
  background: #38bdf8 !important;
  color: #060e19 !important;
  border-color: #38bdf8 !important;
}
.cash-bill-qty {
  width: 100%;
  text-align: center;
  background: #040912;
  border: 1px solid #1e334d;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  padding: 4px;
  border-radius: 6px;
  outline: none;
  font-variant-numeric: tabular-nums;
}
.cash-bill-qty:focus {
  border-color: #38bdf8;
}

/* Observações do Fechamento */
.conf-note-wrap {
  margin-top: 14px;
}
.conf-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.conf-note-head label span {
  font-size: 12.5px;
  font-weight: 800;
  color: #cbd5e1;
}
.conf-quick-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.conf-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 11px;
  padding: 4px 9px;
  cursor: pointer;
  transition: all 0.18s;
}
.conf-tag:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}
.conf-note-wrap textarea {
  width: 100%;
  box-sizing: border-box;
  background: #070e1a;
  border: 1px solid #233e63;
  border-radius: 12px;
  color: #f1f5f9;
  font-size: 13.5px;
  padding: 12px 14px;
  min-height: 64px;
  resize: vertical;
}

/* 5. ABAS DE LISTAGEM (OS, FINANCEIRO, PEÇAS) */
.closing-data-card {
  background: linear-gradient(145deg, rgba(15, 28, 48, 0.8), rgba(9, 18, 33, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px;
}
.closing-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.closing-card-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}
.closing-card-head .count-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.closing-custom-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}
.closing-custom-list::-webkit-scrollbar { width: 6px; }
.closing-custom-list::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 4px; }
.closing-custom-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }

/* Linhas estilizadas */
.close-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.15s;
}
.close-line:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}
.close-line.income { border-left: 4px solid #10b981; }
.close-line.income b { color: #34d399; }
.close-line.expense { border-left: 4px solid #ef4444; }
.close-line.expense b { color: #f87171; }

.close-part-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.close-part-qty-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* 6. ABA 5: HISTÓRICO DE FECHAMENTOS */
.close-history-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.close-history-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  border: 1px solid rgba(75, 111, 160, 0.3);
  background: linear-gradient(145deg, #0e1e33, #0a1626);
  color: #eef5ff;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.close-history-row:hover {
  border-color: #38bdf8;
  background: #12253f;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.close-history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.close-history-top b {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
}
.close-history-diff-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}
.close-history-diff-badge.exact {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.close-history-diff-badge.surplus {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.close-history-diff-badge.shortage {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.close-history-diff-badge.neutral {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}
.close-history-mid {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.close-history-balance {
  font-size: 18px;
  font-weight: 900;
  color: #38bdf8;
  font-variant-numeric: tabular-nums;
}
.close-history-footer {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* RESPONSIVIDADE EXTREMA */
@media (max-width: 1024px) {
  .closing-cockpit {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .closing-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .conference-top-audit {
    grid-template-columns: 1fr 1fr;
  }
  .conf-diff-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .closing-panel {
    padding: 14px;
  }
  .closing-cockpit {
    padding: 14px;
  }
  .cockpit-right {
    grid-template-columns: 1fr;
  }
  .cockpit-balance-val {
    font-size: 28px;
  }
  .cockpit-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .btn-action-glow {
    justify-content: center;
  }
  .conference-top-audit {
    grid-template-columns: 1fr;
  }
  .closing-kpi-grid {
    grid-template-columns: 1fr;
  }
  .close-history-list {
    grid-template-columns: 1fr;
  }
}


