/* Definitive POS skin. Loaded after the application stylesheet to isolate the
   register from the back-office theme and older POS experiments. */

body.pos-fullscreen,
body.pos-force-light {
  --pos-accent: #43a047;
  --pos-accent-strong: #2e7d32;
  --pos-accent-soft: #edf7ee;
  --pos-green: #278c52;
  --pos-green-soft: #eaf7ef;
  --pos-ink: #1f2933;
  --pos-muted: #66727f;
  --pos-line: #d6dde3;
  --pos-bg: #f1f3f5;
  --pos-panel: #ffffff;
  --pos-hover: #f6f8fa;
  --pos-app-accent: #43a047;
  --pos-app-accent-strong: #2e7d32;
  --pos-app-accent-soft: #edf7ee;
  --pos-app-line: #d6dde3;
  --pos-app-ink: #1f2933;
  --pos-app-muted: #66727f;
  color: var(--pos-ink);
  background: var(--pos-bg);
}

body.pos-fullscreen .app-shell,
body.pos-fullscreen .main,
body.pos-fullscreen #view-sales {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: var(--pos-bg);
}

body.pos-fullscreen #view-sales {
  padding: 0;
}

body.pos-fullscreen #view-sales .pos-webapp-shell {
  min-height: 0;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.pos-fullscreen #view-sales .pos-app-layout {
  gap: 0;
  grid-template-columns: minmax(0, 1fr) clamp(500px, 40vw, 640px);
}

body.pos-fullscreen #view-sales .pos-app-catalog,
body.pos-fullscreen #view-sales .pos-app-ticket {
  height: auto;
  min-height: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.pos-fullscreen #view-sales .pos-app-catalog {
  border-right: 1px solid var(--pos-line);
}

body.pos-fullscreen .pos-webapp-shell {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: 58px 54px minmax(0, 1fr) 72px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--pos-bg);
  color: var(--pos-ink);
  box-shadow: none;
}

body.pos-fullscreen .pos-app-header {
  min-height: 58px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--pos-line);
  background: var(--pos-panel);
  color: var(--pos-ink);
}

body.pos-fullscreen .pos-app-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

body.pos-fullscreen .pos-app-title > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--pos-accent-soft);
  color: var(--pos-accent-strong);
}

body.pos-fullscreen .pos-app-title h2 {
  margin: 0;
  color: var(--pos-ink);
  font-size: 18px;
}

body.pos-fullscreen .pos-app-title p {
  margin: 1px 0 0;
  overflow: hidden;
  color: var(--pos-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.pos-fullscreen .pos-app-commandbar,
body.pos-fullscreen .pos-app-status,
body.pos-fullscreen .pos-app-register {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.pos-fullscreen .pos-app-status,
body.pos-fullscreen .pos-app-register {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--pos-line);
  border-radius: 6px;
  background: #fff;
  color: var(--pos-muted);
  font-size: 12px;
  font-weight: 700;
}

body.pos-fullscreen .pos-app-status:not(.offline),
body.pos-fullscreen .pos-app-register.open {
  border-color: #b9e1ce;
  background: var(--pos-green-soft);
  color: #16744b;
}

body.pos-fullscreen .pos-app-commandbar .icon-button {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--pos-line);
  border-radius: 6px;
  background: #fff;
  color: var(--pos-ink);
}

body.pos-fullscreen .pos-mobile-switch {
  display: none;
}

body.pos-fullscreen .pos-app-actionbar {
  min-height: 54px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--pos-line);
  background: #f7f8fa;
}

body.pos-fullscreen .pos-app-rail-actions,
body.pos-fullscreen .pos-app-rail-metrics {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

body.pos-fullscreen .pos-app-rail-actions > button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--pos-line);
  border-radius: 6px;
  background: #fff;
  color: var(--pos-ink);
  box-shadow: none;
}

body.pos-fullscreen .pos-app-rail-actions > button.primary {
  border-color: var(--pos-accent);
  background: var(--pos-accent);
  color: #fff;
}

body.pos-fullscreen .pos-app-rail-actions > button strong {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 10px;
  background: #edf0f3;
  font-size: 11px;
}

body.pos-fullscreen .pos-app-rail-actions > button.primary strong {
  background: rgba(255, 255, 255, .55);
}

body.pos-fullscreen .pos-app-rail-metrics > div {
  min-width: 112px;
  padding: 4px 10px;
  display: grid;
  align-content: center;
  border-left: 1px solid var(--pos-line);
}

body.pos-fullscreen .pos-app-rail-metrics span {
  color: var(--pos-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

body.pos-fullscreen .pos-app-rail-metrics strong {
  margin-top: 1px;
  color: var(--pos-ink);
  font-size: 15px;
}

body.pos-fullscreen .pos-app-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(350px, 31vw, 500px);
  gap: 0;
  overflow: hidden;
}

body.pos-fullscreen .pos-app-catalog {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  overflow: hidden;
  border-right: 1px solid var(--pos-line);
  background: var(--pos-bg);
}

body.pos-fullscreen .pos-app-catalog-top {
  min-height: 58px;
  padding: 8px 12px 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--pos-line);
  background: var(--pos-panel);
}

body.pos-fullscreen .pos-app-catalog-top > div:first-child {
  min-width: 160px;
}

body.pos-fullscreen .pos-app-catalog-top > div:first-child > span {
  display: none;
}

body.pos-fullscreen .pos-app-catalog-top h2 {
  margin: 0;
  color: var(--pos-ink);
  font-size: 20px;
}

body.pos-fullscreen .pos-toolbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

body.pos-fullscreen .pos-search {
  width: min(410px, 37vw);
  min-height: 40px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--pos-line);
  border-radius: 6px;
  background: #fff;
  color: var(--pos-muted);
}

body.pos-fullscreen .pos-search input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pos-ink);
  box-shadow: none;
}

body.pos-fullscreen .icon-segmented,
body.pos-fullscreen .pos-scan-button {
  min-height: 40px;
}

body.pos-fullscreen .icon-segmented {
  display: flex;
  border: 1px solid var(--pos-line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

body.pos-fullscreen .icon-segmented button,
body.pos-fullscreen .pos-scan-button {
  width: 40px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--pos-muted);
}

body.pos-fullscreen .icon-segmented button.active {
  background: var(--pos-accent-soft);
  color: var(--pos-accent-strong);
}

body.pos-fullscreen .pos-products {
  min-height: 0;
  padding: 12px;
  align-content: start;
  overflow: auto;
  background: var(--pos-bg);
  scrollbar-gutter: stable;
}

body.pos-fullscreen .pos-products.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  grid-auto-rows: 172px;
  gap: 10px;
}

body.pos-fullscreen .pos-products.view-grid .pos-product {
  min-width: 0;
  min-height: 0;
  height: 172px;
  padding: 0;
  display: grid;
  grid-template-rows: 112px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--pos-line);
  border-radius: 6px;
  background: #fff;
  color: var(--pos-ink);
  text-align: left;
  box-shadow: none;
}

body.pos-fullscreen .pos-products.view-grid .pos-product:hover {
  border-color: var(--pos-accent);
}

body.pos-fullscreen .pos-products.view-grid .pos-product:active:not(:disabled) {
  transform: scale(.985);
}

body.pos-fullscreen .pos-products.view-grid .pos-product-media {
  position: relative;
  width: 100%;
  min-height: 112px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--pos-line);
  background: #f7f8fa;
  color: #88929e;
}

body.pos-fullscreen .pos-products.view-grid .pos-product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.pos-fullscreen .pos-products.view-grid .pos-product-media > svg {
  width: 38px;
  height: 38px;
}

body.pos-fullscreen .pos-products.view-grid .pos-product-price {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(32, 40, 50, .86);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

body.pos-fullscreen .pos-products.view-grid .pos-product-copy {
  min-width: 0;
  padding: 7px 9px;
  display: grid;
  align-content: center;
}

body.pos-fullscreen .pos-products.view-grid .pos-product-copy strong {
  overflow: hidden;
  color: var(--pos-ink);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.pos-fullscreen .pos-products.view-grid .pos-product-copy small,
body.pos-fullscreen .pos-products.view-grid .pos-product-list-price {
  display: none;
}

body.pos-fullscreen .pos-products.view-list {
  display: grid;
  grid-auto-rows: 64px;
  gap: 6px;
}

body.pos-fullscreen .pos-products.view-list .pos-product {
  min-height: 64px;
  padding: 0 12px 0 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--pos-line);
  border-radius: 6px;
  background: #fff;
  color: var(--pos-ink);
  text-align: left;
}

body.pos-fullscreen .pos-products.view-list .pos-product-media {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-right: 1px solid var(--pos-line);
  background: #f7f8fa;
}

body.pos-fullscreen .pos-products.view-list .pos-product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.pos-fullscreen .pos-products.view-list .pos-product-price {
  display: none;
}

body.pos-fullscreen .pos-products.view-list .pos-product-copy {
  min-width: 0;
}

body.pos-fullscreen .pos-products.view-list .pos-product-copy strong,
body.pos-fullscreen .pos-products.view-list .pos-product-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.pos-fullscreen .pos-products.view-list .pos-product-copy small {
  color: var(--pos-muted);
  font-size: 11px;
}

body.pos-fullscreen .pos-products.view-list .pos-product-list-price {
  color: var(--pos-ink);
  font-weight: 800;
}

body.pos-fullscreen .pos-recent-sales {
  display: none;
}

body.pos-fullscreen .pos-app-ticket {
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto auto;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--pos-panel);
  color: var(--pos-ink);
  box-shadow: none;
}

