/* ─────────────────────────────────────────────────────────────────────────────
   R-evolv / SupplAi  —  Brand: Navy #001f4d · #003380  |  Orange #ff6f00
───────────────────────────────────────────────────────────────────────────── */

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

:root {
  --navy:    #001f4d;
  --navy-mid:#003380;
  --orange:  #ff6f00;
  --orange-d:#e05e00;
  --bg:      #f4f7fb;
  --surface: #ffffff;
  --border:  #dde7f5;
  --text:    #1a2540;
  --muted:   #6b7fa3;
  --radius:  12px;
  --shadow:  0 2px 16px rgba(0,31,77,0.08);
  --shadow-lg: 0 8px 40px rgba(0,31,77,0.14);
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 12px rgba(0,31,77,0.06);
}

.branding {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.branding-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.3px;
}

.powered-by {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

#toggleDarkMode {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
#toggleDarkMode:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
  transform: none;
  box-shadow: none;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--surface);
  padding: 72px 40px 64px;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-text { flex: 1; }

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
}

.hero-title {
  font-size: 3.6rem;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.hero-accent {
  color: var(--orange);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 24px;
  background: var(--surface);
}

.stat-num {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.5px;
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
  white-space: nowrap;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

.hero-logo-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-img {
  width: 340px;
  height: auto;
  object-fit: contain;
}

@media (max-width: 800px) {
  .hero { padding: 48px 24px; }
  .hero-inner { flex-direction: column-reverse; gap: 32px; text-align: center; }
  .hero-title { font-size: 2.4rem; }
  .hero-logo-img { width: 220px; }
  .hero-stats { margin: 0 auto; }
  .hero-desc { font-size: 0.97rem; }
}

/* ── Main Content ────────────────────────────────────────────────────────── */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

.section-heading {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.2px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 0.78rem;
}

/* ── Filters & Search ────────────────────────────────────────────────────── */
.search-section { margin-bottom: 36px; }

.filters-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 180px;
}

.filter-item label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.filter-item select,
.filter-item input[type="text"] {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.93rem;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.filter-item select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7fa3' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.filter-item select:focus,
.filter-item input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0,51,128,0.1);
}

.search-box { flex: 2 1 320px; }

.search-box input[type="text"] {
  width: 100%;
  font-size: 0.97rem;
  padding: 13px 16px;
}

.search-box input[type="text"]:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,111,0,0.1);
}

.buttons-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
button {
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  padding: 11px 22px;
  transition: all 0.18s ease;
  background: var(--orange);
  color: #fff;
}
button:hover {
  background: var(--orange-d);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,111,0,0.28);
}

.btn-secondary {
  background: var(--surface);
  color: var(--navy);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--navy);
  box-shadow: none;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg);
  transform: none;
  box-shadow: none;
}

/* ── Shopping List ───────────────────────────────────────────────────────── */
.shopping-list-section {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 24px 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.sl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.sl-header-left { display: flex; flex-direction: column; gap: 4px; }
.sl-sub { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.sl-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.sl-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.sl-input-row input {
  flex: 1;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color 0.18s;
}
.sl-input-row input:focus { outline: none; border-color: var(--navy); }

.sl-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.sl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  transition: all 0.2s;
  animation: sl-slide-in 0.25s ease;
}
.sl-item.found   { border-color: rgba(0,31,77,0.25); }
.sl-item.matched { border-color: rgba(46,204,113,0.4); background: rgba(46,204,113,0.04); }
.sl-item.no-match { border-color: rgba(255,111,0,0.3); background: rgba(255,111,0,0.03); }

@keyframes sl-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sl-pin {
  width: 32px; height: 32px;
  background: var(--orange);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255,111,0,0.3);
}
.sl-item-body { flex: 1; min-width: 0; }
.sl-item-name { font-size: 0.92rem; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.sl-item-status { font-size: 0.78rem; color: var(--muted); }
.sl-item-status .match-found  { color: #27ae60; font-weight: 600; }
.sl-item-status .match-none   { color: var(--orange); font-weight: 600; }
.sl-item-price { font-size: 0.88rem; font-weight: 700; color: var(--navy); white-space: nowrap; }
.sl-item-remove {
  background: none; border: none; color: var(--muted); font-size: 1rem;
  cursor: pointer; padding: 4px; border-radius: 6px; line-height: 1;
  flex-shrink: 0;
}
.sl-item-remove:hover { color: #e74c3c; background: rgba(231,76,60,0.08); transform: none; box-shadow: none; }

/* ── Route summary ─────────────────────────────────────────────────────── */
.sl-route-summary {
  margin-top: 20px;
  background: var(--navy);
  border-radius: 14px;
  padding: 20px 22px;
  color: #fff;
}
.sl-route-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; font-size: 0.95rem;
}
.sl-route-icon { font-size: 1.2rem; }
.sl-route-total { margin-left: auto; font-size: 0.82rem; color: var(--orange); font-weight: 700; }
.sl-route-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0 0 14px;
}
.sl-route-steps li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.85rem; color: rgba(255,255,255,0.8);
}
.sl-route-steps li::before {
  content: '→';
  color: var(--orange); font-weight: 700; flex-shrink: 0;
}
.sl-route-steps li:first-child::before { content: '📍'; }
.sl-route-tip {
  font-size: 0.8rem; color: rgba(255,255,255,0.5);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 12px; line-height: 1.6;
}

/* ── Shopping list map pins ────────────────────────────────────────────── */
.sl-map-pin {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.sl-map-pin-dot {
  width: 34px; height: 34px;
  background: var(--orange);
  color: #fff;
  font-size: 0.9rem; font-weight: 900;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 12px rgba(255,111,0,0.4);
}
.sl-map-pin-dot span { transform: rotate(45deg); }

/* ── Chat ────────────────────────────────────────────────────────────────── */
.chat-section { margin-bottom: 28px; }

#supplai-chat-container {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

#chat-log {
  height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--bg);
}

.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.photo-upload-label {
  flex-shrink: 0;
  background: var(--navy);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.2px;
  transition: background 0.2s;
}
.photo-upload-label:hover { background: #002266; }
.photo-upload-label input { display: none; }

.chat-input-row input[type="text"] {
  flex: 1;
  padding: 11px 16px;
  font-size: 0.93rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}
.chat-input-row input[type="text"]:focus {
  outline: none;
  border-color: var(--navy);
  background: var(--surface);
}

#sendChat {
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
}

/* Chat bubbles */
.chat-bubble {
  max-width: 76%;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.55;
  word-break: break-word;
}

.user-bubble {
  background: var(--navy);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}

.ai-bubble {
  background: var(--surface);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
  border: 1.5px solid var(--border);
  border-left: 3px solid var(--orange);
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
}
.typing-indicator span {
  width: 7px; height: 7px;
  background: var(--orange);
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

#chat-log img {
  max-width: 100%;
  border-radius: 8px;
  display: block;
  margin-top: 6px;
}

