/* El catÃ¡logo reutiliza las tarjetas originales en todos los tamaÃ±os.
   La distribuciÃ³n de cuentas y orden activa cambia desde 1100px. */
#tab-pos .pos-desktop-account-filters,
#tab-pos .pos-desktop-active-order,
#tab-pos .pos-desktop-zone-title { display: none; }

body.app-redesign[data-active-tab="pos"] #tab-pos #cartItemsList .pos-mobile-order-mode {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  margin: 0 0 .45rem;
  padding: .55rem .65rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: .76rem;
  font-weight: 750;
}

body.app-redesign[data-active-tab="pos"] #tab-pos #cartItemsList .pos-mobile-order-mode [role="group"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  padding: .16rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
}

body.app-redesign[data-active-tab="pos"] #tab-pos #cartItemsList .pos-mobile-order-mode button {
  min-width: 0;
  min-height: 2.75rem;
  padding: .4rem .5rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--color-text-secondary);
  font: inherit;
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}

body.app-redesign[data-active-tab="pos"] #tab-pos #cartItemsList .pos-mobile-order-mode button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--color-primary) 16%, var(--color-surface-raised));
  color: var(--color-text-primary);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 48%, transparent);
}

body.app-redesign[data-active-tab="pos"] #tab-pos #cartItemsList .pos-mobile-order-mode button:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-takeout-mode-confirm { display: flex; flex-direction: column; align-items: center; gap: 0; grid-column: 1 / -1; padding: .4rem; border: 1px solid color-mix(in srgb, #d79b40 35%, var(--color-border)); border-radius: 8px; color: var(--color-text-secondary); text-align: center; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-takeout-mode-confirm-title { color: var(--color-text-primary); font-size: 14px; font-weight: 600; line-height: 1.25; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-takeout-mode-confirm-description { margin-top: 6px; color: var(--color-text-secondary); font-size: 12.5px; line-height: 1.3; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-takeout-mode-confirm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-takeout-mode-confirm button { display: inline-flex; min-height: 2rem; align-items: center; justify-content: center; padding: .3rem .65rem; border: 1px solid var(--color-border); border-radius: 7px; background: var(--color-surface); color: var(--color-text-primary); font: inherit; font-size: .72rem; font-weight: 650; cursor: pointer; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-takeout-mode-confirm button.is-remove { border-color: color-mix(in srgb, #d66b62 38%, var(--color-border)); background: color-mix(in srgb, #d66b62 9%, var(--color-surface)); color: color-mix(in srgb, #d66b62 82%, var(--color-text-primary)); }

body.app-redesign[data-active-tab="pos"] #tab-pos .cart-order-summary-row {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  padding: .16rem 0;
  color: var(--color-text-muted);
  font-size: .76rem;
  font-weight: 650;
}

