/* OKAY POS Mobile Companion - Base UI Components */

/* Custom Ultra-Thin Scrollbars */
::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Cards & Surfaces */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 10px;
  color: var(--text);
}
.card-p { padding: 12px 13px; }

/* Dark Hero Financial Card */
.hero-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1.5px solid #334155;
  padding: 13px 14px;
  margin-bottom: 10px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
}

/* PIN Pad UI Styles */
.pin-box {
  width: 34px;
  height: 40px;
  border-radius: 8px;
  border: 1.5px solid #64748b;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: var(--primary);
  transition: all 0.15s ease;
}
.pin-box.active {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.2);
}
.pin-box.filled {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.pin-btn {
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid #94a3b8;
  background: #ffffff;
  color: #000000;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pin-btn:active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(0.95);
}
.pin-btn-sub {
  background: #f1f5f9;
  color: #000000;
  font-size: 15px;
  font-weight: 900;
}
.hero-lbl { font-size: 10px; color: #cbd5e1; font-weight: 900; text-transform: uppercase; letter-spacing: 0.6px; }
.hero-val { font-size: 24px; font-weight: 950; letter-spacing: -0.5px; margin: 3px 0 8px 0; color: #ffffff; }
.hero-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.hs label { display: block; font-size: 10px; color: #cbd5e1; margin-bottom: 2px; font-weight: 800; }
.hs span { font-size: 13px; font-weight: 900; }
.hs:nth-child(2) { text-align: center; }
.hs:nth-child(3) { text-align: center; }
.hs:last-child { text-align: right; }

/* 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: 1.5px solid #cbd5e1; border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.skeleton-text { height: 12px; margin-bottom: 6px; border-radius: 4px; }

/* Badges & Status */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 800; }
.bg-green { background: rgba(22, 163, 74, 0.14); color: #15803d; border: 1.5px solid rgba(22, 163, 74, 0.35); }
.bg-red { background: rgba(220, 38, 38, 0.14); color: #b91c1c; border: 1.5px solid rgba(220, 38, 38, 0.35); }
.bg-yellow { background: rgba(217, 119, 6, 0.14); color: #b45309; border: 1.5px solid rgba(217, 119, 6, 0.35); }
.bg-blue { background: rgba(37, 99, 235, 0.14); color: #1d4ed8; border: 1.5px solid rgba(37, 99, 235, 0.35); }
.bg-purple { background: rgba(147, 51, 234, 0.14); color: #7e22ce; border: 1.5px solid rgba(147, 51, 234, 0.35); }
.bg-zinc { background: #f1f5f9; color: #0f172a; border: 1.5px solid #94a3b8; }
.pulse { width: 7px; height: 7px; background: #16a34a; border-radius: 50%; box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6); animation: pulseDot 2s infinite; }
.pulse-off { width: 7px; height: 7px; background: #d97706; border-radius: 50%; }

.badge-cost { background: rgba(100, 116, 139, 0.12); color: #334155; border: 1.5px solid #94a3b8; padding: 2px 6px; border-radius: 5px; font-size: 10px; font-weight: 800; }
.badge-profit { background: rgba(22, 163, 74, 0.15); color: #15803d; border: 1.5px solid rgba(22, 163, 74, 0.4); padding: 2px 6px; border-radius: 5px; font-size: 10px; font-weight: 900; }
.item-chip { display: inline-flex; align-items: center; gap: 3px; background: #ffffff; border: 1.5px solid #94a3b8; padding: 3px 8px; border-radius: 7px; font-size: 11px; font-weight: 800; color: #000000; margin: 2px 3px 2px 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pane-hdr-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 13.5px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px var(--primary-glow); }
.btn-primary:active { background: var(--primary-hover); transform: scale(0.98); }
.btn-secondary { background: #ffffff; color: #000000; border: 1px solid var(--border); font-weight: 800; }
.btn-secondary:active { background: #f1f5f9; transform: scale(0.98); }
.btn-sm {
  padding: 6px 10px;
  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.15s ease;
}
.btn-sm:active { transform: scale(0.95); }

.btn-icon {
  background: #ffffff;
  border: 1px solid var(--border);
  color: #000000;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.btn-icon:active { background: #e2e8f0; color: #000000; transform: scale(0.94); }

/* Inputs */
.inp {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  background: #ffffff;
  color: #000000;
  outline: none;
  transition: all 0.15s ease;
}
.inp:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); background: #fff; }
.lbl { display: block; font-size: 11.5px; font-weight: 800; color: #000000; margin-bottom: 4px; }
.fg { margin-bottom: 10px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

/* Search Bar & Filter Pills */
.search-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.search-bar input { flex: 1; border: none; background: none; font-size: 13px; font-weight: 700; outline: none; color: #000000; }
.search-bar input::placeholder { color: #64748b; font-weight: 600; }
.search-bar button { background: none; border: none; color: #000000; cursor: pointer; display: flex; padding: 3px; border-radius: 6px; }
.search-bar button:active { color: var(--primary); background: #f1f5f9; }
.search-btn-scan { background: #f1f5f9 !important; color: #000000 !important; padding: 4px 8px !important; border-radius: 7px !important; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border) !important; }
.search-btn-scan:active { transform: scale(0.94); }

.pills { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 18px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  background: #ffffff;
  color: #000000;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}
.pill.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 6px var(--primary-glow); }
.pill:active { transform: scale(0.96); }

/* Segment Tabs */
.segment-tabs { display: flex; background: #f1f5f9; padding: 2px; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 6px; }
.seg-btn { flex: 1; padding: 5px 6px; font-size: 11.5px; font-weight: 800; border: none; border-radius: 8px; background: none; color: #000000; cursor: pointer; text-align: center; transition: all 0.15s ease; }
.seg-btn.active { background: #0f172a; color: #ffffff; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25); }

/* Modals & Smooth Slide-up Bottom Sheets */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-bg.show {
  display: flex;
  opacity: 1;
}
.modal-sheet {
  background: #ffffff;
  border-radius: 22px 22px 0 0;
  border-top: 2px solid #0f172a;
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 12px 16px calc(28px + env(safe-area-inset-bottom, 0px));
  color: var(--text);
  box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.22);
  transform: translateY(100%);
  transition: transform 0.25s 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: 4px;
  background: #cbd5e1;
  border-radius: 4px;
  margin: 0 auto 10px auto;
}
.modal-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1.5px solid var(--border); }
.modal-hdr h3 { font-size: 15px; font-weight: 900; display: flex; align-items: center; gap: 6px; color: #000000; }

/* ─── 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: 2px 7px !important;
  border-radius: 6px !important;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.badge-credit {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
  font-weight: 900 !important;
  font-size: 10.5px !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.badge-lowstock {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
  font-weight: 900 !important;
  font-size: 10px !important;
  padding: 1px 6px !important;
  border-radius: 5px !important;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ─── 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 #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-line {
  height: 12px;
  border-radius: 4px;
}

/* Accordions & Expandable Cards */
.accordion-card { background: #f8fafc; border: 1.5px solid var(--border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; transition: all 0.2s ease; }
.accordion-card.open { border-color: #64748b; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.accordion-hdr { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: #f1f5f9; cursor: pointer; user-select: none; border-radius: 11px; transition: background-color 0.15s ease; color: #000000; font-weight: 800; }
.accordion-hdr:active { background: #e2e8f0; }
.accordion-arrow { transition: transform 0.2s ease; color: #0f172a; }
.accordion-card.open .accordion-arrow { transform: rotate(180deg); color: var(--primary); }
.accordion-body { padding: 10px 12px 12px 12px; border-top: 1.5px solid #cbd5e1; background: #ffffff; color: #000000; }
.accordion-hdr:active { background: #e2e8f0; }
.accordion-arrow { transition: transform 0.2s ease; color: #64748b; }
.accordion-card.open .accordion-arrow { transform: rotate(180deg); color: var(--primary); }
.accordion-body { padding: 10px 12px 12px 12px; border-top: 1px solid #e2e8f0; background: #ffffff; }
.btn-add-more { width: 100%; padding: 8px 12px; background: #0f172a; color: #ffffff; border: none; border-radius: 8px; font-size: 11px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; transition: background-color 0.15s ease, transform 0.1s ease; }
.btn-add-more:active { background: #1e293b; transform: scale(0.99); }

/* Advanced Product Options Grid (Side-by-side UOM & Batches) */
.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; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s ease; }
.step-btn:active { transform: scale(0.9); }
.step-num { flex: 1; text-align: center; font-size: 22px; font-weight: 900; color: #0f172a; }

/* Compact Stock Update (Edit Product Modal) */
.stock-compact-card {
  margin-top: 8px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  transition: all 0.2s ease;
}
.stock-compact-card:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.12);
  background: #ffffff;
}
.stock-compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}
.stock-compact-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
}
.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: 10px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  white-space: nowrap;
}
.stock-pill-btn:active {
  transform: scale(0.93);
}
.stock-pill-btn.pill-set {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.28);
}
.stock-pill-btn.pill-set:hover {
  background: rgba(22, 163, 74, 0.22);
}
.stock-pill-btn.pill-add {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}
.stock-pill-btn.pill-add:hover {
  background: #f1f5f9;
}
.stock-pill-btn.pill-sub {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.24);
}
.stock-pill-btn.pill-sub:hover {
  background: rgba(220, 38, 38, 0.18);
}
.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 #cbd5e1;
  border-radius: 8px;
  padding: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}
.stock-step-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.15s ease;
  user-select: none;
}
.stock-step-btn.btn-minus {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}
.stock-step-btn.btn-minus:active {
  background: rgba(220, 38, 38, 0.25);
  transform: scale(0.92);
}
.stock-step-btn.btn-plus {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}
.stock-step-btn.btn-plus:active {
  background: rgba(22, 163, 74, 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: #0f172a;
  -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: 10px 0 calc(6px + env(safe-area-inset-bottom, 0px)) 0;
  border-top: 1px solid #e2e8f0;
  margin-top: 12px;
  display: flex;
  gap: 8px;
  z-index: 20;
  box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.06);
}
.modal-footer-sticky .btn {
  margin-top: 0 !important;
  flex: 1;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12.5px;
}
.modal-footer-sticky .btn-primary {
  flex: 1.4;
}

/* Styled Category Select */
.cat-select-styled {
  background-color: #ffffff;
  font-weight: 600;
  color: #0f172a;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  width: 100%;
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: menulist;
}
.cat-select-styled:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}



/* Alerts & Loaders */
.alert { padding: 10px 13px; border-radius: var(--radius-md); font-size: 12px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 600; }
.al-s { background: rgba(22, 163, 74, 0.1); border: 1px solid rgba(22, 163, 74, 0.25); color: #16a34a; }
.al-e { background: rgba(220, 38, 38, 0.1); border: 1px solid rgba(220, 38, 38, 0.25); color: #dc2626; }
.al-w { background: rgba(217, 119, 6, 0.1); border: 1px solid rgba(217, 119, 6, 0.25); color: #d97706; }
.loader { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; color: var(--text-muted); font-size: 12px; gap: 6px; }
.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: 700;
  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 Styling */
#syncOverlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sync-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.sync-title { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.sync-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.sync-steps {
  text-align: left;
  font-size: 12px;
  color: var(--text);
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  line-height: 1.7;
}
.sync-step { display: flex; gap: 8px; align-items: center; }

/* Floating Action Button (FAB) & Sticky Action Pill */
.fab-btn {
  position: fixed;
  bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  right: max(14px, calc(50% - 290px + 14px));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 45;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.fab-btn:active {
  transform: scale(0.92);
  background: #000000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.fab-pill {
  position: fixed;
  bottom: calc(54px + env(safe-area-inset-bottom, 0px));
  right: max(14px, calc(50% - 290px + 14px));
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: 24px;
  padding: 5px 12px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: 0.1px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.35);
  cursor: pointer;
  z-index: 45;
  transition: transform 0.12s ease, background 0.12s ease;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}
.fab-pill:active {
  transform: scale(0.94);
  background: #000000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.fab-pill .icon {
  width: 12px;
  height: 12px;
}
.fab-pill span {
  font-size: 11px;
  font-weight: 800;
}

/* ─── Modern POS Floating Cart Bar & Checkout Sheet ─── */
.pos-floating-cart-bar {
  position: sticky;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: 14px;
  border: 1px solid #334155;
  padding: 10px 14px;
  margin: 10px 0 6px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
  cursor: pointer;
  z-index: 30;
  transition: transform 0.15s ease, 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: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}
.pos-cart-bar-title {
  font-size: 12.5px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.2px;
}
.pos-cart-bar-sub {
  font-size: 10.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pos-cart-bar-sub b {
  color: #4ade80;
  font-weight: 800;
}
.btn-pos-checkout {
  background: #16a34a;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
  transition: all 0.15s ease;
}
.btn-pos-checkout:active {
  background: #15803d;
  transform: scale(0.94);
}

/* Payment Method Pills Grid */
.pay-method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.pay-pill {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 850;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  height: 38px;
  transition: all 0.12s ease;
}
.pay-pill:active {
  transform: scale(0.96);
}
.pay-pill.active {
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}
.pay-pill .icon {
  width: 15px;
  height: 15px;
}

/* Quick Discount Chips */
.quick-disc-chips, .quick-cash-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.disc-chip, .cash-chip {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #f1f5f9;
  color: #000000;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.1s ease;
}
.disc-chip:hover, .cash-chip:hover, .disc-chip:active, .cash-chip:active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Checkout Summary Dark Card */
.checkout-summary-card {
  background: #0f172a;
  color: #ffffff;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid #334155;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.15);
}

/* Digital Thermal Receipt Card - High-Definition Thermal Roll Print Styling */
.receipt-graphic-card {
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  border-radius: 12px;
  padding: 18px 16px;
  font-family: 'Courier New', 'Cascadia Code', 'Consolas', 'Courier', monospace;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  letter-spacing: -0.2px;
}
.rec-store-header {
  text-align: center;
}
.rec-store-name {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #000000;
  text-transform: uppercase;
  font-family: 'Courier New', 'Consolas', monospace;
}
.rec-store-sub {
  font-size: 12.5px;
  font-weight: 800;
  color: #1e293b;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.rec-divider {
  text-align: center;
  color: #000000;
  font-size: 12px;
  font-weight: 900;
  font-family: 'Courier New', 'Consolas', monospace;
  overflow: hidden;
  white-space: nowrap;
  margin: 6px 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: #000000;
  font-family: 'Courier New', 'Consolas', monospace;
}
.rec-meta-grid span {
  color: #334155;
  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;
  font-family: 'Courier New', 'Consolas', monospace;
  color: #000000;
  border-top: 1.5px dashed #000000;
  border-bottom: 1.5px dashed #000000;
  padding: 5px 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: 4px 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: 3px 0;
  border-bottom: 1px dotted #cbd5e1;
  font-family: 'Courier New', 'Consolas', monospace;
  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;
  font-family: 'Courier New', 'Consolas', monospace;
}
.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: #000000;
  font-weight: 900;
  font-family: 'Courier New', 'Consolas', monospace;
}

/* POS Multi-UOM and Batch Elements */
.pos-uom-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed #cbd5e1;
  width: 100%;
}
.pos-uom-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 850;
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
}
.pos-uom-chip:active {
  transform: scale(0.96);
  background: #1e293b;
}
.pos-uom-chip-active {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #0f172a;
  color: #ffffff;
  border: 1.5px solid #38bdf8;
  border-radius: 6px;
  padding: 2px 5px;
  font-size: 10.5px;
  font-weight: 900;
}
.pos-batch-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 9.5px;
  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: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 8px 12px;
  border-bottom: 2px solid #38bdf8;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.45);
  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: 30px;
  height: 30px;
  border-radius: 8px;
  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: 12px;
  font-weight: 800;
  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: 9px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
.update-banner-sub {
  font-size: 9.5px;
  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: 6px 11px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  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.1);
  color: #cbd5e1;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  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.2);
  color: #ffffff;
}

/* ==========================================================================
   Live Sync Status Badge (Online / Queued / Offline States)
   ========================================================================== */
.sync-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  background: #f1f5f9;
  color: #334155;
  user-select: none;
}
.sync-status-badge:active {
  transform: scale(0.96);
}
.sync-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  display: inline-block;
  flex-shrink: 0;
}

/* Online State */
.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.2);
}

/* Queued Outbox State (e.g. 2 Bills Queued) */
.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);
}
@keyframes badgePulseQueued {
  0% { transform: scale(1); }
  100% { transform: scale(1.02); }
}

/* Offline State */
.sync-status-badge.badge-offline {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.sync-status-badge.badge-offline .sync-status-dot {
  background: #ef4444;
}

/* Syncing State */
.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;
}
@keyframes dotBlink {
  0% { opacity: 0.2; }
  100% { opacity: 1; }
}

/* ==========================================================================
   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: 10px 14px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  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: 14px;
  font-weight: 900;
  letter-spacing: -0.2px;
}
.btn-scanner-action {
  width: 36px;
  height: 36px;
  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: 999px;
  background: #16a34a;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 850;
  padding: 5px 11px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.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: 16px;
  box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.52);
  pointer-events: none;
  overflow: hidden;
}
.scanner-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3.5px solid #22c55e;
}
.scanner-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; border-top-left-radius: 14px; }
.scanner-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-top-right-radius: 14px; }
.scanner-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-bottom-left-radius: 14px; }
.scanner-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; border-bottom-right-radius: 14px; }

.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 8px #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: 12px 16px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  text-align: center;
  z-index: 10;
  transition: border-color 0.2s ease;
}
.scanner-hud-text {
  font-size: 12.5px;
  font-weight: 850;
  color: #ffffff;
  line-height: 1.4;
  letter-spacing: -0.1px;
}
