.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 12px;
}

body[data-page="pos"] .pos-online-sync-settings {
  gap: 14px;
}

body[data-page="pos"] .pos-online-sync-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

body[data-page="pos"] .pos-online-sync-switch {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid #cfd7e3;
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 12px;
  color: var(--ink);
  cursor: pointer;
}

body[data-page="pos"] .pos-online-sync-switch input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
}

body[data-page="pos"] .pos-online-sync-switch span {
  display: grid;
  gap: 4px;
}

body[data-page="pos"] .pos-online-sync-switch small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

body[data-page="pos"] .pos-online-sync-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

@media (max-width: 560px) {
  body[data-page="pos"] .pos-online-sync-actions > * {
    width: 100%;
  }
}

body[data-page="pos"] .server-cart-note {
  display: block;
  margin-top: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

@keyframes pos-online-card-pulse {
  0%, 100% {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .24), 0 14px 30px rgba(185, 28, 28, .18);
  }
  50% {
    border-color: #f97316;
    box-shadow: 0 0 0 7px rgba(249, 115, 22, .24), 0 18px 38px rgba(185, 28, 28, .28);
  }
}

@keyframes pos-online-alert-pulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 12px 24px rgba(185, 28, 28, .14);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(185, 28, 28, .22);
  }
}

@keyframes pos-online-dot-ping {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.45);
    opacity: .62;
  }
}

@keyframes pos-cart-pop {
  0% {
    transform: scale(1);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
  }
  45% {
    transform: scale(1.012);
    box-shadow: 0 18px 34px rgba(37, 99, 235, .18);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
  }
}

@keyframes pos-cart-row-fresh {
  0% {
    border-color: #2563eb;
    background: #eff6ff;
  }
  100% {
    border-color: #dbe4ef;
    background: #fff;
  }
}

body[data-page="pos"] .pos-online-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  border: 2px solid #ef4444;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(254, 226, 226, .98), rgba(255, 237, 213, .98)),
    #fee2e2;
  color: #7f1d1d;
  padding: 12px 14px;
  animation: pos-online-alert-pulse 1.15s ease-in-out infinite;
}

body[data-page="pos"] .pos-online-alert strong {
  color: #7f1d1d;
  font-size: 16px;
  font-weight: 950;
}

body[data-page="pos"] .pos-online-alert span {
  color: #9a3412;
  font-size: 13px;
  font-weight: 900;
}

body[data-page="pos"] .table-card.online-order button,
body[data-page="pos"] .table-card.online-order.readonly {
  border-width: 2px;
  border-color: #ef4444;
  min-height: 132px;
  background:
    linear-gradient(135deg, rgba(254, 226, 226, .98), rgba(255, 247, 237, .9)),
    #fff7ed;
  animation: pos-online-card-pulse 1.05s ease-in-out infinite;
}

body[data-page="pos"] .table-card.online-order.active button,
body[data-page="pos"] .table-card.online-order.active.readonly {
  border-color: #dc2626;
  background:
    linear-gradient(135deg, rgba(254, 202, 202, .98), rgba(255, 237, 213, .94)),
    #fee2e2;
}

body[data-page="pos"] .table-card.online-order button::before,
body[data-page="pos"] .table-card.online-order.readonly::before,
body[data-page="pos"] .table-card.online-order.active button::before,
body[data-page="pos"] .table-card.online-order.active.readonly::before {
  width: 6px;
  background: #ef4444;
}

body[data-page="pos"] .table-card.online-order span {
  background: #fee2e2;
  color: #991b1b;
}

body[data-page="pos"] .table-card.online-order span::before {
  background: #ef4444;
  animation: pos-online-dot-ping .85s ease-in-out infinite;
}

body[data-page="pos"] .table-card.online-order strong {
  color: #7f1d1d;
}

body[data-page="pos"] .table-card.online-order em {
  color: #9a3412;
}

@media (min-width: 761px) {
  body[data-page="pos"] .table-card.online-order {
    grid-column: span 2;
  }
}

body[data-page="pos"] .pos-workspace.online-order-active .cart-panel .panel-head {
  background: linear-gradient(135deg, #b91c1c, #f97316) !important;
  animation: pos-online-alert-pulse 1.15s ease-in-out infinite !important;
}

body[data-page="pos"] .pos-product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
  gap: 10px;
}

body[data-page="pos"] .pos-product-group-heading {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  color: #3c4f79;
  margin: 6px 0 2px;
}

body[data-page="pos"] .pos-product-group-heading span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: #6ed0ef;
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 -2px 0 rgba(15, 23, 42, .16);
}

body[data-page="pos"] .pos-product-group-heading strong {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

body[data-page="pos"] .pos-product-group-heading i {
  display: block;
  flex: 1 1 auto;
  min-width: 32px;
  border-top: 3px dashed #2f49c9;
}

body[data-page="pos"] .pos-product-tile {
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

body[data-page="pos"] .pos-product-tile-button,
body[data-page="pos"] .pos-product-tile.readonly {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-height: 184px;
  border: 1px solid #d6e0ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(15, 23, 42, .045);
  padding: 10px;
  gap: 7px;
  text-align: left;
  overflow: hidden;
}

body[data-page="pos"] .pos-product-tile-button {
  cursor: pointer;
}

body[data-page="pos"] .pos-product-tile.is-adding .pos-product-tile-button {
  border-color: #93c5fd;
  background: #f8fbff;
  opacity: .72;
}

body[data-page="pos"] .pos-cart-flyer {
  position: fixed;
  z-index: 140;
  pointer-events: none;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: 14px;
  background: #2563eb;
  box-shadow: 0 16px 28px rgba(15, 23, 42, .22);
  object-fit: cover;
  will-change: transform, opacity;
}

body[data-page="pos"] .pos-cart-flyer.is-pill {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
}

body[data-page="pos"] .app-toast {
  position: relative;
  overflow: hidden;
  border-left: 0;
  border-radius: 14px;
  padding: 12px 12px 15px 16px;
  animation: pos-toast-run-in .24s cubic-bezier(.2, .82, .2, 1);
  --pos-toast-accent: #0f9f6e;
}

body[data-page="pos"] .app-toast-success {
  --pos-toast-accent: #0f9f6e;
}

body[data-page="pos"] .app-toast-error {
  --pos-toast-accent: #ef4444;
}

body[data-page="pos"] .app-toast-warning {
  --pos-toast-accent: #f97316;
}

body[data-page="pos"] .app-toast::before,
body[data-page="pos"] .app-toast::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

body[data-page="pos"] .app-toast::before {
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--pos-toast-accent);
}

body[data-page="pos"] .app-toast::after {
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pos-toast-accent), #22d3ee, var(--pos-toast-accent));
  background-size: 180% 100%;
  transform-origin: left center;
  animation:
    pos-toast-progress var(--toast-duration, 3400ms) linear forwards,
    pos-toast-stripe .72s linear infinite;
}

