/* Sale entry: a clear hierarchy, compact controls and distinct editable lists. */
html:root #app #page .sale-editor .sale-editor-core-fields { grid-template-columns:minmax(180px,240px) minmax(0,1fr); align-items:end; gap:18px 20px; }
html:root #app #page .sale-editor .sale-editor-core-fields:not(:has(.sale-editor-status-field))>.field:has([data-bind="seller_id"]) { grid-column:1/-1; }
html:root #app #page .sale-editor .sale-editor-date .date-format-hint { display:none; }
html:root #app #page .sale-editor .sale-editor-date .calendar-date-input { display:flex; align-items:center; min-width:0; }
html:root #app #page .sale-editor .sale-editor-date .calendar-date-input input { width:100%; padding-right:44px; }
html:root #app #page .sale-editor .sale-wholesale-editor { justify-self:start; display:inline-flex; align-items:center; gap:10px; align-self:end; min-height:44px; margin:0; padding:9px 14px; background:var(--ds-surface-alt); border:1px solid var(--ds-line); border-radius:12px; }
html:root #app #page .sale-editor .sale-wholesale-editor input { width:18px; height:18px; margin:0; flex:none; accent-color:var(--ds-accent); }
html:root #app #page .sale-editor .editor-create-customer { background:var(--ds-accent-soft); border-color:color-mix(in srgb,var(--ds-accent) 35%,var(--ds-line)); color:var(--ds-accent); box-shadow:0 2px 6px #00000008; }
html:root #app #page .sale-editor .editor-create-customer .icon { width:23px; height:23px; }
html:root #app #page .sale-editor .editor-add-button { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:44px; padding:6px 14px 6px 7px; border-radius:12px; background:var(--ds-accent-soft); color:var(--ds-accent); border:1px solid color-mix(in srgb,var(--ds-accent) 30%,var(--ds-line)); font-weight:700; font-size:13px; }
html:root #app #page .sale-editor .editor-add-symbol { display:grid; place-items:center; width:30px; height:30px; border-radius:8px; background:var(--ds-surface); box-shadow:0 1px 3px #0000000a; }
html:root #app #page .sale-editor .editor-add-symbol .icon { width:21px; height:21px; }
html:root #app #page .sale-editor .sale-product-list { gap:16px; }
html:root #app #page .sale-editor .sale-product-item { border-radius:16px; border:1px solid var(--ds-line); box-shadow:0 3px 10px #00000007; overflow:visible; }
html:root #app #page .sale-editor .sale-product-summary { min-height:62px; padding:14px 18px; border-radius:15px; background:color-mix(in srgb,var(--ds-surface-alt) 65%,var(--ds-surface)); grid-template-columns:32px minmax(0,1fr) auto 20px; gap:12px; }
html:root #app #page .sale-editor .sale-product-item[open] { border-color:color-mix(in srgb,var(--ds-accent) 36%,var(--ds-line)); box-shadow:0 0 0 1px color-mix(in srgb,var(--ds-accent) 8%,transparent); }
html:root #app #page .sale-editor .sale-product-item[open]>.sale-product-summary { border-radius:15px 15px 0 0; }
html:root #app #page .sale-editor .sale-product-number { display:grid; place-items:center; width:30px; height:30px; border-radius:9px; background:var(--ds-accent-soft); color:var(--ds-accent); font-weight:700; }
html:root #app #page .sale-editor .sale-product-item>.panel-body { padding:18px; }
html:root #app #page .sale-editor .item-mode-switch { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 18px; padding:4px; width:fit-content; max-width:100%; background:var(--ds-surface-alt); border:1px solid var(--ds-line); border-radius:12px; }
html:root #app #page .sale-editor .item-mode-switch button { min-height:38px; padding:7px 12px; background:transparent; border:1px solid transparent; border-radius:8px; color:var(--ds-muted); font-size:12px; }
html:root #app #page .sale-editor .item-mode-switch button[aria-pressed="true"] { background:var(--ds-surface); color:var(--ds-accent); border-color:var(--ds-line); box-shadow:0 1px 4px #0000000b; }
html:root #app #page .sale-editor .item-description { margin-bottom:12px; }
html:root #app #page .sale-editor .item-description .avulso-field { margin:0; }
html:root #app #page .sale-editor .payment-kind-pix { --payment-color:#087f8c; --payment-soft:#e8f7f5; }
html:root #app #page .sale-editor .payment-kind-cash { --payment-color:#237a50; --payment-soft:#ecf7ef; }
html:root #app #page .sale-editor .payment-kind-card { --payment-color:#6951bf; --payment-soft:#f0edfb; }
html:root #app #page .sale-editor .payment-kind-trade_in { --payment-color:#9c6716; --payment-soft:#fff4df; }
html[data-theme="dark"]:root #app #page .sale-editor .payment-kind-pix { --payment-color:#77d6d0; --payment-soft:#173a3c; }
html[data-theme="dark"]:root #app #page .sale-editor .payment-kind-cash { --payment-color:#89d5ac; --payment-soft:#19372b; }
html[data-theme="dark"]:root #app #page .sale-editor .payment-kind-card { --payment-color:#b5a5ff; --payment-soft:#30294c; }
html[data-theme="dark"]:root #app #page .sale-editor .payment-kind-trade_in { --payment-color:#efc476; --payment-soft:#3e3321; }
html:root #app #page .sale-editor .payment-kind-symbol { display:grid; place-items:center; width:32px; height:32px; flex:none; border-radius:10px; color:var(--payment-color,var(--ds-accent)); background:var(--payment-soft,var(--ds-accent-soft)); }
html:root #app #page .sale-editor .payment-kind-symbol .icon { width:20px; height:20px; }
html:root #app #page .sale-editor .payment-method-heading { display:flex; gap:10px; align-items:center; padding-bottom:16px; margin-bottom:16px; border-bottom:1px solid var(--ds-line); }
html:root #app #page .sale-editor .payment-method-heading small { margin-left:auto; color:var(--ds-muted); font-size:11px; }
html:root #app #page .sale-editor .editor-payment-equation { margin:18px 0 0; padding:16px; }
html:root #app #page .sale-editor .editor-payment-equation>strong { display:block; margin-bottom:10px; font-size:14px; }
html:root #app #page .sale-editor .editor-payment-equation>div { display:flex; flex-wrap:wrap; align-items:center; gap:12px 18px; }
html:root #app #page .sale-editor .editor-payment-equation span { font-size:11px; }
html:root #app #page .sale-editor .editor-payment-equation b { display:block; margin-top:3px; font-size:16px; font-variant-numeric:tabular-nums; }
html:root #app #page .sale-editor .editor-optional-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
html:root #app #page .sale-editor .editor-optional-block { min-width:0; border:1px solid var(--ds-line); border-radius:14px; background:var(--ds-surface); }
html:root #app #page .sale-editor .editor-reveal { display:flex; text-align:left; justify-content:flex-start; white-space:normal; width:100%; min-height:76px; padding:14px; gap:12px; border:0; border-radius:14px; background:var(--ds-surface-alt); color:var(--ds-text); }
html:root #app #page .sale-editor .editor-reveal-icon { width:40px; height:40px; display:grid; place-items:center; flex:none; border-radius:12px; color:var(--ds-accent); background:var(--ds-accent-soft); }
html:root #app #page .sale-editor .editor-reveal>span:nth-child(2) { flex:1; font-size:14px; }
html:root #app #page .sale-editor .editor-reveal small { display:block; color:var(--ds-muted); font-size:11px; font-weight:400; margin-top:4px; }
html:root #app #page .sale-editor .editor-reveal[aria-expanded="true"] { border-radius:14px 14px 0 0; }
html:root #app #page .sale-editor .editor-reveal[aria-expanded="true"]>.icon { transform:rotate(180deg); }
html:root #app #page .sale-editor .editor-reveal-body { padding:16px; border-top:1px solid var(--ds-line); }
html:root #app #page .sale-editor .editor-reveal-body[hidden] { display:none; }
html:root #app #page .sale-editor .editor-reveal-body .expense-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(95px,.6fr) 36px; gap:10px; margin-bottom:14px; padding:12px 0; }
html:root #app #page .sale-editor .editor-reveal-body .expense-row .payment-rate { grid-column:1; }
html:root #app #page .sale-editor .editor-reveal-body .expense-row .payment-value { grid-column:2; }
html:root #app #page .sale-editor .editor-reveal-body .expense-row .delete { grid-column:3; grid-row:1; align-self:end; }
html:root #app #page .sale-editor .flow-navigation { border-radius:16px; box-shadow:0 4px 16px #00000005; padding:14px; gap:12px; }
html:root #app #page .sale-editor .flow-navigation button { border-radius:11px; min-height:44px; font-weight:650; }
html:root #app #page .sale-editor .flow-navigation .flow-next { box-shadow:0 3px 8px color-mix(in srgb,var(--ds-accent) 20%,transparent); }
html:root #app #page .sale-editor .flow-navigation .flow-skip { border:1px dashed var(--ds-line); }
html:root #app #page .sale-editor .summary-review-people { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; padding:16px 0; margin:0 0 14px; border-bottom:1px solid var(--ds-line); }
html:root #app #page .sale-editor .summary-review-people small { display:block; font-size:11px; color:var(--ds-muted); margin-bottom:5px; }
html:root #app #page .sale-editor .summary-review-people strong { font-size:13px; overflow-wrap:anywhere; }
html:root #app #page .sale-editor :is(.summary-review-products,.summary-private-finance,.summary-review-note) { margin:16px 0; padding:16px; border:1px solid var(--ds-line); border-radius:12px; background:var(--ds-surface); }
html:root #app #page .sale-editor :is(.summary-review-products,.summary-private-finance,.summary-review-note) h3 { display:flex; align-items:center; gap:8px; font-size:13px; margin:0; }
html:root #app #page .sale-editor .summary-review-item { display:flex; align-items:start; justify-content:space-between; gap:14px; padding:14px 0; border-bottom:1px solid var(--ds-line); }
html:root #app #page .sale-editor .summary-review-item:last-child { padding-bottom:0; border-bottom:0; }
html:root #app #page .sale-editor .summary-review-item>div { min-width:0; flex:1; }
html:root #app #page .sale-editor .summary-review-item>strong { flex:none; font-variant-numeric:tabular-nums; }
html:root #app #page .sale-editor .summary-review-item small { display:block; margin-top:5px; font-size:12px; color:var(--ds-muted); white-space:pre-wrap; overflow-wrap:anywhere; }
html:root #app #page .sale-editor :is(.summary-review-item,.summary-review-note) p { font-size:12px; white-space:pre-wrap; overflow-wrap:anywhere; margin-top:8px; }
html:root #app #page .sale-editor .summary-private-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
html:root #app #page .sale-editor .summary-private-heading h3 { flex:1; min-width:0; }
html:root #app #page .sale-editor .summary-finance-disclosure { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:40px; padding:6px 0; border:0; background:transparent; color:var(--ds-text); font:inherit; text-align:left; white-space:normal; }
html:root #app #page .sale-editor .summary-finance-disclosure .icon { flex:none; color:var(--ds-accent); }
html:root #app #page .sale-editor .summary-finance-disclosure[aria-expanded="true"] .icon { transform:rotate(180deg); }
html:root #app #page .sale-editor .summary-finance-disclosure:focus-visible { outline:2px solid var(--ds-accent); outline-offset:4px; }
html:root #app #page .sale-editor .summary-private-content[hidden] { display:none; }
html:root #app #page .sale-editor .summary-finance-toggle { width:40px; min-height:40px; padding:8px; color:var(--ds-accent); }
html:root #app #page .sale-editor .summary-payment-row { align-items:start; }
html:root #app #page .sale-editor .summary-payment-row>div { flex:1; min-width:0; overflow-wrap:anywhere; }
html:root #app #page .sale-editor .summary-payment-row>strong { flex:none; }
html:root #app #page .sale-editor .summary-expense-list { padding:4px 10px; border-left:2px solid var(--ds-line); font-size:12px; }
html:root #app #page .sale-editor .summary-expense-list>div { display:flex; justify-content:space-between; gap:12px; padding:7px 0; }
@media(max-width:800px){
 html:root #app #page .sale-editor .editor-optional-grid { grid-template-columns:1fr; }
}
@media(max-width:600px){
 html:root #app #page .sale-editor .sale-editor-core-fields { grid-template-columns:minmax(0,1fr) auto!important; gap:14px 10px!important; }
 html:root #app #page .sale-editor .sale-wholesale-editor { padding:8px 10px; max-width:none; }
 html:root #app #page .sale-editor .sale-product-item>.panel-body { padding:14px; }
 html:root #app #page .sale-editor .sale-product-summary { padding:12px; grid-template-columns:28px minmax(0,1fr) 18px; gap:6px 9px; }
 html:root #app #page .sale-editor .sale-product-summary .sale-product-amount { grid-column:2; font-size:12px; }
 html:root #app #page .sale-editor .sale-product-summary .sale-product-chevron { grid-column:3; grid-row:1/3; }
 html:root #app #page .sale-editor .sale-product-summary :is(.sale-product-number,.payment-kind-symbol) { grid-row:1/3; width:28px; height:30px; }
 html:root #app #page .sale-editor .item-mode-switch { width:100%; }
 html:root #app #page .sale-editor .item-mode-switch button { flex:1; padding:7px; white-space:normal; }
 html:root #app #page .sale-editor .payment-method-heading small { max-width:100px; text-align:right; }
 html:root #app #page .sale-editor .editor-payment-equation>div { gap:8px 10px; }
 html:root #app #page .sale-editor .editor-payment-equation b { font-size:14px; }
 html:root #app #page .sale-editor .summary-review-people { grid-template-columns:1fr 1fr; }
 html:root #app #page .sale-editor .summary-review-people>div:first-child { grid-column:1/-1; }
 html:root #app #page .sale-editor :is(.summary-review-products,.summary-private-finance,.summary-review-note) { padding:12px; }
 html:root #app #page .sale-editor .summary-private-finance .row-stat { gap:14px; align-items:start; }
 html:root #app #page .sale-editor .summary-private-finance .row-stat strong { text-align:right; max-width:55%; }
}
