/* =============================================
   AUTOSTORE — main.css
   Premium SaaS Design System v2
   Full rewrite: refined dark theme, 8px grid,
   improved typography, animation, responsiveness
   ============================================= */

/* ---- GOOGLE FONTS (system fallback safe) ---- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

/* =============================================
   CSS VARIABLES / DESIGN TOKENS
   ============================================= */
:root {
  /* Brand Colors */
  --primary: #6C63FF;
  --primary-dark: #5A52D5;
  --primary-light: #8B85FF;
  --secondary: #FF6584;
  --accent: #43E97B;
  --accent2: #00D2FF;
  --accent3: #FFB347;

  /* Backgrounds */
  --bg:  #080917;
  --bg2: #0D0F24;
  --bg3: #131530;
  --bg4: #181A38;

  /* Cards */
  --card: rgba(255,255,255,0.035);
  --card-hover: rgba(255,255,255,0.07);
  --card-border: rgba(255,255,255,0.07);

  /* Borders */
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --border-hover: rgba(108,99,255,0.45);
  --border-focus: rgba(108,99,255,0.7);

  /* Text */
  --text: #EAECF8;
  --text-muted: #8B90B8;
  --text-dim: #555A7A;
  --text-on-primary: #ffffff;

  /* Status */
  --success: #3DD68C;
  --success-bg: rgba(61,214,140,0.12);
  --success-border: rgba(61,214,140,0.28);
  --warning: #FFB74D;
  --warning-bg: rgba(255,183,77,0.12);
  --warning-border: rgba(255,183,77,0.28);
  --danger: #FF5C5C;
  --danger-bg: rgba(255,92,92,0.12);
  --danger-border: rgba(255,92,92,0.28);
  --info: #40C4FF;
  --info-bg: rgba(64,196,255,0.12);
  --info-border: rgba(64,196,255,0.28);

  /* Spacing (8px grid) */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;
  --s12: 48px;
  --s16: 64px;

  /* Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow: 0 8px 32px rgba(0,0,0,0.45);
  --shadow-lg: 0 16px 56px rgba(0,0,0,0.55);
  --shadow-glow: 0 0 40px rgba(108,99,255,0.18);
  --shadow-glow-sm: 0 0 20px rgba(108,99,255,0.12);

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  --transition-fast: all 0.15s cubic-bezier(0.4,0,0.2,1);
  --transition-spring: all 0.35s cubic-bezier(0.34,1.56,0.64,1);

  /* Typography */
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* ---- CUSTOM SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: rgba(108,99,255,0.45); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---- SELECTION ---- */
::selection { background: rgba(108,99,255,0.3); color: var(--text); }

/* =============================================
   ANIMATED BACKGROUND BLOBS
   ============================================= */
.bg-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none !important;
  user-select: none !important;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.10;
  animation: blobFloat 14s ease-in-out infinite;
  pointer-events: none !important;
}

.blob-1 {
  width: 640px; height: 640px;
  background: radial-gradient(circle, var(--primary), transparent 70%);
  top: -220px; left: -120px;
  animation-delay: 0s;
}

.blob-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--secondary), transparent 70%);
  bottom: -120px; right: -80px;
  animation-delay: -5s;
}

.blob-3 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  top: 45%; left: 58%;
  animation-delay: -9s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  30%       { transform: translate(24px,-36px) scale(1.06); }
  65%       { transform: translate(-18px,22px) scale(0.94); }
}

/* =============================================
   PAGE WRAPPER + PAGE TRANSITION
   ============================================= */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  opacity: 0;
  animation: pageFadeIn 0.4s ease forwards;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mobile: no translateY to avoid Android focus bug */
