/* ===== Font: Lato (body) + Poppins (judul/brand) via Google Fonts ===== */

/* ===== Dasar ===== */
* { box-sizing: border-box; }

:root {
  /* Tema brand: navy gelap #162332 + emas #b88c58 */
  --primary: #b88c58;
  --primary-dark: #8a6134;
  --navy: #162332;
  --ink: #162332;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 14px;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Poppins italic & 800 via Google Fonts — font-synthesis untuk fallback */
  font-synthesis: style weight;
}

/* Font display (Poppins) untuk judul, brand, tombol, dan angka penting */
.brand,
h1, h2, h3, h4,
.page-title,
.sidebar-title,
.detail-title,
.section-title,
.legend-toggle,
.btn,
.badge,
.stat-value,
.stat-number,
.detail-price,
.nav-link,
.nav-name,
.field-label,
.filter-btns button,
.legend-toggle-title {
  font-family: 'Poppins', 'Lato', system-ui, sans-serif;
  font-synthesis: style weight;
}

/* Penekanan hidup: italic & 800 (disintesis untuk Poppins) */
.fst-italic { font-style: italic; }
.fw-800 { font-weight: 800; }
.toggle-sub { font-style: italic; }

/* Navbar fixed: konten halaman biasa digeser ke bawah agar tidak tertutup */
body { padding-top: 56px; }

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

code { background: #eef2ff; padding: 2px 6px; border-radius: 6px; font-size: 13px; }
.hidden { display: none !important; }

.seller-parent { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.seller-parent a { color: var(--primary); }

.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.agent-card { display: flex; gap: 12px; }
.agent-info { flex: 1; min-width: 0; }
.agent-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.co-agent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 8px 0; }
.co-agent-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--card);
}
.co-agent-item:hover { border-color: var(--primary); }
.co-agent-item input { accent-color: var(--primary); }
.co-agent-item small { display: block; }
.co-agent-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

