/* ============================================================================
   SmokePOS – POS System Styles  (redesigned)
   ============================================================================ */


/* ============================================================================
   POS Wrapper & Layout
   ============================================================================ */

.pos-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-height) - 2 * var(--spacing-xl));
  gap: 0;
}

.pos-body {
  display: flex;
  gap: 14px;
  flex: 1;
  min-height: 0;
}


/* ============================================================================
   Top Bar
   ============================================================================ */

.pos-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 14px;
  flex-shrink: 0;
}

.pos-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pos-branch-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}

.pos-topbar-time {
  font-size: 13px;
  color: var(--color-text-light);
  background: var(--color-bg);
  padding: 4px 12px;
  border-radius: 20px;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--color-border-light);
  letter-spacing: 0.5px;
}

.pos-topbar-right {
  display: flex;
  gap: 8px;
}

.pos-hdr-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--color-border-light);
  background: var(--color-card-bg);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text-light);
  transition: all var(--transition-fast);
}

.pos-hdr-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pos-hdr-btn-accent {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.06);
}

.pos-hdr-btn-accent:hover {
  background: var(--color-primary);
  color: white;
}

.pos-clock-btn {
  border-color: #10b981;
  color: #10b981;
  font-weight: 600;
  transition: all 0.2s;
}
.pos-clock-btn:hover {
  background: #10b981;
  color: white;
  border-color: #10b981;
}
.pos-clock-btn.pos-clocked-in {
  background: #10b981;
  color: white;
  border-color: #10b981;
  animation: pulse-clock 2s infinite;
}
.pos-clock-btn.pos-clocked-in:hover {
  background: #ef4444;
  border-color: #ef4444;
}
@keyframes pulse-clock {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

/* Clock-In Gate Screen */
.pos-clockin-gate {
  display: flex; align-items: center; justify-content: center;
  min-height: 70vh; padding: 40px;
}
.pos-clockin-card {
  background: white; border-radius: 16px; padding: 48px 40px;
  text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  max-width: 420px; width: 100%;
}
.pos-clockin-icon { font-size: 56px; margin-bottom: 12px; }
.pos-clockin-card h2 {
  font-size: 22px; font-weight: 700; color: #1e293b; margin: 0 0 8px;
}
.pos-clockin-card p {
  font-size: 14px; color: #64748b; margin: 0 0 8px;
}
.pos-clockin-branch {
  font-size: 15px; font-weight: 600; color: #334155;
  margin-bottom: 24px !important;
}
.btn-lg {
  padding: 14px 36px; font-size: 16px; border-radius: 10px;
}


/* ============================================================================
   Left Panel – Products
   ============================================================================ */

.pos-products-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 10px;
}

/* Search */
.pos-search-row {
  flex-shrink: 0;
}

.pos-search-wrap {
  position: relative;
}

.pos-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  pointer-events: none;
}

.pos-search-input {
  width: 100%;
  padding: 11px 44px 11px 40px;
  border: 2px solid var(--color-border-light);
  border-radius: 12px;
  font-size: 14px;
  background: var(--color-card-bg);
  color: var(--color-text);
  transition: border-color var(--transition-fast);
  box-sizing: border-box;
}

.pos-search-input:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* Camera scan button inside search bar */
.pos-camera-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}
.pos-camera-btn:hover {
  color: var(--color-primary);
  background: rgba(99,102,241,0.08);
}

/* Camera Scanner Overlay */
.camera-scanner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: camFadeIn 0.2s ease;
}
@keyframes camFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.camera-scanner-modal {
  background: var(--color-card-bg, #fff);
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
}
.camera-scanner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-light, #eee);
}
.camera-scanner-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.camera-scanner-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-text-muted, #999);
  padding: 0 4px;
  line-height: 1;
}
.camera-scanner-close:hover {
  color: var(--color-danger, #e53e3e);
}
.camera-scanner-reader {
  width: 100%;
  min-height: 280px;
}
.camera-scanner-reader video {
  border-radius: 0 !important;
}
.camera-scanner-hint {
  text-align: center;
  padding: 12px 20px 16px;
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted, #888);
}

/* Tag Rail */
.pos-tag-rail {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.pos-tag-pill {
  padding: 5px 13px;
  border-radius: 20px;
  border: 1.5px solid var(--color-border-light);
  background: var(--color-card-bg);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--color-text-light);
  white-space: nowrap;
}

.pos-tag-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pos-tag-pill.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.pos-tag-pill-clear {
  border-color: #ef4444;
  color: #ef4444;
}

.pos-tag-pill-clear:hover {
  background: #ef4444;
  color: white;
}

/* Browser */
.pos-browser {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}


/* ============================================================================
   Category Grid
   ============================================================================ */

.pos-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 2px;
}