body.pos-fullscreen .pos-app-ticket-head {
  grid-row: 1;
  min-height: 64px;
  padding: 9px 12px 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--pos-line);
  background: #fff;
}

body.pos-fullscreen .pos-app-ticket-head > div:first-child {
  min-width: 0;
}

body.pos-fullscreen .pos-ticket-order-number {
  display: block;
  margin-bottom: 1px;
  color: var(--pos-accent-strong);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

body.pos-fullscreen .pos-app-ticket-head h2 {
  margin: 0;
  overflow: hidden;
  color: var(--pos-ink);
  font-size: 19px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.pos-fullscreen .pos-app-ticket-head p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--pos-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.pos-fullscreen .pos-ticket-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.pos-fullscreen .pos-ticket-head-actions .icon-button,
body.pos-fullscreen .pos-ticket-menu summary {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--pos-line);
  border-radius: 6px;
  background: #fff;
  color: var(--pos-ink);
}

body.pos-fullscreen .pos-ticket-menu {
  position: relative;
}

body.pos-fullscreen .pos-ticket-menu > div {
  position: absolute;
  z-index: 30;
  top: 44px;
  right: 0;
  width: 260px;
  padding: 5px;
  display: grid;
  border: 1px solid var(--pos-line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(32, 40, 50, .18);
}

body.pos-fullscreen .pos-ticket-menu > div button {
  min-height: 42px;
  padding: 0 10px;
  justify-content: flex-start;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--pos-ink);
}

body.pos-fullscreen .pos-ticket-menu > div button:hover {
  background: var(--pos-hover);
}

body.pos-fullscreen .pos-ticket-menu > div button.danger-text {
  color: #b42318;
}

body.pos-fullscreen .pos-ticket-context {
  grid-row: 2;
  min-height: 52px;
  padding: 7px 12px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-bottom: 1px solid var(--pos-line);
  border-radius: 0;
  background: #fff;
  color: var(--pos-ink);
  text-align: left;
}

body.pos-fullscreen .pos-ticket-context > span:first-child {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--pos-accent-soft);
  color: var(--pos-accent-strong);
}

body.pos-fullscreen .pos-ticket-context strong,
body.pos-fullscreen .pos-ticket-context small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.pos-fullscreen .pos-ticket-context strong {
  font-size: 13px;
}

body.pos-fullscreen .pos-ticket-context small {
  margin-top: 2px;
  color: var(--pos-muted);
  font-size: 10px;
}

body.pos-fullscreen .pos-app-start-order {
  grid-row: 3;
  margin: 10px 12px;
  min-height: 56px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  border: 1px solid var(--pos-accent);
  border-radius: 6px;
  background: var(--pos-accent-soft);
  color: var(--pos-ink);
  text-align: left;
}

body.pos-fullscreen .cart-lines {
  grid-row: 4;
  min-height: 0;
  padding: 4px 0;
  overflow-y: auto;
  background: #fff;
}

body.pos-fullscreen .cart-lines > .empty {
  height: 100%;
  min-height: 140px;
  padding: 20px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 0;
  background: #fff;
  color: var(--pos-muted);
  text-align: center;
}

body.pos-fullscreen .cart-line {
  width: 100%;
  min-height: 72px;
  padding: 9px 12px 9px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  border-radius: 0;
  background: #fff;
  color: var(--pos-ink);
  text-align: left;
  box-shadow: none;
}

body.pos-fullscreen .cart-line > div:first-child {
  min-width: 0;
}

body.pos-fullscreen .cart-line > div:first-child strong,
body.pos-fullscreen .cart-line > div:first-child span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.pos-fullscreen .cart-line > div:first-child strong {
  color: var(--pos-ink);
  font-size: 13px;
}

body.pos-fullscreen .cart-line > div:first-child span {
  margin-top: 3px;
  color: var(--pos-muted);
  font-size: 10px;
}

body.pos-fullscreen .cart-line > strong {
  color: var(--pos-ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.pos-fullscreen .cart-line > svg {
  width: 20px;
  height: 20px;
  color: var(--pos-muted);
}

body.pos-fullscreen .cart-line:hover,
body.pos-fullscreen .cart-line:focus-visible {
  background: var(--pos-hover);
}

body.pos-fullscreen .pos-summary {
  grid-row: 5;
  padding: 8px 14px;
  border-top: 1px solid var(--pos-line);
  background: #fafbfc;
}

body.pos-fullscreen .pos-summary > div {
  min-height: 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--pos-muted);
  font-size: 12px;
}

body.pos-fullscreen .pos-summary > div.grand {
  min-height: 36px;
  margin-top: 3px;
  padding-top: 5px;
  border-top: 1px solid var(--pos-line);
  color: var(--pos-ink);
  font-size: 19px;
  font-weight: 850;
}

body.pos-fullscreen .restaurant-order-actions {
  display: none;
}

body.pos-fullscreen .pos-ticket-actions {
  grid-row: 6;
  min-height: 64px;
  display: grid;
  grid-template-columns: 38% 62%;
  border-top: 1px solid var(--pos-line);
  background: #fff;
}

body.pos-fullscreen .pos-ticket-actions > button {
  min-width: 0;
  min-height: 64px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--pos-muted);
  box-shadow: none;
}

body.pos-fullscreen .pos-ticket-actions > button + button {
  border-left: 1px solid var(--pos-line);
}

body.pos-fullscreen .pos-ticket-actions > button.pos-pay {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--pos-accent);
  color: #fff;
}

body.pos-fullscreen .pos-ticket-actions > button.pos-pay strong {
  max-width: 64%;
  overflow: hidden;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.pos-fullscreen .pos-register-state {
  grid-row: 7;
  min-height: 28px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--pos-line);
  background: #fff;
  color: var(--pos-muted);
  font-size: 9px;
  font-weight: 700;
}

body.pos-fullscreen .pos-register-state.open {
  color: #16744b;
}

body.pos-fullscreen .pos-register-state svg {
  width: 13px;
  height: 13px;
}

body.pos-fullscreen .pos-app-bottom-categories {
  min-height: 72px;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  display: flex;
  gap: 7px;
  overflow-x: auto;
  border-top: 1px solid var(--pos-line);
  background: #fff;
  scrollbar-width: thin;
}

body.pos-fullscreen .pos-app-bottom-categories button {
  flex: 0 0 154px;
  min-width: 154px;
  min-height: 56px;
  padding: 7px 10px;
  display: grid;
  grid-template-columns: 16px minmax(88px, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--pos-line);
  border-radius: 6px;
  background: #fff;
  color: var(--pos-ink);
  text-align: left;
}

body.pos-fullscreen .pos-app-bottom-categories button:not(:first-child) {
  flex-basis: 200px;
  min-width: 184px;
}

body.pos-fullscreen .pos-app-bottom-categories button.active {
  border-color: var(--pos-accent);
  background: var(--pos-accent-soft);
  box-shadow: inset 0 -2px 0 var(--pos-accent);
}

body.pos-fullscreen .pos-app-bottom-categories .pos-category-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--category-color, var(--pos-accent));
}

body.pos-fullscreen .pos-app-bottom-categories .pos-category-label {
  width: auto;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--pos-ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.pos-fullscreen .pos-app-bottom-categories strong {
  color: var(--pos-muted);
  font-size: 11px;
}

/* Shared full-screen POS dialogs */
body.pos-fullscreen dialog[class*="pos-"] {
  color: var(--pos-ink);
}

.modal.pos-orders-modal,
.modal.pos-checkout-modal,
.modal.pos-ticket-split-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--pos-bg, #eef1f4);
}

.modal.pos-orders-modal::backdrop,
.modal.pos-checkout-modal::backdrop,
.modal.pos-ticket-split-modal::backdrop {
  background: rgba(32, 40, 50, .24);
}

.modal.pos-orders-modal > .modal-inner,
.modal.pos-ticket-split-modal > .modal-inner {
  width: 100%;
  height: 100dvh;
  max-height: none;
  padding: 0;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) 60px;
  overflow: hidden;
  border-radius: 0;
  background: var(--pos-bg, #eef1f4);
}

.modal.pos-orders-modal .modal-head,
.modal.pos-ticket-split-modal .modal-head {
  min-height: 64px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--pos-line, #d9e0e7);
  background: #fff;
}

.modal.pos-orders-modal .modal-head > div {
  flex: 1;
}