@media (max-width: 768px) {
  .page-wrapper {
    animation: pageFadeInMobile 0.35s ease forwards;
  }
  @keyframes pageFadeInMobile {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 var(--s8);
  height: 64px;
  background: rgba(8,9,23,0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(108,99,255,0.1), 0 4px 24px rgba(0,0,0,0.35);
  gap: var(--s8);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--s2 + 2px);
  text-decoration: none;
  margin-right: auto;
  flex-shrink: 0;
}

.navbar-brand img {
  height: 34px;
  width: auto;
  border-radius: var(--radius-xs);
}

.brand-name {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #a5a1ff 0%, #4fd1f5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav links */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.navbar-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.navbar-nav a::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.25s ease;
}

.navbar-nav a:hover {
  color: var(--text);
  background: var(--card);
}

.navbar-nav a:hover::after { width: 55%; }

.navbar-nav a.active {
  color: var(--primary-light);
  background: rgba(108,99,255,0.1);
}

.navbar-nav a.active::after { width: 55%; }

/* Nav actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-shrink: 0;
}

/* Notification badge */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--secondary);
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: var(--radius-full);
}

/* Hamburger */
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hamburger:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(108,99,255,0.1);
}

/* Mobile nav */
@media (max-width: 768px) {
  .navbar {
    padding: 0 var(--s4);
    gap: var(--s3);
  }

  .hamburger { display: flex; }

  .navbar-nav {
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: rgba(11,12,28,0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(108,99,255,0.12);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 12px 14px;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), opacity 0.25s ease;
    z-index: 99;
    pointer-events: none;
  }

  .navbar-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .navbar-nav a {
    padding: 11px 14px;
    font-size: 0.92rem;
    border-radius: var(--radius-sm);
    width: 100%;
  }

  .navbar-actions {
    margin-left: auto;
    gap: 6px;
  }

  .navbar-actions .btn-sm {
    padding: 6px 10px;
    font-size: 0.78rem;
  }
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  outline: none;
  letter-spacing: 0.01em;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.18s;
  border-radius: inherit;
}

.btn:hover::before { background: rgba(255,255,255,0.07); }
.btn:active  { transform: scale(0.975); }
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(108,99,255,0.45); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; pointer-events: none; }

/* Primary */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 18px rgba(108,99,255,0.38);
}
.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(108,99,255,0.55);
  transform: translateY(-1px);
}

/* Secondary */
.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  background: var(--card-hover);
}

/* Success */
.btn-success {
  background: linear-gradient(135deg, #2ECC71, #27AE60);
  color: white;
  box-shadow: 0 4px 14px rgba(46,204,113,0.35);
}

/* Danger */
.btn-danger {
  background: linear-gradient(135deg, var(--danger), #C62828);
  color: white;
  box-shadow: 0 4px 14px rgba(255,92,92,0.3);
}

/* Sizes */
.btn-sm  { padding: 6px 14px; font-size: 0.8rem; border-radius: var(--radius-xs); }
.btn-lg  { padding: 14px 32px; font-size: 0.95rem; }
.btn-xl  { padding: 16px 40px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s6);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108,99,255,0.025), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card.hoverable:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.card.hoverable:hover::before { opacity: 1; }

/* Glass card */
.glass {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius);
}

/* Card shine effect */
.card-shine {
  position: absolute;
  top: -20px; right: -20px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.product-card:hover .card-shine,
.card.hoverable:hover .card-shine { opacity: 1; }

/* =============================================
   FORMS
   ============================================= */
.form-group {
  margin-bottom: var(--s5);
  position: relative;
  z-index: 5;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 11px 15px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font);
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  position: relative;
  z-index: 2;
  -webkit-user-select: text;
  user-select: text;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(108,99,255,0.12);
  appearance: none;
  -webkit-appearance: none;
}

.form-input:hover:not(:focus) {
  border-color: rgba(255,255,255,0.16);
}

.form-input:focus {
  border-color: var(--primary);
  background: rgba(108,99,255,0.07);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.18);
  z-index: 10;
}

.form-input::placeholder { color: var(--text-dim); }
.form-input.error { border-color: var(--danger); background: var(--danger-bg); }

textarea.form-input { resize: vertical; min-height: 80px; }

select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238B90B8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 36px;
}

/* Error message */
.form-error {
  color: var(--danger);
  font-size: 0.78rem;
  margin-top: 5px;
  display: none;
  font-weight: 500;
}
.form-error.show { display: block; }

