/* ====================================================================
   Durian Farm POS - Tablet / iPad Touch-Screen Styles
   ==================================================================== */

:root,
[data-theme="dark"],
body.dark-mode,
body.theme-dark {
  --pos-primary: #10b981;
  --pos-primary-dark: #059669;
  --pos-accent: #38bdf8;
  --pos-bg: #0d1522;
  --pos-surface: #111a28;
  --pos-card-bg: rgba(22, 33, 52, 0.95);
  --pos-card-hover: rgba(30, 45, 71, 0.98);
  --pos-header-bg: rgba(18, 26, 40, 0.98);
  --pos-ticket-bg: rgba(18, 26, 40, 0.95);
  --pos-modal-bg: #162134;
  --pos-border: rgba(56, 189, 248, 0.3);
  --pos-border-subtle: rgba(255, 255, 255, 0.08);
  --pos-text-primary: #ffffff;
  --pos-text-secondary: #cbd5e1;
  --pos-text-muted: #94a3b8;
  --pos-khr: #34d399;
  --pos-usd: #fbbf24;
  --pos-card-shadow: 0 0 20px rgba(56, 189, 248, 0.18), 0 8px 24px rgba(0, 0, 0, 0.45);
  --pos-card-shadow-hover: 0 0 28px rgba(56, 189, 248, 0.32), 0 12px 30px rgba(0, 0, 0, 0.55);
  --pos-btn-shadow: 0 0 14px rgba(56, 189, 248, 0.22), 0 4px 12px rgba(0, 0, 0, 0.3);
  --pos-input-bg: rgba(15, 23, 42, 0.85);
  --pos-khqr: #dc2626;
  --pos-font: 'Kantumruy Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="light"],
body.light-mode,
body.light,
body.theme-light {
  --pos-primary: #10b981;
  --pos-primary-dark: #059669;
  --pos-accent: #0284c7;
  --pos-bg: #f8fafc;
  --pos-surface: #ffffff;
  --pos-card-bg: #ffffff;
  --pos-card-hover: #f1f5f9;
  --pos-header-bg: #ffffff;
  --pos-ticket-bg: #ffffff;
  --pos-modal-bg: #ffffff;
  --pos-border: #e2e8f0;
  --pos-border-subtle: #f1f5f9;
  --pos-text-primary: #0f172a;
  --pos-text-secondary: #334155;
  --pos-text-muted: #64748b;
  --pos-khr: #059669;
  --pos-usd: #b45309;
  --pos-card-shadow: 0 0 18px rgba(16, 185, 129, 0.1), 0 6px 18px rgba(15, 23, 42, 0.08);
  --pos-card-shadow-hover: 0 0 24px rgba(16, 185, 129, 0.22), 0 10px 24px rgba(15, 23, 42, 0.12);
  --pos-btn-shadow: 0 0 12px rgba(16, 185, 129, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  --pos-input-bg: #ffffff;
  --pos-khqr: #dc2626;
  --pos-font: 'Kantumruy Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* iOS Safari Double-Tap & Input Focus Zoom Prevention */
html, body, button, input, select, textarea {
  touch-action: manipulation;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="email"],
input[type="tel"],
select,
textarea,
.form-control,
.form-select {
  font-size: 16px !important;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: var(--pos-font);
  background-color: var(--pos-bg);
  color: var(--pos-text-primary);
  overflow-x: hidden;
}

/* App Frame */
.pos-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  box-sizing: border-box;
  background-color: var(--pos-bg);
  color: var(--pos-text-primary);
}

/* Header with Dynamic Island & Status Bar Safe Area Padding */
.pos-navbar {
  min-height: calc(56px + max(env(safe-area-inset-top, 20px), 16px));
  padding-top: max(env(safe-area-inset-top, 20px), 16px) !important;
  padding-left: max(env(safe-area-inset-left, 16px), 16px);
  padding-right: max(env(safe-area-inset-right, 16px), 16px);
  padding-bottom: 10px;
  background: var(--pos-header-bg);
  border-bottom: 1px solid var(--pos-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 100;
  box-sizing: border-box;
  color: var(--pos-text-primary);
}

.pos-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: clamp(0.85rem, 2.5vw, 1.2rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--pos-primary-dark);
  min-width: 0;
  flex-shrink: 1;
}

.pos-brand span,
.pos-brand .pos-brand-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  min-width: 0;
}

.pos-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
}

.btn-back-portal {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(4, 120, 87, 0.35);
  border-radius: 9999px;
  color: #1e293b !important;
  font-weight: 750;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
}

.btn-back-portal:hover {
  background: #ffffff;
  color: #047857 !important;
  border-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.2);
}

.btn-back-portal:active {
  transform: scale(0.96);
}

/* Main Split View */
.pos-main-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Catalog Pane (Left / Center) */
.pos-catalog-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--pos-bg);
  border-right: 1px solid var(--pos-border);
}

