/* ==========================================================================
   OKAY POS Mobile Companion - Modern Base UI Components (Sleek Onyx Black)
   ========================================================================== */

/* Custom Ultra-Thin Smooth Scrollbars */
::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(9, 13, 22, 0.14);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(9, 13, 22, 0.28);
}

/* ─── Cards & Surfaces ─── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 10px;
  color: var(--text);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.card:active {
  transform: scale(0.992);
}
.card-p {
  padding: 14px 15px;
}

/* ─── Deep Modern Hero Financial Card (Obsidian Black) ─── */
.hero-card {
  background: var(--hero-gradient);
  color: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 16px 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px -4px rgba(9, 13, 22, 0.35), 0 4px 12px -2px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-lbl {
  font-size: 10.5px;
  color: #cbd5e1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.hero-val {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.6px;
  margin: 4px 0 10px 0;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.hero-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.hs label {
  display: block;
  font-size: 9.5px;
  color: #94a3b8;
  margin-bottom: 2px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.hs span {
  font-size: 13px;
  font-weight: 900;
  color: #f8fafc;
}
.hs:nth-child(2) { text-align: center; }
.hs:nth-child(3) { text-align: center; }
.hs:last-child { text-align: right; }

/* ─── Modern Tactile PIN Pad UI ─── */
.pin-box {
  width: 40px;
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.pin-box.active {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3.5px var(--primary-light);
  transform: translateY(-2px);
}
.pin-box.filled {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.pin-btn {
  height: 52px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: #ffffff;
  color: var(--text-heading);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(9, 13, 22, 0.05);
  transition: all 0.12s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.pin-btn:active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(0.93);
}
.pin-btn-sub {
  background: #f1f5f9;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 800;
}

/* ─── Skeleton Loaders ─── */
.skeleton-box {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
  border-radius: 8px;
}
.skeleton-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-xs);
}
.skeleton-text {
  height: 12px;
  margin-bottom: 6px;
  border-radius: 4px;
}

/* ─── Modern Status Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1px;
  line-height: 1.2;
}
.bg-green {
  background: var(--success-light);
  color: var(--success-dark);
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.bg-red {
  background: var(--danger-light);
  color: var(--danger-dark);
  border: 1px solid rgba(239, 68, 68, 0.28);
}
.bg-yellow {
  background: var(--warn-light);
  color: var(--warn-dark);
  border: 1px solid rgba(245, 158, 11, 0.28);
}
.bg-blue {
  background: var(--info-light);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.28);
}
.bg-purple {
  background: var(--purple-light);
  color: #6d28d9;
  border: 1px solid rgba(124, 58, 237, 0.28);
}
.bg-zinc {
  background: #f1f5f9;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.pulse {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulseDot 2s infinite;
}
.pulse-off {
  width: 7px;
  height: 7px;
  background: var(--warn);
  border-radius: 50%;
}

.badge-cost {
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 800;
}
.badge-profit {
  background: var(--success-light);
  color: var(--success-dark);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 900;
}
.item-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
  margin: 2px 3px 2px 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.pane-hdr-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* ─── Buttons & Tactile Click States ─── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px var(--primary-glow);
}
.btn-secondary {
  background: #ffffff;
  color: var(--text-heading);
  border: 1.5px solid var(--border);
  font-weight: 800;
  box-shadow: var(--shadow-xs);
}
.btn-secondary:active {
  background: #f8fafc;
  transform: scale(0.97);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.12s ease;
}
.btn-sm:active {
  transform: scale(0.94);
}

.btn-icon {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xs);
}
.btn-icon:active {
  background: #f1f5f9;
  color: var(--primary);
  transform: scale(0.92);
}

/* ─── Form Inputs & Fields ─── */
.inp {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  background: #ffffff;
  color: var(--text-heading);
  outline: none;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.inp:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px var(--primary-light);
  background: #ffffff;
}
.lbl {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 5px;
  letter-spacing: 0.1px;
}
.fg {
  margin-bottom: 12px;
}
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ─── Search Bar & Filter Chips ─── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px var(--primary-light);
}
.search-bar input {
  flex: 1;
  border: none;
  background: none;
  font-size: 13.5px;
  font-weight: 700;
  outline: none;
  color: var(--text-heading);
}
.search-bar input::placeholder {
  color: var(--text-light);
  font-weight: 600;
}
.search-bar button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.12s ease;
}
.search-bar button:active {
  color: var(--primary);
  background: var(--primary-light);
}
.search-btn-scan {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
  padding: 5px 9px !important;
  border-radius: 8px !important;
  font-size: 11px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(9, 13, 22, 0.2) !important;
}
.search-btn-scan:active {
  transform: scale(0.93);
}

.pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.pills::-webkit-scrollbar {
  display: none;
}
.pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  background: #ffffff;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.pill.active {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.pill:active {
  transform: scale(0.95);
}

