.faturamento-page{padding:8px 10px;min-width:0;color:#173d50}.faturamento-page[hidden]{display:none}.faturamento-page>header,.faturamento-page dialog>header{display:flex;align-items:center;justify-content:space-between;gap:10px}.faturamento-page h2{font-size:20px;margin:2px 0}.faturamento-page h3{font-size:18px;margin:0 0 6px}.faturamento-page p{margin:6px 0;font-size:12px}.fat-badge{background:#fff3c4;color:#735000;border:1px solid #ead58b;border-radius:5px;padding:5px 9px;font-size:12px}.fat-context{background:#e9f4f1;padding:7px;border-radius:5px}.faturamento-page form{display:grid;grid-template-columns:140px 140px 145px 120px minmax(160px,1fr) auto;align-items:end;gap:8px}.faturamento-page label{font-size:12px;display:flex;flex-direction:column;gap:3px;min-width:0}.faturamento-page input:not([type=checkbox]),.faturamento-page select,.faturamento-page button{height:32px;box-sizing:border-box;margin:0;min-width:0}.faturamento-page input:not([type=checkbox]),.faturamento-page select{width:100%;padding:4px 7px;border:1px solid #bfd1df;border-radius:5px;font:inherit;color:inherit;background:white}.fat-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:8px 0}.fat-actions strong{font-size:12px}.faturamento-page table{width:100%;border-collapse:collapse;font-size:12px}.faturamento-page th{background:#173f50;color:white;text-align:left}.faturamento-page th,.faturamento-page td{padding:6px 7px;border-bottom:1px solid #d6e3eb;white-space:nowrap}.faturamento-page tbody tr:nth-child(even){background:#edf4f8}.faturamento-page tbody tr.fat-selected{background:#deefff}.faturamento-page thead{position:sticky;top:0;z-index:1}.fat-list{max-height:calc(100dvh - 340px);min-height:160px;overflow:auto;border:1px solid #d1dfe8;border-radius:5px}.fat-list td:last-child,.fat-num{text-align:right!important}.faturamento-page footer{display:flex;justify-content:space-between;gap:10px;margin:8px 0;font-size:12px;flex-wrap:wrap}.faturamento-page footer strong{color:#087867}.faturamento-page #fat-error,.fat-pending{color:#ad3524;background:#fff0eb;padding:8px;border-radius:5px}.fat-pending{padding-left:26px;font-size:12px}.faturamento-page dialog{width:min(1150px,94vw);max-height:88dvh;box-sizing:border-box;overflow:auto;border:1px solid #c6d7e2;border-radius:12px;padding:14px;color:inherit}.faturamento-page dialog::backdrop{background:#173f5070}.faturamento-page dialog>header{position:sticky;top:-14px;background:white;padding:6px 0;z-index:3}.faturamento-page dialog>footer{position:sticky;bottom:-14px;background:#e6f4ed;padding:10px;margin-bottom:0;z-index:2}.faturamento-page #fat-preview-rows>details{margin:9px 0;border:1px solid #ccdde6;border-radius:5px;padding:7px}.faturamento-page #fat-preview-rows>details>summary{font-weight:bold;color:#126f6a;cursor:pointer}.fat-detail-list{overflow:auto;margin:7px 0}.fat-detail-list th:nth-child(3),.fat-detail-list td:nth-child(3),.fat-detail-list th:nth-child(5),.fat-detail-list td:nth-child(5),.fat-detail-list th:nth-child(6),.fat-detail-list td:nth-child(6){text-align:right}.fat-detail-list th:nth-child(2),.fat-detail-list td:nth-child(2){white-space:normal;min-width:170px}@media(max-width:900px){.faturamento-page form{grid-template-columns:repeat(2,minmax(0,1fr))}.faturamento-page>header{align-items:flex-start;flex-direction:column}.fat-list{max-height:55dvh}.faturamento-page dialog{width:96vw;max-height:90dvh}.faturamento-page .fat-actions button{font-size:11px}.faturamento-page td,.faturamento-page th{padding:5px}.faturamento-page footer{display:block}.faturamento-page footer details{margin-top:6px}}
.faturamento-page input[type=checkbox]{width:16px;height:16px;min-height:0;margin:0;padding:0;accent-color:#087f72}.fat-list th:first-child,.fat-list td:first-child{width:28px;text-align:center}.faturamento-page button{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:4px 10px;border:1px solid #bcd0df;border-radius:5px;white-space:nowrap;font-size:12px;color:#174354;background:white;cursor:pointer}.faturamento-page button:not(.secondary){background:#087f72;color:white;border-color:#087f72}.faturamento-page button:not(.secondary):hover:not(:disabled){background:#076c61;color:white}.faturamento-page button:disabled{opacity:.5;cursor:default}
/* Filtros compactos: botoes e campos compartilham a mesma base e altura. */
.faturamento-page #fat-filter{--nx-control-height:32px;margin:8px 0;align-items:end}.faturamento-page #fat-filter>label{margin:0;align-self:end}.faturamento-page .fat-query-actions{display:flex;align-items:end;align-self:end;margin:0;padding:0}.faturamento-page #fat-filter .fat-query-actions>button{height:32px;min-height:32px;margin:0;align-self:end}.faturamento-page #fat-filter input,.faturamento-page #fat-filter select{height:32px;min-height:32px;margin:0}.faturamento-page .fat-actions{align-items:center}.faturamento-page .fat-actions button{height:32px;min-height:32px;margin:0}

.faturamento-page .fat-calc-options{display:flex;flex-wrap:wrap;gap:8px;margin:7px 0;align-items:end}.faturamento-page .fat-calc-options label{margin:0;font-size:12px}.faturamento-page .fat-calc-options input,.faturamento-page .fat-calc-options select{height:32px;min-height:32px;margin:0;width:auto;max-width:100%}.fat-calc-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:8px 0}.fat-calc-cards>div{padding:7px 9px;border:1px solid #c5dfda;border-radius:5px;background:#edf8f4;text-align:right}.fat-calc-cards span{display:block;font-size:11px}.fat-calc-cards strong{display:block;font-size:16px;color:#087566}.fat-installments h4{margin:9px 0 3px}.faturamento-page .fat-detail-list th,.faturamento-page .fat-detail-list td{text-align:left}.faturamento-page .fat-detail-list .fat-num{text-align:right!important}.faturamento-page .fat-detail-list th:nth-child(2),.faturamento-page .fat-detail-list td:nth-child(2){min-width:0}@media(max-width:520px){.fat-calc-cards{grid-template-columns:1fr}.faturamento-page .fat-calc-options{display:grid;grid-template-columns:1fr 1fr}.faturamento-page .fat-calc-options label{min-width:0}.faturamento-page .fat-calc-options input,.faturamento-page .fat-calc-options select{width:100%}}

@media(max-width:520px){.fat-calc-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.fat-calc-cards>div{padding:6px 4px}.fat-calc-cards span{font-size:10px}.fat-calc-cards strong{font-size:13px;white-space:nowrap}}

.fat-saved-note{padding:8px;border:1px solid #b7ded1;background:#f3fbf8;border-radius:5px;margin:8px 0}.fat-saved-note h4{margin:0 0 5px}.faturamento-page dialog>footer{align-items:center}.faturamento-page dialog>footer button{margin:0;min-height:32px}.faturamento-page #fat-preview-note{white-space:normal;overflow-wrap:anywhere}

.fat-note-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.fat-xml-state{font-size:12px;line-height:1.4}
.faturamento-page .fat-message-error{color:#b42318;background:#fff1f0;border-left:3px solid #d92d20;border-radius:4px;padding:8px 10px;font-weight:600;white-space:normal;overflow-wrap:anywhere}
.fat-service-status{padding:8px 10px;border-radius:5px;background:#edf4f8;overflow-wrap:anywhere}.faturamento-page .fat-message-success{color:#087867;background:#e6f4ed;border-left:3px solid #087867;padding:8px 10px;font-weight:600}
.faturamento-page .fat-email-dialog{width:min(1000px,calc(100vw - 40px));max-height:85vh;overflow:auto}.fat-email-smtp{border:1px solid #c3d9e2;padding:10px;border-radius:5px}.fat-email-smtp label{min-width:120px;flex:1}.fat-email-smtp input,.fat-email-smtp select{width:100%;box-sizing:border-box}.fat-email-auto{display:flex;align-items:center;gap:6px;margin:12px 0}.fat-email-auto input{width:auto}.fat-email-list{overflow:auto}.fat-email-list td{white-space:normal;overflow-wrap:anywhere}.fat-email-dialog .fat-context{padding:10px}.fat-email-dialog section p{overflow-wrap:anywhere}
.faturamento-page .fat-email-smtp{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;min-width:0}.faturamento-page .fat-email-auto{flex-direction:row;align-items:center;text-align:left}.fat-email-auto input{flex:0 0 auto;margin:0}.fat-email-list th:nth-child(3),.fat-email-list td:nth-child(3){text-align:left}@media(max-width:700px){.faturamento-page .fat-email-smtp{grid-template-columns:1fr}.faturamento-page .fat-email-auto{align-items:flex-start}}
.fat-timing{display:block;padding:8px;background:#e9f4ff;border:1px solid #b7d7ef;border-radius:5px;font-size:16px;color:#174354}.fat-timing-result{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:9px;background:#e3f4ee;border:1px solid #b5ded2;border-radius:6px;margin:8px 0}.fat-timing-result strong{font-size:20px;color:#087867}.fat-timing-result span{font-size:12px}

.fat-progress-card{padding:10px;border:1px solid #b5ded2;border-radius:6px;background:#f2faf7;margin:8px 0;display:grid;gap:7px}
.fat-progress-header{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;color:#087867;font-size:13px}
.fat-progress-card>span{font-size:12px;color:#174354}
.fat-progress-card progress{appearance:none;width:100%;height:14px;border:0;border-radius:8px;overflow:hidden;background:#dcebe7;accent-color:#087f70}
.fat-progress-card progress::-webkit-progress-bar{background:#dcebe7;border-radius:8px}
.fat-progress-card progress::-webkit-progress-value{background:#087f70;border-radius:8px}
.fat-progress-card progress::-moz-progress-bar{background:#087f70;border-radius:8px}
.fat-progress-pending{border-color:#dab562;background:#fff9eb}
.fat-progress-card .fat-timing{font-size:14px;padding:5px 8px}

.fat-progress-pending progress{accent-color:#bd7d12}
.fat-progress-pending progress::-webkit-progress-value{background:#bd7d12}
.fat-progress-pending progress::-moz-progress-bar{background:#bd7d12}

.fat-progress-group{display:grid;gap:4px;font-size:12px;color:#174354;min-width:0}
.fat-progress-items progress{accent-color:#3184bf}
.fat-progress-items progress::-webkit-progress-value{background:#3184bf}
.fat-progress-items progress::-moz-progress-bar{background:#3184bf}
.fat-progress-boletos progress{accent-color:#7754ad}
.fat-progress-boletos progress::-webkit-progress-value{background:#7754ad}
.fat-progress-boletos progress::-moz-progress-bar{background:#7754ad}
.fat-results{display:grid;gap:8px;margin:12px 0;min-width:0}
.faturamento-page .fat-results-filter{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:7px;font-weight:700;color:#174354;text-align:left;min-width:0}
.faturamento-page .fat-results-filter input{width:auto;margin:0;flex:none}
.fat-results>span{font-size:12px;color:#174354}
.fat-result-table td{vertical-align:top;white-space:normal;overflow-wrap:anywhere}
.fat-result-table .fat-result-error td{color:#b42318;background:#fff1f1}
.fat-result-table .fat-result-error td:first-child{border-left:3px solid #d92d20}
.fat-result-details{margin-top:8px;font-weight:400}
.fat-result-details summary{cursor:pointer;font-weight:700;padding:3px 0}
.fat-result-details pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;margin:5px 0 10px;max-width:100%}
.fat-result-details p{margin:5px 0;line-height:1.4}
.fat-result-product{font-weight:700;white-space:normal;overflow-wrap:anywhere}

.faturamento-page .fat-message-warning{background:#fff5d8;border-left:3px solid #d69700;border-radius:4px;color:#755100;padding:12px;margin:8px 0;overflow-wrap:anywhere}.faturamento-page .fat-message-warning p{margin:6px 0 0}
