/* ==========================================================================
   MÓDULO DE LANÇAMENTOS FINANCEIROS (APPLE CLEAN DESIGN SYSTEM)
   Adaptado para o CRM Shop Display (Tema Slate Dark)
   ========================================================================== */

/* Integração com a View-Section do CRM */
#tab-lancamentos {
  width: 100%;
}
#tab-lancamentos.active {
  display: flex !important;
  flex-direction: column;
  width: 100%;
  min-height: calc(100vh - 60px);
}

/* Container Principal */
.lancamentos-module-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-height: calc(100vh - 60px);
  background-color: #0f172a;
  color: #f8fafc;
  position: relative;
  border-radius: 12px;
  box-sizing: border-box;
}

/* 1. Barra Superior de Controles (Apple Clean) */
.lancamentos-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  flex-wrap: wrap;
  z-index: 20;
}

.lancamentos-bar-left,
.lancamentos-bar-center,
.lancamentos-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Botão Retrátil de Filtros */
.btn-toggle-filtros {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-toggle-filtros:hover,
.btn-toggle-filtros.active {
  background: #334155;
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Pílulas de Natureza e Categoria */
.filter-pills-group {
  display: inline-flex;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.filter-pill {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-pill:hover {
  color: #f8fafc;
}
.filter-pill.active {
  background: #334155;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.filter-pill.fixo.active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.filter-pill.variavel.active {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Separadores e Itens da Barra Apple Clean */
.bar-divider {
  color: #334155;
  font-weight: 300;
  font-size: 14px;
  user-select: none;
}
.bar-dot {
  color: #475569;
  font-size: 12px;
  user-select: none;
}
.bar-label-caption {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.bar-item-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bar-acoes-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Chip de Categoria Ativa Removível */
.chip-cat-ativa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #38bdf8;
}
.chip-cat-ativa button {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-weight: 700;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  line-height: 1;
}

/* Seletor de Exercício/Ano */
.select-ano-wrapper {
  display: inline-flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 2px 8px;
}
.select-ano-wrapper label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  margin-right: 4px;
}
.select-ano-custom {
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}
.select-ano-custom option {
  background: #1e293b;
  color: #fff;
}

/* Totalizador Reativo com Modo Privacidade */
.totalizador-reativo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.totalizador-label {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
}
.totalizador-valor {
  color: #38bdf8;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.totalizador-privacidade-icon {
  font-size: 11px;
  opacity: 0.6;
}

/* Botões de Ação Rápida */
.btn-acao-top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.btn-repetir-fixos {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border-color: rgba(14, 165, 233, 0.35);
}
.btn-repetir-fixos:hover {
  background: rgba(14, 165, 233, 0.25);
  border-color: #38bdf8;
}
.btn-novo-gasto {
  background: #0284c7;
  color: #fff;
  font-weight: 700;
}
.btn-novo-gasto:hover {
  background: #0369a1;
}

/* Modos de Visualização (1M, 2M, 3M, 6M, 12M) */
.view-modes-group {
  display: inline-flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.btn-view-mode {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-view-mode:hover {
  color: #f8fafc;
}
.btn-view-mode.active {
  background: #334155;
  color: #38bdf8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.btn-salvar-padrao {
  padding: 4px 6px;
  font-size: 10px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  border-radius: 6px;
}
.btn-salvar-padrao:hover {
  color: #eab308;
}
.btn-salvar-padrao.memorizado {
  color: #eab308;
}

/* Drawer Retrátil de Filtros */
.lancamentos-drawer-overlay {
  position: absolute;
  top: 53px;
  left: 0;
  bottom: 0;
  width: 290px;
  background: #1e293b;
  border-right: 1px solid #334155;
  box-shadow: 10px 0 25px rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 16px;
  box-sizing: border-box;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.2, 1);
  overflow-y: auto;
}
.lancamentos-drawer-overlay.open {
  transform: translateX(0);
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.drawer-title {
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.drawer-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
}
.drawer-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  margin-top: 14px;
  margin-bottom: 8px;
}
.top-cats-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.top-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  font-size: 12px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s;
}
.top-cat-item:hover,
.top-cat-item.active {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}
.top-cat-count {
  font-size: 11px;
  background: #1e293b;
  padding: 2px 6px;
  border-radius: 4px;
  color: #94a3b8;
  font-weight: 700;
}

/* 2. Container dos Meses (Scroll Horizontal Multi-Mês) */
.lancamentos-viewport {
  flex: 1;
  width: 100%;
  min-height: calc(100vh - 140px);
  overflow-x: auto;
  overflow-y: auto;
  padding: 14px;
  box-sizing: border-box;
}

.lancamentos-columns-track {
  display: flex;
  min-height: calc(100vh - 180px);
  gap: 14px;
  align-items: stretch;
}

/* Modos de Grade */
.coluna-mes-card {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  max-height: calc(100vh - 180px);
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

/* Larguras conforme modo */
.view-1m .coluna-mes-card { width: 100%; max-width: 900px; margin: 0 auto; }
.view-2m .coluna-mes-card { width: calc(50% - 7px); min-width: 380px; }
.view-3m .coluna-mes-card { width: calc(33.333% - 10px); min-width: 340px; }
.view-6m .coluna-mes-card { width: calc(16.666% - 12px); min-width: 290px; }
.view-12m .coluna-mes-card { width: 320px; }

.coluna-mes-card.drag-over {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* Cabeçalho da Coluna Mensal */
.coluna-mes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #172033;
  border-bottom: 1px solid #334155;
}
.coluna-mes-title-wrapper {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.coluna-mes-nome {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}
.coluna-mes-ano {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}
.coluna-mes-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-coluna-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #0284c7;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-coluna-add:hover {
  background: #0369a1;
}

/* 3. Mini-Card de Teto Orçamentário */
.mini-card-teto {
  padding: 8px 12px;
  background: #0f172a;
  border-bottom: 1px solid #334155;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mini-teto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}
.mini-teto-gasto {
  color: #cbd5e1;
  font-weight: 600;
}
.mini-teto-meta {
  color: #94a3b8;
  cursor: pointer;
}
.mini-teto-meta:hover {
  color: #38bdf8;
  text-decoration: underline;
}
.mini-teto-progress-bg {
  height: 6px;
  background: #1e293b;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.mini-teto-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease, background-color 0.3s ease;
}
.mini-teto-progress-fill.status-ok {
  background-color: #10b981;
}
.mini-teto-progress-fill.status-alerta {
  background-color: #f59e0b;
}
.mini-teto-progress-fill.status-estouro {
  background-color: #f43f5e;
}
.mini-teto-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #64748b;
}

/* 4. Lista e Linhas de Despesa */
.lista-gastos-mes {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 120px;
}
.lista-gastos-mes::-webkit-scrollbar {
  width: 4px;
}
.lista-gastos-mes::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

/* Linha de Gasto Individual */
.linha-gasto-item {
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border: 1px solid #273549;
  border-radius: 8px;
  padding: 8px 10px;
  gap: 4px;
  cursor: grab;
  transition: all 0.15s ease;
  user-select: none;
}
.linha-gasto-item:hover {
  border-color: #475569;
  background: #131d33;
}
.linha-gasto-item.dragging {
  opacity: 0.4;
  border-style: dashed;
}

.gasto-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.gasto-data {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.gasto-badges-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-natureza {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
}
.badge-natureza.fixo {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.badge-natureza.variavel {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-parcela {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  background: #334155;
  color: #e2e8f0;
  border-radius: 4px;
}

.gasto-item-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Edição Inline na Descrição */
.gasto-descricao {
  font-size: 12px;
  font-weight: 500;
  color: #f1f5f9;
  flex: 1;
  cursor: text;
  word-break: break-word;
}
.gasto-descricao:hover {
  color: #38bdf8;
  text-decoration: underline dotted;
}
.inline-edit-form {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}
.inline-edit-input {
  flex: 1;
  background: #0f172a;
  border: 1px solid #38bdf8;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  padding: 3px 6px;
  outline: none;
}
.btn-inline-save {
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 3px 6px;
  cursor: pointer;
  font-size: 11px;
}
.btn-inline-cancel {
  background: #64748b;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 3px 6px;
  cursor: pointer;
  font-size: 11px;
}

.gasto-valor {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gasto-item-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}
.gasto-categoria-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.categoria-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.categoria-dot.fixo { background: #38bdf8; }
.categoria-dot.variavel { background: #f59e0b; }

.gasto-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.3;
  transition: opacity 0.15s;
}
.linha-gasto-item:hover .gasto-item-actions {
  opacity: 1;
}
.btn-action-icon {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px;
  font-size: 11px;
  border-radius: 4px;
}
.btn-action-icon:hover {
  color: #38bdf8;
  background: #1e293b;
}
.btn-action-icon.btn-delete:hover {
  color: #f43f5e;
}

/* Linha de Total Mensal */
.coluna-mes-footer {
  padding: 8px 12px;
  background: #172033;
  border-top: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}
.mes-footer-label {
  color: #94a3b8;
}
.mes-footer-total {
  color: #38bdf8;
  font-variant-numeric: tabular-nums;
}

/* Modais Específicos */
.modal-lancamentos-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px;
}
.modal-lancamentos-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  width: 440px;
  max-width: 95%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-lancamentos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #334155;
}
.modal-lancamentos-title {
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
}
.modal-lancamentos-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  max-height: 70vh;
}
.modal-lancamentos-footer {
  padding: 12px 18px;
  border-top: 1px solid #334155;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #172033;
}

/* ==========================================================================
   ESTILOS DO MODO 1 MÊS (TABELA COMPLETA INDIVIDUAL)
   ========================================================================== */
.tabela-1m-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tabela-1m-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid #334155;
}

.btn-nav-mes {
  background: #0f172a;
  color: #38bdf8;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-nav-mes:hover {
  background: #334155;
  border-color: #38bdf8;
}

.tabela-1m-mes-titulo {
  text-align: center;
}
.tabela-1m-mes-titulo h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
}
.tabela-1m-sub {
  font-size: 12px;
  color: #94a3b8;
}

.tabela-1m-scroll {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tabela-lancamentos-1m {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #f1f5f9;
}

.tabela-lancamentos-1m thead th {
  background: #172033;
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #334155;
}

.tabela-lancamentos-1m tbody tr {
  border-bottom: 1px solid #334155;
  transition: background 0.15s;
}
.tabela-lancamentos-1m tbody tr:hover {
  background: rgba(51, 65, 85, 0.4);
}
.tabela-lancamentos-1m tbody tr.row-fixo {
  background: rgba(56, 189, 248, 0.02);
}

.tabela-lancamentos-1m td {
  padding: 10px 14px;
  vertical-align: middle;
}

.col-data {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  font-family: monospace;
}

.col-categoria {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
}

.gasto-descricao-tabela {
  cursor: pointer;
  color: #f8fafc;
  font-weight: 500;
  border-bottom: 1px dashed transparent;
  transition: all 0.2s;
}
.gasto-descricao-tabela:hover {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}

.col-valor {
  font-family: monospace;
  font-size: 13px;
}

.acoes-tabela-wrap {
  display: inline-flex;
  gap: 4px;
  justify-content: center;
}

.tabela-lancamentos-1m tfoot td {
  padding: 14px;
  background: #172033;
  border-top: 2px solid #334155;
}

/* ==========================================================================
   BOTTOM NAVIGATION ESTILO IOS NO MOBILE (< 768px)
   ========================================================================== */
.lancamentos-mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .lancamentos-module-container {
    padding-bottom: 70px; /* Espaço para o dock flutuante */
  }

  .lancamentos-viewport {
    overflow-x: hidden;
    overflow-y: auto;
  }
  .lancamentos-columns-track {
    flex-direction: column;
    height: auto;
  }
  .coluna-mes-card {
    width: 100% !important;
    min-width: 100% !important;
  }
  .lancamentos-top-bar {
    gap: 8px;
  }
  .view-modes-group {
    display: none;
  }
  .bar-acoes-group {
    display: none; /* Ações são transferidas para a barra inferior estilo iOS */
  }

  /* Dock Flutuante Estilo iOS */
  .lancamentos-mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    height: 60px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: space-around;
    padding: 0 10px;
  }

  .btn-ios-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 11px;
    padding: 6px;
    transition: color 0.2s;
  }
  .btn-ios-nav:hover,
  .btn-ios-nav.active {
    color: #38bdf8;
  }
  .ios-nav-icon {
    font-size: 16px;
    line-height: 1;
    margin-bottom: 2px;
  }
  .ios-nav-label {
    font-size: 9px;
    font-weight: 600;
  }

  .btn-ios-destaque {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.5);
    margin-top: -12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
  }
  .btn-ios-destaque:hover {
    transform: scale(1.05);
  }
  .ios-nav-icon-plus {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
  }
}

/* ==========================================================================
   MÓDULO DE GESTÃO FINANCEIRA: CARDS EXECUTIVOS, SUB-NAV, DRE E CATEGORIAS
   Design System Apple Clean / Dark Slate Theme
   ========================================================================== */

/* Seletor de Sócios e Compartilhado (Milton, Fernanda & Fábrica) */
.socios-selector-group {
  display: inline-flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.btn-socio-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-socio-pill:hover {
  color: #f8fafc;
}
.btn-socio-pill.active {
  background: #0284c7;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-socio-config {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-socio-config:hover {
  color: #38bdf8;
  background: #334155;
}

/* Badges de Sócios nos Lançamentos */
.badge-socio {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.2;
}
.badge-socio.socio1 {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.badge-socio.socio2 {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}
.badge-socio.compartilhado {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* 1. Header Executivo Superior & Cards de Resumo */
.financas-header-executive {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 18px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  box-sizing: border-box;
}

.financas-header-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.financas-title-main {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
}

.financas-subtitle-main {
  font-size: 12px;
  color: #94a3b8;
  margin: 2px 0 0 0;
  font-weight: 400;
}

.financas-header-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.select-ano-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  background: #0f172a;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #334155;
}

.select-ano-custom {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}
.select-ano-custom option {
  background: #0f172a;
  color: #f8fafc;
}

.btn-privacidade-top,
.btn-gerenciar-cats-top,
.btn-lancar-receita-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-privacidade-top:hover,
.btn-gerenciar-cats-top:hover {
  background: #334155;
  border-color: #38bdf8;
  color: #38bdf8;
}
.btn-lancar-receita-top {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-weight: 700;
}
.btn-lancar-receita-top:hover {
  background: #10b981;
  color: #0f172a;
  border-color: #10b981;
}

/* Grid de Resumo dos 3 Cards Superiores (Apple Clean Compacto) */
.financas-kpi-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.kpi-financas-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.kpi-financas-card:hover {
  transform: translateY(-1px);
  border-color: #475569;
}

.kpi-financas-card.card-receita {
  border-left: 3px solid #10b981;
}
.kpi-financas-card.card-despesa {
  border-left: 3px solid #ef4444;
}
.kpi-financas-card.card-caixa {
  border-left: 3px solid #38bdf8;
}

.kpi-fin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.kpi-fin-icon {
  font-size: 14px;
}
.kpi-fin-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-card-add-receita {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-card-add-receita:hover {
  background: #10b981;
  color: #0f172a;
}
.kpi-fin-val {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
}
.kpi-fin-val.green {
  color: #4ade80;
}
.kpi-fin-val.red {
  color: #f87171;
}
.kpi-fin-sub {
  font-size: 10px;
  color: #64748b;
  line-height: 1.2;
}
.kpi-fin-sub strong {
  color: #cbd5e1;
}

.btn-acao-top.btn-add-receita {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-weight: 700;
}
.btn-acao-top.btn-add-receita:hover {
  background: #10b981;
  color: #0f172a;
  border-color: #10b981;
}

/* 2. Sub-Navegação por Pílulas (Fluxo de Lançamentos vs. DRE Anual) */
.financas-subnav-pills-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 10px;
}

.financas-subnav-group {
  display: inline-flex;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 3px;
  gap: 4px;
}

.btn-financas-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-financas-pill:hover {
  color: #f8fafc;
}
.btn-financas-pill.active {
  background: #38bdf8;
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.35);
}

.financas-subnav-right-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill-info-tag {
  font-size: 12px;
  color: #94a3b8;
  background: #0f172a;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #334155;
}
.pill-info-tag strong {
  color: #38bdf8;
}

/* 3. Sub-Aba DRE Contábil (Demonstrativo de Resultados) */
.financas-main-content-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.dre-wrapper-container {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.dre-toolbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 12px 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.dre-toolbar-left,
.dre-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dre-toolbar-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-dre-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-dre-action:hover {
  background: #334155;
  color: #fff;
  border-color: #64748b;
}
.btn-dre-action.btn-export-csv:hover {
  border-color: #10b981;
  color: #34d399;
}
.btn-dre-action.btn-print-dre:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Tabela Contábil DRE (Scroll Horizontal & Colunas Fixas) */
.dre-table-responsive-scroll {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid #334155;
  border-radius: 12px;
  background: #1e293b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.dre-contabil-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}

.dre-contabil-table th,
.dre-contabil-table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid #334155;
  border-right: 1px solid rgba(51, 65, 85, 0.4);
}
.dre-contabil-table th:last-child,
.dre-contabil-table td:last-child {
  border-right: none;
}

.dre-contabil-table thead th {
  background: #0f172a;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.dre-contabil-table th.col-fixa-categoria,
.dre-contabil-table td.col-fixa-categoria {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 5;
  background: #1e293b;
  min-width: 250px;
  max-width: 300px;
  font-weight: 600;
  border-right: 2px solid #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dre-contabil-table thead th.col-fixa-categoria {
  z-index: 15;
  background: #0f172a;
}

.dre-contabil-table th.col-destaque-total,
.dre-contabil-table td.col-destaque-total {
  background: rgba(15, 23, 42, 0.6);
  font-weight: 700;
  border-left: 2px solid #334155;
}
.dre-contabil-table th.col-destaque-media,
.dre-contabil-table td.col-destaque-media {
  background: rgba(15, 23, 42, 0.4);
  font-style: italic;
  color: #94a3b8;
}

/* Linhas Especiais do DRE */
.dre-section-title-row td {
  background: #0f172a !important;
  color: #38bdf8 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 14px;
  text-align: left !important;
  border-top: 1px solid #334155;
}

.dre-row-input td.dre-cell-editavel {
  cursor: pointer;
  transition: background 0.15s ease;
}
.dre-row-input td.dre-cell-editavel:hover {
  background: rgba(56, 189, 248, 0.12);
  outline: 1px dashed #38bdf8;
}
.cell-extras {
  color: #38bdf8 !important;
  font-weight: 600;
}
.cell-vazia {
  color: #475569;
}

.dre-row-total-receitas {
  background: rgba(16, 185, 129, 0.08);
  border-top: 2px solid #10b981;
}
.dre-row-total-despesas {
  background: rgba(239, 68, 68, 0.08);
  border-top: 2px solid #ef4444;
}
.dre-row-saldo-liquido {
  background: rgba(56, 189, 248, 0.08);
  border-top: 2px solid #38bdf8;
}
.dre-row-poupanca {
  background: #172033;
  font-size: 11px;
}
.dre-row-caixa-acumulado {
  background: rgba(245, 158, 11, 0.08);
  border-top: 2px solid #f59e0b;
}

.cell-val-green {
  color: #4ade80 !important;
}
.cell-val-red {
  color: #f87171 !important;
}
.cell-taxa-ok {
  color: #4ade80 !important;
  font-weight: 700;
}
.cell-taxa-alert {
  color: #f87171 !important;
  font-weight: 700;
}
.cell-caixa-pos {
  color: #38bdf8 !important;
}
.cell-caixa-neg {
  color: #f87171 !important;
}

.dre-row-categoria.dre-cat-hidden {
  display: none !important;
}

/* 4. Gerenciador de Categorias Modal */
.categorias-gerenciador-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.categoria-gerenciador-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 12px;
  transition: border-color 0.2s ease;
}
.categoria-gerenciador-item:hover {
  border-color: #475569;
}

.cat-item-nome {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
}

.cat-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cat-item-metricas {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.cat-metric-val {
  color: #94a3b8;
  font-weight: 700;
}
.cat-metric-val.highlight {
  color: #38bdf8;
}
.cat-metric-sub {
  color: #64748b;
}

.cat-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Alternador de Escopo dos Cards: Ano vs Mês */
.escopo-resumo-group {
  display: inline-flex;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.btn-escopo-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-escopo-pill:hover {
  color: #f8fafc;
}
.btn-escopo-pill.active {
  background: #334155;
  color: #38bdf8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Caixa de Busca Rápida Apple Clean */
.search-box-apple {
  display: inline-flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 4px 10px;
  gap: 6px;
  transition: border-color 0.2s;
}
.search-box-apple:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}
.search-box-apple .search-icon {
  font-size: 12px;
  color: #64748b;
}
.search-box-apple input {
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 12px;
  outline: none;
  width: 170px;
}
.search-box-apple input::placeholder {
  color: #64748b;
}
.btn-clear-search {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.btn-clear-search:hover {
  color: #f87171;
}

/* Card do Gráfico Executivo DRE (Chart.js) */
.dre-chart-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dre-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.dre-chart-title {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.dre-chart-legendas {
  display: flex;
  align-items: center;
  gap: 16px;
}

.legenda-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.legenda-cor {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.legenda-cor.green {
  background: #10b981;
}
.legenda-cor.red {
  background: #ef4444;
}
.legenda-cor.blue {
  background: #38bdf8;
  border-radius: 50%;
}

.dre-chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
}

/* Heatmap Anual DRE (Grade 12 Meses) */
.dre-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.heatmap-mes-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.heatmap-mes-card:hover {
  transform: translateY(-2px);
  border-color: #475569;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.heatmap-mes-card.heat-alto {
  border-left: 4px solid #ef4444;
}
.heatmap-mes-card.heat-normal {
  border-left: 4px solid #38bdf8;
}
.heatmap-mes-card.heat-baixo {
  border-left: 4px solid #10b981;
}

.heatmap-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.heatmap-mes-titulo {
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
}
.heatmap-mes-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  background: #0f172a;
  color: #94a3b8;
  border: 1px solid #334155;
}

.heatmap-card-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.heatmap-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.heatmap-label {
  color: #94a3b8;
}
.heatmap-val {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
}
.heatmap-val.green {
  color: #4ade80;
}
.heatmap-val.red {
  color: #f87171;
}
.heatmap-val.blue {
  color: #38bdf8;
}

.heatmap-teto-wrap {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.heatmap-teto-text {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #64748b;
}

.heatmap-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.heatmap-poupanca-tag {
  font-size: 11px;
  font-weight: 700;
}
.heatmap-poupanca-tag.pos {
  color: #4ade80;
}
.heatmap-poupanca-tag.neg {
  color: #f87171;
}

.btn-heatmap-atalho {
  background: #0f172a;
  border: 1px solid #334155;
  color: #38bdf8;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-heatmap-atalho:hover {
  background: #38bdf8;
  color: #0f172a;
}


.btn-action-icon {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #94a3b8;
  transition: all 0.15s ease;
}
.btn-action-icon:hover {
  background: #334155;
  color: #fff;
  border-color: #475569;
}
.btn-action-icon.btn-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

/* 5. Regras de Impressão Executiva (DRE A4 Paisagem) */
@media print {
  body * {
    visibility: hidden;
  }
  #tab-lancamentos,
  #tab-lancamentos * {
    visibility: visible;
  }
  #tab-lancamentos {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: #fff !important;
    color: #000 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .lancamentos-top-bar,
  .financas-header-actions-row,
  .financas-subnav-pills-bar,
  .dre-toolbar-card,
  .btn-ios-nav,
  .lancamentos-mobile-bottom-nav,
  .modal-lancamentos-overlay {
    display: none !important;
  }
  .dre-wrapper-container {
    padding: 0 !important;
  }
  .dre-table-responsive-scroll {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    background: #fff !important;
  }
  .dre-contabil-table {
    font-size: 10px !important;
    color: #000 !important;
  }
  .dre-contabil-table th,
  .dre-contabil-table td {
    border: 1px solid #ddd !important;
    color: #000 !important;
    background: #fff !important;
  }
  .dre-contabil-table thead th,
  .dre-section-title-row td {
    background: #f1f5f9 !important;
    color: #0f172a !important;
  }
}


/* ==========================================================================
   NOVIDADES: STATUS DE LANÇAMENTO (PAGO/PENDENTE), TERMÔMETRO SOCIETÁRIO,
   GUIA GRÁFICOS (CHART.JS) E IMPORTADOR DE EXTRATO BANCÁRIO OFX
   ========================================================================== */

/* 1. Badges de Status Pago / Pendente / Vencido */
.badge-status-pago {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
}
.badge-status-pago.pago {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}
.badge-status-pago.pago:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
}
.badge-status-pago.pendente {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}
.badge-status-pago.pendente:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
}
.badge-status-pago.vencido {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.45);
  animation: pulse-vencido 2s infinite;
}
@keyframes pulse-vencido {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}
.badge-status-pago.vencido:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
}

/* 2. Termômetro de Retiradas Societárias (Milton vs Fernanda) */
.termometro-socios-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  margin-bottom: 20px;
}
.termometro-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.termometro-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.termometro-icon {
  font-size: 26px;
  background: rgba(2, 132, 199, 0.15);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(2, 132, 199, 0.3);
}
.termometro-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
}
.termometro-subtitle {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: #94a3b8;
}
.termometro-meta-badge {
  background: #0f172a;
  border: 1px solid #334155;
  color: #cbd5e1;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
}
.termometro-bar-container {
  width: 100%;
  height: 28px;
  background: #0f172a;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  border: 1px solid #334155;
  position: relative;
}
.termometro-bar-fill-s1 {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: width 0.4s ease;
  padding: 0 8px;
}
.termometro-bar-fill-s2 {
  background: linear-gradient(90deg, #db2777, #ec4899);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: width 0.4s ease;
  padding: 0 8px;
}
.termometro-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.termometro-socio-box {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.termometro-socio-box.s1 {
  border-left: 3px solid #38bdf8;
}
.termometro-socio-box.s2 {
  border-left: 3px solid #ec4899;
}
.termometro-socio-box.total {
  border-left: 3px solid #10b981;
}
.termometro-box-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}
.termometro-box-val {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
}
.termometro-box-sub {
  font-size: 11px;
  color: #64748b;
}
.termometro-alert-box {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.termometro-alert-icon {
  font-size: 18px;
}
.termometro-alert-content strong {
  display: block;
  font-size: 13px;
  color: #38bdf8;
}
.termometro-alert-content p {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: #cbd5e1;
}

/* 3. Guia Gráficos Layout & Canvas */
.graficos-wrapper-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 40px;
}
.graficos-grid-2cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 18px;
}
@media (max-width: 900px) {
  .graficos-grid-2cols {
    grid-template-columns: 1fr;
  }
}
.grafico-card-item {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.grafico-card-item.full-width {
  grid-column: 1 / -1;
}
.grafico-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.grafico-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}
.grafico-card-badge {
  font-size: 11px;
  color: #94a3b8;
  background: #0f172a;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #334155;
}
.grafico-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
}

