/* ═══════════════════════════════════════════
   RichyBuy Design System
   Premium Marketplace UI
   ═══════════════════════════════════════════ */

/* ── Root Variables ── */
:root {
  /* Primary */
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #60A5FA;
  --primary-subtle: rgba(37, 99, 235, 0.08);

  /* Secondary */
  --secondary: #3B82F6;

  /* Accent */
  --success: #10B981;
  --success-light: #34D399;
  --success-subtle: rgba(16, 185, 129, 0.08);
  --warning: #F59E0B;
  --warning-light: #FBBF24;
  --warning-subtle: rgba(245, 158, 11, 0.08);
  --danger: #EF4444;
  --danger-subtle: rgba(239, 68, 68, 0.08);

  /* Neutrals */
  --bg-main: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-dashboard: #F1F5F9;
  --bg-card: #FFFFFF;

  --text-dark: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  --border: #E2E8F0;
  --divider: #CBD5E1;

  /* Typography */
  --font: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --fw-heading: 700;
  --fw-heading-xl: 800;
  --fw-body: 400;
  --fw-body-medium: 500;
  --fw-button: 600;
  --lh-body: 1.6;

  /* Spacing (8-pt system) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-xxl: 32px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 8px 30px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.12);
  --shadow-modal: 0 30px 80px rgba(15, 23, 42, 0.18);
  --shadow-btn: 0 4px 12px rgba(37, 99, 235, 0.3);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Nav */
  --nav-height: 80px;
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --bg-main: #0F172A;
  --bg-secondary: #1E293B;
  --bg-card: #1E293B;
  --bg-dashboard: #0F172A;
  --text-dark: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #64748B;
  --border: #334155;
  --divider: #475569;
  --primary: #3B82F6;
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font);
  font-weight: var(--fw-body);
  line-height: var(--lh-body);
  color: var(--text-dark);
  background: var(--bg-main);
  padding-top: var(--nav-height);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: var(--fw-heading);
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: var(--text-dark);
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-weight: var(--fw-heading-xl);
  letter-spacing: -0.04em;
}

.lead { font-size: 1.15rem; font-weight: 400; color: var(--text-secondary); }
.text-muted { color: var(--text-muted) !important; }
.text-secondary-color { color: var(--text-secondary) !important; }
.small, small { font-size: 0.875rem; }

/* ── Backgrounds ── */
.bg-main { background: var(--bg-main); }
.bg-card { background: var(--bg-card); }
.bg-dashboard { background: var(--bg-dashboard); }

/* ── Layout ── */
.container { max-width: 1280px; }
.container-narrow { max-width: 900px; }
.section-padding { padding: var(--space-7) 0; }
.section-padding-sm { padding: var(--space-6) 0; }

/* ── Navigation ── */
.navbar-richybuy {
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  transition: box-shadow var(--transition);
  padding: 0;
}

