/* ============================================================
   AU Marketplace — Global Styles
   Design: White/off-white bg, Black nav/buttons, Green accents
   Fonts: Playfair Display (headings) + DM Sans (body)
   ============================================================ */

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

/* === CSS Custom Properties === */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --black: #000000;
  --black-soft: #111827;
  --black-mid: #374151;
  --muted: #6b7280;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --red: #dc2626;
  --red-light: #fef2f2;
  --red-dark: #991b1b;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.08);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

/* === Reset === */
*, *::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-primary);
  color: var(--black-soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }
input, select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
}
ul { list-style: none; }

/* === Typography === */
h1, h2, h3, h4, h5 { font-family: var(--font-heading); line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { color: var(--black-mid); }

/* === Layout Utilities === */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 768px) { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 2.5rem; } }

.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--black);
  color: var(--white);
  border: 2px solid transparent;
}
.btn-primary:hover {
  background: var(--black-soft);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.btn-green {
  background: var(--red);
  color: var(--white);
  border: 2px solid transparent;
}
.btn-green:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--black);
  border: 2px solid var(--black);
}
.btn-outline:hover {
  background: var(--black);
  color: var(--white);
  transform: translateY(-1px);
}
.btn-outline-red {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
}
.btn-outline-red:hover {
  background: var(--red);
  color: var(--white);
}
.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
}
.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}
.btn-full { width: 100%; justify-content: center; }

/* === Badge === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.badge-green { background: var(--red-light); color: var(--red-dark); }
.badge-black { background: var(--black); color: var(--white); }
.badge-gray { background: var(--bg-tertiary); color: var(--muted); }

/* === Form Elements === */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--black-soft);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--black-soft);
  font-size: 0.925rem;
  transition: border-color var(--transition);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}
.form-input::placeholder { color: #9ca3af; }
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.78rem; color: var(--muted); }
.form-error { font-size: 0.78rem; color: #dc2626; display: none; }
.form-error.visible { display: block; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* === Cards === */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* === Star Rating === */
.stars { display: flex; gap: 2px; }
.star {
  width: 14px; height: 14px;
  fill: #f59e0b; color: #f59e0b;
}
.star-empty { fill: #e5e7eb; color: #e5e7eb; }

/* === Toast === */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  z-index: 9999;
  background: var(--black);
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 340px;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast-success { border-left: 4px solid var(--red); }
.toast-icon { color: var(--red); flex-shrink: 0; }

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.92) translateY(20px);
  transition: transform var(--transition-slow);
}
.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}
.modal-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.modal-body { padding: 1.75rem; }
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  color: var(--black);
  transition: background var(--transition);
  z-index: 1;
}
.modal-close:hover { background: var(--white); }
.modal-header-wrap { position: relative; }

/* === Navbar === */
.navbar {
  background: var(--black);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.navbar-inner {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  justify-content: space-between;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  flex-shrink: 0;
}
.navbar-logo-icon {
  width: 34px; height: 34px;
  background: var(--red);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.navbar-logo span { color: var(--red); }
.navbar-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.navbar-search input {
  width: 100%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  padding: 0.5rem 1rem 0.5rem 2.6rem;
  color: var(--white);
  font-size: 0.875rem;
  transition: border-color var(--transition);
}
.navbar-search input::placeholder { color: rgba(255,255,255,0.5); }
.navbar-search input:focus {
  border-color: var(--red);
  background: rgba(255,255,255,0.12);
}
.navbar-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  pointer-events: none;
}
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.btn-sell {
  background: var(--red);
  color: var(--white);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex; align-items: center; gap: 0.35rem;
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition);
}
.btn-sell:hover { background: var(--red-dark); transform: translateY(-1px); }
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  cursor: pointer;
  transition: border-color var(--transition);
}
.user-avatar:hover { border-color: var(--red); }
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  padding: 0.25rem;
}
@media (max-width: 640px) {
  .navbar-search { display: none; }
  .mobile-menu-btn { display: flex; align-items: center; }
  .btn-sell .sell-text { display: none; }
  .btn-sell { padding: 0.5rem 0.65rem; }
}
@media (max-width: 380px) {
  .navbar-logo .logo-text { display: none; }
}

