/* ============================================================
   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: 100%;
  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;
  margin: 0;
  padding: 0;
}

/* ── APP ROOT SHELL ── */
.app-root {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: 100%;
  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(90px);
  will-change: transform;
  pointer-events: none;
}
.orb-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(14, 165, 233, 0.05) 45%, transparent 70%);
  top: -120px; right: -100px;
  animation: orbDrift1 18s ease-in-out infinite alternate;
}
.orb-2 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.10) 0%, rgba(234, 88, 12, 0.04) 50%, transparent 70%);
  bottom: -80px; left: -80px;
  animation: orbDrift2 22s ease-in-out infinite alternate;
}
.orb-3 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.09) 0%, rgba(6, 182, 212, 0.04) 45%, transparent 70%);
  top: 35%; left: 20%;
  animation: orbDrift3 25s ease-in-out infinite alternate;
}

@keyframes orbDrift1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, 70px) scale(1.12); }
  100% { transform: translate(40px, -30px) scale(0.92); }
}
@keyframes orbDrift2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, -50px) scale(1.15); }
  100% { transform: translate(-40px, 40px) scale(0.95); }
}
@keyframes orbDrift3 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  50% { transform: translate(-50px, -60px) scale(1.18); opacity: 0.9; }
  100% { transform: translate(60px, 50px) scale(0.9); opacity: 0.5; }
}

