/* =========================================================
   Babyiel Store - Fresh Modern Design (Gen-Z aesthetic)
   ========================================================= */

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

:root {
  --brand-purple: #7c3aed; --brand-purple-light: #a855f7; --brand-pink: #ec4899;
  --brand-blue: #3b82f6; --brand-cyan: #06b6d4; --brand-yellow: #f59e0b;
  --brand-green: #10b981; --brand-red: #ef4444; --brand-orange: #f97316;
  --bg-main: #f0f2ff; --bg-card: #ffffff; --bg-sidebar: #ffffff;
  --bg-modal: #ffffff; --bg-input: #f8f9fe; --bg-card-hover: #f8f9ff;
  --border-subtle: #e8eaf6; --border-focus: rgba(124,58,237,0.4); --border-light: #dde1f5;
  --primary: #7c3aed; --primary-hover: #6d28d9; --primary-light: rgba(124,58,237,0.1);
  --ready-color: #10b981; --ready-bg: rgba(16,185,129,0.1); --ready-border: rgba(16,185,129,0.25);
  --sold-color: #ef4444; --sold-bg: rgba(239,68,68,0.1); --sold-border: rgba(239,68,68,0.25);
  --text-main: #1e1b4b; --text-muted: #6b7280; --text-dim: #9ca3af;
  --sidebar-width: 260px; --header-height: 70px;
  --radius-sm: 10px; --radius-md: 14px; --radius-lg: 20px; --radius-xl: 28px; --radius-full: 9999px;
  --shadow-card: 0 4px 16px rgba(0,0,0,0.06); --shadow-md: 0 8px 24px rgba(124,58,237,0.12);
  --shadow-lg: 0 16px 40px rgba(124,58,237,0.18);
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Plus Jakarta Sans','Nunito',sans-serif; background-color: var(--bg-main); color: var(--text-main); min-height: 100vh; overflow-x: hidden; }
::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c4b5fd; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
a { text-decoration: none; color: inherit; }

/* ====== STOREFRONT PUBLIC PAGE ====== */
/* ====== STOREFRONT PUBLIC PAGE ====== */
#storefront-screen { display: none; min-height: 100vh; background: linear-gradient(135deg, #1e1b4b 0%, #31103f 50%, #111827 100%); font-family: 'Nunito',sans-serif; color: #fff; }
#storefront-screen.active { display: block; }

.storefront-ticker-bar { background: linear-gradient(90deg, #7c3aed, #ec4899, #f59e0b, #7c3aed); background-size: 200% 100%; animation: bgFlow 6s ease infinite; color: #fff; font-size: 0.75rem; font-weight: 800; padding: 0.35rem 1rem; overflow: hidden; white-space: nowrap; border-bottom: 1px solid rgba(255,255,255,0.2); }
.ticker-text { display: inline-block; animation: tickerMove 25s linear infinite; }
@keyframes tickerMove { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes bgFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.storefront-nav-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1.5rem; position: sticky; top: 0; z-index: 10; background: rgba(15,23,42,0.7); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.1); flex-wrap: wrap; gap: 0.5rem; }
.storefront-brand-name { font-family: 'Nunito',sans-serif; font-size: 1.15rem; font-weight: 900; color: #fff; text-shadow: 0 0 12px rgba(255,255,255,0.3); }
.storefront-login-btn { display: inline-flex; align-items: center; gap: 0.4rem; background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink)); border: 1.5px solid rgba(255,255,255,0.3); border-radius: var(--radius-full); padding: 0.42rem 1.1rem; font-size: 0.82rem; font-weight: 800; color: #fff; cursor: pointer; transition: all 0.25s ease; box-shadow: 0 4px 16px rgba(124,58,237,0.4); text-decoration: none; }
.storefront-login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124,58,237,0.6); }