.navbar-richybuy.scrolled {
  box-shadow: 0 1px 20px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .navbar-richybuy {
  background: rgba(15, 23, 42, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.navbar-richybuy .navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  color: var(--text-dark) !important;
  padding: var(--space-2) 0;
}

.brand-text { color: var(--primary); }
.brand-highlight { color: #F59E0B; }

[data-theme="dark"] .brand-text { color: #60A5FA; }
[data-theme="dark"] .brand-highlight { color: #FBBF24; }

/* Search bar in nav */
.nav-search-wrap {
  max-width: 520px;
  width: 100%;
}

.nav-search {
  background: var(--bg-dashboard);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px var(--space-3);
  transition: all var(--transition);
  display: flex;
  align-items: center;
}

.nav-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
  background: var(--bg-card);
}

.nav-search input {
  border: none;
  background: transparent;
  flex: 1;
  font-size: 0.925rem;
  padding: 6px 0;
  outline: none;
  color: var(--text-dark);
}

.nav-search input::placeholder { color: var(--text-muted); }
.nav-search .btn-search-nav {
  border: none;
  background: var(--primary);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
  cursor: pointer;
}

.nav-search .btn-search-nav:hover { background: var(--primary-dark); }

/* Nav links */
.navbar-richybuy .nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  font-size: 0.85rem;
  padding: var(--space-2) var(--space-2) !important;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.navbar-richybuy .nav-link:hover,
.navbar-richybuy .nav-link.active {
  color: var(--primary) !important;
  background: var(--primary-subtle);
}

.nav-icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.nav-icon-btn:hover {
  background: var(--primary-subtle);
  color: var(--primary);
}

.nav-icon-btn .badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

/* Sell button */
.btn-sell {
  background: var(--primary);
  color: white !important;
  font-weight: var(--fw-button) !important;
  font-size: 0.8rem !important;
  padding: 8px 16px !important;
  border-radius: var(--radius-md) !important;
  transition: all var(--transition) !important;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-sell:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn);
}

/* User avatar in nav */
.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border);
  transition: border-color var(--transition-fast);
  flex-shrink: 0;
}

.nav-avatar:hover { border-color: var(--primary); }

/* Right-side nav items — prevent overflow */
.navbar-right-items {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.navbar-right-items .nav-item {
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar-right-items .nav-icon-btn {
  flex-shrink: 0;
}

/* Megamenu */
.megamenu-wrap {
  position: static;
}

.megamenu {
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  padding: var(--space-4);
  background: var(--bg-card);
  margin-top: 8px;
}

[data-theme="dark"] .megamenu { background: var(--bg-secondary); }

.megamenu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

.megamenu .dropdown-item {
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-fast);
}

.megamenu .dropdown-item:hover {
  background: var(--primary-subtle);
  color: var(--primary);
  transform: translateX(4px);
}

.megamenu .dropdown-item .cat-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ── Hero Section ── */
.hero-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.1;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255,255,255,0.08) 0%, transparent 40%);
}

.hero-floating-shapes {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-shape {
  position: absolute;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
}

.hero-shape-1 { width: 400px; height: 400px; top: -100px; right: -100px; animation: floatShape 20s ease-in-out infinite; }
.hero-shape-2 { width: 250px; height: 250px; bottom: 10%; left: 5%; animation: floatShape 25s ease-in-out infinite reverse; }
.hero-shape-3 { width: 150px; height: 150px; top: 30%; right: 15%; animation: floatShape 18s ease-in-out infinite; }

@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(5deg); }
  66% { transform: translate(-20px, 20px) rotate(-3deg); }
}

.hero-content { position: relative; z-index: 1; padding: var(--space-7) 0; }

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: white;
  margin-bottom: var(--space-4);
}

.hero-title .highlight {
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 560px;
  margin-bottom: var(--space-5);
  line-height: 1.7;
}

/* Hero search */
.hero-search-wrap {
  max-width: 680px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 6px;
  display: flex;
  align-items: center;
}

.hero-search-wrap .hs-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 18px;
  font-size: 1rem;
  color: white;
  outline: none;
}

.hero-search-wrap .hs-input::placeholder { color: rgba(255, 255, 255, 0.5); }

.hero-search-wrap .hs-select {
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 14px 18px;
  font-size: 0.925rem;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  min-width: 150px;
}

.hero-search-wrap .hs-select option { color: var(--text-dark); background: white; }

.hero-search-wrap .hs-btn {
  background: var(--warning);
  color: var(--text-dark);
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.925rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.hero-search-wrap .hs-btn:hover {
  background: var(--warning-light);
  transform: translateY(-1px);
}

/* Hero badges */
.hero-badges { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-5); }
.hero-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.hero-badge:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.hero-badge i { font-size: 1rem; }

/* Hero stats */
.hero-stats-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding: var(--space-5);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.hero-stat { text-align: center; }
.hero-stat-value { font-size: 1.75rem; font-weight: 800; color: white; line-height: 1; margin-bottom: 4px; }
.hero-stat-label { font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); }

/* ── Section Headers ── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  gap: var(--space-3);
}

.section-header-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 4px; }
.section-header-subtitle { color: var(--text-muted); font-size: 0.925rem; }

/* ── Product / Listing Cards ── */
.listing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.listing-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: transparent;
}

.listing-card-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-dashboard);
}

