/* Shared, accessible POS column boundaries. Desktop only; existing mobile stack is retained. */
@media (min-width: 901px) {
  html .pos-selling-shell.pos-retail .pos-layout {
    display: grid !important;
    grid-template-columns: minmax(0, var(--split-category, 225px)) 8px minmax(0, 1fr) 8px minmax(0, var(--split-cart, 410px)) !important;
    gap: 0 !important;
    width: 100%;
    min-width: 0;
    align-items: stretch;
  }
  /* Never expose a five-track grid unless both matching separators exist. */
  html .pos-selling-shell .pos-layout:not(:has(> .pos-column-divider[data-split="cart"])) {
    grid-template-columns: minmax(140px, 225px) minmax(0, 1fr) minmax(330px, 410px) !important;
  }
  html .pos-selling-shell .pos-layout:has(> .pos-column-divider) > .pos-category-rail { grid-column: 1; grid-row: 1; }
  html .pos-selling-shell .pos-layout:has(> .pos-column-divider) > .pos-column-divider[data-split="category"] { grid-column: 2; grid-row: 1; }
  html .pos-selling-shell .pos-layout:has(> .pos-column-divider) > .pos-products { grid-column: 3; grid-row: 1; }
  html .pos-selling-shell .pos-layout:has(> .pos-column-divider) > .pos-column-divider[data-split="cart"] { grid-column: 4; grid-row: 1; }
  html .pos-selling-shell .pos-layout:has(> .pos-column-divider) > .cart { grid-column: 5; grid-row: 1; }
  html .pos-selling-shell .pos-layout > .pos-category-rail,
  html .pos-selling-shell .pos-layout > .pos-products,
  html .pos-selling-shell .pos-layout > .cart {
    position: relative !important;
    inset: auto !important;
    width: auto !important;
    max-width: none !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0;
    margin: 0 !important;
    transform: none !important;
  }
  html .pos-selling-shell .pos-layout > .pos-column-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 8;
    align-self: stretch;
    width: 8px;
    min-width: 8px;
    min-height: 100%;
    padding: 0;
    border: 0;
    cursor: col-resize;
    touch-action: none;
    background: var(--pos-split-bg, #dfe8f0);
    color: var(--pos-split-grip, #8195a9);
    user-select: none;
  }
  html .pos-selling-shell .pos-column-divider::after {
    content: '';
    display: block;
    position: sticky;
    top: 45%;
    width: 3px;
    height: 46px;
    border-radius: 4px;
    background: currentColor;
    box-shadow: 0 0 0 2px var(--pos-split-bg, #dfe8f0);
  }
  html .pos-selling-shell .pos-column-divider:hover,
  html .pos-selling-shell .pos-column-divider:focus-visible {
    background: var(--pos-split-hover, #bad0e4);
    color: var(--pos-split-active, #285fbd);
    outline: 2px solid var(--pos-split-active, #285fbd);
    outline-offset: -2px;
  }
  html .pos-selling-shell .pos-rail-resizer,
  html .pos-selling-shell .pos-cart-resizer,
  html .pos-selling-shell .pos-window-editor { display: none !important; }
  html .pos-selling-shell .pos-products { container-type: inline-size; }
  @container (max-width: 610px) {
    html .pos-selling-shell.pos-retail .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  }
  @container (max-width: 435px) {
    html .pos-selling-shell.pos-retail .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  }
}
@media (max-width: 900px) {
  html .pos-selling-shell .pos-column-divider { display: none !important; }
}
html[data-ui-style="midnight"] .pos-selling-shell {
  --pos-split-bg: #0f3447;
  --pos-split-grip: #7ba8be;
  --pos-split-hover: #17485f;
  --pos-split-active: #70dcea;
}
/* The desktop mockup must not force its midnight colors onto the light theme. */
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) {
  --pos-split-bg: #dfe8f0;
  --pos-split-grip: #7f94a8;
  --pos-split-hover: #bfd4e8;
  --pos-split-active: #2464ca;
  background: #f3f7fb;
  color: #263c4b;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-topbar {
  background: #ffffff !important;
  border-color: #dce5ee !important;
  color: #213848;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-brand,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-brand strong,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-brand-cluster h1 {
  color: #173449 !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-brand small,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-user-name {
  color: #597385 !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-header-search {
  background: #f6f9fc !important;
  border-color: #ccdbe7 !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-header-search input,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-header-search > svg {
  color: #254354 !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-header-search input::placeholder { color: #657e91 !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-table-controls,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-tools-trigger {
  background: #eef4f9 !important;
  border-color: #cedde9 !important;
  color: #23465b !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-table-controls .pos-table-list-action,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-table-controls .pos-active-table { color: #244759 !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-table-controls .pos-active-table { border-left-color: #adc0cf !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-tools-menu {
  background: #ffffff !important;
  border-color: #cbd9e4 !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-tools-menu-row,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-tools-menu .held-orders-trigger,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-tools-menu [data-action="logout"] {
  color: #254353 !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-tools-menu .customer-picker-trigger {
  background: #f4f8fc !important;
  border-color: #cbd9e4 !important;
  color: #254353 !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-category-rail {
  background: #ffffff !important;
  border-right-color: #dce6ee !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-category {
  background: #f4f8fc !important;
  border-color: #dfebf4 !important;
  color: #2b4a5f !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-category.active {
  background: #e6f1fe !important;
  border-color: #80b5ed !important;
  color: #165fba !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-category-count {
  background: #e5edf4 !important;
  border-color: #d8e4ee !important;
  color: #506e83 !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-products { background: #f1f6fa !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .product-card { border-color: #c7d8e5 !important; }
/* Retain a dark image-caption gradient in both themes so product names remain readable. */
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart {
  background: #f7fafc !important;
  border-left-color: #dce6ef !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-heading,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-body {
  background: #ffffff !important;
  border-color: #d8e4ee !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-kicker,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-heading small,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-line strong {
  color: #193c51 !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-line small { color: #658195 !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-line { border-color: #e0eaf1 !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-line-controls .qty { border-color: #c4d6e4 !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-line-controls .qty button,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-line-controls .qty span {
  background: #eef4f9 !important;
  color: #23485e !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-line-controls .qty span { background: #ffffff !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-remove,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-line::before { color: #55768c !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-note {
  background: #f6f9fc !important;
  border-color: #cfdeeb !important;
  color: #23485e !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-note::placeholder { color: #6d8596 !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .cart-line-total { color: #1662bb !important; }
/* Keep product cards square when a divider changes the available column width. */
@media (min-width: 901px) {
  html .pos-selling-shell .products-grid { grid-auto-rows: auto !important; }
  html .pos-selling-shell .product-card { aspect-ratio: 1 / 1 !important; height: auto !important; }
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-layout { background: #f3f7fb !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-category svg { color: #3b637a !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-category.active svg { color: #165fba !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-clear-cart { background: #fff2f3 !important; color: #ae283b !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .product-cover,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .product-card { background: #e6eef5 !important; }
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-quick-actions .held-orders-trigger { background: #edf4fa !important; border-color: #cbdde9 !important; color: #25475b !important; }

/* 2026-09-24: compact invoice rows, quick table switcher and hidden product scrollbar. */
@media (min-width: 901px) {
  html .pos-selling-shell:not(.pos-edit-active) .pos-topbar {
    height: 68px !important;
    min-height: 68px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .pos-content.pos-selling {
    height: calc(100dvh - 68px) !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .pos-header-search {
    height: 44px !important;
    min-height: 44px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .pos-header-search input {
    height: 42px !important;
    min-height: 42px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart {
    padding: 8px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-heading {
    min-height: 76px !important;
    padding: 10px 14px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-kicker {
    margin-bottom: 2px !important;
    font-size: 22px !important;
    line-height: 1.05;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-heading small {
    display: block;
    margin-top: 3px;
    font-size: 16px !important;
    line-height: 1.1;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-heading .pos-save-order,
  html .pos-selling-shell:not(.pos-edit-active) .cart-heading [data-action="saveTable"] {
    min-width: 106px !important;
    min-height: 44px !important;
    padding: 8px 12px !important;
    border-radius: 9px !important;
    font-size: 15px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-body {
    padding: 0 12px 8px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-body > .customer-picker {
    margin: 6px 0 !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .customer-picker-trigger {
    min-height: 36px !important;
    height: 36px;
    padding: 6px 10px !important;
    font-size: 13px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .customer-picker-chevron {
    font-size: 16px;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-line {
    grid-template-columns: minmax(0, 1fr) auto !important;
    column-gap: 8px !important;
    padding: 12px 0 10px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-line-main {
    min-height: 52px !important;
    gap: 10px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-thumb {
    width: 48px !important;
    height: 50px !important;
    flex-basis: 48px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-item-content {
    padding: 1px 116px 0 0 !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-line strong {
    font-size: 15px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-line small {
    font-size: 13px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-line-total {
    position: absolute;
    top: 17px;
    right: 0;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    color: #409dfb;
    font-size: 18px !important;
    white-space: nowrap;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-line-total > b {
    font-size: inherit !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-line-qty {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-line-qty .qty {
    height: 36px !important;
    border-radius: 9px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-line-qty .qty button,
  html .pos-selling-shell:not(.pos-edit-active) .cart-line-qty .qty span {
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 3px !important;
    font-size: 18px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-note {
    grid-column: 1 !important;
    min-height: 36px !important;
    height: 36px;
    padding: 6px 8px 6px 40px !important;
    font-size: 14px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-line::before {
    bottom: 17px !important;
    left: 13px !important;
    font-size: 20px !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .cart-remove {
    display: none !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .products-grid {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  html .pos-selling-shell:not(.pos-edit-active) .products-grid::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  html .pos-selling-shell:not(.pos-edit-active) .product-card {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .product-cover {
    width: 100% !important;
    height: 100% !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .pos-table-controls {
    position: relative;
    overflow: visible !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-menu {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 21050;
    display: grid;
    gap: 4px;
    width: max-content;
    min-width: 210px;
    max-width: 280px;
    max-height: 330px;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid #2d5b73;
    border-radius: 10px;
    background: #08283a;
    box-shadow: 0 14px 32px rgba(0,0,0,.28);
  }
  html .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-menu[hidden] {
    display: none !important;
  }
  html .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 38px;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #f5f9fc;
    text-align: left;
  }
  html .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-option:hover,
  html .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-option:focus-visible {
    background: #12435a;
    outline: 2px solid #6bb8e8;
    outline-offset: -2px;
  }
  html .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-option span {
    font-weight: 700;
  }
  html .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-option small,
  html .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-empty {
    color: #a9c0cd;
    font-size: 12px;
  }
  html .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-empty {
    padding: 8px 10px;
  }
  html .pos-selling-shell:not(.pos-edit-active) .pos-active-table[aria-expanded="true"] .pos-down-chevron {
    transform: rotate(180deg);
  }
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-menu {
  border-color: #cbd9e4 !important;
  background: #ffffff !important;
  box-shadow: 0 12px 28px rgba(30,65,90,.16);
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-option {
  color: #244759 !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-option:hover,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-option:focus-visible {
  background: #edf5fb !important;
}
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-option small,
html:not([data-ui-style="midnight"]) .pos-selling-shell:not(.pos-edit-active) .pos-quick-table-empty {
  color: #6f8798 !important;
}

/* Keep product cards square at every responsive size and hide the visual scrollbar without disabling scrolling. */
html .pos-selling-shell:not(.pos-edit-active) .products-grid {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html .pos-selling-shell:not(.pos-edit-active) .products-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
html .pos-selling-shell:not(.pos-edit-active) .product-card {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
}
html .pos-selling-shell:not(.pos-edit-active) .product-cover {
  width: 100% !important;
  height: 100% !important;
}
html .pos-selling-shell:not(.pos-edit-active) .cart-remove {
  display: none !important;
}