/* ── Suggestions ─────────────────────────────────────────────────────────── */
.suggestions-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 28px;
}

.suggestion-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.suggestion-item:hover {
  border-color: var(--navy);
  box-shadow: var(--shadow);
}
.suggestion-item.fractional {
  border-left: 3px solid var(--orange);
}

.frac-badge {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 8px;
  vertical-align: middle;
  letter-spacing: 0.3px;
}

.heart-btn {
  cursor: pointer;
  font-size: 1rem;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
  user-select: none;
}
.heart-btn:hover { background: var(--bg); color: var(--orange); }
.heart-btn.active { color: var(--orange); }

.no-results {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}

/* ── List an Item ────────────────────────────────────────────────────────── */
.list-section { margin-bottom: 48px; }

.list-toggle-btn {
  background: var(--navy);
  color: #fff;
  font-size: 0.9rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  letter-spacing: 0.2px;
  width: auto;
}
.list-toggle-btn:hover {
  background: #002266;
  box-shadow: 0 4px 20px rgba(0,31,77,0.2);
}

#list-item-form {
  margin-top: 2px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 0 0 16px 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.list-form-header { margin-bottom: 20px; }
.list-form-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}
.list-form-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.list-image-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1.5px dashed var(--border);
}

.list-photo-label {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: background 0.18s;
}
.list-photo-label:hover { background: #002266; }
.list-photo-label input { display: none; }

#listImageStatus {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a8f52;
}

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

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group.fraction-group { grid-column: 1 / -1; }

.form-group label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.optional {
  font-weight: 400;
  text-transform: none;
  color: #b0bdd4;
  font-size: 0.72rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.93rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.18s, background 0.18s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--surface);
}
.form-group textarea { resize: vertical; min-height: 68px; }

/* Fraction slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--orange) 0%, var(--navy) 100%);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  margin: 10px 0 6px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 2px 8px rgba(255,111,0,0.4);
  cursor: pointer;
  border: 2px solid #fff;
}

#fractionDisplay {
  color: var(--orange);
  font-weight: 700;
}

.fraction-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.listing-success {
  margin-top: 16px;
  padding: 13px 18px;
  background: #edfaf4;
  border: 1.5px solid #34c97a;
  border-radius: var(--radius);
  color: #1a6b3c;
  font-weight: 600;
  font-size: 0.9rem;
}

.hidden { display: none !important; }

/* ── Shipping Panel ───────────────────────────────────────────────────────── */
#shipping-panel {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2000;
  width: 310px;
  animation: slideUp 0.22s ease;
}
@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

#shipping-panel-inner {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

#closeShipping {
  position: absolute;
  top: 12px; right: 14px;
  background: none;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  letter-spacing: 0.3px;
}
#closeShipping:hover {
  background: var(--bg);
  transform: none;
  box-shadow: none;
  color: var(--navy);
}

#shipping-title {
  font-size: 0.97rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 3px;
  padding-right: 60px;
}
#shipping-route-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.shipping-loading, .shipping-error, .shipping-distance {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  padding: 8px 0;
}
.shipping-error { color: #c0392b; }
.shipping-distance { margin-top: 8px; }

.shipping-quote-card {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg);
  margin-bottom: 8px;
  border-left: 4px solid transparent;
}

.quote-label { font-weight: 800; font-size: 0.85rem; margin-bottom: 2px; }
.quote-carrier { font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; }
.quote-price { font-size: 1.1rem; font-weight: 900; color: var(--navy); }
.quote-eta { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }

/* ── Map ─────────────────────────────────────────────────────────────────── */
.map-privacy-banner {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  font-size: 0.82rem;
  flex-wrap: wrap;
}
.mpb-icon { font-size: 1rem; flex-shrink: 0; }
.mpb-text { flex: 1; min-width: 200px; }
.mpb-share-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--orange);
  cursor: pointer;
  white-space: nowrap;
  background: rgba(255,111,0,0.12);
  border: 1px solid rgba(255,111,0,0.3);
  border-radius: 20px;
  padding: 4px 14px;
}
.you-here-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.you-here-pin span { font-size: 1.6rem; line-height: 1; }
.yh-label {
  background: var(--navy);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

#map {
  width: 100%;
  height: 560px;
  border-top: 3px solid var(--orange);
}

