/* ═══════════════════════════════════════════════════════════════
   PayStore — Multi-Seller Storefront
   Light e-commerce theme (inspired by podmodturkey8, simplified)
   Responsive: mobile / tablet / desktop
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Palette */
  --bg-page: #f2f5f5;
  --bg-white: #ffffff;
  --bg-soft: #f8fafa;
  --border: #ebebeb;
  --border-strong: #e2e2e2;

  /* Accents */
  --accent: #e0493e;
  --accent-dark: #c73a30;
  --accent-soft: rgba(224, 73, 62, 0.08);
  --primary: #e0493e;
  --primary-hover: #c73a30;
  --saweria-amber: #f59e0b;
  --saweria-amber-hover: #d97706;

  /* Status */
  --success: #27a844;
  --success-soft: rgba(39, 168, 68, 0.1);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.08);
  --info: #2563eb;
  --info-soft: rgba(37, 99, 235, 0.08);

  /* Text */
  --text-main: #333333;
  --text-muted: #7a7a7a;
  --text-subtle: #a0a4a8;

  /* Typography */
  --font-main: 'Bai Jamjuree', sans-serif;
  --font-heading: 'Bai Jamjuree', sans-serif;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Motion */
  --transition-fast: all 0.18s ease;
  --transition-smooth: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lift: 0 12px 30px rgba(15, 23, 42, 0.12);
}

/* ───────────────────────── Base ───────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden { display: none !important; }

.text-warning { color: var(--warning); }
.text-success { color: var(--success); }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }

.code-text {
  font-family: 'Courier New', monospace;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  word-break: break-all;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: #cfd6d6; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b8c1c1; }

/* Ambient orbs (GSAP-injected decoration) */
.ambient-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(8px);
}

/* ═════════════════════════ BUTTONS ═════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); box-shadow: 0 6px 18px rgba(224, 73, 62, 0.3); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #1f8f38; box-shadow: 0 6px 18px rgba(39, 168, 68, 0.3); }

.btn-outline {
  background: var(--bg-white);
  color: var(--text-main);
  border-color: var(--border-strong);
}
.btn-outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.btn-glass {
  background: var(--bg-soft);
  color: var(--text-main);
  border-color: var(--border);
}
.btn-glass:hover:not(:disabled) { background: var(--border); }

.btn-saweria { background: var(--saweria-amber); color: #fff; }
.btn-saweria:hover:not(:disabled) { background: var(--saweria-amber-hover); box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }

.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 10px; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-xs { padding: 4px 10px; font-size: 0.74rem; border-radius: 6px; }
.btn-block { width: 100%; }

/* ═════════════════════════ NAVBAR ═════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s ease;
}
.navbar.navbar-scrolled { box-shadow: var(--shadow-card); }

.nav-container { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; padding-bottom: 0; }

.nav-top-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 10px;
}

.brand-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon {
  width: 40px; height: 40px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.05rem;
  box-shadow: 0 4px 12px rgba(224, 73, 62, 0.3);
}
.logo-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}
.logo-text .highlight { color: var(--accent); }

/* Search */
.nav-search {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  max-width: 640px;
}
.nav-search .search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-subtle);
  font-size: 0.85rem;
  pointer-events: none;
}
.nav-search input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: var(--bg-soft);
  font-size: 0.88rem;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-fast);
}
.nav-search input:focus { border-color: var(--accent); background: var(--bg-white); box-shadow: 0 0 0 3px var(--accent-soft); }
.nav-search input::placeholder { color: var(--text-subtle); }

/* Right icon group */
.nav-icon-group { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.cart-trigger-btn {
  position: relative;
  width: 42px; height: 42px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: var(--bg-white);
  color: var(--text-main);
  font-size: 1rem;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.cart-trigger-btn:hover { border-color: var(--accent); color: var(--accent); }
.cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  display: grid; place-items: center;
  border: 2px solid var(--bg-white);
}

/* Auth area */
.user-auth-section { display: flex; align-items: center; }

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px 5px 5px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}
.user-avatar-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid; place-items: center;
  font-size: 0.95rem;
}
.user-meta-info { display: flex; flex-direction: column; line-height: 1.15; }
.user-nav-name { font-size: 0.8rem; font-weight: 700; color: var(--text-main); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-nav-role-badge { font-size: 0.6rem; font-weight: 700; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.logout-btn {
  width: 28px; height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 50%;
  font-size: 0.75rem;
  transition: var(--transition-fast);
}
.logout-btn:hover { background: var(--danger-soft); color: var(--danger); }

/* Menu row */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  border-top: 1px solid var(--border);
  padding: 0 0 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-actions::-webkit-scrollbar { display: none; }

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition-fast);
  white-space: nowrap;
  border-radius: 0;
}
.nav-btn:hover { color: var(--accent); }
.nav-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.nav-btn i { font-size: 0.85rem; }

