/* ==========================================================================
   DrPiece Electronics POS - Modern Premium Retail Styling System
   Optimized for Mobile Phones, Tablets, Desktops, & Touch POS Terminals
   ========================================================================== */

/* Local system font stacks for reliable offline & online rendering */
:root {
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  /* Refined Color Palette */
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-primary-light: #eef2ff;
  --color-primary-rgb: 79, 70, 229;
  
  --color-success: #10b981;
  --color-success-hover: #059669;
  --color-success-light: #ecfdf5;
  
  --color-warning: #f59e0b;
  --color-warning-light: #fffbeb;
  
  --color-danger: #ef4444;
  --color-danger-light: #fef2f2;
  
  --color-dark: #0f172a;
  --color-dark-surface: #1e293b;
  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 16px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 28px -5px rgba(0, 0, 0, 0.1), 0 8px 12px -6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 24px 38px -5px rgba(0, 0, 0, 0.14), 0 12px 18px -6px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.25);
}

/* Base resets & typography */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: #f8fafc;
  color: var(--color-slate-800);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: 72px; /* For mobile bottom bar */
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   App Navbar (Glassmorphic Top Bar)
   -------------------------------------------------------------------------- */
.navbar-custom {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
  padding: 0.65rem 1.25rem;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
  color: #ffffff !important;
}

.brand-badge {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-left: 6px;
}

.nav-link-custom {
  color: var(--color-slate-400);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link-custom:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.nav-link-custom.active {
  color: #ffffff;
  background-color: rgba(79, 70, 229, 0.35);
  border: 1px solid rgba(79, 70, 229, 0.5);
  box-shadow: var(--shadow-glow);
}

/* --------------------------------------------------------------------------
   Mobile Bottom Navigation Bar (Smartphones & Small Tablets)
   -------------------------------------------------------------------------- */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1040;
  padding: 0 4px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.mobile-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-slate-400);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  min-width: 58px;
  flex: 1;
  text-align: center;
}

.mobile-bottom-nav-item i {
  font-size: 1.25rem;
  margin-bottom: 2px;
  transition: transform 0.15s ease;
}

.mobile-bottom-nav-item:hover,
.mobile-bottom-nav-item.active {
  color: #ffffff;
}

.mobile-bottom-nav-item.active {
  color: #818cf8;
}

.mobile-bottom-nav-item.active i {
  transform: translateY(-2px);
  color: #818cf8;
}

/* --------------------------------------------------------------------------
   POS Layout & Till Screen (Adaptive for Desktop, Tablet & Phone)
   -------------------------------------------------------------------------- */