/* === Category Filter Bar === */
.category-bar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 100;
}
.category-bar-inner {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.85rem 0;
  scrollbar-width: none;
}
.category-bar-inner::-webkit-scrollbar { display: none; }
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg-primary);
  color: var(--black-mid);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.cat-chip:hover { border-color: var(--red); color: var(--red); }
.cat-chip.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.cat-chip svg { width: 14px; height: 14px; }

/* === Hero === */
.hero {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #1a0a0a 100%);
  color: var(--white);
  padding: 4rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -150px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(220,38,38,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(220,38,38,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) {
  .hero-inner { grid-template-columns: 1fr 1fr; }
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(220,38,38,0.15);
  color: #fca5a5;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  border: 1px solid rgba(220,38,38,0.25);
}
.hero h1 { color: var(--white); margin-bottom: 1rem; }
.hero h1 span { color: var(--red); }
.hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 480px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(10px);
}
.hero-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.split-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.split-item {
  flex: 1;
  text-align: center;
  padding: 1.25rem 0.75rem;
  border-radius: var(--radius-md);
}
.split-item.seller { background: rgba(220,38,38,0.15); border: 1px solid rgba(220,38,38,0.25); }
.split-item.src { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); }
.split-pct {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.split-item.seller .split-pct { color: #fca5a5; }
.split-item.src .split-pct { color: rgba(255,255,255,0.85); }
.split-label { font-size: 0.78rem; color: rgba(255,255,255,0.6); font-weight: 500; }
.split-desc { font-size: 0.8rem; color: rgba(255,255,255,0.5); line-height: 1.5; }

/* === Listings Section === */
.listings-section { background: var(--bg-secondary); }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.section-header h2 { color: var(--black-soft); }
.results-count { font-size: 0.85rem; color: var(--muted); font-weight: 500; }

/* === Listings Grid === */
.listings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 480px) { .listings-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .listings-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1150px) { .listings-grid { grid-template-columns: repeat(4, 1fr); } }

/* === Service Card === */
.service-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  position: relative;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card-img-wrap {
  position: relative;
  overflow: hidden;
}
.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.service-card:hover .card-img { transform: scale(1.04); }
.card-fav {
  position: absolute;
  top: 0.65rem; right: 0.65rem;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  z-index: 2;
}
.card-fav:hover { background: var(--white); transform: scale(1.1); }
.card-fav svg { width: 17px; height: 17px; color: var(--muted); transition: color var(--transition); }
.card-fav.active svg { color: #ef4444; fill: #ef4444; }
.card-body { padding: 1rem; }
.card-cat-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--black-soft);
  margin-bottom: 0.35rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-seller {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.seller-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  flex-shrink: 0;
}
.card-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 0.85rem;
  margin-top: auto;
  gap: 0.5rem;
}
.card-price {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--black-soft);
}
.card-price span { font-size: 0.75rem; font-weight: 500; color: var(--muted); font-family: var(--font-body); }
.card-book-btn {
  background: var(--black);
  color: var(--white);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.card-book-btn:hover { background: var(--red); transform: translateY(-1px); }
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
}
.no-results svg { width: 48px; height: 48px; margin: 0 auto 1rem; opacity: 0.4; }

/* === How It Works === */
.how-section { background: var(--bg-primary); }
.how-section h2 { text-align: center; margin-bottom: 0.75rem; }
.how-subtitle { text-align: center; color: var(--muted); margin-bottom: 3rem; }
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 480px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .steps-grid { grid-template-columns: repeat(5, 1fr); } }
.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  transition: border-color var(--transition), transform var(--transition);
}
.step-card:hover { border-color: var(--red); transform: translateY(-2px); }
.step-num {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.step-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--red-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  color: var(--red);
}
.step-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--black-soft);
  margin-bottom: 0.5rem;
}
.step-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.55; }

