/* ============================
   VARIÁVEIS CSS
   ============================ */
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #3b82f6;
  
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ============================
   RESET E BASE
   ============================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* ============================
   CONTAINER PRINCIPAL
   ============================ */
.saldos-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* ============================
   CABEÇALHO
   ============================ */
.saldos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: var(--radius-lg);
  color: white;
  box-shadow: var(--shadow-lg);
}

.header-info h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.header-subtitle {
  opacity: 0.9;
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  gap: 1rem;
}

/* ============================
   BOTÕES
   ============================ */
.btn-primary,
.btn-secondary {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: white;
  color: var(--primary-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: var(--secondary-color);
}

/* ============================
   CAMPOS DE BUSCA - UMA LINHA
   ============================ */
.search-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.search-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.search-input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  transition: all 0.2s;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input::placeholder {
  color: var(--text-light);
}

/* ============================
   FILTROS AVANÇADOS
   ============================ */
.advanced-filters-container {
  background: white;
  padding: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  border-left: 4px solid var(--warning-color);
  overflow: visible;  /* 🔥 PERMITIR OVERFLOW */
  display: none;
  position: relative;  /* 🔥 CONTEXTO DE POSICIONAMENTO */
  z-index: 50;  /* 🔥 ACIMA DA TABELA */
}

.advanced-filters-container.active {
  display: block;
}

.advanced-filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  cursor: pointer;
  user-select: none;
}

.advanced-filters-header:hover {
  background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
}

.advanced-filters-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.advanced-filters-body {
  padding: 1.5rem;
  max-height: 600px;  /* 🔥 AUMENTADO DE 500px */
  overflow-y: auto;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;  /* 🔥 CONTEXTO DE POSICIONAMENTO */
  z-index: 10;  /* 🔥 ACIMA DO CONTEÚDO */
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-dropdown {
  position: relative;
  z-index: 100;  /* 🔥 GARANTIR QUE DROPDOWN FIQUE ACIMA */
}

.filter-dropdown-button {
  width: 100%;
  padding: 0.75rem 1rem;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-dropdown-button:hover {
  border-color: var(--warning-color);
}

.filter-dropdown-button.active {
  border-color: var(--warning-color);
  background: #fffbeb;
}

.filter-dropdown-menu {
  position: fixed;  /* 🔥 FIXED - FICA ACIMA DE TUDO */
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-height: 600px;
  overflow-y: auto;
  z-index: 99999;
  display: none;
  min-width: 300px;  /* 🔥 LARGURA MÍNIMA */
}

.filter-dropdown-menu.open {
  display: block;
  animation: slideDown 0.2s ease-out;  /* 🔥 ANIMAÇÃO */
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-search {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}

.filter-search input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.filter-options-list {
  padding: 0.5rem;
}

.filter-option {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  user-select: none;  /* 🔥 EVITA SELEÇÃO DE TEXTO */
}

.filter-option:hover {
  background: var(--bg-secondary);
}

.filter-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;  /* 🔥 NÃO ENCOLHE */
}

.filter-option-label {
  flex: 1;
  cursor: pointer;
  line-height: 1.4;  /* 🔥 MELHOR ALINHAMENTO */
}

.filter-option-count {
  color: var(--text-light);
  font-size: 0.75rem;
  font-weight: 600;
}

.filters-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  margin-top: 1rem;
  border-top: 2px solid var(--border-light);
  background: white;
  /* 🔥 REMOVIDO STICKY - BOTÃO NÃO FLUTUA MAIS */
}

.btn-apply-filters {
  flex: 1;
  padding: 0.875rem;  /* 🔥 MAIOR */
  background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;  /* 🔥 MAIOR */
  font-weight: 700;  /* 🔥 MAIS NEGRITO */
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);  /* 🔥 SOMBRA */
}

.btn-apply-filters:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
}

.btn-clear-filters {
  padding: 0.875rem 1.5rem;  /* 🔥 MAIOR */
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 2px solid var(--border-color);  /* 🔥 BORDA */
  border-radius: var(--radius-md);
  font-size: 0.9rem;  /* 🔥 MAIOR */
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-clear-filters:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.active-filters-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--danger-color);
  color: white;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 0.5rem;
}

/* ============================
   SELETOR DE OBRAS
   ============================ */
