.sales-pos, .sl-master-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(350px, 1fr);
  gap: 16px;
  align-items: start;
}
.sl-customers, .sl-exchanges { grid-template-columns: minmax(0, .89fr) minmax(0, 1fr); }
.sl-order-page { grid-template-columns: minmax(0, 1.31fr) minmax(0, 1fr); }
.sales-catalog, .sales-checkout, .sl-master-detail>.panel, .sl-history { padding: clamp(17px, 1.65vw, 26px); }
.sales-catalog .panel-head p { margin-top: 6px; font-size: .91rem; }
.sales-pos h2, .sl-master-detail h2, .sl-history h2 { font-size: 1.23rem; }
.sales-pos h3, .sl-master-detail h3 { font-size: 1.04rem; }
.sales-catalog { min-height: min(680px, 73vh); }
.sl-search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 9px;
  padding: 0 12px;
  color: var(--muted);
}
.sl-search:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.sl-search input { min-width: 0; width: 100%; border: 0; outline: 0; padding: 11px 0; color: var(--ink); background: transparent; }
.sl-search input:focus-visible { outline: 0; }
.sl-search .icon { width: 18px; }
.sl-prod-head, .sales-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(66px, .32fr) minmax(52px, .25fr) 32px;
  align-items: center;
  column-gap: 8px;
  text-align: left;
}
.sl-prod-head, .sl-order-header, .sl-orders-heading {
  margin-top: 17px;
  color: var(--muted);
  font-size: .82rem;
  background: #f5f7fb;
  border-radius: 6px;
  padding: 9px 12px;
}
.sales-product, .sl-client-row, .sl-order-row, .sl-replace-row {
  width: 100%;
  color: var(--ink);
  border: none;
  border-bottom: 1px solid var(--line);
  background: white;
  font-size: .94rem;
  text-align: left;
}
.sales-product { min-height: 83px; padding: 12px; }
.sales-product:not(:disabled):hover, .sl-client-row:hover, .sl-order-row:hover, .sl-replace-row:hover { background: #f6f9ff; }
.sales-product:disabled { opacity: .6; cursor: default; }
.sl-item, .sl-person, .sl-row-title, .sl-address-title {
  display: flex; align-items: center; gap: 12px; min-width: 0;
}
.sl-prod-icon, .sl-avatar {
  flex: none; width: 44px; height: 44px; border-radius: 11px;
  display: grid; place-items: center; font-size: 1.12rem; font-weight: 650;
}
.sl-tone-0 { color: #4e70b2; background: #e9effe; }
.sl-tone-1 { color: #5a76a8; background: #eaf0fa; }
.sl-tone-2 { color: #7060a1; background: #efebfa; }
.sl-tone-3 { color: #915e7e; background: #f6ecf2; }
.sl-tone-4 { color: #40796b; background: #e9f4f0; }
.sl-item-title { min-width: 0; }
.sl-item-title b, .sl-cart-title b, .sl-client-row b, .sl-replace-row b, .sl-order-row b { display: block; overflow-wrap: anywhere; }
.sl-item-title small, .sl-cart-title small, .sl-client-row small, .sl-person small, .sl-replace-row small, .sl-receipt-item small, .sl-order-row small, .sl-sale-reference small {
  display: block; color: var(--muted); font-size: .82rem; margin-top: 3px;
}
.sl-stock { color: var(--muted); }
.sl-plus {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--blue-tint,#eaf1ff); color: var(--brand);
}
.sl-plus svg.icon { width: 17px; }
.sl-price, .sl-stock, .sales-totals, .sl-pay-due, .sl-summary, .sl-stock-after, .sales-order-info dd, .sl-order-row strong { font-variant-numeric: tabular-nums; }
.sl-count { margin: 16px 0 0; color: var(--muted); font-size: .86rem; }
.sales-checkout .panel-head { margin: 0 0 12px; }
.sales-checkout .stack .panel-head { margin: 0; }
.sales-cart-item, .sl-cart-controls, .sl-stepper, .sl-unit-price, .sales-client, .sales-address-top, .sl-pay-due, .sl-section-head, .sl-exchange-actions, .sales-receipt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sales-cart-item { border-radius: 10px; background: #f5f7fb; padding: 13px 10px; flex-wrap: wrap; }
.sales-cart-item+.sales-cart-item { margin-top: 6px; }
.sl-cart-title { min-width: 0; flex: 1 1 105px; font-size: .91rem; }
.sl-cart-controls { justify-content: flex-end; gap: 5px; }
.sl-unit-price, .sl-stepper { gap: 0; height: 36px; background: white; border: 1px solid var(--line); border-radius: 7px; padding: 0 4px; }
.sl-unit-price span { color: var(--muted); font-size: .78rem; }
.sl-unit-price input, .sl-stepper input { height: 31px; appearance: textfield; -moz-appearance: textfield; background: none; border: 0; padding: 3px; width: 5.2em; font-size: .86rem; }
.sl-stepper input { width: 2.6em; text-align: center; }
.sl-unit-price input::-webkit-inner-spin-button, .sl-stepper input::-webkit-inner-spin-button { appearance: none; }
.sl-stepper button, .sl-remove { display: grid; place-items: center; background: transparent; border: 0; padding: 2px; min-width: 20px; height: 30px; color: var(--muted); }
.sl-remove { min-width: 24px; }
.sl-stepper .icon, .sl-remove .icon { width: 13px; height: 13px; }
.sales-section { margin: 20px 0 16px; }
.sales-checkout [data-client] .stack, .sales-checkout .stack { gap: 12px; }
.sales-client { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; flex-wrap: wrap; }
.sales-client .muted { font-size: .86rem; }
.sales-client-option { width: 100%; text-align: left; background: white; border: 0; border-bottom: 1px solid var(--line); padding: 11px; }
.sales-client-option:hover { background: var(--blue-tint,#eaf1ff); }
[data-client-options]:not([hidden]) { border: 1px solid var(--line); border-radius: 8px; max-height: 210px; overflow-y: auto; }
.sales-ship, .sales-address-block, .sales-draft-address, .sl-address-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: white;
}
.sales-ship, .sl-address-card.is-default { background: #f2f7ff; border-color: #bfd4fc; }
.sales-ship .actions, .sales-address-block .form-grid { margin-top: 8px; }
.sales-ship .actions .btn { min-height: 28px; padding: 3px 8px; background: white; }
.sales-draft-address .btn { margin-top: 10px; }
.sales-address-top input { width: auto; }
.sales-wrap, .sl-receipt-body, .sl-address-card, .sl-order-link { overflow-wrap: anywhere; }
.sl-choices { margin: 0; padding: 0; border: 0; min-width: 0; }
.sl-shipping-fields { margin: 0; padding: 0; border: 0; min-width: 0; }
.sl-choices legend { color: var(--muted); font-size: .88rem; font-weight: 550; padding: 0; margin: 0 0 6px; }
.sl-choices>div, .sl-pair { display: grid; grid-auto-columns: minmax(0,1fr); grid-auto-flow: column; gap: 8px; }
.sl-choices>div { display: flex; flex-wrap: wrap; }
.sl-choices label { flex: 1 1 72px; max-width: 145px; position: relative; cursor: pointer; }
.sl-choices input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sl-choices label span {
  display: flex; align-items: center; justify-content: space-between; gap: 2px; min-height: 38px;
  padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); font-size: .89rem;
}
.sl-choices input:checked+span { color: #2054a4; background: var(--blue-tint,#eaf1ff); border-color: #a3c1f6; }
.sl-choices input:focus-visible+span { outline: 2px solid var(--brand); outline-offset: 2px; }
.sl-choices .icon { visibility: hidden; width: 15px; height: 15px; }
.sl-choices input:checked+span .icon { visibility: visible; }
.sl-pair .field, .sales-checkout .field { min-width: 0; font-size: .86rem; }
.sl-note { color: var(--muted); font-size: .84rem; }
.sl-note summary { cursor: pointer; }
.sl-note input { margin-top: 6px; width: 100%; }
.sales-totals { display: grid; grid-template-columns: 1fr auto; gap: 7px; border-top: 1px solid var(--line); padding: 16px 0 7px; color: var(--muted); font-size: .9rem; }
.sales-totals b { text-align: right; color: var(--ink); }
.sl-pay-due { margin: 5px 0 12px; }
.sl-pay-due b, .sales-receipt strong { display: block; font-size: 1.8rem; color: var(--brand); letter-spacing: -.03em; }
.sales-pay { width: 100%; }
.sl-pay-due small { display: block; color: var(--muted); margin-top: 2px; }
.sl-recent-customers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sl-recent-customers small { color: var(--muted); }
.sl-client-list, .sl-order-rows { max-height: min(70vh, 760px); overflow-y: auto; }
.sl-client-list { margin-top: 16px; }
.sl-client-row, .sl-replace-row { display: flex; align-items: center; gap: 15px; padding: 13px 12px; min-height: 77px; }
.sl-client-row[aria-pressed=true], .sl-replace-row[aria-pressed=true], .sl-order-row[aria-pressed=true] { background: #edf4ff; color: #1c55b6; }
.sl-client-row[aria-pressed=true], .sl-replace-row[aria-pressed=true] { border-radius: 8px; }
.sl-client-row .sl-end, .sl-address-title button, .sl-replace-row strong { margin-left: auto; white-space: nowrap; }
.sl-person { min-width: 0; }
.sl-person h2 { overflow-wrap: anywhere; }
.sl-client-detail>.panel-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.sl-section-head { margin: 18px 0 12px; }
.sl-address-title { flex-wrap: wrap; gap: 7px; }
.sl-address-title .icon, .sl-receipt-shipping .icon { color: var(--brand); width: 17px; height: 17px; }
.sl-address-title button, .sl-receipt-shipping h3 { display: flex; align-items: center; gap: 5px; }
.sl-address-card p { margin-top: 7px; font-size: .9rem; }
.sl-order-link { font: inherit; border: 0; padding: 0; background: none; color: var(--brand); text-align: left; }
.sales-filters { display: grid; grid-template-columns: 1fr 1fr 1.3fr .9fr auto; align-items: end; gap: 12px; margin-bottom: 16px; }
.sales-filters .field { min-width: 0; }
.sl-order-header, .sl-order-row { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,.72fr) minmax(0,.72fr) minmax(0,.68fr); align-items: center; gap: 12px; }
.sl-order-row { min-height: 76px; padding: 13px 12px; }
.sl-order-row span, .sl-order-row strong { overflow-wrap: anywhere; }
.sl-order-header span:last-child, .sl-order-row strong { text-align: right; }
.sl-order-row b, .sl-replace-row b { font-size: .87rem; }
.sl-order-page .sl-order-rows { margin-bottom: 10px; }
.sl-summary { font-size: .83rem; color: var(--muted); }
.sl-summary b { color: var(--ink); margin-left: 4px; font-size: 1.06rem; }
.sl-receipt-body { display: grid; gap: 15px; min-width: 0; }
.sl-receipt-body .panel-head { margin: 0; }
.sl-positive { display: inline-flex; color: #176745; background: #e6f5ee; border-radius: 6px; font-size: .82rem; padding: 3px 9px; }
.sl-reference, .sl-hint, .sl-sale-reference small { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.sales-receipt { margin: 0; border-radius: 10px; background: #eef5ff; padding: 15px; }
.sales-receipt span, .sales-receipt small { font-size: .87rem; }
.sl-receipt-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sl-receipt-item strong { flex-shrink: 0; }
.sales-order-info { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px 10px; margin: 0; padding: 12px 0; border-block: 1px solid var(--line); font-size: .91rem; }
.sales-order-info dt { color: var(--muted); }
.sales-order-info dd { margin: 0; text-align: right; }
.sl-receipt-shipping p { margin: 7px 0 0; font-size: .91rem; }
.sl-orders-heading, .sl-sale-reference { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.sl-replace-row strong { flex-shrink: 0; }
.sl-sale-reference { border-radius: 9px; background: #f5f7fb; padding: 14px; }
.sl-sale-reference b { display: block; margin-top: 4px; overflow-wrap: anywhere; font-size: .91rem; }
.sl-stock-after { padding: 9px 0; font-size: 1.04rem; }
.sl-exchange-form .sl-section-head { margin: 0; }
.sl-exchange-form .sl-hint { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.sl-exchange-actions { flex-wrap: wrap; font-size: .85rem; }
.sl-history { margin-top: 16px; }
.sales-error { margin: 7px 0; color: #9b283a; background: #fff1f3; border-radius: 8px; padding: 9px; }
.sales-clipboard { position: fixed; left: -9999px; }
@media (max-width:1190px) {
  .sales-pos { grid-template-columns: minmax(0,1.15fr) minmax(330px,1fr); }
  .sl-prod-head,.sales-product { grid-template-columns: minmax(0,1fr) 63px 53px 27px; padding-inline: 7px; gap: 5px; }
  .sl-item { gap: 6px; }.sl-prod-icon { width: 33px; height: 36px; }
  .sales-filters { grid-template-columns: repeat(4,minmax(0,1fr)); }.sales-filters .actions { grid-column: 1/-1; justify-content: flex-end; }
}
@media (min-width:681px) and (max-width:990px) {
  .sales-pos { grid-template-columns: minmax(0,1fr) minmax(300px,.94fr); }
  .sl-order-page,.sl-exchanges,.sl-customers { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .sales-catalog, .sales-checkout, .sl-master-detail>.panel { padding: 13px; }
  .sl-prod-icon { display: none; }
  .sl-client-row { gap: 8px; padding-inline: 6px; }.sl-client-row .sl-avatar { width: 32px;height: 32px; }
  .sl-order-row,.sl-order-header { gap: 5px; font-size: .81rem; }
}
@media (max-width:680px) {
  .sales-pos,.sl-master-detail { display: grid; grid-template-columns: minmax(0, 1fr); }
  .sales-pos { padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
  .sales-catalog { min-height: 0; }
  .sl-pay-bar { position: fixed; inset: auto 0 0; z-index: 11; padding: 13px 18px calc(14px + env(safe-area-inset-bottom)); background: white; border-top: 1px solid var(--line); }
  .sl-pay-due { margin: 0 0 6px; }.sl-pay-due b { font-size: 1.4rem; }.sl-pay-bar .btn { min-height: 44px; }
  .sales-checkout:has(.sales-error:not([hidden])) { padding-bottom: 22px; }
  .sl-prod-head { display: none; }
  .sales-product { grid-template-columns: minmax(0,1fr) auto 34px; grid-template-areas: "item item add" "price stock add"; gap: 4px; padding: 14px 3px; }
  .sl-item { grid-area: item; gap: 10px; }
  .sl-prod-icon { width: 38px; height: 38px; }
  .sl-plus { grid-area: add; width: 34px; height: 34px; }
  .sl-price { grid-area: price; padding-left: 48px; color: var(--brand); }
  .sl-stock { grid-area: stock; font-size: .82rem; }
  .sales-products { margin-top: 8px; max-height: 32vh; overflow-y: auto; }
  .sales-cart-item { align-items: flex-start; }
  .sl-cart-title { flex-basis: 100%; }.sl-cart-controls { justify-content: space-between; width: 100%; }
  .sl-unit-price,.sl-stepper { height: 39px; }.sl-stepper button,.sl-remove { min-width: 27px; min-height: 34px; }
  .sales-filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; padding: 14px; }
  .sl-master-detail>section { scroll-margin-top: 14px; }
  .sl-profile,.sl-address-top,.sales-client,.sl-exchange-actions { flex-wrap: wrap; }
  .sl-client-list, .sl-order-rows { max-height: 48vh; }
  .sl-order-header,.sl-order-row { gap: 6px; padding-inline: 7px; font-size: .81rem; }
  .sl-order-row b { font-size: .8rem; }
  .sl-pay-bar:focus-within { position: fixed; }
}
@media (max-width:680px) {
  .workspace[data-page=pos]>.page-head {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .sales-checkout.panel { background: none; border: 0; box-shadow: none; padding: 0; }
  .sl-cart-block, .sl-customer-section, .sl-delivery-section { padding: 15px; background: white; border: 1px solid var(--line); border-radius: 14px; }
  .sl-customer-section, .sl-delivery-section { margin: 12px 0; }
  .sales-checkout .sales-totals { margin: 0 7px; }
  .sl-pay-bar .sales-pay { min-height: 44px; }
}
.sl-ship-top { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; color: #2054a4; }
.sl-ship-top > .icon, .sl-ship-top button .icon { width: 15px; height: 15px; }
.sl-ship-top .sl-address-picker { max-width: 65%; flex: 1; height: 30px; padding: 2px 22px 2px 2px; background-color: transparent; border: 0; color: #2054a4; font-weight: 600; text-overflow: ellipsis; font-size: .89rem; }
.sl-ship-top b { flex: 1; font-size: .9rem; }
.sl-ship-top button { display: inline-flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; }
.sales-ship .sales-wrap { font-size: .87rem; }