/* ─── Segment Tabs (iOS Style) ─── */
.segment-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}
.seg-btn {
  flex: 1;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 800;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.seg-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(9, 13, 22, 0.08);
}

/* ─── Real Native App Bottom Sheets & Modals ─── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.7);
  z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-bg.show {
  display: flex;
  opacity: 1;
}
.modal-sheet {
  background: #ffffff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 10px 16px calc(28px + env(safe-area-inset-bottom, 0px));
  color: var(--text);
  box-shadow: 0 -10px 40px rgba(9, 13, 22, 0.3);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.modal-bg.show .modal-sheet {
  transform: translateY(0);
}
.modal-sheet::before {
  content: '';
  display: block;
  width: 38px;
  height: 4.5px;
  background: #cbd5e1;
  border-radius: var(--radius-pill);
  margin: 2px auto 14px auto;
}
.modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.modal-hdr h3 {
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-heading);
}

/* ─── Color-Coded Status Badges & Pills ─── */
.badge-paid {
  background: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
  font-weight: 900 !important;
  font-size: 10.5px !important;
  padding: 3px 8px !important;
  border-radius: var(--radius-pill) !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-credit {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
  font-weight: 900 !important;
  font-size: 10.5px !important;
  padding: 3px 8px !important;
  border-radius: var(--radius-pill) !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-lowstock {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
  font-weight: 900 !important;
  font-size: 10.5px !important;
  padding: 2px 7px !important;
  border-radius: var(--radius-pill) !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ─── Shimmering Skeleton Loader Animations ─── */
@keyframes skeleton-shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.skeleton-box {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
  background-size: 400px 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: 8px;
}
.skeleton-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-line {
  height: 12px;
  border-radius: 4px;
}

/* ─── Accordions & Expandable Cards ─── */
.accordion-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xs);
}
.accordion-card.open {
  border-color: var(--primary);
  box-shadow: 0 4px 14px var(--primary-light);
}
.accordion-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
  color: var(--text-heading);
  font-weight: 800;
  font-size: 13px;
}
.accordion-hdr:active {
  background: #f1f5f9;
}
.accordion-arrow {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-muted);
}
.accordion-card.open .accordion-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}
.accordion-body {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.btn-add-more {
  width: 100%;
  padding: 9px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1.5px dashed rgba(9, 13, 22, 0.35);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  transition: all 0.15s ease;
}
.btn-add-more:active {
  background: rgba(9, 13, 22, 0.16);
  transform: scale(0.98);
}

/* ─── Advanced Product Options Grid ─── */
.advanced-prod-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: start;
}
.advanced-prod-grid .accordion-card {
  margin-bottom: 0;
}
.advanced-prod-grid .accordion-card.open {
  grid-column: 1 / -1;
}

/* ─── Stepper ─── */
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  margin: 6px 0 10px 0;
}
.step-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 800;
  border: none;
  background: #ffffff;
  color: var(--text-heading);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}
.step-btn:active {
  transform: scale(0.9);
  background: var(--primary-light);
  color: var(--primary);
}
.step-num {
  flex: 1;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: var(--text-heading);
}