.storefront-hero { text-align: center; padding: 2.2rem 1.25rem 1.8rem; }
.storefront-hero-badge { display: inline-flex; align-items: center; gap: 0.4rem; background: rgba(124,58,237,0.3); border: 1.5px solid rgba(192,132,252,0.4); border-radius: var(--radius-full); padding: 0.32rem 0.95rem; font-size: 0.72rem; color: #e9d5ff; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.85rem; }
.storefront-title { font-family: 'Nunito',sans-serif; font-size: clamp(2rem,6vw,3.2rem); font-weight: 900; color: #fff; line-height: 1.1; margin-bottom: 0.5rem; text-shadow: 0 4px 24px rgba(124,58,237,0.4); }
.storefront-title span { color: #fde68a; }
.storefront-subtitle { font-size: 0.95rem; color: rgba(255,255,255,0.85); font-weight: 600; margin-bottom: 1.25rem; }
.storefront-contact-bar { display: flex; align-items: center; justify-content: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.storefront-contact-item { display: inline-flex; align-items: center; gap: 0.45rem; background: rgba(255,255,255,0.08); border: 1.5px solid rgba(255,255,255,0.2); border-radius: var(--radius-full); padding: 0.45rem 1.1rem; font-size: 0.85rem; font-weight: 700; color: #fff; transition: all 0.2s ease; cursor: pointer; backdrop-filter: blur(6px); }
.storefront-contact-item:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }
.storefront-contact-item.wa { background: rgba(37,211,102,0.25); border-color: rgba(37,211,102,0.5); }

/* RESELLER HERO CARD */
.reseller-hero-card { background: linear-gradient(135deg, rgba(236,72,153,0.25), rgba(124,58,237,0.3)); border: 2px solid rgba(255,255,255,0.25); backdrop-filter: blur(12px); border-radius: var(--radius-xl); padding: 1.25rem 1.5rem; margin: 1.5rem auto 0; max-width: 820px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; box-shadow: 0 16px 40px rgba(0,0,0,0.35); text-align: left; }
.reseller-badge { display: inline-block; font-size: 0.68rem; font-weight: 900; color: #fde68a; letter-spacing: 0.08em; margin-bottom: 0.25rem; }
.reseller-hero-content h2 { font-family: 'Nunito',sans-serif; font-size: 1.15rem; font-weight: 900; color: #fff; margin-bottom: 0.2rem; }
.reseller-hero-content p { font-size: 0.8rem; color: rgba(255,255,255,0.85); font-weight: 500; }
.reseller-hero-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: #25d366; color: #fff; font-size: 0.88rem; font-weight: 800; padding: 0.65rem 1.25rem; border-radius: var(--radius-full); box-shadow: 0 4px 16px rgba(37,211,102,0.4); text-decoration: none; transition: all 0.25s ease; white-space: nowrap; }
.reseller-hero-btn:hover { background: #1da851; transform: translateY(-2px) scale(1.03); box-shadow: 0 8px 24px rgba(37,211,102,0.6); }

.storefront-products-section { padding: 0 2rem 3.5rem; max-width: 100%; margin: 0 auto; }
.storefront-controls-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.storefront-section-title { font-family: 'Nunito',sans-serif; font-size: 1.3rem; font-weight: 900; color: #fff; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0; }
.storefront-search-box { position: relative; flex: 1; max-width: 360px; min-width: 240px; }
.storefront-search-box i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.storefront-search-box input { width: 100%; padding: 0.6rem 1rem 0.6rem 2.6rem; background: rgba(0,0,0,0.35); border: 1.5px solid rgba(255,255,255,0.22); border-radius: var(--radius-full); color: #fff; font-size: 0.85rem; font-family: inherit; transition: all 0.25s ease; backdrop-filter: blur(8px); }
.storefront-search-box input:focus { outline: none; border-color: var(--brand-pink); box-shadow: 0 0 16px rgba(236,72,153,0.3); background: rgba(0,0,0,0.5); }
.storefront-search-box input::placeholder { color: rgba(255,255,255,0.5); }

/* Hero CTA Buttons */
.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-decoration: none;
}
.hero-cta-btn.primary {
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink));
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}
.hero-cta-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.6);
}
.hero-cta-btn.wa {
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}
.hero-cta-btn.wa:hover {
  background: #1da851;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.6);
}

/* =========================================================
   1. FEATURED BESTSELLERS SECTION (PRODUK TERLARIS)
   ========================================================= */
.storefront-bestsellers-section {
  padding: 2.5rem 2rem 1.5rem;
  max-width: 1320px;
  margin: 0 auto;
}

.bestsellers-header-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 1rem;
}

.bestseller-badge-header {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.4rem;
}

.bestseller-title-header {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.02em;
}

.bestseller-subtitle-header {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0;
  font-weight: 500;
}

.storefront-section-tag {
  font-size: 0.75rem;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  font-weight: 800;
}

.storefront-bestsellers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.35rem;
}

@media (max-width: 1199px) {
  .storefront-bestsellers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 599px) {
  .storefront-bestsellers-grid {
    grid-template-columns: 1fr;
  }
  .storefront-bestsellers-section {
    padding: 1.5rem 1rem;
  }
}

/* Curated Bestsellers Featured Card */
.bestseller-card-featured {
  background: #14172b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.1rem;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.bestseller-card-featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-accent, #f59e0b);
  opacity: 0.85;
}

.bestseller-card-featured:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--brand-accent, #f59e0b);
  background: #181c35;
}

.bestseller-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.bestseller-app-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}
.bestseller-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.bestseller-tag-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.35);
  letter-spacing: 0.03em;
}

.bestseller-card-body {
  margin-top: 0.15rem;
}

.bestseller-card-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.bestseller-benefit-line {
  font-size: 0.76rem;
  color: #cbd5e1;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.bestseller-price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 17, 35, 0.75);
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bestseller-price-sub {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bestseller-price-val {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fef08a;
}

.bestseller-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.bestseller-cta-btn:hover {
  background: linear-gradient(135deg, #6d28d9, #4338ca);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.5);
}

/* =========================================================
   NEW MODERN DIGITAL MARKETPLACE CATALOG STYLING
   ========================================================= */

/* Catalog Section Header */
.catalog-section-header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.catalog-header-text {
  text-align: left;
}

.catalog-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.25);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.catalog-header-title {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem 0;
}

.catalog-header-subtitle {
  font-size: 0.9rem;
  color: #94a3b8;
  font-weight: 500;
  margin: 0;
}

.catalog-controls-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Category Filter Pills */
.storefront-category-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0;
  scrollbar-width: none;
}
.storefront-category-pills::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.cat-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}
.cat-pill.active {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

/* Modern Search Box */
.storefront-search-box {
  position: relative;
  flex: 1;
  max-width: 380px;
  min-width: 260px;
}
.storefront-search-box .search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}
.storefront-search-box input {
  width: 100%;
  padding: 0.65rem 1.1rem 0.65rem 2.8rem;
  background: rgba(15, 17, 35, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: 0.85rem;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.storefront-search-box input:focus {
  outline: none;
  border-color: #8b5cf6;
  background: rgba(15, 17, 35, 0.95);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}
.storefront-search-box input:focus + .search-icon,
.storefront-search-box input:focus ~ .search-icon {
  color: #8b5cf6;
}
.storefront-search-box input::placeholder {
  color: #64748b;
}

/* Product Listing Section & Grid */
.storefront-products-section {
  padding: 0 2rem 4rem;
  max-width: 1320px;
  margin: 0 auto;
}

.storefront-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.35rem;
}

@media (max-width: 1199px) {
  .storefront-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 899px) {
  .storefront-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}
@media (max-width: 599px) {
  .storefront-grid {
    grid-template-columns: 1fr;
  }
  .storefront-products-section {
    padding: 0 1rem 3rem;
  }
}

/* Modern Clean Product Card */
.storefront-compact-card {
  background: #14172b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.storefront-compact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border-color: rgba(139, 92, 246, 0.35);
  background: #181c35;
}

.catalog-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.catalog-app-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}
.catalog-app-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.storefront-compact-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.25);
  white-space: nowrap;
}

.catalog-card-info {
  margin-top: 0.25rem;
}