.pos-cat-tile {
  border-radius: 14px;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 96px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pos-cat-tile::after {
  content: '';
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.pos-cat-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.pos-cat-tile:active {
  transform: scale(0.97);
}

.pos-cat-icon {
  font-size: 22px;
}

.pos-cat-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.pos-cat-count {
  font-size: 11px;
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.18);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  width: fit-content;
}


/* ============================================================================
   Product List (after picking category)
   ============================================================================ */

.pos-browser-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.pos-back-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--color-border-light);
  background: var(--color-card-bg);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text-light);
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.pos-back-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pos-cat-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}

.pos-cat-tabs::-webkit-scrollbar {
  display: none;
}

.pos-cat-tab {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--color-border-light);
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  color: var(--color-text-light);
}

.pos-cat-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pos-cat-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* Product List */
.pos-product-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pos-product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pos-product-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.pos-product-body {
  flex: 1;
  min-width: 0;
}

.pos-product-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.pos-product-meta {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}

.pos-product-cat {
  font-size: 11px;
  color: var(--color-text-lighter);
  background: var(--color-bg);
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid var(--color-border-light);
}

.pos-stock-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 6px;
}

.pos-stock-low {
  color: #D97706;
  background: #FEF3C7;
}

.pos-stock-out {
  color: #DC2626;
  background: #FEE2E2;
}

.pos-product-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.pos-product-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 52px;
  text-align: right;
}

.pos-add-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--color-primary);
  color: white;
  border: none;
  font-size: 22px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  line-height: 1;
}

.pos-add-btn:hover {
  background: #5b21b6;
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
}

.pos-add-btn:active {
  transform: scale(0.95);
}

.pos-add-btn:disabled {
  background: var(--color-border);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Empty State */
.pos-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--color-text-lighter);
  text-align: center;
  gap: 8px;
}

.pos-empty-icon {
  font-size: 40px;
}

.pos-empty-text {
  font-size: 14px;
  color: var(--color-text-light);
}


/* ============================================================================
   Right Panel – Cart
   ============================================================================ */

.pos-cart-panel {
  width: 356px;
  display: flex;
  flex-direction: column;
  background: var(--color-card-bg);
  border-radius: 16px;
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  flex-shrink: 0;
}

/* Customer Row */
.pos-customer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.pos-customer-row:hover {
  background: var(--color-bg);
}

.pos-customer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.pos-customer-info {
  flex: 1;
  min-width: 0;
}

.pos-customer-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-customer-sub {
  font-size: 11px;
  color: var(--color-text-lighter);
}

.pos-customer-change-btn {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--color-border-light);
  background: var(--color-bg);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.pos-customer-change-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Cart Scroll Area */
.pos-cart-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.pos-cart-items {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Cart Empty State */
.pos-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--color-text-lighter);
  text-align: center;
  gap: 6px;
}

.pos-cart-empty-icon {
  font-size: 36px;
  opacity: 0.5;
}

.pos-cart-empty-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-light);
}

.pos-cart-empty-sub {
  font-size: 12px;
}

/* Cart Item */
.pos-cart-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 8px;
  border-radius: 10px;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  transition: border-color var(--transition-fast);
}

.pos-cart-item:hover {
  border-color: var(--color-border);
}

/* Qty stepper */
.pos-cart-qty {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: 1px;
  flex-shrink: 0;
}

.pos-qty-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all var(--transition-fast);
  line-height: 1;
}

.pos-qty-btn:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

.pos-qty-val {
  min-width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}

/* Cart item info */
.pos-cart-item-info {
  flex: 1;
  min-width: 0;
}

.pos-cart-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-cart-item-note {
  font-size: 11px;
  color: var(--color-text-lighter);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.pos-cart-item-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  flex-shrink: 0;
}

.pos-cart-item-btns {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.pos-cart-note-btn,
.pos-cart-del-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
  transition: all var(--transition-fast);
}

.pos-cart-note-btn:hover,
.pos-cart-del-btn:hover {
  opacity: 1;
  background: var(--color-bg);
}

.pos-cart-del-btn:hover {
  color: var(--color-danger);
}


/* ============================================================================
   Cart Bottom – Summary + Actions
   ============================================================================ */

.pos-cart-bottom {
  border-top: 1px solid var(--color-border-light);
  flex-shrink: 0;
}

.pos-cart-summary {
  padding: 10px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pos-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-light);
}

.pos-summary-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  padding-top: 6px;
  border-top: 1px solid var(--color-border-light);
  margin-top: 4px;
}

.pos-cart-actions {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
}

.pos-draft-btn {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--color-border-light);
  background: var(--color-card-bg);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text-light);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.pos-draft-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pos-pay-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  background: #10b981;
  color: white;
  border: none;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.pos-pay-btn:hover {
  background: #059669;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.pos-pay-btn:active {
  transform: translateY(0);
}