body[data-page="pos"] .app-toast button {
  background: #eaf0f7;
}

body[data-page="pos"] .app-toast.leaving {
  opacity: 0;
  transform: translate3d(18px, 0, 0) scale(.98);
  transition: opacity .16s ease, transform .16s ease;
}

@keyframes pos-toast-run-in {
  from { opacity: 0; transform: translate3d(22px, 0, 0) scale(.98); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes pos-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@keyframes pos-toast-stripe {
  from { background-position: 0 0; }
  to { background-position: 180% 0; }
}

body[data-page="pos"] .pos-product-tile.has-thumb .pos-product-thumb {
  display: block;
  width: 100%;
  height: 94px;
  flex: 0 0 94px;
  border: 0;
  border-radius: 10px;
  background: #eef3f8;
  object-fit: cover;
}

body[data-page="pos"] .pos-product-tile.no-thumb .pos-product-tile-button,
body[data-page="pos"] .pos-product-tile.no-thumb.readonly {
  min-height: 118px;
  justify-content: center;
}

body[data-page="pos"] .pos-product-group {
  display: inline-flex;
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #eaf4ff;
  color: #075985;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="pos"] .pos-product-name {
  display: -webkit-box;
  flex: 0 0 auto;
  min-height: 36px;
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-page="pos"] .pos-product-price {
  flex: 0 0 auto;
  margin-top: auto;
  border-top: 1px solid #eef2f7;
  padding-top: 7px;
  color: #059669;
  font-size: 15px;
  font-style: normal;
  font-weight: 950;
  line-height: 1.1;
}

body[data-page="pos"] .product-card-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 9px;
}

body[data-page="pos"] .table-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  align-items: stretch;
  gap: 10px;
}

body[data-page="pos"] .table-card button,
body[data-page="pos"] .table-card.readonly {
  min-height: 112px;
  height: auto;
  padding: 12px;
}

body[data-page="pos"] .table-card strong {
  display: block;
  min-height: 0;
  overflow: visible;
  font-size: 19px;
  line-height: 1.1;
  overflow-wrap: anywhere;
  white-space: normal;
}

body[data-page="pos"] .table-card em {
  display: block;
  margin-top: 6px;
  overflow: visible;
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

body[data-page="pos"] .pos-online-cart-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  margin-top: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #991b1b;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 950;
}

@media (max-width: 760px) {
  body[data-page="pos"] .pos-online-alert {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
  }

  body[data-page="pos"] .pos-online-alert strong {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="pos"] .pos-online-alert,
  body[data-page="pos"] .app-toast,
  body[data-page="pos"] .app-toast::after,
  body[data-page="pos"] .table-card.online-order button,
  body[data-page="pos"] .table-card.online-order.readonly,
  body[data-page="pos"] .pos-workspace.online-order-active .cart-panel .panel-head,
  body[data-page="pos"] .table-card.online-order span::before {
    animation: none;
  }
}

.pos-product-head {
  align-items: center;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 8px;
}

.product-card {
  display: grid;
  gap: 8px;
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
  text-align: left;
}

.product-card:hover {
  border-color: var(--blue);
  box-shadow: var(--focus);
}

.product-card small,
.product-card span {
  color: var(--muted);
  font-size: 12px;
}

.product-card strong {
  color: #111827;
  font-size: 14px;
  line-height: 1.25;
}

.product-card b {
  color: var(--green);
  font-size: 14px;
}

.product-card-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f1f5f9;
  object-fit: cover;
}

.cart-panel {
  position: sticky;
  top: 76px;
}

.cart-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 8px;
}

.cart-list.empty {
  display: grid;
  min-height: 74px;
  place-items: center;
  color: var(--muted);
  background: #f8fafc;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 8px;
}

.cart-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.cart-item strong,
.order-line strong {
  display: block;
  color: #111827;
}

.cart-item span,
.order-line span {
  color: var(--muted);
  font-size: 12px;
}

.cart-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cart-actions button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: #344054;
}

.order-lines {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.order-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #fbfcfe;
  padding: 9px;
}

.order-line-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.order-line-actions input {
  width: 62px;
  text-align: center;
}

.order-action-grid,
.two-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.payment-summary {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 10px;
}

.payment-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.payment-summary span {
  color: var(--muted);
  font-size: 12px;
}

.payment-summary strong {
  color: #101828;
  font-size: 15px;
}

.segment-tabs,
.product-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.segment-tabs button,
.product-tabs button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 10px;
  color: #344054;
  font-size: 12px;
  font-weight: 850;
}

.segment-tabs button.active,
.product-tabs button.active {
  border-color: var(--blue);
  background: #eaf1ff;
  color: var(--blue-strong);
}

.table-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}

.table-card {
  min-width: 0;
}

.table-card button,
.table-card.readonly {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
  color: #111827;
  text-align: left;
}

.table-card.occupied button,
.table-card.occupied.readonly {
  border-color: #8bd7ae;
  background: #e9fbf1;
}

.table-card b,
.table-card small {
  color: var(--muted);
  font-size: 12px;
}