.catalog-card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.catalog-card-garansi {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.catalog-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 17, 35, 0.6);
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.catalog-price-label {
  font-size: 0.68rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.storefront-compact-price {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f1f5f9;
}

.catalog-stock-status {
  color: #10b981;
  font-weight: 700;
  font-size: 0.73rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.storefront-view-pkg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.7rem;
  border-radius: 10px;
  background: #7c3aed;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
}
.storefront-view-pkg-btn:hover {
  background: #6d28d9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

/* Why Choose Us Section */
.storefront-why-section {
  padding: 3rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}
.storefront-why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.why-card {
  background: rgba(20, 24, 45, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  text-align: center;
  transition: all 0.3s ease;
}
.why-card:hover {
  transform: translateY(-4px);
  border-color: rgba(192, 132, 252, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.why-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  margin: 0 auto 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.why-card h3 {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 0.35rem;
}
.why-card p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* Package Modal Selection Item */
#modal-catalog-packages .modal-backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
}

.catalog-modal-container {
  max-width: 520px;
  border-radius: 20px;
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.catalog-modal-header {
  border-bottom: 1px solid #f1f5f9;
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.catalog-modal-header .modal-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #0f172a !important;
}

.catalog-modal-close {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-radius: 10px;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.catalog-modal-close:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.catalog-modal-body {
  padding: 1.5rem;
  background: #ffffff !important;
}

.catalog-modal-pkg-header {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pkg-section-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 0.06em;
}

.pkg-section-sub {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.15rem;
  font-weight: 500;
}

.catalog-garansi-badge {
  color: #15803d !important;
  font-weight: 700;
  background: #dcfce7 !important;
  border: 1px solid #bbf7d0 !important;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  white-space: nowrap;
}

.catalog-packages-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 1.35rem;
  padding-right: 0.2rem;
}

/* Package Option Item - Light High Contrast */
.package-item-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 14px;
  padding: 1rem 1.15rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.package-item-option:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

.package-item-option.selected {
  background: #f3e8ff !important;
  border: 2px solid #7c3aed !important;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.12) !important;
}

.package-item-option .pkg-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f172a !important;
}

.package-item-option .pkg-category {
  font-size: 0.78rem;
  color: #64748b !important;
  font-weight: 500;
  margin-top: 0.2rem;
}

.package-item-option .pkg-price {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: #0f172a !important;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.package-item-option.selected .pkg-price {
  color: #6d28d9 !important;
}
.storefront-footer { text-align: center; padding: 2rem 1.5rem; background: rgba(0,0,0,0.3); color: rgba(255,255,255,0.75); font-size: 0.85rem; font-weight: 600; border-top: 1px solid rgba(255,255,255,0.1); }
.storefront-footer .highlight { color: #fde68a; font-weight: 900; }
.wa-float { position: fixed; bottom: 1.5rem; right: 1.5rem; width: 56px; height: 56px; background: #25d366; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.6rem; box-shadow: 0 6px 24px rgba(37,211,102,0.5); cursor: pointer; z-index: 999; transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1); text-decoration: none; }
.wa-float:hover { transform: scale(1.15) rotate(-8deg); }
.wa-float-pulse { position: absolute; width: 100%; height: 100%; border-radius: 50%; background: #25d366; animation: waPulse 2s infinite; z-index: -1; }
@keyframes waPulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.8); opacity: 0; } }

/* ====== MODAL TAB BAR ====== */
.modal-tab-bar {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1.5px solid var(--border-subtle);
  padding: 0.4rem 1rem 0;
  gap: 0.5rem;
}
.modal-tab-btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 800;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  font-family: inherit;
}
.modal-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #fff;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.modal-tab-content {
  display: none;
}
.modal-tab-content.active {
  display: block;
}

/* ====== MASTER PRODUK PREVIEW ====== */
.product-template-preview {
  font-size: 0.78rem;
  color: #1e293b; /* Dark sharp font color, NOT white */
  line-height: 1.5;
  max-height: 140px;
  overflow-y: auto;
  font-family: 'Plus Jakarta Sans', monospace;
  white-space: pre-wrap;
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid #e2e8f0;
  font-weight: 600;
}



/* ====== LOGIN SCREEN ====== */
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); padding: 1.5rem; position: relative; overflow: hidden; }
.login-wrapper::before { content: ''; position: absolute; top: -100px; left: -100px; width: 400px; height: 400px; border-radius: 50%; background: rgba(255,255,255,0.06); pointer-events: none; }
.login-wrapper::after { content: ''; position: absolute; bottom: -80px; right: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,0.04); pointer-events: none; }
.login-card { background: #fff; border-radius: var(--radius-xl); padding: 2.5rem; width: 100%; max-width: 400px; box-shadow: 0 24px 64px rgba(0,0,0,0.2); animation: slideUp 0.5s cubic-bezier(0.34,1.56,0.64,1); position: relative; z-index: 1; }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.login-header { text-align: center; margin-bottom: 2rem; }
.login-logo { width: 64px; height: 64px; background: linear-gradient(135deg, #7c3aed, #a855f7); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 1.75rem; color: #fff; margin: 0 auto 1rem; box-shadow: 0 8px 24px rgba(124,58,237,0.4); }
.login-title { font-family: 'Nunito',sans-serif; font-size: 1.7rem; font-weight: 900; color: var(--text-main); margin-bottom: 0.25rem; }
.login-subtitle { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; }
.login-view-store { display: flex; align-items: center; justify-content: center; gap: 0.4rem; width: 100%; padding: 0.65rem; border-radius: var(--radius-md); background: rgba(124,58,237,0.07); color: var(--primary); font-size: 0.85rem; font-weight: 700; cursor: pointer; border: 1.5px dashed rgba(124,58,237,0.3); transition: all 0.2s ease; margin-top: 0.75rem; font-family: inherit; }
.login-view-store:hover { background: rgba(124,58,237,0.14); border-color: var(--primary); }

/* ====== FORM COMPONENTS ====== */
.form-group { margin-bottom: 1.15rem; position: relative; }
.form-label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.4rem; }
.input-icon-wrapper { position: relative; }
.input-icon-wrapper i { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: 0.9rem; transition: color 0.2s ease; pointer-events: none; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 0.75rem 1rem 0.75rem 2.75rem; background: var(--bg-input); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-md); color: var(--text-main); font-family: inherit; font-size: 0.9rem; transition: all 0.25s ease; }
.form-input.no-icon, .form-select.no-icon, .form-textarea.no-icon { padding-left: 1rem; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.12); background: #fff; }
.form-input:focus + i, .input-icon-wrapper:focus-within i { color: var(--primary); }

/* ====== BUTTONS ====== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.68rem 1.4rem; font-family: 'Nunito','Plus Jakarta Sans',sans-serif; font-size: 0.88rem; font-weight: 800; border-radius: var(--radius-md); border: none; cursor: pointer; transition: all 0.25s cubic-bezier(0.4,0,0.2,1); white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink)); color: #fff; box-shadow: 0 4px 14px rgba(124,58,237,0.35); }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(124,58,237,0.5); transform: translateY(-2px); }
.btn-secondary { background: #f3f4f6; color: var(--text-main); border: 1.5px solid var(--border-subtle); }
.btn-secondary:hover { background: #e5e7eb; transform: translateY(-1px); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 4px 14px rgba(239,68,68,0.3); }
.btn-danger:hover { box-shadow: 0 8px 20px rgba(239,68,68,0.45); transform: translateY(-2px); }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); color: #fff; box-shadow: 0 4px 14px rgba(16,185,129,0.3); }
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16,185,129,0.45); }
.btn-sm { padding: 0.42rem 0.88rem; font-size: 0.8rem; }
.btn-xs { padding: 0.27rem 0.6rem; font-size: 0.73rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: var(--radius-sm); }

/* ====== APP LAYOUT ====== */
#storefront-screen,
#login-screen,
#app-main {
  display: none;
}
#storefront-screen.active { display: block !important; }
#login-screen.active { display: flex !important; }
#app-main.active { display: flex !important; }