.pos-pay-label {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
}

.pos-pay-total {
  font-size: 17px;
  font-weight: 800;
}


/* ============================================================================
   Payment Overlay
   ============================================================================ */

.pay-overlay {
  position: fixed;
  inset: 0;
  background: #0f172a;
  display: flex;
  align-items: stretch;
  z-index: 900;
}

.pay-wrap {
  width: 100%;
  display: flex;
  position: relative;
}

.pay-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--transition-fast);
}

.pay-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Numpad column */
.pay-numpad-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 20px;
}

/* Amount display */
.pay-amount-display {
  text-align: center;
  min-width: 280px;
}

.pay-amount-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 10px;
  font-weight: 600;
}

.pay-amount-value {
  font-size: 68px;
  font-weight: 200;
  color: white;
  font-variant-numeric: tabular-nums;
  letter-spacing: -3px;
  line-height: 1;
  min-width: 260px;
  text-align: center;
}

.pay-hint {
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
  padding: 5px 16px;
  border-radius: 20px;
  display: inline-block;
}

.pay-hint-change {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
}

.pay-hint-remaining {
  color: #fb923c;
  background: rgba(251, 146, 60, 0.12);
}

/* Quick amounts */
.pay-quick-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 340px;
}

.pay-quick-btn {
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pay-quick-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.pay-exact-btn {
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pay-exact-btn:hover {
  background: rgba(99, 102, 241, 0.35);
  color: white;
}

/* Numpad grid */
.pay-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 300px;
  width: 100%;
}

.pay-key {
  aspect-ratio: 1.4;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 22px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-key:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.pay-key:active {
  transform: scale(0.93);
  background: rgba(255, 255, 255, 0.1);
}

/* Order column */
.pay-order-col {
  width: 380px;
  background: white;
  display: flex;
  flex-direction: column;
  padding: 36px 28px 28px;
  overflow-y: auto;
  flex-shrink: 0;
}

.pay-order-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 14px;
}

.pay-items-toggle {
  font-size: 13px;
  font-weight: 600;
  color: #6366f1;
  cursor: pointer;
  margin-bottom: 8px;
  user-select: none;
}

.pay-items-toggle:hover {
  color: #4f46e5;
}

.pay-items-list {
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 14px;
}

.pay-order-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
}

.pay-item-qty {
  font-size: 10px;
  font-weight: 700;
  color: white;
  background: #6366f1;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

.pay-item-name {
  flex: 1;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pay-item-price {
  font-weight: 600;
  color: #334155;
  flex-shrink: 0;
}

/* Totals */
.pay-totals {
  padding: 16px 0;
  border-top: 2px solid #e2e8f0;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  margin-top: auto;
}

.pay-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #64748b;
}

.pay-grand-total {
  font-size: 26px;
  font-weight: 800;
  color: #1e293b;
  padding-top: 6px;
}

.pay-change-row {
  color: #10b981;
  font-weight: 600;
}

.pay-remaining-row {
  color: #ef4444;
  font-weight: 600;
}

.pay-deal-row {
  color: #10b981;
  font-weight: 600;
  font-size: 13px;
}

/* Payment Methods */
.pay-methods {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.pay-method-btn {
  flex: 1;
  padding: 14px 10px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 2px solid transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  color: #475569;
}

.pay-method-btn:hover {
  border-color: #6366f1;
  color: #6366f1;
  background: #eef2ff;
}

.pay-method-btn.active {
  border-color: #6366f1;
  background: #eef2ff;
  color: #4f46e5;
}

.pay-method-icon {
  font-size: 22px;
}

/* Charge Button */
.pay-charge-btn {
  padding: 18px;
  border-radius: 14px;
  background: #10b981;
  color: white;
  border: none;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: all var(--transition-fast);
  width: 100%;
}

.pay-charge-btn:hover:not(:disabled) {
  background: #059669;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}

.pay-charge-btn:active:not(:disabled) {
  transform: translateY(0);
}

.pay-charge-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Points row in order summary */
.pay-points-row {
  color: #b45309;
  font-weight: 500;
}
.pay-points-row span:last-child {
  color: #b45309;
}

/* Redeem Points Button */
.pay-redeem-btn {
  width: 100%;
  padding: 10px 16px;
  border: 2px dashed #d97706;
  border-radius: 10px;
  background: rgba(217,119,6,0.06);
  color: #b45309;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background 0.2s, border-color 0.2s;
}
.pay-redeem-btn:hover {
  background: rgba(217,119,6,0.12);
  border-color: #b45309;
}
.pay-redeem-btn.redeemed {
  border-style: solid;
  background: rgba(16,185,129,0.08);
  border-color: #10b981;
  color: #047857;
}

/* Points Redemption Modal */
.points-redeem-modal {
  padding: 4px 0;
}
.points-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
}
.points-balance-value {
  font-weight: 700;
  color: #b45309;
  font-size: 16px;
}
.points-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--color-border-light, #e2e8f0);
  border-radius: 3px;
  outline: none;
  margin: 8px 0;
}
.points-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d97706;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.points-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d97706;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.points-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-muted, #888);
}
.points-slider-current {
  font-weight: 700;
  color: #b45309;
  font-size: 14px;
}
.points-preview {
  background: rgba(217,119,6,0.06);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 12px;
}
.points-preview-discount,
.points-preview-new-total {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
}
.points-preview-discount span:last-child {
  color: #b45309;
  font-weight: 600;
}
.points-preview-new-total {
  font-weight: 700;
  font-size: 15px;
  border-top: 1px solid rgba(217,119,6,0.15);
  padding-top: 8px;
  margin-top: 4px;
}

