/* =====================================================================
   APPGRADE STORE - MODERN DESIGN SYSTEM & TOKENS
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #0092FF;
  --primary-dark: #0070CC;
  --primary-light: #3EBCE4;
  --primary-gradient: linear-gradient(135deg, #0092FF 0%, #0066FF 100%);
  --accent-gradient: linear-gradient(135deg, #38BDF8 0%, #0284C7 100%);
  --hero-gradient: linear-gradient(145deg, #0F62FE 0%, #0092FF 60%, #38BDF8 100%);
  
  --bg-page: #F1F5F9;
  --bg-shell: #FFFFFF;
  --surface: #FFFFFF;
  --surface-alt: #F8FAFC;
  --surface-border: #E2E8F0;
  
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  
  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.1);
  --shadow-primary: 0 10px 25px rgba(0, 146, 255, 0.28);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
  color: var(--text-main);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  touch-action: manipulation;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 146, 255, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(56, 189, 248, 0.08) 0px, transparent 50%);
}

/* Responsive uncropped images */
img {
  max-width: 100%;
}

img:not(#qris-image) {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* App Container Shell (Fluid Mobile + Spacious Desktop) */
.app-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background: var(--bg-shell);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 90px; /* space for bottom nav on mobile */
  transition: max-width 0.3s ease;
}

@media (min-width: 768px) {
  .app-shell {
    max-width: 1180px;
    margin: 20px auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    border: 1px solid var(--surface-border);
    padding-bottom: 32px; /* no bottom nav on desktop */
    min-height: calc(100vh - 40px);
  }
}

/* Header Navbar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .app-header {
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    padding: 16px 28px;
  }
}

/* Desktop Navigation Menu */
.desktop-nav {
  display: none;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .desktop-nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .desktop-nav-link:hover {
    color: var(--primary);
    background: rgba(0, 146, 255, 0.06);
  }
  .desktop-nav-link.active {
    color: var(--primary);
    background: rgba(0, 146, 255, 0.1);
  }
  
  /* Hide bottom nav on desktop */
  .bottom-nav-bar {
    display: none !important;
  }
}

/* Modern Card */
.modern-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-md);
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modern-card.interactive:active {
  transform: scale(0.985);
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* Modern Buttons */
.btn-primary {
  background: var(--primary-gradient);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  width: 100%;
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(0, 146, 255, 0.2);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #002140;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 33, 64, 0.18);
  transition: transform 0.15s ease;
  text-decoration: none;
  width: 100%;
}

.btn-secondary:active:not(:disabled) {
  transform: scale(0.97);
}

/* Google Sign In Button */
.btn-google {
  background: #FFFFFF;
  color: #1F2937;
  border: 1.5px solid #E5E7EB;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-google:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-google:active {
  transform: scale(0.98);
  background: #F3F4F6;
}

.btn-google svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Back Button */
.btn-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--surface-border);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-back-pill:active {
  transform: scale(0.95);
  background: var(--surface-alt);
}

/* Modern Form Controls */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.input-icon-right {
  position: absolute;
  right: 14px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.input-icon-right:hover {
  color: var(--text-main);
}

.input-field {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--surface-alt);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.input-field.has-left-icon {
  padding-left: 48px;
}

.input-field.has-right-icon {
  padding-right: 48px;
}

.input-field:focus {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 146, 255, 0.12);
}

.input-field::placeholder {
  color: #94A3B8;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-primary {
  background: rgba(0, 146, 255, 0.1);
  color: var(--primary);
  border: 1px solid rgba(0, 146, 255, 0.2);
}

/* Modern Bottom Navigation Bar */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 74px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  padding: 0 10px;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #94A3B8;
  font-size: 11px;
  font-weight: 600;
  flex: 1;
  height: 100%;
  position: relative;
  transition: color 0.2s ease, transform 0.15s ease;
  user-select: none;
}

.bottom-nav-item svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.2;
  transition: stroke 0.2s ease, transform 0.2s ease;
  margin-bottom: 3px;
}

.bottom-nav-item:active {
  transform: scale(0.92);
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-item.active svg {
  stroke: var(--primary);
  transform: translateY(-2px);
}

.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  top: 6px;
  width: 18px;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* Floating Toast Notification */
#app-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  max-width: 90%;
  width: 380px;
  background: #1E293B;
  color: #FFFFFF;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

#app-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#app-toast.success {
  background: #065F46;
  border-left: 5px solid #34D399;
}

#app-toast.error {
  background: #991B1B;
  border-left: 5px solid #F87171;
}

#app-toast.info {
  background: #0369A1;
  border-left: 5px solid #38BDF8;
}

/* Shimmer Loading Skeleton */
.skeleton {
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s infinite;
  border-radius: var(--radius-md);
}

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

/* Micro Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* =====================================================================
   RESPONSIVE DESKTOP + MOBILE UTILITIES
   ===================================================================== */
.desktop-only {
  display: none !important;
}

@media (min-width: 768px) {
  .desktop-only {
    display: flex !important;
  }
  .mobile-only {
    display: none !important;
  }
  
  /* 2-Column Responsive Split */
  .desktop-row-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
  }

  /* Checkout Desktop Layout */
  .desktop-checkout-layout {
    display: grid !important;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: start;
  }

  /* Wide Home Layout */
  .desktop-home-hero {
    display: grid !important;
    grid-template-columns: 1.35fr 1fr;
    gap: 24px;
    align-items: start;
  }

  /* Pricelist Desktop Layout */
  .desktop-pricelist-layout {
    display: grid !important;
    grid-template-columns: 360px 1fr;
    gap: 28px;
    align-items: start;
    padding: 20px 24px 40px !important;
  }
  .desktop-pricelist-left {
    position: sticky;
    top: 84px;
  }

  /* Service / Support Desktop Layout */
  .desktop-service-layout {
    display: grid !important;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
    padding: 20px 24px 30px !important;
  }

  /* Profile / Akun Desktop Layout */
  .desktop-akun-layout {
    display: grid !important;
    grid-template-columns: 350px 1fr;
    gap: 28px;
    align-items: start;
    padding: 24px 28px 40px !important;
  }

  /* Product & Catalog Responsive Grids */
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
    gap: 20px !important;
  }
  .categories-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
  }
  .orders-responsive-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)) !important;
    gap: 18px !important;
  }
  .ranked-list-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
}

/* Animations & Badges */
.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}



