/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  color: #1a1a1a;
  background: #f5f5f5;
  line-height: 1.4;
}
a { color: #0064a4; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* TOPBAR */
.topbar {
  background: #1a1a1a;
  color: #ccc;
  font-size: 11px;
  padding: 6px 20px;
  display: flex;
  justify-content: space-between;
}
.topbar a { color: #ccc; }
.topbar a:hover { color: #fff; }
.topbar-right button { color: #ccc; }

/* HEADER */
.header {
  background: #fff;
  border-bottom: 2px solid #0064a4;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.logo { font-size: 22px; font-weight: 800; color: #0064a4; }
.logo span { color: #1a1a1a; }
.tagline { font-size: 11px; color: #666; margin-top: 2px; }
.search-main {
  flex: 1;
  display: flex;
  max-width: 700px;
}
.search-main input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-right: none;
  font-size: 14px;
  outline: none;
}
.search-main button {
  padding: 10px 24px;
  background: #0064a4;
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* TABBAR */
.tabbar {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 0 20px;
  display: flex;
}
.tab {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}
.tab.active { color: #0064a4; border-bottom-color: #0064a4; }
.tab:hover { color: #0064a4; }

/* LAYOUT */
.container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  gap: 20px;
  padding: 20px;
}
.filters {
  width: 240px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #ddd;
  padding: 12px 14px;
  position: sticky;
  top: 16px;
  align-self: flex-start;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  font-size: 13px;
}
.filter-group { margin-bottom: 12px; }
.filter-group h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #333;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}
.filter-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  cursor: pointer;
}
.price-inputs { display: flex; gap: 4px; align-items: center; }
.price-inputs input {
  width: 90px;
  padding: 4px 6px;
  border: 1px solid #ccc;
  font-size: 11px;
}
.btn-primary {
  width: 100%;
  padding: 10px;
  background: #0064a4;
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
}
.btn-primary:hover { background: #004d7f; }
.btn-secondary {
  padding: 8px 14px;
  background: #fff;
  color: #0064a4;
  border: 1px solid #0064a4;
  font-size: 12px;
  cursor: pointer;
}
.btn-secondary:hover { background: #f0f8ff; }
.btn-danger {
  padding: 8px 14px;
  background: #fff;
  color: #c00;
  border: 1px solid #c00;
  font-size: 12px;
  cursor: pointer;
}
.btn-danger:hover { background: #fee; }

/* MAIN */
.main { flex: 1; min-width: 0; }
.results-header {
  background: #fff;
  border: 1px solid #ddd;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  position: sticky;
  top: 16px;
  z-index: 10;
}
.results-count strong { color: #0064a4; font-size: 16px; }
.sort-select {
  padding: 4px 8px;
  border: 1px solid #ccc;
  font-size: 11px;
  background: #fff;
}

/* LISTINGS */
.featured {
  background: #fff;
  border: 1px solid #ddd;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.featured-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #333;
  margin-bottom: 10px;
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.featured-card {
  border: 1px solid #e0e0e0;
  cursor: pointer;
  background: #fff;
}
.featured-card:hover { border-color: #0064a4; }
.featured-img {
  background: linear-gradient(135deg, #2c5f7f 0%, #4a8db3 100%);
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
}
.featured-info { padding: 8px 10px; }
.featured-info .price { color: #0064a4; font-weight: 700; font-size: 14px; }
.featured-info .title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}
.featured-info .meta { font-size: 10px; color: #666; }

.listings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.listing-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 0;
  display: block;
  cursor: pointer;
  overflow: hidden;
}
.listing-card .listing-img-wrap { width: 100%; height: 160px; }
.listing-card .listing-body { padding: 12px; }
.listing-card .listing-actions { padding: 0 12px 12px; }
.listing-card:hover { border-color: #0064a4; }
.listing-img {
  width: 110px;
  height: 90px;
  background: linear-gradient(135deg, #2c5f7f 0%, #4a8db3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  flex-shrink: 0;
}
.listing-body { flex: 1; min-width: 0; }
.listing-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
  word-break: break-word;
}
.listing-title .cert-badge { vertical-align: middle; margin-left: 4px; }
.listing-price {
  color: #0064a4;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}
.listing-meta { font-size: 11px; color: #666; margin-bottom: 4px; }
.listing-desc {
  font-size: 11px;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.listing-certs {
  margin-top: 6px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.cert-badge {
  background: #e8f4fc;
  color: #0064a4;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 2px;
  font-weight: 600;
}

.empty {
  padding: 40px;
  text-align: center;
  color: #999;
  background: #fff;
  border: 1px solid #ddd;
}

/* AUTH */
.auth-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 40px 20px;
}
.auth-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 30px;
  width: 100%;
  max-width: 400px;
}
.auth-card h2 { font-size: 22px; margin-bottom: 6px; }
.auth-subtitle { color: #666; font-size: 13px; margin-bottom: 20px; }
.auth-tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}
.auth-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
.auth-tab.active { color: #0064a4; border-bottom-color: #0064a4; }

#login-form input, #register-form input, #register-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  font-size: 13px;
  margin-bottom: 10px;
}
.err-banner {
  background: #fee;
  color: #c00;
  padding: 10px;
  margin: 10px 0;
  font-size: 13px;
  border: 1px solid #fcc;
}

.role-picker {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.role-option { cursor: pointer; }
.role-option input { display: none; }
.role-card {
  border: 2px solid #ddd;
  padding: 10px 6px;
  text-align: center;
  font-size: 11px;
}
.role-option input:checked + .role-card {
  border-color: #0064a4;
  background: #f0f8ff;
}
.role-card strong { font-size: 12px; display: block; }

/* PRICING */
.pricing-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}
.pricing-header { margin-bottom: 24px; }
.pricing-header h2 { font-size: 24px; margin-bottom: 6px; }
.pricing-header p { color: #666; font-size: 13px; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.tier-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 20px;
}
.tier-popular {
  border-color: #0064a4;
  border-width: 2px;
  position: relative;
}
.tier-popular::before {
  content: 'POPULAR';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #0064a4;
  color: #fff;
  font-size: 10px;
  padding: 2px 10px;
  font-weight: 700;
}
.tier-card h3 { font-size: 16px; margin-bottom: 8px; }
.tier-card .tier-role {
  font-size: 10px;
  color: #666;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.tier-card .tier-price {
  font-size: 22px;
  font-weight: 700;
  color: #0064a4;
  margin-bottom: 16px;
}
.tier-features { list-style: none; margin-bottom: 16px; }
.tier-features li {
  padding: 4px 0;
  font-size: 12px;
  color: #555;
}
.tier-features li.no { color: #999; text-decoration: line-through; }

/* SELLER DASHBOARD */
.dashboard-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 12px;
}
.dashboard-header h2 { font-size: 22px; margin-bottom: 4px; }
.dashboard-header p { font-size: 12px; }
.dashboard-header button {
  width: auto !important;
  padding: 10px 20px !important;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-card {
  background: #fff;
  padding: 24px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 4px;
}
.modal-card h3 { margin-bottom: 16px; font-size: 18px; }
.modal-card form input,
.modal-card form select,
.modal-card form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  font-size: 13px;
  margin-bottom: 8px;
}
.modal-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ADMIN */
.admin-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}
.admin-header {
  border-bottom: 2px solid #c00;
  padding-bottom: 12px;
  margin-bottom: 20px;
}
.admin-header h1 { font-size: 24px; }
.admin-header p { color: #666; font-size: 13px; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.admin-stat {
  background: #fff;
  border: 1px solid #ddd;
  border-left: 4px solid #c00;
  padding: 12px;
}
.admin-stat-label {
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
}
.admin-stat-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}
.admin-section {
  background: #fff;
  border: 1px solid #ddd;
  margin-bottom: 20px;
}
.admin-section h3 {
  padding: 12px 16px;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
}
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.admin-table th {
  background: #fafafa;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid #ddd;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
  color: #666;
}
.admin-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
}
.admin-table tr:hover { background: #f9f9f9; }

/* NAV LINKS */
.nav-link {
  cursor: pointer;
  color: #0064a4;
  margin-left: 12px;
  font-size: 12px;
}
.nav-link:hover { text-decoration: underline; }
.nav-admin { color: #c00 !important; font-weight: 700; }

/* HIDDEN BY DEFAULT */
.view { display: none; }
.view.active { display: block; }
/* HOME VIEW */
.home-wrap { max-width: 1100px; margin: 0 auto; padding: 60px 24px; }
.home-hero { text-align: center; margin-bottom: 60px; }
.home-hero h1 { font-size: 42px; font-weight: 700; color: #1a1a1a; margin: 0 0 16px; line-height: 1.15; }
.home-sub { font-size: 18px; color: #666; margin: 0 0 32px; }
.home-cta { display: flex; gap: 12px; justify-content: center; }
.home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.home-card { padding: 28px 24px; background: #f7f8fa; border-radius: 8px; border: 1px solid #e5e7eb; }
.home-card h3 { margin: 0 0 12px; font-size: 18px; color: #0064a4; }
.home-card p { margin: 0; color: #555; line-height: 1.5; }
@media (max-width: 768px) {
  .home-hero h1 { font-size: 28px; }
  .home-grid { grid-template-columns: 1fr; }
}


  * { box-sizing: border-box; margin: 0; padding: 0; }
  #home-view body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    color: #1a1a1a;
    background: #f5f5f5;
    line-height: 1.4;
  }
  #home-view a { color: #0064a4; text-decoration: none; }
  #home-view a:hover { text-decoration: underline; }

  /* ===== TOP BAR ===== */
  #home-view .topbar {
    background: #1a1a1a;
    color: #ccc;
    font-size: 11px;
    padding: 6px 20px;
    display: flex;
    justify-content: space-between;
  }
  #home-view .topbar a { color: #ccc; }
  #home-view .topbar a:hover { color: #fff; }

  /* ===== HEADER ===== */
  #home-view .header {
    background: #fff;
    border-bottom: 2px solid #0064a4;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 30px;
  }
  #home-view .logo {
    font-size: 22px;
    font-weight: 800;
    color: #0064a4;
    letter-spacing: -0.5px;
  }
  #home-view .logo span { color: #1a1a1a; }
  #home-view .tagline { font-size: 11px; color: #666; margin-top: 2px; }

  #home-view .search-main {
    flex: 1;
    display: flex;
    max-width: 700px;
  }
  #home-view .search-main input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-right: none;
    font-size: 14px;
    outline: none;
  }
  #home-view .search-main button {
    padding: 10px 24px;
    background: #0064a4;
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  #home-view .search-main button:hover { background: #004d7f; }

  #home-view .header-right {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 12px;
  }
  #home-view .header-right a { color: #333; font-weight: 500; }

  /* ===== TAB BAR ===== */
  #home-view .tabbar {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 0 20px;
    display: flex;
    gap: 0;
  }
  #home-view .tab {
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    border-bottom: 3px solid transparent;
    cursor: pointer;
  }
  #home-view .tab.active {
    color: #0064a4;
    border-bottom-color: #0064a4;
  }
  #home-view .tab:hover { color: #0064a4; }

  /* ===== LAYOUT ===== */
  #home-view .container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    gap: 20px;
    padding: 20px;
  }

  /* ===== LEFT FILTERS ===== */
  #home-view .filters {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #ddd;
    padding: 16px;
    font-size: 12px;
  }
  #home-view .filter-group { margin-bottom: 18px; }
  #home-view .filter-group h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
  }
  #home-view .filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    color: #333;
    cursor: pointer;
  }
  #home-view .filter-item:hover { color: #0064a4; }
  #home-view .filter-item input { cursor: pointer; }
  #home-view .filter-item .count {
    margin-left: auto;
    color: #999;
    font-size: 11px;
  }
  #home-view .price-inputs {
    display: flex;
    gap: 4px;
    align-items: center;
  }
  #home-view .price-inputs input {
    width: 90px;
    padding: 4px 6px;
    border: 1px solid #ccc;
    font-size: 11px;
  }
  #home-view .filter-actions {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
  }
  #home-view .filter-actions button {
    width: 100%;
    padding: 8px;
    background: #0064a4;
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 4px;
  }

  /* ===== MAIN CONTENT ===== */
  #home-view .main {
    flex: 1;
    min-width: 0;
  }

  #home-view .results-header {
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: sticky;
    top: 16px;
    z-index: 10;
  }
  #home-view .results-count { font-size: 13px; color: #333; }
  #home-view .results-count strong { color: #0064a4; }
  #home-view .view-toggle { display: flex; gap: 8px; align-items: center; }
  #home-view .view-toggle span { font-size: 11px; color: #666; }
  #home-view .view-btn {
    padding: 4px 10px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 11px;
  }
  #home-view .view-btn.active { background: #0064a4; color: #fff; border-color: #0064a4; }
  #home-view .sort-select {
    padding: 4px 8px;
    border: 1px solid #ccc;
    font-size: 11px;
    background: #fff;
  }

  /* ===== FEATURED CAROUSEL ===== */
  #home-view .featured {
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px 16px;
    margin-bottom: 12px;
  }
  #home-view .featured-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 10px;
  }
  #home-view .featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
  #home-view .featured-card {
    border: 1px solid #e0e0e0;
    cursor: pointer;
  }
  #home-view .featured-card:hover { border-color: #0064a4; }
  #home-view .featured-img {
    background: linear-gradient(135deg, #2c5f7f 0%, #4a8db3 100%);
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
  }
  #home-view .featured-info {
    padding: 8px 10px;
  }
  #home-view .featured-info .price {
    color: #0064a4;
    font-weight: 700;
    font-size: 14px;
  }
  #home-view .featured-info .title {
    font-size: 12px;
    font-weight: 600;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #home-view .featured-info .meta {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
  }

  /* ===== LISTING CARDS ===== */
  #home-view .listings {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  #home-view .listing {
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    flex-direction: column;
  }
  #home-view .listing:hover { border-color: #0064a4; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
  #home-view .listing-img {
    height: 160px;
    background: linear-gradient(135deg, #2c5f7f 0%, #4a8db3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 44px;
    font-weight: 700;
    position: relative;
  }
  #home-view .listing-img.seafood { background: linear-gradient(135deg, #1e3a5f 0%, #2c5f7f 100%); }
  #home-view .listing-img.beef    { background: linear-gradient(135deg, #5a1a1a 0%, #8b3a3a 100%); }
  #home-view .listing-img.produce { background: linear-gradient(135deg, #2d5a2d 0%, #4a8b4a 100%); }
  #home-view .listing-img.dairy   { background: linear-gradient(135deg, #b8932e 0%, #d4af37 100%); }
  #home-view .listing-img.grain   { background: linear-gradient(135deg, #6b4423 0%, #8b5a2b 100%); }
  #home-view .listing-img.poultry { background: linear-gradient(135deg, #8b6b3a 0%, #b8935a 100%); }
  #home-view .badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #d4af37;
    color: #1a1a1a;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
  }
  #home-view .badge.new { background: #4caf50; color: #fff; }
  #home-view .badge.hot { background: #d9534f; color: #fff; }

  #home-view .listing-body { padding: 10px 12px; flex: 1; display: flex; flex-direction: column; }
  #home-view .listing-price {
    color: #0064a4;
    font-weight: 700;
    font-size: 16px;
  }
  #home-view .listing-price .unit {
    font-size: 11px;
    font-weight: 400;
    color: #666;
  }
  #home-view .listing-title {
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    min-height: 34px;
  }
  #home-view .listing-meta {
    margin-top: 6px;
    font-size: 11px;
    color: #666;
    line-height: 1.5;
  }
  #home-view .listing-meta div { display: flex; justify-content: space-between; }
  #home-view .listing-meta .label { color: #999; }
  #home-view .listing-footer {
    border-top: 1px solid #eee;
    padding: 8px 12px;
    font-size: 10px;
    color: #999;
    display: flex;
    justify-content: space-between;
  }
  #home-view .listing-id { font-weight: 600; color: #0064a4; }

  /* ===== PAGINATION ===== */
  #home-view .pagination {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 4px;
  }
  #home-view .pagination button {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
  }
  #home-view .pagination button.active { background: #0064a4; color: #fff; border-color: #0064a4; }
  #home-view .pagination button:hover:not(.active) { border-color: #0064a4; color: #0064a4; }

  /* ===== FOOTER ===== */
  #home-view .footer {
    background: #1a1a1a;
    color: #999;
    font-size: 11px;
    padding: 30px 20px 20px;
    margin-top: 30px;
  }
  #home-view .footer-cols {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 20px;
  }
  #home-view .footer h5 {
    color: #fff;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 10px;
  }
  #home-view .footer ul { list-style: none; }
  #home-view .footer li { padding: 3px 0; }
  #home-view .footer a { color: #ccc; }
  #home-view .footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 16px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
  }