.table-card strong {
  font-size: 15px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.table-actions a,
.table-link {
  color: var(--blue-strong);
  font-weight: 850;
}

body[data-page="pos"] .pos-workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body[data-page="pos"] .pos-operating-hero {
  margin-bottom: 0;
}

body[data-page="pos"] .table-board,
body[data-page="pos"] .pos-menu,
body[data-page="pos"] .cart-panel,
body[data-page="pos"] .empty-order-panel,
body[data-page="order_detail"] .panel {
  border-radius: 10px;
  border-color: #d8e0ea;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

body[data-page="pos"] .table-board .panel-head,
body[data-page="pos"] .pos-menu .panel-head,
body[data-page="pos"] .cart-panel .panel-head,
body[data-page="order_detail"] .panel-head {
  align-items: center;
  min-height: 54px;
  border-bottom-color: #e5edf5;
}

body[data-page="pos"] .table-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}

body[data-page="pos"] .table-card button,
body[data-page="pos"] .table-card.readonly {
  position: relative;
  min-height: 106px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
  overflow: hidden;
}

body[data-page="pos"] .table-card button::before,
body[data-page="pos"] .table-card.readonly::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #10b981;
}

body[data-page="pos"] .table-card.occupied button,
body[data-page="pos"] .table-card.occupied.readonly {
  border-color: #86efac;
  background: #ecfdf5;
}

body[data-page="pos"] .table-card.occupied button::before,
body[data-page="pos"] .table-card.occupied.readonly::before {
  background: #2563eb;
}

body[data-page="pos"] .table-card span,
body[data-page="pos"] .table-card em {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

body[data-page="pos"] .table-card strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 950;
}

body[data-page="pos"] .table-card em {
  margin-top: 8px;
  color: #0f766e;
  overflow-wrap: anywhere;
}

body[data-page="pos"] .active-order-layout {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 430px);
  gap: 14px;
}

body[data-page="pos"] .product-tabs {
  position: sticky;
  top: 61px;
  z-index: 4;
  margin: -6px -2px 12px;
  padding: 8px 2px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(6px);
}

body[data-page="pos"] .product-tabs button {
  min-height: 36px;
  border-radius: 9px;
  border-color: #d8e0ea;
  background: #fff;
}

body[data-page="pos"] .product-tabs button.active {
  border-color: #0d6fd6;
  background: #eaf4ff;
  color: #0d47a1;
}

body[data-page="pos"] .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
}

body[data-page="pos"] .product-card {
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

body[data-page="pos"] .product-card button {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  width: 100%;
  min-height: 128px;
  border: 1px solid #d8e0ea;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

body[data-page="pos"] .product-card button:hover {
  transform: translateY(-1px);
  border-color: #0d6fd6;
  box-shadow: 0 12px 24px rgba(13, 111, 214, .14);
}

body[data-page="pos"] .product-card button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

body[data-page="pos"] .product-card.readonly {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  min-height: 128px;
  border: 1px solid #d8e0ea;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  opacity: .78;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

body[data-page="pos"] .product-card span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: #eef6ff;
  color: #0d47a1;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

body[data-page="pos"] .product-card strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.22;
  font-weight: 950;
}

body[data-page="pos"] .product-card em {
  color: #059669;
  font-style: normal;
  font-size: 16px;
  font-weight: 950;
}

body[data-page="pos"] .cart-panel {
  top: 70px;
  border-top: 4px solid #087f74;
}

body[data-page="pos"] .server-cart-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
  margin-bottom: 12px;
}

body[data-page="pos"] .server-cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border: 1px solid #d8e0ea;
  border-radius: 10px;
  background: #fbfdff;
  padding: 10px;
}

body[data-page="pos"] .server-cart-item strong,
body[data-page="pos"] .server-cart-item span,
body[data-page="pos"] .server-cart-item b {
  display: block;
}

body[data-page="pos"] .server-cart-item strong {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.25;
}

body[data-page="pos"] .server-cart-item span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

body[data-page="pos"] .server-cart-item b {
  grid-column: 1 / -1;
  color: #059669;
  font-size: 15px;
  text-align: right;
}

body[data-page="pos"] .cart-panel.pos-cart-pop {
  animation: pos-cart-pop .42s ease-out;
}

body[data-page="pos"] .server-cart-item.is-fresh {
  animation: pos-cart-row-fresh .85s ease-out;
}

body[data-page="pos"] .server-cart-controls {
  display: grid;
  justify-items: end;
  gap: 6px;
}

body[data-page="pos"] .server-cart-controls form {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}

body[data-page="pos"] .server-cart-controls input {
  width: 56px;
  min-height: 34px;
  text-align: center;
  font-weight: 900;
}

body[data-page="pos"] .qty-static {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #eef6ff;
  color: #0d47a1;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

body[data-page="pos"] .readonly-field {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 60px;
  border: 1px solid #d8e0ea;
  border-radius: 9px;
  background: #f8fbff;
  padding: 9px 11px;
}

body[data-page="pos"] .readonly-field span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

body[data-page="pos"] .readonly-field strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
}

body[data-page="pos"] .payment-summary {
  border-radius: 10px;
  border-color: #d8e0ea;
  background: #f8fbff;
}

body[data-page="pos"] .order-action-grid {
  grid-template-columns: 1fr;
}

body[data-page="pos"] .order-action-grid .pay {
  background: #16a34a;
}

body[data-page="pos"] .order-action-grid .danger {
  min-height: 38px;
  border: 0;
  border-radius: var(--radius-sm);
  background: #ef4444;
  color: #fff;
  font-weight: 900;
}

body[data-page="pos"] .empty-order-panel {
  display: grid;
  place-items: center;
  min-height: 180px;
  text-align: center;
  border-style: dashed;
}

body[data-page="order_detail"] .table-wrap {
  border-radius: 10px;
  border-color: #d8e0ea;
}

body[data-page="order_detail"] th {
  background: #087f74;
  color: #fff;
  height: 34px;
}

body[data-page="order_detail"] tbody tr:hover td {
  background: #eef7ff;
}

body[data-page="order_detail"] .detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