/* ── 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;
}
@keyframes brandShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes pwaPulse {
  0%, 100% { border-color: rgba(59, 130, 246, 0.2); transform: scale(1); }
  50% { border-color: rgba(59, 130, 246, 0.6); box-shadow: 0 0 8px rgba(59, 130, 246, 0.25); transform: scale(1.02); }
}
.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);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.brand-logo:hover, .brand-logo:active {
  transform: scale(1.08) rotate(-3deg);
}
#appTitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.2px;
}
.brand-72 {
  background: linear-gradient(90deg, #F59E0B, #FBBF24, #EF4444, #F59E0B);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  animation: brandShimmer 5s ease infinite;
}
.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;
  animation: pwaPulse 3s infinite ease-in-out;
}
.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;
}
.nav-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #EF4444;
  color: #FFF;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 9999px;
  padding: 1px 5px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* 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.65); transform: scale(0.95); }
  50% { transform: scale(1.1); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); transform: scale(0.95); }
}

@keyframes cardReveal {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  60% {
    opacity: 0.95;
    transform: translateY(-2px) scale(1.005);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes catCardSlide {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  70% {
    opacity: 0.95;
    transform: translateY(-1px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalScaleIn {
  0% {
    opacity: 0;
    transform: scale(0.90) translateY(24px);
  }
  70% {
    opacity: 1;
    transform: scale(1.015) translateY(-3px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes drawerSlideIn {
  0% {
    transform: translateY(100%);
    opacity: 0.5;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes badgeBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  60% { transform: scale(0.88); }
  85% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes badgePopBounce {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.4); }
  75% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

.badge-pop-anim {
  animation: badgePopBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes btnShimmerSweep {
  0%, 60% { left: -120%; }
  100% { left: 220%; }
}

@keyframes pulseGreenGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

@keyframes softPulseRed {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.78; }
}

@keyframes navIconPop {
  0% { transform: scale(0.85); }
  45% { transform: scale(1.28) translateY(-2px); }
  75% { transform: scale(0.94); }
  100% { transform: scale(1); }
}

@keyframes navLineSlide {
  0% { transform: scaleX(0.2); opacity: 0; }
  100% { transform: scaleX(1); opacity: 1; }
}

@keyframes floatUpAndFade {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.5); }
  30% { opacity: 1; transform: translate(-50%, -20px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -50px) scale(0.8); }
}

.floating-cart-plus {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #059669);
  padding: 4px 10px;
  border-radius: 9999px;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
  animation: floatUpAndFade 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── 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: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  animation: catCardSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.cat-card:hover {
  background: #ffffff;
  border-color: #38bdf8;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}
.cat-card:active {
  transform: scale(0.96);
  transition-duration: 0.08s;
}
.cat-card.active {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%) !important;
  border-color: #38BDF8 !important;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35) !important;
  transform: translateY(-1px);
}
html.dark .cat-card.active {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%) !important;
  border-color: #38BDF8 !important;
}
.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: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  position: relative;
  overflow: hidden;
  animation: cardReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  cursor: pointer;
}
.product-card:hover {
  background: #ffffff;
  border-color: #93c5fd;
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.12), 0 0 1px 1px rgba(59, 130, 246, 0.2);
}
.product-card:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}
.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.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
}
.product-card:hover .product-image {
  transform: scale(1.08);
  filter: brightness(1.03);
}
.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 !important;
    color: #0F172A !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    height: 100dvh !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    overscroll-behavior: none !important;
  }

  .app-root {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .ambient-bg {
    display: none;
  }

  /* ── ULTRA-COMPACT MOBILE HEADER (PERMANENTLY PINNED AT TOP) ── */
  .header {
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 50 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid #E2E8F0 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03) !important;
    padding: max(env(safe-area-inset-top, 6px), 6px) 10px 4px !important;
    touch-action: pan-x !important;
  }
  .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    gap: 6px;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
  }
  .brand-logo {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    flex-shrink: 0;
  }
  .brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  #appTitle {
    color: #0F172A;
    font-size: 0.92rem !important;
    line-height: 1.15 !important;
    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.52rem !important;
    padding: 0 4px !important;
    border-radius: 4px;
  }
  .status-text {
    color: #64748B;
    font-size: 0.60rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
  }
  .brand-subtitle {
    display: flex;
    align-items: center;
    gap: 4px !important;
    margin-top: 0;
    min-width: 0;
    white-space: nowrap;
  }
  .admin-badge {
    display: inline-flex !important;
    font-size: 0.55rem !important;
    padding: 1px 5px !important;
    border-radius: 6px !important;
    vertical-align: middle !important;
  }

  .header-end {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
  }
  .header-end .pulse-dot {
    display: none !important;
  }
  .header-end .cart-header-btn:not(#cartBtn):not(#audioAlertBtn) {
    display: none !important;
  }
  #audioAlertBtn {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    color: #0F172A;
    border-radius: 8px !important;
  }
  #audioAlertBtn svg {
    width: 15px !important;
    height: 15px !important;
  }
  #cartBtn {
    height: 30px !important;
    padding: 0 10px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0F172A;
    color: #FFFFFF;
    border: none;
    border-radius: 8px !important;
    font-size: 0.75rem !important;
  }
  #cartBtn svg {
    width: 15px !important;
    height: 15px !important;
  }
  .cart-badge {
    border-color: #FFFFFF;
    font-size: 0.60rem !important;
    padding: 0 4px !important;
  }

  /* ── MAIN BODY & CONTROLS DOCK (LOCKED TOP SECTION) ── */
  .main-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0 6px !important;
    min-height: 0 !important;
    background: #F8FAFC !important;
  }
  .content-wrapper {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 0 !important;
    gap: 0 !important;
  }
  .sticky-filter-dock {
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 30 !important;
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 3px 0 2px !important;
    margin-bottom: 2px !important;
    gap: 3px !important;
    border-bottom: 1px solid rgba(203, 213, 225, 0.8);
    box-shadow: 0 2px 6px -2px rgba(15, 23, 42, 0.05);
    touch-action: pan-x !important;
  }
  .controls {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px !important;
    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: 0 8px !important;
    height: 34px !important;
    font-size: 0.74rem !important;
    font-weight: 600;
    border-radius: 8px !important;
    white-space: nowrap;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #1E293B;
  }
  #deepScanBtn .btn-icon {
    width: 13px !important;
    height: 13px !important;
  }
  .live-scan-toggle {
    flex: 0 0 auto;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !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 2px rgba(0,0,0,0.03);
    padding: 5px 10px 5px 30px !important;
    height: 34px !important;
    font-size: 0.80rem !important;
    font-weight: 500;
    border-radius: 8px !important;
  }
  .search-icon {
    width: 13px !important;
    height: 13px !important;
    left: 9px !important;
    color: #475569;
  }
  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);
  }

  /* ── FILTER TABS: Ultra-Compact Horizontal Scrollable Chips ── */
  .quick-tabs {
    gap: 4px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 1px 0 !important;
    scrollbar-width: none !important;
  }
  .quick-tabs::-webkit-scrollbar {
    display: none !important;
  }
  .q-tab {
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    color: #475569;
    box-shadow: none;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    transition: all 0.15s ease !important;
  }
  .q-tab:hover {
    background: #E2E8F0;
    color: #0F172A;
  }
  .q-tab:active {
    transform: scale(0.95) !important;
  }
  .q-tab.active {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%) !important;
    color: #FFFFFF !important;
    border-color: #0F172A !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2) !important;
  }

  /* ── STREAMLINED DROPDOWNS: Ultra-Compact ── */
  .filters-panel {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 1px 0 !important;
    gap: 4px !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
  }
  .panel-divider {
    display: none !important;
  }
  .sort-select, .size-select {
    padding: 2px 18px 2px 6px !important;
    height: 25px !important;
    font-size: 0.69rem !important;
    font-weight: 600 !important;
    color: #1E293B;
    border: 1px solid #CBD5E1;
    border-radius: 6px !important;
    background-color: #FFFFFF !important;
  }

  /* ── CATEGORY PILL GRID: 4-Column Non-Slider Grid (All 8 Visible at a Glance!) ── */
  .cat-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 3px !important;
    margin-bottom: 2px !important;
    padding: 1px 0 !important;
    overflow: visible !important;
  }
  .cat-card {
    height: 32px !important;
    padding: 2px 2px !important;
    border-radius: 6px !important;
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 1px !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease !important;
    animation: catCardSlide 0.25s ease backwards !important;
  }
  .cat-card:active {
    transform: scale(0.95) !important;
  }
  .cat-card.active {
    background: #0F172A !important;
    border-color: #0F172A !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25) !important;
  }
  .cat-content {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1px !important;
  }
  .cat-name {
    color: #1E293B !important;
    font-size: 0.54rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.2px;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.1;
    display: block !important;
    max-width: 100%;
    text-align: center !important;
  }
  .cat-card.active .cat-name {
    color: #F8FAFC !important;
  }
  .cat-badges {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 0 !important;
  }
  .cat-stock {
    font-size: 0.56rem !important;
    font-weight: 800 !important;
    color: #1D4ED8 !important;
    background: #EFF6FF !important;
    padding: 0 3px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 1px !important;
    line-height: 1.1;
  }
  .cat-stock .unit {
    font-size: 0.46rem !important;
    font-weight: 600 !important;
    color: #3B82F6 !important;
  }
  .cat-card.active .cat-stock {
    color: #38BDF8 !important;
    background: rgba(56, 189, 248, 0.25) !important;
  }
  .cat-card.active .cat-stock .unit {
    color: #BAE6FD !important;
  }
  .cat-models {
    display: none !important;
  }

  /* ── 3-COLUMN ULTRA-SLEEK MOBILE PRODUCT GRID (DEDICATED SCROLL CONTAINER) ── */
  .product-list {
    flex: 1 1 0% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-auto-rows: max-content !important;
    gap: 5px !important;
    margin-top: 2px !important;
    padding-bottom: calc(60px + max(env(safe-area-inset-bottom, 14px), 14px)) !important;
    min-height: 0 !important;
  }
  .product-card {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
    border-radius: 9px !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    height: auto !important;
    min-height: fit-content !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
  }
  .product-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06) !important;
    border-color: #CBD5E1 !important;
  }
  .product-card:active {
    transform: scale(0.97) !important;
  }
  .product-image {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-width: 100% !important;
    border-radius: 0 !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block !important;
    background: #F8FAFC !important;
    flex-shrink: 0 !important;
    border-bottom: 1px solid #F1F5F9 !important;
  }
  .product-info {
    padding: 5px 4px 6px 4px !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 0 auto !important;
    justify-content: space-between !important;
    gap: 2px !important;
    box-sizing: border-box !important;
  }
  .product-name {
    color: #0F172A !important;
    font-weight: 750 !important;
    font-size: 0.65rem !important;
    letter-spacing: -0.2px !important;
    line-height: 1.15 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: 2.3em !important;
  }
  .product-price {
    color: #D97706 !important;
    font-weight: 800 !important;
    font-size: 0.62rem !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .product-stock {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1.5px !important;
    margin: 1px 0 3px 0 !important;
    min-height: 14px !important;
  }
  .stock-size {
    font-size: 0.48rem !important;
    padding: 0 2px !important;
    border-radius: 3px !important;
    line-height: 1.1 !important;
    font-weight: 600 !important;
  }
  .stock-size.available {
    background: #DCFCE7 !important;
    border: 1px solid #BBF7D0 !important;
    color: #15803D !important;
    font-weight: 700 !important;
  }
  .stock-size.sold-out {
    background: #F8FAFC !important;
    border: 1px solid #E2E8F0 !important;
    color: #94A3B8 !important;
    font-weight: 500;
  }
  .stock-total {
    font-size: 0.52rem !important;
    padding: 0 3px !important;
    border-radius: 3px !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
  }
  .stock-total.has-stock {
    background: #DCFCE7 !important;
    color: #15803D !important;
    border: 1px solid #86EFAC !important;
  }
  .stock-total.no-stock {
    background: #FEE2E2 !important;
    color: #DC2626 !important;
    border: 1px solid #FECACA !important;
  }

  .product-card .product-info > div:last-child {
    display: flex !important;
    gap: 2px !important;
    width: 100% !important;
    margin-top: auto !important;
  }
  .btn-add-cart-card {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.60rem !important;
    border-radius: 5px !important;
    padding: 4px 2px !important;
    height: 23px !important;
    border: none !important;
    box-shadow: 0 1px 4px rgba(234, 88, 12, 0.25) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1.4 !important;
    user-select: none !important;
    white-space: nowrap !important;
  }
  .btn-target-war-card {
    padding: 4px 1px !important;
    height: 23px !important;
    font-size: 0.58rem !important;
    font-weight: 700 !important;
    color: #0284C7 !important;
    border: 1px solid #BAE6FD !important;
    background: #F0F9FF !important;
    border-radius: 5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    white-space: nowrap !important;
  }
  .btn-add-cart-card:active {
    transform: scale(0.95) !important;
  }

  /* ── FLUSH, SOLID NATIVE-STYLE MOBILE BOTTOM NAVIGATION BAR ── */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
    background: #FFFFFF !important;
    border-top: 1px solid #E2E8F0 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05) !important;
    padding-top: 5px !important;
    padding-bottom: max(env(safe-area-inset-bottom, 10px), 10px) !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    justify-content: space-around !important;
    align-items: flex-start !important;
    height: calc(50px + max(env(safe-area-inset-bottom, 10px), 10px)) !important;
    box-sizing: border-box !important;
  }
  html.dark .mobile-bottom-nav {
    background: #0F172A !important;
    border-top-color: #1E293B !important;
    box-shadow: 0 -3px 14px rgba(0, 0, 0, 0.3) !important;
  }
  .mobile-nav-item {
    flex: 1 !important;
    height: 42px !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: 2px !important;
    color: #64748B !important;
    font-size: 0.62rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    padding: 0 !important;
    position: relative !important;
    transition: all 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    text-decoration: none !important;
  }
  .mobile-nav-item::before {
    content: '' !important;
    position: absolute !important;
    top: -4px !important;
    left: 22% !important;
    right: 22% !important;
    height: 3px !important;
    background: transparent !important;
    border-radius: 0 0 3px 3px !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;
    font-weight: 700 !important;
  }
  .mobile-nav-item.active::before {
    background: #1877F2 !important;
  }
  html.dark .mobile-nav-item.active {
    color: #38BDF8 !important;
  }
  html.dark .mobile-nav-item.active::before {
    background: #38BDF8 !important;
  }
  .mobile-nav-item svg {
    width: 20px !important;
    height: 20px !important;
    stroke-width: 2.2 !important;
  }
  .mobile-nav-item.active svg {
    transform: translateY(-1px) scale(1.05) !important;
  }

  .footer {
    display: none !important;
  }

  /* Compact Floating War Timer Widget on Mobile */
  .floating-war-timer-widget {
    bottom: calc(56px + env(safe-area-inset-bottom, 8px)) !important;
    right: 8px !important;
    padding: 5px 10px !important;
    border-radius: 12px !important;
    transform: scale(0.85) !important;
    transform-origin: bottom right !important;
    max-width: 220px !important;
  }
  .floating-war-timer-mini {
    bottom: calc(56px + env(safe-area-inset-bottom, 8px)) !important;
    right: 8px !important;
    transform: scale(0.85) !important;
    transform-origin: bottom right !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;
}