.obras-selector-container {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.obras-selector-dropdown {
  position: relative;
  width: 100%;
}

.obras-selector-button {
  width: 100%;
  padding: 0.75rem 1rem;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.obras-selector-button:hover {
  border-color: var(--primary-color);
  background: var(--bg-secondary);
}

.obras-selector-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.obras-selector-dropdown-menu.open {
  display: block;
}

.obras-selector-search {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}

.obras-selector-search input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.obras-selector-list {
  padding: 0.5rem;
}

.obra-item {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.obra-item:hover {
  background: var(--bg-secondary);
}

.obra-item-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.obra-item-label {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.obras-actions {
  padding: 0.75rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 0.5rem;
  position: sticky;
  bottom: 0;
  background: white;
}

.obras-actions button {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-select-all {
  background: var(--primary-color);
  color: white;
}

.btn-select-all:hover {
  background: #5a6fd8;
}

.btn-clear-all {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.btn-clear-all:hover {
  background: var(--border-color);
}

/* ============================
   CARDS DE INFORMAÇÃO
   ============================ */
.info-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.info-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border-left: 4px solid;
  transition: transform 0.2s;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.info-card.primary { border-left-color: var(--primary-color); }
.info-card.success { border-left-color: var(--success-color); }
.info-card.warning { border-left-color: var(--warning-color); }
.info-card.danger { border-left-color: var(--danger-color); }
.info-card.info { border-left-color: var(--info-color); }

.info-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.info-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-card-icon {
  font-size: 2rem;
  opacity: 0.8;
}

.info-card-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.info-card-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.info-card-date {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
}

/* ============================
   TABS
   ============================ */
.tabs-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
}

.tab-btn {
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  margin-bottom: -2px;
}

.tab-btn:hover {
  color: var(--primary-color);
  background: var(--bg-tertiary);
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  position: relative;
  display: block !important;  /* 🔥 CRÍTICO: Sobrescrever o display:none do style.css */
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================
   TABELAS
   ============================ */
.table-container {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);  /* 🔥 FUNDO SUTIL */
}

.table-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* 🔥 INDICADOR DE FILTROS ATIVOS */
.filters-active-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.table-info {
  text-align: right;
  font-size: 0.875rem;
}

.table-info-label {
  color: var(--text-secondary);
  font-weight: 600;
}

.table-info-value {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
}

.table-info-date {
  color: var(--text-light);
  font-size: 0.75rem;
}

.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  color: white;  /* 🔥 TEXTO BRANCO */
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);  /* 🔥 GRADIENTE DE FUNDO */
  text-transform: uppercase;
  font-size: 0.85rem;  /* 🔥 AUMENTADO DE 0.75rem */
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
  user-select: none;
}

.data-table th[onclick] {
  cursor: pointer;
  transition: all 0.2s;
}

.data-table th[onclick]:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4294 100%);  /* 🔥 GRADIENTE MAIS ESCURO NO HOVER */
  transform: translateY(-1px);  /* 🔥 EFEITO DE ELEVAÇÃO */
}

/* 🔥 ÍCONE DE ORDENAÇÃO */
.sort-icon {
  display: inline-block;
  margin-left: 6px;
  font-size: 1.1rem;  /* 🔥 MAIOR */
  color: #fbbf24;  /* 🔥 AMARELO OURO */
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);  /* 🔥 SOMBRA PARA DESTAQUE */
}

/* ============================
   CONTROLES DE COLUNAS
   ============================ */
.column-controls-container {
  background: white;
  padding: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--info-color);
  overflow: hidden;
}

.column-controls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.column-controls-header:hover {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.column-controls-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.column-controls-toggle {
  font-size: 1.25rem;
  color: var(--info-color);
  font-weight: bold;
  transition: transform 0.3s;
}

.column-controls-toggle.open {
  transform: rotate(180deg);
}

.column-controls-body {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  opacity: 0;
}

.column-controls-body.open {
  padding: 1rem 1.5rem;
  max-height: 500px;
  opacity: 1;
  transition: max-height 0.3s ease-in, padding 0.3s ease-in, opacity 0.3s ease-in;
}

/* 🔥 BOTÕES DE COLUNA MELHORADOS */
.column-toggle-btn {
  padding: 8px 16px;  /* 🔥 MAIOR */
  border: 2px solid;
  border-radius: 8px;  /* 🔥 MAIS ARREDONDADO */
  font-size: 0.875rem;  /* 🔥 MAIOR */
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.column-toggle-btn.visible {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);  /* 🔥 GRADIENTE VERDE */
  color: white;
  border-color: #059669;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.column-toggle-btn.visible:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

.column-toggle-btn.hidden {
  background: #e5e7eb;
  color: #6b7280;
  border-color: #d1d5db;
}

.column-toggle-btn.hidden:hover {
  background: #d1d5db;
  color: #374151;
  border-color: #9ca3af;
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
}

.data-table tbody tr {
  transition: background-color 0.15s;
}

.data-table tbody tr:hover {
  background-color: var(--bg-secondary);
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.font-semibold {
  font-weight: 600;
}

.text-bold {
  font-weight: 700;
  color: var(--danger-color);
}

.number-cell {
  font-family: 'Courier New', monospace;
  font-variant-numeric: tabular-nums;
}

.currency-cell {
  color: var(--text-primary);
}

/* ============================
   BADGES
   ============================ */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge.success {
  background: #d1fae5;
  color: #065f46;
}

.badge.warning {
  background: #fef3c7;
  color: #92400e;
}

.badge.danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge.info {
  background: #dbeafe;
  color: #1e40af;
}

/* ============================
   EMPTY STATE
   ============================ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 0.95rem;
}

/* ============================
   LOADING
   ============================ */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-content {
  background: white;
  padding: 2rem 3rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#loadingMessage {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================
   UTILITÁRIOS
   ============================ */
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

/* ============================
   RESPONSIVIDADE
   ============================ */
@media (max-width: 1024px) {
  .saldos-container {
    padding: 1.5rem;
  }
  
  .saldos-header {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .header-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .header-actions button {
    width: 100%;
  }
  
  .search-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .saldos-header h1 {
    font-size: 1.5rem;
  }
  
  .info-cards-container {
    grid-template-columns: 1fr;
  }
  
  .tabs-container {
    flex-direction: column;
    gap: 0;
  }
  
  .tab-btn {
    border-bottom: none;
    border-left: 3px solid transparent;
    margin-bottom: 0;
    margin-left: -2px;
  }
  
  .tab-btn.active {
    border-left-color: var(--primary-color);
  }
  
  .table-wrapper {
    overflow-x: scroll;
  }
  
  .data-table {
    font-size: 0.8rem;
  }
  
  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .saldos-container {
    padding: 1rem;
  }
  
  .saldos-header {
    padding: 1.5rem;
  }
  
  .info-card-value {
    font-size: 2rem;
  }
}
