:root {
  color-scheme: dark;
  --pos-bg: #0a0a0a;
  --pos-bg-2: #141414;
  --pos-surface: rgba(20, 20, 20, 0.92);
  --pos-surface-2: #1a1a1a;
  --pos-surface-3: rgba(255, 255, 255, 0.06);
  --pos-border: rgba(255, 255, 255, 0.08);
  --pos-text: #ffffff;
  --pos-muted: #a0a0a0;
  --pos-accent: #d4af37;
  --pos-accent-hover: #c9a226;
  --pos-accent-2: #b8941f;
  --pos-warning: #f59e0b;
  --pos-danger: #ef4444;
  --pos-success: #10b981;
  --pos-disabled: #1a1a1a;
  --pos-shadow: 0 24px 76px rgba(0, 0, 0, 0.50);
  --pos-shadow-soft: 0 16px 44px rgba(0, 0, 0, 0.35);
  --pos-gold-dim: rgba(212, 175, 55, 0.15);
  --pos-topbar-scale: 1.35;
}

* {
  box-sizing: border-box;
}

body.pos-running {
  overflow: hidden;
  height: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(circle at 8% 0%, var(--pos-gold-dim), transparent 34%),
    radial-gradient(circle at 100% 12%, rgba(212, 175, 55, 0.08), transparent 30%),
    linear-gradient(135deg, var(--pos-bg) 0%, var(--pos-bg-2) 46%, #0a0a0a 100%);
  color: var(--pos-text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.pos-hidden {
  display: none !important;
}

.pos-btn {
  min-height: 44px;
  border: 1px solid var(--pos-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--pos-text);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.20);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.pos-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.30);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.30);
}

.pos-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
}

.pos-btn:disabled {
  opacity: 0.40;
  cursor: not-allowed;
  box-shadow: none;
}

.pos-btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--pos-accent), var(--pos-accent-2));
  color: #0a0a0a;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(212, 175, 55, 0.22);
}

.pos-btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #e6c247, #c9a226);
  box-shadow: 0 18px 36px rgba(212, 175, 55, 0.30);
}

.pos-btn.ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--pos-muted);
  border-color: var(--pos-border);
}

.pos-btn.ghost:hover:not(:disabled) {
  color: var(--pos-text);
  border-color: rgba(212, 175, 55, 0.25);
}

.pos-hint {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--pos-muted);
  text-align: center;
}

/* Main POS shell */
.pos-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  height: 100dvh;
  padding: clamp(0.75rem, 1.5vw, 1.25rem);
  gap: clamp(0.75rem, 1.4vw, 1rem);
}

.pos-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.50), transparent 72%);
}

.pos-topbar {
  --pos-topbar-scale: 1.35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(0.75rem * var(--pos-topbar-scale));
  padding:
    calc(0.65rem * var(--pos-topbar-scale) + env(safe-area-inset-top, 0px))
    max(calc(0.85rem * var(--pos-topbar-scale)), env(safe-area-inset-right, 0px))
    calc(0.65rem * var(--pos-topbar-scale))
    max(calc(0.85rem * var(--pos-topbar-scale)), env(safe-area-inset-left, 0px));
  border: 1px solid var(--pos-border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  box-shadow: var(--pos-shadow-soft);
  backdrop-filter: blur(18px);
}

.pos-topbar-brand {
  display: flex;
  align-items: center;
  gap: calc(0.65rem * var(--pos-topbar-scale));
  min-width: 0;
}

.pos-topbar-mark {
  width: calc(2.6rem * var(--pos-topbar-scale));
  height: calc(2.6rem * var(--pos-topbar-scale));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--pos-gold-dim), rgba(212, 175, 55, 0.06));
  border: 1px solid var(--pos-border);
  box-shadow: 0 14px 30px rgba(212, 175, 55, 0.12);
}

.pos-topbar-mark:empty::before,
.pos-topbar-mark:has(.pos-hidden)::before {
  content: "3T";
  color: var(--pos-accent);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pos-topbar-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: normal;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.pos-topbar h1 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: calc(1.1rem * var(--pos-topbar-scale));
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--pos-text);
  overflow-wrap: anywhere;
}