/* ── TARGET WAR BUTTON & PAYMENT STATUS PILLS ── */
.btn-target-war-card {
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background 0.18s ease, border-color 0.18s ease !important;
}
.btn-target-war-card:hover {
  background: #E0F2FE !important;
  border-color: #38BDF8 !important;
  transform: translateY(-1px);
}
.btn-target-war-card:active {
  transform: scale(0.94) !important;
}

.pay-status-pill {
  transition: transform 0.18s ease, filter 0.18s ease;
  user-select: none;
}
.pay-status-pill:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.pay-status-pill:active {
  transform: scale(0.95);
}

/* ── FLOATING WAR TIMER & VOICE ALARM WIDGET ── */
.floating-war-timer-widget {
  position: fixed;
  bottom: calc(76px + env(safe-area-inset-bottom, 10px));
  right: 14px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 15px rgba(245, 158, 11, 0.2);
  border-radius: 16px;
  padding: 8px 12px;
  color: #FFFFFF;
  cursor: pointer;
  user-select: none;
  touch-action: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  max-width: 250px;
}

.floating-war-timer-widget:hover {
  transform: translateY(-2px);
  border-color: #F59E0B;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 0 22px rgba(245, 158, 11, 0.35);
}

.fwt-drag-handle {
  color: #64748B;
  font-size: 11px;
  cursor: grab;
  padding: 0 2px;
  opacity: 0.6;
}
.fwt-drag-handle:active {
  cursor: grabbing;
}