/* ─── Compact Stock Update (Edit Product Modal) ─── */
.stock-compact-card {
  margin-top: 8px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: all 0.2s ease;
}
.stock-compact-card:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
  background: #ffffff;
}
.stock-compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.stock-compact-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-heading);
}
.stock-compact-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.stock-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  height: 24px;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s ease;
  line-height: 1;
  white-space: nowrap;
}
.stock-pill-btn:active {
  transform: scale(0.93);
}
.stock-pill-btn.pill-set {
  background: var(--success-light);
  color: var(--success-dark);
  border-color: rgba(16, 185, 129, 0.3);
}
.stock-pill-btn.pill-add {
  background: #ffffff;
  color: var(--text-secondary);
  border-color: var(--border);
}
.stock-pill-btn.pill-sub {
  background: var(--danger-light);
  color: var(--danger-dark);
  border-color: rgba(239, 68, 68, 0.3);
}
.stock-compact-body {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stock-stepper-compact {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 2px;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}
.stock-step-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: none;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.12s ease;
  user-select: none;
}
.stock-step-btn.btn-minus {
  background: var(--danger-light);
  color: var(--danger-dark);
}
.stock-step-btn.btn-minus:active {
  background: rgba(239, 68, 68, 0.25);
  transform: scale(0.92);
}
.stock-step-btn.btn-plus {
  background: var(--success-light);
  color: var(--success-dark);
}
.stock-step-btn.btn-plus:active {
  background: rgba(16, 185, 129, 0.28);
  transform: scale(0.92);
}
.stock-step-input {
  width: 58px;
  height: 28px;
  border: none;
  outline: none;
  background: transparent;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-heading);
  -moz-appearance: textfield;
  padding: 0 2px;
}
.stock-step-input::-webkit-outer-spin-button,
.stock-step-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stock-compact-hint {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

/* ─── Sticky Modal Footer Actions ─── */
.modal-footer-sticky {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  padding: 12px 0 calc(8px + env(safe-area-inset-bottom, 0px)) 0;
  border-top: 1px solid var(--border);
  margin-top: 14px;
  display: flex;
  gap: 8px;
  z-index: 20;
  box-shadow: 0 -8px 20px rgba(9, 13, 22, 0.05);
}
.modal-footer-sticky .btn {
  margin-top: 0 !important;
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}
.modal-footer-sticky .btn-primary {
  flex: 1.4;
}

/* ─── Category Select ─── */
.cat-select-styled {
  background-color: #ffffff;
  font-weight: 700;
  color: var(--text-heading);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  width: 100%;
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: menulist;
}
.cat-select-styled:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ─── Alerts & Loaders ─── */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 700;
}
.al-s {
  background: var(--success-light);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: var(--success-dark);
}
.al-e {
  background: var(--danger-light);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: var(--danger-dark);
}
.al-w {
  background: var(--warn-light);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: var(--warn-dark);
}
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 12.5px;
  gap: 8px;
}
.spin {
  animation: spinAnim 1s linear infinite;
}

/* ─── Pull to Refresh ─── */
.ptr-wrap {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease, opacity 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
  opacity: 0;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  margin: 0 0 8px 0;
}
.ptr-wrap.ptr-visible {
  max-height: 46px;
  opacity: 1;
  padding: 10px 0;
}

