/* Profinance Hub V57.65.48 — barra compacta, sem redesenhar a esteira existente */
#billingBatchProgress[hidden]{display:none!important}
#billingBatchProgress{display:grid;gap:10px;margin:8px 0 12px;min-width:0}
.billing-batch-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:3px 4px}
.billing-batch-heading strong{font-size:13px;color:var(--b-text,#f3edf9)}
.billing-batch-heading span{font-size:10.5px;color:var(--b-muted,#c9bfd7);line-height:1.45}
.billing-batch-card{border:1px solid rgba(121,166,215,.30);background:rgba(75,101,147,.095);border-radius:11px;padding:12px 14px;min-width:0}
.billing-batch-card.billing-batch-review,.billing-batch-inline.billing-batch-review{border-color:rgba(241,179,101,.48);background:rgba(189,129,53,.085)}
.billing-batch-card.billing-batch-error,.billing-batch-card.billing-batch-warning,.billing-batch-inline.billing-batch-error,.billing-batch-inline.billing-batch-warning{border-color:rgba(252,123,130,.46);background:rgba(178,83,93,.07)}
.billing-batch-card.billing-batch-done,.billing-batch-inline.billing-batch-done{border-color:rgba(93,214,169,.4);background:rgba(82,188,147,.06)}
.billing-batch-head,.billing-batch-inline-title{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.billing-batch-label{display:flex;align-items:center;gap:9px;min-width:0}
.billing-batch-label strong{font-size:12px;color:var(--b-text,#f4eef9);overflow-wrap:anywhere}
.billing-batch-mark{flex:0 0 8px;width:8px;height:8px;border-radius:50%;background:#5bc6df;box-shadow:0 0 0 3px rgba(91,198,223,.12)}
.billing-batch-review .billing-batch-mark{background:#eeaf5c}
.billing-batch-error .billing-batch-mark,.billing-batch-warning .billing-batch-mark{background:#ef8593}
.billing-batch-done .billing-batch-mark{background:#69d8aa}
.billing-batch-percent{flex-shrink:0;font-weight:700;font-size:11px;color:var(--b-text,#f5efff)}
.billing-batch-phase{font-size:11.5px;font-weight:700;color:var(--b-text,#f5efff);margin:9px 0 7px}
.billing-batch-track{height:9px;position:relative;overflow:hidden;border-radius:12px;background:rgba(190,177,209,.18);border:1px solid rgba(192,178,213,.15)}
.billing-batch-track>span{display:block;height:100%;background:linear-gradient(90deg,#5a9dcd,#60d3b2);transition:width .4s ease;border-radius:10px}
.billing-batch-review .billing-batch-track>span{background:linear-gradient(90deg,#c59262,#e2b56c)}
.billing-batch-error .billing-batch-track>span,.billing-batch-warning .billing-batch-track>span{background:#dd7884}
.billing-batch-track.is-unknown:after{content:"";position:absolute;inset:0;width:32%;background:linear-gradient(90deg,transparent,rgba(116,205,228,.36),transparent);animation:billing-batch-pulse 1.8s ease-in-out infinite}
@keyframes billing-batch-pulse{from{transform:translateX(-100%)}to{transform:translateX(340%)}}
.billing-batch-stats{display:flex;align-items:center;flex-wrap:wrap;gap:5px 13px;margin-top:7px;color:var(--b-muted,#c5bbd3);font-size:10.5px;line-height:1.4}
.billing-batch-stats .billing-batch-count{color:var(--b-text,#e7dff1);font-weight:700}
.billing-batch-detail{font-size:10.5px;line-height:1.5;color:var(--b-muted,#c9bed8);margin:6px 0}
.billing-batch-foot{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px;font-size:9.5px;color:var(--b-muted,#bcb3ca)}
.billing-batch-locate{margin-top:8px}
.billing-batch-locate button{border:0;background:none;color:#7bdcff;text-decoration:underline;text-underline-offset:2px;cursor:pointer;font-size:10px;padding:4px 0}
.billing-batch-alert{margin:0 4px;color:#ffce9c;font-size:11px}
.stage-row .billing-batch-inline{grid-column:1/-1;grid-row:auto;min-width:0;border:1px solid rgba(121,166,215,.30);border-radius:8px;padding:10px 12px;background:rgba(75,101,147,.075)}
.stage-row .billing-batch-inline-title{margin-bottom:8px;font-size:10.5px;color:var(--b-text,#f4eef9)}
.stage-row .billing-batch-inline-title span{white-space:nowrap;font-size:10px;color:var(--b-muted,#d0c4db)}
.stage-row .billing-batch-inline .billing-batch-track{height:8px}
.stage-row .billing-batch-inline .billing-batch-stats{font-size:9.5px;margin-top:5px}
html[data-theme=light] .billing-batch-card,html[data-theme=light] .stage-row .billing-batch-inline{background:#f6f8fc;border-color:#cbd7e5}
html[data-theme=light] .billing-batch-heading strong,html[data-theme=light] .billing-batch-label strong,html[data-theme=light] .billing-batch-percent,html[data-theme=light] .billing-batch-phase,html[data-theme=light] .billing-batch-stats .billing-batch-count,html[data-theme=light] .stage-row .billing-batch-inline-title{color:#26374d}
html[data-theme=light] .billing-batch-locate button{color:#096fa0}
@media(max-width:820px){.billing-batch-heading{align-items:flex-start;flex-direction:column;gap:4px}
.billing-batch-card{padding:11px}.billing-batch-head{align-items:flex-start;gap:8px}.billing-batch-percent{font-size:10px}
.stage-row .billing-batch-inline{grid-column:1/-1}}
@media(prefers-reduced-motion:reduce){.billing-batch-track.is-unknown:after{animation:none}.billing-batch-track>span{transition:none}}

/* Esteira de processamento real: uma barra por etapa, sem confundir leitura com gravação. */
.billing-processing-board{margin:10px 0 12px;padding:14px;border:1px solid rgba(100,180,225,.35);border-radius:10px;background:rgba(28,65,100,.13)}
.billing-processing-title,.billing-processing-focus,.billing-processing-lane-head{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.billing-processing-title{font-weight:750;font-size:14px;color:var(--b-text,#f5efff);margin-bottom:10px}.billing-processing-title span,.billing-processing-focus span,.billing-processing-note{font-size:11px;color:var(--b-muted,#c9bfd7);font-weight:400}
.billing-processing-focus{padding:9px 11px;margin-bottom:10px;border-radius:7px;background:rgba(85,158,216,.16);font-size:13px;overflow-wrap:anywhere}
.billing-processing-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(225px,1fr));gap:9px}.billing-processing-lane{min-width:0;padding:10px;border:1px solid rgba(165,184,216,.22);border-radius:8px;background:rgba(116,143,186,.08)}
.billing-processing-lane-head{font-size:12px;margin-bottom:7px}.billing-processing-lane-head span{font-variant-numeric:tabular-nums;font-weight:700;color:var(--b-text,#f5efff)}.billing-processing-lane small,.billing-processing-pending{display:block;font-size:11px;line-height:1.45;margin-top:7px;color:var(--b-muted,#c9bfd7)}
.billing-processing-lane .billing-batch-track{height:12px}.billing-processing-pending{border-left:3px solid #e6a454;padding:8px 10px;overflow-wrap:anywhere}.billing-processing-note{display:block;margin-top:9px}
html[data-theme=light] .billing-processing-title,html[data-theme=light] .billing-processing-lane-head span{color:#26374d}
@media(max-width:680px){.billing-processing-grid{grid-template-columns:1fr}.billing-processing-board{padding:10px}}

.billing-processing-totals{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;font-size:12px;margin-bottom:10px;font-variant-numeric:tabular-nums}.billing-processing-totals strong{font-size:15px;color:var(--b-text,#f5efff)}.billing-processing-totals span{color:var(--b-muted,#c9bfd7)}
/* Renderizar apenas conteúdo visível, sem alterar tamanho ou ordem dos cards. */
#billingQueue.stage-screen-list > .stage-row:not(.billing-batch-parent):not([data-sales-drag]):not(:focus-within),#billingQueue.stage-screen-list > .stage-row[data-sales-drag]:not(.billing-batch-parent):not(:focus-within){content-visibility:auto;contain-intrinsic-size:auto 220px}
#billingQueue.stage-screen-list > .stage-row{transition:none}

/* Inventário do lote: origem e documentos ativos, sem dupla contagem. */
.billing-inventory h4{font-size:13px;margin:14px 0 8px;color:var(--b-text)}.billing-inventory-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.billing-inventory-metric{padding:10px 12px;background:var(--b-panel-2);border:1px solid var(--b-border);border-radius:9px}.billing-inventory-metric strong{display:block;font-size:21px;color:var(--b-text);font-variant-numeric:tabular-nums}.billing-inventory-metric small,.billing-inventory-note{font-size:11px;color:var(--b-muted);line-height:1.5}.billing-inventory-note{margin:8px 0}.billing-inventory-folder{border:1px solid var(--b-border);background:var(--b-panel-2);border-radius:9px;margin:6px 0;overflow:hidden}.billing-inventory-folder summary{cursor:pointer;padding:11px;display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;font-size:12px;color:var(--b-text)}.billing-inventory-folder summary:before{content:'▸';color:var(--b-muted)}.billing-inventory-folder[open] summary:before{content:'▾'}.billing-inventory-folder summary strong{min-width:130px}.billing-inventory-folder summary span{color:var(--b-muted)}.billing-inventory-scroll{overflow:auto}.billing-inventory table{width:100%;border-collapse:collapse;font-size:11px;font-variant-numeric:tabular-nums}.billing-inventory th,.billing-inventory td{padding:8px;text-align:right;border-top:1px solid var(--b-border);white-space:nowrap}.billing-inventory th:first-child,.billing-inventory td:first-child{text-align:left}.billing-inventory th{color:var(--b-muted)}@media(max-width:650px){.billing-inventory-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