/* Password wrapper */
.pwd-wrapper {
  position: relative;
}
.pwd-wrapper .form-input { padding-right: 46px; }
.toggle-pwd-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  z-index: 3;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}
.toggle-pwd-btn:hover { color: var(--primary-light); }

/* Mobile font-size fix (prevents iOS zoom) */
@media (max-width: 768px) {
  .form-input, input, textarea, select {
    font-size: 16px !important;
  }
}

/* =============================================
   BADGES
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid var(--danger-border); }
.badge-info    { background: var(--info-bg);    color: var(--info);    border: 1px solid var(--info-border); }
.badge-purple  {
  background: rgba(108,99,255,0.14);
  color: var(--primary-light);
  border: 1px solid rgba(108,99,255,0.28);
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
.toast-container {
  position: fixed;
  top: 76px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
  width: calc(100vw - 40px);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.03);
  pointer-events: all;
  animation: toastIn 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 0;
}

.toast.success::before { background: var(--success); }
.toast.error::before   { background: var(--danger); }
.toast.warning::before { background: var(--warning); }
.toast.info::before    { background: var(--info); }

.toast-icon { font-size: 1.05rem; margin-top: 1px; flex-shrink: 0; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 0.83rem; font-weight: 700; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-msg   { font-size: 0.8rem;  color: var(--text-muted); line-height: 1.4; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 2px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.toast-close:hover { color: var(--text); }
.toast.hide { animation: toastOut 0.22s ease forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(56px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); max-height: 100px; }
  to   { opacity: 0; transform: translateX(56px); max-height: 0; padding: 0; margin: 0; }
}

@media (max-width: 480px) {
  .toast-container { right: 12px; left: 12px; width: auto; top: 72px; }
}

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.show { opacity: 1; }

.modal-overlay.hidden {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--s8);
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(16px);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-overlay.show .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s6);
}

.modal-title { font-size: 1.15rem; font-weight: 800; }

.modal-close {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 0.9rem;
  touch-action: manipulation;
}

.modal-close:hover {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

@media (max-width: 480px) {
  .modal { padding: 20px 16px; border-radius: var(--radius); max-height: 96vh; }
  .modal-overlay {
    padding: 8px;
    align-items: flex-end;
  }
  .modal-overlay.show .modal {
    border-radius: var(--radius) var(--radius) 0 0;
  }
}

/* =============================================
   SKELETON LOADER
   ============================================= */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s ease infinite;
  border-radius: var(--radius-xs);
}

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

.skeleton-text  { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 22px; margin-bottom: 12px; width: 60%; }
.skeleton-card  { height: 200px; border-radius: var(--radius); }

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  padding: 96px var(--s8) 80px;
  text-align: center;
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.28);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: var(--s6);
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--s5);
  letter-spacing: -0.025em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent2) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto var(--s10);
  line-height: 1.75;
}

@media (max-width: 600px) {
  .hero { padding: 72px var(--s5) 56px; }
  .hero p { font-size: 0.95rem; }
}

/* =============================================
   LAYOUT
   ============================================= */
.container    { max-width: 1200px; margin: 0 auto; padding: 0 var(--s6); }
.container-sm { max-width: 640px;  margin: 0 auto; padding: 0 var(--s6); }
.container-md { max-width: 900px;  margin: 0 auto; padding: 0 var(--s6); }

@media (max-width: 600px) {
  .container, .container-sm, .container-md { padding: 0 var(--s4); }
}

/* Grid */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

@media (max-width: 600px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 380px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* =============================================
   SECTIONS
   ============================================= */
section { padding: 60px 0; }

@media (max-width: 600px) { section { padding: 40px 0; } }

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--s2);
  letter-spacing: -0.02em;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--s8);
  line-height: 1.6;
}

/* =============================================
   FEATURE CARDS
   ============================================= */
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px var(--s6);
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-sm);
}

.feature-icon  { font-size: 2rem; margin-bottom: var(--s4); display: block; }
.feature-title { font-size: 0.98rem; font-weight: 700; margin-bottom: var(--s2); }
.feature-desc  { font-size: 0.84rem; color: var(--text-muted); line-height: 1.65; }