.pos-container {
  height: calc(100vh - 58px);
  height: calc(100dvh - 58px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pos-main-row {
  position: relative;
  flex: 1 1 0%;
  min-height: 0;
  overflow: hidden;
}

.pos-main-row > [class*="col-"],
.min-h-0 {
  min-height: 0 !important;
}

.pos-catalog {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 0.85rem;
  -webkit-overflow-scrolling: touch;
}

.pos-toolbar {
  background: #ffffff;
  border-bottom: 1px solid var(--color-slate-200);
  padding: 0.65rem 0.9rem;
  flex-shrink: 0;
}

.pos-cart-panel {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  background: #f1f5f9;
  border-left: 1px solid var(--color-slate-200);
  display: flex;
  flex-direction: column;
  box-shadow: -6px 0 24px rgba(15, 23, 42, 0.06);
}

/* Visible custom scrollbar for cart & catalog */
.cart-scroll-body,
.cart-items-list,
.pos-catalog {
  scrollbar-width: thin;
  scrollbar-color: #64748b #e2e8f0;
}

.cart-scroll-body::-webkit-scrollbar,
.cart-items-list::-webkit-scrollbar,
.pos-catalog::-webkit-scrollbar {
  width: 6px;
}

.cart-scroll-body::-webkit-scrollbar-track,
.cart-items-list::-webkit-scrollbar-track,
.pos-catalog::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 999px;
}

.cart-scroll-body::-webkit-scrollbar-thumb,
.cart-items-list::-webkit-scrollbar-thumb,
.pos-catalog::-webkit-scrollbar-thumb {
  background: #64748b;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

/* On mobile/tablet (< 992px), pin active tab exactly to viewport & make cart body cleanly scrollable */
@media (max-width: 991.98px) {
  .pos-main-row > [class*="col-"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
  }
  .pos-cart-panel {
    border-left: none;
    box-shadow: none;
  }
  .cart-header {
    padding: 0.55rem 0.85rem;
  }
  .cart-scroll-body {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: scroll !important;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
  }
  .cart-items-list {
    flex: 1 0 auto !important;
    overflow-y: visible !important;
  }
  .cart-totals-box {
    flex-shrink: 0;
  }
  .cart-checkout-dock {
    padding: 0.5rem 0.85rem max(0.6rem, env(safe-area-inset-bottom));
  }
  .cart-total-banner {
    padding: 0.35rem 0.65rem;
    margin-bottom: 0.45rem;
  }
  .btn-checkout {
    padding: 0.7rem 0.9rem;
  }
}

@media (min-width: 992px) {
  .cart-scroll-body {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
}

/* Category Filter Pills (Horizontal Scroll) */
.category-chip {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid var(--color-slate-200);
  color: var(--color-slate-700);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  flex-shrink: 0;
}

.category-chip:hover {
  background: var(--color-slate-100);
  border-color: var(--color-slate-300);
}

.category-chip.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

/* Product POS Card (Touch Optimized) */
.pos-card {
  background: #ffffff;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  padding: 0.9rem;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.18s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  user-select: none;
  min-height: 130px;
}

.pos-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #a5b4fc;
}

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

.pos-card.low-stock {
  border-left: 4px solid var(--color-warning);
}

.pos-card.out-of-stock {
  opacity: 0.55;
  pointer-events: none;
  background: #f8fafc;
  border-left: 4px solid var(--color-danger);
}

.pos-card .product-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--color-slate-900);
  line-height: 1.35;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pos-card .product-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.3px;
}

.pos-card .product-stock-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
}

/* Cart Panel Elements — Modern POS Cart Design */
.cart-header {
  background: #ffffff;
  border-bottom: 1px solid var(--color-slate-200);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.cart-header-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(37, 99, 235, 0.12));
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.cart-customer-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--color-slate-200);
  padding: 0.6rem 1rem;
  flex-shrink: 0;
  position: relative;
}

.cart-customer-bar .form-control {
  background-color: var(--color-slate-50);
  border-color: var(--color-slate-200);
  font-size: 0.82rem;
}

.cart-customer-bar .form-control:focus {
  background-color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.85rem;
  background: #f1f5f9;
  -webkit-overflow-scrolling: touch;
}

.cart-row {
  background: #ffffff;
  border: 1px solid var(--color-slate-200);
  border-left: 3px solid transparent;
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.6rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.cart-row:hover {
  border-color: #cbd5e1;
  border-left-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.cart-row.cart-row-narrated,
.cart-row.cart-row-serial-ok {
  border-left-color: var(--color-primary);
}

.cart-row.cart-row-serial-missing {
  border-left-color: var(--color-warning);
  background: #fffdf7;
}

.cart-action-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--color-slate-200);
  background: var(--color-slate-50);
  color: var(--color-slate-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  padding: 0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cart-action-btn:hover {
  background: var(--color-slate-100);
  color: var(--color-slate-800);
  border-color: var(--color-slate-300);
}

.cart-action-btn.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: #c7d2fe;
}

.cart-action-btn.danger:hover {
  background: var(--color-danger-light);
  color: var(--color-danger);
  border-color: #fecaca;
}

.cart-qty-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--color-slate-100);
  border: 1px solid var(--color-slate-200);
  border-radius: 10px;
  padding: 2px;
  gap: 2px;
}

