.purchase-report{max-width:none;margin:0;color:#193e50;font-size:12px}
.purchase-report header{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin:0 0 6px}.purchase-report h2{font-size:18px;margin:0}.purchase-report header p{font-size:12px;margin:0;color:#637d8a}
.pr-filters{display:grid;grid-template-columns:minmax(125px,1fr) 125px 125px minmax(150px,1.3fr) minmax(145px,1.2fr) auto;gap:6px;align-items:end;margin:6px 0}
.pr-filters label{display:flex;flex-direction:column;gap:2px;font-size:12px;font-weight:600;min-width:0;margin:0}
.pr-filters input,.pr-filters select{width:100%;border:1px solid #c4d5e0;border-radius:5px;background:#fff;padding:3px 6px;color:#193e50;font-weight:400}
.pr-filters input,.pr-filters select,.pr-filters button,.pr-pager button{height:30px;min-height:30px;margin:0;box-sizing:border-box;font-size:12px}
.pr-filters button,.pr-pager button{padding:3px 8px;white-space:nowrap;border-radius:5px}.pr-filters button{align-self:end;width:auto;justify-content:center}
.pr-actions{display:flex;gap:5px;align-items:end}.pr-actions button{flex:none}.purchase-report #pr-status{font-size:12px;margin:6px 0;line-height:1.3}.purchase-report #pr-error{font-size:12px;margin:6px 0;padding:5px 8px}
.pr-scroll{overflow:auto;border:1px solid #d6e1e9;border-radius:6px;background:white;max-height:calc(100dvh - 290px);min-height:180px}.pr-scroll:has(table[hidden]){display:none}
.pr-scroll table{border-collapse:collapse;width:100%;table-layout:fixed;font-size:12px;min-width:980px}.pr-scroll th,.pr-scroll td{padding:4px 6px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.pr-scroll th{background:#193e50;color:white;text-align:left}.pr-scroll td{border-bottom:1px solid #e1e9ef}.pr-scroll tbody tr:nth-child(even){background:#f3f7fa}.pr-scroll .pr-number{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.pr-scroll thead th{position:sticky;top:0;z-index:1}
.pr-scroll tfoot th,.pr-scroll tfoot td{position:sticky;bottom:0;background:#eaf3f8;color:#193e50;font-weight:700;border-top:2px solid #c4d5e0;padding:5px 6px}.pr-scroll tfoot th{text-align:right}
.pr-scroll col:nth-child(1){width:8%}.pr-scroll col:nth-child(2){width:6%}.pr-scroll col:nth-child(3){width:9%}.pr-scroll col:nth-child(4){width:20%}.pr-scroll col:nth-child(5){width:25%}.pr-scroll col:nth-child(6){width:4%}.pr-scroll col:nth-child(7){width:8%}.pr-scroll col:nth-child(8),.pr-scroll col:nth-child(9){width:10%}
.pr-footer{display:flex;align-items:start;justify-content:space-between;gap:8px;margin:5px 0 0}.pr-pager{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin:0;order:2;flex-shrink:0;font-size:12px}.pr-pager[hidden]{display:none}.pr-note{order:1;font-size:11px;color:#637d8a;line-height:1.4;margin:0;min-width:0}.pr-note summary{cursor:pointer;line-height:30px}.pr-note p{margin:3px 0 0}
.workspace:has(.purchase-report:not([hidden]))>.workspace-navigation{margin-bottom:8px}.workspace:has(.purchase-report:not([hidden]))>.workspace-footer{margin-top:8px}
@media(max-width:1100px){.pr-filters{grid-template-columns:repeat(3,minmax(140px,1fr))}.pr-actions{justify-content:flex-end}}
@media(max-width:650px){.purchase-report header{gap:4px}.pr-filters{grid-template-columns:1fr 1fr}.pr-filters label:first-child,.pr-filters label:nth-child(4),.pr-filters label:nth-child(5),.pr-actions{grid-column:1/-1}.pr-actions{justify-content:flex-start}.pr-footer{flex-wrap:wrap}.pr-note{flex:1}.pr-pager{gap:5px}.pr-scroll{max-height:55dvh}}

.pr-filters{grid-template-columns:150px minmax(105px,1fr) 118px 118px minmax(120px,1fr) minmax(120px,1fr) auto}
#pr-analysis{border:1px solid #c8e1de;background:#f0f8f6;border-radius:5px;padding:5px 8px;margin:6px 0;font-size:12px}#pr-analysis summary{cursor:pointer;font-weight:600}#pr-analysis ul{margin:6px 0;padding-left:18px}#pr-analysis li{margin:3px 0}
.pr-scroll table[data-mode=produto] col,.pr-scroll table[data-mode=fornecedor] col{width:auto}
.pr-scroll table[data-mode=produto] col:nth-child(2){width:28%}.pr-scroll table[data-mode=produto] col:nth-child(3){width:5%}
.pr-scroll table[data-mode=fornecedor]{min-width:800px}.pr-scroll table[data-mode=fornecedor] col:nth-child(2){width:30%}
@media(max-width:1250px){.pr-filters{grid-template-columns:repeat(4,minmax(100px,1fr))}}
@media(max-width:650px){.pr-filters{grid-template-columns:1fr 1fr}.pr-filters label{grid-column:auto!important}.pr-actions{grid-column:1/-1}}

.pr-product-link{border:0;background:transparent;color:#086f80;font:inherit;font-weight:600;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;text-align:left;text-decoration:underline;text-underline-offset:3px}
.pr-product-dashboard{width:min(1240px,96vw);max-width:96vw;max-height:92dvh;padding:12px;border:1px solid #bcd3df;border-radius:12px;color:#193e50;background:#fff}.pr-product-dashboard[open]{display:flex;flex-direction:column;gap:8px}.pr-product-dashboard::backdrop{background:#153e5066}.pr-product-dashboard header{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-shrink:0}.pr-product-dashboard h2{font-size:18px;margin:0}.pr-product-dashboard p{margin:0;font-size:12px}.pr-product-dashboard .pd-product{font-weight:600;margin-top:3px}.pr-product-dashboard button{height:32px;padding:3px 10px;font-size:12px}.pd-filters{display:flex;gap:8px;flex-wrap:wrap;margin:0;flex-shrink:0}.pd-filters label{margin:0;font-size:12px}.pd-filters input{height:32px;width:145px;font-size:12px}.pd-total{align-self:end;line-height:32px;font-size:14px;color:#087965}.pd-charts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;overflow:auto;min-height:0;overscroll-behavior:contain}.pd-charts section{border:1px solid #d6e5eb;border-radius:7px;padding:8px;background:#f8fbfc;min-width:0}.pd-charts h3{font-size:13px;margin:0 0 8px}.pd-charts svg{width:100%;display:block;font:12px "Segoe UI",sans-serif;fill:#193e50}.pr-product-dashboard footer{font-size:11px;color:#627c8b;flex-shrink:0}.pd-error{color:#a43026}.pd-scope{color:#627c8b}@media(max-width:850px){.pd-charts{grid-template-columns:1fr}.pd-charts svg{max-height:370px}.pr-product-dashboard footer{font-size:10px}}

.pd-charts>.pd-loading{grid-column:1/-1;display:flex;align-items:center;justify-content:center;min-height:180px;font-size:13px;color:#527081}.pd-charts>.pd-loading::before{width:72px;height:72px}

.pr-product-dashboard header>div{min-width:0}.pr-product-dashboard .pd-close{flex-shrink:0}.pr-product-dashboard .pd-product{display:flex;align-items:center;gap:8px;margin-top:6px;padding:6px 9px;border:1px solid #c5e1db;border-left:3px solid #128775;border-radius:5px;background:#edf7f4;color:#173e50;font-size:15px;line-height:1.3}.pd-product strong{font-weight:700;overflow-wrap:anywhere}.pd-product-code{flex-shrink:0;padding:2px 7px;border-radius:4px;background:#176b66;color:#fff;font-size:13px;font-weight:700}

.pr-product-dashboard header>div{flex:1}.pr-product-dashboard .pd-product{flex-wrap:wrap}.pd-product>strong:not(.pd-total){flex:1;min-width:120px}.pd-product>.pd-total{margin-left:auto;align-self:center;line-height:1.3;white-space:nowrap;font-size:15px;color:#086e5d}.pd-product>.pd-total:empty{display:none}

.pd-heading-cards{display:flex;align-items:stretch;flex-wrap:wrap;gap:8px;margin-top:6px}.pr-product-dashboard .pd-heading-cards>.pd-product{flex:0 1 auto;max-width:100%;margin:0}.pd-heading-cards>.pd-product>strong{flex:0 1 auto;min-width:0}.pd-heading-cards>.pd-total{display:flex;align-items:center;align-self:stretch;flex:0 0 auto;margin:0;padding:8px 12px;border:1px solid #afd9cb;border-radius:5px;background:#e7f5ee;color:#086e5d;font-size:15px;line-height:1.3;white-space:nowrap}.pd-heading-cards>.pd-total:empty{display:none}

.pd-heading-cards>.pd-return-total{display:flex;align-items:center;align-self:stretch;flex:0 0 auto;margin:0;padding:8px 12px;border:1px solid #e5c5b4;border-radius:5px;background:#fff3eb;color:#a04f31;font-size:15px;line-height:1.3;white-space:nowrap}.pd-heading-cards>.pd-return-total:empty{display:none}.pd-legend{display:flex;gap:14px;font-size:12px}.pd-legend span::before{content:"";display:inline-block;width:12px;height:9px;margin-right:5px;border-radius:2px;background:#168b7a}.pd-legend span+span::before{background:#bd6846}

.pd-metrics{display:flex;flex-wrap:wrap;gap:5px;font-size:12px}.pd-metrics>span{padding:5px 8px;border:1px solid #cbdde8;border-radius:5px;background:#f0f6fb;font-weight:600}.pd-metrics>.pd-negative{color:#ad382b;background:#fff1ed}.pd-metrics>small{flex-basis:100%;color:#8c572d}.pd-legend span:nth-child(3)::before{background:#467dc1}

.pr-filters{grid-template-columns:repeat(4,minmax(120px,1fr))}.pr-filters .pr-actions{grid-column:1/-1;justify-content:flex-end}@media(max-width:650px){.pr-filters{grid-template-columns:1fr 1fr}}

@media(min-width:1000px){.pr-filters{grid-template-columns:150px minmax(120px,1fr) 125px 125px minmax(160px,1.3fr)}.pr-filters .pr-actions{grid-column:4/-1}}

.pr-scroll table:is([data-mode=familia],[data-mode=comprador]) col{width:auto}.pr-scroll table:is([data-mode=familia],[data-mode=comprador]) col:nth-child(2){width:30%}.pr-scroll table:is([data-mode=familia],[data-mode=comprador]){min-width:800px}

.pr-group-link{border:0;background:transparent;color:#086f80;font:inherit;font-weight:600;text-decoration:underline;padding:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pr-group-products{width:min(1100px,95vw);max-width:95vw;max-height:90dvh;padding:12px;border:1px solid #bfd4e0;border-radius:10px;color:#193e50;background:white}.pr-group-products[open]{display:flex;flex-direction:column;gap:8px}.pr-group-products::backdrop{background:#153e5066}.pr-group-products header{display:flex;align-items:center;justify-content:space-between;gap:10px}.pr-group-products h2{font-size:18px;margin:0 0 4px}.pr-group-products button{height:30px;font-size:12px;padding:3px 8px}.pr-group-products p{font-size:12px;margin:0}.pg-name{color:#087965}.pg-scroll{overflow:auto;min-height:0;max-height:60dvh}.pg-scroll table{width:100%;border-collapse:collapse;font-size:12px}.pg-scroll th{position:sticky;top:0;background:#193e50;color:white;z-index:1}.pg-scroll td,.pg-scroll th{padding:5px 7px;white-space:nowrap;text-align:left;border-bottom:1px solid #d8e5ec}.pg-scroll .pr-number{text-align:right}.pg-scroll tbody tr:nth-child(even){background:#f0f6fa}.pr-group-products footer{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:12px}.pg-total{color:#087965}.pg-pager{margin-left:auto;display:flex;gap:8px;align-items:center}.pr-group-products details{flex-basis:100%;font-size:11px}.pr-group-products summary,.pr-product-dashboard summary{cursor:pointer}.pg-status.nx-loading{min-height:40px}.pg-status.nx-loading::before{width:30px;height:30px}

.pd-metrics>.pd-simple-card{display:flex;flex-direction:column;gap:2px;flex:1 1 180px;padding:6px 9px;background:#f0f6fb}.pd-simple-card>b{font-size:12px}.pd-simple-card>strong{font-size:17px;color:#193e50}.pd-simple-card>small{font-weight:400;font-size:10px;color:#587080}.pd-simple-card.pd-negative>strong{color:#ad382b}.pd-metrics>.pd-return-rate{background:#fff5ed;border-color:#ead3bc}.pr-product-dashboard .pd-decision{font-size:11px;color:#426171}.pd-cost-note{margin-top:5px!important}

.pd-stock{border:1px solid #d9cb9e;background:#fff9e9;border-radius:5px;padding:6px 9px;font-size:12px}.pd-stock[hidden]{display:none}.pd-stock-values{display:inline-flex;flex-wrap:wrap;gap:6px;margin-left:10px}.pd-stock-values span{font-weight:700;background:white;border:1px solid #decf9d;border-radius:4px;padding:2px 7px}.pd-stock small{color:#6b634b;font-size:10px}.pd-stock p{margin-top:3px!important}

.pd-stock-date{display:inline-block;margin-left:10px;padding:3px 8px;border-radius:4px;background:#193e50;color:#fff;font-size:13px}

.pr-product-dashboard .pd-filters{align-items:flex-end;column-gap:10px;row-gap:6px}.pr-product-dashboard .pd-filters>label{display:flex;flex-direction:column;gap:3px;flex:0 0 155px;line-height:1.2}.pr-product-dashboard .pd-filters>label>input{width:100%;min-width:0;box-sizing:border-box}.pr-product-dashboard .pd-filters>button{align-self:flex-end;flex:none;margin:0}

.pd-stock-plan{font-size:12px;border:1px solid #bedbd6;border-radius:5px;padding:6px 9px;background:#f4faf8}.pd-stock-plan[hidden]{display:none}.pd-coverage-values{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0}.pd-coverage-values>span{flex:1 1 140px;display:flex;flex-direction:column;gap:2px;padding:3px 6px;background:white;border:1px solid #d6e6e2;border-radius:4px}.pd-coverage-values b{font-size:14px;color:#126b60}.pd-stock-plan p{font-size:10px!important}.pd-stock-plan small{font-size:11px}

/* Resumo compacto da análise: estoque ao lado das devoluções. */
.pr-product-dashboard[open]{height:92dvh;gap:6px;box-sizing:border-box}
.pr-product-dashboard .pd-heading-cards{gap:6px;align-items:stretch}
.pr-product-dashboard .pd-product{flex:1 1 190px;padding:5px 7px;font-size:13px}
.pr-product-dashboard .pd-total,.pr-product-dashboard .pd-return-total{font-size:13px;padding:6px 8px;display:flex;align-items:center}
.pr-product-dashboard .pd-heading-cards .pd-stock{flex:1 1 240px;min-width:0;margin:0;padding:4px 7px;font-size:10px}
.pr-product-dashboard .pd-stock-date{font-size:11px;margin-left:5px;padding:2px 4px}
.pr-product-dashboard .pd-stock-values{margin-left:5px;gap:3px;font-size:12px}
.pr-product-dashboard .pd-stock details{font-size:10px;margin-top:2px}
.pr-product-dashboard .pd-stock details summary{cursor:pointer}
.pr-product-dashboard .pd-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;flex-shrink:0}
.pr-product-dashboard .pd-metrics>.pd-simple-card{min-width:0;padding:4px 7px;gap:1px}
.pr-product-dashboard .pd-simple-card b{font-size:11px}
.pr-product-dashboard .pd-simple-card strong{font-size:15px;white-space:nowrap}
.pr-product-dashboard .pd-simple-card small{font-size:9px;line-height:1.15}
.pr-product-dashboard .pd-charts{flex:1 1 auto}
@media(max-width:1000px){.pr-product-dashboard .pd-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.pr-product-dashboard .pd-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.pr-product-dashboard[open]{overflow-y:auto}.pr-product-dashboard .pd-charts{flex:1 0 280px}.pr-product-dashboard .pd-simple-card strong{font-size:13px}}

@media(min-width:1000px){.pr-filters label:has(#pr-buyer){grid-column:3 / 5}.pr-filters .pr-actions{grid-column:5;justify-content:flex-end}}

.pr-billing{padding:4px 7px;border:1px solid #c6dedb;border-radius:5px;background:#edf7f4;color:#176b66;font-size:11px!important;font-weight:600;margin:4px 0!important}.pr-billing[hidden]{display:none}.pr-scroll table{min-width:1100px}.pr-scroll table col{width:auto!important}.pr-scroll table col:nth-child(2){width:14%!important}.pr-scroll table[data-mode=detalhado] col:nth-child(5){width:24%!important}.pr-scroll table:not([data-mode=detalhado]) col:nth-child(2){width:24%!important}.pr-scroll table col:last-child{width:13%!important}.pr-group-products table th:last-child{min-width:130px}

.pr-selection{display:flex;align-items:center;gap:6px;margin:4px 0;font-size:11px}.pr-selection[hidden]{display:none}.pr-selection button,.pr-family-items{height:28px;padding:2px 7px;font-size:11px}.pr-select-row,.pr-select-page{width:14px!important;height:14px!important;min-height:0!important;vertical-align:middle;margin:0 5px 0 0!important;accent-color:#128775}.pr-family-items{margin-left:8px;border:1px solid #c4d5e0;border-radius:4px;background:white;color:#193e50}.pr-scroll table[data-mode=familia] col:nth-child(2){width:30%!important}

.pr-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:4px 0}.pr-tools>button{height:28px;padding:2px 8px;font-size:11px}.pr-tools .pr-selection{margin:0}.pr-sales-ranking .rank-filters{display:flex;align-items:flex-end;gap:8px;margin:0}.pr-sales-ranking .rank-filters label{display:flex;flex-direction:column;gap:2px;font-size:12px;margin:0}.pr-sales-ranking .rank-filters label[hidden]{display:none}.rank-filters select,.rank-filters input{height:30px;width:145px;padding:3px 6px;font-size:12px}.pr-sales-ranking .rank-total{font-size:12px}.pr-sales-ranking .rank-value{position:relative}.pr-sales-ranking .rank-value::before{content:"";position:absolute;left:0;top:4px;bottom:4px;width:var(--rank-width);background:#d7eee8;border-radius:3px}.pr-sales-ranking .rank-value span{position:relative}.pr-sales-ranking .rank-status.nx-loading{min-height:64px}.pr-sales-ranking table{min-width:720px}
.pr-sales-ranking table{table-layout:fixed}.pr-sales-ranking .pg-scroll td,.pr-sales-ranking .pg-scroll th{padding:3px 6px;overflow:hidden;text-overflow:ellipsis}.pr-sales-ranking .pg-scroll .pr-product-link{height:22px;min-height:22px;padding:0;font-size:12px;max-width:100%}

.pr-billing .pr-billing-link{display:inline-flex;align-items:center;gap:3px;border:0;background:transparent;color:#086f80;text-decoration:underline;padding:0 3px;height:22px;min-height:22px;font:inherit;cursor:pointer}.pr-outside-purchases .pr-product-link{height:22px;min-height:22px;padding:0}.pr-outside-purchases table{min-width:700px}.pr-outside-purchases .pg-scroll td,.pr-outside-purchases .pg-scroll th{padding:3px 6px}.pr-outside-purchases .outside-status.nx-loading{min-height:64px}
/* Cabeçalhos legíveis e rolagem restrita às listas em telas pequenas. */
.pr-scroll thead th:last-child,.pg-scroll thead th:last-child{line-height:1.2;vertical-align:middle}
@media(max-width:650px){
 .workspace:has(.purchase-report:not([hidden])){min-width:0;max-width:100%;box-sizing:border-box}
 .purchase-report{min-width:0;max-width:100%}
 .pr-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
 .pr-filters input,.pr-filters select{min-width:0}
 .pr-actions,.pr-selection,.pr-pager{flex-wrap:wrap}
 .pr-filters .pr-actions{justify-content:flex-start}
 .pr-scroll{max-width:100%;touch-action:pan-x pan-y}
 .pr-footer{flex-direction:column}.pr-pager{order:0;max-width:100%}
 .pr-group-products{box-sizing:border-box;width:96vw;max-width:96vw;padding:10px}
 .pr-sales-ranking .rank-filters{flex-wrap:wrap}
 .pr-sales-ranking .rank-filters select,.pr-sales-ranking .rank-filters input{width:130px}
 .pg-scroll{max-width:100%;touch-action:pan-x pan-y}
 .pr-billing{overflow-wrap:anywhere}
}
.pr-sales-ranking .rank-filters[hidden],.pr-sales-ranking .pg-pager[hidden]{display:none}
.pr-billing.pr-summary-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:0;border:0;background:transparent}.pr-billing.pr-summary-cards[hidden]{display:none}.pr-summary-card{display:flex;flex-direction:column;justify-content:flex-start;gap:3px;min-width:0;padding:7px 9px;border:1px solid #c6dedb;border-radius:6px;background:#edf7f4}.pr-summary-card.pr-purchases-card{border-color:#c7dae8;background:#f0f6fb;color:#193e50}.pr-summary-label{font-size:12px;font-weight:600;line-height:1.2}.pr-summary-card>strong{font-size:17px;line-height:1.25;overflow-wrap:anywhere}.pr-summary-card small{font-size:10px;font-weight:400;line-height:1.2;color:#587080}.pr-summary-card .pr-billing-link{height:auto;min-height:22px;text-align:left;white-space:normal;line-height:1.2;align-self:flex-start;padding:0;font-size:11px}.pr-summary-cards>.pr-summary-card:only-child{grid-column:1/-1}@media(max-width:450px){.pr-summary-card{padding:6px;gap:4px}.pr-summary-label{font-size:11px}.pr-summary-card>strong{font-size:14px}.pr-summary-card .pr-billing-link{font-size:10px}}
/* Datas primeiro; resultados ocupam a altura disponível após consultar. */
#pr-billing{position:sticky;top:var(--pr-sticky-top,0px);z-index:5;scroll-margin-top:var(--pr-sticky-top,0px);background:#f3f6fa;padding-block:4px}
#pr-status{scroll-margin-top:var(--pr-sticky-top,0px)}
.pr-filters>.nx-period-label{padding-top:5px}.pr-filters .nx-period-open{font-size:12px;height:24px!important;min-height:24px!important;line-height:24px;padding:0 3px!important;top:0}.pr-filters .nx-period-open::before{width:15px!important;height:15px!important;flex-basis:15px!important}
@media(min-width:1000px){.pr-filters{grid-template-columns:minmax(150px,1fr) minmax(150px,1fr) 155px minmax(160px,1.2fr) minmax(160px,1.2fr)}.pr-filters label:has(#pr-buyer){grid-column:3/5}}
@media(max-width:650px){.pr-filters>label{grid-column:auto!important}.pr-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.pr-filters .nx-period-open{font-size:11px}.pr-filters .nx-period-open::before{width:13px!important;height:13px!important;flex-basis:13px!important}.pr-filters .pr-actions{grid-column:1/-1}}
.pr-query-summary{font-size:11px;color:#587080;margin:3px 0}.pr-query-summary[hidden]{display:none}.pr-query-summary>summary{cursor:pointer;line-height:22px}.pr-query-summary #pr-status{margin:3px 0 5px}
.pr-filters>label.nx-period-label{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;column-gap:5px;row-gap:2px;padding-top:0}
.pr-filters>label.nx-period-label>input{order:1;flex:0 0 100%}
.pr-filters>label.nx-period-label>.nx-period-open{position:static;order:0;display:inline-flex;align-items:center;justify-content:center;flex:none;background:#def3ec;color:#096c5b;border:1px solid #8fcbbc;border-radius:4px;font-size:11px;font-weight:700;height:22px!important;min-height:22px!important;line-height:20px;padding:0 5px!important}
.pr-filters>label.nx-period-label>.nx-period-open:hover{background:#c9eade}.pr-filters>label.nx-period-label>.nx-period-open:focus-visible{outline:2px solid #087965;outline-offset:2px}
/* Indicadores em pares: venda/compra, devolução/taxa, faturamento/participação. */
.pr-product-dashboard .pd-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
.pr-product-dashboard .pd-sales-metric,.pr-product-dashboard .pd-branch-billing,.pr-product-dashboard .pd-billing-share{background:#e7f5ee;border-color:#afd9cb;color:#086e5d}
.pr-product-dashboard .pd-sales-metric>strong,.pr-product-dashboard .pd-branch-billing>strong,.pr-product-dashboard .pd-billing-share>strong{color:#086e5d}
.pr-product-dashboard .pd-returns-metric,.pr-product-dashboard .pd-return-rate{background:#fff3eb;border-color:#e5c5b4;color:#a04f31}
.pr-product-dashboard .pd-returns-metric>strong,.pr-product-dashboard .pd-return-rate>strong{color:#a04f31}
.pr-product-dashboard>header{position:sticky;top:0;z-index:4;background:white;display:block;padding-top:2px}.pr-product-dashboard>header h2{padding-right:95px;min-height:32px}.pr-product-dashboard>header .pd-close{position:absolute;top:0;right:0;margin:0;align-self:flex-start}
.pr-product-dashboard .pd-simple-card strong{white-space:normal;overflow-wrap:anywhere}
.pr-product-dashboard .pd-filters>label.nx-period-label{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;column-gap:5px;row-gap:2px;padding-top:0}
.pr-product-dashboard .pd-filters>label.nx-period-label>input{order:1;flex:0 0 100%}
.pr-product-dashboard .pd-filters>label.nx-period-label>.nx-period-open{position:static;order:0;display:inline-flex;align-items:center;justify-content:center;flex:none;background:#def3ec;color:#096c5b;border:1px solid #8fcbbc;border-radius:4px;font-size:11px;font-weight:700;height:22px!important;min-height:22px!important;line-height:20px;padding:0 5px!important}
.pr-product-dashboard .pd-filters>label.nx-period-label>.nx-period-open:hover{background:#c9eade}
@media(max-width:600px){.pr-product-dashboard .pd-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.pr-product-dashboard .pd-filters>label{min-width:0}.pr-product-dashboard .pd-filters>button{justify-self:start}.pr-product-dashboard>header{flex-shrink:0}.pr-product-dashboard .pd-scope,.pr-product-dashboard .pd-legend{flex-shrink:0}.pr-product-dashboard .pd-legend{flex-wrap:wrap;gap:8px}}

.pr-product-dashboard .pd-query-details{flex-shrink:0;font-size:11px;color:#587080}.pr-product-dashboard .pd-query-details summary{cursor:pointer;line-height:22px}.pr-product-dashboard .pd-query-details .pd-scope{margin:3px 0;font-size:11px}
/* Reserva espaço para valores completos, inclusive o total geral com R$. */
.pr-scroll table col:nth-last-child(2){width:165px!important}
.pr-scroll table col:last-child{width:112px!important}
.pr-scroll table[data-mode=produto] col:nth-child(4){width:48px!important}
.pr-scroll table[data-mode=detalhado] col:nth-child(7){width:48px!important}
.pr-scroll :is(th,td):nth-last-child(2){text-align:right;font-variant-numeric:tabular-nums}
/* Uma única rolagem no popup: os cartões sobem junto com o conteúdo. */
.pr-product-dashboard[open]{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
.pr-product-dashboard>header{top:0;flex:none;min-height:34px;box-shadow:0 3px 0 white}
.pr-product-dashboard>.pd-heading-cards,.pr-product-dashboard>.pd-metrics,.pr-product-dashboard>.pd-filters,.pr-product-dashboard>.pd-query-details,.pr-product-dashboard>.pd-legend,.pr-product-dashboard>footer{flex:none}
.pr-product-dashboard .pd-charts{flex:0 0 auto;overflow:visible;min-height:320px;align-items:start}
.pr-product-dashboard .pd-charts svg{max-height:none}
.pr-product-dashboard>header{box-shadow:0 -14px 0 white,0 3px 0 white}

/* Cabeçalhos dos popups: reservar espaço para fechar também no celular. */
.pr-group-products>header{align-items:flex-start;flex-shrink:0}
.pr-group-products>header>div{flex:1;min-width:0;overflow-wrap:anywhere}
.pr-group-products>header>button{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;gap:5px;white-space:nowrap;min-width:78px;line-height:1;margin:0}

.pr-product-dashboard button.pd-metric-link{height:auto;text-align:left;white-space:normal;display:flex;flex-direction:column;cursor:pointer;font-family:inherit}.pd-metric-link:hover{filter:brightness(.97)}.pd-metric-link:focus-visible{outline:2px solid #1687bb;outline-offset:2px}.pd-metric-details .pg-scroll td:nth-child(2){white-space:normal;min-width:150px}.pd-metric-details .pg-scroll td:last-child{white-space:nowrap}