body[data-page="order_detail"] .detail-grid div,
body[data-page="order_detail"] .summary-list div {
  border: 1px solid #d8e0ea;
  border-radius: 9px;
  background: #fff;
  padding: 10px 12px;
}

body[data-page="order_detail"] .detail-grid span,
body[data-page="order_detail"] .summary-list span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

body[data-page="order_detail"] .detail-grid strong,
body[data-page="order_detail"] .summary-list strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 15px;
}

body[data-page="order_detail"] .order-detail-payment-breakdown {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
}

body[data-page="pos"] .table-card.active button,
body[data-page="pos"] .table-card.active.readonly {
  border-color: #0f766e;
  background: #d1fae5;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .18), 0 14px 26px rgba(15, 118, 110, .14);
}

body[data-page="pos"] .table-card.active button::before,
body[data-page="pos"] .table-card.active.readonly::before {
  width: 6px;
  background: #0f766e;
}

body[data-page="pos"] .table-card.active span,
body[data-page="pos"] .table-card.active em {
  color: #075985;
}

body[data-page="pos"] .qty-adjust-form {
  display: inline-grid;
  grid-template-columns: 34px 56px 34px;
  gap: 4px;
  align-items: center;
}

body[data-page="pos"] .qty-step {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
}

body[data-page="pos"] .qty-step:hover {
  border-color: #0d6fd6;
  background: #eef6ff;
  color: #0d47a1;
}

body[data-page="pos"] .payment-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body[data-page="pos"] .payment-split-grid[hidden] {
  display: none !important;
}

body[data-page="pos"] .order-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
}

body[data-page="pos"] .order-meta-grid > label,
body[data-page="pos"] .order-meta-grid > details {
  min-width: 0;
}