.cart-qty-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1rem;
  padding: 0;
  background: #ffffff;
  border: 1px solid var(--color-slate-200);
  color: var(--color-slate-800);
  touch-action: manipulation;
  transition: all 0.12s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cart-qty-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.cart-qty-btn:active {
  background: var(--color-primary);
  color: white;
  transform: scale(0.92);
}

.cart-qty-input {
  width: 44px;
  height: 28px;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--color-slate-900);
  outline: none;
}

/* Serial / IMEI Box */
.cart-serial-box {
  margin-top: 0.55rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  transition: all 0.15s ease;
}

.cart-serial-box.needs-serial {
  background: #fffbeb;
  border-color: #fbbf24;
}

.cart-serial-box.has-serial {
  background: #f0fdf4;
  border-style: solid;
  border-color: #86efac;
}

.serial-quick-chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--color-slate-700);
  cursor: pointer;
  transition: all 0.12s ease;
}

.serial-quick-chip:hover,
.serial-quick-chip.selected {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

/* Narration Box & Preview */
.narration-toggle-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--color-slate-200);
  background: var(--color-slate-50);
  color: var(--color-slate-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.narration-toggle-btn.narration-toggle-filled {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: #c7d2fe;
}

.narration-preview {
  margin-top: 0.45rem;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.74rem;
  cursor: pointer;
}

.narration-box {
  margin-top: 0.5rem;
  padding: 0.55rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--color-slate-200);
}

.narration-box-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-slate-700);
  margin-bottom: 0.35rem;
}

.narration-box-hint {
  font-weight: 600;
  font-size: 0.65rem;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 1px 6px;
  border-radius: 999px;
}

.narration-textarea {
  width: 100%;
  border: 1px solid var(--color-slate-300);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font-size: 0.78rem;
  resize: none;
  outline: none;
}

.narration-textarea:focus {
  border-color: var(--color-primary);
}

.narration-char-count {
  font-size: 0.68rem;
  color: var(--color-slate-400);
}

.narration-done-btn {
  border: none;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* Quick Quantity Presets (Cables / Measured items) */
.qty-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.qty-presets-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-slate-500);
  margin-right: 2px;
}

.qty-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 7px;
  border: 1px solid var(--color-slate-200);
  background: var(--color-slate-50);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-slate-700);
  cursor: pointer;
  transition: all 0.12s ease;
}

.qty-chip-price {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--color-slate-400);
}

.qty-chip.qty-chip-active,
.qty-chip:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.qty-chip.qty-chip-active .qty-chip-price,
.qty-chip:hover .qty-chip-price {
  color: rgba(255, 255, 255, 0.85);
}

/* Totals & Payment Dock */
.cart-totals-box {
  background: #ffffff;
  border-top: 1px solid var(--color-slate-200);
  padding: 0.75rem 0.95rem 0.8rem;
  flex-shrink: 0;
}

.cart-checkout-dock {
  background: #ffffff;
  border-top: 1px solid var(--color-slate-200);
  padding: 0.65rem 0.95rem max(0.75rem, env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.07);
  flex-shrink: 0;
  z-index: 20;
}

.cart-total-banner {
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
  border: 1px solid #e0e7ff;
  border-radius: 11px;
  padding: 0.45rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
}

.pay-method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 0.65rem;
}

.pay-method-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0.45rem 0.25rem;
  border-radius: 10px;
  border: 1.5px solid var(--color-slate-200);
  background: var(--color-slate-50);
  color: var(--color-slate-600);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pay-method-btn i {
  font-size: 1rem;
}

.pay-method-btn:hover {
  background: #ffffff;
  border-color: var(--color-slate-300);
  color: var(--color-slate-900);
}

.pay-method-btn.active.cash {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.18);
}

.pay-method-btn.active.mobile {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.18);
}