/* STATIC PAGES */
.static-wrap { max-width: 720px; margin: 0 auto; padding: 60px 24px; }
.static-wrap h1 { font-size: 32px; color: #0064a4; margin: 0 0 20px; }
.static-wrap p { font-size: 15px; color: #333; margin: 0 0 14px; line-height: 1.6; }
.static-wrap .btn-secondary { margin-top: 24px; }

/* ===== MODAL ===== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 9999; padding: 20px; }
.modal-card { background: #fff; border-radius: 6px; max-width: 720px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); position: relative; }

/* ===== LISTING CARDS (new) ===== */
.listing-img-wrap { width: 100%; height: 160px; background: #f0f0f0; overflow: hidden; position: relative; }
.listing-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 48px; background: linear-gradient(135deg,#f0f0f0,#e0e0e0); color: #888; font-weight: 600; }
.listing-actions { padding: 8px 12px; border-top: 1px solid #f0f0f0; display: flex; justify-content: flex-end; background: #fafafa; }
.btn-save { background: #fff; border: 1px solid #ddd; padding: 4px 10px; font-size: 11px; border-radius: 3px; cursor: pointer; color: #555; }
.btn-save:hover { border-color: #cc8800; color: #cc8800; }

/* ===== LISTING DETAIL MODAL ===== */
.listing-detail h1 { font-size: 24px; color: #0064a4; margin: 0 0 12px; padding-right: 30px; }
.listing-detail-price { font-size: 22px; font-weight: 700; color: #1a1a1a; margin-bottom: 8px; }
.listing-detail-meta { font-size: 13px; color: #666; margin-bottom: 12px; }
.listing-detail-certs { margin: 12px 0; display: flex; flex-wrap: wrap; gap: 4px; }
.listing-detail-desc { font-size: 14px; line-height: 1.6; color: #333; margin: 16px 0; }
.listing-detail hr { border: none; border-top: 1px solid #eee; margin: 16px 0; }
.listing-detail-seller { font-size: 13px; color: #555; margin-bottom: 16px; }
.listing-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.listing-detail-actions .btn-primary { width: auto; padding: 10px 20px; }
.listing-detail-actions .btn-secondary { width: auto; padding: 10px 20px; }
.listing-detail-close { position: absolute; top: 12px; right: 12px; padding: 4px 10px; font-size: 16px; width: auto; }

/* ===== CONCIERGE / VERIFY FORM LABELS ===== */
.auth-card label { display: block; font-size: 12px; font-weight: 600; color: #333; margin: 12px 0 4px; text-align: left; }
.auth-card input, .auth-card textarea, .auth-card select { width: 100%; padding: 10px 12px; border: 1px solid #ccc; border-radius: 3px; font-size: 13px; margin-bottom: 4px; }
.auth-card textarea { font-family: inherit; resize: vertical; }
.auth-card small { display: block; font-size: 11px; margin: 4px 0 8px; }
.auth-card code { background: #f0f0f0; padding: 1px 4px; border-radius: 2px; font-size: 11px; }

/* ===== ADMIN STATS — refine colors ===== */
.admin-stat-value { color: #1a1a1a; }

/* ===== STATUS BADGES ===== */
.status-new, .status-pending { background: #fff3cd; color: #856404; padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.status-listed, .status-active, .status-approved { background: #d4edda; color: #155724; padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.status-in_progress, .status-listed { background: #cce5ff; color: #004085; padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.status-archived, .status-rejected, .status-inactive { background: #f8d7da; color: #721c24; padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.verify-status-pending { background: #fff3cd; color: #856404; padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.verify-status-approved { background: #d4edda; color: #155724; padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.verify-status-rejected { background: #f8d7da; color: #721c24; padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.verify-request-item { padding: 10px; background: #f9f9f9; border: 1px solid #eee; border-radius: 4px; margin: 8px 0; }

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  .topbar { flex-direction: column; gap: 4px; }
  .header { flex-direction: column; gap: 12px; padding: 12px; }
  .header .search-main { width: 100%; max-width: none; }
  .container { flex-direction: column; padding: 12px; }
  .filters { width: 100%; }
  .main { width: 100%; }
  .listings { grid-template-columns: 1fr; }
  .listings-grid { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 16px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .tier-card { margin-bottom: 16px; }
  .admin-table-wrap { overflow-x: auto; }
  .admin-table { min-width: 600px; }
  .modal-card { padding: 16px; max-height: 95vh; }
  .auth-wrap { padding: 12px; }
  .auth-card { padding: 20px; }
  .role-picker { flex-direction: column; }
  .listing-img-wrap { height: 140px; }
  .listing-detail-actions { flex-direction: column; }
  .listing-detail-actions .btn-primary, .listing-detail-actions .btn-secondary { width: 100%; }
}

@media (max-width: 480px) {
  .featured-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .listings, .listings-grid { grid-template-columns: 1fr; }
  .dashboard-header { flex-direction: column; gap: 12px; align-items: stretch; }
  .dashboard-header button { width: 100%; }
}

/* ===== ANIMATION ===== */
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===== ADMIN TABLE WRAP (already styled) ===== */
.admin-table-wrap { overflow-x: auto; }
/* FoodETrade private homepage and marketplace */
.landing {background:#fff;color:#08152c;font-size:15px}
.brand-header{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:24px 4%;background:white}
.brand{position:relative;font-size:34px;font-weight:800;color:#08152c;letter-spacing:-1.4px;white-space:nowrap;line-height:1.1}
.brand i,.landing-footer i{color:#238c49;font-style:italic}.brand small{display:block;font-size:8px;letter-spacing:2px;padding:7px 0 0 35px;font-weight:500}.brand-leaf{color:#248c49;font-size:38px;display:inline-block;transform:rotate(-35deg)}
.brand-header nav{display:flex;gap:27px;align-items:center}.landing button{cursor:pointer}.brand-header nav button,.brand-header nav a,.section-heading button,.landing-footer button{border:0;background:none;color:#08152c;font-size:13px;font-weight:600}.green-button{background:#0b7c3c;color:white;border:1px solid #339764;border-radius:5px;padding:12px 23px;font-weight:700;font-size:14px;cursor:pointer}.green-button:hover{background:#065c2c}
.hero{background:linear-gradient(90deg,rgba(8,24,24,.28),rgba(5,23,26,.48)),url('/assets/farm-hero.png') center/cover;color:white;padding:46px 5% 27px;text-align:center}.hero-copy{max-width:950px;margin:auto}.eyebrow{font-size:10px;letter-spacing:5px;font-weight:700;margin-bottom:13px}.hero h1{font-size:clamp(32px,3.8vw,54px);line-height:1.12;letter-spacing:-1.1px;margin-bottom:17px}.hero-copy>p:not(.eyebrow){font-size:18px;line-height:1.55}.hero-search{margin:23px auto 37px;display:flex;background:white;border-radius:7px;padding:5px;max-width:780px;gap:5px}.hero-search input{flex:1;min-width:0;border:0;padding:10px;font-size:13px}.hero-search select{border:0;border-right:1px solid #ddd;background:#f6f7f9;padding:12px;color:#08152c;max-width:165px}.hero-benefits{display:grid;grid-template-columns:repeat(4,1fr);gap:30px;text-align:left;max-width:1230px;margin:auto}.hero-benefits>div{display:flex;gap:16px;align-items:center}.hero-benefits b{font-size:38px}.hero-benefits span{font-size:12px;line-height:1.5}.hero-benefits strong{display:block;font-size:13px}
.landing-section{padding:30px 3.5%}.section-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.landing h2{font-size:27px;letter-spacing:-.6px}.category-tiles{display:grid;grid-template-columns:repeat(8,1fr);gap:13px}.category-tile{background:none;border:0;color:#08152c;text-align:center;min-width:0}.category-photo{display:block;width:100%;aspect-ratio:1.22;background-image:url('/assets/categories.png');background-size:400% 200%;border-radius:5px;margin-bottom:9px}.category-tile strong{font-size:11px}.category-tile:hover .category-photo{outline:3px solid #168647;outline-offset:2px}
.how-section{background:#f1f4f5;border-radius:10px;margin:8px 2.5% 28px;padding:26px 3.5% 32px}.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:40px;margin-top:24px}.steps article{display:flex;gap:25px;align-items:flex-start}.steps article>span{background:#087835;border-radius:50%;padding:6px 12px;color:white;font-size:18px}.steps h3{font-size:16px;margin-bottom:9px}.steps p{font-size:14px;line-height:1.6}.broker-section{background:linear-gradient(90deg,rgba(3,28,18,.94),rgba(5,20,22,.4)),url('/assets/farm-hero.png') right center/cover;color:white;padding:40px 5%}.broker-section h2{font-size:38px;margin-bottom:9px}.broker-section p:not(.eyebrow){font-size:17px;margin-bottom:18px}.closing-section{text-align:center;padding:40px 20px;background:linear-gradient(white,rgba(244,248,242,.84)),url('/assets/farm-hero.png') left center/cover}.closing-section p{margin:10px 0 20px}.landing-footer{display:flex;justify-content:space-between;align-items:center;padding:28px 5%;border-top:1px solid #e9edef}.landing-footer div{display:flex;gap:22px}.landing-footer strong{font-size:27px}
#site-topbar{padding:8px 4%;background:#102b23;color:#f2f4f2}#site-topbar a{color:white;margin-right:15px}#site-topbar button{color:white!important}
#home-view .container{max-width:1480px;margin:24px auto;gap:22px;padding:0 20px;align-items:flex-start}#home-view .filters{flex:0 0 240px;width:240px;position:static;max-height:none;overflow:visible;background:white;border:1px solid #ddd;padding:20px}#home-view .filter-choice{display:flex;align-items:center;gap:7px;margin:9px 0;font-size:13px}#home-view .filter-group{margin-bottom:22px}#home-view .filter-group h4{padding-bottom:7px;border-bottom:1px solid #eee;margin-bottom:8px}#home-state-filter{width:100%;padding:8px;border:1px solid #ccc}#home-view .main{min-width:0;flex:1}#home-view .listings-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}#home-view .listing-card{border:1px solid #ddd;border-radius:0;overflow:hidden;background:white}#home-view .listing-img-wrap{height:190px}#home-view .listing-img-placeholder{height:100%;display:flex;align-items:center;justify-content:center;font-size:48px;background:linear-gradient(125deg,#21456a,#37728c);color:white}#home-view .featured{padding:16px;background:white;border:1px solid #ddd;margin-bottom:16px}#home-view .featured-grid{grid-template-columns:repeat(4,minmax(0,1fr))}#home-view .featured-img{height:105px;display:flex;align-items:center;justify-content:center;background:#2d6480;color:white;font-size:30px}#home-view .results-header{position:static;background:white;border:1px solid #ddd;padding:14px;margin-bottom:14px}.auth-card{border-top:4px solid #0b7c3c}.auth-card .btn-primary{background:#0b7c3c}
@media(min-width:1600px){.landing{max-width:1600px;margin:auto}.hero{padding-top:65px;padding-bottom:35px}.hero-search{margin-bottom:55px}}
@media(max-width:1050px){.brand-header{flex-wrap:wrap;padding:20px}.brand-header nav{order:3;width:100%;justify-content:center}.hero-benefits{gap:12px}.category-tiles{grid-template-columns:repeat(4,1fr)}#home-view .filters{flex-basis:200px;width:200px}#home-view .listings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#home-view .featured-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.brand{font-size:26px}.brand-header>.green-button{padding:10px}.brand-header nav{gap:14px;flex-wrap:wrap}.hero{padding:34px 20px 24px}.hero h1{font-size:34px}.hero-copy>p:not(.eyebrow){font-size:15px}.hero-search{flex-wrap:wrap}.hero-search select{max-width:none;width:100%;border:0}.hero-search input{width:60%}.hero-benefits{grid-template-columns:repeat(2,1fr);gap:18px}.hero-benefits b{font-size:25px}.category-tiles{grid-template-columns:repeat(2,1fr)}.steps{grid-template-columns:1fr;gap:22px}.landing h2{font-size:24px}.broker-section h2{font-size:30px}.landing-footer{gap:20px;flex-wrap:wrap}.landing-footer div{gap:15px}#home-view .container{display:flex;flex-direction:column;padding:0 12px}#home-view .filters{width:100%;flex-basis:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}#home-view .filter-group{margin:0}#home-view .main{width:100%}#home-view .listings-grid{grid-template-columns:1fr}#home-view .header{flex-wrap:wrap;gap:15px}#home-view .search-main{width:100%;flex:auto}#home-view .results-header{flex-wrap:wrap;gap:12px}#home-view .tabbar{flex-wrap:wrap}#site-topbar{gap:10px;flex-wrap:wrap}}
.brand-leaf{transform:none;width:30px;vertical-align:middle}.brand-leaf svg{display:block;width:100%}.hero-benefits b svg{width:34px;height:34px;color:white}.broker-section{background-image:linear-gradient(90deg,rgba(3,28,18,.4),transparent),url('/assets/broker-banner.png')}.nav-link{color:#fff!important}

/* Core wholesale categories */
.category-tiles{grid-template-columns:repeat(5,minmax(0,1fr))}
.category-photo{background-image:url('/assets/trade-categories.png');background-size:500% 100%;aspect-ratio:1.5}
#home-tabbar button.tab{font:inherit;background:white;border:0;border-bottom:3px solid transparent;cursor:pointer}
#home-tabbar button.tab.active{border-bottom-color:#0064a4;color:#0064a4}
@media(max-width:650px){.category-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