.pos-topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--pos-muted);
  border: 1px solid var(--pos-border);
  font-size: calc(0.78rem * var(--pos-topbar-scale));
  white-space: nowrap;
}

.pos-topbar-actions {
  display: flex;
  align-items: center;
  gap: calc(0.5rem * var(--pos-topbar-scale));
  margin-left: auto;
  flex-shrink: 0;
}

.pos-topbar-actions .pos-btn {
  padding: calc(0.5rem * var(--pos-topbar-scale)) calc(0.9rem * var(--pos-topbar-scale));
  font-size: calc(0.85rem * var(--pos-topbar-scale));
}

.pos-main {
  overflow: hidden;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--pos-border);
  box-shadow: var(--pos-shadow-soft);
  backdrop-filter: blur(16px);
}

.pos-panel {
  overflow: auto;
  padding: clamp(0.9rem, 2vw, 1.45rem);
}

.pos-panel-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.15rem 0 1rem;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.92), rgba(10, 10, 10, 0));
  backdrop-filter: blur(10px);
}

.pos-panel-toolbar .pos-panel-title {
  margin: 0;
}

.pos-panel-heading {
  min-width: 0;
}

.pos-panel-eyebrow {
  margin: 0 0 0.12rem;
  color: var(--pos-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pos-panel-title {
  margin: 0 0 0.85rem;
  color: var(--pos-text);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: none;
}

.pos-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  min-width: min(100%, 520px);
}

.pos-search {
  flex: 1 1 280px;
  max-width: 360px;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--pos-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--pos-muted);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.15);
}

.pos-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--pos-text);
  font: inherit;
  font-weight: 500;
}

.pos-search input::placeholder {
  color: #646464;
}

.pos-scan-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: clamp(0.85rem, 1.6vw, 1.15rem);
}

@media (min-width: 768px) {
  .pos-grid {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  }
}

@media (min-width: 1080px) {
  .pos-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }
}

.pos-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  min-height: 156px;
  padding: 1rem;
  border: 1px solid var(--pos-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 0%, var(--pos-gold-dim), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  text-align: left;
  color: var(--pos-text);
  cursor: pointer;
  font: inherit;
  box-shadow: var(--pos-shadow-soft);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.pos-tile::after {
  content: "";
  position: absolute;
  inset: auto -28% -45% 22%;
  height: 92px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.10), transparent 64%);
  z-index: -1;
}

.pos-tile:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.28);
  background:
    radial-gradient(circle at 85% 0%, rgba(212, 175, 55, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.30);
}

.pos-tile:active:not(:disabled) {
  transform: translateY(-1px) scale(0.995);
}

.pos-tile.category {
  border-left: 0;
  background:
    radial-gradient(circle at 85% 0%, var(--pos-gold-dim), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.pos-tile.category::before {
  content: "";
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pos-gold-dim), rgba(212, 175, 55, 0.08));
  border: 1px solid var(--pos-border);
}

.pos-tile-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.pos-tile-head .pos-tile-name {
  flex: 1;
  min-width: 0;
  -webkit-line-clamp: 2;
}

.pos-tile.category.has-image {
  gap: 0.45rem;
}

.pos-category-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.06), transparent 34%),
    linear-gradient(145deg, var(--pos-gold-dim), rgba(212, 175, 55, 0.05)),
    #141414;
  border: 1px solid var(--pos-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pos-category-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3));
}

.pos-tile.category.has-image .pos-tile-name {
  font-size: 0.86rem;
  line-height: 1.3;
  -webkit-line-clamp: 2;
}