.map-popup { font-size: 0.85rem; line-height: 1.6; }
.map-frac-badge {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 8px;
  margin-right: 4px;
}
.popup-ship-btn {
  margin-top: 10px;
  padding: 8px 14px;
  font-size: 0.8rem;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.popup-ship-btn:hover { background: #001a40; }

/* ── Hero — White background, navy text, orange accent, wave below ──────── */
.hero {
  background: #ffffff;
  border-bottom: none;
  padding: 90px 40px 0;
  position: relative;
  overflow: hidden;
}
.hero-title { color: var(--navy); }
.hero-eyebrow { color: var(--orange); }
.hero-accent { color: var(--orange); }
.hero-desc { color: var(--muted); }

/* ── Animated Wave — 3 layers, 2 directions ──────────────────────────────── */
.hero-wave {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
  line-height: 0;
  margin-top: 48px;
}
.wave-svg {
  position: absolute;
  bottom: 0; left: 0;
  width: 200%; height: 100%;
  display: block;
}
.wave-svg-1 { animation: wave-fwd 22s linear infinite; }
.wave-l1    { fill: rgba(0,51,128,0.22); }
.wave-svg-2 { animation: wave-rev 13s linear infinite; }
.wave-l2    { fill: rgba(0,31,77,0.52); }
.wave-svg-3 { animation: wave-fwd 8s linear infinite; animation-delay: -3s; }
.wave-l3    { fill: #001533; }

@keyframes wave-fwd {
  from { transform: translateX(0);    }
  to   { transform: translateX(-50%); }
}
@keyframes wave-rev {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0);    }
}

/* ── Dark Mode ───────────────────────────────────────────────────────────── */
body.dark-mode {
  --bg:      #080f1e;
  --surface: #0e1a2e;
  --border:  #1a2a42;
  --text:    #dde7f5;
  --muted:   #5a7499;
}
body.dark-mode .hero { background: #080f1e; }
body.dark-mode .hero-title { color: #e8f0ff; }
body.dark-mode .hero-desc  { color: rgba(255,255,255,0.55); }
body.dark-mode .wave-l1 { fill: rgba(0,51,128,0.3); }
body.dark-mode .wave-l2 { fill: rgba(0,31,77,0.65); }
body.dark-mode .wave-l3 { fill: #040a14; }
body.dark-mode .main-header { background: #0a1120; border-color: var(--border); }
body.dark-mode .logo-text { color: #e8f0ff; }
body.dark-mode #map { filter: brightness(0.6) saturate(0.7); }
body.dark-mode .hero-logo-img { filter: drop-shadow(0 8px 32px rgba(0,0,0,0.6)); }
/* cards & surfaces */
body.dark-mode .card,
body.dark-mode .suggestion-item,
body.dark-mode .modal-box,
body.dark-mode .shipping-panel-inner,
body.dark-mode .manage-card,
body.dark-mode .saved-search-item,
body.dark-mode .following-card,
body.dark-mode .groupbuy-card,
body.dark-mode .notif-item,
body.dark-mode .profile-hero,
body.dark-mode .auth-card,
body.dark-mode .worth-card,
body.dark-mode .edit-profile-form,
body.dark-mode .offer-form,
body.dark-mode .rate-form-inner,
body.dark-mode .listing-card { background: var(--surface); border-color: var(--border); }
body.dark-mode .listing-card-name,
body.dark-mode .card-name,
body.dark-mode .modal-item-name,
body.dark-mode .thread-name,
body.dark-mode .profile-name,
body.dark-mode .seller-name { color: #e8f0ff; }
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea { background: #0a1422; color: #dde7f5; border-color: var(--border); }
body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,111,0,0.15); }
body.dark-mode .btn-secondary { background: #0e1a2e; color: #c8d8f0; border-color: var(--border); }
body.dark-mode .btn-ghost { color: #8aadcc; border-color: var(--border); }
body.dark-mode .site-nav-link { color: #8aadcc; }
body.dark-mode .site-nav-link:hover { color: var(--orange); }
body.dark-mode .thread-compose { background: #0a1120; border-color: var(--border); }
body.dark-mode .conv-item { border-color: var(--border); }
body.dark-mode .conv-item:hover { background: #0e1a2e; }
body.dark-mode .messages-sidebar { background: #0a1120; border-color: var(--border); }
body.dark-mode .modal-overlay { background: rgba(0,0,0,0.75); }
body.dark-mode .hero-wave .wave-l3 { fill: #040a14; }
body.dark-mode .section-heading { color: #c8d8f0; }
body.dark-mode .profile-tabs { border-color: var(--border); }
body.dark-mode .profile-tab { color: #5a7499; }
body.dark-mode .profile-tab.active { color: var(--orange); border-color: var(--orange); }
body.dark-mode .worth-upload-zone { background: #0a1422; border-color: var(--border); }
body.dark-mode .worth-comp-card { background: #0a1422; border-color: var(--border); }
body.dark-mode .demand-tip { background: #1a1500; border-color: #3a2e00; color: #c8a840; }

/* ── Header Actions ──────────────────────────────────────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-dm {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-dm:hover { border-color: var(--navy); color: var(--navy); transform: none; box-shadow: none; }

.btn-sm { padding: 8px 16px !important; font-size: 0.82rem !important; }

.btn-login {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: border-color 0.2s, color 0.2s;
  cursor: pointer;
}
.btn-login:hover { border-color: var(--navy); }

.btn-signup {
  background: var(--orange);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s;
  cursor: pointer;
  border: none;
}
.btn-signup:hover { background: var(--orange-d); }

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.2s;
}
.user-pill:hover { border-color: var(--navy); }

.user-avatar-initial {
  width: 28px;
  height: 28px;
  background: var(--navy);
  color: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,15,40,0.6);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--surface);
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,15,40,0.3);
  animation: slideUpModal 0.22s ease;
}
@keyframes slideUpModal {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  z-index: 1;
  cursor: pointer;
}
.modal-close:hover { background: var(--border); transform: none; box-shadow: none; color: var(--navy); }

#modal-content { padding: 28px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-right: 60px;
}

.modal-item-name {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 10px;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cond-pill {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}

.modal-location { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.modal-cat { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.modal-cat::before { content: '·'; margin-right: 6px; color: var(--border); }

.modal-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--navy);
  line-height: 1;
  white-space: nowrap;
  text-align: right;
}
.modal-price span { font-size: 0.88rem; font-weight: 500; color: var(--muted); display: block; }

.modal-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.modal-sections { display: flex; flex-direction: column; gap: 0; }

.modal-section {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.modal-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Eco score */
.eco-score-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.eco-score-fill {
  height: 100%;
  background: linear-gradient(to right, #f39c12, #2ecc71);
  border-radius: 4px;
  transition: width 0.6s ease;
}
.eco-score-label { font-size: 0.82rem; font-weight: 600; color: var(--text); }

/* Group buy */
.group-buy-row { margin-bottom: 8px; }
.group-buy-progress {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.group-buy-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.group-buy-count { font-size: 0.82rem; font-weight: 600; color: var(--navy); }
.group-buy-note { font-size: 0.78rem; color: var(--muted); margin-bottom: 10px; line-height: 1.5; }
.group-buy-btn {
  background: transparent;
  color: var(--orange);
  border: 1.5px solid var(--orange);
  padding: 9px 20px;
  font-size: 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  transition: all 0.18s;
}
.group-buy-btn:hover { background: var(--orange); color: #fff; transform: none; box-shadow: none; }

/* Reviews */
.review-list { margin-bottom: 16px; }
.review-item {
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 10px;
  margin-bottom: 8px;
}
.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.review-author { font-size: 0.82rem; font-weight: 700; color: var(--navy); }
.review-stars { color: var(--orange); font-size: 0.9rem; letter-spacing: 2px; }
.review-text { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.review-date { font-size: 0.72rem; color: #b0bdd4; margin-top: 4px; }
.no-reviews { font-size: 0.85rem; color: var(--muted); padding: 8px 0; margin-bottom: 12px; }

.review-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--bg);
  border-radius: 10px;
  border: 1.5px dashed var(--border);
}
.star-input { display: flex; gap: 6px; }
.star {
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--border);
  transition: color 0.12s;
  line-height: 1;
  user-select: none;
}
.star.selected, .star.hovered { color: var(--orange); }
.review-input {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.18s;
}
.review-input:focus { outline: none; border-color: var(--navy); }

.avg-rating {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--orange);
  background: #fff5eb;
  padding: 2px 8px;
  border-radius: 8px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.modal-contact-btn { flex: 1; }

/* ── Auth Page ───────────────────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 73px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.auth-tabs {
  display: flex;
  border-bottom: 1.5px solid var(--border);
}
.auth-tab {
  flex: 1;
  background: var(--bg);
  color: var(--muted);
  border: none;
  border-radius: 0;
  padding: 16px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
}
.auth-tab.active {
  background: var(--surface);
  color: var(--navy);
  border-bottom-color: var(--orange);
}
.auth-tab:hover:not(.active) { color: var(--navy); transform: none; box-shadow: none; }

.auth-form {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-title { font-size: 1.4rem; font-weight: 900; color: var(--navy); }
.auth-sub { font-size: 0.88rem; color: var(--muted); }

.auth-submit { width: 100%; padding: 14px; font-size: 0.95rem; }

.auth-error {
  font-size: 0.85rem;
  color: #c0392b;
  background: #fdf2f2;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #f5c6c6;
}

.auth-switch { font-size: 0.85rem; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--orange); font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.form-grid.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Profile Page ────────────────────────────────────────────────────────── */
.profile-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.profile-hero {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: var(--navy);
  color: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  flex-shrink: 0;
}

.profile-info { flex: 1; }
.profile-name { font-size: 1.6rem; font-weight: 900; color: var(--navy); margin-bottom: 6px; }

.profile-type-badge {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}
.profile-type-badge.business   { background: var(--orange); }
.profile-type-badge.industrial { background: #2c3e50; }
.profile-type-badge.government { background: #1a6b3c; }

.profile-city  { font-size: 0.85rem; color: var(--muted); margin-left: 8px; }
.profile-since { font-size: 0.78rem; color: #b0bdd4; margin-top: 6px; }

.profile-quick-stats { display: flex; gap: 28px; margin-top: 20px; }
.profile-stat { display: flex; flex-direction: column; }
.profile-stat-num { font-size: 1.5rem; font-weight: 900; color: var(--navy); line-height: 1; }
.profile-stat-label { font-size: 0.72rem; color: var(--muted); font-weight: 500; margin-top: 3px; }

.profile-eco-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.eco-ring {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.eco-ring-inner {
  width: 60px; height: 60px;
  background: var(--surface);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.eco-ring-num { font-size: 1rem; font-weight: 900; color: var(--navy); line-height: 1; }
.eco-ring-label { font-size: 0.55rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

/* Profile tabs */
.profile-tabs {
  display: flex;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  margin-bottom: 0;
  border-bottom: none;
}
.profile-tab {
  flex: 1;
  background: transparent;
  color: var(--muted);
  border: none;
  border-radius: 0;
  padding: 14px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.18s;
}
.profile-tab.active { color: var(--navy); border-bottom-color: var(--orange); }
.profile-tab:hover:not(.active) { color: var(--navy); transform: none; box-shadow: none; background: var(--bg); }

.profile-tab-content {
  display: none;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 28px;
}
.profile-tab-content.active { display: block; }

/* Listing grid */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.listing-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.listing-card:hover { border-color: var(--navy); box-shadow: var(--shadow); }
.listing-card-name { font-size: 0.97rem; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.listing-card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.listing-card-price { font-size: 1.2rem; font-weight: 900; color: var(--navy); }
.listing-card-price span { font-size: 0.75rem; font-weight: 400; color: var(--muted); }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state-title { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.empty-state p { font-size: 0.88rem; }
.empty-state a { color: var(--orange); font-weight: 700; text-decoration: none; }

/* Impact */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.impact-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}
.impact-num { font-size: 2.2rem; font-weight: 900; color: var(--navy); line-height: 1; margin-bottom: 6px; }
.impact-label { font-size: 0.78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.impact-sub { font-size: 0.72rem; color: #b0bdd4; margin-top: 4px; }

/* Badges */
.badges-row { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
}
.badge-icon {
  width: 34px; height: 34px;
  background: var(--navy);
  color: var(--orange);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 900;
  flex-shrink: 0;
}
.badge-text { font-size: 0.85rem; font-weight: 700; color: var(--navy); }
.badge-sub  { font-size: 0.72rem; color: var(--muted); }

@media (max-width: 640px) {
  .profile-hero { flex-direction: column; }
  .profile-quick-stats { flex-wrap: wrap; gap: 16px; }
  .profile-tabs { overflow-x: auto; }
  .profile-tab { white-space: nowrap; }
  .modal-header { flex-direction: column; padding-right: 0; }
  .modal-price { font-size: 1.5rem; margin-top: 8px; }
}

/* ── Site Nav ─────────────────────────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 12px;
}
.site-nav-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.2s;
  white-space: nowrap;
}
.site-nav-link:hover { background: var(--bg); color: var(--navy); }
.nav-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 4px;
}

/* ── Verified Badge ───────────────────────────────────────────────────────── */
.verified-badge {
  display: inline-flex;
  align-items: center;
  background: #e8f8f0;
  color: #1a7a47;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: middle;
  border: 1px solid #b3e6ca;
}

/* ── Advanced Filters ────────────────────────────────────────────────────── */
.filter-checks {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding-bottom: 4px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.check-label input[type="checkbox"] { accent-color: var(--orange); width: 16px; height: 16px; }

/* ── Recently Viewed ─────────────────────────────────────────────────────── */
.recently-viewed-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px 24px;
}
.recently-viewed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.recently-viewed-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.18s;
}
.recently-viewed-card:hover { border-color: var(--orange); transform: translateY(-2px); box-shadow: var(--shadow); }
.rv-name { font-size: 0.88rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.rv-meta { font-size: 0.75rem; color: var(--muted); }
.rv-price { font-size: 0.95rem; font-weight: 800; color: var(--navy); margin-top: 6px; }

/* ── Price Confidence ────────────────────────────────────────────────────── */
.price-confidence {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
  text-align: right;
}

/* ── Follow & Report buttons ─────────────────────────────────────────────── */
.btn-follow {
  background: transparent;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-follow:hover, .btn-follow.following {
  background: var(--navy);
  color: #fff;
}
.btn-report {
  background: transparent;
  border: 1.5px solid #e74c3c;
  color: #e74c3c;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-report:hover { background: #fdf2f0; }

/* ── Demand Tip ──────────────────────────────────────────────────────────── */
.demand-tip {
  background: #f0f7ff;
  border: 1.5px solid #b3d4f0;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--navy);
  margin-top: 8px;
}
.demand-tip.peak {
  background: #fff8e6;
  border-color: #ffd54f;
  color: #7a5800;
}

/* ── Save Search button ──────────────────────────────────────────────────── */
#saveSearchButton { background: transparent; border-color: var(--navy); color: var(--navy); }
#saveSearchButton:hover { background: var(--navy); color: #fff; }

/* ── Messages Layout ─────────────────────────────────────────────────────── */
.messages-layout {
  display: flex;
  height: calc(100vh - 72px);
  overflow: hidden;
}
.messages-sidebar {
  width: 320px;
  flex-shrink: 0;
  border-right: 1.5px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.messages-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
  border-bottom: 1.5px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.messages-sidebar-title { font-size: 1.05rem; font-weight: 800; color: var(--navy); }
.unread-badge {
  background: var(--orange); color: #fff;
  font-size: 0.72rem; font-weight: 800;
  border-radius: 12px; padding: 2px 8px;
}
.conv-empty {
  padding: 24px 20px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}
.conv-empty a { color: var(--orange); font-weight: 700; text-decoration: none; }
.conv-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.conv-item:hover { background: var(--bg); }
.conv-item.conv-active { background: #f0f5ff; border-left: 3px solid var(--navy); }
.conv-item.conv-unread .conv-name { font-weight: 800; color: var(--navy); }
.conv-avatar {
  width: 40px; height: 40px;
  background: var(--navy);
  color: var(--orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 800;
  flex-shrink: 0;
}
.conv-details { flex: 1; min-width: 0; }
.conv-name { font-size: 0.88rem; font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: 6px; }
.conv-badge { background: var(--orange); color: #fff; font-size: 0.65rem; font-weight: 800; border-radius: 10px; padding: 1px 6px; }
.conv-item-label { font-size: 0.75rem; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-preview { font-size: 0.78rem; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { font-size: 0.72rem; color: var(--muted); flex-shrink: 0; }
.messages-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}
.messages-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  gap: 12px;
}
.messages-placeholder-icon { font-size: 3rem; opacity: 0.3; }
.thread-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
}
.thread-avatar {
  width: 40px; height: 40px;
  background: var(--navy); color: var(--orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 800; flex-shrink: 0;
}
.thread-name { font-size: 0.95rem; font-weight: 800; color: var(--navy); }
.thread-item-label { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.thread-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg-bubble { max-width: 65%; display: flex; flex-direction: column; }
.msg-mine { align-self: flex-end; align-items: flex-end; }
.msg-theirs { align-self: flex-start; align-items: flex-start; }
.msg-content {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
}
.msg-mine .msg-content { background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msg-theirs .msg-content { background: var(--surface); border: 1.5px solid var(--border); color: var(--text); border-bottom-left-radius: 4px; }
.msg-time { font-size: 0.68rem; color: var(--muted); margin-top: 4px; padding: 0 4px; }
.thread-compose {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  background: var(--surface);
  border-top: 1.5px solid var(--border);
  flex-shrink: 0;
}
.msg-textarea {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: none;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}
.msg-textarea:focus { outline: none; border-color: var(--navy); }

/* ── What's It Worth page ────────────────────────────────────────────────── */
.worth-page { max-width: 700px; margin: 0 auto; padding: 40px 24px 80px; }
.worth-hero { text-align: center; margin-bottom: 40px; }
.worth-title { font-size: 2.8rem; font-weight: 900; color: var(--navy); letter-spacing: -1px; margin: 12px 0 16px; }
.worth-sub { font-size: 1rem; color: var(--muted); line-height: 1.7; max-width: 500px; margin: 0 auto; }
.worth-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.worth-upload-zone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.worth-upload-zone.drag-over { border-color: var(--orange); background: #fff8f0; }
.worth-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 32px;
  width: 100%;
}
.worth-upload-icon { font-size: 2.5rem; color: var(--muted); }
.worth-upload-text { font-size: 0.95rem; font-weight: 700; color: var(--navy); }
.worth-upload-hint { font-size: 0.78rem; color: var(--muted); }
.worth-preview { width: 100%; max-height: 280px; object-fit: contain; border-radius: 10px; }
.worth-loading { text-align: center; padding: 32px; color: var(--muted); }
.worth-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.worth-result { padding-top: 24px; border-top: 1.5px solid var(--border); margin-top: 24px; }
.worth-id-header { margin-bottom: 24px; }
.worth-item-name { font-size: 1.5rem; font-weight: 900; color: var(--navy); }
.worth-item-desc { font-size: 0.88rem; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.worth-price-section { background: var(--bg); border-radius: 12px; padding: 20px; margin: 20px 0; }
.worth-price-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 16px; }
.worth-price-range { display: flex; gap: 0; border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.worth-range-col { flex: 1; text-align: center; padding: 16px 12px; }
.worth-range-col.featured { background: var(--navy); }
.worth-range-col + .worth-range-col { border-left: 1.5px solid var(--border); }
.worth-range-val { font-size: 1.5rem; font-weight: 900; color: var(--navy); }
.worth-range-val.low { color: var(--muted); font-size: 1.2rem; }
.worth-range-val.mid { color: var(--orange); font-size: 1.8rem; }
.worth-range-val.high { color: var(--muted); font-size: 1.2rem; }
.worth-range-col.featured .worth-range-val { color: var(--orange); }
.worth-range-tag { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-top: 4px; }
.worth-range-col.featured .worth-range-tag { color: rgba(255,255,255,0.6); }
.worth-demand-tip {
  background: #f0f7ff; border: 1.5px solid #b3d4f0;
  border-radius: 10px; padding: 12px 16px;
  font-size: 0.85rem; color: var(--navy); margin: 16px 0;
}
.worth-demand-tip.peak { background: #fff8e6; border-color: #ffd54f; color: #7a5800; }
.worth-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.worth-error { color: #e74c3c; font-size: 0.9rem; margin-top: 16px; }
.worth-examples { text-align: center; }
.worth-examples-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 12px; }
.worth-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.worth-chip { background: var(--surface); border: 1.5px solid var(--border); border-radius: 20px; padding: 6px 14px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }

/* ── Community page ──────────────────────────────────────────────────────── */
.community-page { max-width: 1100px; margin: 0 auto; padding: 0 40px 80px; }
.community-hero { text-align: center; padding: 56px 0 40px; }
.community-title { font-size: 2.8rem; font-weight: 900; color: var(--navy); letter-spacing: -1px; margin: 12px 0 16px; }
.community-sub { font-size: 1rem; color: var(--muted); line-height: 1.7; max-width: 480px; margin: 0 auto 24px; }
.community-city-row { display: flex; align-items: center; gap: 12px; justify-content: center; }
.community-city-select {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.88rem;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}
.community-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.community-stat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: all 0.2s;
}
.community-stat-card.highlight {
  border-color: var(--orange);
  background: linear-gradient(135deg, #fff8f0, #ffffff);
}
.community-stat-num { font-size: 2.4rem; font-weight: 900; color: var(--navy); line-height: 1; margin-bottom: 8px; }
.community-stat-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.community-stat-sub { font-size: 0.72rem; color: #b0bdd4; margin-top: 4px; }
.community-body { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.community-section {}
.leaderboard-list { display: flex; flex-direction: column; gap: 8px; }
.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: all 0.2s;
}
.leaderboard-item:hover { border-color: var(--orange); }
.leaderboard-rank { font-size: 1rem; font-weight: 900; color: var(--muted); min-width: 24px; text-align: center; }
.leaderboard-rank.rank-1 { color: #f39c12; font-size: 1.2rem; }
.leaderboard-rank.rank-2 { color: #95a5a6; }
.leaderboard-rank.rank-3 { color: #cd7f32; }
.leaderboard-avatar { width: 36px; height: 36px; background: var(--navy); color: var(--orange); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.88rem; font-weight: 800; flex-shrink: 0; }
.leaderboard-info { flex: 1; }
.leaderboard-name { font-size: 0.9rem; font-weight: 700; color: var(--navy); }
.leaderboard-sub { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.leaderboard-score { font-size: 1rem; font-weight: 900; color: var(--navy); }
.recent-listings-list { display: flex; flex-direction: column; gap: 8px; }
.recent-listing-item { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 16px; }
.recent-listing-frac { font-size: 0.72rem; font-weight: 800; color: var(--orange); min-width: 28px; text-align: center; }
.recent-listing-info { flex: 1; }
.recent-listing-name { font-size: 0.88rem; font-weight: 700; color: var(--navy); }
.recent-listing-meta { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.recent-listing-price { font-size: 0.95rem; font-weight: 900; color: var(--navy); }
.community-cta { background: var(--navy); border-radius: 20px; padding: 48px; text-align: center; margin-top: 56px; color: #fff; }
.community-cta h3 { font-size: 1.8rem; font-weight: 900; margin-bottom: 12px; }
.community-cta p { color: rgba(255,255,255,0.7); font-size: 1rem; }
.empty-msg { font-size: 0.88rem; color: var(--muted); padding: 16px 0; }

/* ── Saved Searches & Following (profile tabs) ───────────────────────────── */
.saved-searches-list { display: flex; flex-direction: column; gap: 10px; }
.saved-search-item { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 16px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.saved-search-query { font-size: 0.95rem; font-weight: 700; color: var(--navy); flex: 1; }
.saved-search-meta { font-size: 0.78rem; color: var(--muted); }
.saved-search-actions { display: flex; align-items: center; gap: 10px; }
.saved-search-run { font-size: 0.82rem; font-weight: 700; color: var(--orange); text-decoration: none; }
.following-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.following-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.following-avatar { width: 44px; height: 44px; background: var(--navy); color: var(--orange); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 800; flex-shrink: 0; }
.following-info { flex: 1; }
.following-name { font-size: 0.9rem; font-weight: 700; color: var(--navy); }
.following-meta { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.following-count { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }

@media (max-width: 768px) {
  .messages-sidebar { width: 100%; display: none; }
  .messages-sidebar.show { display: flex; }
  .community-body { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 65px;
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    padding: 12px 24px 20px;
    gap: 0;
    z-index: 999;
    box-shadow: var(--shadow-lg);
  }
  .site-nav.open .site-nav-link {
    padding: 14px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    display: block;
  }
  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    width: 36px; height: 36px;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--navy);
    margin-left: 8px;
    flex-shrink: 0;
  }
  .worth-page { padding: 24px 16px 60px; }
  .community-page { padding: 0 16px 60px; }
  .recently-viewed-section { padding: 0 16px 24px; }
  .notif-page { padding: 24px 16px 60px; }
  .groupbuys-grid { grid-template-columns: 1fr; }
}

/* hamburger hidden on desktop */
.hamburger-btn { display: none; }

/* ── Seller public profile ───────────────────────────────────────────────── */
.seller-page { max-width: 900px; margin: 0 auto; padding: 40px 24px 80px; }
.seller-hero {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.seller-avatar {
  width: 80px; height: 80px;
  background: var(--navy);
  color: var(--orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 900;
  flex-shrink: 0;
}
.seller-info { flex: 1; }
.seller-name { font-size: 1.5rem; font-weight: 900; color: var(--navy); }
.seller-meta { font-size: 0.88rem; color: var(--muted); margin-top: 4px; }
.seller-rating { font-size: 1.1rem; font-weight: 800; color: var(--navy); margin-top: 8px; }
.seller-rating span { color: #f39c12; }
.seller-bio { font-size: 0.9rem; color: var(--text); margin-top: 8px; font-style: italic; }
.seller-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.seller-listings-title { font-size: 1.1rem; font-weight: 900; color: var(--navy); margin-bottom: 16px; }

/* ── Make an Offer ───────────────────────────────────────────────────────── */
.offer-form {
  background: #f8fbff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.offer-form label { font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.offer-price-row { display: flex; gap: 10px; align-items: center; }
.offer-price-row input { flex: 1; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.95rem; background: var(--bg); color: var(--text); }
.offer-price-row span { font-size: 0.88rem; color: var(--muted); white-space: nowrap; }

/* ── Comparable listings (worth page) ────────────────────────────────────── */
.worth-comps { margin-top: 28px; }
.worth-comps-title { font-size: 0.88rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.worth-comps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.worth-comp-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.82rem;
  transition: border-color 0.15s;
}
.worth-comp-card:hover { border-color: var(--orange); }
.worth-comp-name { font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.worth-comp-meta { color: var(--muted); font-size: 0.75rem; }
.worth-comp-price { font-weight: 900; color: var(--navy); margin-top: 6px; font-size: 0.95rem; }

/* ── Accessibility modes ─────────────────────────────────────────────────── */
body.high-contrast {
  --bg:      #000;
  --surface: #111;
  --border:  #fff;
  --text:    #fff;
  --muted:   #ccc;
  --navy:    #fff;
  --orange:  #ffb300;
}
body.high-contrast .main-header { background: #000; border-color: #fff; }
body.high-contrast .hero { background: #000; }
body.high-contrast .hero-title, body.high-contrast .hero-eyebrow { color: #fff; }
body.high-contrast .hero-accent { color: #ffb300; }
body.high-contrast .card { border: 2px solid #fff; }
body.high-contrast .btn-secondary, body.high-contrast .btn-dm { border: 2px solid #fff; color: #fff; background: #000; }
body.high-contrast input, body.high-contrast select, body.high-contrast textarea { background: #111; color: #fff; border-color: #fff; }

body.large-text { font-size: 1.15rem; }
body.large-text .hero-title { font-size: clamp(2.2rem, 6vw, 4rem); }
body.large-text .card-name { font-size: 1.05rem; }
body.large-text .section-heading { font-size: 1.6rem; }
body.large-text input, body.large-text select, body.large-text textarea { font-size: 1.05rem; }
body.large-text .btn-dm, body.large-text .btn-secondary, body.large-text .btn-access { font-size: 0.95rem; }

/* ── Bundle badge ────────────────────────────────────────────────────────── */
.bundle-badge {
  display: inline-block;
  background: var(--navy);
  color: var(--orange);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Age decay labels ────────────────────────────────────────────────────── */
.age-warn  { font-size: 0.72rem; font-weight: 700; color: #e07b00; background: #fff3e0; border-radius: 6px; padding: 2px 7px; display: inline-block; margin-top: 4px; }
.age-decay { font-size: 0.72rem; font-weight: 700; color: #c0392b; background: #fdecea; border-radius: 6px; padding: 2px 7px; display: inline-block; margin-top: 4px; }

/* ── Listing management (profile) ────────────────────────────────────────── */
.listing-cmd-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: stretch;
}
.listing-cmd-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
}
.listing-cmd-bar button { flex-shrink: 0; }

.manage-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s;
}
.manage-card:hover { border-color: var(--orange); }
.manage-card.is-sold { opacity: 0.6; }
.manage-card-header { display: flex; align-items: flex-start; gap: 12px; }
.manage-card-info { flex: 1; }
.manage-card-name { font-size: 0.95rem; font-weight: 800; color: var(--navy); }
.manage-card-meta { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }
.manage-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-danger {
  background: transparent;
  border: 1.5px solid #e74c3c;
  color: #e74c3c;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-danger:hover { background: #e74c3c; color: #fff; }

.manage-edit-form {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.manage-edit-form label { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.manage-edit-form input,
.manage-edit-form select,
.manage-edit-form textarea { width: 100%; }
.manage-edit-actions { display: flex; gap: 10px; }

/* ── Category dynamic fields ─────────────────────────────────────────────── */
.cat-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { .cat-fields-grid { grid-template-columns: 1fr; } }
.cat-fields-grid label { font-size: 0.8rem; font-weight: 700; color: var(--muted); display: block; margin-bottom: 4px; }
.cat-fields-grid input,
.cat-fields-grid select { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.88rem; background: var(--bg); color: var(--text); }

/* ── Demand tip (listing form) ───────────────────────────────────────────── */
.demand-tip {
  background: #fff8e1;
  border: 1.5px solid #ffe082;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: #7a5c00;
  line-height: 1.5;
  margin-top: 4px;
}
.demand-tip strong { color: #5a4000; }

/* ── Rate User / Schedule Pickup (messages) ──────────────────────────────── */
.thread-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
}
.thread-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-rate-user, .btn-schedule {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--navy);
  transition: all 0.15s;
}
.btn-rate-user:hover { border-color: var(--orange); color: var(--orange); }
.btn-schedule:hover  { border-color: var(--navy-mid); background: var(--navy-mid); color: #fff; }
.btn-rate-user:disabled { opacity: 0.5; cursor: not-allowed; }

.rate-form, .schedule-form {
  border-bottom: 1px solid var(--border);
  background: #f8fbff;
  padding: 0 24px;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease, padding 0.25s ease;
}
.rate-form:not(.hidden), .schedule-form:not(.hidden) {
  max-height: 300px;
  padding: 16px 24px;
}
.rate-form-inner { display: flex; flex-direction: column; gap: 10px; }
.rate-form-inner strong { font-size: 0.9rem; color: var(--navy); }
.rate-form-actions { display: flex; gap: 10px; }

.star-row { display: flex; gap: 6px; }
.star-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: #ccc;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.1s, transform 0.1s;
}
.star-btn:hover, .star-btn.active { color: #f39c12; transform: scale(1.1); }

.schedule-fields { display: flex; gap: 12px; flex-wrap: wrap; }
.schedule-fields input { padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.88rem; background: var(--bg); color: var(--text); }

/* ── Notifications page ──────────────────────────────────────────────────── */
.notif-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.notif-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.notif-title { font-size: 1.6rem; font-weight: 900; color: var(--navy); }
.notif-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 12px;
}
.notif-tab {
  background: none;
  border: none;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}
.notif-tab.active { background: var(--navy); color: #fff; }
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif-loading { color: var(--muted); text-align: center; padding: 40px; }
.notif-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.notif-empty-icon { font-size: 2.5rem; margin-bottom: 16px; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  position: relative;
  transition: border-color 0.15s;
}
.notif-item:hover { border-color: var(--orange); }
.notif-item.notif-unread { border-left: 4px solid var(--orange); }
.notif-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; padding-top: 2px; }
.notif-body { flex: 1; }
.notif-text { font-size: 0.9rem; color: var(--text); line-height: 1.4; }
.notif-sub { font-size: 0.78rem; color: var(--muted); margin-top: 4px; font-style: italic; }
.notif-time { font-size: 0.72rem; color: var(--muted); margin-top: 6px; }
.notif-dot {
  width: 10px;
  height: 10px;
  background: var(--orange);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

/* ── Group Buys profile tab ──────────────────────────────────────────────── */
.groupbuys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.groupbuy-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.groupbuy-name { font-size: 0.95rem; font-weight: 800; color: var(--navy); }
.groupbuy-meta { font-size: 0.78rem; color: var(--muted); }
.groupbuy-progress-row { display: flex; align-items: center; gap: 10px; }
.groupbuy-progress { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.groupbuy-fill { height: 100%; background: var(--orange); border-radius: 4px; transition: width 0.4s; }
.groupbuy-count { font-size: 0.78rem; font-weight: 800; color: var(--navy); white-space: nowrap; }
.groupbuy-ready { font-size: 0.82rem; font-weight: 700; color: #2ecc71; }
.groupbuy-note { font-size: 0.78rem; color: var(--muted); }

/* ── Verification request button ─────────────────────────────────────────── */
.btn-verify-req {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid var(--orange);
  color: var(--orange);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-verify-req:hover { background: var(--orange); color: #fff; }
.btn-verify-req:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Profile received reviews header ────────────────────────────────────── */
.profile-reviews-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: var(--muted);
}
.avg-rating-badge {
  background: var(--navy);
  color: var(--orange);
  font-weight: 800;
  font-size: 0.82rem;
  border-radius: 20px;
  padding: 3px 12px;
}

/* ── Listing image thumbnail (search results) ────────────────────────────── */
.card-thumb {
  width: 48px; height: 48px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 10px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── Modal hero image ────────────────────────────────────────────────────── */
.modal-hero-img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  display: block;
  margin: -24px -24px 20px;
  width: calc(100% + 48px);
}

/* ── Listing form image preview ──────────────────────────────────────────── */
.list-img-preview {
  display: block;
  max-width: 160px;
  max-height: 120px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 10px;
  border: 2px solid var(--border);
}

/* ── Offer message bubbles ───────────────────────────────────────────────── */
.msg-offer .msg-content {
  background: #fff8e1;
  border: 1.5px solid #ffe082;
  border-radius: 10px;
  padding: 10px 14px;
  color: #5a4000;
  white-space: pre-line;
}
.msg-mine.msg-offer .msg-content { background: #e8f5e9; border-color: #a5d6a7; color: #1b5e20; }
.offer-actions { display: flex; gap: 8px; margin-top: 8px; }
.offer-accept-btn {
  background: #2ecc71; color: #fff; border: none;
  border-radius: 8px; padding: 7px 16px; font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: background 0.15s;
}
.offer-accept-btn:hover { background: #27ae60; }
.offer-decline-btn {
  background: transparent; color: #e74c3c; border: 1.5px solid #e74c3c;
  border-radius: 8px; padding: 7px 16px; font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
}
.offer-decline-btn:hover { background: #e74c3c; color: #fff; }

/* ── Edit profile form ───────────────────────────────────────────────────── */
.edit-profile-form {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 0 0 24px;
}
.edit-profile-title { font-size: 1rem; font-weight: 800; color: var(--navy); margin-bottom: 18px; }
.edit-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 600px) { .edit-profile-grid { grid-template-columns: 1fr; } }
.edit-profile-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── auth-success (password reset) ──────────────────────────────────────── */
.auth-success {
  color: #27ae60;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 14px;
  background: #e8f5e9;
  border-radius: 8px;
  margin-top: 10px;
}

/* ── Skeleton loading shimmer ────────────────────────────────────────────── */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 0 0 24px;
}
.skeleton-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
}
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, rgba(200,220,255,0.35) 50%, var(--border) 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: shimmer 1.5s infinite;
}
.sk-title  { height: 18px; width: 70%; margin-bottom: 12px; }
.sk-meta   { height: 13px; width: 50%; margin-bottom: 10px; }
.sk-price  { height: 22px; width: 35%; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Card hover lift ─────────────────────────────────────────────────────── */
.card {
  transition: transform 0.18s cubic-bezier(.22,.68,0,1.2),
              box-shadow 0.18s ease,
              border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0,31,77,0.13), 0 2px 8px rgba(0,0,0,0.07);
  border-color: var(--orange);
}

/* ── Input focus glow ────────────────────────────────────────────────────── */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--orange) !important;
  box-shadow: 0 0 0 3px rgba(255,111,0,0.12);
}

/* ── Button press micro-feedback ─────────────────────────────────────────── */
button:active { transform: scale(0.97); }
.auth-submit { transition: background 0.15s, transform 0.1s; }

/* ── Modal slide-up animation ────────────────────────────────────────────── */
.modal-overlay:not(.hidden) { animation: modal-fade 0.2s ease; }
.modal-overlay:not(.hidden) .modal-box { animation: modal-rise 0.22s cubic-bezier(.22,.68,0,1.15); }
@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modal-rise {
  from { transform: translateY(28px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* ── Auth card deeper shadow ─────────────────────────────────────────────── */
.auth-card {
  box-shadow: 0 28px 72px rgba(0,31,77,0.15), 0 4px 16px rgba(0,0,0,0.07);
}

/* ── Dark mode skeleton ──────────────────────────────────────────────────── */
body.dark-mode .skeleton {
  background: linear-gradient(90deg, #1a2a42 25%, rgba(255,255,255,0.04) 50%, #1a2a42 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}


/* ── Profile cover photo banner ──────────────────────────────────────────── */
.profile-cover {
  height: 200px;
  background: linear-gradient(135deg, #001533 0%, #001f4d 50%, #003380 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.cover-change-btn {
  position: absolute;
  bottom: 12px; right: 16px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.2s;
}
.profile-cover:hover .cover-change-btn { opacity: 1; }
.cover-change-btn input { display: none; }

/* ── Profile hero overlaps cover ─────────────────────────────────────────── */
.profile-hero {
  margin-top: -44px;
  position: relative;
  z-index: 1;
}

/* ── Profile avatar with photo ───────────────────────────────────────────── */
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar-img {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
  display: block;
  background: var(--navy);
}
.profile-avatar { border: 4px solid var(--bg) !important; }
.avatar-change-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.52);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s;
}
.avatar-change-overlay input { display: none; }
.profile-avatar-wrap:hover .avatar-change-overlay { opacity: 1; }

/* ── Profile tagline, bio, website ───────────────────────────────────────── */
.profile-tagline {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 4px;
}
.profile-bio-text {
  font-size: 0.88rem;
  color: var(--text);
  margin-top: 8px;
  line-height: 1.6;
  max-width: 480px;
}
.profile-website-link {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--orange);
  font-weight: 600;
  text-decoration: none;
  margin-top: 6px;
}
.profile-website-link:hover { text-decoration: underline; }

/* ── Skill tags ──────────────────────────────────────────────────────────── */
.skill-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.skill-tag {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
}

/* ── Portfolio tab ───────────────────────────────────────────────────────── */
.portfolio-section { margin-bottom: 40px; }
.portfolio-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.portfolio-section-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--navy);
}
.portfolio-empty { font-size: 0.88rem; color: var(--muted); padding: 16px 0; }

.portfolio-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.portfolio-photo-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--border);
  aspect-ratio: 1;
}
.portfolio-photo-img {
  width: 100%; height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.22s ease;
  display: block;
}
.portfolio-photo-item:hover .portfolio-photo-img { transform: scale(1.05); }
.portfolio-delete-btn {
  position: absolute;
  top: 6px; right: 6px;
  background: rgba(0,0,0,0.58);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px; height: 24px;
  font-size: 1rem;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 0;
}
.portfolio-photo-item:hover .portfolio-delete-btn { opacity: 1; }

.portfolio-pdf-list { display: flex; flex-direction: column; gap: 10px; }
.portfolio-pdf-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  transition: border-color 0.15s;
}
.portfolio-pdf-item:hover { border-color: var(--orange); }
.portfolio-pdf-icon { font-size: 1.4rem; flex-shrink: 0; }
.portfolio-pdf-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
  text-decoration: none;
  word-break: break-all;
}
.portfolio-pdf-name:hover { color: var(--orange); text-decoration: underline; }
.portfolio-pdf-date { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.portfolio-pdf-del {
  position: static !important;
  background: transparent !important;
  color: var(--muted) !important;
  opacity: 1 !important;
  width: auto !important; height: auto !important;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
}
.portfolio-pdf-del:hover { color: #e74c3c !important; background: #fdecea !important; }

.portfolio-coming-soon {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 52px 32px;
  text-align: center;
  color: var(--muted);
}
.coming-soon-icon { font-size: 3rem; margin-bottom: 12px; }
.portfolio-coming-soon h3 {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 10px;
}
.portfolio-coming-soon p {
  font-size: 0.9rem;
  max-width: 380px;
  margin: 0 auto 18px;
  line-height: 1.6;
}
.coming-soon-badge {
  display: inline-block;
  background: var(--navy);
  color: var(--orange);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 14px;
  border-radius: 20px;
}

/* ── Chat: image + PDF bubbles ───────────────────────────────────────────── */
.msg-media-img {
  max-width: 240px;
  max-height: 220px;
  border-radius: 10px;
  display: block;
  cursor: zoom-in;
  margin-bottom: 4px;
  transition: opacity 0.15s;
}
.msg-media-img:hover { opacity: 0.9; }
.msg-pdf-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,31,77,0.06);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  margin-bottom: 4px;
  max-width: 240px;
  word-break: break-all;
  transition: border-color 0.15s;
}
.msg-pdf-card:hover { border-color: var(--orange); color: var(--orange); }
.msg-mine .msg-pdf-card {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}
.msg-mine .msg-pdf-card:hover { border-color: rgba(255,255,255,0.7); }

/* ── Chat: attach button ─────────────────────────────────────────────────── */
.attach-media-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
  align-self: flex-end;
}
.attach-media-btn:hover { border-color: var(--orange); background: #fff8f0; }

/* ── Dark mode additions ──────────────────────────────────────────────────── */
body.dark-mode .skill-tag { color: #c8d8e8; }
body.dark-mode .portfolio-coming-soon h3 { color: #c8d8e8; }
body.dark-mode .portfolio-section-title { color: #c8d8e8; }
body.dark-mode .msg-pdf-card { background: rgba(255,255,255,0.05); border-color: #1a2a42; }
body.dark-mode .attach-media-btn:hover { background: #1a1a2a; }
body.dark-mode .profile-website-link { color: var(--orange); }

@media (max-width: 600px) {
  .portfolio-photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .profile-cover { height: 140px; }
}