/* =============================================
   PRODUCT CARDS
   ============================================= */
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s6);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108,99,255,0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow), 0 0 28px rgba(108,99,255,0.14);
}

.product-card:hover::before { opacity: 1; }

.product-icon  { font-size: 2.4rem; margin-bottom: 14px; display: block; }
.product-name  { font-size: 1.05rem; font-weight: 700; margin-bottom: 7px; }
.product-desc  { font-size: 0.83rem; color: var(--text-muted); line-height: 1.6; margin-bottom: var(--s4); }
.product-meta  { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 0.98rem; font-weight: 700; color: var(--primary-light); }
.product-stock { font-size: 0.75rem; color: var(--text-dim); }

@media (max-width: 480px) {
  .product-card { padding: 16px; }
  .product-icon { font-size: 2rem; }
}

/* =============================================
   VARIAN SELECTOR
   ============================================= */
.varian-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 12px;
}

@media (max-width: 480px) {
  .varian-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

.varian-card {
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  touch-action: manipulation;
}

.varian-card:hover {
  border-color: var(--primary);
  background: rgba(108,99,255,0.07);
}

.varian-card.selected {
  border-color: var(--primary);
  background: rgba(108,99,255,0.11);
  box-shadow: 0 0 0 1px rgba(108,99,255,0.3) inset;
}

.varian-card.selected::after {
  content: '✓';
  position: absolute;
  top: 7px; right: 9px;
  color: var(--primary-light);
  font-weight: 800;
  font-size: 0.85rem;
}

.varian-name     { font-weight: 700; font-size: 0.88rem; margin-bottom: 4px; }
.varian-price    { font-size: 1rem; font-weight: 800; color: var(--primary-light); }
.varian-original { font-size: 0.76rem; color: var(--text-dim); text-decoration: line-through; }
.varian-diskon   { font-size: 0.73rem; color: var(--success); font-weight: 700; }
.varian-stok     { font-size: 0.73rem; color: var(--text-dim); margin-top: 5px; }

/* =============================================
   INVOICE / PAYMENT
   ============================================= */
.qris-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--s6);
  background: white;
  border-radius: var(--radius);
  margin: var(--s4) 0;
}
.qris-container img { max-width: 240px; width: 100%; border-radius: 6px; }

@media (max-width: 480px) {
  .qris-container img { max-width: 200px; }
}

/* Countdown ring */
.countdown-ring { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.countdown-svg  { transform: rotate(-90deg); }
.countdown-bg   { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 4.5; }
.countdown-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 4.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}
.countdown-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-light);
  font-family: var(--font-mono);
}

/* =============================================
   STEPPER
   ============================================= */
.stepper {
  display: flex;
  align-items: center;
  margin-bottom: var(--s8);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700;
  border: 2px solid var(--border);
  color: var(--text-dim);
  background: var(--bg2);
  transition: var(--transition);
  z-index: 1;
}

.step.active .step-circle {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(108,99,255,0.14);
  box-shadow: 0 0 0 4px rgba(108,99,255,0.12);
}

.step.done .step-circle {
  border-color: var(--success);
  color: var(--success);
  background: var(--success-bg);
}

.step-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 6px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}

.step.active .step-label { color: var(--primary-light); }
.step.done  .step-label  { color: var(--success); }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 -1px;
  margin-bottom: 22px;
  transition: background 0.4s;
}
.step-line.done { background: var(--success); }

@media (max-width: 480px) {
  .stepper { margin-bottom: var(--s6); }
  .step-circle { width: 28px; height: 28px; font-size: 0.72rem; }
  .step-label  { font-size: 0.62rem; }
}

/* =============================================
   DASHBOARD / PROFILE
   ============================================= */
.profile-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(108,99,255,0.4);
}

.profile-info { flex: 1; }
.profile-name { font-size: 1.05rem; font-weight: 800; }
.profile-username { font-size: 0.83rem; color: var(--text-muted); margin-top: 2px; }

/* Stat cards */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s5);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: rgba(108,99,255,0.22);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm), var(--shadow-glow-sm);
}

