/* Fluxo de Caixa */
.fluxo-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem;
}
.fluxo-mes { display: inline-flex; align-items: center; gap: .5rem; }
.fluxo-nav {
  width: 1.8rem; height: 1.8rem; border-radius: .45rem; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1rem; line-height: 1;
}
.fluxo-nav:hover { background: var(--bg-2); }
.fluxo-mes-label { font-size: .95rem; font-weight: 700; color: var(--text); min-width: 5.5rem; text-align: center; text-transform: capitalize; }

.fluxo-centros { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.fluxo-centros-label { font-size: .68rem; color: var(--text-mut); font-weight: 600; }
.fluxo-chip {
  font-size: .68rem; font-weight: 600; padding: .25rem .5rem; border-radius: .35rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.fluxo-chip.on { background: var(--text); color: var(--surface); border-color: var(--text); }

/* gráfico: barras divergentes (receitas pra cima, despesas pra baixo) + linha de saldo */
.fluxo-chart-wrap {
  background: var(--surface); border: 1px solid var(--border); border-radius: .65rem;
  padding: .8rem .6rem; margin-bottom: .8rem; overflow-x: auto;
}
.fluxo-legend { display: flex; gap: 1rem; font-size: .66rem; color: var(--text-mut); margin-bottom: .5rem; padding-left: .3rem; }
.fluxo-legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .35rem; vertical-align: middle; }
.fluxo-legend .lg-pos { background: #059669; }
.fluxo-legend .lg-neg { background: #e11d48; }
.fluxo-legend .lg-line { width: 1rem; height: 0; border-top: 2px solid #4f46e5; border-radius: 0; }

.fluxo-chart { position: relative; height: var(--h, 200px); }
.fluxo-cols { display: flex; align-items: stretch; gap: 3px; height: 100%; }
.fluxo-col { flex: 1; min-width: 12px; display: flex; flex-direction: column; }
/* duas metades iguais → fronteira = linha de base central */
.fluxo-colbars { flex: 1; display: grid; grid-template-rows: 1fr 1fr; }
.fluxo-bar { width: 62%; margin: 0 auto; border-radius: 2px; min-height: 0; }
.fluxo-bar.pos { align-self: end; background: linear-gradient(180deg, #34d399, #059669); }   /* sobe da base */
.fluxo-bar.neg { align-self: start; background: linear-gradient(180deg, #fb7185, #e11d48); }  /* desce da base */
.fluxo-col-dia { font-size: .55rem; color: var(--text-dim); text-align: center; margin-top: .15rem; font-variant-numeric: tabular-nums; }

/* linha do saldo acumulado por cima das barras */
.fluxo-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.fluxo-line-acc { fill: none; stroke: #4f46e5; stroke-width: 2; vector-effect: non-scaling-stroke; }
.fluxo-line-zero { stroke: var(--border-2, #cbd5e1); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }

/* tabela diária */
.fluxo-tabela { background: var(--surface); border: 1px solid var(--border); border-radius: .65rem; overflow: hidden; }
.fluxo-table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.fluxo-table th {
  text-align: left; padding: .5rem .7rem; background: var(--bg-2);
  font-size: .58rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.fluxo-table th.r, .fluxo-table td.r { text-align: right; font-variant-numeric: tabular-nums; }
.fluxo-table td { padding: .4rem .7rem; border-bottom: 1px solid var(--border); }
.fluxo-table tr:last-child td { border-bottom: none; }
.fluxo-table td.pos { color: #059669; }
.fluxo-table td.neg { color: #dc2626; }
.fluxo-table .dim { color: var(--text-dim); }
