<style>
  .cassa-sb-wrapper {
    --sb-page-bg: var(--bs-body-bg);
    --sb-surface: var(--bs-paper-bg, var(--bs-body-bg));
    --sb-surface-soft: var(--bs-tertiary-bg);
    --sb-border: var(--bs-border-color);
    --sb-text: var(--bs-heading-color);
    --sb-text-muted: var(--bs-secondary-color);
    --sb-text-soft: var(--bs-body-color);
    --sb-primary: var(--bs-primary);
    --sb-primary-soft: var(--bs-primary-bg-subtle);
    --sb-primary-border: var(--bs-primary-border-subtle);
    --sb-success-soft: var(--bs-success-bg-subtle);
    --sb-success-text: var(--bs-success-text-emphasis);
    --sb-danger-soft: var(--bs-danger-bg-subtle);
    --sb-danger-text: var(--bs-danger-text-emphasis);

    height: 100dvh;
    padding: .75rem;
    background: var(--sb-page-bg);
    overflow: hidden;
  }
  .cassa-sb-topbar {
    height: 3rem;
    background: var(--sb-surface);
    border: 1px solid var(--sb-border);
    border-radius: 12px;
    padding: .3rem .6rem;
    margin-bottom: .45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
  }
  .cassa-sb-layout {
    height: calc(100dvh - 4.2rem);
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) 360px;
    gap: .65rem;
  }
  .cassa-sb-panel {
    min-height: 0;
    background: var(--sb-surface);
    border: 1px solid var(--sb-border);
    border-radius: 12px;
    overflow: hidden;
  }
  .cassa-sb-catalog {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    min-height: 0;
  }
  .cassa-sb-sidebar {
    min-height: 0;
    border-right: 1px solid var(--sb-border);
    padding: .4rem;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: .35rem;
  }
  .cassa-sb-side-title {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--sb-text-muted);
    font-weight: 800;
    margin: 0;
  }
  .cassa-sb-kitchens {
    min-height: 0;
    display: grid;
    grid-template-rows: repeat(10, minmax(0, 1fr));
    gap: .28rem;
  }
  .cassa-sb-kitchen-btn {
    min-height: 0;
    border: 1px solid var(--sb-border);
    border-radius: 8px;
    /* background: #f6f9ff; */
    text-align: left;
    padding: 1em;
    font-weight: 800;
    color: var(--sb-text-soft);
    display: grid;
    align-content: center;
    line-height: .95rem;
    font-size: 1.1rem;
    position: relative;
    transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease;
  }
  .cassa-sb-kitchen-label {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    font-weight: 800;
  }
  .cassa-sb-kitchen-count {
    font-size: .64rem;
    color: var(--sb-text-muted);
    margin-top: .06rem;
    font-weight: 700;
  }
  .cassa-sb-kitchen-btn.is-active .cassa-sb-kitchen-count {
    color: rgba(var(--bs-white-rgb), .85);
  }
  .cassa-sb-kitchen-btn.is-active {
    border-color: var(--sb-primary) !important;
    box-shadow:
      0 0 0 2px var(--sb-surface),
      0 0 0 4px rgba(var(--bs-primary-rgb), .55),
      0 .45rem .9rem rgba(var(--bs-primary-rgb), .35);
    transform: translateY(-1px) scale(1.01);
    filter: saturate(1.08);
  }
  .cassa-sb-kitchen-btn.is-active::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--bs-white);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .2);
  }
  .cassa-sb-side-pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: .3rem;
    align-items: center;
  }
  .cassa-sb-side-pager button {
    height: 30px;
    border: 1px solid var(--sb-border);
    border-radius: 8px;
    background: var(--sb-surface-soft);
    font-weight: 800;
    color: var(--sb-text-soft);
  }
  .cassa-sb-side-pager span {
    font-size: .78rem;
    color: var(--sb-text-muted);
    font-weight: 800;
    min-width: 52px;
    text-align: center;
  }
  .cassa-sb-main {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .cassa-sb-main-head {
    border-bottom: 1px solid var(--sb-border);
    padding: .35rem .4rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .35rem;
    align-items: center;
  }
  .cassa-sb-selected-kitchen {
    font-size: .74rem;
    color: var(--sb-text-soft);
    border: 1px solid var(--sb-border);
    border-radius: 8px;
    padding: .38rem .5rem;
    background: var(--sb-surface-soft);
    white-space: nowrap;
  }
  .cassa-sb-search {
    height: 34px;
    border: 1px solid var(--sb-border);
    border-radius: 8px;
    padding: 0 .55rem;
    font-size: .86rem;
  }
  .cassa-sb-main-pager {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
  }
  .cassa-sb-main-pager button {
    min-width: 52px;
    height: 34px;
    border: 1px solid var(--sb-border);
    border-radius: 7px;
    background: var(--sb-surface-soft);
    font-weight: 800;
    color: var(--sb-text-soft);
  }
  .cassa-sb-main-pager span {
    min-width: 48px;
    font-size: .74rem;
    color: var(--sb-text-muted);
    font-weight: 800;
    text-align: center;
  }
  .cassa-sb-products-wrap {
    min-height: 0;
    padding: .35rem;
  }
  .cassa-sb-products {
    /* height: 100%; */
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: .3rem;
  }
  .cassa-sb-product {
    min-height: 0;
    border: 1px solid var(--sb-border);
    border-radius: 8px;
    background: var(--sb-surface);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    cursor: pointer;
    position: relative;
  }
  .cassa-sb-product:active { transform: scale(.99); }
  .cassa-sb-product:hover { border-color: var(--sb-primary-border); }
  .cassa-sb-product-title {
    font-size: clamp(.84rem, 1.1vw, 1.08rem);
    font-weight: 900;
    color: var(--sb-text);
    line-height: 1.05;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .cassa-sb-product-title.is-long {
    font-size: clamp(.78rem, 1vw, .95rem);
  }
  .cassa-sb-product-title.is-xlong {
    font-size: clamp(.72rem, .95vw, .88rem);
  }
  .cassa-sb-product-sub {
    font-size: .64rem;
    color: var(--sb-text-muted);
    margin-top: .12rem;
  }
  .cassa-sb-product-price {
    margin-top: .18rem;
    font-size: .8rem;
    color: var(--sb-primary);
    font-weight: 900;
  }
  .cassa-sb-allergen-trigger {
    position: absolute;
    top: .4rem;
    right: .4rem;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    border: 1px solid var(--sb-primary-border);
    background: var(--sb-primary);
    color: var(--bs-white);
    font-size: .78rem;
    font-weight: 900;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
  }
  .cassa-sb-allergen-trigger:hover {
    filter: brightness(1.05);
  }
  .cassa-sb-allergen-tooltip {
    position: absolute;
    top: 1.85rem;
    right: .4rem;
    width: min(220px, 80vw);
    border: 1px solid var(--sb-border);
    background: var(--sb-surface);
    color: var(--sb-text);
    border-radius: .6rem;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .18);
    padding: .45rem .55rem;
    font-size: .72rem;
    line-height: 1.3;
    display: none;
    z-index: 4;
    pointer-events: none;
  }
  .cassa-sb-allergen-tooltip.is-open {
    display: block;
  }
  .cassa-sb-allergen-tooltip-title {
    font-weight: 800;
    margin-bottom: .2rem;
  }
  .cassa-sb-placeholder {
    /* border: 1px dashed var(--sb-border); */
    border-radius: 12px;
    /* background: var(--sb-surface-soft); */
    opacity: .75;
  }
  .cassa-sb-cart {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
  }
  .cassa-sb-cart-head {
    border-bottom: 1px solid var(--sb-border);
    padding: .42rem .48rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .45rem;
  }
  .cassa-sb-cart-list {
    min-height: 0;
    padding: .35rem;
    display: grid;
    grid-template-rows: repeat(6, minmax(0, 1fr));
    gap: .28rem;
  }
  .cassa-sb-cart-row {
    border: 1px solid var(--sb-border);
    border-radius: 10px;
    background: var(--sb-surface);
    padding: .5rem .55rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name total"
      "note qty";
    /* column-gap: .55rem;
    row-gap: .35rem; */
    align-items: center;
    min-height: 0;
  }
  .cassa-sb-cart-name {
    grid-area: name;
    font-size: .84rem;
    font-weight: 900;
    color: var(--sb-text);
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .cassa-sb-note-row {
    grid-area: note;
    display: flex;
    align-items: center;
  }
  .cassa-sb-note-btn {
    border: 1px solid var(--sb-border);
    background: var(--sb-surface-soft);
    color: var(--sb-text-soft);
    border-radius: 999px;
    height: 26px;
    padding: 0 .65rem;
    font-size: .67rem;
    font-weight: 800;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: .22rem;
  }
  .cassa-sb-note-btn::before {
    /* content: 'i';
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1px solid currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .58rem;
    line-height: 1; */
  }
  .cassa-sb-cart-total {
    grid-area: total;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--sb-primary);
    white-space: nowrap;
    text-align: right;
    align-self: center;
  }
  .cassa-sb-qty {
    grid-area: qty;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--sb-border);
    border-radius: 8px;
    overflow: hidden;
    height: 28px;
  }
  .cassa-sb-qty button {
    width: 40px;
    height: 40px;
    border: 0;
    background: var(--sb-surface-soft);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--sb-text);
  }
  .cassa-sb-qty span {
    min-width: 28px;
    text-align: center;
    font-size: .78rem;
    font-weight: 800;
    color: var(--sb-text);
  }
  .cassa-sb-footer {
    border-top: 1px solid var(--sb-border);
    padding: .35rem;
    display: grid;
    gap: .28rem;
  }
  .cassa-sb-total {
    border: 1px solid var(--sb-primary-border);
    background: var(--sb-primary-soft);
    border-radius: 8px;
    padding: .32rem .38rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .cassa-sb-total-value {
    font-size: 1.02rem;
    font-weight: 900;
    color: var(--sb-primary);
  }
  .cassa-sb-pay-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .22rem;
  }
  .cassa-sb-pay-grid button {
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid var(--sb-border);
    font-weight: 900;
  }
  .cassa-sb-main-btn {
    background: var(--sb-primary);
    border-color: var(--sb-primary) !important;
    color: var(--bs-white);
  }
  .cassa-sb-cash-btn {
    background: var(--sb-success-soft);
    color: var(--sb-success-text);
  }
  .cassa-sb-card-btn {
    background: var(--sb-primary-soft);
    color: var(--sb-primary);
  }
  .cassa-sb-clear-btn {
    background: var(--sb-danger-soft);
    color: var(--sb-danger-text);
  }
  @media (max-width: 1400px) {
    .cassa-sb-layout { grid-template-columns: minmax(0, 1fr) 320px; }
    .cassa-sb-catalog { grid-template-columns: 155px minmax(0, 1fr); }
    .cassa-sb-kitchens { grid-template-rows: repeat(10, minmax(0, 1fr)); }
    .cassa-sb-products { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr)); }
  }
  @media (max-width: 1200px) {
    .cassa-sb-wrapper {
      padding: .5rem;
      height: auto;
      min-height: 100dvh;
      overflow: auto;
    }
    .cassa-sb-layout {
      height: auto;
      grid-template-columns: minmax(0, 1fr);
      gap: .5rem;
    }
    .cassa-sb-panel {
      min-height: auto;
    }
    .cassa-sb-catalog {
      grid-template-columns: 140px minmax(0, 1fr);
      min-height: 64dvh;
    }
    .cassa-sb-cart {
      min-height: 38dvh;
    }
    .cassa-sb-products {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      grid-template-rows: repeat(7, minmax(0, 1fr));
    }
  }
  @media (max-width: 768px) {
    .cassa-sb-wrapper {
      padding: .4rem;
    }
    .cassa-sb-topbar {
      height: auto;
      min-height: 3rem;
      flex-wrap: wrap;
      align-items: center;
      gap: .45rem;
      padding: .4rem .5rem;
    }
    .cassa-sb-topbar h5 {
      font-size: 1rem;
      line-height: 1.15;
    }
    .cassa-sb-catalog {
      grid-template-columns: 118px minmax(0, 1fr);
      min-height: 66dvh;
    }
    .cassa-sb-sidebar {
      padding: .3rem;
      gap: .28rem;
    }
    .cassa-sb-kitchen-btn {
      padding: .45rem .35rem;
      font-size: .86rem;
      line-height: 1.02;
    }
    .cassa-sb-kitchen-count {
      font-size: .6rem;
    }
    .cassa-sb-main-head {
      grid-template-columns: 1fr;
    }
    .cassa-sb-selected-kitchen {
      width: 100%;
      text-align: center;
    }
    .cassa-sb-main-pager {
      width: 100%;
      justify-content: space-between;
    }
    .cassa-sb-main-pager button {
      min-width: 60px;
      flex: 1;
    }
    .cassa-sb-products {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      grid-template-rows: auto;
      gap: .25rem;
    }
    .cassa-sb-product {
      min-height: 76px;
      padding: .28rem;
    }
    .cassa-sb-product-title {
      -webkit-line-clamp: 2;
    }
    .cassa-sb-product-price {
      margin-top: .1rem;
      font-size: .76rem;
    }
    .cassa-sb-cart-list {
      grid-template-rows: repeat(5, minmax(0, 1fr));
    }
    .cassa-sb-cart-row {
      padding: .34rem .38rem;
      column-gap: .35rem;
      row-gap: .25rem;
    }
    .cassa-sb-cart-total {
      text-align: right;
    }
    .cassa-sb-pay-grid {
      grid-template-columns: 1fr 1fr;
      gap: .2rem;
    }
    .cassa-sb-pay-grid button {
      min-height: 36px;
      font-size: .8rem;
      padding: .2rem .3rem;
    }
  }
  @media (max-width: 480px) {
    .cassa-sb-wrapper {
      padding: .32rem;
    }
    .cassa-sb-catalog {
      grid-template-columns: 100px minmax(0, 1fr);
      min-height: 64dvh;
    }
    .cassa-sb-side-title {
      font-size: .62rem;
    }
    .cassa-sb-kitchen-btn {
      padding: .38rem .25rem;
      font-size: .78rem;
    }
    .cassa-sb-kitchen-btn.is-active {
      box-shadow:
        0 0 0 1px var(--sb-surface),
        0 0 0 3px rgba(var(--bs-primary-rgb), .5),
        0 .25rem .55rem rgba(var(--bs-primary-rgb), .28);
      transform: none;
    }
    .cassa-sb-side-pager button,
    .cassa-sb-main-pager button {
      min-width: 52px;
      height: 30px;
      font-size: .72rem;
    }
    .cassa-sb-main-head {
      padding: .3rem;
      gap: .28rem;
    }
    .cassa-sb-search {
      height: 32px;
      font-size: .8rem;
    }
    .cassa-sb-products {
      gap: .22rem;
    }
    .cassa-sb-product {
      min-height: 70px;
      border-radius: 7px;
    }
    .cassa-sb-product-title {
      font-size: .82rem;
      line-height: 1.02;
    }
    .cassa-sb-product-title.is-long {
      font-size: .76rem;
    }
    .cassa-sb-product-title.is-xlong {
      font-size: .7rem;
    }
    .cassa-sb-product-price {
      font-size: .72rem;
    }
    .cassa-sb-cart-head {
      padding: .32rem;
    }
    .cassa-sb-cart-list {
      padding: .28rem;
      gap: .22rem;
    }
    .cassa-sb-cart-name {
      font-size: .72rem;
    }
    .cassa-sb-note-row {
      min-height: 24px;
    }
    .cassa-sb-note-btn {
      height: 24px;
      font-size: .62rem;
      padding: 0 .45rem;
    }
    .cassa-sb-note-btn::before {
      width: 12px;
      height: 12px;
      font-size: .52rem;
    }
    .cassa-sb-cart-total {
      font-size: .72rem;
    }
    .cassa-sb-total {
      padding: .28rem .32rem;
    }
    .cassa-sb-total-value {
      font-size: .92rem;
    }
    .cassa-sb-pay-grid {
      grid-template-columns: 1fr;
    }
  }
</style>