:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #2563eb;
  --accent-dim: rgba(37, 99, 235, 0.06);
  --accent-glow: rgba(37, 99, 235, 0.10);
  --border: #e2e8f0;
  --border-accent: rgba(37, 99, 235, 0.25);
  --radius: 10px;
  --radius-sm: 6px;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* === HERO === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 40px 100px;
  overflow: hidden;
}

.hero-inner {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  padding: 8px 20px;
  border-radius: 100px;
  margin-bottom: 36px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 28px;
}

.hero-sub {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 620px;
  line-height: 1.7;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 28px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: fit-content;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat-number {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}

/* Removed decorative grid background */
.hero-grid-bg {
  display: none;
}

/* === PROBLEM === */
.problem {
  padding: 120px 40px;
  background: var(--bg-secondary);
}

.problem-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.problem h2, .features h2, .market h2, .closing h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.problem h2 { margin-bottom: 56px; max-width: 700px; }

.problem-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.problem-card {
  padding: 36px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s ease;
}

.problem-card:hover { border-color: var(--border-accent); }

.problem-icon {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.problem-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.problem-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* === FEATURES === */
.features {
  padding: 120px 40px;
  background: var(--bg-primary);
}

.features-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.features h2 { margin-bottom: 56px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 40px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.feature-large {
  grid-column: 1 / -1;
  background: var(--bg-secondary);
  border-color: var(--border);
}

.feature-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.feature-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* === MARKET === */
.market {
  padding: 120px 40px;
  background: var(--bg-secondary);
}

.market-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.market-text h2 { margin-bottom: 32px; }

.market-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 20px;
}

.market-highlights {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 8px;
}

.highlight {
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

.highlight-number {
  display: block;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.highlight-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === CLOSING === */
.closing {
  padding: 140px 40px;
  background: var(--bg-primary);
  text-align: center;
  position: relative;
}

/* Removed decorative radial gradient glow */
.closing::before {
  display: none;
}

.closing-inner {
  max-width: 750px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.closing h2 {
  margin-bottom: 24px;
  line-height: 1.2;
}

.closing-sub {
  font-size: 19px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* === FOOTER === */
.site-footer {
  padding: 48px 40px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-links {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-legal-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal-link:hover {
  color: var(--text-secondary);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero { padding: 100px 24px 80px; min-height: auto; }
  .hero h1 { font-size: 40px; }
  .hero-sub { font-size: 17px; }
  .hero-stats {
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    width: 100%;
    align-items: flex-start;
  }
  .stat-divider { width: 100%; height: 1px; }

  .problem, .features, .market, .closing { padding: 80px 24px; }

  .problem-cards { grid-template-columns: 1fr; }

  .feature-grid { grid-template-columns: 1fr; }
  .feature-large { grid-column: 1; }

  .market-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .closing h2 { font-size: 28px; }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 32px; }
  .stat-number { font-size: 26px; }
  .problem h2, .features h2, .market h2, .closing h2 { font-size: 26px; }
  .feature-card h3 { font-size: 20px; }
  .highlight-number { font-size: 28px; }
}

/* ============================================================
   APP NAVIGATION (shared across all app pages)
   ============================================================ */
.app-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
}

.nav-brand img {
  height: 36px;
  width: 36px;
  object-fit: cover;
  border-radius: 50%;
  clip-path: circle(40% at 50% 50%);
}

.nav-brand:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.nav-link:hover { color: var(--text-primary); background: var(--bg-secondary); }
.nav-link--active { color: var(--accent) !important; }

/* ============================================================
   HERO CTAs (landing page)
   ============================================================ */
.hero { padding-top: 160px; }

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
  letter-spacing: -0.01em;
}

.btn-hero-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 14px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.btn-hero-secondary:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
  background: var(--bg-secondary);
}

.closing-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   APP FOOTER (marketplace pages)
   ============================================================ */
.app-footer {
  padding: 40px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

/* ============================================================
   BROWSE PAGE
   ============================================================ */
.browse-page { padding-top: 64px; min-height: 100vh; }

.browse-header {
  background: var(--bg-secondary);
  padding: 60px 40px 48px;
  border-bottom: 1px solid var(--border);
}

.browse-header-inner { max-width: 1200px; margin: 0 auto; }

.browse-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.browse-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.browse-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}

/* -- Filters sidebar -- */
.filters-sidebar {
  position: sticky;
  top: 80px;
}

.filters-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.filters-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.filters-clear {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}

.filters-clear:hover { text-decoration: underline; }

.filter-group { margin-bottom: 24px; }

.filter-label {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.filter-options { display: flex; flex-direction: column; gap: 8px; }

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.filter-option:hover { color: var(--text-primary); background: var(--bg-secondary); }

.filter-option input[type="radio"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.option-icon { font-size: 15px; }

.price-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-input {
  width: 0;
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.2s;
}

.price-input:focus { border-color: var(--border-accent); }
.price-sep { color: var(--text-muted); font-size: 13px; }

.filter-select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
}

.filter-select:focus { border-color: var(--border-accent); }

.btn-filter {
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: -0.01em;
}

.btn-filter:hover { background: #1d4ed8; }

/* -- Listings main area -- */
.listings-main {}

.search-bar-form { margin-bottom: 20px; }

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 6px 6px 16px;
  gap: 12px;
  transition: border-color 0.2s;
}

.search-bar:focus-within { border-color: var(--border-accent); }

.search-icon { color: var(--text-muted); flex-shrink: 0; }

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
}

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

.search-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.search-btn:hover { color: var(--text-primary); border-color: var(--border-accent); }

.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.results-count {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-list-equipment {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  transition: all 0.2s;
}

.btn-list-equipment:hover { background: rgba(37, 99, 235, 0.12); }

/* -- Listing cards -- */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.listing-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.listing-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.listing-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.listing-category {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.04em;
}

.listing-category--atm {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.listing-category--vending {
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
}

.listing-condition {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: capitalize;
  letter-spacing: 0.04em;
}

.listing-condition--new { color: #059669; background: rgba(5, 150, 105, 0.08); border: 1px solid rgba(5, 150, 105, 0.2); }
.listing-condition--used { color: var(--text-muted); background: rgba(0,0,0,0.03); border: 1px solid var(--border); }
.listing-condition--refurbished { color: #d97706; background: rgba(217, 119, 6, 0.06); border: 1px solid rgba(217, 119, 6, 0.15); }

.listing-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 10px;
}

.listing-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}

.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.listing-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

.listing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.listing-price {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.listing-cta {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.listing-card:hover .listing-cta { color: var(--accent); }

/* -- Empty state -- */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.empty-icon { font-size: 48px; margin-bottom: 20px; }

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.empty-state p { font-size: 15px; color: var(--text-secondary); }
.empty-state a { color: var(--accent); text-decoration: none; }
.empty-state a:hover { text-decoration: underline; }

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.detail-page { padding-top: 64px; min-height: 100vh; }

.detail-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
}

.breadcrumb { margin-bottom: 28px; }

.breadcrumb-link {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-link:hover { color: var(--accent); }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
  align-items: start;
}

.detail-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.detail-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.detail-price-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.detail-price {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.detail-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--text-muted);
}

.detail-section { margin-bottom: 36px; }

.detail-section-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.detail-description p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 12px;
}

.specs-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.spec-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.spec-row:last-child { border-bottom: none; }

.spec-key {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  width: 200px;
  flex-shrink: 0;
}

.spec-value {
  font-size: 14px;
  color: var(--text-primary);
}

.detail-meta-row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.detail-meta-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: 80px;
  flex-shrink: 0;
  padding-top: 2px;
}

.detail-meta-value {
  font-size: 14px;
  color: var(--text-secondary);
}

/* -- Detail sidebar -- */
.detail-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.success-banner {
  background: rgba(5, 150, 105, 0.06);
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 14px;
  color: #059669;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.contact-card-header { margin-bottom: 24px; }

.contact-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.contact-subtitle { font-size: 13px; color: var(--text-muted); }

.seller-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.seller-avatar {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border: 2px solid var(--border-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.seller-details { display: flex; flex-direction: column; gap: 2px; }

.seller-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.seller-label { font-size: 12px; color: var(--text-muted); }

.contact-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.btn-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-contact--primary {
  background: var(--accent);
  color: #fff;
}

.btn-contact--primary:hover { background: #1d4ed8; }

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

.btn-contact--secondary:hover { color: var(--text-primary); border-color: var(--border-accent); }

.contact-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.listing-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.summary-row:last-child { border-bottom: none; }

.summary-label { font-size: 13px; color: var(--text-muted); }

.summary-value {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.summary-value.accent { color: var(--accent); font-size: 18px; font-weight: 700; }
.capitalize { text-transform: capitalize; }

/* ============================================================
   SELL / SUBMIT FORM PAGE
   ============================================================ */
.sell-page { padding-top: 64px; min-height: 100vh; }

.sell-inner { max-width: 1100px; margin: 0 auto; padding: 60px 40px; }

.sell-header { margin-bottom: 48px; }

.sell-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.sell-sub { font-size: 16px; color: var(--text-secondary); margin-top: 8px; }

.sell-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

/* -- Form -- */
.form-errors {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #dc2626;
}

.form-errors ul { margin-top: 8px; padding-left: 16px; }
.form-errors li { margin-top: 4px; }

.sell-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.form-section {
  padding: 32px;
  border-bottom: 1px solid var(--border);
}

.form-section:last-child { border-bottom: none; }

.form-section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-section-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }

.form-row { display: flex; gap: 16px; }
.form-row--2col > .form-group { flex: 1; min-width: 0; }

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

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.required { color: #dc2626; }

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); font-size: 14px; }

.form-textarea { resize: vertical; min-height: 140px; line-height: 1.6; }

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; display: block; }

.price-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.price-prefix {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 15px;
  z-index: 1;
  pointer-events: none;
}

.price-field { padding-left: 26px; }

.form-submit-row {
  padding: 32px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.btn-submit {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  padding: 16px 36px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: -0.01em;
}

.btn-submit:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.submit-note { font-size: 13px; color: var(--text-muted); margin-top: 12px; }

/* -- Tips sidebar -- */
.sell-tips { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }

.tips-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.tips-card--accent {
  border-color: var(--border-accent);
  background: var(--bg-secondary);
}

.tips-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.tips-card--accent .tips-title { color: var(--accent); }

.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tips-list li {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tip-icon {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.tips-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ============================================================
   ERROR PAGE
   ============================================================ */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px;
}

.error-inner { text-align: center; max-width: 480px; }

.error-code {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 700;
  color: var(--border);
  letter-spacing: -0.05em;
  margin-bottom: 16px;
}

.error-message {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* ============================================================
   RESPONSIVE -- MARKETPLACE PAGES
   ============================================================ */
@media (max-width: 900px) {
  .browse-layout { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .filters-sidebar { position: static; }
  .filters-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .filters-header { grid-column: 1 / -1; }
  .btn-filter { grid-column: 1 / -1; }

  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .detail-inner { padding: 24px; }

  .sell-layout { grid-template-columns: 1fr; }
  .sell-tips { position: static; }
  .sell-inner { padding: 32px 24px; }
}

@media (max-width: 600px) {
  .nav-inner { padding: 0 20px; }
  .browse-header { padding: 40px 24px 32px; }
  .listings-grid { grid-template-columns: 1fr; }
  .form-row--2col { flex-direction: column; gap: 0; }
  .filters-form { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: flex-start; }
  .closing-ctas { flex-direction: column; align-items: center; }
}

/* =====================================================================
   ROUTES / BUSINESS LISTINGS
   ===================================================================== */

/* Neutral route accent (replacing gold) */
:root {
  --gold: #475569;
  --gold-dim: rgba(71, 85, 105, 0.06);
  --gold-border: rgba(71, 85, 105, 0.2);
}

/* Browse page route header variant */
.browse-header--routes {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.section-tag--gold {
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  padding: 6px 14px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.route-header-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.route-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
}

/* Route cards in grid */
.routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.route-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.route-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.route-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

/* Route category badge */
.listing-category--route {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--gold-border);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-display);
}

/* ROI badge */
.roi-badge {
  background: rgba(5, 150, 105, 0.06);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.2);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.roi-badge--large {
  font-size: 14px;
  padding: 6px 14px;
}

/* Route financial metrics in card */
.route-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.route-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.route-metric-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-display);
  font-weight: 600;
}

.route-metric-value {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.route-metric-value--green { color: #059669; }

/* Price override for route cards (larger) */
.listing-price--large {
  font-size: 22px;
}

/* Route explainer in sidebar */
.route-explainer-box {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.route-explainer-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.route-explainer-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 12px;
}

.route-explainer-cta {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.route-explainer-cta:hover { text-decoration: underline; }

/* -- Route detail page -- */

/* Financial overview card on detail page */
.route-financials-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 24px 0;
}

.route-financials-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.route-financials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.route-financial-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.route-financial-label {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.route-financial-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.route-financial-value--green { color: #059669; }

/* Operational stats row (machines / locations / years) */
.route-ops-row {
  display: flex;
  gap: 24px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.route-op-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}

.route-op-number {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.route-op-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-family: var(--font-display);
  font-weight: 600;
}

/* Summary card route variant */
.listing-summary-card--route {
  border-color: var(--border);
}

.summary-value.green { color: #059669; }
.summary-value--lg { font-size: 20px; }

/* Homepage route spotlight section */
.routes-spotlight {
  margin: 40px 0 16px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.routes-spotlight-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.routes-spotlight-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.routes-spotlight-sub {
  font-size: 14px;
  color: var(--text-muted);
}

.routes-spotlight-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}

.routes-spotlight-link:hover { text-decoration: underline; }

.routes-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Sell form type toggle */
.listing-type-toggle {
  display: flex;
  gap: 16px;
  margin: 0 auto 32px;
  max-width: 680px;
  padding: 0 24px;
}

.type-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.type-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.type-btn--active {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--accent-dim);
}

.type-btn-icon { font-size: 24px; margin-bottom: 2px; }
.type-btn-label { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.type-btn-sub { font-size: 12px; color: var(--text-muted); text-align: center; }

/* Route tips card neutral variant */
.tips-card--gold {
  background: var(--bg-secondary);
  border-color: var(--border);
}

.tips-card--gold .tips-title { color: var(--text-primary); }

/* 3-col form row for route machine/location/years fields */
.form-row--3col {
  display: flex;
  gap: 16px;
}

.form-row--3col .form-group { flex: 1; }

@media (max-width: 600px) {
  .routes-grid { grid-template-columns: 1fr; }
  .route-financials-grid { grid-template-columns: 1fr; }
  .route-metrics { grid-template-columns: repeat(2, 1fr); }
  .listing-type-toggle { flex-direction: column; padding: 0 16px; }
  .form-row--3col { flex-direction: column; gap: 0; }
  .route-ops-row { gap: 12px; }
}

/* ========================================================================
   AUTH: Signup / Login Pages
   ======================================================================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--bg-secondary);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.auth-header {
  margin-bottom: 32px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-sub {
  color: var(--text-secondary);
  font-size: 15px;
}

.auth-errors {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 24px;
}

.auth-error {
  color: #dc2626;
  font-size: 14px;
  margin-bottom: 4px;
}

.auth-error:last-child { margin-bottom: 0; }

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.btn-auth-primary {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 8px;
}

.btn-auth-primary:hover { opacity: 0.9; }

.auth-switch {
  margin-top: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-link {
  color: var(--accent);
  text-decoration: none;
}

.auth-link:hover { text-decoration: underline; }

/* ========================================================================
   NAV: Auth states
   ======================================================================== */

.nav-logout-form { margin: 0; }

.nav-logout-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 15px;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.nav-logout-btn:hover { color: var(--text-primary); }

/* ========================================================================
   SAVE BUTTON: Card-level bookmark
   ======================================================================== */

.listing-card-wrap {
  position: relative;
}

/* The card anchor inside the wrap fills naturally */
.listing-card-wrap .listing-card,
.listing-card-wrap .route-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.btn-save-card {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  z-index: 2;
  line-height: 1;
  opacity: 0.6;
}

.btn-save-card:hover { opacity: 1; background: var(--bg-card); border-color: var(--border-accent); }
.btn-save-card--saved { opacity: 1; background: var(--accent-dim); border-color: var(--border-accent); }

/* ========================================================================
   SAVE BUTTON: Detail page
   ======================================================================== */

.btn-save-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  margin-top: 12px;
}

.btn-save-detail:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  background: var(--accent-dim);
}

.btn-save-detail--saved {
  border-color: var(--border-accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.save-detail-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 6px;
  margin-bottom: 4px;
}

/* ========================================================================
   SAVED LISTINGS DASHBOARD
   ======================================================================== */

.saved-page-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 40px 80px;
}

.price-drop-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(5, 150, 105, 0.06);
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  color: #059669;
  font-size: 15px;
  margin-bottom: 24px;
}

.price-drop-icon { font-size: 20px; }

.saved-results-meta {
  margin-bottom: 20px;
}

/* saved card price block */
.saved-price-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.listing-price--dropped {
  color: #059669;
}

.saved-was-price {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.saved-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-unsave {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  padding: 6px 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-unsave:hover { border-color: #dc2626; color: #dc2626; }

.listing-card--saved {
  position: relative;
}

.listing-card--price-drop {
  border-color: rgba(5, 150, 105, 0.2) !important;
  background: rgba(5, 150, 105, 0.02);
}

.price-drop-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(5, 150, 105, 0.06);
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: 100px;
  padding: 4px 10px;
  font-size: 12px;
  color: #059669;
  font-weight: 500;
  margin-bottom: 8px;
}

.empty-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.btn-primary {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
  display: inline-block;
  padding: 12px 24px;
  background: var(--bg-card);
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.15s;
}

.btn-secondary:hover { border-color: var(--border-accent); }

@media (max-width: 768px) {
  .auth-card { padding: 32px 24px; }
  .saved-page-inner { padding: 24px 20px 60px; }
}

/* ========================================================================
   MESSAGING SYSTEM
   ======================================================================== */

/* -- Nav unread indicator -- */
.nav-messages-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }

.nav-unread-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  font-size: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
}

/* -- "Message Seller" button on detail pages -- */
.btn-contact--message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  margin-bottom: 8px;
  transition: background 0.15s;
}

.btn-contact--message:hover {
  background: #1d4ed8;
}

/* -- Message modal -- */
.msg-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.msg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.msg-modal-box {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.msg-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.msg-modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.msg-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.15s;
}

.msg-modal-close:hover { color: var(--text-primary); }

.msg-modal-listing {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-modal-send {
  width: 100%;
  margin-top: 12px;
  padding: 13px;
  font-size: 15px;
  border: none;
  cursor: pointer;
}

.msg-modal-auth {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.msg-modal-auth p {
  color: var(--text-secondary);
  font-size: 15px;
}

.msg-modal-signup, .msg-modal-login {
  text-align: center;
}

.msg-modal-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0 8px;
  text-align: center;
}

.msg-modal-success p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* -- Inbox thread list -- */
.messages-inbox-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 40px 80px;
}

.inbox-thread-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inbox-thread-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.inbox-thread-row:hover {
  border-color: var(--border-accent);
  background: var(--bg-secondary);
}

.inbox-thread-row--unread {
  border-color: rgba(37, 99, 235, 0.2);
}

.inbox-thread-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.inbox-thread-body {
  flex: 1;
  min-width: 0;
}

.inbox-thread-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.inbox-thread-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.inbox-thread-time {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.inbox-thread-listing {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-thread-preview {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-unread-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 700;
}

/* -- Thread / Conversation page -- */
.thread-page {
  padding-top: 64px;
  min-height: 100vh;
}

.thread-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}

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

.thread-listing-info {
  margin-top: 12px;
}

.thread-listing-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.thread-listing-link {
  color: inherit;
  text-decoration: none;
}

.thread-listing-link:hover { color: var(--accent); }

.thread-with {
  font-size: 14px;
  color: var(--text-muted);
}

.thread-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 240px;
  max-height: 520px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.thread-empty {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  padding: 40px 0;
}

.thread-msg {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}

/* Buyer messages -- right-aligned */
.thread-msg--buyer {
  align-self: flex-end;
  align-items: flex-end;
}

/* Seller messages -- left-aligned */
.thread-msg--seller {
  align-self: flex-start;
  align-items: flex-start;
}

.thread-msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.thread-msg--buyer .thread-msg-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.thread-msg--seller .thread-msg-bubble {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.thread-msg-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
}

/* -- Compose area -- */
.thread-compose {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.thread-compose-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 14px 16px;
  outline: none;
  resize: vertical;
  min-height: 80px;
  line-height: 1.55;
  transition: border-color 0.2s;
}

.thread-compose-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.thread-compose-input::placeholder { color: var(--text-muted); }

.thread-compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.thread-char-count { font-size: 12px; color: var(--text-muted); }

.thread-send-btn {
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 10px 24px;
}

.thread-send-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.thread-error {
  padding: 10px 14px;
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #dc2626;
}

/* -- Seller inbox label -- */
.seller-inbox-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 8px;
}

.seller-inbox-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .messages-inbox-wrap { padding: 20px 16px 60px; }
  .thread-inner { padding: 24px 16px 60px; }
  .thread-msg { max-width: 90%; }
  .msg-modal-box { padding: 24px 20px; }
}

/* === VENDGRID SCORE === */

/* Score badge on listing cards */
.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 100px;
  line-height: 1;
  white-space: nowrap;
}

.score-badge--green {
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.score-badge--yellow {
  background: rgba(217, 119, 6, 0.06);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.15);
}

.score-badge--red {
  background: rgba(220, 38, 38, 0.06);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

/* Verified checkmark icon inside badge */
.score-badge-icon {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

/* Score display on listing cards -- top-right placement */
.listing-card-score {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 6px;
}

/* "VendGrid Verified" ribbon badge for 70+ scores */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: #059669;
  background: rgba(5, 150, 105, 0.06);
  border: 1px solid rgba(5, 150, 105, 0.2);
  padding: 5px 12px;
  border-radius: 100px;
  letter-spacing: 0.02em;
}

/* Score breakdown section on detail page */
.score-detail-section {
  margin-top: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

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

.score-detail-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.score-total {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.score-total--green { color: #059669; }
.score-total--yellow { color: #d97706; }
.score-total--red { color: #dc2626; }

.score-total-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 2px;
}

.score-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.score-breakdown-item {
  display: grid;
  grid-template-columns: 130px 1fr 40px;
  align-items: center;
  gap: 10px;
}

.score-breakdown-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.score-bar-track {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 100px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.4s ease;
}

.score-bar-fill--green { background: #059669; }
.score-bar-fill--yellow { background: #d97706; }
.score-bar-fill--red { background: #dc2626; }

.score-breakdown-pts {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: right;
}

.score-improve-tip {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(217, 119, 6, 0.04);
  border: 1px solid rgba(217, 119, 6, 0.12);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.score-improve-tip strong {
  color: #d97706;
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 600px) {
  .score-breakdown-item {
    grid-template-columns: 100px 1fr 36px;
    gap: 8px;
  }
  .score-detail-section { padding: 16px; }
}
