/* ============================================================
   assets/css/style.css — DropShip Pro Dark UI
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
  --bg-body:     #080810;
  --bg-card:     #12121e;
  --bg-sidebar:  #0e0e1a;
  --bg-input:    #1a1a2e;
  --bg-hover:    #1e1e35;
  --accent:      #7c3aed;
  --accent-2:    #8b5cf6;
  --accent-glow: rgba(124,58,237,0.25);
  --accent-border: rgba(124,58,237,0.5);
  --gold:        #f59e0b;
  --text-1:      #f1f5f9;
  --text-2:      #94a3b8;
  --text-3:      #64748b;
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(124,58,237,0.3);
  --success:     #10b981;
  --warning:     #f59e0b;
  --danger:      #ef4444;
  --info:        #3b82f6;
  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   18px;
  --sidebar-w:   240px;
  --topbar-h:    64px;
  --transition:  0.2s ease;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 24px var(--accent-glow);
}

/* ---- Light Theme Override ---- */
html[data-theme="light"] {
  --bg-body:     #f4f6fb;
  --bg-card:     #ffffff;
  --bg-sidebar:  #ffffff;
  --bg-input:    #f0f2f7;
  --bg-hover:    #ebedf5;
  --accent:      #7c3aed;
  --accent-2:    #8b5cf6;
  --accent-glow: rgba(124,58,237,0.12);
  --accent-border: rgba(124,58,237,0.35);
  --text-1:      #1e293b;
  --text-2:      #475569;
  --text-3:      #94a3b8;
  --border:      rgba(0,0,0,0.08);
  --border-2:    rgba(124,58,237,0.25);
  --shadow:      0 4px 24px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 24px var(--accent-glow);
}