.stat-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 2px; font-weight: 600; letter-spacing: 0.02em; }
.stat-value { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }

@media (max-width: 600px) {
  .stat-card  { padding: 14px; gap: 10px; }
  .stat-value { font-size: 1.1rem; }
  .stat-icon  { width: 38px; height: 38px; font-size: 1rem; border-radius: 10px; }
}

/* =============================================
   NOTIFICATIONS
   ============================================= */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: var(--transition);
}

.notif-item.unread {
  border-color: rgba(108,99,255,0.28);
  background: rgba(108,99,255,0.055);
}

.notif-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 7px;
}
.notif-dot.read { background: var(--text-dim); }
.notif-msg  { font-size: 0.86rem; line-height: 1.5; }
.notif-time { font-size: 0.73rem; color: var(--text-dim); margin-top: 4px; }

/* =============================================
   TABLE
   ============================================= */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

table { width: 100%; border-collapse: collapse; }

thead { background: rgba(255,255,255,0.025); }

th {
  padding: 11px 15px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: left;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 13px 15px;
  font-size: 0.86rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(255,255,255,0.02); }

@media (max-width: 768px) {
  th, td { padding: 10px 12px; font-size: 0.8rem; }
  thead th {
    position: sticky;
    top: 0;
    background: var(--bg2);
    z-index: 2;
  }
}

/* =============================================
   TABS
   ============================================= */
.tabs {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: rgba(255,255,255,0.035);
  border-radius: var(--radius-sm);
  width: fit-content;
  max-width: 100%;
  margin-bottom: var(--s6);
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 8px 17px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
  white-space: nowrap;
  flex-shrink: 0;
  scroll-snap-align: start;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 12px rgba(108,99,255,0.42);
}

.tab-content { display: none; }
.tab-content.active {
  display: block;
  animation: pageFadeIn 0.22s ease;
}

/* Admin tabs */
.admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-bottom: var(--s6);
}
.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tabs .tab-btn {
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 0.83rem;
  color: var(--text-muted);
}

.admin-tabs .tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 14px rgba(108,99,255,0.42);
}

/* =============================================
   AUTH PAGES
   ============================================= */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s6);
  position: relative;
  z-index: 1;
}

.auth-card {
  background: rgba(13,15,36,0.97);
  border: 1px solid rgba(108,99,255,0.14);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(108,99,255,0.06);
}

.auth-logo { text-align: center; margin-bottom: var(--s8); }
.auth-logo img { height: 46px; margin-bottom: 10px; }
.auth-logo h1 { font-size: 1.38rem; font-weight: 800; letter-spacing: -0.02em; }
.auth-logo p  { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

.auth-divider {
  text-align: center;
  margin: 20px 0;
  color: var(--text-dim);
  font-size: 0.8rem;
  position: relative;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; border-radius: var(--radius); }
  .auth-page { padding: 16px; align-items: flex-start; padding-top: 36px; }
}

/* =============================================
   FLOATING CHAT / FAB
   ============================================= */