.app-layout { min-height: 100vh; }

/* ====== SIDEBAR ====== */
.sidebar { width: var(--sidebar-width); background: var(--bg-sidebar); border-right: 1.5px solid var(--border-subtle); position: fixed; top: 0; left: 0; height: 100vh; display: flex; flex-direction: column; z-index: 100; transition: transform 0.3s ease; box-shadow: 4px 0 24px rgba(124,58,237,0.05); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); backdrop-filter: blur(4px); z-index: 99; }
.sidebar-overlay.active { display: block; }
.sidebar-brand { height: var(--header-height); display: flex; align-items: center; gap: 0.75rem; padding: 0 1.25rem; border-bottom: 1.5px solid var(--border-subtle); background: linear-gradient(135deg, rgba(124,58,237,0.05), rgba(236,72,153,0.03)); }
.brand-icon { width: 40px; height: 40px; background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink)); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem; box-shadow: 0 4px 12px rgba(124,58,237,0.35); flex-shrink: 0; }
.brand-text h2 { font-family: 'Nunito',sans-serif; font-size: 1rem; font-weight: 900; color: var(--text-main); line-height: 1.1; }
.brand-text span { font-size: 0.63rem; color: var(--brand-purple); font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.sidebar-menu { padding: 0.85rem 0.65rem; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.12rem; }
.menu-category { font-size: 0.63rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); padding: 0.65rem 0.75rem 0.35rem; margin-top: 0.2rem; }
.nav-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.85rem; border-radius: var(--radius-md); color: var(--text-muted); font-size: 0.87rem; font-weight: 600; transition: all 0.2s ease; cursor: pointer; position: relative; overflow: hidden; }
.nav-link i { font-size: 0.95rem; width: 18px; text-align: center; flex-shrink: 0; transition: transform 0.2s ease; }
.nav-link:hover { background: rgba(124,58,237,0.07); color: var(--primary); }
.nav-link:hover i { transform: scale(1.15); }
.nav-link.active { background: linear-gradient(135deg, rgba(124,58,237,0.11), rgba(236,72,153,0.07)); color: var(--primary); font-weight: 700; }
.nav-link.active::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 60%; background: linear-gradient(to bottom, var(--brand-purple), var(--brand-pink)); border-radius: 0 4px 4px 0; }
.nav-link.sidebar-add-stock-btn { background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink)) !important; color: #ffffff !important; font-weight: 800 !important; box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35); margin: 0.3rem 0; border-radius: var(--radius-md); }
.nav-link.sidebar-add-stock-btn i { color: #ffffff !important; }
.nav-link.sidebar-add-stock-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5); color: #ffffff !important; }
.sidebar-footer { padding: 0.85rem 0.65rem; border-top: 1.5px solid var(--border-subtle); background: linear-gradient(135deg, rgba(124,58,237,0.03), transparent); }
.user-profile-bar { display: flex; align-items: center; gap: 0.65rem; }
.user-avatar { width: 36px; height: 36px; background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink)); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 900; color: #fff; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-info .name { font-size: 0.83rem; font-weight: 700; color: var(--text-main); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.user-info .role { font-size: 0.7rem; color: var(--brand-purple); font-weight: 700; }
.btn-logout { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 0.4rem; font-size: 0.95rem; transition: all 0.2s ease; border-radius: var(--radius-sm); }
.btn-logout:hover { color: var(--sold-color); background: var(--sold-bg); }

/* ====== MAIN CONTENT ====== */
.main-wrapper { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; min-height: 100vh; transition: margin 0.3s ease; }
.top-header { height: var(--header-height); background: rgba(255,255,255,0.92); backdrop-filter: blur(16px); border-bottom: 1.5px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; position: sticky; top: 0; z-index: 90; box-shadow: 0 2px 12px rgba(124,58,237,0.06); }
.mobile-toggle { display: none; background: none; border: none; color: var(--text-main); font-size: 1.4rem; cursor: pointer; }
.page-title-group h1 { font-family: 'Nunito',sans-serif; font-size: 1.25rem; font-weight: 900; color: var(--text-main); }
.page-title-group p { font-size: 0.76rem; color: var(--text-muted); font-weight: 500; }
.header-right { display: flex; align-items: center; gap: 0.85rem; }
.supabase-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.28rem 0.7rem; background: rgba(16,185,129,0.1); border: 1.5px solid rgba(16,185,129,0.22); border-radius: var(--radius-full); font-size: 0.73rem; font-weight: 700; color: var(--ready-color); }
.supabase-badge.disconnected { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.22); color: var(--sold-color); }
.supabase-badge .badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ready-color); box-shadow: 0 0 6px var(--ready-color); }
.supabase-badge.disconnected .badge-dot { background: var(--sold-color); box-shadow: 0 0 6px var(--sold-color); }
.clock-widget { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--text-muted); font-weight: 600; background: var(--bg-input); padding: 0.3rem 0.7rem; border-radius: var(--radius-full); border: 1.5px solid var(--border-subtle); }
.clock-widget i { color: var(--brand-purple); font-size: 0.78rem; }
.content-container { flex: 1; padding: 1.5rem; overflow-y: auto; }
.view-page { display: none; }