/* ═════════════════════════ HERO ═════════════════════════ */
.hero-banner {
  background: linear-gradient(135deg, #ffffff 0%, #fdf1f0 55%, #fbe4e2 100%);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 40px;
  position: relative;
  overflow: hidden;
}
.hero-container { position: relative; z-index: 1; }
.hero-content { max-width: 760px; }

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulseDot 1.6s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(39, 168, 68, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(39, 168, 68, 0); }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4.2vw, 3.1rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 18px 0 14px;
  color: var(--text-main);
}
.gradient-text {
  background: linear-gradient(90deg, var(--accent), #ff7a59);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 26px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-usps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}
.usp-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}
.usp-item i { color: var(--accent); }

/* ═════════════════════════ MAIN CONTENT ═════════════════════════ */
.main-content { padding: 32px 20px 70px; position: relative; z-index: 1; }

.view-header { margin-bottom: 24px; }
.view-header h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.view-header h2 i { color: var(--accent); font-size: 1.2rem; }
.view-sub { color: var(--text-muted); font-size: 0.88rem; margin-top: 6px; line-height: 1.6; }

.section-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  position: relative;
  padding-left: 14px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 70%;
  background: var(--accent);
  border-radius: 4px;
}

/* ── Filter bar ── */
.filter-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
  flex: 1;
  min-width: 0;
}
.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--bg-white);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-fast);
  white-space: nowrap;
}
.cat-tab:hover { border-color: var(--accent); color: var(--accent); }
.cat-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(224, 73, 62, 0.3); }

.seller-filter { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.seller-filter label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.seller-filter select, .sort-wrapper select {
  padding: 9px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}
.seller-filter select:focus, .sort-wrapper select:focus { border-color: var(--accent); }

.catalog-header-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.sort-wrapper { display: flex; align-items: center; gap: 8px; }
.sort-wrapper label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }

/* ── Product grid & cards ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--border-strong);
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-soft);
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.product-card:hover .card-media img { transform: scale(1.06); }

.card-category-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-full);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.card-saweria-badge {
  position: absolute;
  bottom: 10px; left: 10px;
  padding: 4px 10px;
  background: rgba(20, 20, 20, 0.68);
  backdrop-filter: blur(4px);
  color: #ffd76a;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.seller-info-row { display: flex; align-items: center; gap: 7px; }
.seller-avatar-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid; place-items: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.seller-handle-text {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.product-title {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.65em;
}
.product-card:hover .product-title { color: var(--accent); }

.product-desc-snippet {
  font-size: 0.78rem;
  color: var(--text-subtle);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.product-price-tag {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-heading);
}
.card-action-btns { display: flex; gap: 6px; }

/* ═════════════════════════ ORDERS VIEW ═════════════════════════ */
.orders-list { display: flex; flex-direction: column; gap: 16px; }

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.order-seller-info { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; flex-wrap: wrap; }
.saweria-handle-display { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

.order-status-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.order-status-badge.PAID { background: var(--success-soft); color: var(--success); }
.order-status-badge.PENDING { background: var(--warning-soft); color: #b45309; }
.order-status-badge.EXPIRED { background: var(--danger-soft); color: var(--danger); }
.order-status-badge.CANCELLED { background: var(--border); color: var(--text-muted); }

.order-item-details {
  display: flex;
  gap: 16px;
  padding: 16px 18px;
  align-items: flex-start;
}
.order-item-thumb {
  width: 74px; height: 74px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.order-digital-content {
  padding: 0 18px 18px;
}
.content-key-box {
  background: var(--bg-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.85rem;
  line-height: 1.6;
}
.direct-download-btn { margin-top: 10px; }

/* Orders list card wrapper (app.js uses .product-card-like containers) */
.orders-list > div, .sales-list > div {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.sales-list { display: flex; flex-direction: column; gap: 16px; }
.sales-list .sales-row {
  padding: 14px 18px;
}

/* ═════════════════════════ SELLER DASHBOARD ═════════════════════════ */
.seller-dashboard-header { margin-bottom: 22px; }

.seller-profile-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.seller-avatar {
  width: 62px; height: 62px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), #ff7a59);
  color: #fff;
  display: grid; place-items: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(224, 73, 62, 0.28);
}
.seller-details { flex: 1; min-width: 200px; }
.seller-title-wrapper { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seller-title-wrapper h2 { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 800; }
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: var(--success-soft);
  color: var(--success);
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.seller-profile-card .saweria-handle-display { margin-top: 6px; }
.saweria-link-highlight { color: var(--saweria-amber); }

.seller-actions-header { display: flex; gap: 10px; flex-wrap: wrap; }

.dashboard-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.dashboard-tabs::-webkit-scrollbar { display: none; }

.dash-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-white);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-fast);
  white-space: nowrap;
}
.dash-tab:hover { border-color: var(--accent); color: var(--accent); }
.dash-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.dash-content-panel { min-height: 120px; }

/* ═════════════════════════ ADMIN PANEL ═════════════════════════ */
.admin-panel-header {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.admin-brand-row { display: flex; align-items: center; gap: 16px; }
.admin-shield-icon {
  width: 54px; height: 54px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1f2937, #374151);
  color: #fff;
  display: grid; place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.admin-panel-title { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 800; }
.admin-panel-sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 3px; }
.admin-logged-info { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; }
.admin-role-chip {
  padding: 3px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.admin-stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}
.admin-stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.stat-users    .stat-icon { background: var(--info-soft);    color: var(--info); }
.stat-sellers  .stat-icon { background: var(--accent-soft);  color: var(--accent); }
.stat-products .stat-icon { background: var(--warning-soft); color: #b45309; }
.stat-orders   .stat-icon { background: var(--success-soft); color: var(--success); }
.stat-revenue  .stat-icon { background: rgba(16, 185, 129, 0.1); color: #059669; }
.stat-value { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }

.admin-tabs-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-tabs-bar::-webkit-scrollbar { display: none; }
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-white);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-fast);
  white-space: nowrap;
}
.admin-tab:hover { border-color: var(--accent); color: var(--accent); }
.admin-tab.active { background: #1f2937; border-color: #1f2937; color: #fff; }

.admin-panel-content {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.admin-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.admin-table-header h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-table-header h3 i { color: var(--accent); }

.admin-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
}
.admin-search-bar i { color: var(--text-subtle); font-size: 0.8rem; }
.admin-search-bar input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.84rem;
  color: var(--text-main);
  min-width: 180px;
}

.admin-data-table { overflow-x: auto; }

.admin-row-head {
  display: grid; align-items: center; padding: 10px 16px; gap: 12px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-subtle); margin-bottom: 4px;
}
.admin-row {
  display: grid; align-items: center; padding: 12px 16px; gap: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}
.admin-row:hover { background: var(--bg-soft); }
.admin-row.suspended { opacity: 0.55; }

.admin-users-row    { grid-template-columns: 38px 1.4fr 1.8fr 90px 110px auto; }
.admin-sellers-row  { grid-template-columns: 38px 1.4fr 1.3fr 90px 100px 100px auto; }
.admin-products-row { grid-template-columns: 44px 1.8fr 1.2fr 110px 70px auto; }
.admin-orders-row   { grid-template-columns: 1.3fr 1.5fr 1fr 110px 90px 90px; }
.admin-users-row, .admin-sellers-row, .admin-products-row, .admin-orders-row { min-width: 760px; }

.admin-row-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid; place-items: center;
  font-size: 0.9rem;
}
.admin-row-thumb {
  width: 40px; height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.admin-text-name { font-weight: 700; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-text-muted { color: var(--text-muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-text-mono { font-family: 'Courier New', monospace; font-size: 0.76rem; color: var(--text-muted); word-break: break-all; }
.admin-row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.admin-role-badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.admin-role-badge.ADMIN  { background: var(--accent-soft); color: var(--accent); }
.admin-role-badge.SELLER { background: var(--warning-soft); color: #b45309; }
.admin-role-badge.BUYER  { background: var(--info-soft); color: var(--info); }

.suspended-badge {
  padding: 2px 8px;
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: var(--radius-full);
  font-size: 0.66rem;
  font-weight: 800;
}

.admin-empty-state {
  text-align: center;
  padding: 46px 20px;
  color: var(--text-subtle);
  font-size: 0.9rem;
}

/* ═════════════════════════ MODALS ═════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 24, 28, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.22s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
}
.modal-sm { max-width: 440px; }
.modal-md { max-width: 620px; }
.modal-lg { max-width: 860px; }

.modal-close-btn {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-muted);
  border-radius: 50%;
  font-size: 0.85rem;
  z-index: 5;
  transition: var(--transition-fast);
}
.modal-close-btn:hover { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-header h3 i { color: var(--accent); }

.modal-body { padding: 24px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.modal-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ── Auth modal ── */
.auth-modal-box { padding: 30px 26px; text-align: center; }
.auth-modal-header { margin-bottom: 20px; }
.auth-brand-logo {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font-size: 1.4rem;
  box-shadow: 0 8px 22px rgba(224, 73, 62, 0.35);
}
.auth-modal-header h3 { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 800; }
.auth-sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

.auth-tabs {
  display: flex;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  padding: 9px 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition-fast);
}
.auth-tab.active { background: var(--bg-white); color: var(--accent); box-shadow: var(--shadow-sm); }

.auth-modal-box .modal-body { padding: 0; text-align: left; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 7px;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition-fast);
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-control::placeholder { color: var(--text-subtle); }
textarea.form-control { resize: vertical; }
.file-input-control { padding: 8px; background: var(--bg-soft); }
.form-help { font-size: 0.74rem; color: var(--text-muted); line-height: 1.5; display: block; margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.highlight-box {
  background: var(--accent-soft);
  border: 1px dashed rgba(224, 73, 62, 0.35);
  border-radius: var(--radius-md);
  padding: 16px;
}
.highlight-box .form-group:last-child { margin-bottom: 0; }

.input-prefix-group { display: flex; align-items: stretch; }
.prefix-addon {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border-strong);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}
.input-prefix-group .form-control { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.uploaded-file-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--success-soft);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  flex-wrap: wrap;
}

/* ── Product detail modal ── */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 26px;
  align-items: start;
}
.product-detail-media {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.product-detail-media img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.prod-category-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.product-detail-info h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 14px;
}

.seller-info-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}
.seller-avatar-sm {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid; place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.seller-store-name { font-weight: 700; font-size: 0.9rem; }
.saweria-target-tag { font-size: 0.76rem; color: var(--saweria-amber); font-weight: 600; }
.saweria-target-tag span { color: var(--saweria-amber); }

.price-stock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  margin-bottom: 14px;
}
.prod-price { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.stock-status { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }

.prod-description { font-size: 0.9rem; line-height: 1.7; color: var(--text-muted); margin-bottom: 16px; white-space: pre-line; }

.digital-delivery-notice {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--warning-soft);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  line-height: 1.55;
}
.digital-delivery-notice i { font-size: 1.1rem; margin-top: 2px; }
.digital-delivery-notice p { margin-top: 3px; color: var(--text-muted); }

/* ── Cart modal ── */
.cart-seller-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}
.cart-seller-header i { color: var(--accent); }
.cart-seller-header .badge-pill { box-shadow: none; background: var(--bg-white); }

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-top: 1px solid var(--border);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title {
  font-size: 0.86rem;
  font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cart-item-price { font-size: 0.82rem; color: var(--accent); font-weight: 700; margin-top: 2px; }

.cart-empty-state {
  text-align: center;
  padding: 44px 20px;
  color: var(--text-subtle);
}
.cart-empty-state i { margin-bottom: 12px; }

/* ── Checkout QRIS modal ── */
.saweria-modal-theme { border-top: 4px solid var(--saweria-amber); }

.saweria-checkout-header { text-align: center; padding: 26px 24px 0; }
.saweria-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--warning-soft);
  color: #b45309;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.saweria-checkout-header h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  margin: 12px 0 6px;
}
.seller-target-sub { font-size: 0.84rem; color: var(--text-muted); }
.seller-target-sub .highlight { color: var(--saweria-amber); font-weight: 700; }