.fwt-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 10px #10B981;
  flex-shrink: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.fwt-main-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fwt-header-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
}

.fwt-badge-label {
  font-weight: 800;
  color: #F59E0B;
  letter-spacing: 0.5px;
}

.fwt-target-display {
  font-weight: 700;
  color: #94A3B8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.fwt-btn-sound-toggle {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  opacity: 0.85;
  transition: opacity 0.15s, transform 0.15s;
}
.fwt-btn-sound-toggle:hover {
  opacity: 1;
  transform: scale(1.15);
}

.fwt-timer-digits {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: #F8FAFC;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.fwt-digits-ms {
  font-size: 0.75rem;
  color: #F59E0B;
  opacity: 0.85;
  font-weight: 800;
}

.fwt-status-text {
  font-size: 0.6rem;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 155px;
  font-weight: 600;
}

.fwt-btn-minimize {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94A3B8;
  border-radius: 6px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  margin-left: 2px;
  transition: background 0.15s, color 0.15s;
}
.fwt-btn-minimize:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

/* Minimized Floating Pill */
.floating-war-timer-mini {
  position: fixed;
  bottom: calc(76px + env(safe-area-inset-bottom, 10px));
  right: 14px;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid #F59E0B;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 14px rgba(245, 158, 11, 0.3);
  border-radius: 9999px;
  padding: 6px 12px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  animation: fwtMiniGlow 2.5s infinite;
  transition: transform 0.18s ease;
}
.floating-war-timer-mini:hover {
  transform: scale(1.05);
}

