/* ============================================================
   72N Explorer — Premium Web App & PWA Theme
   Desktop: Obsidian Luxury Glassmorphic Design
   Mobile: Pure Clean White Tech & iOS-style Aesthetics
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700&family=Space+Grotesk:wght@500;600;700;800&display=swap');

:root {
  --gold:             #F59E0B;
  --gold-mid:         #D97706;
  --gold-glow:        rgba(245, 158, 11, 0.15);
  --gold-subtle:      rgba(245, 158, 11, 0.05);

  --gold-grad:        linear-gradient(135deg, #FDE68A 0%, #F59E0B 50%, #D97706 100%);
  --gold-grad-text:   linear-gradient(135deg, #0F172A 0%, #334155 100%);

  --bg:        #F8FAFC;
  --s1:        #FFFFFF;
  --s2:        #FFFFFF;
  --s3:        #F1F5F9;
  --s4:        #E2E8F0;

  --border:    #E2E8F0;
  --border-md: #CBD5E1;
  --border-hi: #94A3B8;

  --text:      #0F172A;
  --muted:     #475569;
  --dim:       #94A3B8;

  --green:            #10B981;
  --green-bg:         rgba(16, 185, 129, 0.12);
  --red:              #EF4444;
  --red-bg:           rgba(239, 68, 68, 0.12);
  --amber:            #F59E0B;
  --amber-bg:         rgba(245, 158, 11, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: -webkit-fill-available;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ── APP ROOT SHELL ── */
.app-root {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* PWA Standalone & Fullscreen Mode Global Rules */
.is-pwa-standalone,
:fullscreen,
:-webkit-full-screen {
  overscroll-behavior-y: none;
}
.is-pwa-standalone body {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.is-pwa-standalone input,
.is-pwa-standalone textarea,
.is-pwa-standalone [contenteditable="true"] {
  user-select: text;
  -webkit-user-select: text;
}

/* Ambient Glow Background */
.ambient-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
  top: -150px; right: -150px;
}
.orb-2 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
  bottom: -100px; left: -100px;
}

/* ── DESKTOP & FULLSCREEN HEADER ── */
.header {
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding-top: max(env(safe-area-inset-top, 0px), 12px);
  padding-bottom: 12px;
  padding-left: max(env(safe-area-inset-left, 0px), 24px);
  padding-right: max(env(safe-area-inset-right, 0px), 24px);
}
.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
#appTitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.2px;
}
.brand-72 {
  background: var(--gold-grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}
.pwa-badge {
  font-size: 0.62rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--muted);
  margin-left: 6px;
  vertical-align: middle;
}
.brand-subtitle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.live-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulseGlow 2s infinite;
  flex-shrink: 0;
}
.status-text {
  font-size: 0.73rem;
  color: var(--muted);
  font-weight: 500;
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  background: #DCFCE7;
  border: 1px solid #86EFAC;
  color: #15803D;
  vertical-align: middle;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.admin-badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #16A34A;
}
.admin-badge.offline {
  background: #F1F5F9;
  border-color: #E2E8F0;
  color: #64748B;
}
.admin-badge.offline .dot {
  background: #94A3B8;
}
html.dark .admin-badge {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34D399;
}
html.dark .admin-badge.offline {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94A3B8;
}
html.dark .admin-badge.offline .dot {
  background: #64748B;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cart-header-btn {
  background: var(--s1);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.cart-header-btn:hover {
  background: var(--s2);
  border-color: var(--border-hi);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.primary-cart-btn {
  background: var(--gold-grad);
  color: #000;
  border: none;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
}
.primary-cart-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}
.cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: #EF4444;
  color: #FFF;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 6px;
  border: 2px solid #0B0F17;
}

