/* ============================================================
   HaatBazar - Green Theme Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700;800&family=Nunito:wght@300;400;500;600;700;800&display=swap');

:root {
  --green-950: #052e16;
  --green-900: #14532d;
  --green-800: #166534;
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --green-400: #4ade80;
  --green-300: #86efac;
  --green-200: #bbf7d0;
  --green-100: #dcfce7;
  --green-50:  #f0fdf4;

  --gold:    #d4a017;
  --gold-lt: #f5c842;
  --red:     #dc2626;
  --orange:  #ea580c;
  --blue:    #2563eb;

  --text-dark:   #0f2d18;
  --text-mid:    #1e5631;
  --text-light:  #4b8c61;
  --text-muted:  #6b7c73;
  --bg-light:    #f0fdf4;
  --bg-white:    #ffffff;
  --border:      #d1fae5;
  --shadow-sm:   0 1px 3px rgba(22, 101, 52, 0.10);
  --shadow-md:   0 4px 16px rgba(22, 101, 52, 0.14);
  --shadow-lg:   0 8px 32px rgba(22, 101, 52, 0.20);
  --shadow-xl:   0 16px 48px rgba(22, 101, 52, 0.28);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-full: 999px;

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: 'Nunito', 'Hind Siliguri', sans-serif;
  --font-display: 'Playfair Display', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--green-700); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-500); }

img { max-width: 100%; display: block; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  background: var(--green-950);
  color: var(--green-300);
  font-size: 0.78rem;
  padding: 6px 0;
}
.topbar a { color: var(--green-300); }
.topbar a:hover { color: #fff; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 100%);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--green-500);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 2px 12px rgba(34,197,94,0.4);
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-logo-text span { color: var(--green-400); }

.nav-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.nav-search input {
  width: 100%;
  padding: 10px 18px 10px 46px;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.92rem;
  font-family: var(--font-body);
  transition: background var(--transition);
  outline: none;
}

.nav-search input::placeholder { color: rgba(255,255,255,0.55); }
.nav-search input:focus { background: rgba(255,255,255,0.2); }

.nav-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.6);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  color: rgba(255,255,255,0.82);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
}

.nav-link:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-link.active { color: var(--green-400); }

.nav-btn {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-outline-white {
  border: 1.5px solid rgba(255,255,255,0.4);
  color: #fff;
  background: transparent;
}
.btn-outline-white:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

.btn-green {
  background: var(--green-500);
  color: #fff;
  box-shadow: 0 2px 12px rgba(34,197,94,0.35);
}
.btn-green:hover { background: var(--green-400); transform: translateY(-1px); }

.nav-user-menu {
  position: relative;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: background var(--transition);
  background: none;
  border: none;
}

.nav-user-btn:hover { background: rgba(255,255,255,0.1); }

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: var(--radius-md);
  min-width: 220px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 100;
}

.nav-user-menu:hover .dropdown-menu,
.dropdown-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  color: var(--text-dark);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition);
  cursor: pointer;
}

.dropdown-item:hover { background: var(--green-50); color: var(--green-700); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: #fef2f2; }
.dropdown-divider { border-bottom: 1px solid var(--border); }

/* Notification badge */
.notif-badge {
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--green-950) 0%, var(--green-800) 50%, var(--green-700) 100%);
  padding: 80px 20px 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2322c55e' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero::after {
  content: '🐄';
  position: absolute;
  right: 5%;
  bottom: -20px;
  font-size: 200px;
  opacity: 0.06;
  filter: grayscale(1);
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--green-300);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: #fff;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 em { color: var(--green-400); font-style: normal; }

.hero p {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  margin-bottom: 36px;
}

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto 32px;
  background: #fff;
  border-radius: var(--radius-full);
  padding: 6px 6px 6px 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: transparent;
}

.hero-search button {
  background: var(--green-600);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-search button:hover { background: var(--green-500); }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-stat { text-align: center; }
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--green-400);
  display: block;
}
.hero-stat .lbl { color: rgba(255,255,255,0.6); font-size: 0.85rem; }

/* ============================================================
   CATEGORY BAR
   ============================================================ */
.category-bar {
  background: #fff;
  border-bottom: 2px solid var(--border);
  padding: 0;
  position: sticky;
  top: 70px;
  z-index: 900;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.category-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-bar-inner::-webkit-scrollbar { display: none; }

.cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
}

.cat-btn .cat-icon { font-size: 1.5rem; }
.cat-btn:hover { color: var(--green-700); border-bottom-color: var(--green-300); }
.cat-btn.active { color: var(--green-700); border-bottom-color: var(--green-600); }

/* ============================================================
   CONTAINER & LAYOUT
   ============================================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-sm { max-width: 680px; margin: 0 auto; padding: 0 20px; }
.container-md { max-width: 900px; margin: 0 auto; padding: 0 20px; }

.section { padding: 60px 0; }
.section-sm { padding: 36px 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--green-900);
  font-weight: 700;
}

.section-title span { color: var(--green-600); }

/* ============================================================
   CATTLE CARDS
   ============================================================ */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