/* 4. Importador OFX & Botões */
.btn-import-ofx-top, .btn-acao-top.btn-import-ofx {
  background: rgba(14, 165, 233, 0.15) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(14, 165, 233, 0.35) !important;
}
.btn-import-ofx-top:hover, .btn-acao-top.btn-import-ofx:hover {
  background: rgba(14, 165, 233, 0.25) !important;
  border-color: #38bdf8 !important;
}
.ofx-dropzone {
  border: 2px dashed #475569;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.6);
  transition: all 0.2s ease;
}
.ofx-dropzone:hover, .ofx-dropzone.dragover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}
.ofx-dropzone-icon {
  font-size: 38px;
  margin-bottom: 8px;
}
.ofx-dropzone-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
}
.ofx-dropzone-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}
.ofx-preview-table-wrap {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid #334155;
  border-radius: 8px;
  margin-top: 12px;
}
.ofx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.ofx-table th {
  background: #0f172a;
  color: #94a3b8;
  padding: 8px 10px;
  font-weight: 600;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid #334155;
}
.ofx-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #1e293b;
  color: #cbd5e1;
}
.ofx-table tr:hover {
  background: rgba(30, 41, 59, 0.7);
}
.ofx-input-desc {
  width: 100%;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #f8fafc;
  padding: 4px 8px;
  font-size: 12px;
}
.ofx-select-sm {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #f8fafc;
  padding: 4px 6px;
  font-size: 11px;
}