/* My Listings (account page) */
.my-listings { display: flex; flex-direction: column; gap: 10px; }
.my-listing {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.my-listing-thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.my-listing-info { flex: 1; min-width: 0; }
.my-listing-info a { font-weight: 600; color: var(--text); text-decoration: none; }
.my-listing-info a:hover { color: var(--primary); }
.my-listing-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Edit listing photos */
.edit-photo-grid { margin-top: 6px; }
.edit-photo {
  position: relative;
  display: block;
  cursor: pointer;
}
.edit-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.edit-photo input { display: none; }
.edit-photo:has(input:checked) img { border-color: #ef4444; }
.edit-photo-x {
  position: absolute;
  inset: auto 0 0 0;
  padding: 3px 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(239, 68, 68, 0.85);
  border-radius: 0 0 8px 8px;
  opacity: 0;
  transition: opacity 0.15s;
}
.edit-photo:hover .edit-photo-x { opacity: 1; }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.seller-avatar.large { width: 56px; height: 56px; font-size: 24px; flex-shrink: 0; }

.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.listing-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.listing-card:hover { box-shadow: 0 6px 18px rgba(2, 6, 23, 0.1); transform: translateY(-2px); text-decoration: none; }
.listing-card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.listing-body { padding: 12px 14px; }
.listing-title { font-weight: 700; margin-bottom: 4px; }
.listing-price { font-weight: 800; color: var(--primary); margin-bottom: 8px; }

.leader-nav { display: flex; gap: 8px; }
.contact-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 14px;
}
.contact-box .section-title { margin-top: 0; }

/* ===== Navbar (frosted glass, transparan + blur) ===== */
.navbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 14px;
  padding: 8px 20px;
  min-height: 56px;
  background: rgba(22, 35, 50, 0.8);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid rgba(184, 140, 88, 0.28);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.brand {
  font-weight: 800;
  font-size: 18px;
  color: #ffffff;
  letter-spacing: 0.3px;
}
.brand:hover { text-decoration: none; }
.brand-mark { color: #b88c58; }
.brand-logo {
  height: 30px;
  width: auto;
  vertical-align: middle;
  border-radius: 7px;
  margin-right: 6px;
}
.brand-tagline {
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.55);
  margin-left: 4px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.brand:hover .brand-tagline {
  color: rgba(255,255,255,0.75);
}
.sidebar-logo {
  height: 22px;
  width: auto;
  vertical-align: -4px;
  border-radius: 5px;
  margin-right: 5px;
}

.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-width: 0; }
.nav-link { color: rgba(226, 232, 240, 0.82); font-weight: 600; font-size: 14px; }
.nav-link:hover { color: #ffffff; text-decoration: none; }
.nav-name { font-weight: 600; font-size: 14px; color: #f1f5f9; }
.navbar .admin-link { color: #d9c49a; }
.navbar .admin-link:hover { color: #ffffff; }
.navbar .bell-btn { color: #e2e8f0; }
.navbar .bell-btn:hover { color: #ffffff; }
.locale-toggle { font-size: 18px !important; padding: 2px 6px; border-radius: 8px; transition: background 0.15s; }
.locale-toggle:hover { background: rgba(255,255,255,0.1); text-decoration: none; }

/* ===== Tombol ===== */
.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: none;
  color: var(--ink);
  transition: all 0.15s ease;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--primary); color: var(--navy); }
.btn-primary:hover { background: var(--primary-dark); color: #ffffff; }

.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-ghost.active { background: #faf5ec; border-color: var(--primary); color: var(--primary-dark); }

.btn-fav { background: #fef2f2; border-color: var(--danger); color: var(--danger); }

.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ===== Badge ===== */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.badge-success { background: var(--success); }
.badge-danger { background: var(--danger); }
.badge-warning { background: var(--warning); color: #fff; }
.badge-gps { background: #065f46; }
.badge-video { background: #dc2626; color: #fff; }
.badge-verified { background: #15803d; }
.badge-type { background: #1e40af; }
.badge-views { background: #475569; }
.badge-demo { background: #a855f7; }
.badge-demo:hover { background: #9333ea; }

/* ===== Flash ===== */
.flash {
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
}
.flash-success { background: #dcfce7; color: #14532d; }
.flash-error { background: #fee2e2; color: #7f1d1d; }
.flash-error ul { margin: 4px 0 0; padding-left: 20px; }

/* ===== Halaman peta (full-bleed, peta di belakang navbar transparan) ===== */
.map-full { padding-top: 0; }
.map-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
#map {
  position: absolute;
  inset: 0;
}

/* Zoom control di bawah navbar transparan */
.map-full .leaflet-top.leaflet-left { top: 64px; }

/* Tombol Near Me (floating, di bawah kontrol zoom) */
.near-me-btn {
  position: absolute;
  top: 150px;
  left: 14px;
  z-index: 850;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  transition: background 0.15s, box-shadow 0.15s;
}
.near-me-btn:hover { background: #f8fafc; }
.near-me-btn.active { background: #faf5ec; border-color: var(--primary); }
.near-me-btn.locating { animation: near-me-pulse 1s ease-out infinite; }
@keyframes near-me-pulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
  100% { box-shadow: 0 0 0 12px rgba(59, 130, 246, 0); }
}

/* Catatan status Near Me */
.geo-note {
  position: absolute;
  top: 200px;
  left: 14px;
  z-index: 850;
  max-width: 240px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--muted);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  display: none;
}
.geo-note.show { display: block; }

/* Titik lokasi pengguna */
.user-dot-wrap { background: transparent; border: none; }
.user-dot {
  width: 18px;
  height: 18px;
  background: #2563eb;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35), 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Sidebar melayang (floating card) — kontrol interaktif, tanpa scrollbar */
#map-sidebar {
  position: absolute;
  top: 70px;
  right: 14px;
  width: 320px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.14);
  padding: 18px;
  z-index: 900;
}

/* Panel legenda melayang (floating card) di kiri bawah — info statis */
#map-legend {
  position: absolute;
  left: 14px;
  bottom: 34px;
  width: 300px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.14);
  padding: 12px 16px;
  z-index: 900;
}
#map-legend .field-label { margin: 0 0 6px; }
#map-legend .legend-group + .legend-group { margin-top: 12px; }
#map-legend .legend-row { font-size: 12.5px; }
#map-legend .heat-legend { margin-top: 2px; }
#map-legend .heat-hint { margin: 4px 0 0; }

/* Toggle collapse/expand legenda (default: collapsed) */
.legend-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 4px 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  text-align: left;
}
.legend-toggle:hover { color: var(--primary-dark); }
.legend-toggle-icon {
  font-size: 12px;
  color: var(--muted);
}
#map-legend.collapsed .legend-toggle-icon { transform: rotate(-90deg); }
#map-legend.collapsed .legend-body { display: none; }
.sidebar-title { margin: 0 0 4px; font-size: 19px; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin: 16px 0 6px;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 14px; }

.filter-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btns button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
}
.filter-btns button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--navy);
}
.filter-btns button span { opacity: 0.8; }

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.toggle input { width: 17px; height: 17px; accent-color: var(--primary); }
.toggle-sub { font-weight: 500; color: var(--muted); font-size: 12px; }

.legend { display: flex; flex-direction: column; gap: 6px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pin-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  flex-shrink: 0;
}

#listingCount { margin-top: 16px; }

/* ===== Pin di peta ===== */
.sx-pin-wrap { background: transparent; border: none; }
.sx-pin {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--pin, var(--primary));
  border: 2.5px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sx-pin span {
  transform: rotate(45deg);
  color: #fff;
  font-size: 15px;
  line-height: 1;
}
.sx-price-chip {
  margin: -7px auto 0;
  width: fit-content;
  max-width: 82px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.35);
}
.sx-price-chip.sold { border-color: #cbd5e1; opacity: 0.85; }

/* Listing terjual: pin abu-abu + coret harga agar beda tegas dari yang aktif */
.sx-pin.sold {
  filter: grayscale(0.85);
  opacity: 0.75;
}
.sx-pin.sold span { opacity: 0.9; }

/* ===== Popup ===== */
.sx-popup { min-width: 230px; }
.sx-popup img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 8px;
}
.sx-popup h3 { margin: 0 0 4px; font-size: 15px; line-height: 1.3; }
.sx-popup-price { font-size: 17px; font-weight: 800; color: var(--primary-dark); margin-bottom: 6px; }
.sx-popup-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.sx-popup-seller {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.sx-popup-ago { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-popup-content { margin: 14px; }

/* ===== Container umum ===== */
.container { max-width: 1120px; margin: 0 auto; padding: 22px 18px 60px; }
.container.narrow { max-width: 640px; }

.page-title { font-size: 24px; margin: 0 0 6px; }
.back-link { font-size: 14px; font-weight: 600; }

/* ===== Detail listing ===== */
.detail-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 26px;
  margin-top: 14px;
  align-items: start;
}

.detail-left { min-width: 0; }
.detail-title { font-size: 23px; margin: 0 0 10px; line-height: 1.25; }
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-price { font-size: 28px; font-weight: 800; color: var(--primary-dark); }
.detail-desc { color: #334155; white-space: pre-line; }
.section-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin: 24px 0 8px;
}

.seller-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.seller-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.seller-name { font-weight: 700; margin-bottom: 4px; }

/* Tur 360 */
.viewer360 {
  background: #0b1220;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.15);
}
.viewer360-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.viewer360-stage:active { cursor: grabbing; }
.v360-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.viewer360-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
}
.viewer360-angle {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  padding: 4px 12px;
  border-radius: 999px;
}
.viewer360-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.viewer360-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #0b1220;
}
.viewer360-bar .btn-ghost { background: transparent; border-color: #334155; color: #cbd5e1; }
.viewer360-bar .btn-ghost.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.viewer360-track {
  flex: 1;
  height: 6px;
  background: #1e293b;
  border-radius: 999px;
  overflow: hidden;
}
.viewer360-progress {
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width 0.1s linear;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.85;
}
.thumb:hover { opacity: 1; }
.thumb.active { border-color: var(--primary); opacity: 1; }

/* Riwayat harga */
.price-table { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.price-row span:first-child { color: var(--muted); width: 90px; flex-shrink: 0; }
.price-old { text-decoration: line-through; color: var(--muted); flex: 1; }
.price-new { font-weight: 700; color: var(--success); }
#priceChart { width: 100%; height: 140px; }

/* ===== Form ===== */
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.form-card.center { margin-top: 26px; text-align: left; }

.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  margin-top: 4px;
}
.input:focus { outline: 2px solid var(--primary); border-color: transparent; }
textarea.input { resize: vertical; }

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

.picker-map { height: 320px; border-radius: 12px; border: 1px solid var(--line); z-index: 1; }
.picker-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.gps-status { font-size: 13px; min-height: 20px; margin: 6px 0 0; }

/* ===== Heatmap ===== */
.heat-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.heat-label { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.heat-gradient {
  flex: 1;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #15803d 0%, #16a34a 18%, #2563eb 30%, #facc15 42%, #f97316 58%, #dc2626 68%);
  border: 1px solid var(--line);
}

.heat-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--warning);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 6px 10px;
}

/* ===== Panel admin ===== */
.admin-link { color: #7c3aed; font-weight: 700; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: block;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.stat-card:hover { text-decoration: none; border-color: var(--primary); }
.stat-num { font-size: 28px; font-weight: 800; color: var(--primary-dark); }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 600; }

.mb { margin-bottom: 14px; }
.member-name { font-weight: 700; }
.center { text-align: center; }

.table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: #f8fafc;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f8fafc; }

.currency-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 12px;
}
.currency-table th, .currency-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.currency-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: #f8fafc;
}
.currency-table td:first-child, .currency-table th:first-child { border-radius: 10px 0 0 10px; }
.currency-table .input { margin-top: 0; padding: 7px 8px; font-size: 13px; }

.admin-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.admin-actions form { margin: 0; display: flex; gap: 6px; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1ebe5b; }

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

/* ===== Video popup player ===== */
.video-popup {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.video-popup.open { display: flex; }
.video-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
}
.video-popup-box {
  position: relative;
  width: min(960px, 100%);
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.video-popup-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.video-popup-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.video-popup-close:hover { background: #fff; }
body.modal-open { overflow: hidden; }

.btn-google {
  background: #fff;
  border: 1px solid #d1d5db;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-google:hover { background: #f9fafb; }

.or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.input-sm { width: auto; padding: 5px 8px; font-size: 13px; margin: 0; }

/* ===== Floating panel — compact horizontal filter bar ===== */
.demand-panel {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.14);
  padding: 10px 16px;
  margin-bottom: 16px;
}
.demand-layout {
  display: flex;
  flex-direction: column;
}
.demand-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: flex-end;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.filter-group .field-label { margin: 0; font-size: 10px; font-weight: 700; }
.filter-group .input-sm { width: auto; min-width: 130px; padding: 4px 8px; font-size: 12px; margin-top: 1px; }

@media (max-width: 768px) {
  .demand-filter { gap: 6px 8px; }
  .filter-group .input-sm { min-width: 100px; }
}

/* Legacy — keep for other pages */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 14px 0 6px;
}

/* ===== Buyer Card V2 — Compact 4-column layout ===== */
.buyer-showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 14px;
  margin-top: 16px;
}
.buyer-card-v2 {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.buyer-card-v2:hover {
  transform: rotate(0deg) translateY(-3px) !important;
  z-index: 10;
}
.buyer-card-v2-inner {
  background: var(--lvl, #64748b);
  border-radius: 12px;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  overflow: visible;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 8px;
}

/* Avatar ring overlapping top */
.buyer-avatar-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  margin: -28px auto 0;
  z-index: 2;
  flex-shrink: 0;
}
.buyer-avatar-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--lvl, #64748b);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.buyer-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.buyer-avatar-fallback {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  text-transform: uppercase;
}
.buyer-avatar-check {
  position: absolute;
  bottom: -1px;
  right: -3px;
  width: 20px;
  height: 20px;
  background: #15803d;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 3;
}

/* Colored top section */
.buyer-card-v2-top {
  padding: 6px 10px 8px;
  text-align: center;
  color: #fff;
  position: relative;
}
.buyer-card-v2-ref {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.3px;
}
.buyer-card-v2-agent {
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  opacity: 0.85;
  margin-top: 1px;
}
.buyer-card-v2-level { margin-top: 5px; }
.buyer-card-v2-lvl-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  padding: 2px 7px;
  white-space: nowrap;
}
.buyer-card-v2-status {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.3px;
  z-index: 5;
  padding: 2px 7px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* White bottom section */
.buyer-card-v2-bottom {
  background: #fff;
  border-radius: 0 0 9px 9px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.buyer-req-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.buyer-req-list li {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: 'Lato', sans-serif;
}
.req-icon {
  font-size: 12px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.req-label {
  font-weight: 700;
  color: var(--ink);
  min-width: 38px;
  font-size: 10px;
}
.req-value {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
}
.buyer-card-v2-open {
  font-size: 10px;
  font-weight: 700;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  padding: 3px 6px;
  text-align: center;
}
.buyer-card-v2-match {
  font-size: 10px;
  font-weight: 700;
  color: #7a5c2e;
  background: #fbf6ee;
  border: 1px solid #ead9bd;
  border-radius: 6px;
  padding: 3px 6px;
  text-align: center;
}
.buyer-card-v2-link {
  display: block;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-dark);
  padding: 4px 0 0;
  border-top: 1px solid var(--line);
}
.buyer-card-v2-link:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 1024px) {
  .buyer-showcase { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .buyer-showcase { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
}
@media (max-width: 480px) {
  .buyer-showcase { grid-template-columns: 1fr; gap: 12px; }
  .buyer-card-v2 { transform: rotate(0deg) !important; }
}

/* Legacy buyer card classes — keep for reference */
.buyer-grid {
  display: none;
}

/* Video thumbnail card */
.video-thumb-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  margin-top: 8px;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  aspect-ratio: 16/9;
  background: #000;
}
.video-thumb-card:hover .video-thumb-play {
  transform: scale(1.12);
  background: rgba(184, 140, 88, 0.95);
}
.video-thumb-card:hover .video-thumb-overlay {
  background: rgba(22, 35, 50, 0.55);
}
.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(22, 35, 50, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}
.video-thumb-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(184, 140, 88, 0.85);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.2s, background 0.2s;
  padding-left: 3px;
}
.video-thumb-label {
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.badge-open { background: #059669; }
.badge-offer { background: #db2777; }
.badge-closed { background: #334155; }

.need-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.need-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.need-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 3px;
}
.need-value { font-weight: 700; font-size: 14px; }
.need-value small { font-weight: 500; }

.privacy-note {
  background: #fbf6ee;
  border: 1px solid #ead9bd;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: #7a5c2e;
  margin-top: 14px;
}

.match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.match-badge {
  font-family: 'Poppins', 'Lato', sans-serif;
  font-weight: 800;
  font-size: 12px;
  border-radius: 999px;
  padding: 3px 10px;
}
.match-badge.high { background: #dcfce7; color: #166534; }
.match-badge.mid { background: #fef3c7; color: #92400e; }
.match-badge.low { background: #e2e8f0; color: #475569; }

/* ===== Foto profil member ===== */
.seller-avatar.avatar-img {
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
}

/* Avatar kecil di popup peta */
.sx-popup-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
  flex-shrink: 0;
}
.sx-popup-seller { display: flex; align-items: center; gap: 6px; }
.sx-popup-seller .pin-dot { flex-shrink: 0; }

/* Avatar di daftar co-agent (lebih kecil dari seller-avatar) */
.co-agent-item .seller-avatar {
  width: 32px;
  height: 32px;
  font-size: 14px;
  flex-shrink: 0;
}
.co-agent-item .seller-avatar.avatar-img { border-width: 1px; }

/* Form upload foto profil di halaman akun */
.avatar-form { margin-top: 16px; }
.avatar-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.avatar-row .input { flex: 1; min-width: 180px; margin-top: 0; }

/* Statistik ringkas panel My Buyers */
.stat-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin: 12px 0 4px;
}
.stat-grid.compact .stat-card { padding: 12px 14px; }
.stat-grid.compact .stat-num { font-size: 22px; }

.match-propose { margin: 0; }
.match-row { flex-wrap: wrap; }

/* ===== Lonceng notifikasi (navbar) ===== */
.bell-wrap { position: relative; }
.bell-btn {
  position: relative;
  border: none;
  background: none;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.bell-count {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.bell-drop {
  display: none;
  position: absolute;
  right: 0;
  top: 36px;
  width: 300px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.16);
  z-index: 2000;
  overflow: hidden;
}
.bell-drop.open { display: block; }
.bell-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 13px;
}
.bell-read {
  border: none;
  background: none;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.bell-read:hover { text-decoration: underline; }
.bell-list { max-height: 320px; overflow-y: auto; }
.bell-item {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.bell-item:hover { background: #f8fafc; text-decoration: none; }
.bell-item.read { opacity: 0.6; }
.bell-msg { font-size: 13px; line-height: 1.4; }
.bell-time { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ===== My Listings ===== */
.my-listings-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.06);
  font-family: 'Poppins', sans-serif;
}
.stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  font-family: 'Lato', sans-serif;
}
.stat-total .stat-num { color: var(--ink); }
.stat-available .stat-num { color: #16a34a; }
.stat-pending .stat-num { color: #d97706; }
.stat-sold .stat-num { color: #dc2626; }

.my-listings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.my-listing-card {
  display: flex;
  gap: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  background: #fff;
  transition: transform .2s, box-shadow .2s;
}
.my-listing-card:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 var(--ink);
}
.my-listing-thumb {
  width: 160px;
  min-height: 140px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
}
.my-listing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.my-listing-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 32px;
  color: #cbd5e1;
}
.my-listing-body {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.my-listing-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.my-listing-title:hover { color: var(--primary); }
.my-listing-price {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
  margin: 4px 0 2px;
}
.my-listing-meta {
  font-size: 12px;
}
.my-listing-actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.status-btns {
  display: flex;
  gap: 4px;
}
.status-btn {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 11px;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.status-btn:hover {
  border-color: #94a3b8;
}
.status-btn.active {
  font-weight: 700;
  border-color: var(--primary);
  background: rgba(184,140,88,0.1);
  color: var(--primary);
}
.listing-action-links {
  display: flex;
  gap: 12px;
}
.action-link {
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
  font-family: 'Lato', sans-serif;
}
.action-link:hover {
  color: var(--primary);
}
.badge-demo {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #f59e0b;
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}

/* ===== Responsif ===== */
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  #map-sidebar { display: none; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .my-listings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .navbar { padding: 8px 14px; }
  .brand { font-size: 16px; }
  .nav-links { gap: 8px 10px; font-size: 13px; }
  .nav-link { font-size: 13px; }
  .nav-links .btn { padding: 6px 10px; font-size: 13px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .my-listing-card { flex-direction: column; }
  .my-listing-thumb { width: 100%; min-height: 120px; }
  .my-listings-stats { gap: 6px; }
  .stat-pill { padding: 6px 12px; }
  .stat-num { font-size: 16px; }
}

/* Utility: monospace text (IP addresses, codes) */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