/* Pulse status dot */
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulseGlow 2s infinite;
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes cardReveal {
  0% {
    opacity: 0.7;
    transform: translateY(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalScaleIn {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(14px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes drawerSlideIn {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes badgeBounce {
  0% { transform: scale(1); }
  35% { transform: scale(1.25); }
  65% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

@keyframes shimmerSweep {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── MAIN BODY & CONTROLS ── */
.main-body {
  position: relative;
  z-index: 10;
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 90px;
}
.content-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── STICKY TOP CONTROLS & FILTER DOCK ──
   Pinned to the top below header so ONLY #results product list scrolls */
.sticky-filter-dock {
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 0 6px;
  margin-bottom: 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.05);
}
html.dark .sticky-filter-dock {
  background: rgba(11, 15, 23, 0.92);
  border-bottom-color: rgba(51, 65, 85, 0.5);
}

/* Controls: Ultra-Compact Search & Quick Action Buttons */
.controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-wrapper {
  flex: 1;
  position: relative;
  min-width: 0;
}
.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}
input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 6px 12px 6px 34px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
input[type="text"]:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  background: var(--s2);
  box-shadow: 0 0 0 2px var(--gold-glow);
}

.btn {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-outline {
  background: var(--s1);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.btn-outline:hover {
  background: var(--s2);
  border-color: var(--border-hi);
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--gold-grad);
  color: #000;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

/* Quick Filter Segment Tabs (Compact Sleek Strip) */
.quick-tabs {
  display: flex;
  gap: 5px;
  width: 100%;
}
.q-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #475569;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
html.dark .q-tab {
  background: var(--s2);
  border-color: var(--border);
  color: var(--muted);
}
.q-tab:hover {
  background: #E2E8F0;
  color: #0F172A;
}
html.dark .q-tab:hover {
  background: var(--s3);
  color: var(--text);
}
.q-tab.active {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
html.dark .q-tab.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.filters-panel {
  background: var(--s1);
  border-radius: 10px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
}
.panel-divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 0;
}
.sort-bar, .filter-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}
.filter-title {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
}
.sort-select, .size-select {
  padding: 5px 28px 5px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  width: auto;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #F8FAFC;
  color: #334155;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%22%2364748b%22%20d%3D%22M2.2%204.2L6%208l3.8-3.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
html.dark .sort-select, html.dark .size-select {
  background: #1E293B;
  color: #F8FAFC;
  border-color: #334155;
}
.size-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.chip {
  background: var(--s2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chip.active, .chip:hover {
  background: var(--gold-grad);
  color: #000;
  border-color: transparent;
  font-weight: 800;
}

/* Category Grid (Ultra-Compact & Clear 2/3 Baris Layout) */
.cat-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px;
  width: 100%;
  margin-bottom: 0;
  padding: 2px 0 4px;
}
.cat-card {
  flex: 1 1 calc(33.333% - 6px);
  min-width: 120px;
  max-width: 100%;
  display: flex;
  align-items: center;
  background: var(--s1);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 5px 9px;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.cat-card:hover {
  background: var(--s2);
  border-color: var(--border-hi);
  transform: translateY(-1px);
}
.cat-card.active {
  background: #0F172A;
  border-color: #38BDF8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
html.dark .cat-card.active {
  background: #1E293B;
  border-color: #38BDF8;
}
.cat-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cat-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #0F172A;
  letter-spacing: 0.1px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.cat-card.active .cat-name {
  color: #F8FAFC;
}
.cat-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
}
.cat-stock {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  color: #0F172A;
  margin: 0;
  background: #F1F5F9;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
  line-height: 1.2;
}
.cat-stock .unit {
  font-size: 0.65rem;
  font-weight: 500;
  color: #475569;
}
.cat-card.active .cat-stock {
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.2);
}
.cat-card.active .cat-stock .unit {
  color: #E2E8F0;
}
.cat-models {
  font-size: 0.64rem;
  color: #64748B;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.2;
}
.cat-card.active .cat-models {
  color: #CBD5E1;
}

/* Product List Grid */
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
.product-card {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  animation: cardReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  cursor: pointer;
}
.product-card:hover {
  background: var(--s2);
  border-color: var(--border-hi);
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 32px -8px rgba(0,0,0,0.45), 0 0 16px rgba(245, 158, 11, 0.15);
}
.product-card:active {
  transform: translateY(-1px) scale(0.995);
}
.product-image {
  width: 86px;
  height: 86px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--s2);
  flex-shrink: 0;
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}
.product-card:hover .product-image {
  transform: scale(1.06);
}
.product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.product-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.35;
}
.product-price {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
}
.product-stock {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}
.stock-size {
  font-size: 0.72rem;
  font-weight: 550;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.stock-size.available {
  background: var(--green-bg);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--green);
}
.stock-size.sold-out {
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
}
.stock-total {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 8px;
  transition: background 0.25s ease, color 0.25s ease;
}
.stock-total.has-stock { background: var(--green-bg); color: var(--green); }
.stock-total.no-stock { background: var(--red-bg); color: var(--red); }

/* ── CART BACKDROP & DRAWER (DESKTOP) ── */
.cart-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  max-height: 100vh;
  background: var(--bg);
  border-left: 1px solid var(--border-md);
  box-shadow: -15px 0 45px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
  animation: drawerSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  width: 100%;
}

.cart-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.cart-close-btn {
  background: var(--s2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
}
.cart-close-btn:hover {
  background: var(--s3);
  transform: scale(1.05);
}

.cart-customer-wrap {
  width: 100%;
  margin-top: 14px;
  margin-bottom: 10px;
  flex-shrink: 0;
  position: relative;
}

.cart-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

.cart-customer-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
}
.cart-customer-input:focus {
  border-color: var(--gold);
  background: var(--s1);
  box-shadow: 0 0 0 2px var(--gold-glow);
}

.cust-suggestions-box {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #111827;
  border: 1px solid var(--border-md);
  border-radius: 10px;
  max-height: 180px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  margin-top: 4px;
}
.cust-suggestion-item {
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.cust-suggestion-item:hover {
  background: var(--s3);
}

.cart-quick-actions {
  width: 100%;
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.cart-quick-btn {
  flex: 1;
  padding: 9px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cart-quick-btn.quick-order {
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: var(--gold);
  background: rgba(255, 215, 0, 0.08);
}
.cart-quick-btn.quick-order:hover {
  background: rgba(255, 215, 0, 0.16);
}
.cart-quick-btn.smart-paste {
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #4ADE80;
  background: rgba(74, 222, 128, 0.08);
}
.cart-quick-btn.smart-paste:hover {
  background: rgba(74, 222, 128, 0.16);
}

.cart-items-list {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  min-height: 0;
  margin-bottom: 12px;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}

.cart-empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
}
.cart-empty-icon {
  font-size: 2.4rem;
  margin-bottom: 10px;
}
.cart-empty-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.cart-empty-sub {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.cart-item-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
}
.cart-item-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-sub {
  font-size: 0.74rem;
  color: var(--gold);
  font-weight: 600;
  margin-top: 2px;
}
.cart-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 5px;
}
.cart-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--s1);
  color: var(--text);
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-qty-num {
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
  color: var(--text);
}
.cart-del-btn {
  border: none;
  background: none;
  color: #EF4444;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer {
  display: none !important;
}

.cart-footer {
  width: 100%;
  flex-shrink: 0;
  padding-top: 6px;
}

.cart-summary-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.cart-summary-row.border-dashed {
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
}
.cart-summary-val {
  font-weight: 600;
  color: var(--text);
}
.cart-summary-val.gold {
  color: var(--gold);
  font-weight: 700;
}
.cart-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.cart-total-value {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text);
}

.cart-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}
.cart-action-btn {
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 10px 12px;
  height: 42px;
  box-sizing: border-box;
}
.cart-action-btn.invoice {
  flex: 1;
  background: linear-gradient(135deg, #FFFFFF 0%, #E2E8F0 100%);
  color: #0F172A;
  font-weight: 800;
  font-size: 0.82rem;
  border: none;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.cart-action-btn.invoice:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.cart-action-btn.csv {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  gap: 5px;
}
.cart-action-btn.csv:hover {
  background: rgba(0, 0, 0, 0.1);
}
.cart-action-btn.clear {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.cart-action-btn.clear:hover {
  background: rgba(239, 68, 68, 0.22);
}

/* ── MODALS (POPUPS) ── */
.invoice-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.invoice-modal-inner {
  background: #0D121F;
  border: 1px solid var(--border-md);
  border-radius: 20px;
  padding: 20px;
  width: 94%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  color: var(--text);
  box-sizing: border-box;
  animation: modalScaleIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.invoice-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.invoice-modal-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}
.invoice-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* ── CONFIRM MODAL ── */
.confirm-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.confirm-modal-inner {
  background: #0D121F;
  border: 1px solid var(--border-md);
  border-radius: 20px;
  padding: 24px;
  width: 90%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  color: var(--text);
  box-sizing: border-box;
  animation: modalScaleIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.confirm-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}
.confirm-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.confirm-message {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 20px;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.confirm-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.confirm-btn.cancel {
  background: var(--s2);
  color: var(--text);
  border: 1px solid var(--border);
}
.confirm-btn.cancel:hover {
  background: var(--s3);
}
.confirm-btn.danger {
  background: #EF4444;
  color: #FFFFFF;
}
.confirm-btn.danger:hover {
  background: #DC2626;
}

/* ── ADMIN LOGIN MODAL ── */
.admin-login-frame-wrapper {
  background: #0D121F;
  border: 1px solid var(--border-md);
  border-radius: 20px;
  padding: 20px;
  width: 94%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  color: var(--text);
  box-sizing: border-box;
  animation: modalScaleIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.admin-login-frame-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* ── KWITANSI RECEIPT STYLES ── */
.kwitansi-container {
  margin: 14px 0;
  background: #111827;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 380px;
  overflow-y: auto;
}

/* ── MOBILE FULL FEATURES MENU SHEET ── */
.mobile-menu-sheet {
  background: #FFFFFF;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 24px 20px 32px;
  width: 100%;
  max-width: 500px;
  max-height: 88vh;
  overflow-y: auto;
  position: absolute;
  bottom: 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid #E2E8F0;
  margin-bottom: 16px;
}
.mobile-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.mobile-menu-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mobile-menu-card:active {
  background: #E2E8F0;
  transform: scale(0.97);
}
.menu-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.menu-card-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.menu-card-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.25;
}
.menu-card-desc {
  font-size: 0.68rem;
  color: #64748B;
  line-height: 1.2;
}

/* ── PROJECT SWITCHER PILLS IN HEADER ── */
.project-switcher-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border);
  padding: 4px 6px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}
.project-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.project-pill:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.06);
}
.project-pill.active {
  color: #000;
  background: #FFF;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.05);
}
.project-pill.shootgun:hover {
  color: #38BDF8;
}
.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pill-dot.gold { background: var(--gold); }
.pill-dot.cyan { background: #06B6D4; }
.project-pill-hub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.project-pill-hub:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.08);
}

/* ── PROJECT CHOOSER MODAL ── */
.project-chooser-modal-inner {
  max-width: 540px !important;
  width: 92%;
}
.project-chooser-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.chooser-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.chooser-card:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.chooser-card.active {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.04);
}
.chooser-card.shootgun:hover {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.15);
}
.chooser-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chooser-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
}
.chooser-badge.gold {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.chooser-badge.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.chooser-status {
  font-size: 0.72rem;
  font-weight: 700;
}
.chooser-status.active { color: #10B981; }
.chooser-status.ready { color: #38BDF8; }
.chooser-card-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.chooser-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.chooser-card-icon.gold {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.chooser-card-icon.cyan {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
}
.chooser-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.chooser-desc {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ── PURE WHITE MOBILE MODE (max-width: 768px) ── */
@media (max-width: 768px) {
  :root {
    --bg:        #F8FAFC;
    --s1:        #FFFFFF;
    --s2:        #FFFFFF;
    --s3:        #F1F5F9;
    --s4:        #E2E8F0;

    --border:    #E2E8F0;
    --border-md: #CBD5E1;
    --border-hi: #94A3B8;

    --text:      #0F172A;
    --muted:     #475569;
    --dim:       #94A3B8;

    --gold-grad-text: linear-gradient(135deg, #0F172A 0%, #334155 100%);
  }

  html, body {
    background: #F8FAFC;
    color: #0F172A;
  }

  .ambient-bg {
    display: none;
  }

  /* Mobile Header Layout */
  .header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #E2E8F0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 10px 14px;
  }
  .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
  }
  .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  #appTitle {
    color: #0F172A;
    font-size: 1.05rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand-explorer {
    color: #0F172A;
  }
  .pwa-badge {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #E2E8F0;
    font-size: 0.58rem;
    padding: 1px 5px;
  }
  .status-text {
    color: #64748B;
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
  }
  .brand-subtitle {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 1px;
    min-width: 0;
    white-space: nowrap;
  }
  .admin-badge {
    display: inline-flex !important;
    font-size: 0.60rem !important;
    padding: 1px 6px !important;
    border-radius: 8px !important;
    vertical-align: middle !important;
  }

  /* On mobile header */
  .header {
    padding-top: max(env(safe-area-inset-top, 10px), 14px);
    padding-bottom: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .header-container {
    gap: 8px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
  }
  .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
  }
  .brand-text h1 {
    font-size: 0.92rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
  }
  .project-switcher-pills {
    display: none !important; /* Hide project switcher on mobile to save space */
  }
  .header-end {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .header-end .pulse-dot {
    display: none !important; /* Hide floating loose dot on mobile */
  }
  .header-end .cart-header-btn:not(#cartBtn):not(#audioAlertBtn) {
    display: none !important;
  }
  #audioAlertBtn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    color: #0F172A;
    border-radius: 10px;
  }
  #cartBtn {
    height: 36px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0F172A;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    position: relative;
  }
  .cart-badge {
    border-color: #FFFFFF;
  }

  /* Main Body & Sticky Filter Dock on Mobile */
  .main-body {
    padding: 0 10px 90px;
    background: #F8FAFC;
  }
  .sticky-filter-dock {
    position: sticky;
    top: 0;
    z-index: 25;
    background: rgba(248, 250, 252, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 8px 0 6px;
    margin-bottom: 4px;
    gap: 7px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.8);
    box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.08);
  }
  .controls {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
  }
  .search-wrapper {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
  }
  #deepScanBtn {
    flex: 0 0 auto;
    justify-content: center;
    padding: 7px 10px;
    font-size: 0.8rem;
    font-weight: 550;
    border-radius: 9px;
    white-space: nowrap;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #1E293B;
  }
  #deepScanBtn .btn-icon {
    width: 14px;
    height: 14px;
  }
  .live-scan-toggle {
    flex: 0 0 auto;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  input[type="text"], input[type="number"], select, textarea {
    background: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    color: #0F172A;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 7px 12px 7px 34px;
    font-size: 0.86rem;
    font-weight: 500;
    border-radius: 9px;
  }
  .search-icon {
    width: 15px;
    height: 15px;
    left: 11px;
  }
  input[type="text"]::placeholder, textarea::placeholder {
    color: #64748B;
    font-weight: 500;
  }
  input[type="text"]:focus, select:focus, textarea:focus {
    background: #FFFFFF;
    border-color: #0F172A;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
  }
  .search-icon {
    color: #475569;
  }
  .btn-outline {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #0F172A;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  }

  /* Filter Tabs */
  .quick-tabs {
    gap: 5px;
  }
  .q-tab {
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    color: #475569;
    box-shadow: none;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 550;
    transition: all 0.2s ease;
  }
  .q-tab:hover {
    background: #E2E8F0;
    color: #0F172A;
  }
  .q-tab.active {
    background: #0F172A;
    color: #FFFFFF;
    border-color: #0F172A;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  }

  .filters-panel {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    box-shadow: 0 1px 5px rgba(0,0,0,0.04);
    padding: 7px 9px;
    gap: 6px;
    margin-bottom: 0;
    border-radius: 10px;
  }
  .panel-divider {
    margin: 0;
    border-top: 1px dashed #CBD5E1;
  }
  .sort-select, .size-select {
    padding: 6px 28px 6px 10px;
    font-size: 0.8rem;
    font-weight: 550;
    color: #1E293B;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    background-color: #F8FAFC;
  }

  .chip {
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    color: #475569;
    font-weight: 550;
  }
  .chip.active {
    background: #0F172A;
    color: #FFFFFF;
    border-color: #0F172A;
  }

  /* Category Grid (Clean & Balanced Typography) */
  .cat-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    gap: 5px !important;
    margin-bottom: 2px !important;
    padding: 2px 0 3px !important;
  }
  .cat-grid::-webkit-scrollbar {
    display: none;
  }
  .cat-card {
    flex: 1 1 calc(33.333% - 6px);
    min-width: 96px;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 8px;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    text-align: left;
  }
  .cat-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .cat-name {
    color: #334155;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    display: block;
    width: 100%;
  }
  .cat-card.active .cat-name {
    color: #F8FAFC;
  }
  .cat-badges {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
    width: 100%;
  }
  .cat-stock {
    color: #1E293B;
    font-size: 0.74rem;
    font-weight: 600;
    margin: 0;
    padding: 1px 4px;
    background: #F1F5F9;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1.2;
  }
  .cat-stock .unit {
    font-size: 0.62rem !important;
    font-weight: 500 !important;
    color: #64748B;
  }
  .cat-card.active .cat-stock {
    color: #38BDF8;
    background: rgba(56, 189, 248, 0.25);
  }
  .cat-card.active .cat-stock .unit {
    color: #E2E8F0;
  }
  .cat-models {
    font-size: 0.62rem;
    font-weight: 500;
    color: #64748B;
    white-space: nowrap;
    line-height: 1.2;
  }
  .cat-card.active .cat-models {
    color: #CBD5E1;
  }

  /* Product List */
  .product-list {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-bottom: calc(75px + env(safe-area-inset-bottom, 12px)) !important;
  }
  .product-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border-radius: 14px;
    padding: 12px;
  }
  .product-name {
    color: #1E293B;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: -0.01em;
  }
  .product-price {
    color: #D97706;
    font-weight: 600;
    font-size: 0.85rem;
  }
  .stock-size.available {
    background: #DCFCE7;
    border-color: #86EFAC;
    color: #15803D;
    font-weight: 550;
  }
  .stock-size.sold-out {
    background: #F8FAFC;
    color: #94A3B8;
    font-weight: 500;
  }
  .stock-total.has-stock {
    background: #DCFCE7;
    color: #15803D;
    font-weight: 600;
  }
  .stock-total.no-stock {
    background: #FEE2E2;
    color: #DC2626;
    font-weight: 550;
  }

  .btn-add-cart-card {
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
  }

  /* Facebook-Style Translucent Bottom Navigation Bar with Active Indicator Line */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-top: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.03) !important;
    padding: 0 4px max(env(safe-area-inset-bottom, 8px), 8px) !important;
    justify-content: space-around !important;
    align-items: center !important;
    height: calc(54px + max(env(safe-area-inset-bottom, 8px), 8px)) !important;
  }
  html.dark .mobile-bottom-nav {
    background: rgba(15, 23, 42, 0.85) !important;
    border-top-color: rgba(51, 65, 85, 0.7) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3) !important;
  }
  .mobile-nav-item {
    flex: 1 !important;
    height: 52px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    color: #64748B !important;
    font-size: 0.65rem !important;
    font-weight: 550 !important;
    cursor: pointer !important;
    padding: 0 !important;
    position: relative !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    -webkit-tap-highlight-color: transparent !important;
    text-decoration: none !important;
  }
  /* Facebook-style top border line on active tab */
  .mobile-nav-item::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 20% !important;
    right: 20% !important;
    height: 3px !important;
    background: transparent !important;
    border-radius: 0 0 3px 3px !important;
    transition: all 0.2s ease !important;
  }
  .mobile-nav-item:active {
    transform: scale(0.95) !important;
    background: rgba(0, 0, 0, 0.02) !important;
  }
  .mobile-nav-item.active {
    color: #1877F2 !important; /* Facebook Primary Iconic Blue */
    font-weight: 650 !important;
  }
  .mobile-nav-item.active::before {
    background: #1877F2 !important;
    box-shadow: 0 2px 6px rgba(24, 119, 242, 0.4) !important;
  }
  html.dark .mobile-nav-item.active {
    color: #38BDF8 !important;
  }
  html.dark .mobile-nav-item.active::before {
    background: #38BDF8 !important;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.5) !important;
  }
  .mobile-nav-item svg {
    width: 22px !important;
    height: 22px !important;
    stroke-width: 2.2 !important;
    transition: transform 0.2s ease !important;
  }
  .mobile-nav-item.active svg {
    transform: translateY(-1px) scale(1.05) !important;
  }

  .footer {
    display: none !important;
  }

  /* ── MOBILE CART PANEL: Full-Screen White Drawer ── */
  .cart-backdrop {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .cart-panel {
    max-width: 100vw;
    width: 100vw;
    left: 0;
    right: 0;
    background: #FFFFFF;
    color: #0F172A;
    border-left: none;
    box-shadow: none;
    padding: 16px 16px calc(env(safe-area-inset-bottom, 20px) + 16px);
  }
  .cart-quick-actions {
    flex-direction: row;
    gap: 6px;
    margin-bottom: 8px;
  }
  .cart-quick-btn {
    padding: 7px 6px;
    font-size: 0.72rem;
  }
  .cart-footer {
    background: #FFFFFF;
    padding: 10px 0 0 0;
    border-top: 1px solid #E2E8F0;
    margin-top: 0;
  }
  .cart-action-btn {
    height: 38px;
  }
  .cart-action-btn.invoice {
    flex: 2;
    font-size: 0.82rem;
  }
  .cart-summary-box {
    margin-bottom: 8px;
    padding: 8px;
  }
  .cart-customer-wrap {
    margin-top: 8px;
    margin-bottom: 8px;
  }
  .cart-panel-header {
    border-bottom: 1px solid #E2E8F0;
  }
  .cart-title {
    color: #0F172A;
    font-size: 1rem;
  }
  .cart-close-btn {
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    color: #0F172A;
  }
  .cart-label {
    color: #64748B;
  }
  .cart-customer-input {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    color: #0F172A;
  }
  .cart-customer-input:focus {
    border-color: #F59E0B;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
  }
  .cust-suggestions-box {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  }
  .cust-suggestion-item {
    color: #0F172A;
    border-bottom: 1px solid #F1F5F9;
  }
  .cust-suggestion-item:hover {
    background: #F1F5F9;
  }
  .cart-quick-btn.quick-order {
    border-color: #F59E0B;
    color: #B45309;
    background: #FEF3C7;
  }
  .cart-quick-btn.smart-paste {
    border-color: #34D399;
    color: #047857;
    background: #D1FAE5;
  }
  .cart-item-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
  }
  .cart-item-name {
    color: #0F172A;
  }
  .cart-item-sub {
    color: #B45309;
  }
  .cart-qty-btn {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #0F172A;
  }
  .cart-qty-num {
    color: #0F172A;
  }
  .cart-summary-box {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
  }
  .cart-summary-row {
    color: #64748B;
  }
  .cart-summary-row.border-dashed {
    border-bottom-color: #CBD5E1;
  }
  .cart-summary-val {
    color: #0F172A;
  }
  .cart-summary-val.gold {
    color: #B45309;
  }
  .cart-summary-total {
    color: #0F172A;
  }
  .cart-total-value {
    color: #0F172A;
  }
  .cart-action-btn.invoice {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  }
  .cart-action-btn.csv {
    background: #F1F5F9;
    color: #334155;
    border: 1px solid #CBD5E1;
  }
  .cart-action-btn.clear {
    background: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FCA5A5;
  }
  .cart-empty-title {
    color: #0F172A;
  }

  /* ── MOBILE MODALS: Light Theme ── */
  .invoice-modal-inner {
    background: #FFFFFF;
    color: #0F172A;
    border: 1px solid #E2E8F0;
  }
  .invoice-modal-header {
    border-bottom: 1px solid #E2E8F0;
  }
  .invoice-modal-title {
    color: #0F172A;
  }
  .kwitansi-container {
    background: #F8FAFC;
    border-color: #E2E8F0;
    color: #0F172A;
  }

  /* Modal Inputs & Controls on Mobile */
  .invoice-modal-inner input:not([type="checkbox"]),
  .invoice-modal-inner select,
  .invoice-modal-inner textarea {
    background: #F8FAFC;
    color: #0F172A;
    border: 1px solid #CBD5E1;
  }
  .invoice-modal-inner input:focus,
  .invoice-modal-inner select:focus,
  .invoice-modal-inner textarea:focus {
    background: #FFFFFF;
    border-color: #0F172A;
  }
  .invoice-modal-inner h3,
  .invoice-modal-inner .cart-label,
  .invoice-modal-inner label {
    color: #475569;
  }

  /* Confirm Modal on Mobile (Light Mode) */
  .confirm-modal-inner {
    background: #FFFFFF;
    color: #0F172A;
    border: 1px solid #E2E8F0;
  }
  .confirm-title {
    color: #0F172A;
  }
  .confirm-btn.cancel {
    background: #F1F5F9;
    color: #334155;
    border: 1px solid #CBD5E1;
  }

  /* Admin Login on Mobile (Light Mode) */
  /* Admin Login on Mobile */
  .admin-login-frame-wrapper {
    background: #0F172A !important;
    color: #F8FAFC !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6) !important;
    width: 94vw !important;
    max-width: 440px !important;
    padding: 16px 14px !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .admin-login-frame-wrapper input,
  .admin-login-frame-wrapper textarea {
    font-size: 16px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
  }

  /* Mobile Project Switcher & Chooser */
  .header-container {
    flex-wrap: wrap;
    gap: 8px 0;
  }
  .project-switcher-pills {
    order: 3;
    width: 100%;
    margin-top: 6px;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 3px;
    display: flex;
    justify-content: stretch;
    gap: 4px;
  }
  .project-pill {
    flex: 1;
    justify-content: center;
    font-size: 0.72rem;
    padding: 6px 6px;
    color: #475569;
    white-space: nowrap;
  }
  .project-pill.active {
    background: #0F172A;
    color: #FFFFFF;
  }
  .project-pill-hub {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #475569;
    width: 32px;
    flex-shrink: 0;
  }
  .chooser-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
  }
  .chooser-card.active {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.5);
  }

  /* Mobile Touch Adjustments */
  button, input, select, textarea, .stock-size, .q-tab, .chip, .mobile-nav-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
}