/* Receipt points display */
.receipt-points {
  font-size: 14px;
  color: #b45309;
  font-weight: 500;
  margin-top: 6px;
}
.receipt-points.redeemed {
  color: #047857;
}

/* Product reward options in POS modal */
.reward-product-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}
.reward-product-option {
  border: 2px solid var(--color-border-light, #e5e7eb);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--color-bg, #fff);
}
.reward-product-option:hover:not(.rpo-locked) {
  border-color: #d97706;
  background: rgba(217,119,6,0.04);
}
.reward-product-option.rpo-locked {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--color-bg-secondary, #f9fafb);
}
.rpo-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text, #111);
  margin-bottom: 4px;
}
.rpo-details {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.rpo-cost {
  color: #d97706;
  font-weight: 600;
}
.rpo-value {
  color: var(--color-text-secondary, #6b7280);
}
.rpo-need {
  font-size: 11px;
  color: #ef4444;
  margin-top: 4px;
}

/* Rewards conversion preview in settings */
.rewards-conversion-preview {
  text-align: center;
  font-size: 13px;
  color: #b45309;
  font-weight: 600;
  background: rgba(217,119,6,0.06);
  border-radius: 8px;
  padding: 8px 16px;
  margin: 12px 0 20px;
}


/* ============================================================================
   Receipt Success Modal
   ============================================================================ */

.receipt-success {
  text-align: center;
  padding: 10px 0;
}

.receipt-check {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #10b981;
  color: white;
  font-size: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.receipt-total {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-primary);
  margin: 8px 0;
}

.receipt-change {
  font-size: 15px;
  color: #10b981;
  font-weight: 600;
  margin-bottom: 8px;
}


/* ============================================================================
   Responsive
   ============================================================================ */

@media (max-width: 1400px) {
  .pos-cart-panel {
    width: 320px;
  }

  .pos-cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1100px) {
  .pay-order-col {
    width: 320px;
  }
}

@media (max-width: 1024px) {
  .pos-body {
    flex-direction: column;
    overflow-y: auto;
  }

  .pos-wrap {
    height: auto;
  }

  .pos-cart-panel {
    width: 100%;
  }

  .pos-cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pay-wrap {
    flex-direction: column;
  }

  .pay-order-col {
    width: 100%;
    max-height: 320px;
  }
}

@media (max-width: 768px) {
  .pos-wrap {
    height: auto;
    min-height: calc(100vh - 56px);
  }

  .pos-header {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .pos-search-input {
    font-size: 14px;
  }

  .pos-hdr-btn {
    padding: 6px 8px;
    font-size: 11px;
  }

  .pos-cat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 8px;
  }

  .pos-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 8px;
  }

  .pos-product-card {
    padding: 8px;
  }

  .pos-product-name {
    font-size: 12px;
  }

  .pos-product-price {
    font-size: 13px;
  }

  .pos-cart-panel {
    max-height: 40vh;
    border-top: 2px solid var(--color-border);
  }

  .pos-cart-header {
    padding: 8px 12px;
  }

  .pos-cart-items {
    max-height: 20vh;
  }

  .pos-summary {
    padding: 8px 12px;
  }

  .pos-charge-btn {
    padding: 12px;
    font-size: 16px;
  }

  .pay-numpad-col {
    padding: 16px 12px;
  }

  .pay-amount-value {
    font-size: 40px;
  }

  .pay-numpad {
    max-width: 100%;
  }

  .pay-key {
    padding: 14px;
    font-size: 18px;
  }

  .pay-methods {
    flex-wrap: wrap;
  }

  .pay-method-btn {
    flex: 1 1 30%;
    padding: 8px;
    font-size: 12px;
  }

  .pay-charge-btn {
    padding: 14px;
    font-size: 16px;
  }
}