.pos-catalog-header {
  padding: 12px 16px;
  background: var(--pos-header-bg);
  border-bottom: 1px solid var(--pos-border);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.pos-category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}

.pos-category-pill {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  background: rgba(22, 33, 52, 0.9);
  color: #cbd5e1;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
}

.pos-category-pill:hover {
  background: rgba(30, 41, 59, 0.95);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.pos-category-pill.active {
  background: var(--pos-primary);
  color: #ffffff !important;
  font-weight: 700;
  border-color: var(--pos-primary);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
}

.pos-catalog-grid {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  align-content: start;
}

/* Product Card (Android & iOS Optimized Balanced Layout - Zero Clipping & Compact Height) */
.pos-product-card {
  background: rgba(22, 33, 52, 0.95);
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 12px;
  cursor: pointer;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  height: auto !important;
  min-height: 260px !important;
  max-height: none !important;
  overflow: visible !important;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.22), 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  box-sizing: border-box !important;
  color: #ffffff;
}

.pos-product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(52, 211, 153, 0.65) !important;
  box-shadow: 0 0 30px rgba(52, 211, 153, 0.38), 0 16px 36px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.pos-product-body {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
}

.pos-product-card:active {
  transform: scale(0.97);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-color: var(--pos-primary);
}

.pos-product-img-wrap {
  position: relative;
  width: 100%;
  height: 120px;
  min-height: 110px;
  border-radius: 12px;
  overflow: hidden;
  background: #111a28;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  display: block;
}

.pos-product-img {
  width: 100% !important;
  height: 100% !important;
  min-height: 100px !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  transition: transform 0.3s ease;
}

.pos-product-card:hover .pos-product-img {
  transform: scale(1.06);
}

.pos-product-img-wrap .pos-product-variety-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  margin-bottom: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.pos-product-img-wrap .badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
}

.pos-product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pos-product-variety-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
  margin-bottom: 6px;
}

.pos-product-title {
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.3;
  margin-bottom: 6px;
  color: #ffffff !important;
}

.pos-product-pricing {
  margin-top: auto !important;
  display: flex;
  flex-direction: column;
}

.pos-product-price-row {
  display: flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  margin-top: auto !important;
  margin-bottom: 4px !important;
  padding-bottom: 4px !important;
  overflow: visible !important;
  flex-wrap: wrap !important;
}

.pos-price-khr {
  font-size: 1.3rem !important;
  font-weight: 850 !important;
  color: #34d399 !important;
  display: inline-block !important;
  line-height: 1.1 !important;
  visibility: visible !important;
}

.pos-price-unit {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #cbd5e1 !important;
}

.pos-price-usd {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fbbf24 !important;
}

/* Ticket / Cart Pane (Right) */
.pos-ticket-pane {
  width: 420px;
  background: var(--pos-ticket-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
  border-left: 1px solid var(--pos-border);
  color: var(--pos-text-primary);
}

.pos-ticket-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--pos-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--pos-header-bg);
  color: var(--pos-text-primary);
}

.pos-ticket-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

#posTicketEmpty.is-hidden {
  display: none !important;
}

#posTicketEmpty.is-visible {
  display: flex !important;
}

.pos-ticket-item {
  background: var(--pos-card-bg);
  border: 1px solid var(--pos-border);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  color: var(--pos-text-primary);
  box-shadow: var(--pos-card-shadow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pos-ticket-item:hover {
  box-shadow: var(--pos-card-shadow-hover);
}

.pos-item-row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.pos-item-title {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  max-width: 240px;
}

.pos-item-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pos-qty-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  padding: 2px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pos-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: bold;
  color: #ffffff;
  cursor: pointer;
}

.pos-qty-btn:active {
  background: rgba(255, 255, 255, 0.2);
}

.pos-weight-badge {
  font-size: 0.95rem;
  font-weight: 700;
  padding: 4px 10px;
  background: rgba(52, 211, 153, 0.15);
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #34d399;
}

.pos-weight-badge:hover {
  background: rgba(52, 211, 153, 0.25);
}

/* Ticket Totals & Checkout Box */
.pos-ticket-footer {
  padding: 16px 20px;
  background: var(--pos-header-bg);
  border-top: 1px solid var(--pos-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--pos-text-primary);
}

.pos-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid #10b981;
  border-radius: 16px;
  padding: 12px 16px;
}

.pos-grand-total-khr {
  font-size: 2.1rem;
  font-weight: 900;
  color: #34d399;
  text-shadow: 0 0 16px rgba(52, 211, 153, 0.4);
}

.pos-grand-total-usd {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fbbf24;
}

.pos-checkout-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pos-btn-pay-khqr {
  background: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px 10px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transition: transform 0.1s ease;
}

.pos-btn-pay-khqr:active {
  transform: scale(0.98);
  background: #b91c1c;
}