.cattle-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.cattle-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-300);
}

.cattle-card-img {
  height: 200px;
  overflow: hidden;
  position: relative;
  background: var(--green-50);
}

.cattle-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cattle-card:hover .cattle-card-img img { transform: scale(1.06); }

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-firm   { background: var(--green-900); color: #fff; }
.badge-indiv  { background: #fff; color: var(--green-800); border: 1px solid var(--green-300); }
.badge-boosted{ background: var(--gold); color: #fff; }
.badge-sold   { background: #dc2626; color: #fff; }
.badge-pending{ background: var(--orange); color: #fff; }

.code-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-family: monospace;
  letter-spacing: 1px;
}

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

.cattle-card-cat {
  font-size: 0.75rem;
  color: var(--green-600);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cattle-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cattle-card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cattle-card-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.cattle-card-price {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-main {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-800);
}

.price-old {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-discount {
  font-size: 0.75rem;
  background: #fee2e2;
  color: #dc2626;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* ============================================================
   FILTER SIDEBAR
   ============================================================ */
.listings-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

.filter-sidebar {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 140px;
}

.filter-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group { margin-bottom: 24px; }
.filter-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 7px;
}

.form-label .required { color: var(--red); margin-left: 2px; }
.form-label .hint { font-weight: 400; color: var(--text-muted); font-size: 0.8rem; margin-left: 6px; }

.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}

.form-control.is-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

textarea.form-control { resize: vertical; min-height: 110px; }

select.form-control { cursor: pointer; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green-600);
  cursor: pointer;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.invalid-feedback {
  font-size: 0.78rem;
  color: var(--red);
  margin-top: 4px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  color: #fff;
  box-shadow: 0 2px 12px rgba(22,163,74,0.3);
}
.btn-primary:hover { 
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(22,163,74,0.4);
  color: #fff;
}

.btn-secondary {
  background: var(--green-50);
  color: var(--green-800);
  border: 1.5px solid var(--green-300);
}
.btn-secondary:hover { background: var(--green-100); color: var(--green-800); }

.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }

.btn-warning { background: var(--gold); color: #fff; }
.btn-warning:hover { background: #b8860b; color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--green-400); color: var(--green-700); }

.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg { padding: 15px 36px; font-size: 1rem; }
.btn-xl { padding: 18px 44px; font-size: 1.1rem; border-radius: var(--radius-lg); }

.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.btn-buy {
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: #fff;
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 20px rgba(22,163,74,0.35);
}
.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(22,163,74,0.45); color: #fff; }

.btn-boost {
  background: linear-gradient(135deg, #b8860b, var(--gold));
  color: #fff;
}
.btn-boost:hover { opacity: 0.9; }

/* ============================================================
   ALERTS / MESSAGES
   ============================================================ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-success { background: #dcfce7; color: #166534; border-left: 4px solid var(--green-500); }
.alert-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 4px solid #f59e0b; }
.alert-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  min-height: calc(100vh - 70px);
}

.dashboard-sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
}

.sidebar-logo {
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.sidebar-nav { padding: 0 12px; }

.sidebar-section {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 16px 12px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  margin-bottom: 2px;
}

.sidebar-link:hover { background: var(--green-50); color: var(--green-700); }
.sidebar-link.active { background: var(--green-100); color: var(--green-800); }
.sidebar-link .badge { margin-left: auto; }

.dashboard-main {
  padding: 32px 28px;
  overflow: hidden;
}

.dashboard-header {
  margin-bottom: 28px;
}

.dashboard-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--green-900);
  font-weight: 700;
}

.dashboard-subtitle { color: var(--text-muted); font-size: 0.9rem; }

/* ============================================================
   STATS CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.stat-card.green::before  { background: linear-gradient(90deg, var(--green-500), var(--green-400)); }
.stat-card.gold::before   { background: linear-gradient(90deg, var(--gold), var(--gold-lt)); }
.stat-card.blue::before   { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.stat-card.red::before    { background: linear-gradient(90deg, #dc2626, #f87171); }
.stat-card.purple::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }

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

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.stat-icon.green  { background: var(--green-100); }
.stat-icon.gold   { background: #fef3c7; }
.stat-icon.blue   { background: #dbeafe; }
.stat-icon.red    { background: #fee2e2; }
.stat-icon.purple { background: #ede9fe; }

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-change {
  font-size: 0.75rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-change.up   { color: var(--green-600); }
.stat-change.down { color: #dc2626; }

/* ============================================================
   TABLES
   ============================================================ */
.data-table-wrapper {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.data-table-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}

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

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-dark);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--green-50); }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.status-active      { background: #dcfce7; color: #166534; }
.status-pending     { background: #fef3c7; color: #92400e; }
.status-rejected    { background: #fee2e2; color: #991b1b; }
.status-sold        { background: #dbeafe; color: #1e40af; }
.status-confirmed   { background: #dcfce7; color: #166534; }
.status-delivered   { background: var(--green-900); color: var(--green-300); }
.status-processing  { background: #ede9fe; color: #5b21b6; }
.status-cancelled   { background: #f3f4f6; color: #6b7280; }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.tab-btn:hover { color: var(--green-700); }
.tab-btn.active { color: var(--green-700); border-bottom-color: var(--green-600); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   SINGLE LISTING PAGE
   ============================================================ */
.listing-detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

.listing-images {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.main-image {
  height: 420px;
  overflow: hidden;
  background: var(--green-50);
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
}

.thumb {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: border-color var(--transition);
}

.thumb.active { border-color: var(--green-500); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.listing-info-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 80px;
}

.listing-code-badge {
  font-family: monospace;
  font-size: 0.8rem;
  background: var(--green-900);
  color: var(--green-300);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 2px;
  display: inline-block;
  margin-bottom: 12px;
}

/* ============================================================
   UPLOAD AREA
   ============================================================ */
.upload-area {
  border: 2px dashed var(--green-300);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--green-50);
}

.upload-area:hover { border-color: var(--green-500); background: var(--green-100); }
.upload-area.dragover { border-color: var(--green-500); background: var(--green-100); }
.upload-area input[type="file"] { display: none; }

.upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.upload-text { font-size: 0.9rem; color: var(--text-muted); }
.upload-text strong { color: var(--green-700); }

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.preview-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
}

.preview-item img { width: 100%; height: 100%; object-fit: cover; }

.preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

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

.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.92);
  transition: transform var(--transition);
  box-shadow: var(--shadow-xl);
}

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

.modal-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 1.15rem; font-weight: 700; color: var(--text-dark); }
.modal-close { background: none; border: none; cursor: pointer; font-size: 1.3rem; color: var(--text-muted); }
.modal-body { padding: 24px 28px; }
.modal-footer { padding: 16px 28px 24px; display: flex; gap: 12px; justify-content: flex-end; }

/* ============================================================
   FEATURED/BOOSTED STRIP
   ============================================================ */
.featured-strip {
  background: linear-gradient(135deg, #78350f, var(--gold));
  color: #fff;
  padding: 4px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--green-950);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand p { font-size: 0.88rem; line-height: 1.7; margin-top: 14px; }

.footer-col h4 {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--green-400); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  justify-content: center;
}

.page-btn {
  min-width: 38px;
  height: 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-dark);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  padding: 0 10px;
}

.page-btn:hover { border-color: var(--green-400); color: var(--green-700); }
.page-btn.active { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   TOOLTIP
   ============================================================ */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--green-900);
  color: #fff;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 100;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ============================================================
   MISC HELPERS
   ============================================================ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-green  { color: var(--green-600); }
.text-muted  { color: var(--text-muted); }
.text-danger { color: #dc2626; }
.text-gold   { color: var(--gold); }

.fw-700 { font-weight: 700; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8   { gap: 8px; }
.gap-12  { gap: 12px; }
.gap-16  { gap: 16px; }
.gap-24  { gap: 24px; }

.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.card-body { padding: 24px; }
.card-header { padding: 18px 24px; border-bottom: 1px solid var(--border); }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: var(--bg-light); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-mid); margin-bottom: 8px; }

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--green-600);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 20px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.pulse { animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================================
   ADMIN PANEL SPECIFIC
   ============================================================ */
.admin-nav {
  background: var(--green-950);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  width: 250px;
  overflow-y: auto;
  padding: 20px 0;
  z-index: 200;
}

.admin-nav .nav-logo {
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 10px;
}

.admin-section-header {
  padding: 12px 20px 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
}

.admin-nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.admin-nav-link.active { background: var(--green-800); color: #fff; border-right: 3px solid var(--green-400); }
.admin-nav-link .badge { margin-left: auto; }

.admin-content {
  margin-left: 250px;
  min-height: 100vh;
  background: var(--bg-light);
}

.admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.admin-page {
  padding: 28px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .listings-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .listing-detail-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-nav { width: 200px; }
  .admin-content { margin-left: 200px; }
}

@media (max-width: 768px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { display: none; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .hero { padding: 50px 20px 70px; }
  .hero h1 { font-size: 2rem; }
  .hero-search { flex-direction: column; border-radius: var(--radius-lg); padding: 16px; }
  .hero-search button { width: 100%; }
  .listings-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-nav { width: 100%; height: auto; position: relative; }
  .admin-content { margin-left: 0; }
  .nav-search { display: none; }
  .hero-stats { gap: 20px; }
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--green-500);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  animation: slideInRight 0.3s ease;
  cursor: pointer;
}

.toast.error { border-left-color: #dc2626; }
.toast.warning { border-left-color: #f59e0b; }
.toast.info { border-left-color: #3b82f6; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   RANGE SLIDER
   ============================================================ */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: var(--green-200);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-600);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Code box */
.code-box {
  background: var(--green-950);
  color: var(--green-400);
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 6px;
  text-align: center;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--green-700);
}

.deposit-reference-box {
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.deposit-reference-box .ref-code {
  font-family: monospace;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 8px;
  color: var(--green-400);
  background: var(--green-950);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 12px 0;
}