body[data-page="pos"] .order-meta-grid > details {
  border: 1px solid #d8e0ea;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

body[data-page="pos"] .order-meta-grid > details summary {
  min-height: 34px;
  padding: 7px 10px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

body[data-page="pos"] .order-meta-grid > details label {
  padding: 0 8px 8px;
}

body[data-page="pos"] .payment-method-field {
  display: grid;
  gap: 7px;
}

body[data-page="pos"] .payment-method-field > span {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

body[data-page="pos"] .payment-method-field > input[data-payment-method] {
  display: none !important;
}

body[data-page="pos"] .payment-method-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body[data-page="pos"] .payment-method-options button {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  padding: 0 8px;
  font-size: 14px;
  font-weight: 950;
}

body[data-page="pos"] .payment-method-options button.is-active {
  border-color: #2563eb;
  background: linear-gradient(135deg, #2298df, #2d5be3);
  color: #fff;
  box-shadow: 0 10px 18px rgba(37, 99, 235, .22);
}

body[data-page="pos"] .pos-product-actions {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

body[data-page="pos"] .pos-mobile-add-items,
body[data-page="pos"] .pos-mobile-close-menu,
body[data-page="pos"] .pos-menu-search-toggle,
body[data-page="pos"] .pos-menu-checkout {
  display: none;
}

@media (max-width: 760px) {
  body[data-page="pos"] .pos-workspace.has-active-order .pos-operating-hero,
  body[data-page="pos"] .pos-workspace.has-active-order .table-board {
    display: none;
  }

  body[data-page="pos"] .pos-workspace.has-active-order .active-order-layout {
    display: block;
  }

  body[data-page="pos"] .pos-workspace.has-active-order .pos-menu {
    display: none;
  }

  body[data-page="pos"].pos-menu-open .pos-workspace.has-active-order .pos-menu {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    overflow: auto;
    border-radius: 0;
    padding: 12px;
  }

  body[data-page="pos"] .pos-mobile-add-items,
  body[data-page="pos"] .pos-mobile-close-menu,
  body[data-page="pos"] .pos-menu-search-toggle,
  body[data-page="pos"] .pos-menu-checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body[data-page="pos"] .pos-product-actions {
    display: flex;
  }

  body[data-page="pos"] .pos-menu-checkout {
    min-height: 36px;
    border: 0;
    border-radius: 10px;
    background: #16a34a;
    color: #fff;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 950;
    white-space: nowrap;
  }

  body[data-page="pos"] .pos-menu-search-toggle {
    width: 36px;
    height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
  }

  body[data-page="pos"] .pos-menu-search-toggle::before {
    content: "";
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  body[data-page="pos"] .pos-product-head.is-search-open .pos-menu-search-toggle {
    border-color: #2563eb;
    background: #eaf1ff;
    color: #1d4ed8;
  }

  body[data-page="pos"] .pos-mobile-close-menu {
    width: 36px;
    height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-size: 22px;
    font-weight: 950;
  }

  body[data-page="pos"] .pos-product-head {
    display: grid;
    position: sticky;
    top: 0;
    z-index: 2;
    grid-template-columns: 1fr auto;
    gap: 6px 8px;
    background: #fff;
  }

  body[data-page="pos"] .pos-product-head .search {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    min-height: 36px;
    margin-top: 2px;
    border-radius: 10px;
  }

  body[data-page="pos"] .pos-product-head.is-search-open .search {
    display: block;
  }

  body[data-page="pos"] .pos-menu .pos-product-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 10px 8px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 0 12px;
    -webkit-overflow-scrolling: touch;
  }

  body[data-page="pos"] .pos-menu .pos-product-group-heading {
    gap: 8px;
    margin: 6px 0 -2px;
  }

  body[data-page="pos"] .pos-menu .pos-product-group-heading span {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    font-size: 16px;
  }

  body[data-page="pos"] .pos-menu .pos-product-group-heading strong {
    color: #3d4f78;
    font-size: clamp(18px, 6.4vw, 25px);
    letter-spacing: 0;
    text-transform: uppercase;
  }

  body[data-page="pos"] .pos-menu .pos-product-group-heading i {
    border-top-width: 2px;
  }

  body[data-page="pos"] .pos-menu .pos-product-tile {
    min-width: 0;
    min-height: 0;
    margin: 0;
    border: 0;
    background: transparent;
    padding: 0;
  }

  body[data-page="pos"] .pos-menu .pos-product-tile-button,
  body[data-page="pos"] .pos-menu .pos-product-tile.readonly {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 86px 38px minmax(54px, auto);
    align-content: start;
    width: 100%;
    min-height: 178px;
    border: 0;
    border-radius: 0 12px 0 12px;
    background: #3d557f;
    box-shadow: none;
    padding: 0;
    text-align: center;
    overflow: hidden;
  }

  body[data-page="pos"] .pos-menu .pos-product-tile.has-thumb .pos-product-thumb,
  body[data-page="pos"] .pos-menu .pos-product-thumb {
    display: block;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 86px;
    border: 0;
    border-radius: 0;
    background: #cfe6ef;
    object-fit: cover;
  }

  body[data-page="pos"] .pos-menu .pos-product-group {
    display: none;
  }

  body[data-page="pos"] .pos-menu .pos-product-name {
    display: -webkit-box;
    grid-column: 1;
    grid-row: 3;
    align-self: stretch;
    min-height: 0;
    overflow: hidden;
    background: #3d557f;
    color: #fff;
    padding: 9px 7px 8px;
    font-size: clamp(16px, 4.9vw, 21px);
    font-weight: 650;
    line-height: 1.08;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-page="pos"] .pos-menu .pos-product-price {
    display: flex;
    grid-column: 1;
    grid-row: 2;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 38px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #3d4f78;
    padding: 0 6px;
    font-size: clamp(18px, 5.4vw, 23px);
    font-style: normal;
    font-weight: 850;
    line-height: 1.1;
    white-space: nowrap;
  }

  body[data-page="pos"] .pos-menu .pos-product-tile.no-thumb .pos-product-tile-button,
  body[data-page="pos"] .pos-menu .pos-product-tile.no-thumb.readonly {
    grid-template-rows: 38px minmax(76px, auto);
    justify-content: stretch;
    min-height: 116px;
  }

  body[data-page="pos"] .pos-menu .pos-product-tile.no-thumb .pos-product-price {
    grid-row: 1;
  }

  body[data-page="pos"] .pos-menu .pos-product-tile.no-thumb .pos-product-name {
    grid-row: 2;
  }

  body[data-page="pos"] .cart-panel {
    border-radius: 10px;
  }

  body[data-page="pos"] .cart-panel .panel-head {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fff;
  }

  body[data-page="pos"] .server-cart-list {
    max-height: none;
  }

  body[data-page="pos"] .server-cart-item {
    grid-template-columns: 1fr;
  }

  body[data-page="pos"] .server-cart-controls {
    justify-items: stretch;
  }

  body[data-page="pos"] .qty-adjust-form {
    width: 100%;
    grid-template-columns: 42px minmax(54px, 1fr) 42px;
  }

  body[data-page="pos"] .qty-step {
    width: 42px;
  }

  body[data-page="pos"] .money-grid,
  body[data-page="pos"] .payment-split-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="pos"] .product-tabs {
    top: 62px;
  }

  body[data-page="pos"] .pos-product-head.is-search-open + .product-tabs {
    top: 104px;
  }

  body[data-page="pos"] .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="pos"] .product-card button,
  body[data-page="pos"] .product-card.readonly {
    min-height: 112px;
    padding: 10px;
  }
}

/* POS visual refresh */
body[data-page="pos"] .main {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .46), rgba(238, 241, 245, 0) 260px),
    var(--bg);
}

body[data-page="pos"] .pos-workspace {
  gap: 10px;
}

body[data-page="pos"] .table-board,
body[data-page="pos"] .pos-menu,
body[data-page="pos"] .cart-panel,
body[data-page="pos"] .empty-order-panel {
  border-color: #d5dee9;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
  padding: 10px;
}

body[data-page="pos"] .table-board .panel-head,
body[data-page="pos"] .pos-menu .panel-head,
body[data-page="pos"] .cart-panel .panel-head {
  min-height: 0;
  margin: 0 0 8px;
  padding: 0 0 8px;
}

body[data-page="pos"] .panel-head h2 {
  font-size: 16px;
  line-height: 1.15;
}

body[data-page="pos"] .panel-head p {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
}

body[data-page="pos"] .table-board .inline-search select {
  width: 176px;
  min-height: 34px;
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 800;
}

body[data-page="pos"] .table-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  align-items: stretch;
  gap: 10px;
}

body[data-page="pos"] .table-card button,
body[data-page="pos"] .table-card.readonly {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 6px;
  min-height: 112px;
  border-color: #cfd9e6;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(248, 250, 252, .96)),
    #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
  padding: 11px 12px 10px 14px;
  overflow: visible;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

body[data-page="pos"] .table-card button:hover {
  border-color: #0ea5e9;
  box-shadow: 0 12px 24px rgba(14, 165, 233, .14);
  transform: translateY(-1px);
}

body[data-page="pos"] .table-card button::before,
body[data-page="pos"] .table-card.readonly::before {
  width: 3px;
  background: #10b981;
}

body[data-page="pos"] .table-card.occupied button,
body[data-page="pos"] .table-card.occupied.readonly {
  border-color: #90d7bc;
  background:
    linear-gradient(180deg, rgba(236, 253, 245, .98), rgba(209, 250, 229, .84)),
    #ecfdf5;
}

body[data-page="pos"] .table-card.occupied button::before,
body[data-page="pos"] .table-card.occupied.readonly::before {
  background: #0ea5e9;
}

body[data-page="pos"] .table-card.active button,
body[data-page="pos"] .table-card.active.readonly {
  border-color: #0f766e;
  background: #d1fae5;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .16), 0 14px 28px rgba(15, 118, 110, .14);
}

body[data-page="pos"] .table-card span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  min-height: 20px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 0 7px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="pos"] .table-card span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #10b981;
}

body[data-page="pos"] .table-card.occupied span {
  background: #e0f2fe;
  color: #075985;
}

