/* Shared finishing layer for the current sales pages only. */
.content>.sw-page{width:100%;max-width:none;min-width:0;flex:1 1 100%;align-self:stretch}
.sw-page>[data-results],.sw-page>.page-card{width:100%;min-width:0}
.sw-invoice-ledger{width:100%;min-width:0}
.sw-page .sw-invoice-entry{grid-template-columns:minmax(135px,1fr) minmax(160px,1.3fr) minmax(120px,1fr) minmax(140px,1fr);gap:18px}
.sw-invoice-entry .sw-row-actions{grid-column:1/-1;justify-content:flex-start;border-top:1px solid #e2e8f0;padding-top:14px}
.sw-page .sw-warning-badge{display:inline-flex;align-items:center;color:#b42318;background:#fff1f0;border:1px solid #f1b4ae;font-size:12px;white-space:normal;padding:6px 9px;border-radius:8px;cursor:help}
.sw-price-warning>[role=tooltip]{display:none!important}
.sw-floating-warning{position:fixed!important;z-index:2147483647!important;inset:auto;max-height:45vh;overflow:auto;background:#7a2419;color:white;border:1px solid #efb5ac;border-radius:12px;padding:12px 16px;font:13px/1.9 Tahoma,sans-serif;direction:rtl;text-align:right;white-space:pre-line;box-shadow:0 10px 30px #0003;pointer-events:none}
.sw-page .sw-guarantor-choice{grid-column:1/-1;flex-direction:row;align-items:center;padding:12px 16px;border:1px solid #dce5ec;border-radius:10px;background:#f7fafb}
.sw-guarantor-choice input[type=checkbox]{width:20px;height:20px;margin:0}
.sw-page label[hidden]{display:none!important}
.sw-page input[readonly]{background:#f3f6f8;color:#43576a}
.sw-birth-calendar{grid-column:1/-1;max-width:480px;width:100%;z-index:40;position:relative}
.sw-calendar-head{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.sw-calendar-head label{flex:1;min-width:95px}
.sw-calendar-head [data-calendar-close]{align-self:center;min-width:70px}
.sc-derived{display:flex;flex-direction:column;justify-content:center;gap:8px;padding:12px;background:#edf5f3;border:1px solid #c9ded8;border-radius:10px}
.sw-review-document{border:1px solid #dce5ec;border-radius:16px;background:white;overflow:hidden}
.sw-review-document>h3,.sw-review-document>.sw-totals,.sw-review-document>.sw-error,.sw-review-document>.sc-review-guarantees{margin:20px}
.sw-review-document .sw-review-customer{padding:22px;background:#f4f8fa;border-bottom:2px solid #176b67;gap:10px 24px}
.sw-review-customer strong{flex-basis:100%;font-size:18px;color:#12384a}
.sw-review-lines{width:100%;border-collapse:collapse}
.sw-review-lines td,.sw-review-lines th{padding:16px 14px;vertical-align:top;border-bottom:1px solid #e1e9ef}
.sw-review-lines .sw-group-label{width:74px;text-align:center;vertical-align:middle;background:#eff6f4;color:#175d58;font-size:13px;border-left:1px solid #dce5ec}
.sw-review-lines .sw-review-amount{white-space:nowrap;direction:ltr;text-align:left;font-weight:700;font-variant-numeric:tabular-nums}
.sw-review-lines .sw-line-description{display:block;white-space:normal;line-height:1.9;margin-top:6px;max-width:650px;color:#53687b}
.sw-review-document .sw-financial-table{font-size:13px}
@media(max-width:800px){.sw-page .sw-invoice-entry{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.sw-review-lines td,.sw-review-lines th{padding:10px 8px}.sw-review-lines .sw-group-label{width:50px}.sw-review-document .sw-review-customer{padding:16px}.sw-invoice-entry .sw-row-actions button{flex:1 1 130px}}
@media(max-width:420px){.sw-page .sw-invoice-entry{grid-template-columns:minmax(0,1fr)}.sw-review-lines{font-size:12px}.sw-review-document>h3,.sw-review-document>.sw-totals{margin:12px}}

/* Invoice review: structured product rows, with the price separated from facts. */
.sw-page [data-guarantor-panel][hidden]{display:none!important}
.sw-guarantor-panel{grid-column:1/-1;padding:20px;border:1px solid #bbd9d8;border-radius:14px;background:#f5faf9;min-width:0}
.sw-guarantor-panel h3{margin:0;color:#174d50;font-size:16px}
.sw-guarantor-panel p{margin:7px 0 18px;color:#566c7d;line-height:1.9;font-size:13px}
.sw-review-document .sw-review-group{margin:24px;min-width:0}
.sw-review-group-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px;color:#193f51}
.sw-review-eyebrow{font-size:11px;color:#668292;letter-spacing:.02em}
.sw-review-group-head h3{margin:4px 0;font-size:18px;display:flex;align-items:center;gap:10px}
.sw-review-group-head h3>span{background:#eef4f6;border-radius:20px;padding:4px 10px;font-size:11px;font-weight:500;color:#486878}
.sw-review-subtotal{display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.sw-review-subtotal>small,.sw-review-group-head b small{font-size:11px;color:#657c89;font-weight:400}
.sw-review-products{display:grid;gap:14px}
.sw-review-product{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,190px);border:1px solid #dbe6ec;border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 4px 14px #163d4a06}
.sw-review-product-body{padding:20px;min-width:0}
.sw-review-product-body>header{display:flex;gap:12px;align-items:flex-start}
.sw-review-line-no{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-width:30px;height:30px;border-radius:9px;background:#eef4f7;color:#587585;font-size:12px;font-weight:600}
.sw-review-product h4{margin:2px 0 8px;color:#16394b;font-size:16px;line-height:1.6;overflow-wrap:anywhere}
.sw-review-condition{display:inline-block;font-size:11px;font-weight:600;padding:3px 9px;color:#1c6a54;background:#e8f5ee;border-radius:6px}
.sw-review-condition.is-used{background:#fff4e5;color:#99600c}
.sw-review-serials{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.sw-review-serials>span{display:flex;align-items:center;gap:9px;padding:6px 10px;background:#f4f7fa;border:1px solid #e3eaf0;border-radius:7px;max-width:100%;flex-wrap:wrap}
.sw-review-serials small{font-size:10px;color:#6c7f8f}
.sw-review-serials b{font-size:12px;color:#305a73;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.sw-review-serials .is-missing{font-size:11px;line-height:1.8;color:#8b5b13;background:#fff8eb;border-color:#f0dfb9}
.sw-review-specs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 20px;margin:0}
.sw-review-specs>div{min-width:0}
.sw-review-specs dt{font-size:11px;color:#748794;margin-bottom:4px}
.sw-review-specs dd{margin:0;font-size:12px;color:#304c5c;line-height:1.9;overflow-wrap:anywhere;white-space:pre-line}
.sw-review-contract{margin-top:16px;padding-top:14px;border-top:1px dashed #dbe6eb}
.sw-review-contract h5{font-size:11px;color:#3c6c74;font-weight:600;margin:0 0 12px}
.sw-review-product-note{font-size:12px;line-height:1.9;margin:14px 0 0;color:#4e6777;white-space:pre-line;overflow-wrap:anywhere}
.sw-review-product-price{border-inline-start:1px solid #e0e9ed;background:#f4f9f9;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;padding:22px 14px;min-width:0;text-align:center}
.sw-review-product-price small{font-size:12px;color:#69838d}
.sw-review-product-price strong{font-size:20px;line-height:1.6;color:#135b63;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.sw-review-product-price>span{font-size:11px;color:#61808a}
.sw-review-service-group{border:1px solid #e0e8ed;border-radius:14px;padding:18px;background:#fcfdfe}
.sw-review-service{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid #e7edf1;font-size:13px}
.sw-review-service>strong{flex:1;min-width:0;overflow-wrap:anywhere;font-weight:500;color:#2e4f60}
.sw-review-service>span:last-child{color:#245b64;white-space:nowrap;font-variant-numeric:tabular-nums}
.sc-independent-fee{padding:12px 14px;margin:0;border-radius:9px;border:1px solid #cfe2df;background:#f1f8f5;color:#306458;font-size:12px;line-height:1.9}
.sc-default-amount{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;color:#597482;font-size:12px}
.sc-default-amount button{padding:7px 12px;font-size:12px}
.sc-review-guarantees p{line-height:2;overflow-wrap:anywhere}
@media(max-width:900px){.sw-review-specs{grid-template-columns:repeat(2,minmax(0,1fr))}.sw-review-product{grid-template-columns:minmax(0,1fr) 160px}.sw-review-product-price strong{font-size:18px}}
@media(max-width:600px){
 .sw-review-document .sw-review-group{margin:14px}.sw-review-group-head{align-items:flex-start;gap:10px;flex-wrap:wrap}.sw-review-group-head h3{font-size:16px}.sw-review-subtotal b{font-size:13px}
 .sw-review-product{grid-template-columns:minmax(0,1fr)}.sw-review-product-body{padding:16px}.sw-review-product h4{font-size:15px}
 .sw-review-product-price{border-inline-start:0;border-top:1px solid #e0e9ed;flex-direction:row;justify-content:flex-start;padding:13px 16px;gap:7px}.sw-review-product-price small{margin-inline-end:auto}.sw-review-product-price strong{font-size:20px}
 .sw-review-specs{gap:12px}.sw-review-service-group{padding:14px}.sw-review-service{flex-wrap:wrap}.sw-review-service>span:last-child{margin-inline-start:auto}.sw-guarantor-panel{padding:15px}
}
/* Flow refinement: scoped to sales, print settings and user permissions. */
.sw-page [hidden]{display:none!important}
.sx-payment-modes{display:flex;gap:8px;background:var(--surface-muted,#f0f5f7);padding:7px;border-radius:16px;max-width:440px}
.sx-payment-modes button{flex:1;min-height:48px;border:1px solid transparent!important;background:transparent!important;color:var(--text,#173a48)!important}
.sx-payment-modes button[aria-pressed=true]{background:#155d65!important;color:#fff!important;box-shadow:0 3px 8px #1233}
.sx-invoice-date,.sx-customer-result{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:12px 0}
.sx-customer-result{width:100%;padding:16px;border:1px solid #cbdfe1;border-radius:14px;background:var(--surface-muted,#f2f9f8)}
.sx-invoice-date button{margin-inline-start:auto}
.sx-dialog{font-family:inherit;color:var(--text,#193441);background:var(--surface,#fff);border:1px solid #c5d6dc;border-radius:20px;padding:22px;width:min(680px,calc(100vw - 28px));max-height:85dvh;overflow:auto;box-shadow:0 24px 80px #102a4355}
.sx-dialog::backdrop{background:#102a4377;backdrop-filter:blur(3px)}
.sx-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.sx-dialog h2{font-size:18px;margin:0}.sx-dialog button,.sx-dialog select{font:inherit;min-height:40px;border:1px solid #ccdce1;border-radius:10px;padding:6px 12px;cursor:pointer}
.sx-calendar{max-width:390px}.sx-calendar-select{display:flex;gap:12px;margin-bottom:14px}.sx-calendar-select select{width:50%}.sx-calendar .sw-calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.sx-calendar .sw-calendar-grid button{padding:5px;min-width:0}.sx-calendar .sw-calendar-grid button:hover{background:#155d65;color:white}
.sx-passport{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px;margin:12px 0}
.sx-passport>div{background:var(--surface-muted,#f2f6f8);padding:10px;border-radius:9px;min-width:0}.sx-passport dt{font-size:11px;color:var(--muted,#567)}.sx-passport dd{margin:4px 0 0;overflow-wrap:anywhere;font-weight:600}
.sw-page .sw-item-card{position:relative;padding-inline-start:42px!important;overflow:visible;margin-block:14px;border:1px solid #d8e2e7;border-radius:16px}
.sx-condition{position:absolute;inset-inline-start:0;top:0;bottom:0;width:30px;display:flex;align-items:center;justify-content:center;writing-mode:vertical-rl;background:#163e50;color:#fff;border-start-start-radius:15px;border-end-start-radius:15px;font-size:11px;letter-spacing:.5px}
.sw-page .sw-item-main{display:grid!important;grid-template-columns:28px minmax(140px,1fr) minmax(160px,220px) 28px auto;align-items:center;gap:12px}
.sw-page .sw-item-main>[data-remove]{position:static!important;transform:none!important;margin:0!important;color:#a13f36;background:#fff3f1;border:1px solid #edcac5;min-height:38px}
.sx-product-title{font:inherit!important;font-weight:700!important;text-align:start!important;border:0!important;padding:0!important;background:none!important;color:inherit!important;min-height:0!important}.sx-product-title:hover{text-decoration:underline}
.sw-page .sc-details{margin-top:10px;border-top:1px solid #e0e8eb;padding-top:10px}.sw-page .sc-details>summary{cursor:pointer;padding:8px 0;font-size:13px}.sw-page .sc-details .sw-grid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px}
.sx-accessories{border:1px solid #d7e2e6;border-radius:12px;padding:12px}.sx-accessories>div,.sx-print-flags{display:flex;gap:12px;flex-wrap:wrap}.sx-accessories>div label,.sx-print-flags label{display:flex!important;align-items:center;gap:7px;background:var(--surface-muted,#f1f6f7);padding:8px 12px;border-radius:8px}.sx-accessories input[type=checkbox],.sx-print-flags input,.sx-permission-group input{width:18px!important;height:18px!important;min-height:18px!important;flex:none}
.sw-page .sw-bill-totals{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border:1px solid #d0dee4;border-radius:14px;overflow:hidden;margin:18px 0}
.sw-page .sw-bill-totals>div{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 18px;border-bottom:1px solid #e3eaee;background:var(--surface,#fff);min-width:0}.sw-page .sw-bill-totals b{white-space:nowrap;font-variant-numeric:tabular-nums;font-size:14px}.sw-page .sw-bill-totals>div:last-child{grid-column:1/-1;background:#163e50!important;color:#fff!important;font-weight:700}.sw-page .sw-credit-card{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sw-page .sw-credit-card>div{padding:16px;border:1px solid #d7e2e6;border-radius:12px}.sw-page .sw-credit-card strong,.sw-page .sw-credit-card span{display:block;margin-top:5px}.sw-page .sw-branch-quota{padding:18px;border-radius:14px;display:grid;gap:8px;font-size:13px;line-height:1.8}
.sx-guarantee-receipts article{padding:18px;border:1px solid #d6e1e6;border-radius:14px;margin-block:12px;display:flex;flex-wrap:wrap;gap:12px;align-items:end}.sx-guarantee-receipts article>header,.sx-guarantee-receipts article>p{flex-basis:100%;display:flex;justify-content:space-between;margin:0}.sx-guarantee-receipts label{flex:1;min-width:180px}
.sx-permission-group{border:1px solid #d4e1e6;border-radius:12px;padding:12px;align-self:start}.sx-permission-group>summary{cursor:pointer}.sx-permission-group label{display:inline-flex!important;align-items:center;gap:8px}.sx-permission-group>div{display:grid;gap:12px;padding:16px 12px 4px}.sx-permission-group>div label{font-size:12px}.sx-permission-group[open]{background:var(--surface-muted,#f5f8fa)}
@media(max-width:700px){.sw-page .sw-item-main{grid-template-columns:24px minmax(0,1fr) auto}.sw-page .sw-item-main>label{grid-column:1/3;grid-row:2}.sw-page .sw-item-main>[data-remove]{grid-column:3;grid-row:1}.sw-page .sw-bill-totals{grid-template-columns:1fr}.sw-page .sw-bill-totals>div{padding:12px}.sw-page .sw-credit-card{grid-template-columns:1fr}.sw-page .sc-details .sw-grid{grid-template-columns:1fr}.sx-customer-result>*{flex-basis:100%}.sx-dialog{padding:16px}.sx-passport{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Editor17: fixed row areas keep actions visible, independent of optional warnings. */
.sw-page [data-editor] .sw-item-main{grid-template-columns:30px minmax(0,1fr) minmax(150px,220px) 28px auto!important;grid-template-areas:"number identity price warning remove";min-width:0}
.sw-page [data-editor] .sw-item-main>.sw-line-number{grid-area:number}
.sw-page [data-editor] .sw-item-main>div{grid-area:identity;min-width:0;overflow-wrap:anywhere}
.sw-page [data-editor] .sw-item-main>label{grid-area:price;width:100%;min-width:0}
.sw-page [data-editor] .sw-item-main>.sw-price-warning{grid-area:warning}
.sw-page [data-editor] .sw-item-main>.sw-remove-line{grid-area:remove;position:static!important;white-space:nowrap;min-width:82px;min-height:44px}
.sw-page [data-editor] .sw-item-main input{width:100%;min-width:0;box-sizing:border-box}
.sw-page [data-editor] .sw-item-card{min-width:0;box-sizing:border-box}
.sw-page [data-editor] .sw-steps{scrollbar-width:thin}
.sw-page [data-editor]>section[hidden]{display:none!important}
@media(max-width:760px){
 .sw-page [data-editor] .sw-item-main{grid-template-columns:26px minmax(0,1fr) auto!important;grid-template-areas:"number identity remove" "price price warning";gap:12px}
 .sw-page [data-editor] .sc-details .sw-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:440px){.sw-page [data-editor] .sc-details .sw-grid{grid-template-columns:minmax(0,1fr)}.sw-page [data-editor] .sw-item-main>.sw-remove-line{min-width:72px;padding:8px}}
