.page-head:has(+ .report-control-card) { margin-bottom:10px; }
.page-head:has(+ .report-control-card) p { margin-top:0; font-size:12px; }
.report-control-card { display:grid; grid-template-columns:minmax(0,1fr) auto; margin-bottom:12px; overflow:hidden; border:1px solid #d9e1ec; border-radius:14px; background:#fff; box-shadow:0 6px 18px rgba(8,38,95,.05); }
.report-control-heading { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 18px 8px; border-bottom:1px solid #eadba8; background:linear-gradient(135deg,#fff9e5,#fffdf6); }
.report-control-heading small { color:#8b6800; font-size:9px; font-weight:950; letter-spacing:.13em; }
.report-control-heading h3 { margin:1px 0; color:var(--navy); font-size:16px; line-height:1.15; }
.report-control-heading p { margin:0; color:#66758d; font-size:10px; line-height:1.25; }
.report-control-heading>span { flex:0 0 auto; padding:5px 9px; border-radius:99px; background:var(--navy); color:#fff; font-size:9px; font-weight:850; }
.report-filter-grid { display:flex; align-items:end; gap:9px; padding:9px 18px 10px; background:#fff; }
.report-filter-grid>label,.report-custom-dates label { display:grid; gap:5px; min-width:0; color:#52617a; font-size:10px; font-weight:850; }
.report-filter-grid select,.report-filter-grid input { min-height:34px; padding:6px 10px; border-color:#d8e0eb; font-size:11px; }
.report-filter-grid > #report-clear-filters { min-height:34px; align-self:end; padding:0 12px; border-color:#d5deea; background:#f7f9fc; font-size:10px; white-space:nowrap; }
.report-filter-grid>label:first-child { width:190px; }.report-filter-grid>label:nth-last-child(2){width:175px}.report-filter-grid>label:last-child{width:180px}
.report-custom-dates { display:flex; align-items:end; gap:8px; }.report-custom-dates label{width:145px}
.report-control-footer { display:flex; grid-template-columns:none; align-items:end; justify-content:flex-end; gap:8px; margin:0; padding:9px 14px 10px; border-top:0; border-left:1px solid #e7ebf1; background:#fff; color:var(--navy); }
.report-control-footer .button { min-height:32px; padding:0 12px; font-size:10px; }
.report-export-group { display:flex; align-items:center; gap:7px; }.report-export-group>span{display:none}.report-export-group .button.dark{min-width:116px}
.report-stat-grid { margin-top:0; margin-bottom:13px; }.report-stat-grid .stat{border-color:#dce3ed;background:linear-gradient(145deg,#fff,#f7f9fc);box-shadow:0 5px 16px rgba(8,38,95,.045)}.report-stat-grid .stat strong{font-size:24px}.report-stat-grid .stat small{display:block;margin-top:4px}
.report-content-grid{align-items:start}.report-payment-card,.report-selection-card{border-color:#dde4ed;box-shadow:0 5px 18px rgba(8,38,95,.04)}
@media(max-width:1200px){.report-control-card{grid-template-columns:1fr}.report-control-heading{grid-column:1}.report-control-footer{justify-content:space-between;border-top:1px solid #e7ebf1;border-left:0;background:#f8fafc}.report-filter-grid{flex-wrap:wrap}.report-filter-grid>label,.report-filter-grid>label:first-child,.report-filter-grid>label:nth-last-child(2),.report-filter-grid>label:last-child{flex:1 1 180px;width:auto}.report-custom-dates{flex:1 1 300px}.report-custom-dates label{flex:1;width:auto}}
@media(max-width:650px){.report-control-heading,.report-control-footer{align-items:flex-start;flex-direction:column}.report-filter-grid{display:grid;grid-template-columns:1fr}.report-filter-grid>label,.report-custom-dates{width:100%!important}.report-custom-dates{display:grid;grid-template-columns:1fr 1fr}.report-export-group{width:100%;flex-wrap:wrap}.report-export-group .button{flex:1}.report-export-group>span{width:100%}}

/* ─── DRE Simplificado Executivo ─────────────────────────────────────────── */
.dre-executive-card { margin-bottom: 14px; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; box-shadow: 0 6px 20px rgba(8,38,95,.06); overflow: hidden; }
.dre-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: linear-gradient(135deg, #f8fafc, #f1f5f9); border-bottom: 1px solid #e2e8f0; }
.dre-header-title { display: flex; align-items: center; gap: 12px; }
.dre-icon { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: #ecfdf5; border: 1px solid #a7f3d0; font-size: 18px; }
.dre-header-title small { display: block; color: var(--navy, #08265f); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.dre-header-title h3 { margin: 1px 0 0; color: #1e293b; font-size: 16px; font-weight: 800; }
.dre-header-title p { margin: 0; color: #64748b; font-size: 12px; font-weight: 600; }
.dre-diagnostic { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; font-size: 11px; font-weight: 800; border: 1px solid transparent; }
.dre-diagnostic.success { background: #dcfce7; color: #15803d; border-color: #86efac; }
.dre-diagnostic.danger { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.dre-diagnostic.warning { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.dre-diagnostic.neutral { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }

.dre-cascade { padding: 18px 22px; }
.dre-row { display: flex; align-items: center; gap: 12px; padding: 5px 0; }
.dre-signal { width: 26px; font-size: 12px; font-weight: 900; color: #64748b; }
.dre-signal.plus { color: #059669; }
.dre-signal.minus { color: #dc2626; }
.dre-signal.equal { color: #1e293b; }
.dre-label { flex: 1; min-width: 0; }
.dre-label b { display: block; font-size: 13px; font-weight: 700; color: #1e293b; }
.dre-label small { display: block; font-size: 11px; color: #94a3b8; margin-top: 1px; }
.dre-value { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.dre-value b { font-size: 15px; font-weight: 800; color: #0f172a; }
.dre-value small { font-size: 11px; font-weight: 700; margin-top: 2px; }
.dre-tag { display: inline-block; margin-top: 2px; padding: 2px 6px; border-radius: 6px; background: #ecfdf5; color: #059669; font-size: 10.5px; font-weight: 800; }
.dre-divider { height: 1px; background: #f1f5f9; margin: 8px 0; }
.dre-divider.bold { height: 2px; background: #e2e8f0; margin: 12px 0; }
.danger-text { color: #dc2626 !important; }
.success-text { color: #15803d !important; }
.text-muted b { color: #64748b !important; }

/* Destaque Lucro Real / Líquido */
.dre-highlight-box { padding: 16px 18px; border-radius: 12px; margin-top: 4px; border: 1px solid transparent; }
.dre-highlight-box.is-profit { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #bbf7d0; }
.dre-highlight-box.is-loss { background: linear-gradient(135deg, #fef2f2, #fee2e2); border-color: #fecaca; }
.dre-highlight-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dre-highlight-star { font-size: 16px; color: #059669; }
.dre-highlight-box.is-loss .dre-highlight-star { color: #dc2626; }
.dre-highlight-header b { font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.dre-highlight-box.is-profit .dre-highlight-header b { color: #14532d; }
.dre-highlight-box.is-loss .dre-highlight-header b { color: #991b1b; }
.dre-highlight-header small { display: block; font-size: 11px; }
.dre-highlight-box.is-profit .dre-highlight-header small { color: #166534; }
.dre-highlight-box.is-loss .dre-highlight-header small { color: #b91c1c; }
.dre-highlight-values { display: flex; align-items: center; gap: 14px; }
.dre-highlight-values strong { font-size: 24px; font-weight: 950; }
.dre-margin-pill { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.dre-margin-pill.success { background: rgba(5,150,105,.15); color: #065f46; }
.dre-margin-pill.danger { background: rgba(220,38,38,.15); color: #991b1b; }

/* ─── Grid de Fluxo de Caixa (3 cards) ──────────────────────────────────── */
.cash-flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.cash-flow-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(8,38,95,.04); }
.cash-flow-icon { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; font-size: 20px; flex-shrink: 0; }
.cash-flow-icon.cash { background: #dcfce7; }
.cash-flow-icon.pending { background: #fef3c7; }
.cash-flow-icon.expense { background: #fee2e2; }
.cash-flow-info { display: flex; flex-direction: column; min-width: 0; }
.cash-flow-info span { font-size: 11px; font-weight: 700; color: #64748b; }
.cash-flow-info strong { font-size: 18px; font-weight: 900; color: #0f172a; margin: 1px 0; }
.cash-flow-info small { font-size: 10.5px; color: #94a3b8; }

@media(max-width: 860px) {
  .cash-flow-grid { grid-template-columns: 1fr; }
  .dre-header { flex-direction: column; align-items: flex-start; }
}

