/* HEPHA GP-4.2 — evolução local e impacto financeiro por produto */
.ref-evolution-head,.loss-product-impact-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.ref-evolution-head h3,.loss-product-impact-head h3{margin-bottom:3px}
.ref-evolution-head p,.loss-product-impact-head p{margin:0}
.ref-evolution-family{min-width:178px;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;padding:6px 8px;border:1px solid #d7e1e6;border-radius:9px;background:#f8fafb;color:#657985;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.ref-evolution-family select{min-width:0;width:100%;height:28px;border:0;background:transparent;color:#102832;font:700 12px/1.2 inherit;outline:0;cursor:pointer;text-transform:none;letter-spacing:0}
.ref-evolution-family:has(select:disabled){background:#eef3f5;color:#7b8c95}
.ref-evolution-family select:disabled{cursor:not-allowed;color:#536772}
body.show-ref #refugo .loss-product-impact-panel{grid-column:1 / -1!important;width:100%;min-width:0;padding:0!important;overflow:hidden}
.loss-product-impact-head{padding:15px 18px 12px;border-bottom:1px solid #dce5e9}
.loss-product-impact{padding:14px 16px 16px}
.loss-impact-kpis{display:grid;grid-template-columns:minmax(360px,2.35fr) repeat(3,minmax(145px,1fr));gap:8px;margin-bottom:12px}
.loss-impact-kpis>div{min-width:0;padding:10px 12px;border:1px solid #dce5e9;border-radius:9px;background:linear-gradient(135deg,#fff,#f5f8f9)}
.loss-impact-kpis span,.loss-impact-chart-summary small,.loss-impact-evolution-head small{display:block;color:#70828c;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.loss-impact-kpis strong{display:block;margin-top:4px;color:#102832;font-size:15px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.loss-impact-kpis>div:first-child strong{color:#e96014}
.loss-impact-kpis .loss-impact-largest{min-height:58px;display:flex;flex-direction:column;justify-content:center}
.loss-impact-kpis .loss-impact-largest strong{font-size:16px;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.loss-impact-layout{display:grid;grid-template-columns:minmax(0,1.22fr) minmax(370px,.78fr);gap:12px;align-items:stretch}
.loss-impact-ranking,.loss-impact-evolution{min-width:0;border:1px solid #d8e2e7;border-radius:10px;background:#fff;overflow:hidden}
.loss-impact-section-title,.loss-impact-evolution-head{min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-bottom:1px solid #dce5e9;color:#102832}
.loss-impact-section-title strong{font-size:14px;text-transform:uppercase}
.loss-impact-filtered{padding:4px 7px;border-radius:999px;background:#fff1e7;color:#df5b0c;font-size:9px;font-weight:900;text-transform:uppercase}
.loss-impact-table-head,.loss-impact-row{display:grid;grid-template-columns:28px minmax(220px,1fr) 68px 88px 58px 74px;align-items:center;gap:7px}
.loss-impact-table-head{padding:8px 10px;background:#f1f5f7;color:#6c7f89;font-size:10px;font-weight:900;text-transform:uppercase}
.loss-impact-rows{max-height:397px;overflow:auto;scrollbar-width:thin;scrollbar-color:#bdcbd2 transparent}
.loss-impact-row{width:100%;min-height:58px;padding:8px 10px;border:0;border-bottom:1px solid #e6ecef;background:#fff;color:#102832;text-align:left;cursor:pointer;transition:background .15s,border-color .15s}
.loss-impact-row:hover{background:#f8fafb}.loss-impact-row.active{background:#fff3ea;box-shadow:inset 3px 0 #ff6b0b}
.loss-impact-row .rank{font-size:14px;font-weight:900;text-align:center}.loss-impact-row .product{min-width:0}
.loss-impact-row strong{display:block;font-size:13px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.loss-impact-row small{display:block;margin-top:3px;color:#74858e;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.loss-impact-row>span:not(.product):not(.spark):not(.rank){text-align:right}
.loss-impact-row .spark svg{display:block;width:70px;height:22px}.loss-impact-row .spark polyline{fill:none;stroke:#159b68;stroke-width:1.7;vector-effect:non-scaling-stroke}
.loss-impact-evolution{padding-bottom:8px}
.loss-impact-evolution-head>div:first-child{min-width:0}.loss-impact-evolution-head>div:first-child strong{display:block;max-width:330px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.loss-impact-evolution-head>div:first-child span{display:block;margin-top:2px;color:#6f818a;font-size:9px}
.loss-impact-metrics{display:flex;flex:0 0 auto;padding:2px;border:1px solid #d8e2e7;border-radius:8px;background:#f4f7f8}
.loss-impact-metrics button{height:25px;padding:0 8px;border:0;border-radius:6px;background:transparent;color:#586d78;font-size:9px;font-weight:800;cursor:pointer}.loss-impact-metrics button.active{background:#ff6b0b;color:#fff}
.loss-impact-chart-summary{display:grid;grid-template-columns:.8fr 1.2fr;gap:8px;padding:12px 13px 2px}
.loss-impact-chart-summary span{padding:8px 10px;border-radius:8px;background:#f5f8f9}.loss-impact-chart-summary strong{display:block;margin-top:3px;color:#102832;font-size:13px}
.loss-impact-chart-summary .trend.increase{background:#fff0ee}.loss-impact-chart-summary .trend.increase strong{color:#d74b3f}.loss-impact-chart-summary .trend.decrease{background:#eaf8f1}.loss-impact-chart-summary .trend.decrease strong{color:#087a4d}.loss-impact-chart-summary .trend.stable{background:#eef4f7}.loss-impact-chart-summary .trend.insufficient strong{color:#6d7e87;font-size:10px}
.loss-impact-chart-svg{display:block;width:100%;height:auto;padding:0 8px}.loss-impact-chart-svg .grid{stroke:#e8eef1;stroke-width:1}.loss-impact-chart-svg .axis{stroke:#c9d5db;stroke-width:1}.loss-impact-chart-svg .area{fill:url(#lossImpactArea)}.loss-impact-chart-svg .line{fill:none;stroke:#ff6b0b;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.loss-impact-chart-svg circle{fill:#fff;stroke:#12333f;stroke-width:2}.loss-impact-chart-svg text{fill:#617680;font-size:10px;font-weight:700;text-anchor:middle}.loss-impact-chart-svg .value-label{fill:#102832;font-size:11px;font-weight:900}.loss-impact-chart-svg .month-label{fill:#617680;font-size:10px;font-weight:800}
.loss-impact-empty{min-height:250px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#74858e;text-align:center}.loss-impact-empty strong{color:#102832;font-size:15px}.loss-impact-empty.error strong{color:#c84339}
.loss-impact-skeleton{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;min-height:230px}.loss-impact-skeleton i{border-radius:10px;background:linear-gradient(90deg,#eef3f5 25%,#f8fafb 45%,#eef3f5 65%);background-size:220% 100%;animation:lossImpactPulse 1.3s infinite}
@keyframes lossImpactPulse{to{background-position:-220% 0}}
@media(max-width:1180px){.loss-impact-kpis{grid-template-columns:minmax(300px,2fr) repeat(3,minmax(120px,1fr))}.loss-impact-layout{grid-template-columns:1fr}.loss-impact-rows{max-height:420px}.loss-impact-evolution-head>div:first-child strong{max-width:520px}}
@media(max-width:760px){.ref-evolution-head{display:grid;grid-template-columns:1fr}.ref-evolution-family{width:100%;min-width:0}.loss-impact-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.loss-product-impact{padding:10px}.loss-impact-table-head,.loss-impact-row{grid-template-columns:24px minmax(150px,1fr) 58px 80px}.loss-impact-table-head span:nth-child(5),.loss-impact-table-head span:nth-child(6),.loss-impact-row>span:nth-child(5),.loss-impact-row>span:nth-child(6){display:none}.loss-impact-evolution-head{align-items:flex-start;flex-direction:column}.loss-impact-metrics{width:100%}.loss-impact-metrics button{flex:1}.loss-impact-chart-summary{grid-template-columns:1fr}.loss-impact-chart-svg{min-width:520px}.loss-impact-evolution{overflow-x:auto}}
@media(max-width:460px){.loss-impact-kpis{grid-template-columns:1fr}.loss-impact-table-head,.loss-impact-row{grid-template-columns:22px minmax(135px,1fr) 72px}.loss-impact-table-head span:nth-child(3),.loss-impact-row>span:nth-child(3){display:none}}