body[data-page="pos"] .table-card.occupied span::before {
  background: #0ea5e9;
}

body[data-page="pos"] .table-card strong {
  max-width: 100%;
  margin-top: 0;
  overflow: visible;
  font-size: 18px;
  line-height: 1.12;
  overflow-wrap: anywhere;
  white-space: normal;
}

body[data-page="pos"] .table-card em {
  display: block;
  max-width: 100%;
  margin-top: 0;
  overflow: visible;
  color: #0f766e;
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  white-space: normal;
}

body[data-page="pos"] .empty-order-panel {
  position: relative;
  place-items: center;
  min-height: 154px;
  overflow: hidden;
  border-style: solid;
  background:
    radial-gradient(circle at 50% -20%, rgba(14, 165, 233, .14), transparent 38%),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

body[data-page="pos"] .empty-order-panel h2 {
  margin: 0;
  color: #0f172a;
  font-size: 21px;
  font-weight: 950;
}

body[data-page="pos"] .empty-order-panel p {
  max-width: 620px;
  margin: 8px auto 0;
  font-size: 13px;
  font-weight: 750;
}

body[data-page="pos"] .active-order-layout {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 400px);
  align-items: start;
  gap: 12px;
}

body[data-page="pos"] .pos-menu {
  overflow: hidden;
}

body[data-page="pos"] .pos-product-head {
  display: grid;
  grid-template-columns: minmax(220px, .42fr) minmax(260px, 1fr);
  align-items: end;
  gap: 10px;
}

body[data-page="pos"] .pos-product-head .search {
  min-height: 40px;
  border-radius: 10px;
  background: #f8fafc;
  font-weight: 750;
}

body[data-page="pos"] .product-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: -2px -4px 10px;
  padding: 2px 4px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .92));
  scrollbar-width: thin;
}

body[data-page="pos"] .product-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  border-color: #d6e0ec;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  box-shadow: none;
}

body[data-page="pos"] .product-tabs button.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 -2px 0 rgba(37, 99, 235, .24);
}

body[data-page="pos"] .product-tabs button span {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, .07);
  padding: 0 6px;
  margin-left: 4px;
}

body[data-page="pos"] .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
  gap: 9px;
}

body[data-page="pos"] .product-card button,
body[data-page="pos"] .product-card.readonly {
  min-height: 122px;
  border-color: #d6e0ec;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #ffffff, #fbfdff 72%, #f8fafc),
    #fff;
  box-shadow: 0 7px 18px rgba(15, 23, 42, .045);
  padding: 11px;
}

body[data-page="pos"] .product-card button:hover {
  border-color: #0ea5e9;
  box-shadow: 0 14px 28px rgba(14, 165, 233, .15);
}

body[data-page="pos"] .product-card span {
  max-width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #eaf4ff;
  color: #075985;
  padding: 4px 7px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="pos"] .product-card strong {
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-page="pos"] .product-card em {
  display: block;
  align-self: end;
  border-top: 1px solid #eef2f7;
  padding-top: 8px;
  color: #059669;
  font-size: 15px;
}

body[data-page="pos"] .cart-panel {
  top: 68px;
  overflow: hidden;
  border-top: 0;
}

body[data-page="pos"] .cart-panel .panel-head {
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #0f766e, #1d4ed8);
  color: #fff;
  margin: 0 0 12px;
  padding: 12px;
}

body[data-page="pos"] .cart-panel .panel-head h2,
body[data-page="pos"] .cart-panel .panel-head p {
  color: #fff;
}

body[data-page="pos"] .cart-panel .panel-head p {
  opacity: .82;
}

body[data-page="pos"] .cart-panel .row-actions {
  gap: 6px;
  justify-content: flex-end;
}

body[data-page="pos"] .cart-panel .panel-head .ghost {
  min-height: 32px;
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  box-shadow: none;
}

body[data-page="pos"] .pos-order-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

body[data-page="pos"] .pos-order-heading > div {
  min-width: 0;
}

body[data-page="pos"] .pos-order-print {
  min-width: 78px;
  padding: 0 14px;
}

body[data-page="pos"] .server-cart-list {
  max-height: 312px;
  padding-right: 2px;
}

body[data-page="pos"] .server-cart-item {
  border-color: #dbe4ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .035);
}

body[data-page="pos"] .server-cart-item b {
  color: #047857;
}

body[data-page="pos"] .server-cart-controls input {
  border-radius: 8px;
  background: #f8fafc;
}

body[data-page="pos"] .payment-summary {
  gap: 0;
  border-color: #dbe4ef;
  background: #fff;
  padding: 8px;
}

body[data-page="pos"] .payment-summary div {
  min-height: 32px;
  border-bottom: 1px solid #eef2f7;
  padding: 6px 2px;
}

body[data-page="pos"] .payment-summary div:last-child {
  border-bottom: 0;
}

body[data-page="pos"] .payment-summary div:nth-child(2) {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: #eff6ff;
  margin: 4px -2px;
  padding: 8px 10px;
}

body[data-page="pos"] .payment-summary div:nth-child(2) strong {
  color: #1d4ed8;
  font-size: 17px;
}

body[data-page="pos"] .order-action-grid button,
body[data-page="pos"] .order-action-grid .primary {
  min-height: 42px;
  border-radius: 9px;
  font-weight: 950;
}