.pos-tile-icon {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.pos-tile.category:hover {
  border-color: rgba(212, 175, 55, 0.30);
  background:
    radial-gradient(circle at 85% 0%, rgba(212, 175, 55, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
}

.pos-tile.product.available:hover {
  border-color: rgba(212, 175, 55, 0.28);
  background:
    radial-gradient(circle at 85% 0%, rgba(212, 175, 55, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
}

.pos-tile.product {
  min-height: 132px;
}

.pos-tile.product.has-image {
  padding: 0.55rem 0.65rem 0.75rem;
  gap: 0.45rem;
}

.pos-tile.product.unavailable {
  background: rgba(20, 20, 20, 0.60);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.06);
  opacity: 0.55;
  cursor: not-allowed;
}

.pos-tile-name {
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--pos-text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.pos-tile.product.has-image .pos-tile-name,
.pos-tile.product .pos-tile-name {
  -webkit-line-clamp: 2;
  font-size: 0.86rem;
  line-height: 1.3;
}

.pos-tile.product.unavailable .pos-tile-name {
  color: #646464;
}

.pos-tile-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin-top: auto;
}

.pos-tile.product .pos-tile-foot {
  margin-top: auto;
}

.pos-tile-badge,
.pos-stock-badge {
  display: inline-block;
  padding: 0.34rem 0.64rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border: 1px solid transparent;
}

.pos-tile-badge {
  background: var(--pos-gold-dim);
  color: var(--pos-accent);
  border-color: rgba(212, 175, 55, 0.20);
}

.pos-stock-badge.in-stock {
  background: rgba(16, 185, 129, 0.10);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.20);
}

.pos-stock-badge.sold-out {
  background: rgba(239, 68, 68, 0.10);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.20);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pos-tile-meta {
  margin-top: 0.35rem;
  font-size: 0.74rem;
  color: var(--pos-muted);
}

.pos-tile-price {
  font-size: 1.22rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--pos-text);
  letter-spacing: -0.02em;
}

.pos-tile.product.unavailable .pos-tile-price {
  color: #646464;
  font-weight: 600;
}

.pos-product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.06), transparent 34%),
    linear-gradient(145deg, var(--pos-gold-dim), rgba(212, 175, 55, 0.05)),
    #141414;
  border: 1px solid var(--pos-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  margin-bottom: 0.15rem;
}

.pos-product-media.is-placeholder {
  min-height: 88px;
  background:
    linear-gradient(135deg, var(--pos-gold-dim), rgba(212, 175, 55, 0.05)),
    #141414;
}

.pos-product-media.is-placeholder::after {
  content: "";
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.20), rgba(212, 175, 55, 0.10));
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.04);
}

.pos-product-thumb {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  margin: 0;
  background: transparent;
  transform: scale(1.12);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.pos-tile.product.unavailable .pos-product-media {
  opacity: 0.5;
  filter: grayscale(0.35);
}

.pos-cart-bar {
  border: 1px solid var(--pos-border);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  box-shadow: var(--pos-shadow);
  backdrop-filter: blur(18px);
  padding:
    0.65rem
    max(0.85rem, env(safe-area-inset-right, 0px))
    calc(0.65rem + env(safe-area-inset-bottom, 0px))
    max(0.85rem, env(safe-area-inset-left, 0px));
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.55rem;
  align-items: center;
}

@media (max-width: 520px) {
  .pos-cart-bar {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "summary summary"
      "cart checkout";
  }

  .pos-cart-summary {
    grid-area: summary;
  }

  .pos-cart-bar #storeViewCartBtn,
  .pos-cart-bar #posViewCartBtn {
    grid-area: cart;
    width: 100%;
  }

  .pos-cart-bar #storeCheckoutBtn,
  .pos-cart-bar #posPayBtn {
    grid-area: checkout;
    width: 100%;
  }
}

.pos-cart-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.pos-cart-summary strong {
  display: block;
  min-width: max-content;
  padding: 0.55rem 0.8rem;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--pos-accent), var(--pos-accent-2));
  color: #0a0a0a;
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.20);
}

.pos-cart-summary span {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--pos-muted);
}

.pos-cart-items {
  max-height: 34vh;
  overflow: auto;
  margin-bottom: 0.65rem;
}