/* ─── Sync Overlay Modal ─── */
#syncOverlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sync-box {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: var(--shadow-xl);
}
.sync-title {
  font-size: 17px;
  font-weight: 900;
  color: var(--text-heading);
  margin-bottom: 4px;
}
.sync-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.sync-steps {
  text-align: left;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 14px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  line-height: 1.8;
}
.sync-step {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ─── Floating Action Button & Action Pill (FAB) ─── */
.fab-btn {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  right: max(16px, calc(50% - 290px + 16px));
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px var(--primary-glow);
  cursor: pointer;
  z-index: 45;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease;
}
.fab-btn:active {
  transform: scale(0.92);
  box-shadow: 0 3px 10px var(--primary-glow);
}

.fab-pill {
  position: fixed;
  bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  right: max(16px, calc(50% - 290px + 16px));
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 15px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.1px;
  box-shadow: 0 6px 20px var(--primary-glow);
  cursor: pointer;
  z-index: 45;
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.12s ease;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}
.fab-pill:active {
  transform: scale(0.94);
  box-shadow: 0 2px 8px var(--primary-glow);
}
.fab-pill .icon {
  width: 14px;
  height: 14px;
}
.fab-pill span {
  font-size: 11.5px;
  font-weight: 850;
}

/* ─── Modern POS Floating Cart Bar & Checkout Sheet ─── */
.pos-floating-cart-bar {
  position: sticky;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  background: var(--hero-gradient);
  color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 11px 16px;
  margin: 10px 0 6px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 25px rgba(9, 13, 22, 0.28);
  cursor: pointer;
  z-index: 30;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease;
}
.pos-floating-cart-bar:active {
  transform: scale(0.98);
}
.pos-cart-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.pos-cart-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--primary-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.pos-cart-bar-title {
  font-size: 13.5px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.2px;
}
.pos-cart-bar-sub {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pos-cart-bar-sub b {
  color: #34d399;
  font-weight: 850;
}
.btn-pos-checkout {
  background: var(--success);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 15px;
  font-size: 12.5px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.15s ease;
}
.btn-pos-checkout:active {
  background: var(--success-dark);
  transform: scale(0.94);
}

/* ─── Payment Method Pills Grid ─── */
.pay-method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pay-pill {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 850;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  height: 42px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xs);
}
.pay-pill:active {
  transform: scale(0.96);
}
.pay-pill.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}
.pay-pill .icon {
  width: 16px;
  height: 16px;
}

/* ─── Quick Discount Chips ─── */
.quick-disc-chips, .quick-cash-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.disc-chip, .cash-chip {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text-heading);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.12s ease;
}
.disc-chip:hover, .cash-chip:hover, .disc-chip:active, .cash-chip:active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ─── Checkout Summary Card ─── */
.checkout-summary-card {
  background: var(--hero-gradient);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
}

/* ─── Digital Thermal Receipt Card ─── */
.receipt-graphic-card {
  background: #ffffff;
  color: #090d16;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  font-family: 'Courier New', 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: var(--shadow-md);
  letter-spacing: -0.2px;
}
.rec-store-header {
  text-align: center;
}
.rec-store-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #000000;
  text-transform: uppercase;
}
.rec-store-sub {
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.rec-divider {
  text-align: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  white-space: nowrap;
  margin: 8px 0;
  letter-spacing: -1px;
  user-select: none;
}
.rec-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #090d16;
}
.rec-meta-grid span {
  color: #64748b;
  font-weight: 700;
}
.rec-table-header {
  display: grid;
  grid-template-columns: 2.2fr 0.6fr 1.1fr 1.1fr;
  gap: 4px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: #000000;
  border-top: 1.5px dashed #000000;
  border-bottom: 1.5px dashed #000000;
  padding: 6px 0;
  margin: 6px 0;
}
.rec-table-header .col-item { text-align: left; }
.rec-table-header .col-qty { text-align: center; }
.rec-table-header .col-price { text-align: right; }
.rec-table-header .col-total { text-align: right; }
.rec-items-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0;
}
.rec-item-row {
  display: grid;
  grid-template-columns: 2.2fr 0.6fr 1.1fr 1.1fr;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px dotted #e2e8f0;
  color: #000000;
}
.rec-item-row:last-child {
  border-bottom: none;
}
.rec-item-name {
  text-align: left;
  word-break: break-word;
  font-weight: 900;
  color: #000000;
  line-height: 1.25;
}
.rec-item-qty {
  text-align: center;
  font-weight: 800;
  color: #000000;
}
.rec-item-price {
  text-align: right;
  font-weight: 800;
  color: #000000;
  white-space: nowrap;
}
.rec-item-total {
  text-align: right;
  font-weight: 900;
  color: #000000;
  white-space: nowrap;
}
.rec-totals-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
  color: #000000;
}
.rec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rec-row.rec-total-main {
  font-size: 16px;
  font-weight: 900;
  padding: 6px 0;
  margin: 4px 0;
  border-top: 1.5px dashed #000000;
  border-bottom: 1.5px dashed #000000;
  color: #000000;
}
.rec-footer-txt {
  text-align: center;
  font-size: 12.5px;
  color: #475569;
  font-weight: 900;
}