body.app-redesign[data-active-tab="pos"] #tab-pos .cart-order-summary-row strong { color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
body.app-redesign[data-active-tab="pos"] #tab-pos .cart-order-summary-grand { align-items: baseline; margin-top: .15rem; padding-top: .4rem; border-top: 1px solid var(--color-border); color: var(--color-text-primary); font-size: .86rem; font-weight: 850; }
body.app-redesign[data-active-tab="pos"] #tab-pos .cart-order-total-grand { color: var(--color-primary); font-size: 1.1rem; font-weight: 900; }
body.app-redesign[data-active-tab="pos"] #tab-pos .cart-order-total-pending { color: var(--color-primary); font-size: 1rem; font-weight: 900; }
body.app-redesign[data-active-tab="pos"] #tab-pos .cart-order-total-pending span { color: var(--color-text-muted); font-size: .7rem; font-weight: 650; }
body.app-redesign[data-active-tab="pos"] #tab-pos .cart-order-paid { margin: .15rem 0; color: #34d399; font-size: .72rem; font-weight: 800; }

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-category-filters button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 2.75rem;
  height: auto;
  max-height: none;
  padding: .3rem .55rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font: inherit;
  font-size: .7rem;
  font-weight: 750;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  cursor: pointer;
}

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-category-filters button.active {
  border-color: color-mix(in srgb, var(--color-primary) 55%, var(--color-border));
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
  color: var(--color-text-primary);
}

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 .75rem;
  color: var(--color-text-muted);
  font-size: .75rem;
}

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-toolbar { margin-bottom: .55rem; }

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-toolbar label {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
  min-width: 0;
  min-height: 2.5rem;
  padding: 0 .75rem;
  border: 1px solid var(--color-border);
  border-radius: 11px;
  background: var(--color-surface);
  color: var(--color-text-muted);
}

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-toolbar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--color-text-primary);
  font: inherit;
}

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-category-filters {
  display: flex;
  flex: 0 0 auto;
  gap: .35rem;
  padding: .2rem 0 .55rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
  gap: .5rem;
  min-width: 0;
}

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-grid {
  flex: 0 0 auto;
  align-content: start;
  min-height: 0;
  height: auto;
  max-height: none;
  padding: 0;
  overflow: visible;
}

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-welcome {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 100%;
  padding: 2rem;
  border: 0;
  border-radius: 0;
  color: var(--color-text-muted);
  text-align: center;
}

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-welcome > span { font-size: 2rem; }

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-welcome h2 { margin: .7rem 0 .25rem; color: var(--color-text-primary); font-size: 1.1rem; }

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-welcome p { max-width: 19rem; margin: 0; font-size: .82rem; line-height: 1.5; }

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-empty { grid-column: 1 / -1; color: var(--color-text-muted); font-size: .8rem; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-welcome { margin: 0 0 .6rem; color: var(--color-text-muted); font-size: .8rem; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-grid.is-disabled .pos-sales-quick-product { opacity: .58; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-grid .account-action-product-step:disabled { cursor: not-allowed; opacity: .35; }

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-category-filters button:focus-visible,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-filters button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-heading { flex: 0 0 auto; margin: .15rem 0 .45rem; color: var(--color-text-secondary); font-size: .75rem; font-weight: 800; }

@media (min-width: 1100px) {
  html:has(body.app-redesign[data-active-tab="pos"]) {
    height: 100%;
    overflow: hidden;
  }

  body.app-redesign[data-active-tab="pos"] {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  body.app-redesign[data-active-tab="pos"] .app-header-wrapper {
    flex: 0 0 auto;
  }

  body.app-redesign[data-active-tab="pos"] .main-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    max-width: none;
    min-height: 0;
    overflow: hidden;
    padding: 1rem clamp(1rem, 1.8vw, 2rem) 1.1rem !important;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos {
    display: grid;
    grid-template-columns: minmax(245px, 24fr) minmax(0, 46fr) minmax(300px, 30fr);
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "accounts products active-order";
    align-items: stretch;
    gap: clamp(.75rem, 1.1vw, 1.25rem);
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    margin: 0;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos > .ui-pos-accounts-card {
    grid-area: accounts;
    display: flex !important;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
    padding: .2rem .1rem 0 !important;
    border: 0;
    border-right: 1px solid var(--color-border);
    border-radius: 0;
    background: transparent;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-zone-title {
    display: block;
    flex: 0 0 auto;
    margin: 0 0 .7rem;
    color: var(--color-text-primary);
    font-size: .92rem;
    font-weight: 850;
    letter-spacing: -.02em;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .account-picker-search-wrap {
    display: flex !important;
    flex: 0 0 2.5rem !important;
    width: 100% !important;
    height: 2.5rem !important;
    min-height: 2.5rem !important;
    max-height: 2.5rem !important;
    margin: 0 .8rem .6rem 0 !important;
    padding: 0 .7rem !important;
    align-items: center;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .account-picker-search {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: .35rem 0 !important;
    font-size: .76rem !important;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-filters {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: .22rem;
    margin: 0 .8rem .65rem 0;
    padding: 0 0 .1rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-filters::-webkit-scrollbar {
    display: none;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-filters button,


  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-filters button.active,


  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-filters button span {
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .open-accounts-scroll {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    max-height: none;
    padding: 0 1rem .3rem 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .open-accounts-scroll > .account-chip {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-layout {
    display: block;
    grid-area: products;
    min-width: 0;
    min-height: 0;
    height: 100%;
    margin: 0;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos #productsContainer {
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0 !important;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-sales-compact-menu {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 0 !important;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-sales-compact-products {
    display: none !important;
  }
















  body.app-redesign[data-active-tab="pos"] #tab-pos .product-clean-name { font-size: .78rem; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .product-clean-price { font-size: .8rem; }










  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-active-order {
    display: block;
    grid-area: active-order;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-left: 1px solid var(--color-border);
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-card,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-order {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding: .25rem 0 .25rem clamp(.8rem, 1vw, 1.2rem);
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--color-border);
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-eyebrow { color: var(--color-text-muted); font-size: .64rem; font-weight: 850; letter-spacing: .1em; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-heading h2,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-order h2 { margin: .25rem 0; font-size: 1.05rem; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-order-mode-badge { display: inline-flex; align-items: center; margin-left: .45rem; padding: .2rem .42rem; border: 1px solid color-mix(in srgb, var(--color-primary) 38%, var(--color-border)); border-radius: 999px; background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface)); color: var(--color-primary); font-size: .62rem; font-weight: 850; vertical-align: middle; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-heading p { margin: 0; color: var(--color-text-muted); font-size: .78rem; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-status { padding: .28rem .45rem; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); color: var(--color-text-secondary); font-size: .65rem; font-weight: 800; white-space: nowrap; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-status.service-tone-new { color: #e9b85c; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-status.service-tone-preparing { color: #98b9d5; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-status.service-tone-ready { color: #82c9a6; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-status.service-tone-payment { color: #f0a08b; }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-mode {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    min-width: 0;
    margin: .5rem 0 .35rem;
    color: var(--color-text-muted);
    font-size: .7rem;
    font-weight: 750;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-mode-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: 0 1 16rem;
    min-width: 0;
    padding: .18rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-mode-options button {
    min-width: 0;
    min-height: 2rem;
    padding: .32rem .5rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--color-text-secondary);
    font: inherit;
    font-size: .69rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-mode-options button[aria-pressed="true"] {
    background: color-mix(in srgb, var(--color-primary) 16%, var(--color-surface-raised));
    color: var(--color-text-primary);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 48%, transparent);
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-mode-options button:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items {
    display: grid;
    align-content: start;
    gap: .25rem;
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    padding: .5rem 0;
    overflow-y: auto;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-takeout-disposables {
    flex: 0 0 auto;
    min-width: 0;
    margin: 0 0 .55rem;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-takeout-packaging-picker,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-takeout-packaging-picker .pos-sales-quick-products {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    margin: 0;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-takeout-packaging-picker,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-takeout-packaging-picker .pos-sales-quick-products {
    max-height: none;
    overflow: visible;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-takeout-packaging-picker .pos-sales-quick-product {
    min-width: 0;
    min-height: 3.65rem;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    min-width: 0;
    padding: .55rem .45rem;
    border-bottom: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-copy { display: grid; gap: .16rem; min-width: 0; font-size: .77rem; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-copy b { overflow-wrap: anywhere; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-copy small { color: var(--color-text-muted); font-size: .68rem; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-controls { display: flex; flex: 0 0 auto; gap: .25rem; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-controls button { width: 1.7rem; height: 1.7rem; border: 1px solid var(--color-border); border-radius: 7px; background: var(--color-surface); color: var(--color-text-secondary); font: inherit; cursor: pointer; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-controls button:focus-visible,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-actions button:focus-visible,

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-empty { margin: auto 0; color: var(--color-text-muted); font-size: .8rem; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-totals { display: grid; flex: 0 0 auto; gap: .35rem; padding: .65rem 0; border-top: 1px solid var(--color-border); }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-totals > div { display: flex; justify-content: space-between; gap: .5rem; color: var(--color-text-muted); font-size: .74rem; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-totals strong { color: var(--color-text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-totals .pos-desktop-order-grand-total { padding-top: .35rem; color: var(--color-text-primary); font-size: .82rem; font-weight: 850; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-totals .pos-desktop-order-grand-total strong { color: var(--color-primary); font-size: 1.05rem; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-actions { display: grid; flex: 0 0 auto; gap: .45rem; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-actions button { min-height: 2.5rem; padding: .5rem .75rem; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); color: var(--color-text-secondary); font: inherit; font-size: .78rem; font-weight: 850; cursor: pointer; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-checkout.is-primary { border-color: transparent !important; background: linear-gradient(135deg, #c7473a, #9c302e) !important; color: #fff !important; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-state-action { justify-self: start; min-height: 2.1rem !important; padding: .4rem .6rem !important; background: transparent !important; font-size: .72rem !important; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-state-action:disabled { opacity: .55; cursor: not-allowed; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-checkout:disabled { opacity: .55; cursor: not-allowed; }



  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-order { justify-content: center; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-order > p { max-width: 20rem; margin: 0; color: var(--color-text-muted); font-size: .8rem; line-height: 1.5; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-new-order-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-new-order-actions button { min-height: 2.2rem; padding: .45rem .65rem; border: 1px solid var(--color-border); border-radius: 9px; background: var(--color-surface); color: var(--color-text-secondary); font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-new-order-actions button:first-child { border-color: transparent; background: linear-gradient(135deg, #ea7855, #d94f45); color: #fff; }
}

/* Shared desktop frame for the three POS columns. */
@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos {
    grid-template-columns: minmax(220px, 24fr) minmax(0, 46fr) minmax(270px, 30fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "search search search" "accounts products active-order";
    align-items: stretch;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos > .ui-pos-accounts-card,
  body.app-redesign[data-active-tab="pos"] #tab-pos #productsContainer,
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-desktop-active-order {
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
    padding: 12px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos > .ui-pos-accounts-card {
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-zone-title {
    margin: 0 0 10px;
    font-size: .92rem;
    line-height: 1.25;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .open-accounts-scroll {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 2px 2px 0;
    overflow: auto;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-layout {
    height: 100%;
    overflow: hidden;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos #productsContainer {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-sales-compact-menu,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog {
    flex: 1 1 auto;
    min-height: 0;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-category-filters {
    flex: 0 0 auto;
    margin: 0 0 8px;
    padding: 0 0 6px;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-welcome {
    min-height: 0;
    padding: 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-active-order {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-card,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-order {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    height: 100%;
    padding: 0 !important;
    overflow: hidden;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-order {
    justify-content: flex-start;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-heading {
    flex: 0 0 auto;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-heading h2 {
    margin: 3px 0 0;
    font-size: 1.05rem;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow-y: auto;
    text-align: center;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-content > p {
    margin: 0;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-new-order-actions {
    justify-content: center;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items {
    overflow-y: auto;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos.is-unified-search-active {
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "search search active-order";
  }
}

/* Listas de Orden activa: separación por espacio, sin divisores entre ítems y totales. */
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items {
  gap: .55rem;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-row {
  padding-block: 0;
  border-bottom: 0;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-totals {
  margin-top: .55rem;
  padding-top: .65rem;
  border-top: 0;
}
body.app-redesign[data-active-tab="pos"] #tab-pos #cartItemsList .cart-item {
  border-block: 0;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .cart-summary {
  margin-top: .55rem;
  border-top: 0;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .cart-order-summary-grand {
  margin-top: .55rem;
  padding-top: 0;
  border-top: 0;
}

@media (min-width: 1100px) and (max-width: 1299px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos { grid-template-columns: minmax(220px, 27fr) minmax(0, 42fr) minmax(270px, 31fr); }

}

/* Tarjetas del catÃ¡logo POS: controles laterales sin contador duplicado. */
body.app-redesign #tab-pos .pos-desktop-catalog-grid .pos-sales-quick-product {
  transition: transform .12s ease, background-color .16s ease, border-color .16s ease;
  will-change: transform;
}
body.app-redesign #tab-pos .pos-desktop-catalog-grid .pos-sales-quick-product:has(.account-action-product-step:active) {
  transform: scale(.985);
}
body.app-redesign #tab-pos .pos-desktop-catalog-grid .account-action-product-count {
  display: none !important;
}
body.app-redesign #tab-pos .pos-desktop-catalog-grid .account-action-product-step--remove {
  opacity: 0 !important;
  visibility: hidden;
  transform: translateX(-6px) scale(.88);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
body.app-redesign #tab-pos .pos-desktop-catalog-grid .pos-sales-quick-product.has-quantity .account-action-product-step--remove:not(:disabled) {
  opacity: 1 !important;
  visibility: visible;
  transform: translateX(0) scale(1);
}
body.app-redesign #tab-pos .pos-desktop-catalog-grid .account-action-product-step--add::after {
  color: var(--color-text-primary, #f7f3ec);
  opacity: .9;
  transition: transform .12s ease, opacity .12s ease;
}
body.app-redesign #tab-pos .pos-desktop-catalog-grid .account-action-product-step--add:active::after {
  transform: scale(1.18);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  body.app-redesign #tab-pos .pos-desktop-catalog-grid .pos-sales-quick-product,
  body.app-redesign #tab-pos .pos-desktop-catalog-grid .account-action-product-step--remove,
  body.app-redesign #tab-pos .pos-desktop-catalog-grid .account-action-product-step--add::after {
    transition: none !important;
  }
}

/* BÃºsqueda unificada del POS. */
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search {
  min-width: 0;
  max-width: 100%;
  padding: 0;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-field {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  min-width: 0;
  min-height: 2.7rem;
  padding: 0 .8rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-text-muted);
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-field > span { flex: 0 0 auto; font-size: 1.2rem; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-field input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 2.4rem;
  padding: .3rem 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--color-text-primary);
  font: inherit;
  font-size: .84rem;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-divider {
  align-self: stretch;
  flex: 0 0 1px;
  width: 1px;
  margin: .45rem .15rem;
  background: color-mix(in srgb, var(--color-border) 76%, transparent);
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-category {
  flex: 0 1 auto;
  width: auto;
  max-width: min(12rem, 34%);
  min-width: 0;
  min-height: 2.25rem;
  padding: 0 .45rem 0 .2rem;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--color-text-secondary);
  font: inherit;
  font-size: .74rem;
  font-weight: 700;
  text-overflow: ellipsis;
  cursor: pointer;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-category option {
  background: var(--color-surface);
  color: var(--color-text-primary);
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-category:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: -2px;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-grid .is-unified-search-hidden { display: none !important; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-empty[hidden] { display: none !important; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-field:focus-within {
  border-color: var(--color-focus);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-focus) 18%, transparent);
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-results[hidden] { display: none !important; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-results {
  display: grid;
  align-content: start;
  gap: .8rem;
  width: 100%;
  min-width: 0;
  max-height: min(52vh, 34rem);
  margin-top: .5rem;
  padding: .65rem;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface-raised, var(--color-surface));
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-group { min-width: 0; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-group h3 {
  margin: 0 0 .4rem;
  color: var(--color-text-muted);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-list { display: grid; gap: .3rem; min-width: 0; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: .45rem .6rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-text-primary);
  text-align: left;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-result-copy { display: grid; flex: 1 1 auto; gap: .15rem; min-width: 0; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-result-copy b { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-result-copy small { color: var(--color-text-muted); font-size: .7rem; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-result > button,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-account-result { cursor: pointer; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-result.ui-button { width: auto; flex: 0 0 auto; min-height: 2rem; white-space: nowrap; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-account-result { cursor: pointer; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-empty { margin: 0; color: var(--color-text-muted); font-size: .82rem; }

@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos {
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "search search search" "accounts products active-order";
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-unified-search { grid-area: search; }
  body.app-redesign[data-active-tab="pos"] #tab-pos.is-unified-search-active {
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "search search active-order";
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos.is-unified-search-active > .pos-unified-search { grid-row: 1; }
  body.app-redesign[data-active-tab="pos"] #tab-pos.is-unified-search-active > .ui-pos-accounts-card,
  body.app-redesign[data-active-tab="pos"] #tab-pos.is-unified-search-active > .pos-layout { display: none !important; }
  body.app-redesign[data-active-tab="pos"] #tab-pos.is-unified-search-active .pos-unified-search-results { max-height: none; height: calc(100% - 3.2rem); }
}

@media (max-width: 600px) {
  body.app-redesign:has(#tab-pos.active) #tab-pos .pos-unified-search-field {
    gap: .35rem;
    min-height: 2.75rem;
    padding-right: .35rem;
    padding-left: .6rem;
  }
  body.app-redesign:has(#tab-pos.active) #tab-pos .pos-unified-search-category {
    flex: 0 1 38%;
    width: 38%;
    max-width: 38%;
    min-height: 44px;
    padding-right: .25rem;
    font-size: .68rem;
  }
  body.app-redesign:has(#tab-pos.active) #tab-pos .pos-unified-search-divider { margin-right: .05rem; margin-left: .05rem; }
}

@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    align-content: start;
    align-items: start;
    gap: .55rem;
    width: 100%;
    min-width: 0;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group {
    display: grid;
    align-content: start;
    gap: .35rem;
    min-width: 0;
    padding: .45rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--color-surface) 62%, transparent);
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    min-width: 0;
    padding: 0 .1rem .25rem;
    border-bottom: 1px solid var(--color-border);
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group-heading h3 {
    min-width: 0;
    margin: 0;
    color: var(--color-text-muted);
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .045em;
    text-transform: uppercase;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group-heading span {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 .3rem;
    border-radius: 999px;
    background: var(--color-surface-raised);
    color: var(--color-text-secondary);
    font-size: .64rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group-cards {
    display: grid;
    gap: .4rem;
    min-width: 0;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group-cards > .account-chip {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-table-pill {
    max-width: 8.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ProporciÃ³n compartida y tarjetas simÃ©tricas en Cuentas y pedidos. */
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search {
  width: min(100%, 640px);
  justify-self: center;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-field {
  min-height: 42px;
  height: 42px;
  box-sizing: border-box;
  border-radius: 10px;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-field input,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-category { min-height: 40px; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-category {
  max-width: none;
  flex: 0 0 auto;
  text-overflow: clip;
}

@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos {
    --pos-column-gap: 16px;
    --pos-column-inset: 8px;
    gap: var(--pos-column-gap);
    padding: 16px 24px 16px !important;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos > .ui-pos-accounts-card,
  body.app-redesign[data-active-tab="pos"] #tab-pos #productsContainer,
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-desktop-active-order {
    padding: 0 var(--pos-column-inset) !important;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-zone-title,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-heading .pos-desktop-eyebrow {
    display: block;
    flex: 0 0 auto;
    min-height: 24px;
    margin: 0 0 12px;
    color: var(--color-text-primary);
    font-size: .92rem;
    font-weight: 850;
    line-height: 24px;
    letter-spacing: -.02em;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 24px;
    margin-bottom: 12px;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-header .pos-desktop-zone-title { margin: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-welcome {
    min-width: 0;
    margin: 0;
    padding: 0;
    color: var(--color-text-muted);
    font-size: .68rem;
    line-height: 1.3;
    text-align: left;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-heading { margin: 0 0 8px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-card,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-order { padding: 0 !important; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-order { justify-content: flex-start; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-heading {
    padding: 0;
    border: 0;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-heading .pos-desktop-eyebrow { margin: 0 0 4px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-heading h2 { margin: 0; font-size: .9rem; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-content {
    display: block;
    flex: 0 0 auto;
    min-height: 0;
    margin-top: 8px;
    overflow: visible;
    text-align: left;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-content > p { margin: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-new-order-actions { justify-content: flex-start; margin-top: 8px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: -12px;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group {
    gap: 2px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group-heading { margin: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group-cards { gap: 8px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group-cards > .account-chip {
    box-sizing: border-box;
    width: 100%;
    height: 68px;
    min-height: 68px;
    margin: 0;
    padding: 4px 8px;
    border-radius: 10px;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
    align-content: start;
    align-items: stretch;
    gap: 8px;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 0;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-sales-quick-product-main {
    min-height: 0;
    height: 100%;
    padding: 12px 36px;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-action-product-details b {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-action-product-details small { font-variant-numeric: tabular-nums; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip {
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    align-content: start;
    gap: 5px;
    position: relative;
    overflow: hidden;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-header {
    display: flex !important;
    align-items: flex-start;
    min-width: 0;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-row {
    grid-column: auto;
    grid-row: auto;
    min-width: 0;
    margin: 0;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-row-title { padding-right: 30px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-row-title .btn-chip-close {
    position: absolute !important;
    top: 4px !important;
    right: 4px !important;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-meta-row,
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-details,
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-meta-row { overflow: hidden; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-customer { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-footer { align-self: end; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-total { font-variant-numeric: tabular-nums; white-space: nowrap; }
}

@media (max-width: 600px) {
  body.app-redesign:has(#tab-pos.active) #tab-pos .pos-unified-search { width: 100%; max-width: 100%; }
  body.app-redesign:has(#tab-pos.active) #tab-pos .pos-unified-search-field { min-height: 42px; height: 42px; }
  body.app-redesign:has(#tab-pos.active) #tab-pos .pos-unified-search-category { width: auto; min-height: 40px; max-width: 11rem; flex: 0 0 auto; white-space: nowrap; }
}



/* Compacta el catalogo sin limitar su crecimiento ni convertirlo en una zona con scroll. */
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search {
  position: relative;
  z-index: 20;
  width: min(100%, 640px);
  max-width: 640px;
  justify-self: center;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-field {
  box-sizing: border-box;
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  gap: 8px;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-results[hidden] { display: none !important; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: grid;
  width: 100%;
  max-height: min(65vh, 560px);
  margin: 0;
  padding: 8px 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: var(--color-surface);
  box-shadow: 0 12px 30px rgb(0 0 0 / .22);
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-group { padding: 4px 0; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-group h3 {
  margin: 4px 12px 6px;
  font-size: .68rem;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-list { gap: 0; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-result {
  min-height: 44px;
  padding: 6px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-result + .pos-unified-search-result { border-top: 1px solid var(--color-border); }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-unified-search-empty { padding: 8px 12px; }

@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos {
    grid-template-columns: minmax(0, 24fr) minmax(0, 46fr) minmax(0, 30fr);
    grid-template-rows: auto auto;
    align-items: start;
    overflow: visible;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos > .ui-pos-accounts-card,
  body.app-redesign[data-active-tab="pos"] #tab-pos #productsContainer,
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-desktop-active-order {
    align-self: start;
    min-height: 0;
    height: auto;
    overflow: visible;
    padding: 0 8px !important;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos > .ui-pos-accounts-card { display: block !important; }
  body.app-redesign[data-active-tab="pos"] #tab-pos > .ui-pos-accounts-card,
  body.app-redesign[data-active-tab="pos"] #tab-pos #productsContainer,
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-desktop-active-order { grid-row: 2; }
  body.app-redesign[data-active-tab="pos"] #tab-pos > .ui-pos-accounts-card { grid-column: 1; }
  body.app-redesign[data-active-tab="pos"] #tab-pos #productsContainer { grid-column: 2; }
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-desktop-active-order { grid-column: 3; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-zone-title {
    min-height: 24px;
    height: 24px;
    margin: 0 0 12px;
    line-height: 24px;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-header {
    min-height: 24px;
    margin: 0 0 12px;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-heading { margin: 0 0 8px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-welcome {
    font-size: .68rem;
    line-height: 1.25;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .open-accounts-scroll,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-layout,
  body.app-redesign[data-active-tab="pos"] #tab-pos #productsContainer,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-sales-compact-menu,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog {
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .open-accounts-scroll { padding: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-layout,
  body.app-redesign[data-active-tab="pos"] #tab-pos #productsContainer,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-sales-compact-menu,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog { display: block; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-product-grid,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
    align-content: start;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    padding: 0;
    overflow: visible;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-grid > .pos-sales-quick-product,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-grid > .product-lockscreen-card {
    box-sizing: border-box;
    width: 100%;
    height: 68px;
    min-height: 68px;
    max-height: none;
    margin: 0;
    padding: 0;
    border-radius: 10px;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-sales-quick-product-main {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 8px 40px;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-action-product-details { min-width: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-action-product-details b {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.18;
    font-size: .76rem;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-action-product-details small {
    font-size: .72rem;
    font-variant-numeric: tabular-nums;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-action-product-step {
    box-sizing: border-box;
    min-width: 40px;
    min-height: 40px;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-groups {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin: 0;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group {
    min-width: 0;
    gap: 4px;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group-heading {
    display: flex;
    min-height: 24px;
    margin: 0;
    overflow: visible;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group-heading h3 { margin: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group-cards { display: grid; gap: 8px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group-cards > .account-chip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 20px 18px 20px;
    align-content: center;
    align-items: center;
    gap: 2px 6px;
    box-sizing: border-box;
    width: 100%;
    height: 68px;
    min-height: 68px;
    padding: 4px 8px;
    position: relative;
    overflow: visible;
    border-radius: 10px;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-header { display: block !important; grid-column: 1; grid-row: 1; min-width: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-title {
    display: block;
    overflow: hidden;
    padding-right: 32px;
    font-size: .74rem;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-row { min-width: 0; margin: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-row-title .btn-chip-close {
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-meta-row { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 4px; overflow: hidden; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-details { grid-column: 1 / -1; grid-row: 3; display: flex; width: 40%; gap: 4px; overflow: visible; font-size: .62rem; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-footer { position: absolute; right: 8px; bottom: 4px; display: flex; justify-content: flex-end; align-items: center; gap: 5px; max-width: 58%; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-status { display: block; min-width: 0; overflow: hidden; font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-chip-total { font-size: .67rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-card,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-order {
    display: block;
    width: 100%;
    min-height: 0;
    height: auto;
    padding: 0 !important;
    overflow: visible;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-heading { padding-bottom: 8px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-order { text-align: left; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-heading { padding: 0; border: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-heading h2 { margin: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-content { display: block; min-height: 0; margin-top: 8px; overflow: visible; text-align: left; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-content > p { margin: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-new-order-actions { justify-content: flex-start; margin-top: 8px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos.is-unified-search-active > .ui-pos-accounts-card,
  body.app-redesign[data-active-tab="pos"] #tab-pos.is-unified-search-active > .pos-layout { display: block !important; }
  body.app-redesign[data-active-tab="pos"] #tab-pos.is-unified-search-active .pos-unified-search-results { height: auto; }
  html:has(body.app-redesign[data-active-tab="pos"]) { height: auto; overflow: auto; }
  body.app-redesign[data-active-tab="pos"] { height: auto; min-height: 100dvh; overflow: visible; }
  body.app-redesign[data-active-tab="pos"] .main-content { height: auto; min-height: 0; overflow: visible; }
  body.app-redesign[data-active-tab="pos"] #tab-pos { height: auto; min-height: 0; overflow: visible; }
}

@media (max-width: 1099px) {
  body.app-redesign:has(#tab-pos.active) #tab-pos .pos-unified-search { width: 100%; max-width: 640px; margin-inline: auto; }
  body.app-redesign:has(#tab-pos.active) #tab-pos .pos-unified-search-field { height: 42px; min-height: 42px; }
  body.app-redesign:has(#tab-pos.active) #tab-pos .pos-unified-search-results { max-height: 55vh; }
}

@media (min-width: 1100px) { body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-grid { margin-top: 6px; } }

@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos { align-content: start; align-items: start; row-gap: 16px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-grid { margin-top: 14px !important; }
}

@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-card { display: flex; flex-direction: column; height: auto; min-height: 0; padding: 0 !important; overflow: visible; }
}

/* Orden activa: la tarjeta crece con pedidos cortos; solo la lista se desplaza en pedidos largos. */
@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-desktop-active-order {
    align-self: start;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-card {
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items {
    flex: 0 1 auto;
    min-height: 0;
    max-height: clamp(10rem, 45dvh, 30rem);
    overflow-x: hidden;
    overflow-y: auto;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items:has(.pos-desktop-order-empty) {
    flex: 0 0 auto;
    max-height: none;
    overflow: visible;
  }
}

/* Orden activa: fija el área de la tarjeta y reserva el desplazamiento para los productos. */
@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-desktop-active-order {
    align-self: stretch;
    min-height: 0;
    max-height: calc(100dvh - 220px);
    overflow: hidden;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-card {
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-heading {
    flex: 0 0 auto;
    align-items: center;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-mode {
    flex: 0 0 auto;
    margin: .8rem 0 .45rem;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items:has(.pos-desktop-order-empty) {
    flex: 0 0 auto;
    overflow: visible;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-empty {
    margin: .5rem 0;
    line-height: 1.5;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-totals,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-actions {
    flex: 0 0 auto;
  }
}

/* Orden activa: la tarjeta crece con pedidos cortos; solo la lista se desplaza en pedidos largos. */
@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-desktop-active-order {
    align-self: start;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-card {
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items {
    flex: 0 1 auto;
    min-height: 0;
    max-height: clamp(10rem, 45dvh, 30rem);
    overflow-x: hidden;
    overflow-y: auto;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items:has(.pos-desktop-order-empty) {
    flex: 0 0 auto;
    max-height: none;
    overflow: visible;
  }
}

@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-heading { box-sizing: border-box; height: 25px; min-height: 25px; margin: 0 0 4px; line-height: 24px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-grid { margin-top: 4px !important; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-action-product-details { display: grid; grid-template-rows: 28px 14px; align-content: center; gap: 2px; width: 100%; min-width: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-action-product-details b { box-sizing: border-box; height: 28px; max-height: 28px; min-height: 28px; line-height: 14px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .account-action-product-details small { height: 14px; line-height: 14px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-card { display: flex; flex-direction: column; height: auto; min-height: 0; padding: 0 !important; overflow: visible; }
}

/* El buscador ocupa la celda de Productos y alinea el campo con su cuadrícula. */
@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-unified-search {
    grid-area: auto;
    grid-column: 2;
    grid-row: 1;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: none;
    justify-self: stretch;
    margin: 0;
    padding-inline: 8px;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-unified-search .pos-unified-search-field {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 40px;
    min-height: 40px;
  }
}

/* Orden activa: fija el área de la tarjeta y reserva el desplazamiento para los productos. */
@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-desktop-active-order {
    align-self: stretch;
    min-height: 0;
    max-height: calc(100dvh - 220px);
    overflow: hidden;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-card {
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-heading {
    flex: 0 0 auto;
    align-items: center;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-mode {
    flex: 0 0 auto;
    margin: .8rem 0 .45rem;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items:has(.pos-desktop-order-empty) {
    flex: 0 0 auto;
    overflow: visible;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-empty {
    margin: .5rem 0;
    line-height: 1.5;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-totals,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-actions {
    flex: 0 0 auto;
  }
}

/* Orden activa: la tarjeta crece con pedidos cortos; solo la lista se desplaza en pedidos largos. */
@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-desktop-active-order {
    align-self: start;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-card {
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items {
    flex: 0 1 auto;
    min-height: 0;
    max-height: clamp(10rem, 45dvh, 30rem);
    overflow-x: hidden;
    overflow-y: auto;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items:has(.pos-desktop-order-empty) {
    flex: 0 0 auto;
    max-height: none;
    overflow: visible;
  }
}

/* Whole-line removal in active-order lists: compact icon with a comfortable hit target. */
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-remove,
body.app-redesign[data-active-tab="pos"] #tab-pos #cartItemsList .cart-item-remove {
  display: inline-grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-remove:hover,
body.app-redesign[data-active-tab="pos"] #tab-pos #cartItemsList .cart-item-remove:hover {
  background: color-mix(in srgb, var(--color-primary) 9%, transparent);
  color: var(--color-text-primary);
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-remove:focus-visible,
body.app-redesign[data-active-tab="pos"] #tab-pos #cartItemsList .cart-item-remove:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
}

@media (min-width: 1100px) {
  /* Una fila de búsqueda separada; las tres columnas comienzan juntas debajo. */
  body.app-redesign[data-active-tab="pos"] #tab-pos {
    display: grid;
    grid-template-columns: minmax(220px, 24fr) minmax(0, 46fr) minmax(270px, 30fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: ". search ." "accounts products active-order";
    align-items: stretch;
    align-content: stretch;
    column-gap: clamp(.75rem, 1.1vw, 1.25rem);
    row-gap: 12px;
    min-height: 0;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-unified-search {
    grid-area: search;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding-inline: 8px;
    justify-self: stretch;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-unified-search .pos-unified-search-field {
    box-sizing: border-box;
    width: 100%;
    height: 42px;
    min-height: 42px;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-unified-search .pos-unified-search-results {
    right: 8px;
    left: 8px;
    width: auto;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos.is-unified-search-active {
    grid-template-areas: ". search active-order";
  }

  /* El contenedor legacy deja participar a Productos en la cuadrícula principal. */
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-layout { display: contents !important; }
  body.app-redesign[data-active-tab="pos"] #tab-pos > .ui-pos-accounts-card { grid-area: accounts; }
  body.app-redesign[data-active-tab="pos"] #tab-pos #productsContainer { grid-area: products; }
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-desktop-active-order { grid-area: active-order; }

  body.app-redesign[data-active-tab="pos"] #tab-pos > .ui-pos-accounts-card,
  body.app-redesign[data-active-tab="pos"] #tab-pos #productsContainer,
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-desktop-active-order {
    box-sizing: border-box;
    align-self: stretch;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    margin: 0 !important;
    padding: 0 8px !important;
    overflow: hidden;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.app-redesign[data-active-tab="pos"] #tab-pos > .ui-pos-accounts-card,
  body.app-redesign[data-active-tab="pos"] #tab-pos #productsContainer,
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-desktop-active-order {
    display: flex !important;
    flex-direction: column;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-layout,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-sales-compact-menu,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog {
    box-sizing: border-box;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog {
    display: flex;
    flex-direction: column;
  }

  /* Column section headings share one line box, divider and bottom spacing. */
  body.app-redesign[data-active-tab="pos"] #tab-pos > .ui-pos-accounts-card > .pos-desktop-zone-title,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-header,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-heading {
    box-sizing: border-box;
    display: flex;
    flex: 0 0 42px;
    align-items: center;
    min-width: 0;
    min-height: 42px;
    height: 42px;
    margin: 0 0 12px;
    padding: 0 0 8px;
    border: 0;
    border-bottom: 1px solid var(--color-border);
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos > .ui-pos-accounts-card > .pos-desktop-zone-title {
    display: block;
    color: var(--color-text-primary);
    font-size: .92rem;
    font-weight: 850;
    line-height: 33px;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-header { justify-content: space-between; gap: 8px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-header .pos-desktop-zone-title { margin: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-welcome { margin: 0; padding: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-heading { padding-bottom: 8px; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-heading h2 { margin: 2px 0; }

  /* The account group label and product scope label are the matching control row. */
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-groups { margin: 0; }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-account-group-heading,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-heading {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    min-height: 25px;
    height: 25px;
    margin: 0 0 4px;
    padding: 0;
    line-height: 25px;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-grid { margin-top: 0 !important; }

  body.app-redesign[data-active-tab="pos"] #tab-pos .open-accounts-scroll,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-catalog-grid,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-card,
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-order {
    box-sizing: border-box;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    padding: 0 !important;
    overflow: hidden;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-items:has(.pos-desktop-order-empty) {
    flex: 0 0 auto;
    overflow: visible;
  }

  /* Keep subtotal, packaging and total on a single aligned ledger. */
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-totals {
    display: grid;
    flex: 0 0 auto;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-totals > div {
    min-height: 34px;
    align-items: center;
    margin: 0;
    padding: 7px 0;
    border-top: 1px solid var(--color-border);
    font-variant-numeric: tabular-nums;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-totals .pos-desktop-order-grand-total {
    min-height: 42px;
    margin: 0;
    padding: 8px 0;
    border-top: 1px solid var(--color-border);
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-actions { flex: 0 0 auto; margin-top: 10px; }

  /* Checkout stays in the active order column; payment fields scroll above its action. */
  body.app-redesign[data-active-tab="pos"] #posDesktopActiveOrder.is-checkout .pos-desktop-order-mode,
  body.app-redesign[data-active-tab="pos"] #posDesktopActiveOrder.is-checkout .pos-desktop-order-remove,
body.app-redesign[data-active-tab="pos"] #posDesktopActiveOrder.is-checkout .pos-desktop-order-actions { display: none !important; }

/* Panel de orden: encabezado uniforme, contenido legible y acciones sin desbordes. */
body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-desktop-active-order {
  min-width: 0;
  padding-inline: 8px !important;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-card,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-order {
  min-width: 0;
  padding: 0 !important;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-heading,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-heading {
  box-sizing: border-box;
  display: flex;
  flex: 0 0 42px;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  height: 42px;
  margin: 0 0 12px;
  padding: 0 0 8px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-heading > div,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-heading { min-width: 0; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-heading {
  flex: 0 0 auto;
  align-items: flex-start;
  height: auto;
  min-height: 42px;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-heading h2,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-heading h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.25;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-heading p.pos-desktop-order-identity {
  margin: 4px 0 0;
  color: var(--color-text-muted);
  font-size: .72rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-content {
  display: block;
  min-width: 0;
  margin-top: 0;
  overflow: visible;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-content h3 {
  margin: 0 0 6px;
  color: var(--color-text-primary);
  font-size: .84rem;
  font-weight: 500;
  line-height: 1.4;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-empty-content > p {
  max-width: 100%;
  margin: 0;
  color: var(--color-text-muted);
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-new-order-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin-top: 16px;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-new-order-actions button {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px;
  font-size: .76rem;
  font-weight: 500;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-new-order-actions button:not(:first-child) {
  border-color: var(--color-border);
  background: var(--color-surface-raised);
  color: var(--color-text-secondary);
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-new-order-actions button:nth-child(n + 3) { grid-column: 1 / -1; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-row,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-copy,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-copy b,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-copy small,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-totals,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-totals strong,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-actions button {
  min-width: 0;
  font-weight: 400;
}
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-copy b { overflow-wrap: anywhere; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-row { gap: 8px; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-actions { padding-top: 10px; border-top: 1px solid var(--color-border); }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-actions button { white-space: normal; }
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-status,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-mode,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-order-mode-options button,
body.app-redesign[data-active-tab="pos"] #tab-pos .pos-order-mode-badge { font-weight: 400; }
body.app-redesign[data-active-tab="pos"] #tab-pos #posDesktopActiveOrder .pos-desktop-order-totals .pos-desktop-order-grand-total,
body.app-redesign[data-active-tab="pos"] #tab-pos #posDesktopActiveOrder .pos-desktop-order-totals .pos-desktop-order-grand-total strong { font-weight: 400; }

@media (max-width: 360px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-new-order-actions { grid-template-columns: minmax(0, 1fr); }
  body.app-redesign[data-active-tab="pos"] #tab-pos .pos-desktop-new-order-actions button:nth-child(n) { grid-column: auto; }
}
  body.app-redesign[data-active-tab="pos"] #checkoutModal.checkout-in-desktop-panel {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: transparent;
    backdrop-filter: none;
  }
  body.app-redesign[data-active-tab="pos"] #checkoutModal.checkout-in-desktop-panel .checkout-card,
  body.app-redesign[data-active-tab="pos"] #checkoutModal.checkout-in-desktop-panel .checkout-order-heading { display: contents; }
  body.app-redesign[data-active-tab="pos"] #checkoutModal.checkout-in-desktop-panel .checkout-order-title-wrap,
  body.app-redesign[data-active-tab="pos"] #checkoutModal.checkout-in-desktop-panel #checkoutOrderStatus,
  body.app-redesign[data-active-tab="pos"] #checkoutModal.checkout-in-desktop-panel #checkoutSplitItemsView,
  body.app-redesign[data-active-tab="pos"] #checkoutModal.checkout-in-desktop-panel #checkoutOrderDetails,
  body.app-redesign[data-active-tab="pos"] #checkoutModal.checkout-in-desktop-panel .checkout-payment-amount,
  body.app-redesign[data-active-tab="pos"] #checkoutModal.checkout-in-desktop-panel .checkout-persistence-status { display: none !important; }
  body.app-redesign[data-active-tab="pos"] #checkoutModal.checkout-in-desktop-panel .checkout-back-button {
    flex: 0 0 auto;
    align-self: flex-start;
    min-height: 28px;
    height: 28px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: .72rem;
  }
  body.app-redesign[data-active-tab="pos"] #checkoutModal.checkout-in-desktop-panel .checkout-body {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
  }
  body.app-redesign[data-active-tab="pos"] #checkoutModal.checkout-in-desktop-panel .checkout-footer {
    position: static;
    flex: 0 0 auto;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
  }
}

/* Tablet retains the established stacked/compact POS flow, without three narrow columns. */
@media (min-width: 601px) and (max-width: 1099px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos > .pos-layout { display: block; }
}

/* El buscador ocupa solo la columna Productos, incluso con resultados abiertos. */
@media (min-width: 1100px) {
  body.app-redesign[data-active-tab="pos"] #tab-pos.is-unified-search-active {
    grid-template-rows: auto minmax(0, 1fr) !important;
    grid-template-areas: ". search ." "accounts products active-order" !important;
  }
  body.app-redesign[data-active-tab="pos"] #tab-pos.is-unified-search-active > .ui-pos-accounts-card { display: block !important; }
  body.app-redesign[data-active-tab="pos"] #tab-pos.is-unified-search-active > .pos-layout { display: contents !important; }
  body.app-redesign[data-active-tab="pos"] #tab-pos.is-unified-search-active .pos-unified-search-results {
    top: calc(100% + 6px);
    right: 8px;
    left: 8px;
    width: auto;
    height: auto !important;
    max-height: min(65vh, 560px);
  }
}