/* Light theme specific overrides */
html[data-theme="light"] .auth-page {
  background: radial-gradient(ellipse at 50% 0%, rgba(124,58,237,0.08) 0%, transparent 70%), var(--bg-body);
}
html[data-theme="light"] .navbar {
  background: rgba(255,255,255,0.85);
}
html[data-theme="light"] .locked-overlay-card {
  background: rgba(255,255,255,0.96);
}
html[data-theme="light"] .credit-lock-overlay {
  background: rgba(244,246,251,0.92);
}
html[data-theme="light"] .locked-benefits li {
  border-bottom-color: rgba(0,0,0,0.06);
}
html[data-theme="light"] .price-amount {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
html[data-theme="light"] .hero h1 span {
  background: linear-gradient(135deg, var(--accent), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
html[data-theme="light"] .hero {
  background: radial-gradient(ellipse at 50% -20%, rgba(124,58,237,0.1) 0%, transparent 70%);
}
html[data-theme="light"] .modal-overlay {
  background: rgba(0,0,0,0.45);
}
html[data-theme="light"] .spinner {
  border-color: rgba(0,0,0,0.15);
  border-top-color: var(--accent);
}
html[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%;
}
html[data-theme="light"] .alert-success { background: rgba(16,185,129,0.08); color: #047857; }
html[data-theme="light"] .alert-error   { background: rgba(239,68,68,0.08);  color: #b91c1c; }
html[data-theme="light"] .alert-info    { background: rgba(59,130,246,0.08); color: #1d4ed8; }
html[data-theme="light"] .toast-success { background: rgba(16,185,129,0.1); color: #047857; }
html[data-theme="light"] .toast-error   { background: rgba(239,68,68,0.1); color: #b91c1c; }
html[data-theme="light"] .toast-info    { background: rgba(59,130,246,0.1); color: #1d4ed8; }
html[data-theme="light"] .toast { box-shadow: 0 8px 32px rgba(0,0,0,.12); }
html[data-theme="light"] .nav-links { background: var(--bg-card); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
html[data-theme="light"] .clo-card { box-shadow: 0 8px 32px rgba(0,0,0,.12); }
html[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg-body); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,.12); }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.2); }
html[data-theme="light"] .sidebar::-webkit-scrollbar-thumb { background: rgba(0,0,0,.08); }
html[data-theme="light"] .form-control:hover:not(:focus) { border-color: rgba(0,0,0,.15); }
html[data-theme="light"] .sidebar { border-right: 1px solid rgba(0,0,0,.08); box-shadow: 2px 0 8px rgba(0,0,0,.04); }
html[data-theme="light"] .sidebar .nav-item:hover,
html[data-theme="light"] .sidebar .nav-item.active { background: rgba(124,58,237,.08); }
html[data-theme="light"] .topbar { border-bottom-color: rgba(0,0,0,.08); }
html[data-theme="light"] ::selection { background: rgba(124,58,237,.25); color: #1e293b; }
html[data-theme="light"] .wbc-amount {
  background: linear-gradient(135deg, #d97706, #b45309);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
html[data-theme="light"] .back-to-top { box-shadow: 0 4px 16px rgba(124,58,237,.2); }
html[data-theme="light"] .row-highlight { background: rgba(245,158,11,.06) !important; }
html[data-theme="light"] .row-highlight:hover { background: rgba(245,158,11,.1) !important; }

/* ---- Theme Transition ---- */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background-color 0.4s ease, color 0.3s ease, border-color 0.3s ease,
              box-shadow 0.3s ease, fill 0.3s ease !important;
}

/* ---- Theme Toggle Button ---- */
.theme-toggle {
  position: relative;
  width: 48px; height: 26px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: background .3s, border-color .3s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle-track, .theme-toggle-icon, .theme-toggle-thumb {
  pointer-events: none;
}
.theme-toggle-track {
  position: relative;
  width: 100%; height: 100%;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 5px;
  font-size: .65rem;
  line-height: 1;
}
.theme-toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 50%;
  transition: transform .3s cubic-bezier(.4,.0,.2,1);
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  z-index: 2;
  transform: translateX(22px);
}
html[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(0);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-body);
  color: var(--text-1);
  min-height: 100vh;
  line-height: 1.6;
}
a { color: var(--accent-2); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text-1); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---- Typography ---- */
h1 { font-size: 1.8rem; font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--text-2); }

/* ---- Auth Pages ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,58,237,0.15) 0%, transparent 70%), var(--bg-body);
}
.auth-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
  position: relative;
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.auth-logo h1 { font-size: 1.5rem; margin-bottom: 4px; }
.auth-logo p  { font-size: 0.85rem; color: var(--text-3); }
.auth-box h2  { font-size: 1.25rem; margin-bottom: 24px; text-align: center; }

/* ---- Forms ---- */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  padding: 11px 14px;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-3); }
select.form-control option { background: var(--bg-input); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--accent-2);
}
.btn-outline:hover { background: var(--accent-glow); color: var(--text-1); }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-danger:hover  { background: #dc2626; color: #fff; transform: translateY(-1px); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-1); border-color: var(--border-2); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; padding: 12px; font-size: 0.95rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---- Layout: Dashboard Shell ---- */
.app-shell { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--transition);
}
.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.brand-name { font-size: 1rem; font-weight: 700; }
.brand-tag  { font-size: 0.65rem; color: var(--accent-2); background: var(--accent-glow);
              padding: 1px 6px; border-radius: 20px; border: 1px solid var(--accent-border); }

.sidebar-nav { flex: 1; padding: 16px 0; }
.nav-section-label {
  font-size: 0.65rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 20px 6px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 0;
  transition: all var(--transition);
  position: relative;
  cursor: pointer;
  text-decoration: none;
}
.nav-item:hover { color: var(--text-1); background: var(--bg-hover); }
.nav-item.active {
  color: var(--text-1);
  background: linear-gradient(90deg, rgba(124,58,237,0.18), transparent);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 0 2px 2px 0;
}
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}
.user-info .user-name  { font-size: 0.85rem; font-weight: 600; }
.user-info .user-role  { font-size: 0.72rem; color: var(--text-3); text-transform: capitalize; }

/* ---- Top Bar ---- */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 50;
  gap: 16px;
}
.topbar-title { font-size: 1.05rem; font-weight: 600; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ---- Main Content Area ---- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page-content { padding: 28px; flex: 1; }

/* ---- Page Header ---- */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header h1 { font-size: 1.5rem; }
.page-header p   { font-size: 0.85rem; color: var(--text-3); margin-top: 2px; }

/* ---- Stat Cards ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.stat-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: var(--accent-glow);
  border-radius: 50%;
  transform: translate(30px, -30px);
}
.stat-icon {
  font-size: 1.4rem; margin-bottom: 10px;
  background: var(--accent-glow);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--accent-border);
}
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.78rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.card-header h2 { font-size: 1rem; }
.card-body { padding: 22px; }

/* ---- Search Bar ---- */
.search-wrap {
  position: relative; flex: 1; max-width: 360px;
}
.search-wrap input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-1);
  padding: 9px 14px 9px 38px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition);
}
.search-wrap input:focus { border-color: var(--accent); }
.search-wrap .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.filter-row {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 20px;
}

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 12px 16px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-hover); }
tbody td {
  padding: 13px 16px;
  font-size: 0.88rem;
  vertical-align: middle;
  color: var(--text-1);
}
.td-actions { display: flex; gap: 6px; align-items: center; }