/* ─── POS Multi-UOM and Batch Elements ─── */
.pos-uom-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed var(--border);
  width: 100%;
}
.pos-uom-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--dark-surface);
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
}
.pos-uom-chip:active {
  transform: scale(0.95);
  background: #334155;
}
.pos-uom-chip-active {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--primary-gradient);
  color: #ffffff;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 2px 6px var(--primary-glow);
}
.pos-batch-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f1f5f9;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 800;
}

/* ─── Smart Over-The-Air (OTA) Update Floating Banner ─── */
.app-update-banner {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: var(--hero-gradient);
  color: #ffffff;
  padding: 9px 14px;
  border-bottom: 2px solid #38bdf8;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  animation: slideDownBanner 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideDownBanner {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.update-banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.update-banner-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.update-banner-text {
  flex: 1;
  min-width: 0;
}
.update-banner-title {
  font-size: 12.5px;
  font-weight: 850;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.update-banner-tag {
  background: #0284c7;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 900;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.3px;
}
.update-banner-sub {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.update-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.btn-update-now {
  background: #0284c7;
  color: #ffffff;
  border: none;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 850;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4);
}
.btn-update-now:active {
  transform: scale(0.95);
  background: #0369a1;
}
.btn-update-dismiss {
  background: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-update-dismiss:active {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ─── Live Sync Status Badge ─── */
.sync-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 850;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  background: #f1f5f9;
  color: var(--text-secondary);
  user-select: none;
}
.sync-status-badge:active {
  transform: scale(0.95);
}
.sync-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  display: inline-block;
  flex-shrink: 0;
}
.sync-status-badge.badge-online {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.sync-status-badge.badge-online .sync-status-dot {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}
.sync-status-badge.badge-queued {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
  animation: badgePulseQueued 2s ease-in-out infinite alternate;
}
.sync-status-badge.badge-queued .sync-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}
.sync-status-badge.badge-offline {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.sync-status-badge.badge-offline .sync-status-dot {
  background: #ef4444;
}
.sync-status-badge.badge-syncing {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.sync-status-badge.badge-syncing .sync-status-dot {
  background: #3b82f6;
  animation: dotBlink 0.6s infinite alternate;
}

/* ─── Live Camera Barcode Scanner Modal & Viewfinder ─── */
.camera-scanner-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
}
.scanner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.scanner-header-left, .scanner-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.scanner-title {
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: -0.2px;
}
.btn-scanner-action {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-scanner-action:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.25);
}
.scanner-mode-pill {
  border-radius: var(--radius-pill);
  background: var(--success);
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
  padding: 6px 12px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.scanner-mode-pill:active {
  transform: scale(0.94);
}
.scanner-viewport-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
}
.scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scanner-viewfinder {
  position: absolute;
  width: 82%;
  max-width: 320px;
  height: 200px;
  border-radius: 18px;
  box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  overflow: hidden;
}
.scanner-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3.5px solid #22c55e;
}
.scanner-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; border-top-left-radius: 16px; }
.scanner-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-top-right-radius: 16px; }
.scanner-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-bottom-left-radius: 16px; }
.scanner-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; border-bottom-right-radius: 16px; }

.scanner-laser-line {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2.5px;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.2) 0%, #22c55e 50%, rgba(34, 197, 94, 0.2) 100%);
  box-shadow: 0 0 10px #22c55e;
  animation: laserScan 2s ease-in-out infinite alternate;
}
@keyframes laserScan {
  0% { top: 6px; }
  100% { top: calc(100% - 8px); }
}

.scanner-hud-box {
  position: absolute;
  bottom: 24px;
  left: 16px;
  right: 16px;
  padding: 13px 18px;
  background: rgba(9, 13, 22, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  text-align: center;
  z-index: 10;
  transition: border-color 0.2s ease;
}
.scanner-hud-text {
  font-size: 13px;
  font-weight: 850;
  color: #ffffff;
  line-height: 1.4;
  letter-spacing: -0.1px;
}