.listing-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.listing-card:hover .listing-card-image-wrap img {
  transform: scale(1.08);
}

.listing-card-badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.listing-badge {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.listing-badge-featured {
  background: linear-gradient(135deg, var(--warning), var(--warning-light));
  color: var(--text-dark);
}

.listing-badge-urgent {
  background: var(--danger);
  color: white;
}

.listing-badge-sold {
  background: var(--success);
  color: white;
}

.listing-badge-premium {
  background: linear-gradient(135deg, var(--warning), var(--warning-light));
  color: var(--text-dark);
}

.boost-sales-badge {
  background: linear-gradient(135deg, #1565C0, #0D47A1);
  color: #fff;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.listing-card[data-viewed="1"] {
  border-color: transparent;
}

.listing-card-wishlist {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 3;
}

.listing-card-wishlist:hover {
  background: white;
  color: var(--danger);
  transform: scale(1.1);
}

.listing-card-wishlist.active { color: var(--danger); }

.listing-card-body {
  padding: var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.listing-card-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.listing-card-price .negotiable-tag {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--success);
  background: var(--success-subtle);
  padding: 2px 8px;
  border-radius: 100px;
}

.listing-card-title {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.listing-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: var(--space-3);
}

.listing-card-meta i { margin-right: 4px; }

.listing-card-seller {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
}

.listing-card-seller img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.listing-card-seller .seller-name { color: var(--text-secondary); font-weight: 500; }
.listing-card-seller .verified-icon { color: var(--success); font-size: 0.8rem; }

/* Quick action buttons on card hover */
.listing-card-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-3);
  display: flex;
  gap: var(--space-2);
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 2;
}

.listing-card:hover .listing-card-actions {
  opacity: 1;
  transform: translateY(0);
}