.floating-actions {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.fab {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: var(--transition-spring);
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.fab:hover { transform: scale(1.1); }
.fab:active { transform: scale(0.96); }

.fab-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; }
.fab-wa { background: #25D366; color: white; }
.fab-tg { background: #229ED9; color: white; }

.fab-wrapper { display: flex; align-items: center; gap: 10px; }

.fab-label {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: var(--transition);
}

.fab-wrapper:hover .fab-label { opacity: 1; transform: translateX(0); }

.chat-popup {
  background: var(--bg2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 230px;
  box-shadow: var(--shadow);
  display: none;
}

.chat-popup.show {
  display: block;
  animation: toastIn 0.28s ease;
}

.chat-popup-title { font-size: 0.88rem; font-weight: 700; margin-bottom: 12px; color: var(--text-muted); }

.chat-option {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 7px;
  transition: var(--transition);
  touch-action: manipulation;
}

.chat-option:hover {
  border-color: var(--primary);
  background: var(--card-hover);
  color: var(--primary-light);
}

@media (max-width: 480px) {
  .floating-actions { bottom: 16px; right: 14px; }
  .chat-popup { min-width: 200px; }
}

/* =============================================
   SUCCESS PAGE
   ============================================= */
.success-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 2px solid var(--success-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto var(--s6);
  animation: successPop 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes successPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* =============================================
   404 PAGE
   ============================================= */
.page-404-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--s6);
}

.page-404-inner { text-align: center; max-width: 480px; }

.page-404-icon {
  font-size: 3.8rem;
  display: block;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 24px rgba(108,99,255,0.45));
  animation: float404 3s ease-in-out infinite;
}

@keyframes float404 {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.page-404-number {
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-light), var(--accent2), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 4px;
  display: block;
}

.page-404-title { font-size: 1.55rem; font-weight: 800; margin-bottom: 10px; }
.page-404-desc  { color: var(--text-muted); margin-bottom: 36px; line-height: 1.65; }
.page-404-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* =============================================
   SEARCH BAR
   ============================================= */
.search-bar { position: relative; }
.search-bar .form-input { padding-left: 40px; }
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 600px) {
  .search-bar { width: 100% !important; }
}

/* =============================================
   COPY BUTTON
   ============================================= */
.copy-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-family: var(--font);
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  touch-action: manipulation;
}
.copy-btn:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(108,99,255,0.08);
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: var(--s6); }
.page-btn {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.83rem;
  font-family: var(--font);
  font-weight: 600;
  transition: var(--transition);
  touch-action: manipulation;
}
.page-btn:hover,
.page-btn.active {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(108,99,255,0.11);
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-dim);
}
.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: var(--s4);
  opacity: 0.38;
  display: block;
}
.empty-state p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =============================================
   STOK STATUS
   ============================================= */
.stok-low   { color: var(--warning); }
.stok-empty { color: var(--danger); }
.stok-ok    { color: var(--success); }

/* Stok item row */
.stok-item-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}
.stok-item-row:hover { border-color: rgba(108,99,255,0.2); }

/* =============================================
   MISC LAYOUT HELPERS
   ============================================= */
.divider { height: 1px; background: var(--border); margin: var(--s5) 0; }

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .checkout-layout { grid-template-columns: 1fr; }
}

.order-summary { position: sticky; top: 80px; }

.dashboard-sidebar { padding: var(--s6) 0; }

.sidebar-menu { list-style: none; }
.sidebar-menu li a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
  margin-bottom: 3px;
}
.sidebar-menu li a:hover { background: var(--card-hover); color: var(--text); }
.sidebar-menu li a.active { background: rgba(108,99,255,0.14); color: var(--primary-light); }

/* =============================================
   UTILITY CLASSES
   ============================================= */
.mt-4  { margin-top: var(--s4) !important; }
.mt-6  { margin-top: var(--s6) !important; }
.mt-8  { margin-top: var(--s8) !important; }
.mb-4  { margin-bottom: var(--s4) !important; }
.mb-6  { margin-bottom: var(--s6) !important; }
.gap-3 { gap: var(--s3); }
.gap-4 { gap: var(--s4); }

.flex           { display: flex; }
.flex-col       { flex-direction: column; }
.items-center   { align-items: center; }
.items-start    { align-items: flex-start; }
.justify-between{ justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center    { text-align: center; }
.text-right     { text-align: right; }
.text-sm        { font-size: 0.84rem; }
.text-xs        { font-size: 0.73rem; }
.text-muted     { color: var(--text-muted); }
.text-dim       { color: var(--text-dim); }
.text-primary   { color: var(--primary-light); }
.text-success   { color: var(--success); }
.text-danger    { color: var(--danger); }
.text-warning   { color: var(--warning); }
.font-bold      { font-weight: 700; }
.font-black     { font-weight: 800; }
.font-mono      { font-family: var(--font-mono); }
.w-full         { width: 100%; }
.hidden         { display: none !important; }
.truncate       { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rounded        { border-radius: var(--radius); }
.p-4            { padding: var(--s4); }
.p-6            { padding: var(--s6); }
.opacity-50     { opacity: 0.5; }