.modal.pos-orders-modal .modal-head h2,
.modal.pos-ticket-split-modal .modal-head h2 {
  margin: 0;
  color: var(--pos-ink, #202832);
  font-size: 21px;
}

.modal.pos-orders-modal .modal-eyebrow,
.modal.pos-ticket-split-modal .modal-eyebrow {
  color: var(--pos-accent-strong, #bd8400);
}

.modal.pos-orders-modal .modal-head .field-hint {
  margin: 2px 0 0;
  color: var(--pos-muted, #657181);
  font-size: 11px;
}

.modal.pos-orders-modal .pos-orders-content {
  min-height: 0;
  padding: 14px 18px;
  overflow: auto;
  background: var(--pos-bg, #eef1f4);
}

.modal.pos-orders-modal .pos-orders-new-order {
  width: 100%;
  min-height: 58px;
  margin: 0 0 12px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--pos-accent, #e7aa18);
  border-radius: 6px;
  background: var(--pos-accent-soft, #fff7df);
  color: var(--pos-ink, #202832);
  text-align: left;
}

.modal.pos-orders-modal .pos-orders-new-order > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  grid-row: 1 / span 2;
  border-radius: 6px;
  background: #fff;
  color: var(--pos-accent-strong, #bd8400);
}

.modal.pos-orders-modal .pos-orders-new-order strong,
.modal.pos-orders-modal .pos-orders-new-order small {
  grid-column: 2;
}

.modal.pos-orders-modal .pos-orders-new-order small {
  color: var(--pos-muted, #657181);
}

.modal.pos-orders-modal .pos-orders-toolbar {
  min-height: 52px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal.pos-orders-modal .pos-orders-sort {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--pos-line, #d9e0e7);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.modal.pos-orders-modal .pos-orders-sort button {
  min-width: 105px;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--pos-muted, #657181);
}

.modal.pos-orders-modal .pos-orders-sort button + button {
  border-left: 1px solid var(--pos-line, #d9e0e7);
}

.modal.pos-orders-modal .pos-orders-sort button.active {
  background: var(--pos-accent, #e7aa18);
  color: #17140c;
}

.modal.pos-orders-modal .pos-orders-search {
  width: min(380px, 40vw);
  min-height: 42px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--pos-line, #d9e0e7);
  border-radius: 6px;
  background: #fff;
  color: var(--pos-muted, #657181);
}

.modal.pos-orders-modal .pos-orders-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--pos-ink, #202832);
  box-shadow: none;
}

.pos-open-order-table {
  overflow: hidden;
  border: 1px solid var(--pos-line, #d9e0e7);
  border-radius: 6px;
  background: #fff;
}

.pos-open-order-table-head,
.pos-open-order-row {
  display: grid;
  grid-template-columns: 46px minmax(220px, 1.4fr) minmax(150px, .8fr) minmax(130px, .7fr) 150px 54px;
  align-items: center;
}

.pos-open-order-table-head {
  min-height: 42px;
  padding: 0 8px;
  border-bottom: 1px solid var(--pos-line, #d9e0e7);
  background: #f7f8fa;
  color: var(--pos-muted, #657181);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.pos-open-order-row {
  min-height: 66px;
  padding: 0 8px;
  border-bottom: 1px solid #edf0f3;
  color: var(--pos-ink, #202832);
}

.pos-open-order-row:last-child {
  border-bottom: 0;
}

.pos-open-order-row:hover {
  background: #fafbfc;
}

.pos-open-order-row.selected {
  background: var(--pos-accent-soft, #fff7df);
}

.pos-order-check {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pos-muted, #657181);
}

.pos-order-check.checked {
  color: var(--pos-accent-strong, #bd8400);
}

.pos-order-main {
  min-width: 0;
  display: grid;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.pos-order-main strong,
.pos-order-main small,
.pos-order-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-order-main strong {
  color: var(--pos-ink, #202832);
  font-size: 14px;
}

.pos-order-main small,
.pos-order-cell {
  color: var(--pos-muted, #657181);
  font-size: 11px;
}

.pos-order-amount {
  color: var(--pos-ink, #202832);
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

.pos-open-order-row > .icon-button {
  justify-self: end;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--pos-line, #d9e0e7);
  background: #fff;
}

.modal.pos-orders-modal .modal-actions {
  min-height: 60px;
  margin: 0;
  padding: 8px 18px calc(8px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--pos-line, #d9e0e7);
  background: #fff;
}

.pos-orders-selection-actions {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pos-orders-selection-actions > span {
  margin-right: 4px;
  color: var(--pos-muted, #657181);
  font-size: 12px;
  font-weight: 750;
}

.pos-orders-selection-actions button {
  min-height: 40px;
}

.pos-orders-selection-actions .danger-text {
  color: #b42318;
}

/* Client picker and editor */
.modal.pos-client-modal {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(70vw, 980px);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.modal.pos-client-modal::backdrop {
  background: rgba(32, 40, 50, .56);
}

.modal.pos-client-modal > .modal-inner {
  width: 100%;
  height: 100dvh;
  max-height: none;
  padding: 0;
  display: grid;
  grid-template-rows: 68px 58px 54px minmax(0, 1fr);
  overflow: hidden;
  border-radius: 0;
  background: #fff;
}

.modal.pos-client-modal .modal-head {
  min-height: 68px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--pos-line, #d9e0e7);
  background: #fff;
}

.modal.pos-client-modal .modal-head h2 {
  margin: 0;
  color: var(--pos-ink, #202832);
  font-size: 21px;
}

.modal.pos-client-modal .pos-client-search {
  min-height: 58px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--pos-line, #d9e0e7);
  color: var(--pos-muted, #657181);
}

.modal.pos-client-modal .pos-client-search input {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--pos-ink, #202832);
  box-shadow: none;
}

.modal.pos-client-modal .pos-client-create {
  min-height: 54px;
  padding: 0 22px;
  justify-content: flex-start;
  border: 0;
  border-bottom: 1px solid var(--pos-line, #d9e0e7);
  border-radius: 0;
  background: #fff;
  color: var(--pos-green, #2f9f67);
}

.modal.pos-client-modal .pos-client-create span {
  display: grid;
  text-align: left;
}

.modal.pos-client-modal .pos-client-create small {
  color: var(--pos-muted, #657181);
}

.modal.pos-client-modal .pos-client-list {
  min-height: 0;
  padding: 8px 0;
  overflow-y: auto;
  background: #fff;
}

.modal.pos-client-modal .pos-client-list::before {
  content: "Clientes recientes";
  padding: 8px 22px 10px;
  display: block;
  color: var(--pos-muted, #657181);
  font-size: 12px;
  font-weight: 850;
}

.modal.pos-client-modal .pos-client-row {
  width: 100%;
  min-height: 60px;
  padding: 7px 22px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 11px;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  border-radius: 0;
  background: #fff;
  color: var(--pos-ink, #202832);
  text-align: left;
}

.modal.pos-client-modal .pos-client-row.active {
  background: var(--pos-accent-soft, #fff7df);
}

.modal.pos-client-modal .pos-client-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf0f3;
  color: var(--pos-muted, #657181);
  font-weight: 850;
}

.modal.pos-client-modal .pos-client-row strong,
.modal.pos-client-modal .pos-client-row small {
  display: block;
}

.modal.pos-client-modal .pos-client-row small {
  margin-top: 3px;
  color: var(--pos-muted, #657181);
}

.modal.pos-client-modal.client-create-mode > .modal-inner {
  grid-template-rows: minmax(0, 1fr);
}

.modal.pos-client-modal.client-create-mode > .modal-inner > .modal-head,
.modal.pos-client-modal.client-create-mode > .modal-inner > .pos-client-search,
.modal.pos-client-modal.client-create-mode > .modal-inner > .pos-client-create,
.modal.pos-client-modal.client-create-mode > .modal-inner > .pos-client-list {
  display: none;
}

.pos-client-create-form {
  min-height: 0;
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr);
  overflow: hidden;
}

.pos-client-create-form[hidden] {
  display: none;
}

.pos-client-create-head {
  min-height: 68px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--pos-line, #d9e0e7);
  background: #fff;
}

.pos-client-create-head h2 {
  margin: 0;
  color: var(--pos-ink, #202832);
  font-size: 21px;
}

.pos-text-action {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--pos-green, #2f9f67);
  font-weight: 850;
  text-transform: uppercase;
}

.pos-client-fields {
  min-height: 0;
  padding: 22px 28px 60px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 20px 28px;
  overflow-y: auto;
}

.pos-client-fields label {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  color: var(--pos-muted, #657181);
}

.pos-client-fields label:not(.span-2) {
  grid-template-columns: 1fr;
  padding-left: 44px;
}

.pos-client-fields label.span-2 {
  grid-column: 1 / -1;
}

.pos-client-fields label > svg {
  margin-bottom: 11px;
  color: var(--pos-ink, #202832);
}

body.pos-fullscreen .pos-service-picker {
  position: relative;
  min-width: 0;
}

body.pos-fullscreen .pos-service-picker > summary {
  min-height: 62px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--pos-line, #d9e0e7);
  border-radius: 6px;
  background: #f8fafb;
  color: var(--pos-ink, #202832);
  cursor: pointer;
  list-style: none;
}

body.pos-fullscreen .pos-service-picker > summary::-webkit-details-marker {
  display: none;
}

body.pos-fullscreen .pos-service-picker > summary > svg:first-child {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 6px;
  background: #e9f0f5;
}

body.pos-fullscreen .pos-service-picker > summary strong,
body.pos-fullscreen .pos-service-picker > summary small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.pos-fullscreen .pos-service-picker > summary small {
  margin-top: 3px;
  color: var(--pos-muted, #657181);
  font-size: 11px;
}

body.pos-fullscreen .pos-service-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 6px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--pos-line, #d9e0e7);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 34px rgb(32 40 50 / 16%);
}

body.pos-fullscreen .pos-service-options button {
  min-height: 46px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--pos-ink, #202832);
  text-align: left;
}

body.pos-fullscreen .pos-service-options button:hover,
body.pos-fullscreen .pos-service-options button.active {
  background: var(--pos-accent-soft, #fff7df);
}

.pos-assign-list button span,
.pos-assign-list button strong,
.pos-assign-list button small {
  min-width: 0;
  display: block;
}

.pos-assign-list button small {
  margin-top: 3px;
  color: var(--pos-muted, #657181);
}

.pos-client-fields label > span {
  min-width: 0;
  display: grid;
  gap: 2px;
  font-size: 11px;
}

.pos-client-fields input,
.pos-client-fields textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #9ba5b1;
  border-radius: 0;
  background: transparent;
  color: var(--pos-ink, #202832);
  box-shadow: none;
}

/* Checkout */
.modal.pos-checkout-modal > .modal-inner {
  width: 100%;
  height: 100dvh;
  max-height: none;
  padding: 0;
  display: grid;
  grid-template-columns: clamp(330px, 28vw, 470px) minmax(0, 1fr);
  overflow: hidden;
  border-radius: 0;
  background: var(--pos-bg, #eef1f4);
}

.modal.pos-checkout-modal .pos-checkout-ticket-summary {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border-right: 1px solid var(--pos-line, #d9e0e7);
  background: #fff;
  color: var(--pos-ink, #202832);
}

.modal.pos-checkout-modal .pos-checkout-pane {
  min-width: 0;
  min-height: 0;
  padding: 0 18px 82px;
  overflow-y: auto;
  scroll-padding-bottom: 90px;
  background: var(--pos-bg, #eef1f4);
}

.modal.pos-checkout-modal .modal-head {
  min-height: 64px;
  margin: 0 -18px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--pos-line, #d9e0e7);
  background: #fff;
}

.modal.pos-checkout-modal .modal-head h2 {
  margin: 0;
  color: var(--pos-ink, #202832);
  font-size: 20px;
}

.modal.pos-checkout-modal .pos-checkout-total {
  min-height: 118px;
  margin: 0 -18px;
  padding: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  border-bottom: 1px solid var(--pos-line, #d9e0e7);
  background: #fff;
}

.modal.pos-checkout-modal .pos-checkout-total span {
  color: var(--pos-muted, #657181);
  font-size: 12px;
}

.modal.pos-checkout-modal .pos-checkout-total strong {
  margin-top: 5px;
  color: var(--pos-ink, #202832);
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1;
}

.modal.pos-checkout-modal .pos-checkout-order-actions,
.modal.pos-checkout-modal .pos-checkout-payment-mode {
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.modal.pos-checkout-modal .pos-checkout-order-actions button,
.modal.pos-checkout-modal .pos-checkout-payment-mode button {
  min-height: 58px;
  padding: 8px 12px;
  border: 1px solid var(--pos-line, #d9e0e7);
  border-radius: 6px;
  background: #fff;
  color: var(--pos-ink, #202832);
}

.modal.pos-checkout-modal .pos-checkout-order-actions button.active,
.modal.pos-checkout-modal .pos-checkout-payment-mode button.active {
  border-color: var(--pos-accent, #e7aa18);
  box-shadow: inset 0 -2px 0 var(--pos-accent, #e7aa18);
}

.modal.pos-checkout-modal .pos-checkout-order-actions button span {
  display: grid;
  text-align: left;
}

.modal.pos-checkout-modal .pos-checkout-order-actions button small {
  color: var(--pos-muted, #657181);
}

.modal.pos-checkout-modal .pos-checkout-section {
  margin-top: 14px;
}

.modal.pos-checkout-modal .pos-checkout-section h3 {
  margin: 0 0 8px;
  color: var(--pos-ink, #202832);
  font-size: 12px;
}

.modal.pos-checkout-modal .pos-payment-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.modal.pos-checkout-modal .pos-payment-choices button {
  min-height: 62px;
  padding: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid var(--pos-line, #d9e0e7);
  border-radius: 6px;
  background: #fff;
  color: var(--pos-ink, #202832);
}

.modal.pos-checkout-modal .pos-payment-choices button.active {
  border-color: var(--pos-accent, #e7aa18);
  box-shadow: inset 0 -2px 0 var(--pos-accent, #e7aa18);
}

.modal.pos-checkout-modal .pos-checkout-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal.pos-checkout-modal .pos-quick-cash {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.modal.pos-checkout-modal .pos-quick-cash button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--pos-line, #d9e0e7);
  background: #fff;
}

.modal.pos-checkout-modal .pos-tender-input {
  margin-top: 8px;
  display: grid;
  gap: 4px;
  color: var(--pos-muted, #657181);
  font-size: 11px;
}

.modal.pos-checkout-modal .pos-tender-input input {
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--pos-line, #d9e0e7);
  border-radius: 6px;
  background: #fff;
  color: var(--pos-ink, #202832);
  font-size: 24px;
  font-weight: 850;
  text-align: right;
}

.modal.pos-checkout-modal .pos-mixed-payment-rows {
  display: grid;
  gap: 8px;
}

.modal.pos-checkout-modal .pos-mixed-payment-row {
  min-height: 70px;
  padding: 9px;
  display: grid;
  grid-template-columns: 38px minmax(170px, 1fr) minmax(150px, .8fr) 40px;
  align-items: end;
  gap: 8px;
  border: 1px solid var(--pos-line, #d9e0e7);
  border-radius: 6px;
  background: #fff;
}

.modal.pos-checkout-modal .pos-mixed-payment-index {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 5px;
  background: #edf0f3;
  color: var(--pos-ink, #202832);
  font-weight: 850;
}

.modal.pos-checkout-modal .pos-mixed-payment-row label {
  display: grid;
  gap: 3px;
  color: var(--pos-muted, #657181);
  font-size: 10px;
}

.modal.pos-checkout-modal .pos-mixed-payment-row select,
.modal.pos-checkout-modal .pos-mixed-payment-row input {
  min-height: 40px;
  border: 1px solid var(--pos-line, #d9e0e7);
  border-radius: 5px;
  background: #fff;
  color: var(--pos-ink, #202832);
}

.modal.pos-checkout-modal .pos-mixed-payment-balance {
  min-height: 42px;
  margin-top: 8px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--pos-line, #d9e0e7);
  color: var(--pos-ink, #202832);
}

.modal.pos-checkout-modal .pos-checkout-details {
  margin-top: 14px;
  border: 1px solid var(--pos-line, #d9e0e7);
  border-radius: 6px;
  background: #fff;
}

.modal.pos-checkout-modal .pos-checkout-details summary {
  min-height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--pos-ink, #202832);
  cursor: pointer;
}

.modal.pos-checkout-modal .pos-checkout-details > div {
  padding: 12px;
}

.modal.pos-checkout-modal .pos-checkout-hint {
  min-height: 22px;
  margin: 10px 0;
  color: #b42318;
}

.modal.pos-checkout-modal .pos-checkout-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.modal.pos-checkout-modal .pos-checkout-result > div {
  min-height: 56px;
  padding: 8px 12px;
  display: grid;
  border: 1px solid var(--pos-line, #d9e0e7);
  border-radius: 6px;
  background: #fff;
}

.modal.pos-checkout-modal .pos-checkout-result span {
  color: var(--pos-muted, #657181);
  font-size: 10px;
}

.modal.pos-checkout-modal .pos-checkout-result strong {
  color: var(--pos-ink, #202832);
  font-size: 18px;
}

.modal.pos-checkout-modal .pos-checkout-actions {
  position: fixed;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: clamp(330px, 28vw, 470px);
  min-height: 68px;
  margin: 0;
  padding: 9px 18px calc(9px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--pos-line, #d9e0e7);
  background: #fff;
}

.modal.pos-checkout-modal .pos-checkout-actions button {
  min-height: 48px;
}

.modal.pos-checkout-modal .pos-checkout-actions .primary {
  min-width: 180px;
  background: var(--pos-accent, #e7aa18);
  color: #17140c;
  box-shadow: none;
}

.pos-checkout-ticket-head {
  min-height: 82px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--pos-line, #d9e0e7);
}

.pos-checkout-ticket-head strong,
.pos-checkout-ticket-head small {
  display: block;
}

.pos-checkout-ticket-head strong {
  color: var(--pos-ink, #202832);
  font-size: 18px;
}

.pos-checkout-ticket-head small {
  margin-top: 4px;
  color: var(--pos-muted, #657181);
}

.pos-checkout-ticket-lines {
  min-height: 0;
}

.pos-checkout-ticket-line {
  min-height: 56px;
  padding: 9px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf0f3;
}

.pos-checkout-ticket-line > span {
  min-width: 0;
}

.pos-checkout-ticket-line strong,
.pos-checkout-ticket-line small {
  display: block;
}

.pos-checkout-ticket-line small {
  color: var(--pos-muted, #657181);
}

.pos-checkout-ticket-totals {
  padding: 12px 18px;
  border-top: 1px solid var(--pos-line, #d9e0e7);
}

/* Real open-ticket split board */
.modal.pos-ticket-split-modal > .modal-inner {
  grid-template-rows: 64px minmax(0, 1fr);
}

.modal.pos-ticket-split-modal .modal-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  justify-content: initial;
}

@media (max-height: 820px) and (min-width: 721px) {
  .modal.pos-checkout-modal .pos-checkout-total {
    min-height: 90px;
    padding: 10px 18px;
  }

  .modal.pos-checkout-modal .pos-checkout-total strong {
    margin-top: 3px;
    font-size: 42px;
  }

  .modal.pos-checkout-modal .pos-checkout-order-actions,
  .modal.pos-checkout-modal .pos-checkout-payment-mode {
    margin-top: 7px;
    gap: 6px;
  }

  .modal.pos-checkout-modal .pos-checkout-order-actions button,
  .modal.pos-checkout-modal .pos-checkout-payment-mode button {
    min-height: 46px;
    padding: 5px 10px;
  }

  .modal.pos-checkout-modal .pos-checkout-section {
    margin-top: 8px;
  }

  .modal.pos-checkout-modal .pos-checkout-section h3 {
    margin-bottom: 5px;
  }

  .modal.pos-checkout-modal .pos-payment-choices {
    gap: 6px;
  }

  .modal.pos-checkout-modal .pos-payment-choices button {
    min-height: 44px;
    padding: 4px 8px;
  }

  .modal.pos-checkout-modal .pos-quick-cash button {
    min-height: 30px;
  }

  .modal.pos-checkout-modal .pos-tender-input {
    margin-top: 5px;
  }

  .modal.pos-checkout-modal .pos-tender-input input {
    min-height: 46px;
    font-size: 21px;
  }
}

.pos-ticket-split-board {
  min-height: 0;
  padding: 16px;
  display: flex;
  align-items: stretch;
  gap: 12px;
  overflow-x: auto;
  background: var(--pos-bg, #eef1f4);
}

.pos-ticket-split-column {
  width: min(430px, 38vw);
  min-width: 330px;
  min-height: 0;
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr) 68px;
  overflow: hidden;
  border: 1px solid var(--pos-line, #d9e0e7);
  border-radius: 6px;
  background: #fff;
}

.pos-ticket-split-column > header {
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--pos-line, #d9e0e7);
}

.pos-ticket-split-column > header h3 {
  margin: 0;
  overflow: hidden;
  color: var(--pos-ink, #202832);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-ticket-split-column > header > span {
  display: flex;
  gap: 4px;
}

.pos-ticket-split-column > header button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pos-muted, #657181);
}

.pos-ticket-split-items {
  min-height: 0;
  overflow-y: auto;
}

.pos-ticket-split-item {
  width: 100%;
  min-height: 56px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  border-radius: 0;
  background: #fff;
  color: var(--pos-ink, #202832);
  text-align: left;
}

.pos-ticket-split-item.selected {
  background: var(--pos-accent-soft, #fff7df);
}

.pos-ticket-split-item > span:first-child {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #a8b1bc;
  border-radius: 4px;
  color: transparent;
}

.pos-ticket-split-item.selected > span:first-child {
  border-color: var(--pos-accent, #e7aa18);
  background: var(--pos-accent, #e7aa18);
  color: #17140c;
}

.pos-ticket-split-item strong,
.pos-ticket-split-item small {
  display: block;
}

.pos-ticket-split-item small {
  margin-top: 2px;
  color: var(--pos-muted, #657181);
}

.pos-ticket-split-empty {
  height: 100%;
  min-height: 160px;
  padding: 20px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--pos-muted, #657181);
  text-align: center;
}

.pos-ticket-split-column > footer {
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--pos-line, #d9e0e7);
  background: #fafbfc;
}

.pos-ticket-split-column > footer > span {
  display: grid;
}

.pos-ticket-split-column > footer small {
  color: var(--pos-muted, #657181);
}

.pos-ticket-split-column > footer button {
  min-height: 46px;
  background: var(--pos-accent, #e7aa18);
  border-color: var(--pos-accent, #e7aa18);
  color: #17140c;
}

.pos-ticket-split-add {
  width: 76px;
  min-width: 76px;
  min-height: 0;
  display: grid;
  place-items: center;
  border: 1px dashed #aab4bf;
  border-radius: 6px;
  background: rgba(255, 255, 255, .55);
  color: var(--pos-muted, #657181);
}

.pos-ticket-split-add svg {
  width: 30px;
  height: 30px;
}

/* Assignment */
.modal.pos-assign-modal {
  width: min(520px, 92vw);
  max-width: 520px;
  border: 0;
  border-radius: 7px;
  background: #fff;
}

.modal.pos-assign-modal .modal-inner {
  width: 100%;
  max-height: min(80dvh, 700px);
  padding: 0;
  overflow: hidden;
  border-radius: 7px;
  background: #fff;
}

.modal.pos-assign-modal .modal-head {
  min-height: 64px;
  padding: 0 16px;
  border-bottom: 1px solid var(--pos-line, #d9e0e7);
}

.pos-assign-list {
  max-height: calc(80dvh - 64px);
  padding: 8px 0;
  overflow-y: auto;
}

.pos-assign-list button {
  width: 100%;
  min-height: 56px;
  padding: 8px 16px;
  justify-content: flex-start;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  border-radius: 0;
  background: #fff;
  color: var(--pos-ink, #202832);
}

/* Naming dialog */
.modal.pos-name-modal {
  width: min(620px, 92vw);
  border: 0;
  border-radius: 7px;
  background: #fff;
}

.modal.pos-name-modal .modal-inner {
  width: 100%;
  padding: 0;
  border-radius: 7px;
  background: #fff;
  color: var(--pos-ink, #202832);
}

.modal.pos-name-modal .modal-head,
.modal.pos-name-modal .field-hint,
.modal.pos-name-modal .pos-name-input {
  margin: 0;
  padding-right: 18px;
  padding-left: 18px;
}

.modal.pos-name-modal .modal-head {
  min-height: 64px;
  border-bottom: 1px solid var(--pos-line, #d9e0e7);
}

.modal.pos-name-modal .field-hint {
  padding-top: 14px;
}

.modal.pos-name-modal .pos-name-input {
  margin-top: 12px;
}

.modal.pos-name-modal .pos-name-input input,
.modal.pos-name-modal .pos-name-input textarea {
  width: 100%;
  border: 1px solid var(--pos-line, #d9e0e7);
  background: #fff;
  color: var(--pos-ink, #202832);
}

.modal.pos-name-modal .modal-actions {
  margin-top: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--pos-line, #d9e0e7);
}

/* Final light POS interaction layer */
body.pos-fullscreen .pos-app-rail-actions > button {
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
}

body.pos-fullscreen .pos-app-rail-actions > button strong {
  min-width: 26px;
  background: #26313b;
  color: #fff;
  text-align: center;
}

body.pos-fullscreen .pos-app-rail-actions > button.primary,
body.pos-fullscreen .pos-ticket-actions > button.pos-pay,
body.pos-fullscreen .pos-text-action {
  border-color: var(--pos-accent);
  background: var(--pos-accent);
  color: #fff;
}

body.pos-fullscreen .pos-app-rail-actions > button.pos-send-kitchen {
  border-color: #b9e1ce;
  background: #eaf8f1;
  color: #146c49;
}

body.pos-fullscreen .pos-app-rail-actions > button.pos-send-kitchen:hover,
body.pos-fullscreen .pos-app-rail-actions > button.pos-send-kitchen:focus-visible {
  border-color: #78c9a2;
  background: #d8f2e5;
}

body.pos-fullscreen #view-sales .pos-webapp-shell.restaurant .pos-app-actionbar .pos-app-rail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 860px);
}

body.pos-fullscreen #view-sales .pos-webapp-shell.counter .pos-app-actionbar .pos-app-rail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 580px);
}

@media (max-width: 720px) {
  body.pos-fullscreen #view-sales .pos-webapp-shell.restaurant .pos-app-actionbar .pos-app-rail-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.pos-fullscreen .pos-app-rail-actions > button.primary strong {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}

body.pos-fullscreen #view-sales .pos-app-rail-actions > button {
  min-height: 44px;
  padding: 0 18px;
  border-color: var(--pos-line);
  border-radius: 6px;
  background: #fff;
  color: var(--pos-ink);
  font-size: 14px;
}

body.pos-fullscreen #view-sales .pos-app-rail-actions > button.primary {
  border-color: var(--pos-accent);
  background: var(--pos-accent);
  color: #fff;
}

body.pos-fullscreen #view-sales .pos-app-rail-actions > button.primary strong {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}

body.pos-fullscreen #view-sales .pos-products.view-grid .pos-product:hover {
  border-color: var(--pos-accent);
}

body.pos-fullscreen #view-sales .pos-app-bottom-categories button.active {
  border-color: var(--pos-accent);
  background: var(--pos-accent-soft);
  box-shadow: inset 0 -2px 0 var(--pos-accent);
}

body.pos-fullscreen #view-sales .pos-app-start-order {
  border-color: #a8d4ae;
  background: var(--pos-accent-soft);
  color: var(--pos-ink);
}

body.pos-fullscreen #view-sales .cart-line {
  min-height: 72px;
  padding: 9px 12px 9px 16px;
  grid-template-columns: minmax(0, 1fr) auto 22px;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  border-radius: 0;
  background: #fff;
  color: var(--pos-ink);
  box-shadow: none;
}

body.pos-fullscreen #view-sales .cart-line > strong {
  color: var(--pos-ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.pos-fullscreen #view-sales .cart-line:hover,
body.pos-fullscreen #view-sales .cart-line:focus-visible {
  border-color: #edf0f3;
  background: var(--pos-hover);
  transform: none;
}

body.pos-fullscreen .pos-service-picker {
  min-width: 0;
  grid-row: 2;
}

/* Line editor */
.modal.pos-line-modal {
  width: min(560px, 94vw);
  max-width: 560px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: var(--pos-ink, #1f2933);
}

.modal.pos-line-modal > .modal-inner {
  width: 100%;
  max-height: min(82dvh, 680px);
  padding: 0;
  display: grid;
  grid-template-rows: 68px minmax(240px, 1fr) 68px;
  overflow: hidden;
  border-radius: 7px;
  background: #fff;
}

.modal.pos-line-modal .modal-head {
  min-height: 68px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--pos-line, #d6dde3);
}

.modal.pos-line-modal .modal-head h2 {
  margin: 0;
  font-size: 20px;
}

.pos-line-content {
  min-height: 0;
  padding: 28px;
  display: grid;
  align-content: center;
  gap: 28px;
}

.pos-line-product {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.pos-line-product > span:first-child {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: var(--pos-accent-soft, #edf7ee);
  color: var(--pos-accent-strong, #2e7d32);
}

.pos-line-product > span:first-child img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pos-line-product > span:first-child svg {
  width: 30px;
  height: 30px;
}

.pos-line-product > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.pos-line-product > div strong,
.pos-line-product > div small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-line-product > div strong {
  font-size: 20px;
}

.pos-line-product > div small {
  color: var(--pos-muted, #66727f);
  font-size: 13px;
}

.pos-line-product > strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pos-line-quantity {
  display: grid;
  grid-template-columns: 64px minmax(92px, 140px) 64px;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.pos-line-quantity button {
  width: 64px;
  height: 64px;
  min-height: 64px;
  padding: 0;
  border: 1px solid var(--pos-line, #d6dde3);
  border-radius: 50%;
  background: #fff;
  color: var(--pos-ink, #1f2933);
}

.pos-line-quantity strong {
  font-size: 34px;
  text-align: center;
}

.pos-line-quantity > div {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.pos-line-quantity > div span {
  color: var(--pos-muted, #66727f);
  font-size: 13px;
}

.pos-line-total {
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--pos-line, #d6dde3);
  font-size: 16px;
}

.pos-line-total strong {
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}

.modal.pos-line-modal .modal-actions {
  min-height: 68px;
  margin: 0;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--pos-line, #d6dde3);
  background: #fff;
}

.modal.pos-line-modal .modal-actions button {
  min-height: 46px;
}

.modal.pos-line-modal .modal-actions .danger-text {
  color: #b42318;
}

body.pos-fullscreen dialog[class*="pos-"] button.primary,
body.pos-fullscreen dialog[class*="pos-"] .pos-text-action,
.modal.pos-line-modal .modal-actions button.primary {
  border-color: var(--pos-accent, #43a047);
  background: var(--pos-accent, #43a047);
  color: #fff;
}

.modal.pos-line-modal .modal-head .icon-button {
  border-color: var(--pos-line, #d6dde3);
  background: #fff;
  color: var(--pos-ink, #1f2933);
}

/* Open orders remains inside the POS shell, below the persistent top bars. */
.modal.pos-orders-modal {
  inset: var(--pos-workspace-top, 112px) 0 0;
  width: 100vw;
  height: calc(100dvh - var(--pos-workspace-top, 112px));
  background: var(--pos-bg, #f1f3f5);
}

.modal.pos-orders-modal::backdrop {
  background: transparent;
}

.modal.pos-orders-modal > .modal-inner {
  height: 100%;
  grid-template-rows: 70px minmax(0, 1fr) 64px;
}

.modal.pos-orders-modal .modal-head {
  min-height: 70px;
  padding: 0 22px;
}

.modal.pos-orders-modal .modal-head h2 {
  font-size: 22px;
}

.modal.pos-orders-modal .pos-orders-content {
  padding: 18px 22px;
}

.modal.pos-orders-modal .pos-orders-toolbar {
  min-height: 56px;
  margin-bottom: 12px;
}

.modal.pos-orders-modal .pos-orders-sort button {
  min-width: 118px;
  min-height: 50px;
  padding: 0 18px;
  font-size: 14px;
}

.modal.pos-orders-modal .pos-orders-sort button.active {
  background: var(--pos-accent, #43a047);
  color: #fff;
}

.modal.pos-orders-modal .pos-orders-search {
  width: min(420px, 42vw);
  min-height: 50px;
  padding: 0 14px;
}

.modal.pos-orders-modal .pos-orders-search input {
  font-size: 15px;
}

.modal.pos-orders-modal .pos-open-order-table-head,
.modal.pos-orders-modal .pos-open-order-row {
  grid-template-columns: 58px minmax(260px, 1.5fr) minmax(160px, .75fr) minmax(150px, .7fr) 170px 64px;
}

.modal.pos-orders-modal .pos-open-order-table-head {
  min-height: 48px;
  padding: 0 12px;
}

.modal.pos-orders-modal .pos-open-order-row {
  min-height: 78px;
  padding: 0 12px;
}

.modal.pos-orders-modal .pos-order-check {
  width: 44px;
  height: 44px;
  min-height: 44px;
}

.modal.pos-orders-modal .pos-order-main {
  min-height: 54px;
  align-content: center;
}

.modal.pos-orders-modal .pos-order-main strong {
  font-size: 16px;
}

.modal.pos-orders-modal .pos-order-main small,
.modal.pos-orders-modal .pos-order-cell {
  font-size: 13px;
}

.modal.pos-orders-modal .pos-order-amount {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.modal.pos-orders-modal .pos-open-order-row > .icon-button {
  width: 48px;
  height: 48px;
  min-height: 48px;
}

.modal.pos-orders-modal .modal-actions {
  min-height: 64px;
  padding-right: 22px;
  padding-left: 22px;
}

/* Loyverse-style split payment: ticket summary, equal portions, one payment at a time. */
.modal.pos-split-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--pos-bg, #f1f3f5);
  color: var(--pos-ink, #1f2933);
}

.modal.pos-split-modal::backdrop {
  background: rgba(31, 41, 51, .28);
}

.modal.pos-split-modal > .modal-inner {
  width: 100%;
  height: 100dvh;
  max-height: none;
  padding: 0;
  display: grid;
  grid-template-columns: clamp(300px, 27vw, 430px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  grid-auto-rows: 0;
  overflow: hidden;
  border-radius: 0;
  background: var(--pos-bg, #f1f3f5);
}

.modal.pos-split-modal .pos-checkout-ticket-summary {
  min-width: 0;
  min-height: 0;
  grid-column: 1;
  grid-row: 1;
  overflow: auto;
  border-right: 1px solid var(--pos-line, #d6dde3);
  background: #fff;
}

.pos-payment-split-pane {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-column: 2;
  grid-row: 1;
  grid-template-rows: 70px 188px minmax(0, 1fr) 68px;
  overflow: hidden;
}

.modal.pos-split-modal .modal-head {
  min-height: 70px;
  padding: 0 22px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--pos-line, #d6dde3);
  background: #fff;
}

.modal.pos-split-modal .modal-head h2 {
  margin: 1px 0 0;
  font-size: 22px;
}

.pos-payment-split-counter {
  display: grid;
  grid-template-columns: 76px minmax(100px, 150px) 76px;
  align-items: center;
  justify-content: center;
  gap: 28px;
  border-bottom: 1px solid var(--pos-line, #d6dde3);
  background: #fff;
}

.pos-payment-split-counter > button {
  width: 76px;
  height: 76px;
  min-height: 76px;
  padding: 0;
  border: 1px solid var(--pos-line, #d6dde3);
  border-radius: 50%;
  background: #fff;
  color: var(--pos-ink, #1f2933);
}

.pos-payment-split-counter > div {
  display: grid;
  justify-items: center;
}

.pos-payment-split-counter strong {
  font-size: 50px;
  line-height: 1;
}

.pos-payment-split-counter span {
  margin-top: 6px;
  color: var(--pos-muted, #66727f);
  font-size: 15px;
}

.pos-payment-split-rows {
  min-height: 0;
  padding: 18px 22px;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
}

.pos-payment-split-row {
  min-height: 84px;
  padding: 12px;
  display: grid;
  grid-template-columns: 48px minmax(180px, 1fr) minmax(160px, .75fr) 116px;
  align-items: end;
  gap: 12px;
  border: 1px solid var(--pos-line, #d6dde3);
  border-radius: 6px;
  background: #fff;
}

.pos-payment-split-row.paid {
  border-color: #a9d7b0;
  background: var(--pos-accent-soft, #edf7ee);
}

.pos-payment-split-remove {
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border: 1px solid var(--pos-line, #d6dde3);
  background: #fff;
  color: #b42318;
}

.pos-payment-split-row label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--pos-muted, #66727f);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.pos-payment-split-row select,
.pos-payment-split-row input {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 1px solid var(--pos-line, #d6dde3);
  border-radius: 5px;
  background: #fff;
  color: var(--pos-ink, #1f2933);
  font-size: 16px;
}

.pos-payment-split-row input {
  padding: 0 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.pos-payment-split-pay {
  min-height: 48px;
  border-color: var(--pos-accent, #43a047);
  background: var(--pos-accent, #43a047);
  color: #fff;
  font-weight: 850;
}

body.pos-force-light .modal.pos-split-modal button.pos-payment-split-pay:not(.paid) {
  border-color: var(--pos-accent, #43a047);
  background: var(--pos-accent, #43a047);
  color: #fff;
}

.pos-payment-split-pay.paid {
  border-color: #92c99a;
  background: #dff1e2;
  color: var(--pos-accent-strong, #2e7d32);
}

body.pos-force-light .modal.pos-split-modal button.pos-payment-split-pay.paid {
  border-color: #92c99a;
  background: #dff1e2;
  color: var(--pos-accent-strong, #2e7d32);
}

.modal.pos-split-modal #posSplitTicketSummary .pos-checkout-ticket-head > span {
  color: var(--pos-accent-strong, #2e7d32);
}

body.pos-force-light dialog[class*="pos-"] button:focus-visible,
body.pos-force-light dialog[class*="pos-"] summary:focus-visible {
  outline-color: rgba(67, 160, 71, .42);
}

.pos-payment-split-footer {
  min-height: 68px;
  padding: 0 24px calc(env(safe-area-inset-bottom) + 2px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--pos-line, #d6dde3);
  background: #fff;
  font-size: 16px;
}

.pos-payment-split-footer strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

body.kds-fullscreen,
body.kds-fullscreen .app-shell,
body.kds-fullscreen .main,
body.kds-fullscreen #view-sales {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #101418;
  color: #f7fafc;
}

body.kds-fullscreen #view-sales {
  padding: 0;
}

body.kds-fullscreen .sidebar,
body.kds-fullscreen .topbar {
  display: none;
}

body.kds-fullscreen .main {
  grid-column: 1 / -1;
}

.kds-shell {
  --kds-panel: #171d23;
  --kds-panel-strong: #202832;
  --kds-line: #303a45;
  --kds-muted: #9da8b3;
  --kds-accent: #e7aa18;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: 64px 64px minmax(0, 1fr);
  background: #101418;
  color: #f7fafc;
}

.kds-header,
.kds-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--kds-line);
  background: var(--kds-panel);
}

.kds-header {
  padding: 0 18px;
}

.kds-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.kds-brand > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #2b2414;
  color: var(--kds-accent);
}

.kds-brand h2,
.kds-brand p {
  margin: 0;
}

.kds-brand h2 {
  font-size: 20px;
  letter-spacing: 0;
}

.kds-brand p {
  margin-top: 2px;
  color: var(--kds-muted);
  font-size: 12px;
  font-weight: 700;
}

.kds-header-actions,
.kds-filters,
.kds-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kds-header-actions button,
.kds-filters button {
  min-height: 40px;
  border: 1px solid var(--kds-line);
  border-radius: 8px;
  background: #11171d;
  color: #f7fafc;
}

.kds-header-actions button {
  width: 42px;
  padding: 0;
  display: grid;
  place-items: center;
}

.kds-filters button {
  padding: 0 14px;
  font-weight: 800;
}

.kds-filters button.active {
  border-color: var(--kds-accent);
  background: var(--kds-accent);
  color: #151008;
}

.kds-toolbar {
  padding: 10px 18px;
}

.kds-metrics > div {
  min-width: 104px;
  padding: 5px 12px;
  display: grid;
  gap: 1px;
  border-left: 1px solid var(--kds-line);
}

.kds-metrics span {
  color: var(--kds-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.kds-metrics strong {
  font-size: 18px;
}

.kds-board {
  min-height: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 14px;
  overflow: hidden;
}

.kds-column {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  border: 1px solid var(--kds-line);
  border-radius: 8px;
  background: #12181e;
  overflow: hidden;
}

.kds-column > header {
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--kds-line);
  background: var(--kds-panel-strong);
}

.kds-column > header span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.kds-column > header strong {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #11171d;
  color: #fff;
}

.kds-column.new > header span {
  color: #f8ca58;
}

.kds-column.progress > header span {
  color: #77c9ff;
}

.kds-column.ready > header span {
  color: #69db93;
}

.kds-ticket-list {
  min-height: 0;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
}

.kds-ticket {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--kds-line);
  border-radius: 8px;
  background: #f8fafc;
  color: #17202a;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .16);
}

.kds-ticket.late {
  border-color: #e05252;
  box-shadow: inset 4px 0 0 #e05252, 0 10px 20px rgba(0, 0, 0, .16);
}

.kds-ticket-head,
.kds-ticket footer,
.kds-ticket-lines div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kds-ticket-head > div {
  min-width: 0;
}

.kds-ticket-head span {
  color: #5d6875;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.kds-ticket-head h2 {
  margin: 2px 0 0;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kds-ticket-head p {
  margin: 3px 0 0;
  overflow: hidden;
  color: #677381;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kds-ticket-head > strong {
  min-width: 58px;
  padding: 8px 9px;
  border-radius: 8px;
  background: #edf1f5;
  text-align: center;
}

.kds-ticket-lines {
  display: grid;
  gap: 7px;
}

.kds-ticket-lines div {
  align-items: start;
  justify-content: start;
  padding: 8px 9px;
  border-radius: 7px;
  background: #edf1f5;
  font-size: 15px;
  font-weight: 800;
}

.kds-ticket-lines strong {
  min-width: 42px;
  color: #111820;
}

.kds-ticket-lines span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.kds-ticket-note {
  margin: 0;
  padding: 9px 10px;
  display: flex;
  gap: 8px;
  border-radius: 7px;
  background: #fff5d6;
  color: #6f4a00;
  font-size: 13px;
  font-weight: 800;
}

.kds-ticket footer {
  padding-top: 2px;
}

.kds-ticket footer > span {
  min-width: 0;
  overflow: hidden;
  color: #657181;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kds-ticket footer button {
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #171d23;
  color: #fff;
  font-weight: 900;
}

.kds-ticket footer button:disabled {
  opacity: .65;
}

.kds-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed var(--kds-line);
  border-radius: 8px;
  color: var(--kds-muted);
}

.kds-empty svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 980px) {
  .kds-shell {
    grid-template-rows: 58px auto minmax(0, 1fr);
  }

  .kds-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .kds-filters,
  .kds-metrics {
    overflow-x: auto;
  }

  .kds-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(340px, 1fr);
    overflow: auto;
  }

  .kds-column {
    min-height: 340px;
  }

  body.pos-fullscreen #view-sales .pos-webapp-shell {
    grid-template-rows: 58px 54px minmax(0, 1fr) 72px 56px;
  }

  body.pos-fullscreen #view-sales .pos-app-header {
    grid-row: 1;
  }

  body.pos-fullscreen #view-sales .pos-app-actionbar {
    grid-row: 2;
  }

  body.pos-fullscreen #view-sales .pos-app-layout {
    grid-row: 3;
  }

  body.pos-fullscreen #view-sales .pos-app-bottom-categories {
    grid-row: 4;
  }

  body.pos-fullscreen #view-sales .pos-mobile-switch {
    position: static;
    z-index: auto;
    grid-row: 5;
    inset: auto;
    width: auto;
    min-height: 56px;
    margin: 0;
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    border: 0;
    border-bottom: 1px solid var(--pos-line);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  body.pos-fullscreen #view-sales .pos-mobile-switch button {
    min-height: 48px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    color: var(--pos-muted);
  }

  body.pos-fullscreen #view-sales .pos-mobile-switch button.active {
    background: var(--pos-ink);
    box-shadow: inset 0 -2px 0 var(--pos-accent);
    color: #fff;
  }

  body.pos-fullscreen .pos-app-layout {
    display: block;
    position: relative;
  }

  body.pos-fullscreen .pos-app-layout > .pos-app-catalog,
  body.pos-fullscreen .pos-app-layout > .pos-app-ticket {
    position: absolute;
    inset: 0;
  }

  body.pos-fullscreen .pos-app-layout.mobile-catalog > .pos-app-ticket,
  body.pos-fullscreen .pos-app-layout.mobile-cart > .pos-app-catalog {
    display: none;
  }

  body.pos-fullscreen .pos-app-catalog {
    border-right: 0;
  }

  body.pos-fullscreen .pos-app-ticket {
    width: 100%;
  }

  .modal.pos-client-modal {
    width: min(86vw, 780px);
  }

  .modal.pos-checkout-modal > .modal-inner {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .modal.pos-checkout-modal .pos-checkout-actions {
    left: 280px;
  }

  .pos-open-order-table-head,
  .pos-open-order-row {
    grid-template-columns: 42px minmax(180px, 1fr) minmax(120px, .7fr) 130px 48px;
  }

  .pos-open-order-table-head > :nth-child(4),
  .pos-open-order-row > :nth-child(4) {
    display: none;
  }

  .modal.pos-orders-modal .pos-open-order-table-head,
  .modal.pos-orders-modal .pos-open-order-row {
    grid-template-columns: 54px minmax(220px, 1fr) minmax(145px, .7fr) 150px 60px;
  }

  .modal.pos-orders-modal .pos-open-order-table-head > :nth-child(4),
  .modal.pos-orders-modal .pos-open-order-row > :nth-child(4) {
    display: none;
  }

  .modal.pos-split-modal > .modal-inner {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .pos-payment-split-row {
    grid-template-columns: 48px minmax(145px, 1fr) minmax(130px, .7fr) 104px;
  }
}

@media (max-width: 720px) {
  body.kds-fullscreen,
  body.kds-fullscreen .app-shell,
  body.kds-fullscreen .main,
  body.kds-fullscreen #view-sales {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  .kds-shell {
    height: auto;
    min-height: 100dvh;
    grid-template-rows: auto auto auto;
  }

  .kds-header {
    position: sticky;
    top: 0;
    z-index: 5;
    min-height: 58px;
    padding: 8px 10px;
  }

  .kds-brand p,
  .kds-metrics {
    display: none;
  }

  .kds-brand {
    gap: 9px;
  }

  .kds-brand > span {
    width: 36px;
    height: 36px;
  }

  .kds-brand h2 {
    font-size: 18px;
  }

  .kds-header-actions {
    gap: 6px;
  }

  .kds-header-actions button {
    width: 40px;
    min-height: 40px;
  }

  .kds-toolbar {
    padding: 8px 10px;
  }

  .kds-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  .kds-filters button {
    min-width: 0;
    min-height: 42px;
    padding: 0 6px;
    font-size: 12px;
  }

  .kds-board {
    padding: 10px;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 12px;
    overflow: visible;
  }

  .kds-column {
    min-height: 0;
    grid-template-rows: 46px auto;
  }

  .kds-ticket-list {
    overflow: visible;
  }

  .kds-ticket {
    gap: 10px;
    padding: 10px;
  }

  .kds-ticket-head h2 {
    font-size: 17px;
  }

  .kds-ticket footer {
    align-items: stretch;
    flex-direction: column;
  }

  .kds-ticket footer button {
    width: 100%;
    justify-content: center;
  }

  body.pos-fullscreen #view-sales .pos-webapp-shell {
    grid-template-rows: 58px 70px minmax(0, 1fr) 64px 56px;
  }

  body.pos-fullscreen .pos-app-header {
    padding: 0 10px;
  }

  body.pos-fullscreen .pos-app-title p,
  body.pos-fullscreen .pos-app-status span,
  body.pos-fullscreen .pos-app-register span,
  body.pos-fullscreen .pos-app-rail-metrics {
    display: none;
  }

  body.pos-fullscreen .pos-app-status,
  body.pos-fullscreen .pos-app-register {
    min-width: 38px;
    padding: 0;
    justify-content: center;
  }

  body.pos-fullscreen .pos-app-actionbar {
    padding: 5px 8px;
  }

  body.pos-fullscreen .pos-app-rail-actions {
    width: 100%;
  }

  body.pos-fullscreen .pos-app-rail-actions > button {
    flex: 1;
  }

  body.pos-fullscreen .pos-app-catalog-top {
    padding: 7px 8px;
  }

  body.pos-fullscreen .pos-app-catalog-top > div:first-child {
    display: none;
  }

  body.pos-fullscreen .pos-toolbar-actions,
  body.pos-fullscreen .pos-search {
    width: 100%;
  }

  body.pos-fullscreen .pos-products.view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 154px;
  }

  body.pos-fullscreen .pos-products.view-grid .pos-product {
    height: 154px;
    grid-template-rows: 98px minmax(0, 1fr);
  }

  body.pos-fullscreen .pos-products.view-grid .pos-product-media {
    min-height: 98px;
  }

  .modal.pos-client-modal {
    width: 100vw;
  }

  .pos-client-fields {
    grid-template-columns: 1fr;
  }

  .pos-client-fields label,
  .pos-client-fields label.span-2 {
    grid-column: 1;
  }

  .modal.pos-checkout-modal > .modal-inner {
    grid-template-columns: 1fr;
  }

  .modal.pos-checkout-modal .pos-checkout-ticket-summary {
    display: none;
  }

  .modal.pos-checkout-modal .pos-checkout-actions {
    left: 0;
  }

  .modal.pos-checkout-modal .pos-checkout-total {
    min-height: 96px;
  }

  .modal.pos-checkout-modal .pos-checkout-order-actions,
  .modal.pos-checkout-modal .pos-checkout-payment-mode,
  .modal.pos-checkout-modal .pos-payment-choices {
    grid-template-columns: 1fr;
  }

  .modal.pos-checkout-modal .pos-mixed-payment-row {
    grid-template-columns: 36px minmax(0, 1fr) 40px;
  }

  .modal.pos-checkout-modal .pos-mixed-payment-row label {
    grid-column: 2;
  }

  .modal.pos-orders-modal .pos-orders-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .modal.pos-orders-modal .pos-orders-sort,
  .modal.pos-orders-modal .pos-orders-search {
    width: 100%;
  }

  .modal.pos-orders-modal .pos-orders-sort button {
    min-width: 0;
    flex: 1;
    padding: 0 8px;
    font-size: 12px;
  }

  .pos-open-order-table {
    border: 0;
    background: transparent;
  }

  .pos-open-order-table-head {
    display: none;
  }

  .pos-open-order-row {
    min-height: 84px;
    margin-bottom: 8px;
    padding: 8px;
    grid-template-columns: 36px minmax(0, 1fr) auto 42px;
    border: 1px solid var(--pos-line, #d9e0e7);
    border-radius: 6px;
    background: #fff;
  }

  .pos-open-order-row > :nth-child(3) {
    display: none;
  }

  .pos-order-amount {
    grid-column: 3;
  }

  .pos-open-order-row > .icon-button {
    grid-column: 4;
  }

  .modal.pos-orders-modal {
    inset: var(--pos-workspace-top, 128px) 0 0;
    height: calc(100dvh - var(--pos-workspace-top, 128px));
  }

  .modal.pos-orders-modal > .modal-inner {
    grid-template-rows: 64px minmax(0, 1fr) 62px;
  }

  .modal.pos-orders-modal .modal-head,
  .modal.pos-orders-modal .pos-orders-content,
  .modal.pos-orders-modal .modal-actions {
    padding-right: 10px;
    padding-left: 10px;
  }

  .modal.pos-orders-modal .pos-open-order-table-head {
    display: none;
  }

  .modal.pos-orders-modal .pos-open-order-row {
    min-height: 92px;
    margin-bottom: 9px;
    padding: 9px;
    grid-template-columns: 44px minmax(0, 1fr) auto 50px;
    border: 1px solid var(--pos-line, #d6dde3);
    border-radius: 6px;
    background: #fff;
  }

  .modal.pos-orders-modal .pos-open-order-row > :nth-child(3),
  .modal.pos-orders-modal .pos-open-order-row > :nth-child(4) {
    display: none;
  }

  .modal.pos-orders-modal .pos-order-amount {
    grid-column: 3;
    font-size: 15px;
  }

  .modal.pos-orders-modal .pos-open-order-row > .icon-button {
    grid-column: 4;
  }

  .pos-orders-selection-actions > span {
    display: none;
  }

  .pos-orders-selection-actions button span {
    display: none;
  }

  .pos-ticket-split-board {
    padding: 10px;
  }

  .pos-ticket-split-column {
    width: 82vw;
    min-width: 82vw;
  }

  .modal.pos-line-modal {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }

  .modal.pos-line-modal > .modal-inner {
    height: 100dvh;
    max-height: none;
    grid-template-rows: 64px minmax(0, 1fr) 68px;
    border-radius: 0;
  }

  .pos-line-content {
    padding: 22px;
  }

  .modal.pos-split-modal > .modal-inner {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
  }

  .modal.pos-split-modal .pos-checkout-ticket-summary {
    display: none;
  }

  .pos-payment-split-pane {
    grid-column: 1;
    grid-row: 1;
    grid-template-rows: 66px 150px minmax(0, 1fr) 64px;
  }

  .modal.pos-split-modal .modal-head {
    min-height: 66px;
    padding: 0 12px;
  }

  .pos-payment-split-counter {
    grid-template-columns: 62px minmax(86px, 120px) 62px;
    gap: 18px;
  }

  .pos-payment-split-counter > button {
    width: 62px;
    height: 62px;
    min-height: 62px;
  }

  .pos-payment-split-counter strong {
    font-size: 42px;
  }

  .pos-payment-split-rows {
    padding: 10px;
  }

  .pos-payment-split-row {
    min-height: 142px;
    padding: 10px;
    grid-template-columns: 44px minmax(0, 1fr) 98px;
    align-items: end;
    gap: 8px;
  }

  .pos-payment-split-row label:first-of-type {
    grid-column: 2 / 4;
  }

  .pos-payment-split-row label:last-of-type {
    grid-column: 2;
  }

  .pos-payment-split-remove {
    width: 44px;
    height: 48px;
    min-height: 48px;
    grid-row: 1 / 3;
    align-self: center;
  }

  .pos-payment-split-pay {
    grid-column: 3;
  }

  .pos-payment-split-footer {
    min-height: 64px;
    padding-right: 14px;
    padding-left: 14px;
  }
}