/* ── 3-SECOND REAL-TIME SCANNER STYLES ── */
/* ── 3-SECOND REAL-TIME SCANNER LAMP INDICATOR ── */
.live-scan-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0 !important;
  border-radius: 50% !important;
  cursor: pointer;
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.4) !important;
  transition: all 0.25s ease;
  flex: 0 0 auto;
}
.live-scan-toggle.offline-red,
.live-scan-toggle.paused {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
}
html.dark .live-scan-toggle.offline-red,
html.dark .live-scan-toggle.paused {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

.live-dot-beacon {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 10px #10B981, 0 0 4px #10B981;
}

.live-dot-beacon::after {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  bottom: -4px;
  left: -4px;
  border-radius: 50%;
  border: 1.5px solid #10B981;
  animation: radarBeacon 1.8s infinite cubic-bezier(0, 0.2, 0.8, 1);
}

.live-scan-toggle.offline-red .live-dot-beacon,
.live-scan-toggle.paused .live-dot-beacon {
  background: #EF4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}
.live-scan-toggle.offline-red .live-dot-beacon::after,
.live-scan-toggle.paused .live-dot-beacon::after {
  border-color: #EF4444;
  animation: radarBeacon 2.4s infinite cubic-bezier(0, 0.2, 0.8, 1);
}

@keyframes radarBeacon {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

@keyframes flashGreenUpdate {
  0% { background: rgba(16, 185, 129, 0.6); transform: scale(1.08); }
  50% { background: rgba(16, 185, 129, 0.3); }
  100% { background: transparent; transform: scale(1); }
}

.stock-updated-flash {
  animation: flashGreenUpdate 1.2s ease-out;
}

