/* Internal workspace only. Commercial proposal styles are unchanged. */
.dre-view{max-width:1280px;margin:auto}.dre-top,.dre-actions,.dre-tabs,.dre-filters{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.dre-top{justify-content:space-between;margin-bottom:24px}.dre-top h1{margin:6px 0}.dre-top p{color:var(--muted,#64748b);margin:0}.dre-tabs{border-bottom:1px solid #dbe1e8;margin:24px 0 20px}.dre-tabs button{background:none;border:0;border-bottom:3px solid transparent;padding:12px 16px;color:inherit;border-radius:0}.dre-tabs button[aria-selected=true]{border-bottom-color:var(--green,#334155);font-weight:700}.dre-filters{padding:16px;background:#fff;border:1px solid #dbe1e8;border-radius:16px;margin-bottom:18px;align-items:end}.dre-filters label{display:grid;gap:5px;font-size:12px}.dre-filters input,.dre-filters select,.dre-form input,.dre-form select,.dre-form textarea{width:100%;padding:10px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;color:#172b3a;min-width:0}.dre-filters label:first-child{min-width:145px}.dre-mode{display:flex;border:1px solid #dbe1e8;padding:3px;border-radius:10px}.dre-mode button{border:0;background:none;color:inherit;padding:9px 14px;border-radius:7px}.dre-mode button[aria-pressed=true]{background:var(--green,#334155);color:#fff}.dre-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0 24px}.dre-kpi,.dre-panel{background:#fff;border:1px solid #dbe1e8;border-radius:16px;padding:22px}.dre-kpi>span{font-size:12px;color:#526070;display:block}.dre-kpi strong{font-size:clamp(19px,2vw,28px);display:block;margin:12px 0;line-height:1.2}.dre-kpi small{font-size:11px;display:block;color:#64748b}.dre-positive{color:#14714a}.dre-negative{color:#ac3544}.dre-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:18px}.dre-panel h2{font-size:17px;margin:0 0 16px}.dre-table-wrap{overflow:auto}.dre-table{width:100%;border-collapse:collapse;font-size:13px}.dre-table th,.dre-table td{padding:14px 10px;border-bottom:1px solid #e8edf1;text-align:left;vertical-align:top}.dre-table th{font-size:11px;color:#64748b;font-weight:500}.dre-table .number{text-align:right;white-space:nowrap}.dre-table button{background:none;border:0;color:var(--green,#334155);padding:0;text-align:left;text-decoration:underline;text-underline-offset:3px}.dre-table .dre-sub td:first-child{padding-left:28px;font-size:12px;color:#64748b}.dre-table .dre-total{background:#f4f7fa;font-weight:700}.dre-table .dre-result{background:#e9eff6;font-weight:700}.dre-note{font-size:12px;line-height:1.65;color:#64748b;margin:12px 0}.dre-alert{padding:14px 18px;background:#fff7e9;border:1px solid #f3d6a0;border-radius:12px;font-size:13px;line-height:1.6;margin-bottom:16px}.dre-error{color:#9d2035;font-size:13px;white-space:pre-wrap}.dre-error:empty{display:none}.dre-empty{text-align:center;padding:32px 14px}.dre-empty h2{margin-bottom:10px}.dre-category{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;border:0;border-bottom:1px solid #e8edf1;background:none;padding:14px 0;text-align:left;color:inherit}.dre-category small{display:block;color:#64748b;margin-top:5px}.dre-chart{width:100%;height:230px}.dre-legend{display:flex;gap:16px;flex-wrap:wrap;font-size:11px;color:#64748b}.dre-legend i{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px}.dre-pill{display:inline-block;padding:4px 7px;border-radius:6px;background:#f0f3f7;font-size:11px}.dre-pagination{display:flex;align-items:center;justify-content:space-between;margin-top:16px;gap:10px}.dre-dialog{width:min(720px,calc(100vw - 24px));max-height:90dvh;border:1px solid #dbe1e8;border-radius:18px;padding:24px;color:#172b3a;overflow:auto}.dre-dialog::backdrop{background:#0f172a77}.dre-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.dre-dialog h2{margin:0;font-size:20px}.dre-form{display:grid;grid-template-columns:1fr 1fr;gap:16px}.dre-form label{display:grid;gap:7px;font-size:12px}.dre-form .wide{grid-column:1/-1}.dre-form textarea{min-height:65px;resize:vertical}.dre-form footer{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:6px}.dre-form .dre-check{display:flex;align-items:center;gap:8px}.dre-check input{width:auto}.dre-dialog .dre-detail-row{padding:14px 0;border-bottom:1px solid #e8edf1}.dre-detail-row strong,.dre-detail-row small{display:block}.dre-detail-row small{color:#64748b;margin:6px 0}.dre-dialog dl{display:grid;grid-template-columns:1fr auto;gap:8px;font-size:12px}.dre-dialog dd{margin:0;text-align:right}.dre-tools{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}.dre-categories-list{max-height:350px;overflow:auto}.dre-settings{margin-top:20px}.dre-updating{opacity:.65;pointer-events:none}
@media(max-width:900px){.dre-grid{grid-template-columns:1fr}.dre-kpis{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.dre-kpi,.dre-panel{padding:15px}.dre-kpis{gap:9px}.dre-kpi strong{font-size:20px}.dre-filters{gap:10px;padding:12px}.dre-filters label{flex:1 1 42%;min-width:0!important}.dre-mode{width:100%}.dre-mode button{flex:1}.dre-top{gap:14px}.dre-tabs{gap:0}.dre-tabs button{font-size:12px;padding:12px 9px}.dre-form{grid-template-columns:1fr}.dre-dialog{padding:18px}.dre-table{font-size:12px}.dre-table th,.dre-table td{padding:12px 6px}.dre-table button{line-height:1.5}.dre-chart{height:190px}}
@media print{.dre-view,.dre-dialog,.dre-settings{display:none!important}}

@media(max-width:560px){.sidebar .nav-item{font-size:10px;padding:9px 6px;min-width:0}.sidebar .nav-item .ui-icon{display:none}}
/* DRE detalhada: subabas no cabeçalho do card; a DRE ocupa a tela e rola por dentro (item 10) */
.dre-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.dre-panel-head h2{margin:0}
.dre-subtabs button{font-size:12.5px}
@media(min-width:1151px) and (min-height:700px){
 .dre-view:not([hidden]):has(.dre-statement){display:flex;flex-direction:column;height:calc(100vh - 32px);box-sizing:border-box}
 .dre-view:has(.dre-statement) #dre-content{flex:1;min-height:0;display:flex;flex-direction:column;gap:12px}
 .dre-statement{flex:1;min-height:0;display:flex;flex-direction:column;margin:0}
 .dre-statement>.dre-table-wrap{flex:1;min-height:0;overflow:auto}
 .dre-statement .dre-table thead th{position:sticky;top:0;background:#fff;z-index:1}
 .dre-evo-grid{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:16px}
 .dre-evo-grid>.dre-panel{min-height:0;overflow:auto;margin:0}
}
.dre-evo-grid{display:grid;gap:16px}
@media(max-width:1150px){.dre-evo-grid{grid-template-columns:1fr}}
.dre-evo-grid>.dre-panel{box-shadow:none;border:1px solid color-mix(in srgb,var(--r-primary) 10%,#fff)}
.dre-monthly{display:flex;flex-direction:column}
.dre-monthly .ph{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.dre-monthly h2{margin:0 0 2px}
.mc-legend{display:flex;gap:14px;font-size:12px;color:var(--r-muted)}
.mc-legend span,.mc-tip span{display:inline-flex;align-items:center;gap:6px}
.mc-legend i,.mc-tip i{width:10px;height:10px;border-radius:3px;display:inline-block}
i.mc-r{background:#0e7a5a}i.mc-s{background:#7a9a00}
.mchart{flex:1;min-height:220px;display:grid;grid-template-columns:auto 1fr;gap:10px;margin-top:14px;padding-bottom:22px}
.mc-axis{position:relative;width:64px;font-size:11px;color:var(--r-muted);font-variant-numeric:tabular-nums}
.mc-axis span{position:absolute;right:0;transform:translateY(-50%);white-space:nowrap}
.mc-plot{position:relative;display:flex;gap:6px;align-items:stretch;background:linear-gradient(to bottom,transparent calc(var(--zero) - 1px),color-mix(in srgb,var(--r-primary) 35%,#fff) calc(var(--zero) - 1px),color-mix(in srgb,var(--r-primary) 35%,#fff) var(--zero),transparent var(--zero)),repeating-linear-gradient(to bottom,color-mix(in srgb,var(--r-primary) 7%,#fff) 0 1px,transparent 1px 25%)}
.mc-col{flex:1;min-width:0;display:flex;flex-direction:column;position:relative;border-radius:8px;outline:none;cursor:default}
.mc-col:hover,.mc-col:focus-visible{background:color-mix(in srgb,var(--r-primary) 5%,transparent)}
.mc-col:focus-visible{box-shadow:inset 0 0 0 2px var(--r-accent)}
.mc-pos,.mc-neg{display:flex;justify-content:center;gap:2px;padding:0 18%}
.mc-pos{align-items:flex-end}.mc-neg{align-items:flex-start}
.mc-pos i,.mc-neg i{flex:1;max-width:26px;position:relative;transform-origin:bottom;animation:r-grow-y .8s var(--r-ease,ease) both}
.mc-pos i{border-radius:4px 4px 0 0}.mc-neg i{border-radius:0 0 4px 4px;transform-origin:top}
.mc-pos i b{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);font-size:10.5px;color:var(--r-ink,#0f1d18);white-space:nowrap;padding-bottom:3px;font-weight:700}
.mc-pos i.mc-s b{bottom:100%;}
.mc-x{position:absolute;bottom:-20px;left:0;right:0;text-align:center;font-size:11px;color:var(--r-muted)}
.mc-tip{position:absolute;top:6px;transform:translateX(-50%);background:#fff;border:1px solid var(--r-line);border-radius:12px;box-shadow:0 14px 30px -16px rgba(4,40,30,.45);padding:8px 11px;font-size:12px;display:flex;flex-direction:column;gap:3px;pointer-events:none;z-index:3;white-space:nowrap}
.mc-tip[hidden]{display:none}
.mc-tip em{font-style:normal;font-weight:700}
@keyframes r-grow-y{from{transform:scaleY(0)}}
@media (prefers-reduced-motion:reduce){.mc-pos i,.mc-neg i{animation:none}}
.mc-pos i b{font-style:normal}.mc-col i{font-style:normal}
.fin-tabs-row{flex-wrap:nowrap!important;min-width:0}.fin-tabs-row .dre-note{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fin-tabs-row .dre-tabs{flex:none}
/* Comprovante na despesa (item 8) */
.dre-receipt{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:12px;border:1.5px dashed color-mix(in srgb,var(--r-primary,#044c3a) 25%,#fff);border-radius:16px;background:color-mix(in srgb,var(--r-accent,#a7cf21) 7%,#fff)}
.dre-receipt-drop{display:flex!important;align-items:center;gap:12px;cursor:pointer;flex:1;min-width:220px;margin:0!important}
.dre-receipt-drop b{display:block;font-size:13.5px;color:var(--r-ink,#0f1d18)}
.dre-receipt-drop small{display:block;font-size:11.5px;color:var(--r-muted,#64748b);font-weight:400}
.dre-receipt-drop:focus-within{outline:2px solid var(--r-accent,#a7cf21);outline-offset:4px;border-radius:12px}
.dre-receipt-ic{width:40px;height:40px;border-radius:12px;background:var(--r-primary,#044c3a);display:grid;place-items:center;flex:none}
.dre-receipt-ic svg{width:20px;height:20px;fill:none;stroke:#d4f26a;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dre-receipt-link{font-weight:700;font-size:12.5px;color:var(--r-primary,#044c3a)}
.dre-receipt-status{flex-basis:100%;margin:0;font-size:12px;color:var(--r-muted,#64748b)}
.dre-receipt-status:empty{display:none}
.dre-receipt-status.ok{color:#1f7a4a}.dre-receipt-status.warn{color:#946500}
.dre-receipt-status.busy::before{content:"";display:inline-block;width:10px;height:10px;margin-right:8px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;animation:dre-spin .8s linear infinite;vertical-align:-1px}
@keyframes dre-spin{to{transform:rotate(360deg)}}
.dre-form .from-receipt{box-shadow:0 0 0 2px color-mix(in srgb,var(--r-accent,#a7cf21) 80%,transparent);background:color-mix(in srgb,var(--r-accent,#a7cf21) 9%,#fff)}