.pay-method-btn.active.card {
  background: #eef2ff;
  border-color: #4f46e5;
  color: #4338ca;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.18);
}

.pay-method-btn.active.credit {
  background: #fff7ed;
  border-color: #ea580c;
  color: #c2410c;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.18);
}

.quick-cash-chip {
  background: var(--color-slate-100);
  border: 1px solid var(--color-slate-200);
  color: var(--color-slate-700);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.32rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.quick-cash-chip:hover, .quick-cash-chip:active {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.change-display {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 0.3rem 0.6rem;
  text-align: right;
  min-height: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.change-display .change-amount {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.92rem;
  color: #047857;
  line-height: 1.15;
}

.change-display .change-label {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #059669;
}

.change-display.short {
  background: #fef2f2;
  border-color: #fecaca;
}

.change-display.short .change-amount,
.change-display.short .change-label {
  color: #dc2626;
}

.btn-checkout {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.15s ease;
}

.btn-checkout:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.38);
}

.btn-checkout:active:not(:disabled) {
  transform: scale(0.985);
}

.btn-checkout:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-checkout .checkout-total {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.text-brand {
  color: var(--color-primary) !important;
}

.font-mono {
  font-family: var(--font-mono) !important;
}

.fs-9 {
  font-size: 0.7rem !important;
}

/* Mobile Floating Cart Summary Bar */
.mobile-cart-floating-bar {
  position: fixed;
  bottom: 14px;
  left: 12px;
  right: 12px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4f46e5 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
  z-index: 1030;
  cursor: pointer;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --------------------------------------------------------------------------
   Cards, Tables, and Forms in Back-Office
   -------------------------------------------------------------------------- */
.content-card {
  background: #ffffff;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  transition: box-shadow 0.2s ease;
}

.content-card:hover {
  box-shadow: var(--shadow-md);
}

.table-responsive-custom {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-slate-200);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-custom {
  margin-bottom: 0;
  white-space: nowrap;
}

.table-custom th {
  background: var(--color-slate-50);
  color: var(--color-slate-600);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-slate-200);
}

.table-custom td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-slate-200);
  font-size: 0.9rem;
}

.table-custom tr:last-child td {
  border-bottom: none;
}

.table-custom tr:hover td {
  background-color: var(--color-slate-50);
}

/* Metric KPI Card Styling */
.kpi-card {
  background: #ffffff;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.kpi-card .kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-slate-500);
  margin-bottom: 0.35rem;
}

.kpi-card .kpi-value {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--color-slate-900);
  line-height: 1.15;
  letter-spacing: -0.5px;
}

/* --------------------------------------------------------------------------
   Receipt Paper Slip Styling (58mm / 80mm Emulation)
   -------------------------------------------------------------------------- */
.receipt-paper {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  background: #ffffff;
  padding: 24px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.45;
  color: #000000;
  box-shadow: var(--shadow-xl);
  border-radius: 6px;
  position: relative;
}

.receipt-paper .receipt-header {
  text-align: center;
  margin-bottom: 14px;
}

.receipt-paper .receipt-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.receipt-paper hr {
  border-top: 1px dashed #64748b;
  margin: 8px 0;
  opacity: 0.8;
}

.receipt-paper .total-line {
  font-size: 16px;
  font-weight: 800;
}

@media print {
  body * {
    visibility: hidden;
  }
  .receipt-paper, .receipt-paper * {
    visibility: visible;
  }
  .receipt-paper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .no-print {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   Responsive Utilities & Animations
   -------------------------------------------------------------------------- */
.fw-black {
  font-weight: 900 !important;
}

.fs-7 {
  font-size: 0.8rem !important;
}

.fs-8 {
  font-size: 0.72rem !important;
}

/* Smooth transition utility */
.transition-all {
  transition: all 0.2s ease-in-out;
}

/* Hide scrollbar but keep scroll functionality */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
