.sale-list-row { grid-template-columns: minmax(170px,1.4fr) 80px 125px minmax(130px,1fr) minmax(145px,1fr) minmax(200px,auto); }
.sale-toolbar { display:flex; gap:12px; align-items:end; margin-bottom:18px; flex-wrap:wrap; }
.sale-toolbar label:first-child { flex:1; min-width:220px; }
.sale-toolbar select { min-width:190px; }
.sale-method { display:flex; align-items:center; gap:8px; }
.sale-status { display:flex; direction:rtl; align-items:center; gap:6px; flex-wrap:nowrap; }
.sale-step-button { border:1px solid #e5d7f2; background:#f5effb; color:#70449b; border-radius:7px; min-width:34px; height:25px; padding:0 5px; font-size:10px; line-height:1; white-space:nowrap; cursor:pointer; }
.sale-badge { padding:4px 8px; }
.sale-status-pending_payment { color:#946515; background:#fff4d8; }
.sale-status-pending_approval { color:#80552a; background:#fff0df; }
.sale-status-approved { color:#4269a0; background:#eaf2ff; }
.sale-status-preparing { color:#66429a; background:#f0e9fb; }
.sale-status-handed_to_courier { color:#286d88; background:#e6f5fa; }
.sale-status-completed { color:#287650; background:#e7f6ec; }
.sale-status-returned { color:#9a6320; background:#fff1df; }
.sale-status-rejected { color:#aa3549; background:#fdecef; }
.sale-loader { text-align:center; color:#8d8495; padding:18px; }
.sale-summary { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:15px; background:#f7f2fb; border-radius:12px; margin:16px 0; color:#6345a0; }
.sale-form-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.sale-help { color:#8d8495; font-size:12px; }
.sale-addresses,.sale-source-cards { display:flex; flex-direction:column; gap:5px; width:100%; }
.sale-address-card,.sale-source-card { display:flex; flex-wrap:wrap; align-items:center; gap:3px 12px; width:100%; text-align:right; border:1px solid #e8e0ee; border-radius:8px; background:#fff; padding:6px 9px; color:#554a60; font:inherit; font-size:10px; }
.sale-address-card span,.sale-source-card span { display:inline-flex; align-items:center; color:#776e81; white-space:nowrap; }
.sale-source-card .sale-source-stock { gap:4px; color:#476d55; background:#edf7f0; border-radius:6px; padding:3px 7px; }
.sale-source-stock b { font-size:12px; font-weight:800; color:#22643b; }
.sale-address-card span:nth-child(6) { flex-basis:100%; }
.sale-address-card b { color:#53445f; }
.sale-address-card:hover,.sale-source-card:hover { border-color:#b99ad0; background:#fcf9ff; }
.sale-address-card.is-selected,.sale-source-card.is-selected { border-color:#8057c4; background:#f6effd; box-shadow:0 0 0 2px #8057c426; }
.sale-source-wrap { margin-top:8px; }
.sale-customer-field{position:relative;min-width:0}.sale-customer-field select{padding-left:52px}.sale-add-customer{position:absolute;left:5px;bottom:5px;width:34px;height:34px;border-radius:8px;background:#f1eafb;color:#7650aa;font-size:24px;line-height:1}.sale-add-customer:hover{background:#e6d8f5}.sale-customer-dialog{width:min(460px,92vw);direction:rtl}.sale-customer-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.sale-customer-dialog-head h2{margin:0}.sale-customer-dialog-head button{font-size:24px;line-height:1;background:#f4eff8;border-radius:8px;padding:4px 10px}.sale-customer-fields{display:grid;gap:14px}.sale-customer-error{color:#b42318;font-size:12px}.sale-customer-error:empty{display:none}.sale-customer-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.sale-last-purchase-price { color:#7650aa; font-size:12px; font-weight:700; }
.sale-last-purchase-price[hidden] { display:none; }
.sale-source-auto { align-self:flex-start; }
.sale-source-quantity { display:inline-flex; align-items:center; gap:6px; margin-right:auto; color:#65468a; font-weight:700; }
.sale-source-quantity input { width:72px; min-width:0; padding:5px 7px; border:1px solid #d9c9e8; border-radius:7px; font:inherit; font-size:13px; }
.sale-choice { display:flex; gap:18px; min-height:42px; align-items:center; }
.sale-choice label { display:flex; align-items:center; gap:6px; }
.sale-costs .purchase-grid { grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px; }
.sale-costs .purchase-field { font-size:11px; gap:4px; }
.sale-costs .purchase-field input[type=number] { min-height:34px; padding:5px 8px; }
.sale-costs .sale-choice { min-height:34px; gap:10px; }
.sale-costs .sale-summary { padding:9px; margin:10px 0; font-size:12px; }
.sale-compact-page .purchase-detail-top { margin-bottom:8px; padding:10px 12px; }
.sale-compact-page .purchase-detail-top .purchase-back { margin-bottom:6px; }
.sale-compact-page .purchase-detail-heading h1 { margin:3px 0; font-size:17px; }
.sale-compact-page .purchase-manage-section { margin:8px 0; padding:12px; }
.sale-compact-page .purchase-manage-title { gap:8px; margin-bottom:8px; }
.sale-compact-page .purchase-manage-title h2 { font-size:13px; }
.sale-compact-page .purchase-grid { grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr)); gap:8px; }
.sale-compact-page .purchase-field { gap:4px; font-size:11px; }
.sale-compact-page .purchase-field input:not([type=radio]),
.sale-compact-page .purchase-field select,
.sale-compact-page .purchase-field textarea { min-height:34px; padding:5px 8px; border-radius:7px; }
.sale-compact-page .purchase-field textarea { min-height:52px; }
.sale-compact-page .purchase-item { padding:9px; margin:8px 0; }
.sale-compact-page .purchase-item-head { margin-bottom:7px; font-size:12px; }
.sale-compact-page .button-primary,
.sale-compact-page .button-secondary { padding:6px 10px; font-size:11px; }
.sale-compact-page .sale-source-wrap { margin-top:6px; }
.sale-compact-page .sale-address-card span,
.sale-compact-page .sale-source-card span { white-space:normal; }
.sale-compact-page .products-panel { padding:12px; margin-bottom:8px; }
.sale-compact-page .sale-toolbar { gap:8px; margin-bottom:10px; }
.sale-compact-page .sale-list-row { gap:8px; padding:8px 10px; }
.sale-compact-page .product-row.sale-list-row { min-height:54px; font-size:11px; }
.sale-compact-page .sale-list-row .purchase-actions { gap:5px; }
.sale-compact-page .sale-loader { padding:10px; }
[data-customer-details][hidden], [data-address-field][hidden] { display:none; }
@media(max-width:1000px) { .sale-list-row { grid-template-columns:repeat(3,minmax(120px,1fr)); } .sale-list-labels { display:none; } }
@media(max-width:670px) { .sale-list-row { grid-template-columns:repeat(2,minmax(0,1fr)); } .sale-list-row .purchase-actions { grid-column:1/-1; } }
.sale-success-dialog { width: min(390px, 92%); text-align: center; }
.sale-success-dialog h2 { margin: 12px 0 20px; }
.sale-success-actions { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:10px; }
.sale-success-actions .button-primary { min-width: 150px; }
.sale-success-print { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.sale-quick-dialog { width: min(680px, 94vw); max-height: min(88vh, 850px); padding: 24px; border: 1px solid #e4d9ed; background: #fff; }
.sale-quick-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.sale-quick-header h2 { margin: 1px 0; font-size: 20px; color: #3c2251; }
.sale-quick-kicker { color: #8c62a9; font-size: 11px; font-weight: 700; }
.sale-quick-date { color: #8a8090; font-size: 11px; }
.sale-quick-close { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: #f5f1f8; color: #6e5a79; font-size: 23px; line-height: 1; }
.sale-quick-hero { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 18px; border-radius: 15px; background: linear-gradient(110deg, #eee3fa, #faf6fd); }
.sale-quick-hero > div:first-child { display: grid; gap: 2px; }
.sale-quick-hero span, .sale-quick-hero small { font-size: 11px; color: #766581; }
.sale-quick-hero strong { color: #543077; font-size: 25px; line-height: 1.5; }
.sale-quick-hero strong small { font-size: 11px; }
.sale-quick-status { display: grid; justify-items: end; gap: 8px; }
.sale-quick-status-row { display:flex; align-items:center; gap:6px; }
.sale-quick-error { color:#b42318 !important; max-width:220px; text-align:left; }
.sale-quick-status .sale-badge { font-size: 11px; }
.sale-quick-customer { display: flex; align-items: center; gap: 10px; margin: 15px 0; padding: 4px; }
.sale-quick-customer-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; color: #8053ae; background: #f3ebfa; font-size: 24px; }
.sale-quick-customer > div, .sale-quick-method > div:last-child { display: grid; min-width: 0; gap: 2px; }
.sale-quick-customer small, .sale-quick-method small, .sale-quick-product-name small { color: #928597; font-size: 11px; }
.sale-quick-customer strong, .sale-quick-method strong, .sale-quick-product-name strong { font-size: 12px; overflow-wrap: anywhere; }
.sale-quick-phone { margin-right: auto; color: #776c80; font-size: 12px; }
.sale-quick-address { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #ede7f1; border-radius: 12px; background: #fdfbfe; }
.sale-quick-address small { color: #928597; font-size: 11px; }
.sale-quick-address p { margin: 4px 0 0; color: #51475b; font-size: 12px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.sale-quick-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sale-quick-method { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 1px solid #ede7f1; border-radius: 12px; background: #fdfbfe; }
.sale-quick-method-image, .sale-quick-product-image { display: grid; place-items: center; overflow: hidden; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 10px; background: #f5eff8; color: #936cb1; }
.sale-quick-method-image img, .sale-quick-product-image img { width: 100%; height: 100%; object-fit: contain; }
.sale-quick-section-title { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 8px; }
.sale-quick-section-title h3 { margin: 0; font-size: 14px; }
.sale-quick-section-title span { color: #8c7e95; font-size: 11px; }
.sale-quick-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #f0ebf3; }
.sale-quick-product-name { display: grid; gap: 4px; flex: 1; min-width: 0; }
.sale-quick-item > b { white-space: nowrap; color: #51366c; font-size: 12px; }
.sale-quick-item > b small { color: #8b7c94; font-size: 10px; }
.sale-quick-totals { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 10px; padding: 12px; border-radius: 10px; background: #f8f6fa; color: #82758b; font-size: 11px; }
.sale-quick-totals b { display: block; color: #51475b; }
@media(max-width: 500px) { .sale-quick-dialog { padding: 17px; } .sale-quick-hero strong { font-size: 20px; } .sale-quick-methods { grid-template-columns: 1fr; } .sale-quick-phone { font-size: 10px; } }
.sale-success-icon { width: 56px; height: 56px; display: grid; place-items: center; margin: auto; border-radius: 50%; background: #e7f5ed; color: #26735a; font-size: 28px; font-weight: 700; }
