/* ALERTS & SALDOS COMPONENT STYLES */
.venc-panel {
  background: var(--bg-panel);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: fadeUp .5s .3s ease both;
}
.venc-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap;
}
.venc-today-badge {
  font-size: 10px; font-weight: 700;
  background: rgba(52,152,219,.15);
  border: 1px solid rgba(52,152,219,.4);
  color: var(--blue); border-radius: 20px;
  padding: 3px 10px; letter-spacing: .5px;
}

.venc-filter-bar {
  padding: 8px 14px; margin: 8px 14px;
  background: rgba(52,152,219,.12); border: 1px solid rgba(52,152,219,.3);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--white); gap: 6px;
}
.venc-filter-bar button {
  background: none; border: none; color: var(--amber);
  font-weight: 700; font-size: 11px; cursor: pointer; text-decoration: underline;
  white-space: nowrap;
}

.venc-bands { padding: 6px 0; border-bottom: 1px solid var(--border); }
.venc-band {
  display: flex; align-items: center;
  padding: 9px 18px; gap: 12px;
  transition: all .2s; cursor: pointer;
  border-left: 3px solid transparent; user-select: none;
}
.venc-band:hover { background: rgba(255,255,255,.05); }
.venc-band.active-filter {
  background: rgba(52, 152, 219, 0.12) !important;
  border-left: 3px solid var(--blue);
}
.venc-band.active-filter#band-vencido {
  background: rgba(231, 76, 60, 0.15) !important;
  border-left-color: #E74C3C;
}
.venc-band.active-filter#band-hoje {
  background: rgba(243, 156, 18, 0.15) !important;
  border-left-color: #F39C12;
}
.venc-band.active-filter#band-7d {
  background: rgba(52, 152, 219, 0.15) !important;
  border-left-color: #3498DB;
}
.venc-band.active-filter#band-30d {
  background: rgba(46, 204, 113, 0.15) !important;
  border-left-color: #2ECC71;
}

.venc-band-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
}
.venc-band-info { flex: 1; min-width: 0; }
.venc-band-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.venc-band-sub { font-size: 10px; color: var(--gray); white-space: nowrap; }
.venc-band-right { text-align: right; flex-shrink: 0; }
.venc-band-val { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; }
.venc-band-cnt { font-size: 10px; color: var(--gray); margin-top: 1px; }

/* TABELA DE SALDOS DIÁRIOS (SUBSTITUI PRÓXIMAS MOVIMENTAÇÕES) */
.saldos-header-row {
  padding: 10px 18px;
  background: rgba(22, 35, 48, 0.85);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap;
}
.saldos-title {
  font-size: 11.5px; font-weight: 700;
  color: var(--white); text-transform: uppercase; letter-spacing: .6px;
  display: flex; align-items: center; gap: 6px;
}
.saldos-btn-reset-day {
  background: rgba(231, 76, 60, 0.16);
  border: 1px solid rgba(231, 76, 60, 0.45);
  color: #ff7675;
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.saldos-btn-reset-day:hover {
  background: #e74c3c;
  color: #fff;
  border-color: #e74c3c;
  transform: translateY(-1px);
}

.saldos-table-wrap {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 420px;
  -webkit-overflow-scrolling: touch;
}
.saldos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.saldos-table thead th {
  background: var(--table-header-bg);
  color: var(--white);
  font-weight: 700;
  padding: 8px 6px;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--border);
}
.saldos-table thead th.num { text-align: right; }

.saldos-table tbody tr.saldo-row {
  border-bottom: 1px solid rgba(46,74,107,.25);
  transition: all .15s;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.saldos-table tbody tr.saldo-row:hover {
  background: rgba(52,152,219,.08);
}
.saldos-table tbody tr.saldo-row.selected-day-row {
  background: rgba(52, 152, 219, 0.22) !important;
  border-left: 3px solid var(--blue);
}
.saldos-table tbody tr.saldo-row.selected-day-row td {
  color: var(--white);
  font-weight: 600;
}
.saldos-table td {
  padding: 6.5px 6px;
  color: var(--gray);
  white-space: nowrap;
  font-size: 11px;
}
.saldos-table td.dia-label {
  color: var(--white);
  font-weight: 600;
  font-size: 10.5px;
}
.saldos-table td.num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
}
.saldos-table td.green-val {
  color: var(--green);
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
}
.saldos-table td.red-val {
  color: var(--red);
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
}

.saldos-table tfoot td {
  background: var(--table-footer-bg);
  color: var(--white);
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 8px 6px;
  font-size: 11px;
  text-align: right;
  position: sticky;
  bottom: 0;
  z-index: 2;
  border-top: 1px solid var(--border);
}
.saldos-table tfoot td:first-child {
  text-align: left;
  font-family: var(--font-main);
  font-size: 10px;
  color: var(--amber);
  text-transform: uppercase;
}

/* OVERRIDES MODO CLARO PARA ALERTAS E SALDOS */
body.light-theme .venc-band {
  background: #F8FAFC;
  border-color: #E2E8F0;
}
body.light-theme .venc-band:hover {
  background: #F1F5F9;
}
body.light-theme .venc-band.active-filter {
  background: #F1F5F9;
}
body.light-theme .saldos-header-row {
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}
body.light-theme .saldos-table tbody tr.saldo-row {
  border-bottom: 1px solid #E2E8F0;
}
body.light-theme .saldos-table tbody tr.saldo-row:hover {
  background: #F1F5F9;
}
body.light-theme .saldos-table tbody tr.saldo-row.selected-day-row {
  background: rgba(37, 99, 235, 0.12) !important;
  border-left-color: var(--blue);
}
body.light-theme .saldos-table tbody tr.saldo-row.selected-day-row td {
  color: #0F172A;
}
body.light-theme .saldos-btn-reset-day {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #DC2626;
}
body.light-theme .saldos-btn-reset-day:hover {
  background: #EF4444;
  color: #FFFFFF;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
  .saldos-table-wrap {
    overflow-x: auto;
  }
}

/* MOBILE RESPONSIVE */
@media (max-width: 640px) {
  .venc-header { padding: 12px 14px; }
  .venc-band { padding: 8px 12px; gap: 10px; }
  .venc-band-val { font-size: 12px; }
  .saldos-header-row { padding: 8px 12px; }
  .saldos-table td, .saldos-table thead th { padding: 7px 8px; font-size: 11px; }
}