.listing-card-actions .btn-action {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-action-call { background: var(--success); color: white; }
.btn-action-call:hover { background: var(--success-light); }
.btn-action-whatsapp { background: #25D366; color: white; }
.btn-action-whatsapp:hover { background: #20BD5A; }
.btn-action-chat { background: var(--primary); color: white; }
.btn-action-chat:hover { background: var(--primary-dark); }

/* ── Category Cards ── */
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  height: 100%;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.category-card-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  transition: transform var(--transition);
}

.category-card:nth-child(6n+1) .category-card-icon { background: linear-gradient(135deg, #2563EB, #60A5FA); }
.category-card:nth-child(6n+2) .category-card-icon { background: linear-gradient(135deg, #10B981, #34D399); }
.category-card:nth-child(6n+3) .category-card-icon { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.category-card:nth-child(6n+4) .category-card-icon { background: linear-gradient(135deg, #EF4444, #F87171); }
.category-card:nth-child(6n+5) .category-card-icon { background: linear-gradient(135deg, #8B5CF6, #A78BFA); }
.category-card:nth-child(6n+6) .category-card-icon { background: linear-gradient(135deg, #EC4899, #F472B6); }

.category-card:hover .category-card-icon { transform: scale(1.1) rotate(-5deg); }

.category-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.category-card-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Buttons ── */
.btn {
  border-radius: var(--radius-md);
  font-weight: var(--fw-button);
  padding: 12px 24px;
  transition: all var(--transition);
  font-size: 0.925rem;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.btn-success:hover {
  background: #059669;
  color: white;
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #DC2626;
  color: white;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-dashboard);
  color: var(--text-dark);
}

.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.825rem; }
.btn-xs { padding: 4px 12px; font-size: 0.75rem; border-radius: var(--radius-sm); }

.btn-whatsapp {
  background: #25D366;
  color: white;
}

.btn-whatsapp:hover {
  background: #20BD5A;
  color: white;
  transform: translateY(-1px);
}

/* ── Form Controls ── */
.form-control, .form-select {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 12px 16px;
  font-size: 0.925rem;
  color: var(--text-dark);
  background: var(--bg-card);
  transition: all var(--transition-fast);
  line-height: 1.5;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
  outline: none;
}

.form-control::placeholder { color: var(--text-muted); }

.form-label {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-floating > .form-control { height: auto; min-height: 56px; }
.form-floating > label { padding: 16px; }

.input-group-custom {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.input-group-custom:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
}

.input-group-custom .input-icon {
  padding: 0 12px 0 16px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.input-group-custom input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 12px 12px 0;
  outline: none;
  font-size: 0.925rem;
  color: var(--text-dark);
}

.input-group-custom input::placeholder { color: var(--text-muted); }

/* ── Cards / Glass Cards (sparingly) ── */
.card-richybuy {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.card-richybuy:hover {
  box-shadow: var(--shadow-hover);
}

.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

[data-theme="dark"] .glass-card {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.05);
}

/* ── Badges ── */
.badge {
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
}

.badge-primary { background: var(--primary-subtle); color: var(--primary); }
.badge-success { background: var(--success-subtle); color: var(--success); }
.badge-warning { background: var(--warning-subtle); color: var(--warning); }
.badge-danger { background: var(--danger-subtle); color: var(--danger); }

/* ── Avatar ── */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 80px; height: 80px; }
.avatar-2xl { width: 120px; height: 120px; }

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-subtle);
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2rem;
}

/* ── Stats Cards ── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: var(--space-3);
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Tables ── */
.table-richybuy {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.table-richybuy thead th {
  background: var(--bg-dashboard);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: var(--space-3);
  border: none;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table-richybuy thead th:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.table-richybuy thead th:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

.table-richybuy tbody tr {
  transition: background var(--transition-fast);
}

.table-richybuy tbody tr:hover {
  background: var(--primary-subtle);
}

.table-richybuy tbody td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  vertical-align: middle;
}

/* ── Pagination ── */
.pagination-custom .page-link {
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--transition-fast);
  margin: 0 2px;
}

.pagination-custom .page-link:hover {
  background: var(--primary-subtle);
  color: var(--primary);
}

.pagination-custom .page-item.active .page-link {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ── Alerts ── */
.alert-richybuy {
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: 0.9rem;
}

.alert-richybuy.alert-success { background: var(--success-subtle); color: #065F46; }
.alert-richybuy.alert-danger { background: var(--danger-subtle); color: #991B1B; }
.alert-richybuy.alert-warning { background: var(--warning-subtle); color: #92400E; }
.alert-richybuy.alert-info { background: var(--primary-subtle); color: #1E40AF; }

/* ── Modal ── */
.modal-richybuy .modal-content {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
}

.modal-richybuy .modal-header {
  border: none;
  padding: var(--space-5) var(--space-5) 0;
}

.modal-richybuy .modal-body { padding: var(--space-4) var(--space-5); }
.modal-richybuy .modal-footer {
  border: none;
  padding: var(--space-4) var(--space-5);
}

/* ── Dropdown ── */
.dropdown-richybuy {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  padding: var(--space-2);
  background: var(--bg-card);
}

.dropdown-richybuy .dropdown-item {
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.dropdown-richybuy .dropdown-item:hover {
  background: var(--primary-subtle);
  color: var(--primary);
}

.dropdown-richybuy .dropdown-divider { border-color: var(--border); }

/* ── Notification Bell ── */
.notification-dropdown {
  width: 360px;
  max-height: 480px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border);
}

.notification-item:last-child { border-bottom: none; }
.notification-item:hover { background: var(--primary-subtle); }

.notification-item.unread {
  background: var(--primary-subtle);
  border-left: 3px solid var(--primary);
}

/* ── Chat / Messages ── */
.chat-sidebar {
  border-right: 1px solid var(--border);
  height: calc(100vh - var(--nav-height) - 2px);
  overflow-y: auto;
}

.chat-main {
  height: calc(100vh - var(--nav-height) - 2px);
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
}

.chat-bubble {
  max-width: 75%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: var(--space-2);
}

.chat-bubble.sent {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}

.chat-bubble.received {
  background: var(--bg-dashboard);
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
}

.chat-input-wrap {
  padding: var(--space-3);
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

/* ── Admin Sidebar (light theme defaults, overridden by admin_header.php inline dark styles) ── */
.admin-sidebar {
  width: 270px;
  min-height: calc(100vh - var(--nav-height));
  position: fixed;
  left: 0;
  top: var(--nav-height);
  overflow-y: auto;
  z-index: 100;
  padding: var(--space-3) 0;
}

.admin-sidebar .nav-link {
  padding: 10px var(--space-4);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition-fast);
}

.admin-sidebar .nav-link i { font-size: 1.1rem; width: 20px; text-align: center; }

.admin-sidebar .sidebar-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-3) var(--space-4) var(--space-2);
  font-weight: 600;
}

.admin-content {
  margin-left: 270px;
  padding: var(--space-5);
  min-height: calc(100vh - var(--nav-height));
}

/* ── Footer ── */
.footer-richybuy {
  background: var(--text-dark);
  color: rgba(255, 255, 255, 0.6);
  padding: var(--space-7) 0 var(--space-4);
}

[data-theme="dark"] .footer-richybuy {
  background: #020617;
}

.footer-richybuy .footer-title {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  margin-bottom: var(--space-4);
}

.footer-richybuy a {
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition-fast);
  font-size: 0.85rem;
}

.footer-richybuy a:hover { color: white !important; }

.footer-richybuy .social-link {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition: all var(--transition-fast);
  font-size: 1rem;
}

.footer-richybuy .social-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.footer-divider {
  border-color: rgba(255, 255, 255, 0.08);
  margin: var(--space-5) 0;
}

/* ── Tabs ── */
.tabs-richybuy {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-5);
}

.tabs-richybuy .tab-item {
  padding: var(--space-3) var(--space-4);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: -1px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.tabs-richybuy .tab-item:hover { color: var(--text-secondary); }
.tabs-richybuy .tab-item.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Skeleton Loaders ── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-dashboard) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--divider); }

/* ── Utilities ── */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }

.rounded-card { border-radius: var(--radius-lg); }
.rounded-btn { border-radius: var(--radius-md); }
.rounded-input { border-radius: var(--radius-md); }
.rounded-pill-custom { border-radius: 100px; }

.shadow-card { box-shadow: var(--shadow-card); }
.shadow-hover { transition: box-shadow var(--transition); }
.shadow-hover:hover { box-shadow: var(--shadow-hover); }

.transition { transition: var(--transition); }
.transition-fast { transition: var(--transition-fast); }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Page Transitions ── */
.page-enter {
  opacity: 0;
  transform: translateY(20px);
}

.page-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: all var(--transition-slow);
}

/* ── Dark Mode Toggle ── */
.dark-mode-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1rem;
  flex-shrink: 0;
}

.dark-mode-toggle:hover {
  background: var(--primary-subtle);
  color: var(--primary);
}

/* ── Responsive ── */
@media (max-width: 1199.98px) {
  .megamenu-grid { grid-template-columns: repeat(3, 1fr); }
  .navbar-richybuy .nav-link { font-size: 0.8rem; padding: var(--space-2) var(--space-1) !important; }
  .become-seller-text { display: none; }
}

@media (max-width: 991.98px) {
  /* Public navbar mobile collapse */
  .navbar-richybuy .navbar-collapse {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: var(--space-4);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-modal);
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    z-index: 1030;
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .navbar-richybuy .navbar-collapse .navbar-nav { flex-direction: column; width: 100%; }
  .navbar-richybuy .navbar-collapse .nav-search-wrap { max-width: 100%; margin: var(--space-3) 0; }
  .navbar-richybuy .navbar-collapse .nav-search { width: 100%; }
  .navbar-richybuy .navbar-collapse .navbar-right-items { flex-direction: column; width: 100%; gap: var(--space-1); }
  .navbar-richybuy .navbar-collapse .navbar-right-items .nav-item { width: 100%; }
  .navbar-richybuy .navbar-collapse .navbar-right-items .nav-link,
  .navbar-richybuy .navbar-collapse .navbar-right-items .nav-icon-btn,
  .navbar-richybuy .navbar-collapse .navbar-right-items .btn-sell { width: 100%; justify-content: flex-start; padding: var(--space-2) var(--space-3); }
  .navbar-richybuy .navbar-collapse .navbar-right-items .btn-sell { justify-content: center; }

  .navbar-right-items .nav-user-name { display: none !important; }
  .btn-sell span.sell-label { display: inline !important; }

  .nav-search-wrap { max-width: 100%; }
  .megamenu-wrap { position: static; }
  .megamenu { position: static; width: 100%; border-radius: var(--radius-md); box-shadow: none; border: 1px solid var(--border); max-height: 50vh; }
  .megamenu-grid { grid-template-columns: repeat(2, 1fr); }

  .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
  .hero-search-wrap { flex-direction: column; gap: 8px; background: transparent; border: none; padding: 0; }
  .hero-search-wrap .hs-select { width: 100%; background: rgba(255,255,255,0.1); }
  .hero-search-wrap .hs-btn { width: 100%; justify-content: center; }

  .section-padding { padding: var(--space-6) 0; }
  .hero-stats-wrap { grid-template-columns: repeat(3, 1fr); padding: var(--space-4); }
}

@media (max-width: 767.98px) {
  :root { --nav-height: 64px; }
  .section-padding { padding: var(--space-5) 0; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .listing-card-actions { opacity: 1; transform: none; position: relative; padding: var(--space-2) var(--space-4) var(--space-4); }
  .hero-stat-value { font-size: 1.25rem; }
  .megamenu-grid { grid-template-columns: repeat(2, 1fr); }

  .navbar-right-items .nav-user-name { display: none !important; }
  .btn-sell span.sell-label { display: none; }
  .btn-sell { padding: 8px 12px !important; }
}

@media (max-width: 575.98px) {
  .megamenu-grid { grid-template-columns: 1fr; }
  .hero-stats-wrap { grid-template-columns: repeat(3, 1fr); gap: var(--space-2); padding: var(--space-3); }
  .hero-stat-value { font-size: 1.1rem; }
}

/* ═══════════════════════════════════════════
   Bulk Actions (Admin)
   ═══════════════════════════════════════════ */
.bulk-toolbar {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 10px 16px;
  position: sticky;
  bottom: 16px;
  z-index: 10;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
[data-theme="dark"] .bulk-toolbar {
  background: #1e1e2e;
  border-color: #2d2d44;
}
.bulk-toolbar .bulk-selected-count {
  font-weight: 600;
  color: var(--primary);
  min-width: 20px;
  display: inline-block;
}

/* ═══════════════════════════════════════════
   Premium Advertisement System
   ═══════════════════════════════════════════ */
.pa-hero { position: relative; overflow: hidden; }
.pa-hero h1 { font-size: 2.8rem; font-weight: 800; color: #fff; line-height: 1.15; }
.pa-hero p { font-size: 1.15rem; color: rgba(255,255,255,.85); }

.pa-card { border: none; border-radius: 20px; overflow: hidden; transition: all .4s cubic-bezier(.25,.46,.45,.94); box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.pa-card:hover { transform: translateY(-8px); box-shadow: 0 20px 60px rgba(0,0,0,.15); }

.pa-feature { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.pa-feature:last-child { border-bottom: none; }
.pa-feature i { color: #1565C0; font-size: 1.1rem; margin-right: 12px; flex-shrink: 0; }

.pa-btn { display: block; width: 100%; padding: 14px; border-radius: 12px; font-weight: 700; font-size: 1.05rem; text-align: center; text-decoration: none; transition: all .3s; border: none; cursor: pointer; }
.pa-btn:hover { transform: scale(1.02); }

.bp-card { border: none; border-radius: 20px; overflow: hidden; transition: all .4s cubic-bezier(.25,.46,.45,.94); box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.bp-card:hover { transform: translateY(-8px); box-shadow: 0 20px 50px rgba(0,0,0,.12); }

.bp-feat { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: .88rem; border-bottom: 1px solid #f5f5f5; }
.bp-feat:last-child { border-bottom: none; }

.bp-btn { display: block; width: 100%; padding: 12px; border-radius: 12px; font-weight: 700; text-align: center; text-decoration: none; border: none; cursor: pointer; transition: all .3s; }
.bp-btn:hover { transform: scale(1.02); }

.cs-section { background: #fff; border-radius: 16px; padding: 28px 32px; margin-bottom: 24px; box-shadow: 0 2px 12px rgba(0,0,0,.05); border: 1px solid #f0f0f0; }
.cs-budget-display { text-align: center; padding: 20px; background: linear-gradient(135deg, #e3f2fd, #fff); border-radius: 12px; margin: 16px 0; }
.cs-budget-display .amount { font-size: 2.4rem; font-weight: 800; color: #1565C0; }
.cs-duration-btn { border: 2px solid #e0e0e0; border-radius: 12px; padding: 14px 8px; text-align: center; cursor: pointer; transition: all .3s; background: #fff; }
.cs-duration-btn:hover { border-color: #1565C0; background: #e3f2fd; }
.cs-duration-btn.active { border-color: #1565C0; background: #1565C0; color: #fff; }

.cs-summary { background: linear-gradient(135deg, #1565C0, #0D47A1); color: #fff; border-radius: 16px; padding: 32px; position: sticky; top: 90px; }
.cs-summary h5 { color: #fff; font-weight: 700; }
.cs-summary .sum-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.15); font-size: .92rem; }
.cs-summary .sum-total { font-size: 1.3rem; font-weight: 800; padding-top: 14px; }

.cs-calc-box { background: #f8f9fa; border-radius: 12px; padding: 20px; margin-top: 16px; }
.cs-calc-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #eee; }
.cs-calc-row:last-child { border-bottom: none; }
.cs-calc-row .val { font-weight: 700; color: #1565C0; }

.cs-level { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.cs-level-low { background: #e8f5e9; color: #2e7d32; }
.cs-level-med { background: #fff3e0; color: #e65100; }
.cs-level-high { background: #fce4ec; color: #c62828; }

.an-stat { background: #fff; border-radius: 14px; padding: 20px 24px; box-shadow: 0 2px 12px rgba(0,0,0,.04); border: 1px solid #f0f0f0; }
.an-stat .an-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: 12px; }
.an-stat .an-val { font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.an-stat .an-label { color: #6c757d; font-size: .82rem; }

.an-chart-box { background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,.04); border: 1px solid #f0f0f0; }
.an-chart-bar { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 8px; }
.an-chart-bar .bar { flex: 1; border-radius: 4px 4px 0 0; transition: height .6s cubic-bezier(.25,.46,.45,.94); min-width: 8px; cursor: pointer; position: relative; }
.an-chart-bar .bar:hover { opacity: .85; }
.an-chart-bar .bar .bar-tip { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 4px 8px; border-radius: 6px; font-size: .7rem; white-space: nowrap; z-index: 2; }
.an-chart-bar .bar:hover .bar-tip { display: block; }

[data-theme="dark"] .pa-card, [data-theme="dark"] .bp-card,
[data-theme="dark"] .cs-section, [data-theme="dark"] .an-stat,
[data-theme="dark"] .an-chart-box {
  background: #1e1e2e;
  border-color: #2d2d44;
}
[data-theme="dark"] .cs-budget-display { background: linear-gradient(135deg, #1a237e, #1e1e2e); }
[data-theme="dark"] .cs-calc-box { background: #16162a; }
[data-theme="dark"] .cs-duration-btn { background: #1e1e2e; border-color: #2d2d44; }
[data-theme="dark"] .pa-feature { border-color: #2d2d44; }
[data-theme="dark"] .bp-feat { border-color: #2d2d44; }
[data-theme="dark"] .cs-calc-row { border-color: #2d2d44; }

@media (max-width: 768px) {
  .pa-hero h1 { font-size: 1.8rem; }
  .cs-budget-display .amount { font-size: 1.8rem; }
  .cs-section { padding: 20px 16px; }
  .cs-summary { position: static; }
  .bp-card-top { padding: 24px 20px 20px; }
  .bp-card-features { padding: 0 20px 20px; }
}

/* ── Mobile Utilities ── */
@media (max-width: 991.98px) {
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dropdown-menu { max-height: 60vh; overflow-y: auto; }
  .glass-card { padding: var(--space-3) !important; }
  .footer-richybuy .row { gap: var(--space-4) 0; }
}