body[data-page="pos"] .order-action-grid .pay {
  background: linear-gradient(135deg, #16a34a, #059669);
}

body[data-page="pos"] .order-action-grid .danger {
  background: #ef4444;
}

body[data-page="pos"] .order-action-grid.pos-order-actions-layout {
  grid-template-columns: minmax(0, 1fr) minmax(138px, .78fr);
  align-items: stretch;
  gap: 8px;
}

body[data-page="pos"] .order-action-grid.pos-order-actions-layout.no-add-items {
  grid-template-columns: minmax(0, 1fr);
}

body[data-page="pos"] .pos-add-items-main {
  min-height: 100%;
  border: 0;
  border-radius: 12px;
  background: #020617;
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  box-shadow: 0 12px 22px rgba(2, 6, 23, .24);
}

body[data-page="pos"] .pos-order-side-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

body[data-page="pos"] .pos-order-side-actions button {
  width: 100%;
}

@media (max-width: 1100px) {
  body[data-page="pos"] .active-order-layout {
    grid-template-columns: 1fr;
  }

  body[data-page="pos"] .cart-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  body[data-page="pos"] .main {
    padding-left: 10px;
    padding-right: 10px;
  }

  body[data-page="pos"] .table-board,
  body[data-page="pos"] .empty-order-panel {
    padding: 12px;
  }

  body[data-page="pos"] .table-board .panel-head {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 10px;
    padding-bottom: 12px;
  }

  body[data-page="pos"] .table-board .panel-head h2 {
    font-size: 21px;
    line-height: 1.1;
  }

  body[data-page="pos"] .table-board .panel-head p {
    font-size: 12px;
    line-height: 1.35;
  }

  body[data-page="pos"] .table-board .inline-search,
  body[data-page="pos"] .table-board .inline-search select {
    width: 100%;
  }

  body[data-page="pos"] .table-board .inline-search select {
    min-height: 42px;
    border-radius: 10px;
  }

  body[data-page="pos"] .table-card-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  body[data-page="pos"] .table-card button,
  body[data-page="pos"] .table-card.readonly {
    align-content: start;
    min-height: 108px;
    overflow: visible;
    border-color: #d7e2ee;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    padding: 13px 14px 13px 16px;
    gap: 6px;
  }

  body[data-page="pos"] .table-card button::before,
  body[data-page="pos"] .table-card.readonly::before {
    width: 4px;
  }

  body[data-page="pos"] .table-card span {
    min-height: 22px;
    padding: 0 8px;
    font-size: 11px;
  }

  body[data-page="pos"] .table-card span::before {
    width: 7px;
    height: 7px;
  }

  body[data-page="pos"] .table-card strong {
    margin-top: 4px;
    font-size: 20px;
    line-height: 1.12;
  }

  body[data-page="pos"] .table-card em {
    display: block;
    margin-top: 4px;
    overflow: visible;
    color: #0f766e;
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
  }

  body[data-page="pos"] .empty-order-panel {
    min-height: 132px;
    padding: 18px 14px;
  }

  body[data-page="pos"] .empty-order-panel h2 {
    font-size: 20px;
    line-height: 1.16;
  }

  body[data-page="pos"] .empty-order-panel p {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.36;
  }

  body[data-page="pos"] .pos-product-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 6px 8px;
    border-radius: 0;
    background: #fff;
  }

  body[data-page="pos"] .pos-product-head .search {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    min-height: 36px;
    margin-top: 2px;
    border-radius: 10px;
  }

  body[data-page="pos"] .pos-product-head.is-search-open .search {
    display: block;
  }

  body[data-page="pos"] .product-tabs {
    top: 62px;
  }

  body[data-page="pos"] .pos-product-head.is-search-open + .product-tabs {
    top: 104px;
  }

  body[data-page="pos"] .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="pos"] .product-card button,
  body[data-page="pos"] .product-card.readonly {
    min-height: 108px;
    padding: 9px;
  }

  body[data-page="pos"] .product-card strong {
    min-height: 34px;
    font-size: 13px;
  }

  body[data-page="pos"] .cart-panel {
    border-radius: 12px;
    padding: 10px;
  }

  body[data-page="pos"] .cart-panel .panel-head {
    position: sticky;
    top: 0;
    z-index: 3;
    border-radius: 10px;
    background: linear-gradient(135deg, #0f766e, #1d4ed8);
  }

  body[data-page="pos"] .server-cart-list {
    max-height: none;
  }

}

@media (max-width: 760px) {
  body[data-page="pos"] .server-cart-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px 8px;
    padding: 10px;
  }

  body[data-page="pos"] .server-cart-item > div:first-child {
    min-width: 0;
  }

  body[data-page="pos"] .server-cart-item strong {
    font-size: 13px;
    line-height: 1.25;
  }

  body[data-page="pos"] .server-cart-item span {
    margin-top: 2px;
    font-size: 11px;
  }

  body[data-page="pos"] .server-cart-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
  }

  body[data-page="pos"] .server-cart-controls form {
    margin: 0;
  }

  body[data-page="pos"] .qty-adjust-form {
    width: auto;
    grid-template-columns: 30px 36px 30px;
    gap: 3px;
  }

  body[data-page="pos"] .qty-step {
    width: 30px;
    height: 32px;
    min-height: 32px;
  }

  body[data-page="pos"] .server-cart-controls input {
    width: 36px;
    min-height: 32px;
    padding: 0 4px;
  }

  body[data-page="pos"] .server-cart-controls .link-danger {
    min-height: 32px;
    border: 1px solid #fecdd3;
    border-radius: 8px;
    background: #fff1f2;
    color: #dc2626;
    padding: 0 7px;
    font-size: 12px;
  }

  body[data-page="pos"] .server-cart-item b {
    grid-column: 1 / -1;
    margin-top: -2px;
    font-size: 14px;
    text-align: right;
  }
}