@keyframes fwtMiniGlow {
  0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 10px rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 8px 28px rgba(0,0,0,0.45), 0 0 18px rgba(245, 158, 11, 0.6); }
}

/* Urgency States for Floating Widget */
.floating-war-timer-widget.state-warning {
  border-color: #EAB308;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 0 18px rgba(234, 179, 8, 0.35);
}
.floating-war-timer-widget.state-warning .fwt-status-indicator {
  background: #EAB308;
  box-shadow: 0 0 10px #EAB308;
}

.floating-war-timer-widget.state-alert {
  border-color: #F97316;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 20px rgba(249, 115, 22, 0.45);
}
.floating-war-timer-widget.state-alert .fwt-status-indicator {
  background: #F97316;
  box-shadow: 0 0 12px #F97316;
  animation: pulseIndicator 1s infinite alternate;
}

.floating-war-timer-widget.state-critical {
  border-color: #EF4444;
  box-shadow: 0 10px 32px rgba(0,0,0,0.45), 0 0 24px rgba(239, 68, 68, 0.6);
  animation: criticalVibrate 0.6s infinite alternate;
}
.floating-war-timer-widget.state-critical .fwt-status-indicator {
  background: #EF4444;
  box-shadow: 0 0 14px #EF4444;
}
.floating-war-timer-widget.state-critical .fwt-timer-digits {
  color: #FEF2F2;
  text-shadow: 0 0 14px rgba(239, 68, 68, 0.8);
}