.pos-btn-pay-cash {
  background: var(--pos-primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px 10px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.25);
  transition: transform 0.1s ease;
}

.pos-btn-pay-cash:active {
  transform: scale(0.98);
  background: var(--pos-primary-dark);
}

/* Numeric Keypad Modal (For entering exact decimal weights e.g. 3.45 kg) */
.pos-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.pos-keypad-btn {
  height: 56px;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(22, 33, 52, 0.95);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pos-keypad-btn:active {
  background: rgba(30, 41, 59, 0.95);
}

/* Lock Screen PIN Pad with Dynamic Island Safe Area */
.pos-lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding-top: max(env(safe-area-inset-top, 20px), 16px) !important;
  padding-bottom: max(env(safe-area-inset-bottom, 20px), 16px);
  padding-left: max(env(safe-area-inset-left, 16px), 16px);
  padding-right: max(env(safe-area-inset-right, 16px), 16px);
  box-sizing: border-box;
}

.pos-lock-card {
  background: #162134;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 30px;
  width: 360px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.pos-pin-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.pos-pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  transition: all 0.15s ease;
}

.pos-pin-dot.filled {
  background: var(--pos-primary);
  border-color: var(--pos-primary);
  transform: scale(1.15);
}

/* KHQR Payment Modal */
.pos-khqr-card {
  background: #162134;
  color: #ffffff;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pos-khqr-frame {
  background: #ffffff;
  border: 3px solid #dc2626;
  border-radius: 16px;
  padding: 16px;
  display: inline-block;
  margin: 10px 0;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.15);
}

.pos-khqr-header {
  background: #dc2626;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

/* ====================================================================
   THERMAL RECEIPT PRINTING STYLES (58mm / 80mm ESC/POS format)
   ==================================================================== */
#thermalReceipt {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }
  #thermalReceipt, #thermalReceipt * {
    visibility: visible;
  }
  #thermalReceipt {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
    margin: 0;
    padding: 4mm 6mm;
    font-family: 'Kantumruy Pro', monospace;
    font-size: 12px;
    line-height: 1.35;
    color: #000000;
    background: #ffffff;
  }
  .no-print {
    display: none !important;
  }
}

/* ====================================================================
   MOBILE / TABLET SEGMENTED VIEW SWITCHER & NAVIGATION
   ==================================================================== */
.pos-mobile-view-switcher {
  display: none;
  background: #0d1522;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  padding-left: max(env(safe-area-inset-left, 12px), 12px);
  padding-right: max(env(safe-area-inset-right, 12px), 12px);
  gap: 8px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.pos-view-switch-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(22, 33, 52, 0.9);
  color: #cbd5e1;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.pos-view-switch-btn.active {
  background: var(--pos-primary);
  color: #ffffff !important;
  font-weight: 700;
  border-color: var(--pos-primary);
  box-shadow: 0 2px 8px rgba(25, 135, 84, 0.25);
}

/* Sole Primary Currency: Riel (KHR) Exclusively */
.pos-price-usd,
.sub-price-usd,
#posGrandTotalUsd,
#cashDueUsd,
#cashChangeUsd,
#parkModalTotalUsd,
#posExchangeRateDisplay {
  display: none !important;
}

/* Floating Bottom Cart Bar (On mobile catalog view) */
.pos-floating-cart-bar {
  display: none;
  position: fixed;
  bottom: max(env(safe-area-inset-bottom, 14px), 14px);
  left: max(env(safe-area-inset-left, 14px), 14px);
  right: max(env(safe-area-inset-right, 14px), 14px);
  background: #1e293b;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  z-index: 500;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: posSlideUp 0.25s ease-out;
  box-sizing: border-box;
}

@keyframes posSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pos-daily-price-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: #dcfce7;
  color: #15803d;
  display: inline-block;
  margin-top: 3px;
}

/* Mobile responsive adjustments */
@media (max-width: 991px) {
  .pos-mobile-view-switcher {
    display: flex;
  }

  .pos-main-layout {
    flex: 1;
    min-height: 0;
    height: auto;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
  }

  /* When showing catalog */
  .pos-container.show-catalog .pos-catalog-pane {
    display: flex !important;
    width: 100% !important;
    flex: 1;
    border-right: none;
  }
  .pos-container.show-catalog .pos-ticket-pane {
    display: none !important;
  }

  /* When showing cart */
  .pos-container.show-cart .pos-catalog-pane {
    display: none !important;
  }
  .pos-container.show-cart .pos-ticket-pane {
    display: flex !important;
    width: 100% !important;
    flex: 1;
    box-shadow: none;
  }

  /* Floating cart bar only shows when on catalog view and cart has items */
  .pos-container.show-catalog .pos-floating-cart-bar.has-items {
    display: flex;
  }
}