/* ====== GRIDS ====== */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 1.5rem; }
#products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
.sales-counter-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 1.5rem; }

/* ====== STAT CARDS ====== */
.stat-card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 1.25rem; border: 1.5px solid var(--border-subtle); transition: all 0.3s ease; position: relative; overflow: hidden; box-shadow: var(--shadow-card); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--brand-purple), var(--brand-pink)); }
.stat-card.ready::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.sold::before { background: linear-gradient(90deg, #ef4444, #f97316); }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(124,58,237,0.12); }
.stat-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.75rem; }
.stat-title { font-size: 0.78rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1rem; color: #fff; flex-shrink: 0; }
.stat-icon.total { background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink)); }
.stat-icon.ready { background: linear-gradient(135deg, #10b981, #34d399); }
.stat-icon.sold { background: linear-gradient(135deg, #ef4444, #f97316); }
.stat-value { font-family: 'Nunito',sans-serif; font-size: 2.2rem; font-weight: 900; color: var(--text-main); line-height: 1; margin-bottom: 0.5rem; }
.stat-footer { font-size: 0.76rem; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 0.35rem; }
.sales-counter-card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 1.1rem; border: 1.5px solid var(--border-subtle); text-align: center; box-shadow: var(--shadow-card); transition: all 0.3s ease; }
.sales-counter-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.sales-counter-icon { font-size: 1.5rem; margin-bottom: 0.35rem; }
.sales-counter-value { font-family: 'Nunito',sans-serif; font-size: 1.35rem; font-weight: 900; color: var(--text-main); line-height: 1; }
.sales-counter-label { font-size: 0.73rem; color: var(--text-muted); font-weight: 700; margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.05em; }
.chart-container { width: 100%; height: 240px; position: relative; }

/* ====== CARDS ====== */
.card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1.5px solid var(--border-subtle); overflow: hidden; box-shadow: var(--shadow-card); }
.card-header { padding: 1.1rem 1.35rem; border-bottom: 1.5px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: linear-gradient(135deg, rgba(124,58,237,0.03), transparent); }
.card-title { font-family: 'Nunito',sans-serif; font-size: 0.95rem; font-weight: 900; color: var(--text-main); display: flex; align-items: center; gap: 0.5rem; }
.card-title i { color: var(--brand-purple); }
.card-body { padding: 1.35rem; }

/* ====== STOCK TABS (INSPIRED BY SAAS INTEGRATIONS TABLE - IMAGE 1) ====== */
.stock-tab-wrapper, .stock-tabs { 
  display: flex !important; 
  gap: 1rem !important; 
  margin-bottom: 1.25rem !important; 
  border-bottom: 2px solid #e2e8f0 !important; 
  padding-bottom: 0px !important; 
  width: 100% !important; 
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  white-space: nowrap !important;
  background: transparent !important;
}
.stock-tab-btn { 
  padding: 0.6rem 0.3rem !important; 
  border: none !important; 
  border-bottom: 3px solid transparent !important; 
  cursor: pointer !important; 
  font-size: 0.9rem !important; 
  font-weight: 700 !important; 
  color: #64748b !important; 
  background: transparent !important; 
  transition: all 0.2s ease !important; 
  font-family: inherit !important; 
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.stock-tab-btn:hover { 
  color: #1e293b !important; 
}
.stock-tab-btn.active { 
  color: #2563eb !important; 
  border-bottom-color: #2563eb !important; 
  background: transparent !important; 
  box-shadow: none !important; 
  font-weight: 800 !important; 
}
.stock-tab-btn .tab-badge {
  padding: 0.15rem 0.55rem !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
}
.stock-tab-btn.active .tab-badge {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
}

/* ====== TOOLBAR & SEARCH ====== */
.table-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.85rem !important;
  margin-bottom: 1rem !important;
  flex-wrap: wrap !important;
}
.search-box {
  position: relative !important;
  flex: 1 !important;
  min-width: 220px !important;
}
.search-box i {
  position: absolute !important;
  left: 0.9rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #94a3b8 !important;
  font-size: 0.85rem !important;
}
.search-box input {
  width: 100% !important;
  padding: 0.6rem 2.4rem 0.6rem 2.5rem !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  color: #0f172a !important;
  font-family: inherit !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}
.search-box input:focus {
  outline: none !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12) !important;
}

/* ====== DATA TABLE & CUSTOM TABLE (CLEAN & STRUCTURED LIKE IMAGE 1) ====== */
.table-wrapper, .table-responsive { 
  border-radius: 12px !important; 
  overflow: hidden !important; 
  border: 1px solid #e2e8f0 !important; 
  background: #ffffff !important; 
  box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important; 
  margin-top: 0.5rem !important; 
}
.data-table, .custom-table, .stock-simple-table, .users-table, .report-summary-table, .top-products-table { 
  width: 100% !important; 
  border-collapse: collapse !important; 
  font-size: 0.86rem !important; 
  border-spacing: 0 !important; 
}
.data-table th, .custom-table th, .stock-simple-table th, .users-table th, .report-summary-table th, .top-products-table th { 
  background: #f8fafc !important; 
  padding: 0.85rem 1.25rem !important; 
  text-align: left !important; 
  font-size: 0.75rem !important; 
  font-weight: 700 !important; 
  text-transform: uppercase !important; 
  letter-spacing: 0.05em !important; 
  color: #64748b !important; 
  border-bottom: 1px solid #e2e8f0 !important; 
  white-space: nowrap !important; 
}
.data-table td, .custom-table td, .stock-simple-table td, .users-table td, .report-summary-table td, .top-products-table td { 
  padding: 0.85rem 1.25rem !important; 
  border-bottom: 1px solid #f1f5f9 !important; 
  vertical-align: middle !important; 
  color: #1e293b !important; 
  font-weight: 500 !important; 
}
.data-table tr:last-child td, .custom-table tr:last-child td, .stock-simple-table tr:last-child td, .users-table tr:last-child td, .report-summary-table tr:last-child td, .top-products-table tr:last-child td { 
  border-bottom: none !important; 
}
.data-table tbody tr, .custom-table tbody tr, .stock-simple-table tbody tr, .users-table tbody tr, .report-summary-table tbody tr, .top-products-table tbody tr { 
  background: #ffffff !important; 
  transition: background 0.15s ease !important; 
}
.data-table tbody tr:hover, .custom-table tbody tr:hover, .stock-simple-table tbody tr:hover, .users-table tbody tr:hover, .report-summary-table tbody tr:hover, .top-products-table tbody tr:hover { 
  background: #f8fafc !important; 
}

/* ====== BADGES & TAGS ====== */
.status-badge { display: inline-flex; align-items: center; gap: 0.28rem; padding: 0.25rem 0.65rem; border-radius: 9999px; font-size: 0.73rem; font-weight: 700; white-space: nowrap; }
.status-badge.ready { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.status-badge.sold { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.badge-sub-status { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.22rem 0.6rem; border-radius: 9999px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.badge-sub-status.sold { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.badge-sub-status.subbing { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.renewal-badge { display: inline-flex; align-items: center; gap: 0.22rem; padding: 0.18rem 0.52rem; background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.22); border-radius: 9999px; font-size: 0.68rem; font-weight: 800; color: var(--brand-purple); }
.profile-pill-tag { display: inline-flex; align-items: center; gap: 0.22rem; padding: 0.18rem 0.52rem; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 9999px; font-size: 0.7rem; font-weight: 700; color: #475569; margin-top: 0.2rem; }
.assigned-user-tag { display: inline-flex; align-items: center; gap: 0.22rem; padding: 0.18rem 0.52rem; background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); border-radius: 9999px; font-size: 0.68rem; font-weight: 700; color: #b45309; }
.product-badge { display: inline-flex; align-items: center; gap: 0.32rem; padding: 0.22rem 0.6rem; border-radius: 6px; font-size: 0.76rem; font-weight: 700; background: #f1f5f9; color: #1e293b; }
.email-main-row { font-weight: 700; color: #0f172a; font-size: 0.86rem; }

/* ====== ACTION BUTTONS ====== */
.action-btn-group { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.act-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.28rem; padding: 0.32rem 0.7rem; border-radius: 6px; border: 1px solid #e2e8f0; cursor: pointer; font-size: 0.75rem; font-weight: 700; font-family: inherit; transition: all 0.2s ease; white-space: nowrap; background: #ffffff; color: #475569; }
.act-btn:hover { background: #f8fafc; border-color: #cbd5e1; color: #0f172a; }
.act-btn-copy { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.act-btn-copy:hover { background: #dbeafe; border-color: #93c5fd; }
.act-btn-sold { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.act-btn-sold:hover { background: #fee2e2; border-color: #fca5a5; }
.act-btn-renew { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.act-btn-renew:hover { background: #dcfce7; border-color: #86efac; }
.act-btn-transfer { background: #fffbeb; color: #d97706; border-color: #fde68a; }
.act-btn-transfer:hover { background: #fef3c7; border-color: #fcd34d; }
.act-btn-take { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.act-btn-take:hover { background: #dbeafe; border-color: #93c5fd; }

/* ====== PAGINATION (INSPIRED BY SAAS TABLE - IMAGE 1) ====== */
.pagination, .pagination-wrapper { 
  display: flex !important; 
  align-items: center !important; 
  justify-content: space-between !important; 
  padding: 0.85rem 1.25rem !important; 
  border-top: 1px solid #e2e8f0 !important; 
  background: #ffffff !important; 
  flex-wrap: wrap !important; 
  gap: 0.5rem !important; 
  border-radius: 0 0 12px 12px !important;
  font-size: 0.8rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
}
.pagination-controls { 
  display: flex !important; 
  align-items: center !important; 
  gap: 0.35rem !important; 
}
.page-btn { 
  min-width: 32px !important; 
  height: 32px !important; 
  padding: 0 0.5rem !important; 
  border-radius: 8px !important; 
  border: 1px solid #cbd5e1 !important; 
  background: #ffffff !important; 
  color: #475569 !important; 
  font-size: 0.8rem !important; 
  font-weight: 700 !important; 
  cursor: pointer !important; 
  transition: all 0.15s ease !important; 
  display: flex !important; 
  align-items: center !important; 
  justify-content: center !important; 
  font-family: inherit !important; 
}
.page-btn:hover { 
  border-color: #94a3b8 !important; 
  color: #0f172a !important; 
  background: #f8fafc !important; 
}
.page-btn.active { 
  background: #2563eb !important; 
  color: #ffffff !important; 
  border-color: #2563eb !important; 
  box-shadow: 0 2px 6px rgba(37,99,235,0.3) !important; 
}
.page-btn:disabled { 
  opacity: 0.35 !important; 
  cursor: not-allowed !important; 
}

/* ====== EMPTY STATE ====== */
.empty-state { text-align: center; padding: 3.5rem 2rem; color: var(--text-muted); }
.empty-state-icon { font-size: 3rem; margin-bottom: 0.85rem; opacity: 0.3; }
.empty-state h3 { font-family: 'Nunito',sans-serif; font-size: 1.05rem; font-weight: 900; color: var(--text-main); margin-bottom: 0.35rem; }
.empty-state p { font-size: 0.85rem; font-weight: 500; }

/* ====== PRODUCTS VIEW ====== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(290px,1fr)); gap: 1rem; }
.product-card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1.5px solid var(--border-subtle); overflow: hidden; transition: all 0.3s ease; box-shadow: var(--shadow-card); }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(124,58,237,0.2); }
.product-card-header { padding: 1.1rem; display: flex; align-items: center; gap: 0.9rem; border-bottom: 1.5px solid var(--border-subtle); }
.product-card-icon { width: 46px; height: 46px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: #fff; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
.product-card-name { font-family: 'Nunito',sans-serif; font-size: 0.95rem; font-weight: 900; color: var(--text-main); }
.product-card-duration { font-size: 0.76rem; color: var(--text-muted); font-weight: 600; margin-top: 0.12rem; }
.product-card-body { padding: 1.1rem; }
.product-template-preview { font-size: 0.73rem; color: var(--text-muted); line-height: 1.5; max-height: 78px; overflow: hidden; font-family: monospace; white-space: pre-wrap; background: #f8f9ff; padding: 0.6rem; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle); }
.product-card-actions { padding: 0.9rem 1.1rem; border-top: 1.5px solid var(--border-subtle); display: flex; gap: 0.45rem; }

/* ====== MODALS ====== */
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(30,27,75,0.45); backdrop-filter: blur(6px); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; }
.modal-backdrop.active { display: flex; }
.modal-container { background: var(--bg-modal); border-radius: var(--radius-xl); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; box-shadow: 0 32px 80px rgba(30,27,75,0.3); animation: modalIn 0.35s cubic-bezier(0.34,1.56,0.64,1); border: 1.5px solid var(--border-subtle); }
@keyframes modalIn { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { padding: 1.1rem 1.35rem; border-bottom: 1.5px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, rgba(124,58,237,0.04), transparent); }
.modal-title { font-family: 'Nunito',sans-serif; font-size: 1rem; font-weight: 900; color: var(--text-main); }
.modal-close { width: 30px; height: 30px; border-radius: var(--radius-sm); border: none; background: #f3f4f6; color: var(--text-muted); font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
.modal-close:hover { background: var(--sold-bg); color: var(--sold-color); }
.modal-body { padding: 1.35rem; }
.modal-footer { padding: 0.9rem 1.35rem; border-top: 1.5px solid var(--border-subtle); display: flex; align-items: center; justify-content: flex-end; gap: 0.65rem; }

/* ====== TOAST ====== */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 2000; display: flex; flex-direction: column; gap: 0.5rem; max-width: 320px; }
.toast { background: var(--bg-card); border-radius: var(--radius-lg); padding: 0.9rem 1.1rem; box-shadow: 0 12px 40px rgba(30,27,75,0.16); display: flex; align-items: flex-start; gap: 0.65rem; border: 1.5px solid var(--border-subtle); animation: toastIn 0.4s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes toastIn { from { opacity: 0; transform: translateX(50px) scale(0.9); } to { opacity: 1; transform: translateX(0) scale(1); } }
.toast.success { border-left: 4px solid var(--ready-color); }
.toast.error { border-left: 4px solid var(--sold-color); }
.toast.info { border-left: 4px solid var(--brand-blue); }
.toast.warning { border-left: 4px solid var(--brand-yellow); }
.toast-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.05rem; }
.toast-icon.success { color: var(--ready-color); }
.toast-icon.error { color: var(--sold-color); }
.toast-icon.info { color: var(--brand-blue); }
.toast-content { flex: 1; }
.toast-title { font-size: 0.84rem; font-weight: 900; color: var(--text-main); margin-bottom: 0.18rem; font-family: 'Nunito',sans-serif; }
.toast-message { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; line-height: 1.4; }

/* ====== SETTINGS ====== */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(360px,1fr)); gap: 1.1rem; }
.settings-card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1.5px solid var(--border-subtle); overflow: hidden; box-shadow: var(--shadow-card); }
.settings-card-header { padding: 0.9rem 1.1rem; border-bottom: 1.5px solid var(--border-subtle); display: flex; align-items: center; gap: 0.65rem; background: linear-gradient(135deg, rgba(124,58,237,0.04), transparent); }
.settings-card-icon { width: 34px; height: 34px; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.85rem; flex-shrink: 0; }
.settings-card-title { font-family: 'Nunito',sans-serif; font-size: 0.9rem; font-weight: 900; color: var(--text-main); }
.settings-card-body { padding: 1.1rem; }

/* ====== ACTIVITY LOG (CLEAN STRUCTURED) ====== */
.activity-list { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.25rem 0; }
.activity-item { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1.25rem; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; transition: all 0.15s ease; }
.activity-item:hover { background: #f8fafc; border-color: #cbd5e1; }
.activity-badge { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; background: #f1f5f9; color: #475569; }
.activity-badge.add { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.activity-badge.sold { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.activity-badge.copy { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.activity-badge.login { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.activity-badge.delete { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.activity-content { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.activity-title { font-size: 0.86rem; font-weight: 600; color: #0f172a; }
.activity-time { font-size: 0.75rem; color: #64748b; font-weight: 500; display: flex; align-items: center; gap: 0.35rem; }

/* ====== REPORT ====== */
.report-filter-bar { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.report-filter-pill { font-family: inherit; }
.report-summary-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.report-summary-table th, .report-summary-table td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--border-subtle); }
.report-summary-table th { font-size: 0.72rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); background: #f8f9ff; }
.report-summary-table tr:last-child td { border-bottom: none; }

/* ====== USER MANAGEMENT ====== */
.users-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.users-table th, .users-table td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--border-subtle); }
.users-table th { font-size: 0.72rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); background: #f8f9ff; }
.users-table tr:last-child td { border-bottom: none; }
.users-table tbody tr { background: var(--bg-card); transition: background 0.15s ease; }
.users-table tbody tr:hover { background: #faf8ff; }
.role-badge { display: inline-flex; align-items: center; padding: 0.22rem 0.65rem; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 900; }
.role-badge.admin { background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(236,72,153,0.07)); color: var(--brand-purple); border: 1px solid rgba(124,58,237,0.22); }
.role-badge.member { background: rgba(59,130,246,0.09); color: var(--brand-blue); border: 1px solid rgba(59,130,246,0.22); }

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .grid-3, .sales-counter-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 30px rgba(0,0,0,0.15); }
  .main-wrapper { margin-left: 0; }
  .mobile-toggle { display: flex; }
  .top-header { padding: 0 1rem; }
  .content-container { padding: 1rem; }
  .grid-3, .sales-counter-grid, .grid-2 { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .clock-widget, .supabase-badge { display: none; }
  .storefront-grid { grid-template-columns: repeat(auto-fill,minmax(155px,1fr)); }
  .storefront-title { font-size: 1.9rem; }
  .modal-footer { flex-direction: column; }
  .modal-footer .btn { width: 100%; }
}
@media (max-width: 480px) {
  .storefront-grid { grid-template-columns: repeat(2,1fr); }
}

/* ====== TABLE TOOLBAR & ENHANCEMENTS ====== */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1.5px solid var(--border-subtle);
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.02), transparent);
}

.table-toolbar .search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.table-toolbar .search-box i {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.table-toolbar .search-box input {
  width: 100%;
  padding: 0.55rem 2.2rem 0.55rem 2.4rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.86rem;
  transition: all 0.2s ease;
}

.table-toolbar .search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
  background: #fff;
}

.table-toolbar .filter-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ====== TOP PRODUCTS DOUGHNUT TABLE ====== */
.top-products-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.top-products-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  padding: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.top-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  color: #1e293b; /* Dark sharp font color, NOT WHITE */
}

.top-products-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #475569;
  border-bottom: 1.5px solid #e2e8f0;
  background: #f8fafc;
}

.top-products-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #1e293b;
  font-weight: 600;
}

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

.tp-prod-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #0f172a;
}

.tp-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tp-progress-bg {
  width: 100px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.tp-progress-bar {
  height: 100%;
  border-radius: 999px;
}

/* ====== BUYER DATA TAG & SUB STATUS BADGES ====== */
.buyer-data-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  color: #047857;
  margin-top: 0.25rem;
}

.badge-sub-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge-sub-status.sold {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-sub-status.subbing {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.25);
}

/* ====== EXCEL DROP ZONE ====== */
.excel-upload-zone {
  border: 2px dashed #10b981;
  background: rgba(16, 185, 129, 0.04);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.excel-upload-zone:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: #059669;
  transform: translateY(-2px);
}

/* ====== RESPONSIVE DESIGN FOR MOBILE & TABLETS ====== */
html, body {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

@media (max-width: 1200px) {
  /* Sidebar Drawer on Mobile & Tablet */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 290px !important;
    max-width: 82vw !important;
    z-index: 999999 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.25) !important;
    background: #ffffff !important;
  }
  .sidebar.open {
    transform: translateX(0) !important;
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.7) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    z-index: 999998 !important;
  }
  .sidebar-overlay.active {
    display: block !important;
  }

  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .mobile-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: var(--radius-md) !important;
    color: #1e1b4b !important;
    font-size: 1.35rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  }
  .mobile-toggle:active {
    transform: scale(0.92) !important;
    background: rgba(124, 58, 237, 0.1) !important;
  }

  .top-header {
    padding: 0.75rem 1rem !important;
    height: auto !important;
    min-height: 64px !important;
  }
  .page-title-group h1 {
    font-size: 1.1rem !important;
  }
  .page-title-group p {
    font-size: 0.72rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .content-container {
    padding: 0.85rem !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* Grid Layouts for Mobile */
  .grid-3, .sales-counter-grid, .grid-2, .settings-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  #products-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Responsive Tables & Cards */
  .table-container, .card-body, .card, .top-products-table-wrapper {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .stock-tab-wrapper {
    gap: 0.5rem !important;
    padding-bottom: 4px !important;
  }
  .stock-tab-btn {
    padding: 0.5rem 0.6rem !important;
    font-size: 0.85rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .table-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .table-toolbar .search-box {
    width: 100% !important;
    min-width: 100% !important;
  }
  .table-toolbar .filter-group {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .table-toolbar select, .table-toolbar button {
    width: 100% !important;
  }

  .clock-widget, .supabase-badge {
    display: none !important;
  }

  .btn-notif-bell {
    width: 38px !important;
    height: 38px !important;
  }

  /* Public Storefront Mobile Adjustments */
  .storefront-products-section {
    padding: 0 0.85rem 3rem !important;
  }
  .storefront-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .storefront-title {
    font-size: 1.75rem !important;
  }
  .reseller-hero-card {
    flex-direction: column !important;
    text-align: center !important;
  }
  .reseller-hero-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Modals on Mobile */
  .modal-container {
    width: 92vw !important;
    max-width: 480px !important;
    border-radius: 20px !important;
    margin: 1rem auto !important;
  }
}

@media (max-width: 480px) {
  .storefront-nav-bar {
    padding: 0.65rem 0.85rem !important;
  }
  .storefront-brand-name {
    font-size: 1rem !important;
  }
  .storefront-login-btn {
    padding: 0.35rem 0.85rem !important;
    font-size: 0.78rem !important;
  }
}

/* ====== RESPONSIVE DESIGN FOR MOBILE & TABLETS ====== */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

@media (max-width: 1024px) {
  /* Sidebar Drawer on Mobile & Tablet */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 290px !important;
    max-width: 85vw !important;
    z-index: 99999 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.25) !important;
    background: #ffffff !important;
  }
  .sidebar.open {
    transform: translateX(0) !important;
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 99998 !important;
  }
  .sidebar-overlay.active {
    display: block !important;
  }

  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .mobile-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: var(--radius-md) !important;
    color: #1e1b4b !important;
    font-size: 1.3rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  }
  .mobile-toggle:active {
    transform: scale(0.92) !important;
    background: rgba(124, 58, 237, 0.1) !important;
  }

  .top-header {
    padding: 0.75rem 1rem !important;
    height: auto !important;
    min-height: 64px !important;
  }
  .page-title-group h1 {
    font-size: 1.1rem !important;
  }
  .page-title-group p {
    font-size: 0.72rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .content-container {
    padding: 0.85rem !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* Grid Layouts for Mobile */
  .grid-3, .sales-counter-grid, .grid-2, .settings-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  #products-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Responsive Tables & Cards */
  .table-container, .card-body, .card {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  table {
    min-width: 600px !important;
  }

  .clock-widget, .supabase-badge {
    display: none !important;
  }

  .btn-notif-bell {
    width: 36px !important;
    height: 36px !important;
  }

  /* Public Storefront Mobile Adjustments */
  .storefront-products-section {
    padding: 0 0.85rem 3rem !important;
  }
  .storefront-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .storefront-title {
    font-size: 1.75rem !important;
  }
  .reseller-hero-card {
    flex-direction: column !important;
    text-align: center !important;
  }
  .reseller-hero-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Modals on Mobile */
  .modal-container {
    width: 92vw !important;
    max-width: 480px !important;
    border-radius: 20px !important;
    margin: 1rem auto !important;
  }
}

@media (max-width: 480px) {
  .storefront-nav-bar {
    padding: 0.65rem 0.85rem !important;
  }
  .storefront-brand-name {
    font-size: 1rem !important;
  }
  .storefront-login-btn {
    padding: 0.35rem 0.85rem !important;
    font-size: 0.78rem !important;
  }
}

