/* ==================== CONTAS A RECEBER/PAGAR - RESET TOTAL ==================== */

/* Força o container a ser flexível em qualquer tela */
.receber-layout {
  display: grid !important;
  /* 340px + ~10% ≈ 375px. Em telas grandes fica mais confortável. */
  grid-template-columns: minmax(0, 1fr) 375px !important;
  gap: 16px !important;
  width: 100% !important;
  align-items: start !important;
}

/* 🎯 Em monitores grandes, aumenta mais um pouco o drawer (≈ +10% extra) */
@media (min-width: 1600px) {
  .receber-layout {
    grid-template-columns: minmax(0, 1fr) 410px !important;
  }
}

/* Container da tabela sempre com scroll */
.receber-layout > div:first-child {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

/* Tabela não força largura, obedece o container */
.tabela-receber {
  width: 100% !important;
  min-width: 100% !important;
  border-collapse: collapse !important;
}

/* Reduz padding APENAS dentro das telas de contas (o zoom já cuida da escala geral) */
.tabela-receber td,
.tabela-receber th {
  padding: 8px 6px;
  font-size: 12px;
}

.tabela-receber td button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  margin-left: 4px;
}

.tabela-receber td button i {
  font-size: 13px;
}

.tabela-receber .btn-receber-linha,
.tabela-receber .btn-ver-linha {
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  margin-right: 4px;
}

/* A última coluna não quebra */
.tabela-receber th:last-child,
.tabela-receber td:last-child {
  white-space: nowrap !important;
  text-align: left !important;
  /* A coluna encolhe até caber só os botões: fica colada à direita da tabela
     e o título "Ação" fica alinhado com o botão Receber/Pagar */
  width: 1% !important;
}

/* O Drawer sempre com tamanho fixo */
/* O Drawer sempre com tamanho fixo */
#rec-drawer,
#pag-drawer,
.drawer-detalhes {
  width: 375px !important; /* era 340px → +10% */
  max-width: 375px !important;
  position: sticky !important;
  top: 16px !important;
  max-height: calc(100vh - 100px) !important;
  overflow-y: auto !important;
}

/* 🎯 Em monitores grandes, drawer ainda mais largo */
@media (min-width: 1600px) {
  #rec-drawer,
  #pag-drawer,
  .drawer-detalhes {
    width: 410px !important;
    max-width: 410px !important;
  }
}

/* ==================== CELULAR (abaixo de 768px) ==================== */
@media (max-width: 767px) {
  .receber-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  /* O Drawer desce e ocupa a largura toda */
  #rec-drawer,
  #pag-drawer,
  .drawer-detalhes {
    width: 100% !important;
    max-width: 100% !important;
    position: static !important;
    max-height: none !important;
  }
}

/* ==================== ZOOM EXCLUSIVO: CONTAS A RECEBER / PAGAR (NOTEBOOK) ==================== */
/* Aplica zoom APENAS nos containers dessas duas telas, em notebooks (1025px–1440px). */
/* Monitores grandes (>1440px) e mobile (<=1024px) NÃO são afetados. */
@media (min-width: 1025px) and (max-width: 1440px) {
  /* Se suas abas tiverem IDs próprios (ex: #tab-receber, #tab-pagar), adicione-os aqui.
O seletor abaixo cobre qualquer elemento que contenha .receber-layout. */
  #tab-receber,
  #tab-pagar,
  #tab-contas-receber,
  #tab-contas-pagar,
  .tela-contas-receber,
  .tela-contas-pagar {
    zoom: 0.82;
    transform-origin: top left;
  }
}
/* ==================== AJUSTES FINOS DA TABELA ==================== */

/* 1. Alinha o título "AÇÃO" com o botão Receber/Pagar (à esquerda do grupo de botões) */
.tabela-receber th:last-child {
  text-align: left !important;
  padding-left: 10px !important; /* 6px da célula + 4px de margem do botão */
}

/* 2. Impede que o texto "Receber" ou "Pagar" quebre dentro do botão laranja */
.tabela-receber .btn-receber-linha,
.tabela-receber .btn-ver-linha {
  white-space: nowrap !important; /* Força o texto a ficar em uma linha só */
  min-width: 85px !important; /* Garante um tamanho mínimo para caber a palavra */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* 3. Remove a linha (borda) que está sobrando abaixo dos botões de ação */
.tabela-receber tbody tr:last-child td {
  border-bottom: none !important;
}

/* Ajuste extra: Alinha os botões de ação (Funil, Lápis, Lixeira) para a direita */
.tabela-receber td:last-child {
  text-align: right !important;
  padding-right: 12px !important;
}