.floating-war-timer-widget.state-fire {
  border-color: #10B981;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(6, 78, 59, 0.95));
  box-shadow: 0 12px 35px rgba(0,0,0,0.5), 0 0 26px rgba(16, 185, 129, 0.7);
  animation: fireRainbow 1.5s infinite;
}
.floating-war-timer-widget.state-fire .fwt-status-indicator {
  background: #10B981;
  box-shadow: 0 0 15px #10B981;
}

@keyframes pulseIndicator {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 1; }
}

@keyframes criticalVibrate {
  0% { transform: translateY(0); }
  50% { transform: translateY(-1.5px); }
  100% { transform: translateY(0); }
}

@keyframes fireRainbow {
  0% { border-color: #10B981; }
  50% { border-color: #F59E0B; }
  100% { border-color: #10B981; }
}

/* ── MODAL HERO DIGITAL WAR TIMER ── */
.war-timer-hero-card {
  background: linear-gradient(145deg, #0F172A, #1E293B);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  padding: 16px;
  color: #FFFFFF;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  position: relative;
  overflow: hidden;
}
.war-timer-hero-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.wthc-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.wthc-clock-sync {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #94A3B8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.wthc-clock-sync strong {
  color: #38BDF8;
}
.wthc-sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38BDF8;
  box-shadow: 0 0 8px #38BDF8;
  animation: radarBeacon 2s infinite;
}

.wthc-status-chip {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wthc-status-chip.standby {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.wthc-status-chip.warning {
  background: rgba(234, 179, 8, 0.2);
  color: #FBBF24;
  border: 1px solid rgba(234, 179, 8, 0.4);
}
.wthc-status-chip.alert {
  background: rgba(249, 115, 22, 0.2);
  color: #FB923C;
  border: 1px solid rgba(249, 115, 22, 0.4);
}
.wthc-status-chip.critical {
  background: rgba(239, 68, 68, 0.25);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.5);
  animation: pulseIndicator 0.8s infinite alternate;
}
.wthc-status-chip.fire {
  background: rgba(16, 185, 129, 0.3);
  color: #6EE7B7;
  border: 1px solid #10B981;
}

.wthc-countdown-box {
  text-align: center;
  padding: 10px 0 4px;
}
.wthc-countdown-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: #94A3B8;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.wthc-countdown-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -1px;
  color: #FFFFFF;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  line-height: 1;
}
.wthc-countdown-val .wthc-ms {
  font-size: 1.1rem;
  color: #F59E0B;
  opacity: 0.9;
}
.wthc-countdown-sub {
  font-size: 0.72rem;
  color: #CBD5E1;
  margin-top: 6px;
  font-weight: 600;
}
.wthc-countdown-sub span {
  color: #F59E0B;
  font-weight: 800;
}

/* Section styling in modal */
.wt-config-section {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}
.wt-section-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #334155;
  display: block;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.wt-preset-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wt-preset-btn {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.wt-preset-btn:hover {
  border-color: #F59E0B;
  color: #B45309;
  background: #FFFBEB;
}
.wt-preset-btn.active {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  border-color: #D97706;
  color: #FFFFFF;
  box-shadow: 0 3px 8px rgba(217, 119, 6, 0.3);
}

.wt-custom-input {
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #FFFFFF;
  color: #0F172A;
  outline: none;
}
.wt-custom-input:focus {
  border-color: #0284C7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

/* Voice modes */
.wt-voice-modes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.wt-voice-card {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.wt-voice-card:hover {
  border-color: #BAE6FD;
  background: #F0F9FF;
}
.wt-voice-card input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #0284C7;
  margin-right: 10px;
  cursor: pointer;
}
.wt-voice-card-body {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wt-vc-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.wt-vc-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0F172A;
}
.wt-vc-desc {
  font-size: 0.65rem;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

/* Toggle Switch */
.wt-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}
.wt-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.wt-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #CBD5E1;
  transition: .3s;
  border-radius: 22px;
}
.wt-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
.wt-switch input:checked + .wt-slider {
  background-color: #10B981;
}
.wt-switch input:checked + .wt-slider:before {
  transform: translateX(18px);
}

.wt-check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}
.wt-check-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #0284C7;
  margin-top: 2px;
}
.wt-check-text strong {
  font-size: 0.75rem;
  color: #0F172A;
  display: block;
}
.wt-check-text div {
  font-size: 0.65rem;
  color: #64748B;
}




/* ==========================================================================
   MOBILE FLUSH BOTTOM NAVBAR FIX
   Pastikan menempel pas di layar bawah tanpa floating / gap berlebih
   ========================================================================== */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
    background: #FFFFFF !important;
    border-top: 1px solid #E2E8F0 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05) !important;
    padding-top: 4px !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    justify-content: space-around !important;
    align-items: flex-start !important;
    height: calc(48px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
  }
}


/* ==========================================================================
   PERFECT RESPONSIVE MOBILE FIX:
   1. 2 Kolom Produk Presisi (Tidak terpotong ke samping)
   2. Gambar Produk Rasio Pas & Kepala Model Terlihat Jelas
   3. Info Produk & Tombol Kompak
   4. Menu Bar Bawah Pas Rata di Layar HP
   ========================================================================== */
@media (max-width: 768px) {
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .app-root, .main-body, .content-wrapper {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  .main-body {
    padding: 0 4px !important;
  }

  /* ── 2-COLUMN BALANCED PRODUCT GRID: Pas dengan Lebar Layar HP ── */
  .product-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: max-content !important;
    gap: 6px !important;
    padding: 2px 2px calc(52px + env(safe-area-inset-bottom, 0px)) 2px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .product-card {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  }

  /* Gambar 1:1 fokus atas (kepala terlihat) */
  .product-image {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    object-fit: cover !important;
    object-position: top center !important;
    border-bottom: 1px solid #F1F5F9 !important;
    display: block !important;
  }

  .product-info {
    padding: 6px 5px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    box-sizing: border-box !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .product-name {
    font-size: 0.72rem !important;
    font-weight: 750 !important;
    color: #0F172A !important;
    line-height: 1.2 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: 2.4em !important;
  }

  .product-price {
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    color: #D97706 !important;
    line-height: 1.1 !important;
  }

  .product-stock {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2px !important;
    margin: 2px 0 4px 0 !important;
  }

  .stock-total {
    font-size: 0.58rem !important;
    font-weight: 800 !important;
    padding: 1px 4px !important;
  }

  .stock-size {
    font-size: 0.52rem !important;
    padding: 1px 3px !important;
    border-radius: 3px !important;
  }

  .product-card .product-info > div:last-child {
    display: flex !important;
    gap: 3px !important;
    width: 100% !important;
    margin-top: auto !important;
  }

  .btn-add-cart-card {
    height: 26px !important;
    font-size: 0.66rem !important;
    font-weight: 800 !important;
    border-radius: 6px !important;
    flex: 1.3 !important;
  }

  .btn-target-war-card {
    height: 26px !important;
    font-size: 0.64rem !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    flex: 1 !important;
  }

  /* ── FLUSH BOTTOM NAVBAR PAS DI BAWAH LAYAR HP ── */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
    background: #FFFFFF !important;
    border-top: 1px solid #E2E8F0 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05) !important;
    padding-top: 4px !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    justify-content: space-around !important;
    align-items: flex-start !important;
    height: calc(48px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
  }

  .mobile-nav-item {
    flex: 1 !important;
    height: 42px !important;
  }
}


/* ==========================================================================
   SOLID FLUSH FULL-BOTTOM NAVBAR (Edge-to-Edge iPhone/Android)
   ========================================================================== */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    z-index: 99999 !important;
    background: #FFFFFF !important;
    border-top: 1px solid #E2E8F0 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05) !important;
    padding-top: 4px !important;
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 18px) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    justify-content: space-around !important;
    align-items: center !important;
    height: auto !important;
    min-height: calc(48px + max(env(safe-area-inset-bottom, 0px), 18px)) !important;
    box-sizing: border-box !important;
  }

  .mobile-nav-item {
    flex: 1 !important;
    height: 42px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .product-list {
    padding-bottom: calc(75px + max(env(safe-area-inset-bottom, 0px), 18px)) !important;
  }
}


/* ==========================================================================
/* ==========================================================================
   FINAL FIX: nav.mobile-bottom-nav is flush at the physical bottom of screen
   Works flawlessly in browser mode and iOS/Android Standalone PWA Mode
   ========================================================================== */
@media (max-width: 1024px) {
  nav.mobile-bottom-nav,
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    z-index: 999999 !important;
    background: #FFFFFF !important;
    border-top: 1.5px solid #E2E8F0 !important;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08) !important;
    box-sizing: border-box !important;
    justify-content: space-around !important;
    align-items: stretch !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 3px !important;
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 8px) !important;
    min-height: 54px !important;
    height: calc(54px + max(env(safe-area-inset-bottom, 0px), 8px)) !important;
    transform: none !important;
    -webkit-transform: none !important;
  }
  html.dark nav.mobile-bottom-nav,
  html.dark .mobile-bottom-nav {
    background: #0F172A !important;
    border-top-color: #1E293B !important;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.4) !important;
  }
  nav.mobile-bottom-nav .mobile-nav-item,
  nav.mobile-bottom-nav a.mobile-nav-item {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 2px !important;
    padding: 3px 2px 0 2px !important;
    margin: 0 !important;
    min-height: 46px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #64748B !important;
    font-size: 0.62rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  nav.mobile-bottom-nav .mobile-nav-item.active { color: #F59E0B !important; }
  nav.mobile-bottom-nav .mobile-nav-item:active { opacity: 0.7 !important; }
  .main-body, #productGrid, .product-list, section#results,
  .cart-items-list, #tabHome, #tabAnalitik, #tabHistory {
    padding-bottom: calc(64px + max(env(safe-area-inset-bottom, 0px), 12px)) !important;
  }
}

/* ── EXPLICIT PWA STANDALONE & FULLSCREEN MODE FIX ── */
html.is-pwa-standalone,
html.is-pwa-standalone body,
@media all and (display-mode: standalone),
@media all and (display-mode: fullscreen) {
  html, body {
    height: 100% !important;
    min-height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .app-root {
    height: 100% !important;
    min-height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    position: relative !important;
  }

  nav.mobile-bottom-nav,
  .mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 14px) !important;
    height: calc(54px + max(env(safe-area-inset-bottom, 0px), 14px)) !important;
    transform: none !important;
    -webkit-transform: none !important;
    z-index: 999999 !important;
  }
}