.order-summary-box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.summary-row.total-row {
  border-top: 1px dashed var(--border-strong);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 1rem;
}
.summary-row.total-row strong { font-family: var(--font-heading); font-size: 1.15rem; }

.qr-container { text-align: center; }
.qr-image-wrapper {
  display: inline-block;
  padding: 14px;
  background: var(--bg-white);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.qr-instruction {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 380px;
  margin: 14px auto 0;
}

.payment-status-monitor { margin-top: 18px; }
.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 700;
}
.status-indicator.pending { background: var(--warning-soft); color: #b45309; }
.status-indicator.success { background: var(--success-soft); color: var(--success); }
.status-indicator.warning { background: var(--danger-soft); color: var(--danger); }

.spinner-sm {
  width: 16px; height: 16px;
  border: 2.5px solid rgba(180, 83, 9, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.qr-expiry-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}
.qr-expiry-bar i { color: var(--warning); }

/* ── Confirm dialog ── */
.confirm-modal-box { padding: 30px 26px; text-align: center; }
.confirm-icon {
  width: 54px; height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
  display: grid; place-items: center;
  font-size: 1.3rem;
}
.confirm-title { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 800; margin-bottom: 8px; }
.confirm-message { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 22px; word-break: break-word; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.confirm-actions .btn { min-width: 110px; }

/* ═════════════════════════ TOAST ═════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
}
.toast {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-left-width: 4px;
  color: var(--text-main);
  padding: 13px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  min-width: 260px;
  transition: opacity 0.3s ease;
}
.toast i { font-size: 1rem; flex-shrink: 0; }
.toast.success { border-left-color: var(--success); }
.toast.success i { color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.warning i { color: var(--warning); }
.toast.info { border-left-color: var(--info); }
.toast.info i { color: var(--info); }
.toast.error { border-left-color: var(--danger); }
.toast.error i { color: var(--danger); }

/* ═════════════════════════ RESPONSIVE ═════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
  .product-detail-layout { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

/* Mobile landscape / small tablet */
@media (max-width: 768px) {
  .container { padding: 0 14px; }
  .main-content { padding: 22px 14px 60px; }

  /* Fade hint for horizontally scrollable rows */
  .nav-actions, .category-tabs, .dashboard-tabs, .admin-tabs-bar {
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
  }

  .nav-container { gap: 10px; }
  .nav-top-row { flex-wrap: wrap; gap: 12px; }
  .brand-logo { order: 1; }
  .nav-icon-group { order: 2; }
  .nav-search { order: 3; flex-basis: 100%; max-width: none; }
  .logo-text { font-size: 1.2rem; }
  .login-btn-label { display: none; }

  .hero-banner { padding: 40px 0 30px; }
  .hero-usps { gap: 8px; }
  .usp-item { font-size: 0.72rem; padding: 8px 12px; }

  .filter-section { flex-direction: column; align-items: stretch; }
  .seller-filter { justify-content: flex-end; }

  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }

  .form-row { grid-template-columns: 1fr; gap: 0; }

  .seller-profile-card { padding: 18px; }
  .seller-actions-header { width: 100%; }
  .seller-actions-header .btn { flex: 1; }

  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box {
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
    animation: sheetUp 0.3s cubic-bezier(0.3, 0.9, 0.4, 1);
  }
  @keyframes sheetUp { from { transform: translateY(40px); } to { transform: translateY(0); } }
  .modal-lg, .modal-md, .modal-sm { max-width: none; }

  .toast-container { bottom: 14px; right: 14px; left: 14px; max-width: none; }
  .toast { min-width: 0; }

  .order-item-details { padding: 14px; }
  .order-card-header { padding: 12px 14px; }

  .admin-panel-header { padding: 18px; }
}

/* Small phones */
@media (max-width: 420px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body { padding: 10px; }
  .product-title { font-size: 0.86rem; }
  .product-price-tag { font-size: 0.9rem; }
  .card-action-btns { width: 100%; }
  .card-action-btns .btn { flex: 1; padding: 7px 8px; }
  .product-desc-snippet { display: none; }

  .hero-actions .btn { flex: 1; justify-content: center; }
  .nav-btn { padding: 11px 14px; font-size: 0.82rem; }
  .user-meta-info { display: none; }
  .user-profile-pill { padding: 4px; gap: 4px; }

  .modal-actions { flex-direction: column; }
  .stat-value { font-size: 1.1rem; }
}

/* Reduce motion (aksesibilitas) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