/* === Footer === */
.footer {
  background: var(--black);
  color: rgba(255,255,255,0.75);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand .navbar-logo { margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.85rem; line-height: 1.6; max-width: 260px; }
.footer-col h5 {
  font-family: var(--font-heading);
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: 0.85rem; color: rgba(255,255,255,0.6); transition: color var(--transition); }
.footer-links a:hover { color: var(--green); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}
.footer-src-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(220,38,38,0.15);
  color: #fca5a5;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(220,38,38,0.2);
}

/* === Dashboard Styles === */
.page-header {
  background: var(--black);
  color: var(--white);
  padding: 2.5rem 0;
}
.page-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-header h1 { color: var(--white); font-size: clamp(1.5rem, 3vw, 2rem); }
.page-header p { color: rgba(255,255,255,0.65); font-size: 0.9rem; margin-top: 0.25rem; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 480px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 840px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }

.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.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;
  margin-bottom: 0.25rem;
}
.stat-icon.green { background: var(--red-light); color: var(--red); }
.stat-icon.black { background: var(--black-soft); color: var(--white); }
.stat-icon.gray { background: var(--bg-tertiary); color: var(--muted); }
.stat-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--black-soft);
  line-height: 1;
}
.stat-value.green { color: var(--red); }
.stat-sub { font-size: 0.8rem; color: var(--muted); }
.stat-change { font-size: 0.78rem; color: var(--red); font-weight: 600; }

/* === Tables === */
.table-section {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 2rem;
}
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.75rem;
}
.table-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--black-soft);
}
.table-scroll { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
thead { background: var(--bg-secondary); }
th {
  text-align: left;
  padding: 0.75rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 0.9rem 1.25rem;
  font-size: 0.875rem;
  color: var(--black-mid);
  border-bottom: 1px solid var(--border-light);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-secondary); }
.amount-cell { font-weight: 600; color: var(--black-soft); font-family: var(--font-heading); }
.src-cell { font-weight: 600; color: var(--red); }
.method-badge { display: inline; }
.ref-code { font-family: monospace; font-size: 0.78rem; color: var(--muted); background: var(--bg-tertiary); padding: 0.15rem 0.4rem; border-radius: 3px; }

/* === Registration Page === */
.reg-page { background: var(--bg-secondary); min-height: 100vh; }
.reg-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}
.reg-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.reg-header {
  background: var(--black);
  color: var(--white);
  padding: 2rem 2.25rem;
}
.reg-header h2 { color: var(--white); font-size: 1.6rem; }
.reg-header p { color: rgba(255,255,255,0.65); font-size: 0.9rem; margin-top: 0.3rem; }
.reg-body { padding: 2rem 2.25rem; }
@media (max-width: 540px) {
  .reg-body { padding: 1.5rem 1.25rem; }
  .reg-header { padding: 1.5rem 1.25rem; }
}

/* === Mobile Search Bar (below nav on mobile) === */
.mobile-search-bar {
  display: none;
  padding: 0.75rem 1.25rem;
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.mobile-search-bar .navbar-search {
  display: block;
  max-width: 100%;
}
@media (max-width: 640px) {
  .mobile-search-bar { display: block; }
}

/* === Utility === */
.text-green { color: var(--green); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* === Animations === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(22,163,74,0); }
}
.animate-in { animation: fadeInUp 0.4s ease forwards; }
.card-animate { opacity: 0; animation: fadeInUp 0.4s ease forwards; }
.card-animate:nth-child(1) { animation-delay: 0.05s; }
.card-animate:nth-child(2) { animation-delay: 0.1s; }
.card-animate:nth-child(3) { animation-delay: 0.15s; }
.card-animate:nth-child(4) { animation-delay: 0.2s; }
.card-animate:nth-child(5) { animation-delay: 0.25s; }
.card-animate:nth-child(6) { animation-delay: 0.3s; }
.card-animate:nth-child(7) { animation-delay: 0.35s; }
.card-animate:nth-child(8) { animation-delay: 0.4s; }

/* Print Styles for Report */
@media print {
  .navbar, .footer, .btn, .page-header .btn { display: none !important; }
  .table-section { box-shadow: none; border: 1px solid #ccc; }
  body { background: white; }
}