/* ---- Badges ---- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-success { background: rgba(16,185,129,0.15); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); border: 1px solid rgba(245,158,11,0.3); }
.badge-danger  { background: rgba(239,68,68,0.15);  color: var(--danger);  border: 1px solid rgba(239,68,68,0.3); }
.badge-info    { background: rgba(59,130,246,0.15); color: var(--info);    border: 1px solid rgba(59,130,246,0.3); }
.badge-purple  { background: var(--accent-glow); color: var(--accent-2); border: 1px solid var(--accent-border); }

/* ---- Alert / Flash Messages ---- */
.alert {
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
}
.alert-success { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-error   { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.3);  color: #fca5a5; }
.alert-info    { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); color: #93c5fd; }

/* ---- Product Grid / Creative Grid ---- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.product-card:hover {
  border-color: var(--border-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}
.product-thumb {
  width: 100%; height: 180px;
  background: var(--bg-input);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--text-3);
  overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 16px; }
.product-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; }
.product-prices {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.price-sell  { font-size: 1.1rem; font-weight: 700; color: var(--text-1); }
.price-cost  { font-size: 0.78rem; color: var(--text-3); }
.product-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}

/* ---- Creative Grid ---- */
.creative-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.creative-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
.creative-thumb {
  width: 100%; aspect-ratio: 16/9;
  background: var(--bg-input);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative; cursor: pointer;
}
.creative-thumb img  { width: 100%; height: 100%; object-fit: cover; }
.creative-thumb video { width: 100%; height: 100%; object-fit: cover; }
.play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4);
}
.play-btn {
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--accent); transition: transform var(--transition);
}
.creative-card:hover .play-btn { transform: scale(1.1); }
.creative-body { padding: 12px 14px; }
.creative-meta { font-size: 0.78rem; color: var(--text-3); margin-top: 4px; }

/* ---- Guide Card ---- */
.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: all var(--transition);
}
.guide-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.guide-card h3 { font-size: 1rem; margin-bottom: 8px; }
.guide-card p  { font-size: 0.84rem; color: var(--text-2); margin-bottom: 14px;
                 display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- Funnel Card ---- */
.funnel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.funnel-card:hover { border-color: var(--border-2); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.funnel-thumb {
  width: 100%; aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--bg-input), var(--bg-hover));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--text-3); overflow: hidden;
}
.funnel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.funnel-body    { padding: 14px 16px; }
.funnel-actions { padding: 10px 16px; border-top: 1px solid var(--border);
                  display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition);
}
.modal-overlay.open .modal-box { transform: scale(1); }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 1.05rem; }
.modal-close {
  background: none; border: none; color: var(--text-3);
  cursor: pointer; font-size: 1.4rem; line-height: 1;
  transition: color var(--transition); padding: 0;
}
.modal-close:hover { color: var(--text-1); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ---- Guide Content (rich HTML) ---- */
.guide-content { max-width: 760px; }
.guide-content h2 { font-size: 1.3rem; margin: 24px 0 10px; color: var(--text-1); }
.guide-content h3 { font-size: 1.05rem; margin: 18px 0 8px; color: var(--accent-2); }
.guide-content p  { color: var(--text-2); margin-bottom: 12px; line-height: 1.75; }
.guide-content ul, .guide-content ol { padding-left: 20px; margin-bottom: 14px; color: var(--text-2); }
.guide-content li { margin-bottom: 6px; line-height: 1.6; }
.guide-content strong { color: var(--text-1); }
.guide-content code {
  background: var(--bg-input); color: var(--accent-2);
  padding: 2px 8px; border-radius: 4px; font-size: 0.85em; font-family: monospace;
}

/* ---- File Upload Zone ---- */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.upload-zone p { font-size: 0.85rem; color: var(--text-3); margin-top: 8px; }

/* ---- Pagination ---- */
.pagination {
  display: flex; align-items: center; gap: 6px;
  justify-content: center; padding: 24px 0;
}
.btn-page {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.85rem; font-weight: 500;
  transition: all var(--transition); text-decoration: none;
}
.btn-page:hover { border-color: var(--accent); color: var(--text-1); }
.btn-page.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- Empty State ---- */
.empty-state {
  text-align: center; padding: 60px 20px;
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 14px; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; }
.empty-state p  { font-size: 0.85rem; color: var(--text-3); }

/* ---- Public/Landing Page ---- */
.landing { min-height: 100vh; }
.navbar {
  padding: 16px 40px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,8,16,0.8);
}
.navbar-brand { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 700; }
.nav-links { display: flex; gap: 6px; }
.hero {
  padding: 100px 40px 80px;
  text-align: center;
  background: radial-gradient(ellipse at 50% -20%, rgba(124,58,237,0.2) 0%, transparent 70%);
}
.hero h1 { font-size: 3rem; font-weight: 800; max-width: 720px; margin: 0 auto 16px; line-height: 1.15; }
.hero h1 span { background: linear-gradient(135deg, var(--accent-2), #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 1.05rem; color: var(--text-2); max-width: 520px; margin: 0 auto 36px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.features { padding: 80px 40px; max-width: 1200px; margin: 0 auto; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px; margin-top: 40px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: all var(--transition);
}
.feature-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
.feature-icon { font-size: 1.8rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1rem; margin-bottom: 8px; }
.feature-card p  { font-size: 0.84rem; color: var(--text-2); }
.section-label {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent-2); font-weight: 600; margin-bottom: 10px;
}
.section-title { font-size: 2rem; font-weight: 700; }