/* Mobile Product Card & Thumbnail Image Responsive Display Fix */
@media (max-width: 768px) {
  .pos-catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  .pos-product-card {
    padding: 10px !important;
    border-radius: 12px !important;
    height: auto !important;
    min-height: 260px !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .pos-product-img-wrap {
    height: 110px !important;
    min-height: 100px !important;
    max-height: 125px !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    border-radius: 10px !important;
    position: relative !important;
    display: block !important;
  }

  .pos-product-img {
    width: 100% !important;
    height: 100% !important;
    min-height: 100px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
  }

  .pos-navbar {
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding-bottom: 8px !important;
  }
  .pos-navbar > div:first-child {
    width: 100% !important;
    justify-content: flex-start !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding-bottom: 4px !important;
  }
  .pos-navbar > div:last-child {
    width: 100% !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .pos-navbar .pos-brand {
    overflow: visible !important;
    white-space: nowrap !important;
  }
  .pos-navbar .farm-brand-name {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    overflow: visible !important;
  }
}

@media (max-width: 576px) {
  .pos-catalog-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 8px !important;
  }

  .pos-product-card {
    padding: 8px !important;
    border-radius: 10px !important;
    height: auto !important;
    min-height: 260px !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .pos-product-img-wrap {
    height: 110px !important;
    min-height: 100px !important;
    max-height: 120px !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    position: relative !important;
    display: block !important;
  }

  .pos-product-img {
    width: 100% !important;
    height: 100% !important;
    min-height: 100px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
  }

  .pos-navbar {
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding-bottom: 8px !important;
  }
  .pos-navbar > div:first-child {
    width: 100% !important;
    justify-content: flex-start !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding-bottom: 4px !important;
  }
  .pos-navbar > div:last-child {
    width: 100% !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .pos-navbar .pos-brand {
    overflow: visible !important;
    white-space: nowrap !important;
  }
  .pos-navbar .farm-brand-name {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    overflow: visible !important;
  }
}

/* ====================================================================
   SAFE-AREA INSETS FOR MODALS, DRAWERS & OFFCANVAS (Dynamic Island Fix)
   ==================================================================== */

.modal {
  padding-top: max(env(safe-area-inset-top, 20px), 16px) !important;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: max(env(safe-area-inset-bottom, 16px), 12px);
  box-sizing: border-box;
}

.modal-dialog {
  margin-top: max(env(safe-area-inset-top, 20px), 16px);
  margin-bottom: max(env(safe-area-inset-bottom, 20px), 16px);
  box-sizing: border-box;
}

.modal-header {
  padding-top: max(env(safe-area-inset-top, 0px), 14px);
  box-sizing: border-box;
}

/* Side Drawers & Offcanvas Menus */
.offcanvas,
.offcanvas-start,
.offcanvas-end,
.offcanvas-top,
.offcanvas-bottom,
.pos-drawer,
.drawer {
  padding-top: max(env(safe-area-inset-top, 20px), 16px) !important;
  padding-left: max(env(safe-area-inset-left, 16px), 16px);
  padding-right: max(env(safe-area-inset-right, 16px), 16px);
  padding-bottom: max(env(safe-area-inset-bottom, 20px), 16px);
  box-sizing: border-box;
}

.offcanvas-header,
.pos-drawer-header,
.drawer-header {
  padding-top: max(env(safe-area-inset-top, 20px), 16px) !important;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .modal-dialog {
    margin-top: max(env(safe-area-inset-top, 24px), 20px) !important;
    margin-bottom: max(env(safe-area-inset-bottom, 20px), 16px) !important;
  }
}

/* ====================================================================
   USERS & CASHIERS ACTION COLUMN & QR CODE CARD OVERFLOW FIXES
   ==================================================================== */
.user-action-group,
.cashier-action-btns {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
}

.user-action-group .btn,
.cashier-action-btns .btn {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  font-size: 0.8rem !important;
  padding: 4px 8px !important;
  line-height: 1.2 !important;
  flex-shrink: 0 !important;
}

.user-action-group svg,
.cashier-action-btns svg {
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* KHQR & Card Container Overflow Prevention */
.pos-khqr-card,
.pos-khqr-frame {
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.pos-khqr-frame img,
.pos-khqr-frame canvas,
.pos-khqr-frame svg {
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  display: block;
  margin: 0 auto;
}

/* Strict Tab Pane Toggling & Isolation */
#adminSettingsTabContent > .tab-pane,
.tab-content > .tab-pane {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

#adminSettingsTabContent > .tab-pane:not(.active),
.tab-content > .tab-pane:not(.active) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#adminSettingsTabContent > .tab-pane.active,
#adminSettingsTabContent > .tab-pane.show.active,
.tab-content > .tab-pane.active,
.tab-content > .tab-pane.show.active {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Global Modal Stacking & Backdrop (Extremely High z-index) */
.modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 99998 !important;
  background-color: rgba(15, 23, 42, 0.75) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;
  z-index: 99999 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  pointer-events: auto !important;
}

.modal-dialog {
  position: relative !important;
  z-index: 100000 !important;
  pointer-events: auto !important;
}

.modal-content {
  position: relative !important;
  z-index: 100001 !important;
  pointer-events: auto !important;
}

/* Secondary Modals Stacking cleanly over Admin Settings Modal */
#addCashierModal,
#posEditCashierModal,
#posUpdateEmailModal,
#resetCashierPinModal,
#cashierPermissionsModal,
#confirmDeleteUserModal,
#addProductModal,
#confirmDeleteProductModal {
  z-index: 105000 !important;
}
#addCashierModal .modal-dialog,
#posEditCashierModal .modal-dialog,
#posUpdateEmailModal .modal-dialog,
#resetCashierPinModal .modal-dialog,
#cashierPermissionsModal .modal-dialog,
#confirmDeleteUserModal .modal-dialog,
#addProductModal .modal-dialog,
#confirmDeleteProductModal .modal-dialog {
  z-index: 105001 !important;
}
#addCashierModal .modal-content,
#posEditCashierModal .modal-content,
#posUpdateEmailModal .modal-content,
#resetCashierPinModal .modal-content,
#cashierPermissionsModal .modal-content,
#confirmDeleteUserModal .modal-content,
#addProductModal .modal-content,
#confirmDeleteProductModal .modal-content {
  z-index: 105002 !important;
}

/* Dynamic Viewport Padding for Modals (Mobile vs Desktop) */
@media (max-width: 991.98px) {
  .modal-body {
    padding-bottom: calc(env(safe-area-inset-bottom, 20px) + 90px) !important;
  }
  .modal-footer {
    padding-bottom: calc(env(safe-area-inset-bottom, 20px) + 24px) !important;
  }
}

@media (min-width: 992px) {
  .modal-body {
    padding-bottom: 1.5rem !important;
  }
  .modal-footer {
    padding-bottom: 1rem !important;
  }
}

/* ====================================================================
   ORDER PARKING / HELD ORDERS (CART SWITCHING) STYLES
   ==================================================================== */
.pos-btn-hold-order {
  min-height: 44px;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pos-btn-hold-order:not(:disabled):hover {
  background-color: #f59e0b;
  color: #ffffff;
  transform: translateY(-1px);
}

.pos-btn-hold-order:not(:disabled):active {
  transform: scale(0.98);
}

.held-order-card {
  transition: all 0.2s ease;
}

.held-order-card:hover {
  border-color: #f59e0b !important;
  box-shadow: 0 4px 16px -2px rgba(245, 158, 11, 0.15);
}

#btnHeldOrders .badge {
  font-size: 0.72rem;
  padding: 0.25em 0.55em;
}

/* ====================================================================
   COMBINED CRITICAL UI/UX: POS SYSTEM DARK THEME OVERHAUL
   Strict zero-tolerance for harsh/blinding white containers, inputs & panels!
   ==================================================================== */
.pos-sidebar,
.pos-cart-container,
.cart-panel,
.checkout-panel,
.order-ticket-container,
.pos-ticket-pane,
aside.pos-ticket-pane {
  background: var(--pos-ticket-bg) !important;
  border: 1px solid var(--pos-border) !important;
  color: var(--pos-text-primary) !important;
}

.pos-ticket-header {
  background: var(--pos-header-bg) !important;
  border-bottom: 1px solid var(--pos-border) !important;
  color: var(--pos-text-primary) !important;
}

.pos-ticket-footer {
  background: var(--pos-header-bg) !important;
  border-top: 1px solid var(--pos-border) !important;
  color: var(--pos-text-primary) !important;
}

.pos-total-row {
  background: var(--pos-card-bg) !important;
  border: 2px solid var(--pos-primary) !important;
  border-radius: 16px !important;
  color: var(--pos-text-primary) !important;
  box-shadow: var(--pos-card-shadow) !important;
}

#posDiscountInput,
.pos-ticket-footer .form-control,
.pos-ticket-footer input {
  background: var(--pos-input-bg) !important;
  border: 1px solid var(--pos-border) !important;
  color: var(--pos-text-primary) !important;
  font-weight: 750 !important;
  border-radius: 10px !important;
}

.pos-ticket-footer .input-group-text {
  background: var(--pos-card-bg) !important;
  border: 1px solid var(--pos-border) !important;
  color: var(--pos-text-primary) !important;
  font-weight: 750 !important;
}

/* Modals & Inputs inside POS */
.pos-container .modal-content,
.modal-content {
  background: var(--pos-modal-bg) !important;
  border: 1px solid var(--pos-border) !important;
  color: var(--pos-text-primary) !important;
  border-radius: 20px !important;
  box-shadow: var(--pos-card-shadow) !important;
}

.pos-container .modal-header,
.modal-header {
  background: var(--pos-header-bg) !important;
  border-bottom: 1px solid var(--pos-border) !important;
  color: var(--pos-text-primary) !important;
}

.pos-container .modal-body,
.modal-body {
  background: var(--pos-modal-bg) !important;
  color: var(--pos-text-primary) !important;
}

.pos-container .modal-footer,
.modal-footer {
  background: var(--pos-header-bg) !important;
  border-top: 1px solid var(--pos-border) !important;
}

.pos-container .modal label,
.pos-container .modal .form-label,
.modal label,
.modal .form-label {
  color: var(--pos-text-secondary) !important;
  font-weight: 600 !important;
}

.pos-container .form-control,
.pos-container .form-select,
.pos-container input:not([type="checkbox"]):not([type="radio"]),
.pos-container select,
.modal-content .form-control,
.modal-content .form-select,
.modal-content input:not([type="checkbox"]):not([type="radio"]),
.modal-content select {
  background-color: var(--pos-input-bg) !important;
  border: 1px solid var(--pos-border) !important;
  color: var(--pos-text-primary) !important;
}

.pos-container .input-group-text,
.modal-content .input-group-text {
  background-color: var(--pos-card-bg) !important;
  border: 1px solid var(--pos-border) !important;
  color: var(--pos-text-primary) !important;
}

.pos-container .table,
.modal-content .table {
  background-color: transparent !important;
  color: var(--pos-text-primary) !important;
}

.pos-container .table th,
.modal-content .table th {
  background-color: var(--pos-card-bg) !important;
  color: var(--pos-text-primary) !important;
  border-bottom: 1px solid var(--pos-border) !important;
}

.pos-container .table td,
.modal-content .table td {
  background-color: transparent !important;
  color: var(--pos-text-primary) !important;
  border-bottom: 1px solid var(--pos-border-subtle) !important;
}

.pos-container .card,
.modal-content .card {
  background: var(--pos-card-bg) !important;
  border: 1px solid var(--pos-border) !important;
  color: var(--pos-text-primary) !important;
  box-shadow: var(--pos-card-shadow) !important;
  border-radius: 18px !important;
}

.held-order-card {
  background: var(--pos-card-bg) !important;
  border: 1px solid var(--pos-border) !important;
  color: var(--pos-text-primary) !important;
  box-shadow: var(--pos-card-shadow) !important;
  border-radius: 18px !important;
}

/* Eradicate Harsh Blinding White Containers in Dark Mode */
[data-theme="dark"] .pos-container .bg-light,
[data-theme="dark"] .pos-container .bg-white,
[data-theme="dark"] .modal .bg-light,
[data-theme="dark"] .modal .bg-white,
body.dark-mode .pos-container .bg-light,
body.dark-mode .pos-container .bg-white,
body.dark-mode .modal .bg-light,
body.dark-mode .modal .bg-white,
body.theme-dark .pos-container .bg-light,
body.theme-dark .pos-container .bg-white,
body.theme-dark .modal .bg-light,
body.theme-dark .modal .bg-white {
  background-color: rgba(22, 33, 52, 0.95) !important;
  color: #ffffff !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  box-shadow: var(--pos-card-shadow) !important;
}

/* Crisp Light Mode Containers */
[data-theme="light"] .pos-container .bg-light,
[data-theme="light"] .modal .bg-light,
body.light-mode .pos-container .bg-light,
body.light-mode .modal .bg-light,
body.theme-light .pos-container .bg-light,
body.theme-light .modal .bg-light {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .pos-container .bg-white,
[data-theme="light"] .modal .bg-white,
body.light-mode .pos-container .bg-white,
body.light-mode .modal .bg-white,
body.theme-light .pos-container .bg-white,
body.theme-light .modal .bg-white {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: var(--pos-card-shadow) !important;
}

/* Text Overrides in Dark Mode */
[data-theme="dark"] .pos-container .text-dark,
[data-theme="dark"] .modal .text-dark,
[data-theme="dark"] .pos-ticket-pane .text-dark,
[data-theme="dark"] .pos-navbar .text-dark,
[data-theme="dark"] .pos-product-card .text-dark,
body.dark-mode .pos-container .text-dark,
body.dark-mode .modal .text-dark,
body.dark-mode .pos-ticket-pane .text-dark,
body.dark-mode .pos-navbar .text-dark,
body.dark-mode .pos-product-card .text-dark,
body.theme-dark .pos-container .text-dark,
body.theme-dark .modal .text-dark,
body.theme-dark .pos-ticket-pane .text-dark,
body.theme-dark .pos-navbar .text-dark,
body.theme-dark .pos-product-card .text-dark {
  color: #ffffff !important;
}

/* Text Overrides in Light Mode */
[data-theme="light"] .pos-container .text-dark,
[data-theme="light"] .modal .text-dark,
[data-theme="light"] .pos-ticket-pane .text-dark,
[data-theme="light"] .pos-navbar .text-dark,
[data-theme="light"] .pos-product-card .text-dark,
body.light-mode .pos-container .text-dark,
body.light-mode .modal .text-dark,
body.light-mode .pos-ticket-pane .text-dark,
body.light-mode .pos-navbar .text-dark,
body.light-mode .pos-product-card .text-dark,
body.theme-light .pos-container .text-dark,
body.theme-light .modal .text-dark,
body.theme-light .pos-ticket-pane .text-dark,
body.theme-light .pos-navbar .text-dark,
body.theme-light .pos-product-card .text-dark {
  color: #0f172a !important;
}

.pos-container .nav-pills,
.modal .nav-pills {
  background: var(--pos-surface) !important;
  border: 1px solid var(--pos-border) !important;
}

.pos-container .nav-pills .nav-link,
.modal .nav-pills .nav-link {
  color: var(--pos-text-secondary) !important;
}

.pos-container .nav-pills .nav-link.active,
.modal .nav-pills .nav-link.active {
  background: var(--pos-primary) !important;
  color: #ffffff !important;
}




/* ==========================================================================
   POS LIGHT THEME OVERRIDES (POS.CSS)
   ========================================================================== */
body.light-mode .card,
body.light-mode .pos-card,
body.light-mode .pos-sidebar,
body.light-mode .pos-cart-container,
body.light-mode .cart-panel,
body.light-mode .checkout-panel,
body.light-mode .inventory-card,
body.light-mode .modal-content,
body.light-mode .pos-ticket-pane,
body.light-mode .pos-ticket-item,
body.light .card,
body.light .pos-card,
body.light .pos-sidebar,
body.light .pos-cart-container,
body.light .cart-panel,
body.light .checkout-panel,
body.light .inventory-card,
body.light .modal-content,
body.light .pos-ticket-pane,
body.light .pos-ticket-item,
body.theme-light .card,
body.theme-light .pos-card,
body.theme-light .pos-sidebar,
body.theme-light .pos-cart-container,
body.theme-light .cart-panel,
body.theme-light .checkout-panel,
body.theme-light .inventory-card,
body.theme-light .modal-content,
body.theme-light .pos-ticket-pane,
body.theme-light .pos-ticket-item,
[data-theme="light"] .card,
[data-theme="light"] .pos-card,
[data-theme="light"] .pos-sidebar,
[data-theme="light"] .pos-cart-container,
[data-theme="light"] .cart-panel,
[data-theme="light"] .checkout-panel,
[data-theme="light"] .inventory-card,
[data-theme="light"] .modal-content,
[data-theme="light"] .pos-ticket-pane,
[data-theme="light"] .pos-ticket-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
  color: #0f172a !important;
}

body.light-mode .pos-container,
body.light-mode .pos-catalog-pane,
body.light-mode .pos-main-layout,
body.theme-light .pos-container,
body.theme-light .pos-catalog-pane,
body.theme-light .pos-main-layout,
[data-theme="light"] .pos-container,
[data-theme="light"] .pos-catalog-pane,
[data-theme="light"] .pos-main-layout {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

body.light-mode .pos-navbar,
body.light-mode .pos-catalog-header,
body.light-mode .pos-ticket-header,
body.light-mode .pos-ticket-footer,
body.theme-light .pos-navbar,
body.theme-light .pos-catalog-header,
body.theme-light .pos-ticket-header,
body.theme-light .pos-ticket-footer,
[data-theme="light"] .pos-navbar,
[data-theme="light"] .pos-catalog-header,
[data-theme="light"] .pos-ticket-header,
[data-theme="light"] .pos-ticket-footer {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

body.light-mode .pos-product-title,
body.light-mode .pos-item-title,
body.theme-light .pos-product-title,
body.theme-light .pos-item-title,
[data-theme="light"] .pos-product-title,
[data-theme="light"] .pos-item-title {
  color: #0f172a !important;
  font-weight: 800 !important;
}

body.light-mode .pos-price-unit,
body.light-mode .pos-item-unit-calc,
body.light-mode .pos-item-note,
body.theme-light .pos-price-unit,
body.theme-light .pos-item-unit-calc,
body.theme-light .pos-item-note,
[data-theme="light"] .pos-price-unit,
[data-theme="light"] .pos-item-unit-calc,
[data-theme="light"] .pos-item-note {
  color: #475569 !important;
  opacity: 1 !important;
}

body.light-mode .pos-price-khr,
body.light-mode .pos-grand-total-khr,
body.theme-light .pos-price-khr,
body.theme-light .pos-grand-total-khr,
[data-theme="light"] .pos-price-khr,
[data-theme="light"] .pos-grand-total-khr {
  color: #047857 !important;
  text-shadow: none !important;
}

body.light-mode .pos-price-usd,
body.light-mode .pos-grand-total-usd,
body.theme-light .pos-price-usd,
body.theme-light .pos-grand-total-usd,
[data-theme="light"] .pos-price-usd,
[data-theme="light"] .pos-grand-total-usd {
  color: #b45309 !important;
  text-shadow: none !important;
}

body.light-mode .btn-back-portal,
body.theme-light .btn-back-portal,
[data-theme="light"] .btn-back-portal {
  background: #ffffff !important;
  color: #047857 !important;
  border: 1px solid #e2e8f0 !important;
}

/* Master Light Mode Farm Brand in POS Header */
body.light-mode .pos-brand-title,
body.light-mode .farm-brand-name,
body.theme-light .pos-brand-title,
body.theme-light .farm-brand-name,
body.light .pos-brand-title,
body.light .farm-brand-name,
[data-theme="light"] .pos-brand-title,
[data-theme="light"] .farm-brand-name {
  color: #065f46 !important; /* Deep forest emerald */
  font-weight: 850 !important;
  text-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Master Light Mode Durian Product Cards & Titles */
body.light-mode .pos-product-title,
body.theme-light .pos-product-title,
body.light .pos-product-title,
[data-theme="light"] .pos-product-title,
.light-mode .pos-product-title {
  color: #0f172a !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}

body.light-mode .pos-product-card,
body.theme-light .pos-product-card,
body.light .pos-product-card,
[data-theme="light"] .pos-product-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03) !important;
}

body.light-mode .pos-product-variety-badge,
body.theme-light .pos-product-variety-badge,
[data-theme="light"] .pos-product-variety-badge {
  background: #dcfce7 !important;
  border: 1px solid #86efac !important;
  color: #059669 !important;
}

body.light-mode .pos-product-card .pos-price-khr,
body.theme-light .pos-product-card .pos-price-khr,
[data-theme="light"] .pos-product-card .pos-price-khr {
  color: #059669 !important;
  font-weight: 850 !important;
}

body.light-mode .pos-product-card .pos-price-unit,
body.theme-light .pos-product-card .pos-price-unit,
[data-theme="light"] .pos-product-card .pos-price-unit {
  color: #64748b !important;
  font-weight: 600 !important;
}

/* Master Light Mode Quantity Plus/Minus Buttons */
body.light-mode .pos-qty-btn,
body.theme-light .pos-qty-btn,
body.light .pos-qty-btn,
[data-theme="light"] .pos-qty-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 850 !important;
  font-size: 1.15rem !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

body.light-mode .pos-qty-btn:hover,
body.theme-light .pos-qty-btn:hover,
[data-theme="light"] .pos-qty-btn:hover {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

body.light-mode .pos-weight-badge,
body.theme-light .pos-weight-badge,
[data-theme="light"] .pos-weight-badge {
  background: #dcfce7 !important;
  border: 1px solid #86efac !important;
  color: #047857 !important;
}

/* Master Light Mode Category Pills */
body.light-mode .pos-category-pill,
body.theme-light .pos-category-pill,
body.light .pos-category-pill,
[data-theme="light"] .pos-category-pill {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.light-mode .pos-category-pill:hover,
body.theme-light .pos-category-pill:hover,
[data-theme="light"] .pos-category-pill:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

body.light-mode .pos-category-pill.active,
body.theme-light .pos-category-pill.active,
[data-theme="light"] .pos-category-pill.active {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.28) !important;
}

/* Master Light Mode Ticket Pane Typography */
body.light-mode .pos-ticket-heading,
body.light-mode .pos-empty-title,
body.light-mode .pos-discount-label,
body.light-mode .pos-total-label,
body.theme-light .pos-ticket-heading,
body.theme-light .pos-empty-title,
body.theme-light .pos-discount-label,
body.theme-light .pos-total-label,
[data-theme="light"] .pos-ticket-heading,
[data-theme="light"] .pos-empty-title,
[data-theme="light"] .pos-discount-label,
[data-theme="light"] .pos-total-label {
  color: #0f172a !important;
  text-shadow: none !important;
}

body.light-mode #posCustomerName,
body.theme-light #posCustomerName,
[data-theme="light"] #posCustomerName {
  color: #0f172a !important;
}

body.light-mode #posDiscountInput,
body.theme-light #posDiscountInput,
[data-theme="light"] #posDiscountInput {
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
}

body.light-mode .pos-ticket-item,
body.theme-light .pos-ticket-item,
[data-theme="light"] .pos-ticket-item {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
}

body.light-mode .pos-cart-price-btn,
body.theme-light .pos-cart-price-btn,
[data-theme="light"] .pos-cart-price-btn {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

/* Daily Price Modal Controls */
.dp-top-bar {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff;
}
.dp-rate-badge {
  background: rgba(22, 33, 52, 0.9);
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff;
}
body.light-mode .dp-top-bar,
body.theme-light .dp-top-bar,
[data-theme="light"] .dp-top-bar {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
body.light-mode .dp-rate-badge,
body.theme-light .dp-rate-badge,
[data-theme="light"] .dp-rate-badge {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

