
/* V1.8.12 - Financeiro avancado */
.rp-advanced-bars{display:grid;gap:12px;margin-top:16px}.rp-advanced-month{display:grid;grid-template-columns:76px minmax(90px,1fr) 190px;align-items:center;gap:12px;font-size:13px}.rp-advanced-tracks{display:grid;gap:5px}.rp-advanced-tracks>div{height:12px;border-radius:4px;min-width:0}.rp-advanced-month small{color:#5c6f67}@media(max-width:720px){.rp-advanced-month{grid-template-columns:65px 1fr}.rp-advanced-month small{grid-column:2}}

/* V1.8.13 — Gráfico mensal de barras agrupadas, responsivo */
.rp-advanced-legend{display:flex;flex-wrap:wrap;gap:22px;margin:14px 0 8px;color:#405b50;font-size:13px}
.rp-advanced-legend span{display:inline-flex;align-items:center;gap:7px}
.rp-advanced-legend i{display:inline-block;width:12px;height:12px;border-radius:3px}
.rp-legend-received{background:#168354}.rp-legend-forecast{background:#e5b84c}
.rp-advanced-chart-scroll{width:100%;overflow-x:auto;padding-bottom:8px}
.rp-advanced-chart{min-width:max(100%,calc(var(--rp-months) * 94px));padding:8px 6px 0}
.rp-advanced-plot{height:220px;display:grid;grid-template-columns:repeat(var(--rp-months),minmax(0,1fr));align-items:end;gap:10px;border-bottom:1px solid #b7cfc4;background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),#e7efeb calc(25% - 1px),#e7efeb 25%)}
.rp-advanced-group{height:100%;display:flex;align-items:end;justify-content:center;gap:6px;min-width:0}
.rp-advanced-bar{width:min(28px,38%);border-radius:5px 5px 0 0;transition:filter .15s;min-height:0}
.rp-advanced-bar:hover{filter:brightness(.88)}
.rp-advanced-received{background:#168354}.rp-advanced-forecast{background:#e5b84c}
.rp-advanced-labels,.rp-advanced-values{display:grid;grid-template-columns:repeat(var(--rp-months),minmax(0,1fr));gap:10px;text-align:center}
.rp-advanced-labels{padding-top:9px;font-weight:600;font-size:12px;color:#365a49}
.rp-advanced-values{padding-top:4px;font-size:10px;color:#405b50}
.rp-advanced-values span{display:flex;flex-direction:column;gap:2px;white-space:nowrap}
.rp-advanced-values small{color:#a77d16;font-size:10px}
@media print{.rp-advanced-chart-scroll{overflow:visible}.rp-advanced-chart{min-width:0}.rp-advanced-plot{height:150px}.rp-advanced-values{font-size:8px}.rp-advanced-values small{font-size:8px}}

/* V1.8.13a: garantir visibilidade das barras em qualquer tema */
.rp-advanced-chart .rp-advanced-plot{display:grid!important;height:220px!important;align-items:end!important}
.rp-advanced-chart .rp-advanced-group{display:flex!important;height:100%!important;align-items:flex-end!important}
.rp-advanced-chart .rp-advanced-bar{display:block!important;flex:0 0 28px;max-width:38%;opacity:1!important}
.rp-advanced-chart .rp-advanced-received{background-color:#168354!important}
.rp-advanced-chart .rp-advanced-forecast{background-color:#e5b84c!important}

/* V1.8.14: compacto, legível e responsivo */
.rp14-legend{display:flex;gap:18px;flex-wrap:wrap;margin:14px 0;font-size:12px;color:#365a49}.rp14-legend span{display:flex;align-items:center;gap:6px}.rp14-legend i{width:11px;height:11px;border-radius:2px;display:inline-block}.rp14-legend .received,.rp14-bar.received{background:#168354}.rp14-legend .expense,.rp14-bar.expense{background:#e5b84c}.rp14-legend .balance,.rp14-bar.balance{background:#2472a4}.rp14-scroll{overflow-x:auto}.rp14-chart{height:205px;max-width:860px;margin:0 auto;min-width:min(100%,calc(var(--rp14-count) * 96px));display:grid;grid-template-columns:repeat(var(--rp14-count),minmax(0,1fr));gap:10px;border-bottom:1px solid #c9dbd0;padding:0 8px}.rp14-group{display:flex;flex-direction:column;align-items:center;justify-content:end;min-width:0;height:205px;font-size:11px;color:#365a49}.rp14-bars{height:155px;width:100%;display:flex;align-items:end;justify-content:center;gap:5px;border-bottom:1px solid #c9dbd0}.rp14-bar{width:min(19px,26%);border-radius:4px 4px 0 0;min-height:0}.rp14-group b{padding-top:7px}.rp14-group small{font-size:10px;color:#586e63;white-space:nowrap}.rp14-forecast{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px}@media(max-width:640px){.rp14-forecast{grid-template-columns:1fr}.rp14-chart{min-width:max(100%,calc(var(--rp14-count) * 86px))}}

/* V1.8.15 - Opção 1: barras verticais agrupadas com escala */
.rp15-legend{display:flex;justify-content:center;gap:20px;flex-wrap:wrap;margin:12px 0 4px;color:#365a49;font-size:12px}.rp15-legend span{display:inline-flex;align-items:center;gap:7px}.rp15-legend i{display:inline-block;width:12px;height:12px;border-radius:3px}.rp15-chart-scroll{width:100%;overflow-x:auto;overflow-y:hidden}.rp15-chart-wrap{max-width:940px;margin:0 auto;display:flex;justify-content:center;min-height:260px}.rp15-svg{display:block;max-width:100%;height:auto;flex-shrink:0}.rp15-svg rect:hover{opacity:.83;filter:brightness(.95)}@media(max-width:600px){.rp15-chart-wrap{justify-content:flex-start}.rp15-svg{max-width:none}.rp15-legend{justify-content:flex-start;gap:12px}}

/* V1.8.17 — painéis do Financeiro avançado alinhados lado a lado */
.rp17-finance-grid{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:16px;align-items:stretch;margin-top:16px}
.rp17-finance-grid>.rp-panel{min-width:0;margin:0;display:flex;flex-direction:column}
.rp17-finance-grid>.rp-panel>h3{margin:0 0 8px;min-height:28px;line-height:1.35}
.rp17-finance-grid>.rp-panel>p.muted{margin:0 0 12px;min-height:48px;line-height:1.45}
.rp17-chart-panel .rp15-chart-scroll{flex:1;display:flex;align-items:center}
.rp17-chart-panel .rp15-chart-wrap{width:100%;min-height:260px;align-items:center}
.rp17-finance-grid .rp14-forecast{display:grid;grid-template-columns:1fr;gap:12px;margin-top:0;flex:1}
.rp17-finance-grid .rp14-forecast>.rp-metric{justify-content:center;min-height:78px}
@media(max-width:900px){.rp17-finance-grid{grid-template-columns:1fr}.rp17-finance-grid>.rp-panel>p.muted{min-height:0}.rp17-finance-grid .rp14-forecast{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.rp17-finance-grid .rp14-forecast{grid-template-columns:1fr}}

/* V1.8.18: totais ao lado do comparativo, mantendo a previsao em painel separado */
.rp18-chart-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,30%);gap:14px;align-items:stretch;flex:1}
.rp18-plot{min-width:0;display:flex;flex-direction:column;justify-content:center}
.rp18-plot .rp15-legend{gap:10px;font-size:11px;margin:4px 0 0}
.rp18-plot .rp15-chart-wrap{min-height:240px}
.rp18-totals{display:grid;grid-template-rows:repeat(3,minmax(0,1fr));gap:10px;min-width:0}
.rp18-total{border:1px solid #d5e5dc;border-left:4px solid var(--rp18-accent);border-radius:10px;padding:12px 10px;display:flex;flex-direction:column;justify-content:center;gap:6px;min-width:0;background:#fff}
.rp18-total small{font-size:12px;color:#516e61;font-weight:600}
.rp18-total strong{font-size:clamp(15px,1.3vw,20px);color:#21483c;white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:1150px){.rp18-chart-body{grid-template-columns:minmax(0,1fr) minmax(145px,34%)}.rp18-total strong{white-space:normal}}
@media(max-width:600px){.rp18-chart-body{grid-template-columns:1fr}.rp18-totals{grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(65px,auto))}.rp18-total{min-height:65px}}

/* V1.8.20 — acabamento visual dos dois painéis financeiros */
.rp17-finance-grid{gap:16px;align-items:stretch}
.rp17-finance-grid>.rp-panel{min-width:0;min-height:430px}
.rp17-finance-grid>.rp-panel>h3{min-height:30px;margin-bottom:8px;line-height:1.35}
.rp17-finance-grid>.rp-panel>p.muted{min-height:64px;margin-bottom:12px;line-height:1.45}
.rp18-chart-body{grid-template-columns:minmax(0,1fr) minmax(170px,34%);gap:14px;align-items:stretch;min-height:272px}
.rp18-plot{min-width:0;justify-content:space-between}
.rp18-plot .rp15-legend{min-height:28px;align-content:center;justify-content:center;gap:8px 12px;margin:0 0 6px}
.rp18-plot .rp15-chart-scroll{min-height:225px;align-items:center}
.rp18-plot .rp15-chart-wrap{min-height:225px;align-items:center}
.rp18-totals,.rp17-finance-grid .rp14-forecast{display:grid;grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr));gap:12px;min-height:272px;flex:1;margin:0}
.rp18-total,.rp17-finance-grid .rp14-forecast>.rp-metric{min-height:0;padding:12px 14px;border-radius:11px;justify-content:center}
.rp18-total small,.rp17-finance-grid .rp14-forecast>.rp-metric small{font-size:12px;line-height:1.3}
.rp18-total strong,.rp17-finance-grid .rp14-forecast>.rp-metric strong{font-size:clamp(16px,1.35vw,21px);line-height:1.3;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
@media(max-width:1100px){.rp17-finance-grid{grid-template-columns:1fr}.rp17-finance-grid>.rp-panel{min-height:0}.rp17-finance-grid>.rp-panel>p.muted{min-height:0}.rp17-finance-grid .rp14-forecast{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr;min-height:95px}.rp18-chart-body{grid-template-columns:minmax(0,1fr) minmax(170px,32%)}}
@media(max-width:650px){.rp18-chart-body{grid-template-columns:1fr;min-height:0}.rp18-totals{grid-template-rows:repeat(3,minmax(76px,auto));min-height:0}.rp17-finance-grid .rp14-forecast{grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(76px,auto));min-height:0}.rp18-plot .rp15-chart-scroll{min-height:0}}