/* ---- Admin-specific ---- */
.admin-badge {
  display: inline-block; padding: 2px 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 20px; font-size: 0.7rem; font-weight: 700; color: #fff;
}
.product-image-preview {
  width: 50px; height: 50px; object-fit: cover;
  border-radius: 6px; background: var(--bg-input);
  border: 1px solid var(--border);
}
.supplier-link { font-size: 0.78rem; color: var(--accent-2); max-width: 180px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ---- Hamburger (mobile) ---- */
.hamburger {
  display: none; background: none; border: none;
  cursor: pointer; padding: 4px; color: var(--text-1); font-size: 1.3rem;
}
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 99; }

/* ---- Misc ---- */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.text-muted { color: var(--text-3); }
.text-sm    { font-size: 0.82rem; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 20px; }
.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 20px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 10px; }
.ml-auto { margin-left: auto; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .hamburger { display: block; }
  .hero h1 { font-size: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 16px; }
  .grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .navbar { padding: 14px 20px; }
}
@media (max-width: 560px) {
  .auth-box { padding: 30px 22px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 60px 20px; }
  .features { padding: 50px 20px; }
  .filter-row { gap: 8px; }
}

/* ---- Loading Spinner ---- */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Skeleton Loader ---- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============================================================
   COMMERCE & ACCESS CONTROL UI — Locked Screen, Buy Button
   ============================================================ */

/* ---- Locked Wrapper ---- */
.locked-wrapper {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.locked-blur-bg {
    position: absolute;
    inset: 0;
    filter: blur(8px) brightness(0.4);
    overflow: hidden;
    pointer-events: none;
    border-radius: var(--radius-lg);
}

.locked-overlay-card {
    position: relative;
    z-index: 2;
    background: rgba(18, 18, 30, 0.96);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6), var(--shadow-glow);
    backdrop-filter: blur(20px);
}

.locked-badge {
    display: inline-block;
    padding: 4px 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .1em;
    color: #fff;
    margin-bottom: 16px;
}

.locked-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-1);
}

.locked-subtitle {
    font-size: .88rem;
    color: var(--text-3);
    margin-bottom: 20px;
}

.locked-problem {
    background: rgba(239, 68, 68, .08);
    border: 1px solid rgba(239, 68, 68, .2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}
.locked-problem p, .locked-solution p {
    font-size: .84rem;
    color: var(--text-2);
    margin: 0;
}
.problem-icon, .solution-icon { font-size: 1.2rem; flex-shrink: 0; }

.locked-solution {
    background: rgba(16, 185, 129, .08);
    border: 1px solid rgba(16, 185, 129, .2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}

.locked-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    text-align: left;
}
.locked-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
    font-size: .85rem;
    color: var(--text-1);
}
.locked-benefits li:last-child { border-bottom: none; }
.check-icon { flex-shrink: 0; font-size: .9rem; }

.locked-price-block {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 20px;
}
.price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 6px;
}
.price-currency {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-2);
}
.price-amount {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #fff, var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.price-note {
    font-size: .75rem;
    color: var(--text-3);
}

/* ---- Buy CTA Button ---- */
.btn-buy-cta {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(37,211,102,.3);
    margin-bottom: 12px;
    letter-spacing: .01em;
}
.btn-buy-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(37,211,102,.4);
    color: #fff;
}

.locked-note {
    font-size: .75rem;
    color: var(--text-3);
    margin: 0;
    line-height: 1.5;
}

/* ---- Filter Tab Style (reuse in admin) ---- */
.filter-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: .85rem;
    font-weight: 500;
    transition: all .2s;
    text-decoration: none;
}
.filter-tab:hover { border-color: var(--border-2); color: var(--text-1); }
.filter-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab-count {
    background: rgba(255,255,255,.15);
    padding: 1px 7px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
}

