.sales-history-shell{display:flex;flex-direction:column;gap:16px;color:#f3f0fa;max-width:1500px}.sales-history-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 24px;background:#121217;border:1px solid #292833;border-radius:20px}.sales-history-head h2{font-size:23px;margin:8px 0;color:#fff}.sales-history-head p{font-size:13px;color:#a9a5b5;margin:0;line-height:1.6}.sales-history-refresh,.sales-history-filter-actions button,.sales-history-receipt,.sales-history-pagination button{appearance:none;cursor:pointer;border:1px solid #393342;border-radius:10px;background:#201a2d;color:#ece2ff;padding:11px 16px;font-size:13px;font-weight:650}.sales-history-refresh:hover,.sales-history-filter-actions button:hover,.sales-history-receipt:hover{border-color:#9162ef}.sales-history-filter-actions button:first-child,.sales-history-receipt{background:#7046d6;color:white;border-color:#7046d6}.sales-history-shell button:disabled{cursor:not-allowed;opacity:.4}.sales-history-filters{display:grid;grid-template-columns:minmax(120px,1.2fr) 1fr 1fr 1fr minmax(160px,1.3fr) auto;align-items:end;gap:11px;background:#121217;border:1px solid #292833;border-radius:17px;padding:18px}.sales-history-filters label{display:flex;flex-direction:column;gap:8px;color:#c3bccf;font-size:12px;font-weight:650}.sales-history-filters input,.sales-history-filters select{height:42px;width:100%;min-width:0;background:#19191e;border:1px solid #383542;border-radius:10px;padding:0 12px;color:#f1edf7;outline:none;color-scheme:dark;font-size:13px}.sales-history-filters input:focus,.sales-history-filters select:focus{border-color:#8f68e8}.sales-history-filter-actions{display:flex;gap:8px}.sales-history-filter-actions button{white-space:nowrap}.sales-history-results{background:#111115;border:1px solid #292833;border-radius:17px;overflow:hidden}.sales-history-results-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:19px 20px;border-bottom:1px solid #282630;font-size:14px}.sales-history-results-head span{color:#9e9ba9;font-size:12px}.sales-history-item{padding:17px 20px;border-bottom:1px solid #282630;display:grid;gap:10px}.sales-history-item:last-child{border-bottom:0}.sales-history-main{display:flex;align-items:center;gap:18px;flex-wrap:wrap}.sales-history-id{font-weight:750;color:#ded0ff;min-width:91px}.sales-history-date{color:#b4b0bf;font-size:13px}.sales-history-amount{font-size:15px;margin-left:auto}.sales-history-status{font-size:11px;font-weight:700;border-radius:100px;padding:5px 9px;color:#8de7b7;background:#153629}.sales-history-status.is-cancel{color:#ff9b9b;background:#3b1e28}.sales-history-status.is-draft{color:#ffdf9b;background:#3f3221}.sales-history-meta{display:flex;gap:28px;flex-wrap:wrap;color:#e5e0e9;font-size:13px}.sales-history-meta span{display:flex;gap:8px;align-items:baseline}.sales-history-meta small{color:#94909d}.sales-history-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.sales-history-receipt{padding:8px 15px}.sales-history-note,.sales-history-footnote{font-size:12px;color:#aaa6b5}.sales-history-error{padding:16px 20px;color:#ffbecb;background:#311d2b;margin:0}.sales-history-empty{color:#a5a0b0;padding:35px 20px;text-align:center}.sales-history-pagination{display:flex;align-items:center;justify-content:center;gap:15px}.sales-history-pagination span{font-size:12px;color:#aeabb7}.sales-history-footnote{line-height:1.6;margin:0 2px 25px}@media(max-width:1100px){.sales-history-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.sales-history-filter-actions{grid-column:1/-1}}@media(max-width:610px){.sales-history-head{padding:18px;align-items:flex-start;gap:10px}.sales-history-head h2{font-size:20px}.sales-history-refresh{padding:9px}.sales-history-filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px}.sales-history-filters label:first-child,.sales-history-filter-actions{grid-column:1/-1}.sales-history-filter-actions button{flex:1}.sales-history-item{padding:16px 14px}.sales-history-main{gap:10px}.sales-history-id{min-width:0}.sales-history-amount{margin-left:0}.sales-history-status{margin-left:auto}.sales-history-meta{gap:8px;flex-direction:column}}

.sales-history-edit,.sales-history-cancel{appearance:none;cursor:pointer;border:1px solid #393342;border-radius:10px;background:#1e1c25;color:#e6def3;padding:8px 15px;font-weight:650;font-size:13px}.sales-history-edit:hover{border-color:#9973eb}.sales-history-cancel{color:#ffb7c0}.sales-history-cancel:hover{border-color:#d56880}.sales-history-overlay{position:fixed;inset:0;z-index:9002;display:grid;place-items:center;padding:14px}.sales-history-shade{position:absolute;inset:0;background:#000b;backdrop-filter:blur(5px)}.sales-history-dialog{position:relative;max-width:550px;width:100%;max-height:90vh;overflow:auto;border:1px solid #363144;border-radius:20px;background:#15141c;color:#f6f4fa;box-shadow:0 20px 90px #0009}.sales-history-dialog header{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid #302e39}.sales-history-dialog h3{font-size:19px;margin:0}.sales-history-dialog header button{border:1px solid #393441;border-radius:9px;background:#25212e;color:#e6e1ef;padding:5px 12px;cursor:pointer}.sales-history-dialog-content{padding:20px 24px;display:grid;gap:14px}.sales-history-dialog-content form{display:grid;gap:14px}.sales-history-dialog-content form>label{display:grid;gap:8px;font-size:13px;font-weight:650;color:#d7cedd}.sales-history-dialog-content input,.sales-history-dialog-content select{width:100%;box-sizing:border-box;border-radius:9px;border:1px solid #3d374b;background:#1d1c24;color:#fff;padding:11px;font-size:14px;color-scheme:dark}.sales-history-dialog-hint,.sales-history-dialog-content small{font-size:12px;line-height:1.65;color:#b1adbd;margin:0}.sales-history-client-query{display:flex;gap:8px}.sales-history-client-query button,.sales-history-dialog-buttons button,.sales-history-dialog-buttons a{border:1px solid #4e405f;border-radius:9px;background:#282235;color:#ede8f9;padding:10px 13px;cursor:pointer;font-size:13px;text-decoration:none}.sales-history-dialog-buttons{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;align-items:center}.sales-history-dialog-buttons .sales-history-primary{background:#7647db;color:white;border-color:#7647db}.sales-history-form-error{color:#ffc2cf;background:#3b1e2a;border-radius:9px;padding:10px;margin:0}body.sales-history-dialog-open{overflow:hidden}@media(max-width:610px){.sales-history-dialog-content,.sales-history-dialog header{padding:16px}.sales-history-client-query{flex-direction:column}.sales-history-client-query button{align-self:stretch}}

/* Edição ampliada de vendas, sem sair da aba PDV */
.sales-history-dialog.sales-history-dialog-wide{max-width:880px}
.sales-history-dialog-wide .sales-history-dialog-content form{gap:18px}
.sales-edit-section-title{font-size:15px;margin:6px 0 0;color:#fff}
.sales-edit-section-header{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #312d3b;padding-bottom:10px}
.sales-edit-section-header span{font-size:12px;color:#aca4b8}
.sales-edit-header-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.sales-edit-header-fields label{display:grid;gap:7px;font-size:12px;color:#d6cfdf}
.sales-edit-list{display:grid;gap:9px}
.sales-edit-line,.sales-edit-payment{display:grid;gap:12px;padding:14px;border:1px solid #383242;background:#1b1923;border-radius:12px}
.sales-edit-item-name{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;align-items:center}
.sales-edit-item-name strong{font-size:13px}
.sales-edit-item-name small{color:#9b93a9}
.sales-edit-fields{display:grid;grid-template-columns:0.75fr 1.15fr 1.15fr auto;gap:10px;align-items:end}
.sales-edit-fields label,.sales-edit-payment label{display:grid;gap:6px;font-size:12px;color:#cfc4dc;min-width:0}
.sales-edit-payment{grid-template-columns:1.5fr 1fr 0.8fr;align-items:end}
.sales-edit-line-total{min-width:104px;display:grid;gap:8px;align-self:end;text-align:right;padding-bottom:10px}
.sales-edit-line-total small{color:#b8afc4}.sales-edit-line-total strong{font-size:13px}
.sales-edit-summary{display:flex;align-items:center;justify-content:space-between;background:#241c35;border:1px solid #55417c;padding:14px 17px;border-radius:12px;font-size:13px}
.sales-edit-summary strong{font-size:17px;color:#fff}
@media(max-width:680px){.sales-history-dialog-wide{max-height:94vh}.sales-edit-header-fields{grid-template-columns:1fr}.sales-edit-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.sales-edit-payment{grid-template-columns:repeat(2,minmax(0,1fr))}.sales-edit-payment .sales-edit-item-name{grid-column:1/-1}.sales-edit-line-total{text-align:left}.sales-edit-summary{flex-wrap:wrap;gap:7px}}

.sales-history-seller-hint{font-size:12px;color:#bdb1d4;margin:-8px 4px 0;line-height:1.5}

/* Mobile: filtro de período e data de edição, sem sobreposição ou corte do calendário. */
@media (max-width:610px){
 .sales-history-shell,.sales-history-filters{min-width:0;max-width:100%;box-sizing:border-box}
 .sales-history-filters{grid-template-columns:minmax(0,1fr);gap:12px}
 .sales-history-filters label{grid-column:1;min-width:0;max-width:100%;width:100%;box-sizing:border-box}
 .sales-history-filters input,.sales-history-filters select{box-sizing:border-box;min-width:0;max-width:100%;width:100%;height:44px}
 .sales-history-filters input[type="date"]{font-size:16px;line-height:normal;padding:9px 12px;color-scheme:dark}
 .sales-history-filter-actions{grid-column:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}
 .sales-history-filter-actions button{min-width:0;white-space:normal;padding:10px 8px}
 .sales-edit-header-fields label{min-width:0;max-width:100%}
 .sales-history-dialog-content input[type="datetime-local"]{
  display:block;box-sizing:border-box;min-width:0;max-width:100%;width:100%;
  min-height:44px;font-size:16px;line-height:normal;color-scheme:dark
 }
}
@media (min-width:520px) and (max-width:610px){
 .sales-history-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
 .sales-history-filters label{grid-column:auto}
 .sales-history-filters label:first-child,.sales-history-filter-actions{grid-column:1/-1}
}

/* Datas sempre lado a lado, contidas no formulário, inclusive no Safari iOS. */
.sales-history-filters .sales-history-date-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0;grid-column:span 2}
.sales-history-filters .sales-history-date-pair label{min-width:0;width:100%;max-width:100%;grid-column:auto}
.sales-history-filters .sales-history-date-pair input[type=date]{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:0 5px;font-size:clamp(11px,3vw,14px);-webkit-appearance:none;appearance:none}
@media(max-width:610px){.sales-history-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.sales-history-filters .sales-history-date-pair{grid-column:1/-1;gap:8px}.sales-history-filters>label:not(:first-child){grid-column:1/-1}.sales-history-filters .sales-history-date-pair label{grid-column:auto}.sales-history-filters .sales-history-date-pair input[type=date]{padding:0 3px;font-size:12px}}

/* Vendas / PDV: filtro por tipo de produto (quantidade e faturamento, sem custos) */
@media(min-width:1101px){.sales-history-filters.has-type{grid-template-columns:minmax(110px,1fr) minmax(120px,1fr) minmax(120px,1fr) minmax(110px,.9fr) minmax(140px,1.1fr) minmax(150px,1.2fr) auto}}
@media(max-width:1100px){.sales-history-filters.has-type>label:has([data-sales-type]){grid-column:1/-1}}
.pdv-type-strip,.pdv-type-report{background:#121217;border:1px solid #292833;border-radius:17px;padding:18px;color:#f3f0fa;display:grid;gap:14px;min-width:0}
.pdv-type-strip-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;font-size:14px}.pdv-type-strip-head span{color:#9e9ba9;font-size:12px}
.pdv-type-chips{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px}
.pdv-type-chip{appearance:none;cursor:pointer;text-align:left;display:grid;gap:3px;background:#19171f;border:1px solid #332f3e;border-radius:12px;padding:11px 12px;color:#f1edf7;font:inherit}
.pdv-type-chip:hover{border-color:#8f68e8;background:#1f1a2c}.pdv-type-chip span{font-size:12px;color:#c9c2d8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdv-type-chip strong{font-size:17px}.pdv-type-chip small{font-size:11px;color:#9e9ba9}
.pdv-type-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.pdv-type-eyebrow{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#b496ff;font-weight:800}
.pdv-type-head h3{margin:4px 0;font-size:21px;color:#fff}.pdv-type-head p{margin:0;color:#a9a5b5;font-size:12px}
.pdv-type-clear{appearance:none;cursor:pointer;border:1px solid #393342;border-radius:10px;background:#201a2d;color:#ece2ff;padding:9px 14px;font-size:12px;font-weight:650}
.pdv-type-clear:hover{border-color:#9162ef}
.pdv-type-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}
.pdv-type-kpi{background:#17161d;border:1px solid #2a2833;border-radius:13px;padding:13px;display:grid;gap:6px;min-width:0}
.pdv-type-kpi span{font-size:11px;color:#a9a5b5}.pdv-type-kpi strong{font-size:clamp(17px,1.5vw,22px);letter-spacing:-.03em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.pdv-type-kpi:nth-child(2) strong{color:#c9b3ff}
.pdv-type-insight{border:1px solid #4a3f66;background:linear-gradient(135deg,#211a31,#17141f);border-radius:13px;padding:13px 15px}
.pdv-type-insight-label{font-size:11px;font-weight:800;color:#c7b2ff;letter-spacing:.03em}.pdv-type-insight p{margin:6px 0 0;font-size:13px;line-height:1.6;color:#e7e1f3}
.pdv-type-sync{margin:0;font-size:12px;color:#d9cdf3;background:#201b28;border:1px solid #464058;border-radius:10px;padding:9px 12px}
.pdv-type-columns{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:16px}.pdv-type-columns>:only-child{grid-column:1/-1}
.pdv-type-block h4{margin:0 0 8px;font-size:13px;color:#d8d2e4}
.pdv-type-products{display:grid}
.pdv-type-product{display:grid;grid-template-columns:18px minmax(90px,1.8fr) minmax(50px,1fr) 56px 100px;gap:9px;align-items:center;min-height:38px;border-bottom:1px solid #24222c;font-size:12px}
.pdv-type-product.is-seller{grid-template-columns:18px minmax(0,1fr) 56px 100px}
.pdv-type-product:last-child{border-bottom:0}.pdv-rank{color:#8f8b9c}.pdv-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pdv-bar{height:5px;background:#292834;border-radius:8px;overflow:hidden}.pdv-bar i{display:block;height:100%;background:#8e66f5;border-radius:8px}
.pdv-units{text-align:right;color:#c8c4d4;white-space:nowrap}.pdv-type-product strong{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.pdv-link{appearance:none;cursor:pointer;background:none;border:0;color:#cdb9ff;font-size:12px;font-weight:650;padding:8px 0 0}
.pdv-muted{margin:0;color:#8f8b9c;font-size:11px;line-height:1.5}
.pdv-type-items{display:flex;flex-wrap:wrap;gap:6px}.pdv-type-items span{background:#19171f;border:1px solid #2c2935;border-radius:8px;padding:5px 9px;font-size:12px;color:#d6d0e2}
@media(max-width:1100px){.pdv-type-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.pdv-type-columns{grid-template-columns:1fr}}
@media(max-width:610px){.pdv-type-strip,.pdv-type-report{padding:13px}.pdv-type-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.pdv-type-kpi:first-child{grid-column:1/-1}.pdv-type-product{grid-template-columns:16px minmax(0,1fr) 46px 86px}.pdv-bar{display:none}.pdv-type-chips{grid-template-columns:repeat(2,minmax(0,1fr))}}