@media (max-width: 760px) {
  body[data-page="pos"] .main {
    padding: 8px 8px calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    background: #edf3fa;
  }

  body[data-page="pos"] .pos-workspace,
  body[data-page="pos"] .active-order-layout {
    gap: 8px !important;
  }

  body[data-page="pos"] .cart-panel {
    display: grid !important;
    gap: 8px !important;
    border-color: rgba(203, 213, 225, .9) !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%) !important;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .09) !important;
    padding: 10px !important;
  }

  body[data-page="pos"] .cart-panel .panel-head {
    position: static;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 9px !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 13px !important;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 36%),
      linear-gradient(135deg, #0f766e 0%, #2563eb 100%) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18) !important;
    padding: 12px !important;
  }

  body[data-page="pos"] .cart-panel .panel-head > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body[data-page="pos"] .cart-panel .panel-head h2 {
    font-size: clamp(20px, 6vw, 24px) !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    word-break: break-word;
  }

  body[data-page="pos"] .cart-panel .panel-head p {
    margin: 3px 0 0 !important;
    color: rgba(255, 255, 255, .86) !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  body[data-page="pos"] .cart-panel .row-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  body[data-page="pos"] .cart-panel .pos-order-heading {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(78px, auto) !important;
    align-items: start !important;
    gap: 8px !important;
  }

  body[data-page="pos"] .cart-panel .pos-order-print {
    width: 100% !important;
    min-height: 36px !important;
    min-width: 78px !important;
  }

  body[data-page="pos"] .cart-panel .panel-head .ghost {
    min-height: 36px !important;
    border-color: rgba(255, 255, 255, .24) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, .12) !important;
    color: #fff !important;
    box-shadow: none !important;
    padding: 0 8px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
  }

  body[data-page="pos"] .server-cart-list {
    display: grid !important;
    gap: 7px !important;
    max-height: min(210px, 29dvh) !important;
    overflow: auto !important;
    border: 1px solid #dbe4ef !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    padding: 7px !important;
  }

  body[data-page="pos"] .cart-list.empty {
    min-height: 58px !important;
    border: 1px dashed #cbd5e1 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 10px !important;
  }

  body[data-page="pos"] .order-payment-form {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  body[data-page="pos"] .order-meta-grid,
  body[data-page="pos"] .payment-summary,
  body[data-page="pos"] .money-grid,
  body[data-page="pos"] .payment-method-field,
  body[data-page="pos"] .payment-split-grid,
  body[data-page="pos"] .order-action-grid,
  body[data-page="pos"] .inline-warning {
    grid-column: 1 / -1 !important;
  }

  body[data-page="pos"] .order-payment-form label {
    gap: 3px !important;
    color: #334155 !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
  }

  body[data-page="pos"] .order-payment-form input,
  body[data-page="pos"] .order-payment-form select {
    min-height: 34px !important;
    border-color: #cbd5e1 !important;
    border-radius: 10px !important;
    background: #fff !important;
    padding: 0 9px !important;
    font-size: 14px !important;
    font-weight: 850 !important;
  }

  body[data-page="pos"] .money-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  body[data-page="pos"] .payment-split-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body[data-page="pos"] .payment-split-grid[hidden] {
    display: none !important;
  }

  body[data-page="pos"] .order-meta-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: start !important;
    gap: 6px !important;
  }

  body[data-page="pos"] .order-meta-grid > details {
    border: 1px solid #dbe4ef !important;
    border-radius: 10px !important;
    background: #fff !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body[data-page="pos"] .order-meta-grid > details summary {
    min-height: 34px !important;
    padding: 7px 9px !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 900 !important;
  }

  body[data-page="pos"] .order-meta-grid > details label {
    padding: 0 8px 8px !important;
  }

  body[data-page="pos"] .payment-method-field {
    display: grid !important;
    gap: 7px !important;
  }

  body[data-page="pos"] .payment-method-field > span {
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
  }

  body[data-page="pos"] .payment-method-field > input[data-payment-method] {
    display: none !important;
  }

  body[data-page="pos"] .payment-method-options {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body[data-page="pos"] .payment-method-options button {
    min-height: 46px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #0f172a !important;
    padding: 0 6px !important;
    font-size: 13px !important;
    font-weight: 950 !important;
  }

  body[data-page="pos"] .payment-method-options button.is-active {
    border-color: #2563eb !important;
    background: linear-gradient(135deg, #2298df, #2d5be3) !important;
    color: #fff !important;
  }

  body[data-page="pos"] .money-grid .readonly-field {
    min-height: 54px !important;
    border-radius: 10px !important;
    padding: 7px 9px !important;
  }

  body[data-page="pos"] .payment-summary {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    border: 1px solid #dbe4ef !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    padding: 6px !important;
  }

  body[data-page="pos"] .payment-summary div,
  body[data-page="pos"] .payment-summary div:nth-child(2) {
    display: grid !important;
    min-height: 54px !important;
    align-content: center !important;
    gap: 3px !important;
    margin: 0 !important;
    border: 1px solid #dbe4ef !important;
    border-radius: 10px !important;
    background: #fff !important;
    padding: 8px 7px !important;
  }

  body[data-page="pos"] .payment-summary div:nth-child(2) {
    border-color: #bfdbfe !important;
    background: #eff6ff !important;
  }

  body[data-page="pos"] .payment-summary span {
    overflow: hidden !important;
    color: #64748b !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body[data-page="pos"] .payment-summary strong,
  body[data-page="pos"] .payment-summary div:nth-child(2) strong {
    overflow-wrap: anywhere !important;
    font-size: 17px !important;
    line-height: 1 !important;
    text-align: right !important;
  }

  body[data-page="pos"] .order-action-grid {
    position: sticky !important;
    bottom: 8px !important;
    z-index: 12 !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 2px 0 0 !important;
    border: 1px solid rgba(203, 213, 225, .88) !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, .96) !important;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .13) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px !important;
  }

  body[data-page="pos"] .order-action-grid button,
  body[data-page="pos"] .order-action-grid .primary {
    min-height: 42px !important;
    border-radius: 10px !important;
    padding: 0 8px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
  }

  body[data-page="pos"] .order-action-grid .pay {
    font-size: 13px !important;
  }

  body[data-page="pos"] .order-action-grid.pos-order-actions-layout {
    grid-template-columns: minmax(0, 1fr) minmax(116px, .72fr) !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 7px !important;
  }

  body[data-page="pos"] .order-action-grid.pos-order-actions-layout.no-add-items {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-page="pos"] .pos-add-items-main {
    min-height: 100% !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: #020617 !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 950 !important;
    box-shadow: 0 12px 22px rgba(2, 6, 23, .24) !important;
    white-space: normal !important;
  }

  body[data-page="pos"] .pos-order-side-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  body[data-page="pos"] .pos-order-side-actions button {
    width: 100% !important;
    min-height: 38px !important;
  }
}