/* ---- Row highlight (pending orders) ---- */
.row-highlight { background: rgba(245,158,11,.04) !important; }
.row-highlight:hover { background: rgba(245,158,11,.08) !important; }

/* ---- Mini action buttons in table ---- */
.mini-btn {
    font-size: .7rem;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid var(--border);
    color: var(--text-2);
    text-decoration: none;
    background: var(--bg-input);
    transition: all .2s;
    white-space: nowrap;
}
.mini-btn:hover { border-color: var(--border-2); color: var(--text-1); }
.mini-btn.wa { border-color: rgba(37,211,102,.4); color: #25D366; }
.mini-btn.wa:hover { background: rgba(37,211,102,.1); }

/* ---- Creative type badge ---- */
.creative-type-badge {
    position: absolute; top: 8px; left: 8px;
    font-size: .65rem; padding: 2px 7px; border-radius: 20px;
    backdrop-filter: blur(8px); font-weight: 700;
}
.creative-type-badge.video { background: rgba(59,130,246,.85); color:#fff; }
.creative-type-badge.image { background: rgba(124,58,237,.85); color:#fff; }


/* ============================================================
   CREDIT SYSTEM — Global Styles
   Added for credit-based locked marketplace
   ============================================================ */

/* Sidebar credits chip */
.credits-chip {
    margin-left: auto;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-size: .65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    min-width: 28px;
    text-align: center;
    letter-spacing: .01em;
}

/* Credit lock overlay (blurred card layer) */
.credit-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 16, .88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}

.clo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    padding: 20px 22px;
    text-align: center;
    max-width: 260px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .6);
}

.clo-lock-icon  { font-size: 2rem; margin-bottom: 8px; }
.clo-title      { font-size: .9rem; font-weight: 700; margin-bottom: 10px; color: var(--text-1); }

.clo-credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, .15);
    border: 1px solid rgba(245, 158, 11, .3);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: .8rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 12px;
}

.clo-dep-warning {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    background: rgba(239, 68, 68, .1);
    border: 1px solid rgba(239, 68, 68, .25);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: .78rem;
    color: var(--danger);
    text-align: left;
    margin-bottom: 10px;
}
.clo-dep-warning span { flex-shrink: 0; margin-top: 2px; }

.clo-sub        { font-size: .77rem; color: var(--text-3); margin-bottom: 12px; }

.clo-btn-unlock {
    width: 100%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    margin-bottom: 10px;
}
.clo-btn-unlock:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow, rgba(124,58,237,.4));
}

.clo-wallet-link { display: block; font-size: .75rem; color: var(--text-3); margin-top: 4px; }
.clo-wallet-link:hover { color: var(--accent-2); }