.pos-cart-line {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.8rem;
  margin-bottom: 0.6rem;
  border: 1px solid var(--pos-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  font-size: 0.88rem;
}

.pos-cart-line-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.pos-cart-line-name {
  min-width: 0;
  line-height: 1.25;
}

.pos-cart-line-total {
  flex-shrink: 0;
}

.pos-cart-line-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pos-cart-qty {
  min-width: 1.75rem;
  text-align: center;
  font-weight: 600;
}

.pos-cart-qty-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--pos-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--pos-text);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.pos-cart-remove-btn {
  margin-left: auto;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.pos-sheet {
  position: fixed;
  inset: auto 0 0 0;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.98), rgba(20, 20, 20, 0.98));
  color: var(--pos-text);
  border: 1px solid var(--pos-border);
  border-top: 1px solid var(--pos-border);
  border-radius: 28px 28px 0 0;
  padding: 1.15rem;
  padding-bottom: calc(1.15rem + env(safe-area-inset-bottom));
  transform: translateY(110%);
  transition: transform 0.2s ease;
  z-index: 30;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -24px 58px rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(18px);
}

.pos-sheet.open {
  transform: translateY(0);
}

.pos-sheet h3 {
  margin-top: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--pos-text);
}

.pos-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 25;
}

.pos-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(5px);
}

.pos-qty-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

.pos-qty-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 1.4rem;
  border: 1px solid var(--pos-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--pos-text);
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.pos-qty-value {
  font-size: 1.6rem;
  font-weight: 700;
  min-width: 2ch;
  text-align: center;
  color: var(--pos-text);
}

.pos-toast {
  position: fixed;
  left: 50%;
  bottom: 5.5rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pos-accent), var(--pos-accent-2));
  color: #0a0a0a;
  padding: 0.65rem 1rem;
  z-index: 40;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.30);
}

.pos-toast.error {
  background: linear-gradient(135deg, var(--pos-danger), #7f1d1d);
  color: #fff;
}

.pos-empty {
  text-align: center;
  grid-column: 1 / -1;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.10);
  color: var(--pos-muted);
  font-weight: 500;
  padding: 2rem 1rem;
}

.pos-offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #78350f;
  color: #fef3c7;
  text-align: center;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.75rem;
}

body.pos-offline.pos-running .pos-topbar {
  margin-top: 2rem;
}

.pos-offline-queue-count {
  font-size: 0.78rem;
  opacity: 0.95;
}

.pos-offline-queue-count.pos-hidden {
  display: none;
}

.pos-scan-video {
  width: 100%;
  max-height: 220px;
  border-radius: 0.65rem;
  background: #000;
  object-fit: cover;
}

.pos-scan-manual {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.pos-scan-manual input {
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  border: 1px solid var(--pos-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--pos-text);
  font: inherit;
}

.pos-receipt-print {
  position: fixed;
  left: -9999px;
  top: 0;
}

.pos-pay-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.pos-pay-options .pos-btn {
  width: 100%;
  border-radius: 22px;
  min-height: 62px;
  font-size: 1rem;
}

@media print {
  body * {
    visibility: hidden;
  }

  #posReceiptPrint,
  #posReceiptPrint * {
    visibility: visible;
  }

  #posReceiptPrint {
    position: absolute;
    left: 0;
    top: 0;
    width: 72mm;
    padding: 4mm;
    font: 12px/1.35 monospace;
    color: #000;
  }

  .pos-receipt h1 {
    font-size: 14px;
    margin: 0 0 4px;
  }

  .pos-receipt ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .pos-receipt li {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.15rem 0;
  }

  .pos-receipt-thanks {
    margin-top: 0.75rem;
    text-align: center;
  }
}

@media (min-width: 1080px) {
  .pos-sheet {
    inset: 1.25rem 1.25rem 1.25rem auto;
    width: min(430px, 36vw);
    max-height: none;
    border-radius: 30px;
    transform: translateX(calc(100% + 1.5rem));
    box-shadow: -24px 24px 70px rgba(0, 0, 0, 0.30);
  }

  .pos-sheet.open {
    transform: translateX(0);
  }

  .pos-cart-items {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .pos-shell {
    padding: 0.6rem;
    gap: 0.6rem;
  }

  .pos-topbar {
    --pos-topbar-scale: 1;
    border-radius: 20px;
  }

  .pos-panel-toolbar,
  .pos-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pos-toolbar-actions {
    width: 100%;
    min-width: 0;
  }

  .pos-search {
    max-width: none;
    flex-basis: auto;
  }

  .pos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .pos-tile {
    min-height: 148px;
    border-radius: 20px;
    padding: 0.82rem;
  }

  .pos-cart-summary {
    justify-content: space-between;
  }
}