/* CONTAS A RECEBER E CONTAS A PAGAR COMPONENT STYLES */
#table-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.mov-card {
  background: var(--bg-panel);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: fadeUp .5s .35s ease both;
}

.mov-card-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.mov-card.receber .panel-title .dot { background: var(--green); }
.mov-card.pagar   .panel-title .dot { background: var(--red); }

.mov-badge-day {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.mov-card.receber .mov-badge-day {
  background: rgba(46, 204, 113, 0.15);
  color: var(--green);
  border: 1px solid rgba(46, 204, 113, 0.35);
}
.mov-card.pagar .mov-badge-day {
  background: rgba(231, 76, 60, 0.15);
  color: var(--red);
  border: 1px solid rgba(231, 76, 60, 0.35);
}

.btn-clear-day-inline {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: inherit;
  border-radius: 8px;
  padding: 1px 6px;
  font-size: 10px;
  cursor: pointer;
  margin-left: 6px;
  font-weight: 700;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
}
.btn-clear-day-inline:hover {
  background: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.mov-table-wrap {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 220px;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.mov-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  table-layout: fixed;
}
.mov-table thead th {
  background: var(--table-header-bg);
  color: var(--white);
  font-weight: 700;
  padding: 8px 8px;
  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);
}
.mov-table thead th.num { text-align: right; }

.mov-table tbody tr {
  border-bottom: 1px solid rgba(46, 74, 107, 0.25);
  transition: background .15s;
}
.mov-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.mov-table tbody tr:hover { background: rgba(52, 152, 219, 0.08); }

.mov-table td {
  padding: 6.5px 8px;
  color: var(--gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
}
.mov-table td.bold {
  color: var(--white);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mov-table td.num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
}
.mov-table td.green-val {
  color: var(--green);
  font-family: var(--font-mono);
  text-align: right;
  font-size: 11px;
}
.mov-table td.red-val {
  color: var(--red);
  font-family: var(--font-mono);
  text-align: right;
  font-size: 11px;
}
.mov-table td.historico {
  overflow: hidden;
  text-overflow: ellipsis;
}

.mov-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--gray);
  font-size: 12px;
}

/* RODAPÉ COM TOTALIZADOR ESTILO ERP (CANTO INFERIOR DIREITO) */
.mov-footer {
  padding: 8px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mov-count {
  font-size: 11px;
  color: var(--gray);
}
.mov-total-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mov-total-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray);
}
.mov-total-val {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  min-width: 120px;
  text-align: right;
  letter-spacing: -.3px;
}
.mov-card.receber .mov-total-val {
  color: var(--green);
  border-color: rgba(46, 204, 113, 0.4);
}
.mov-card.pagar .mov-total-val {
  color: var(--red);
  border-color: rgba(231, 76, 60, 0.4);
}

/* MOBILE & TABLET RESPONSIVE */
@media (max-width: 900px) {
  .mov-table-wrap {
    overflow-x: auto;
  }
  .mov-table {
    table-layout: auto;
  }
}

@media (max-width: 768px) {
  .mov-card-header {
    padding: 10px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .mov-table td, .mov-table thead th {
    padding: 8px 10px;
    font-size: 11px;
  }
  .mov-footer {
    padding: 8px 14px;
    flex-wrap: wrap;
    justify-content: space-between;
  }
}

/* OVERRIDES MODO CLARO PARA CONTAS A RECEBER E PAGAR */
body.light-theme .mov-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
body.light-theme .mov-card-header {
  border-bottom: 1px solid #E2E8F0;
}
body.light-theme .mov-table thead th {
  color: #1E293B;
  border-bottom: 1px solid #CBD5E1;
}
body.light-theme .mov-table tbody tr {
  border-bottom: 1px solid #E2E8F0;
}
body.light-theme .mov-table tbody tr:nth-child(even) {
  background: #F8FAFC;
}
body.light-theme .mov-table tbody tr:hover {
  background: #F1F5F9;
}
body.light-theme .mov-table td.bold {
  color: #0F172A;
}
body.light-theme .mov-footer {
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
}
body.light-theme .mov-total-val {
  background: #FFFFFF;
  border-color: #CBD5E1;
}