/* Blurred content wrapper */
.locked-content-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    min-height: 160px;
}
.locked-content-blur {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

/* Funnel card specifics */
.funnel-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all .2s;
    display: flex;
    flex-direction: column;
}
.funnel-card:hover {
    border-color: var(--border-2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.funnel-thumb {
    height: 180px;
    overflow: hidden;
    position: relative;
    background: var(--bg-input);
}
.funnel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.funnel-card:hover .funnel-thumb img { transform: scale(1.04); }
.funnel-body   { padding: 14px 16px; flex: 1; }
.funnel-actions {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

/* Creative card grid */
.creative-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .2s;
    display: flex;
    flex-direction: column;
}
.creative-card:hover {
    border-color: var(--border-2);
    transform: translateY(-2px);
}
.creative-thumb {
    height: 140px;
    overflow: hidden;
    background: var(--bg-input);
    cursor: pointer;
}
.creative-thumb video,
.creative-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.creative-card:hover .creative-thumb video,
.creative-card:hover .creative-thumb img { transform: scale(1.04); }

.creative-body { padding: 10px 12px; flex: 1; }
.creative-meta { font-size: .75rem; color: var(--text-3); }

/* Play button overlay (unlocked video) */
.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
}
.creative-thumb:hover .play-overlay { opacity: 1; }
.play-btn {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #111;
    padding-left: 3px;
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

/* Filter tabs */
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--text-2);
    text-decoration: none;
    transition: all .15s;
    background: var(--bg-card);
}
.filter-tab:hover  { border-color: var(--accent); color: var(--accent); }
.filter-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Dependency lock notice */
.dep-lock-notice {
    background: rgba(239, 68, 68, .08);
    border: 1px solid rgba(239, 68, 68, .25);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.dln-icon { font-size: 2.2rem; }

/* Wallet page */
.wallet-balance-card {
    background: linear-gradient(135deg, rgba(124,58,237,.2), rgba(139,92,246,.1));
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.wbc-inner  { text-align: center; }
.wbc-label  { font-size: .8rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.wbc-amount {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.wbc-unit      { font-size: .9rem; color: var(--text-2); margin-top: -4px; }
.wbc-info      { display: flex; gap: 24px; align-items: center; }
.wbc-divider   { width: 1px; height: 40px; background: var(--border); }
.wbc-stat      { text-align: center; }
.wbc-stat-v    { display: block; font-size: 1.6rem; font-weight: 700; }
.wbc-stat-l    { font-size: .75rem; color: var(--text-3); }

/* Credit package cards */
.pkg-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    position: relative;
    transition: transform .2s;
}
.pkg-card:hover         { transform: translateY(-2px); }
.pkg-card.popular       { border-color: rgba(245,158,11,.4); }
.pkg-popular-tag {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: #f59e0b; color: #000; font-size: .65rem; font-weight: 800;
    padding: 2px 10px; border-radius: 20px; white-space: nowrap;
}
.pkg-name     { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.pkg-credits  { font-size: 2rem; font-weight: 800; color: var(--text-1); }
.pkg-unit     { font-size: .7rem; color: var(--text-3); margin-top: -4px; }
.pkg-price    { font-size: .95rem; font-weight: 700; color: var(--success); margin-top: 6px; }

/* Guide card */
.guide-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all .2s;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}
.guide-card:not(.locked-card):hover {
    border-color: var(--border-2);
    transform: translateY(-2px);
}

/* Credit balance pill (used across pages) */
.credits-balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245,158,11,.15);
    border: 1px solid rgba(245,158,11,.35);
    border-radius: 20px;
    padding: 6px 14px;
    font-weight: 700;
    font-size: .88rem;
    color: #f59e0b;
}

/* Credit info strip (products page) */
.credit-info-strip {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.cis-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-right: 1px solid var(--border);
    font-size: .82rem;
}
.cis-item:last-child { border-right: none; }
.cis-icon { font-size: 1.4rem; }
.cis-item strong { display: block; font-size: .84rem; color: var(--text-1); }
.cis-item small  { color: var(--text-3); }

@media (max-width: 700px) {
    .credit-info-strip { flex-wrap: wrap; }
    .cis-item { min-width: 50%; border-bottom: 1px solid var(--border); border-right: none; }
    .wallet-balance-card { justify-content: center; text-align: center; }
    .wbc-info { justify-content: center; }
}

/* Guide content styles */
.guide-content h2 { font-size: 1.1rem; margin-top: 20px; margin-bottom: 10px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.guide-content h3 { font-size: .95rem; margin-top: 16px; margin-bottom: 8px; color: var(--accent-2); }
.guide-content p  { font-size: .88rem; line-height: 1.75; color: var(--text-2); margin-bottom: 10px; }
.guide-content ul, .guide-content ol { padding-left: 20px; margin-bottom: 12px; }
.guide-content li { font-size: .88rem; line-height: 1.7; color: var(--text-2); margin-bottom: 4px; }
.guide-content code { background: var(--bg-input); padding: 2px 6px; border-radius: 4px; font-size: .82rem; }
.guide-content pre { background: var(--bg-input); padding: 14px; border-radius: var(--radius-sm); overflow-x: auto; margin-bottom: 12px; }

/* ============================================================
   CONSOLIDATED PAGE-SPECIFIC STYLES
   (Moved from inline <style> blocks for performance)
   ============================================================ */

/* ---- Credits Balance Pill (dashboard, products) ---- */
.credits-balance-pill.large { font-size: 1rem; padding: 8px 18px; }

/* ---- Upsell Banner (dashboard) ---- */
.upsell-banner {
    background: linear-gradient(135deg, rgba(124,58,237,.15), rgba(139,92,246,.08));
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.upsell-content { display: flex; align-items: center; gap: 16px; }
.upsell-icon { font-size: 2.2rem; }
.upsell-content h3 { font-size: 1.05rem; margin-bottom: 4px; }
.upsell-content p { font-size: .85rem; color: var(--text-2); }

/* ---- Product Card Unlocked State ---- */
.product-card.unlocked { border-color: rgba(16,185,129,.3); }
.product-card.unlocked:hover { border-color: rgba(16,185,129,.6); box-shadow: 0 0 20px rgba(16,185,129,.1); }
.access-badge-thumb {
    position: absolute; top: 10px; right: 10px;
    font-size: .7rem; font-weight: 700; padding: 3px 9px; border-radius: 20px;
    backdrop-filter: blur(8px); background: rgba(16,185,129,.85); color: #fff;
}
.access-badge-thumb.locked { background: rgba(239,68,68,.8); }
.price-row-inr {
    display: flex; align-items: center; justify-content: space-between;
    padding: 5px 0; border-bottom: 1px solid var(--border);
}
.price-row-inr:last-child { border-bottom: none; }
.price-label { font-size: .72rem; color: var(--text-3); font-weight: 500; }
.price-sell { font-size: .92rem; font-weight: 700; color: var(--success); }
.price-cost { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.unlock-btn:disabled { opacity: .7; cursor: not-allowed; }

/* ---- Bar Chart (admin dashboard) ---- */
.bar-chart {
    display: flex; align-items: flex-end; gap: 8px;
    height: 160px; padding: 10px 0;
}
.bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.bar-label-top { font-size: .65rem; color: var(--text-3); margin-bottom: 4px; text-align: center; white-space: nowrap; }
.bar-track {
    flex: 1; width: 100%; background: var(--bg-input);
    border-radius: 4px 4px 0 0; display: flex; align-items: flex-end; overflow: hidden;
}
.bar-fill {
    width: 100%; background: linear-gradient(180deg, var(--accent-2), var(--accent));
    border-radius: 4px 4px 0 0; min-height: 4px; transition: height .4s ease;
}
.bar-label-bot { font-size: .7rem; color: var(--text-3); margin-top: 6px; font-weight: 500; }

/* ============================================================
   MOBILE RESPONSIVENESS IMPROVEMENTS
   ============================================================ */

/* Landing page mobile hamburger */
.mobile-nav-toggle {
    display: none; background: none; border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-1); font-size: 1.2rem;
    padding: 6px 10px; cursor: pointer; transition: all var(--transition);
}
.mobile-nav-toggle:hover { border-color: var(--accent); background: var(--accent-glow); }

@media (max-width: 700px) {
    .mobile-nav-toggle { display: inline-flex; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: var(--bg-card); border-bottom: 1px solid var(--border);
        flex-direction: column; padding: 12px 20px; gap: 8px; z-index: 100;
        box-shadow: 0 8px 24px rgba(0,0,0,.5);
    }
    .nav-links.open { display: flex; }
    .nav-links .btn { width: 100%; justify-content: center; }
}

/* Dashboard 2-column → stacked on mobile */
.dashboard-grid-2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px;
}
@media (max-width: 900px) {
    .dashboard-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .page-header { flex-direction: column; align-items: flex-start; }
    .page-header > div:last-child { width: 100%; }
    .upsell-banner { flex-direction: column; text-align: center; }
    .upsell-content { flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-value { font-size: 1.5rem; }
    .stat-card { padding: 14px; }
    .bar-chart { height: 120px; }
    .bar-label-top { font-size: .55rem; }
}

/* ============================================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================================ */

/* Focus outline for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Skip to main content link */
.skip-link {
    position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: #fff; padding: 10px 20px;
    border-radius: var(--radius-sm); font-weight: 600; z-index: 9999;
    transition: top .2s;
}
.skip-link:focus { top: 10px; }

/* ============================================================
   TOAST NOTIFICATION SYSTEM
   ============================================================ */
.toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
}
.toast {
    pointer-events: all;
    padding: 14px 20px; border-radius: var(--radius-sm);
    font-size: .88rem; font-weight: 500;
    display: flex; align-items: center; gap: 10px;
    max-width: 380px; width: max-content;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
    animation: toastIn .3s ease forwards;
    border: 1px solid transparent;
}
.toast-success { background: rgba(16,185,129,.15); border-color: rgba(16,185,129,.3); color: #6ee7b7; }
.toast-error   { background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.3); color: #fca5a5; }
.toast-info    { background: rgba(59,130,246,.15); border-color: rgba(59,130,246,.3); color: #93c5fd; }
.toast-dismiss {
    background: none; border: none; color: inherit; cursor: pointer;
    opacity: .6; font-size: 1.1rem; margin-left: auto; padding: 0;
}
.toast-dismiss:hover { opacity: 1; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
.toast.toast-out {
    animation: toastOut .3s ease forwards;
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(40px); }
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
.back-to-top {
    position: fixed; bottom: 24px; right: 24px;
    width: 44px; height: 44px;
    background: var(--accent); color: #fff;
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; cursor: pointer; z-index: 90;
    box-shadow: 0 4px 16px var(--accent-glow);
    opacity: 0; visibility: hidden;
    transition: all .3s ease;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 24px var(--accent-glow); }

/* ============================================================
   PAGE TRANSITION EFFECT
   ============================================================ */
.page-content {
    animation: fadeInUp .35s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   IMPROVED FORM STATES
   ============================================================ */
.form-control:hover:not(:focus) {
    border-color: rgba(255,255,255,.15);
}
.form-control.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}
.form-hint {
    font-size: .75rem; color: var(--text-3); margin-top: 4px;
}
.form-hint.error { color: var(--danger); }

/* Password strength indicator */
.password-strength {
    height: 3px; border-radius: 2px; margin-top: 6px;
    background: var(--bg-input); overflow: hidden;
}
.password-strength-bar {
    height: 100%; border-radius: 2px;
    transition: width .3s, background .3s;
}
.password-strength-bar.weak   { width: 33%; background: var(--danger); }
.password-strength-bar.medium { width: 66%; background: var(--warning); }
.password-strength-bar.strong { width: 100%; background: var(--success); }

/* ============================================================
   SMOOTH SCROLLBAR (Webkit)
   ============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); }

/* ============================================================
   NAVBAR POSITION FIX (landing)
   ============================================================ */
.navbar { position: sticky; }

/* ============================================================
   IMPROVED TABLE STYLES
   ============================================================ */
tbody tr { transition: background .15s ease; }
tbody td { transition: color .15s ease; }

/* ============================================================
   SELECTION COLOR
   ============================================================ */
::selection { background: rgba(124,58,237,.4); color: #fff; }

/* ============================================================
   INLINE CREDITS BADGE (admin tables)
   ============================================================ */
.credits-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245,158,11,.15);
    border: 1px solid rgba(245,158,11,.3);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: .76rem;
    font-weight: 700;
    color: #f59e0b;
    white-space: nowrap;
}

/* ============================================================
   TD ACTIONS (admin table action buttons)
   ============================================================ */
.td-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ============================================================
   DEPENDENCY LOCK NOTICE
   ============================================================ */
.dep-lock-notice {
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.25);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.dln-icon { font-size: 2.2rem; }

/* ============================================================
   CREATIVE TYPE BADGES
   ============================================================ */
.creative-type-badge {
    position: absolute; top: 8px; left: 8px;
    font-size: .65rem; padding: 2px 7px;
    border-radius: 20px; backdrop-filter: blur(8px);
    font-weight: 700;
}
.creative-type-badge.video { background: rgba(59,130,246,.8); color: #fff; }
.creative-type-badge.image { background: rgba(124,58,237,.8); color: #fff; }

/* ============================================================
   GUIDE CARD EXTRAS
   ============================================================ */
.guide-card { cursor: default; }
.guide-card.locked-card { opacity: .9; }
.guide-card-icon { font-size: 1.8rem; margin-bottom: 10px; }

/* ============================================================
   FUNNEL HERO STRIP
   ============================================================ */
.funnel-hero-strip {
    display: flex; gap: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}
.fhs-item {
    flex: 1; display: flex; align-items: center;
    gap: 10px; padding: 16px;
    border-right: 1px solid var(--border);
}
.fhs-item:last-child { border-right: none; }
.fhs-icon { font-size: 1.5rem; }
.fhs-item strong { display: block; font-size: .85rem; color: var(--text-1); }
.fhs-item small { color: var(--text-3); font-size: .75rem; }
@media (max-width: 700px) {
    .funnel-hero-strip { flex-wrap: wrap; }
    .fhs-item { min-width: 50%; border-bottom: 1px solid var(--border); border-right: none; }
}

/* ============================================================
   FUNNEL ACCESS BADGES
   ============================================================ */
.funnel-access-badge {
    position: absolute; top: 10px; right: 10px;
    font-size: .7rem; font-weight: 700; padding: 3px 9px;
    border-radius: 20px; backdrop-filter: blur(8px);
    background: rgba(245,158,11,.85); color: #000;
}
.funnel-access-badge.unlocked { background: rgba(16,185,129,.85); color: #fff; }
.funnel-access-badge.locked { background: rgba(59,130,246,.8); color: #fff; }

/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */
.product-detail-grid {
    display: grid; grid-template-columns: 1fr 2fr;
    gap: 24px; margin-bottom: 28px;
}
@media (max-width: 900px) {
    .product-detail-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ADMIN CREDITS 2-COL FORM
   ============================================================ */
.admin-form-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 800px) {
    .admin-form-grid { grid-template-columns: 1fr; }
}

/* User history 2-col inside card */
.user-history-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
@media (max-width: 800px) {
    .user-history-grid { grid-template-columns: 1fr; }
    .user-history-grid > div:first-child { border-right: none; border-bottom: 1px solid var(--border); }
}
