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

/* ═══════════════════════════════════════
   TOKENS
═══════════════════════════════════════ */
:root {
  --bg: #ffffff;
  --bg2: #f5f5f5;
  --bg3: #eeeeee;
  --border: rgba(0,0,0,.1);
  --border2: rgba(0,0,0,.2);
  --text: #111111;
  --text2: #444444;
  --text3: #777777;
  --accent: #111111;
  --accent2: #333333;
  --red: #ff4d6d;
  --blue: #4ea9ff;
  --yellow: #ffd166;
  --card-radius: 16px;
  --transition: .2s ease;
  --shadow: 0 4px 32px rgba(0,0,0,.5);
}

/* ═══════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════ */
*,::before,::after { box-sizing: border-box; margin: 0; padding: 0; min-width: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  width: 100%;
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5 {
  font-family: 'Syne', sans-serif;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container,
.card,
.modal,
.form-section,
.filter-panel,
.section-card,
.auth-card,
.profile-card,
.stat-card,
.listing-card { max-width: 100%; }

.hidden { display: none !important; }
.modal-overlay.hidden { display: none !important; }

input, textarea, select {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  min-width: 0;
}

button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }

/* ═══════════════════════════════════════
   LAYOUT
═══════════════════════════════════════ */
.container {
  width: min(1200px, 94%);
  margin: 0 auto;
}

/* ═══════════════════════════════════════
   HEADER / NAV
═══════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid #eeeeee;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-auth-area {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-user:hover { background: rgba(255, 255, 255, 0.08); transform: scale(0.98); }

.mobile-menu-btn,
.mobile-menu { display: none; }

.mobile-menu-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  flex: 0 0 auto;
}
.mobile-menu-btn span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 14px;
  right: 14px;
  z-index: 260;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.mobile-menu:not(.hidden) { display: block; }
.mobile-menu-section {
  display: grid;
  gap: 4px;
  padding: 4px;
}
.mobile-menu-section + .mobile-menu-section {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 10px;
}
.mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
}
.mobile-menu a.active,
.mobile-menu a:hover {
  background: var(--bg3);
  color: var(--text);
}
.mobile-menu .mobile-menu-primary {
  justify-content: center;
  background: var(--accent);
  color: #020f06;
}

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--accent);
  color: #020f06;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }

.btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-secondary:hover { background: #1e2533; border-color: rgba(255,255,255,.2); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-outline:hover { background: var(--bg3); }

.btn-danger {
  background: rgba(255,77,109,.15);
  color: var(--red);
  border: 1px solid rgba(255,77,109,.3);
}
.btn-danger:hover { background: rgba(255,77,109,.25); }

.btn-sm { padding: 7px 16px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ═══════════════════════════════════════
   FORM ELEMENTS
═══════════════════════════════════════ */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 8px;
  letter-spacing: .3px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 12px;
  color: var(--text);
  padding: 12px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,232,122,.1);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text3); }

.form-select { cursor: pointer; appearance: none; }

.form-select option { background: var(--bg3); }

.form-textarea { resize: vertical; min-height: 120px; }

.form-hint { font-size: 12px; color: var(--text3); margin-top: 5px; }

.form-error { font-size: 12px; color: var(--red); margin-top: 5px; }

.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  pointer-events: none;
}
.input-icon ~ .form-input { padding-left: 42px; }

/* ═══════════════════════════════════════
   CARD
═══════════════════════════════════════ */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
}

.listing-card { cursor: pointer; }

.listing-card-img {
  aspect-ratio: 16/10;
  background: var(--bg3);
  overflow: hidden;
  position: relative;
}
.listing-card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  pointer-events: none;
}

.listing-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.listing-card:hover .listing-card-img img { transform: scale(1.04); }

.listing-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 40px;
}

.listing-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.badge-sale { background: rgba(0,232,122,.15); color: var(--accent); border: 1px solid rgba(0,232,122,.3); }
.badge-rent { background: rgba(78,169,255,.15); color: var(--blue); border: 1px solid rgba(78,169,255,.3); }
.badge-featured { background: rgba(255,209,102,.15); color: var(--yellow); border: 1px solid rgba(255,209,102,.3); }
.badge-property { background: rgba(78,169,255,.1); color: var(--blue); }
.badge-vehicle { background: rgba(0,232,122,.1); color: var(--accent); }
.badge-pending { background: rgba(255,209,102,.1); color: var(--yellow); }
.badge-approved { background: rgba(0,232,122,.1); color: var(--accent); }
.badge-rejected { background: rgba(255,77,109,.1); color: var(--red); }

.listing-card-body { padding: 14px 16px 16px; }

.listing-card-price {
  font-family: 'Roboto Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

.listing-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.listing-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text3);
  flex-wrap: wrap;
}

.listing-card-meta span { display: flex; align-items: center; gap: 4px; }

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

.listings-grid > a {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  background: linear-gradient(160deg, #e9e9e9 0%, #cfcfcf 100%);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  animation: fadeSlideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.listings-grid > a:nth-child(1) { animation-delay: 0.05s; }
.listings-grid > a:nth-child(2) { animation-delay: 0.10s; }
.listings-grid > a:nth-child(3) { animation-delay: 0.15s; }
.listings-grid > a:nth-child(4) { animation-delay: 0.20s; }
.listings-grid > a:nth-child(5) { animation-delay: 0.25s; }
.listings-grid > a:nth-child(6) { animation-delay: 0.30s; }
.listings-grid > a:nth-child(7) { animation-delay: 0.35s; }
.listings-grid > a:nth-child(8) { animation-delay: 0.40s; }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.listings-grid > a:hover {
  border-color: rgba(255,255,255,.15);
  transform: translateY(-4px) scale(1.01) !important;
  box-shadow: 0 12px 32px rgba(0,232,122,.08), 0 8px 24px rgba(0,0,0,.5);
}
.listings-grid > a:hover .listing-card-img img {
  transform: scale(1.04);
}

.listing-card-converted {
  font-size: 12px;
  color: var(--text3);
  font-weight: 400;
  margin-top: 2px;
}

/* ═══════════════════════════════════════
   TOAST
═══════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  max-width: 340px;
  animation: slideUp .25s ease;
  pointer-events: all;
  border: 1px solid var(--border2);
}

.toast-success { background: #0d2018; color: var(--accent); border-color: rgba(0,232,122,.3); }
.toast-error { background: #1f0a10; color: var(--red); border-color: rgba(255,77,109,.3); }
.toast-info { background: var(--bg3); color: var(--text); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════
   MODAL
═══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn .2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

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

.modal-title { font-size: 20px; font-weight: 700; }

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--transition);
}
.modal-close:hover { color: var(--text); background: #1e2533; }

/* ═══════════════════════════════════════
   PAGINATION
═══════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  background: var(--bg2);
  color: var(--text2);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  font-family: 'DM Sans', sans-serif;
}
.page-btn:hover { background: var(--bg3); color: var(--text); }
.page-btn.active { background: var(--accent); color: #020f06; border-color: var(--accent); font-weight: 700; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ═══════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text3);
}
.empty-state .icon { font-size: 56px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; color: var(--text2); margin-bottom: 8px; }
.empty-state p { font-size: 15px; max-width: 360px; margin: 0 auto; }

/* ═══════════════════════════════════════
   LOADING
═══════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════
   SECTION HEADER
═══════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.section-title { font-size: 22px; font-weight: 700; }

/* ═══════════════════════════════════════
   TAGS / CHIPS
═══════════════════════════════════════ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════
   DIVIDER
═══════════════════════════════════════ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ═══════════════════════════════════════
   MESSAGING / INBOX
═══════════════════════════════════════ */
.inbox-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  height: calc(100vh - 68px);
  overflow: hidden;
}

.conv-list {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.conv-list-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.conv-list-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
}

.conv-search {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  transition: border-color .15s;
}
.conv-search:focus { border-color: var(--accent); }

.conv-list-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.conv-item:hover { background: var(--bg3); }
.conv-item.active { background: rgba(0,232,122,.06); border-left: 3px solid var(--accent); }

.conv-item-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.conv-item-img img { width: 100%; height: 100%; object-fit: cover; }

.conv-item-body { flex: 1; min-width: 0; }
.conv-item-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.conv-item-listing { font-size: 12px; color: var(--accent); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item-preview { font-size: 13px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.conv-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.conv-item-time { font-size: 11px; color: var(--text3); }

.conv-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #020f06;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.msg-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.msg-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg2);
  flex-shrink: 0;
}

.msg-header-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
}
.msg-header-img img { width: 100%; height: 100%; object-fit: cover; }

.msg-header-info { flex: 1; min-width: 0; }
.msg-header-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-header-sub { font-size: 13px; color: var(--text3); }

.msg-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.msg-date-divider {
  text-align: center;
  padding: 8px 0;
  font-size: 12px;
  color: var(--text3);
  font-weight: 600;
  position: relative;
}
.msg-date-divider::before,
.msg-date-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 60px);
  height: 1px;
  background: var(--border);
}
.msg-date-divider::before { left: 0; }
.msg-date-divider::after { right: 0; }

.msg-bubble {
  max-width: 70%;
  padding: 10px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.msg-bubble.sent {
  background: var(--accent);
  color: #020f06;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.msg-bubble.received {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg-bubble-meta {
  font-size: 11px;
  margin-top: 4px;
  opacity: .6;
}

.msg-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--bg2);
  flex-shrink: 0;
}

.msg-input-area textarea {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 14px;
  resize: none;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  max-height: 120px;
  transition: border-color .15s;
}
.msg-input-area textarea:focus { border-color: var(--accent); }

.msg-send-btn {
  background: var(--accent);
  color: #020f06;
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}
.msg-send-btn:hover { background: var(--accent2); }

.msg-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text3);
  text-align: center;
  padding: 40px;
}
.msg-empty-state .icon { font-size: 64px; margin-bottom: 16px; }
.msg-empty-state h3 { font-size: 18px; color: var(--text2); margin-bottom: 8px; }
.msg-empty-state p { font-size: 14px; max-width: 320px; }

.msg-back-btn {
  display: none;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text2);
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

/* Message Attachments */
.msg-attachment { margin-bottom: 6px; }

.msg-attachment-img img {
  max-width: 260px;
  max-height: 200px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.msg-bubble.sent .msg-attachment-img img {
  border: 2px solid rgba(0,0,0,.1);
}

.msg-bubble.received .msg-attachment-img img {
  border: 1px solid var(--border);
}

.msg-attachment-file a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  transition: background .15s;
}

.msg-bubble.sent .msg-attachment-file a {
  background: rgba(0,0,0,.1);
  color: #020f06;
}

.msg-bubble.received .msg-attachment-file a {
  background: var(--bg3);
  color: var(--text);
}

.msg-attachment-file a:hover { opacity: .85; }

.msg-attachment-file .file-icon { font-size: 22px; flex-shrink: 0; }

.msg-attachment-file .file-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.msg-attachment-file .file-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.msg-attachment-file .file-size {
  font-size: 11px;
  opacity: .65;
}

/* Attach Button */
.msg-attach-btn {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 20px;
  cursor: pointer;
  color: var(--text2);
  transition: all .15s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.msg-attach-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,232,122,.05); }

/* Input wrapper */
.msg-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Pending Files */
.msg-pending-files {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 0;
}

.msg-pending-files:not(:empty) {
  padding-bottom: 8px;
}

.pending-file {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  animation: fadeIn .2s ease;
}

.pending-file img {
  width: 60px;
  height: 48px;
  object-fit: cover;
  display: block;
}

.pending-file-doc {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg3);
  font-size: 12px;
  color: var(--text2);
  max-width: 160px;
}

.pending-file-doc span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pending-file button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,.7);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pending-file-doc button {
  position: static;
  flex-shrink: 0;
}

.msg-text { white-space: pre-wrap; }

/* ═══════════════════════════════════════
   FILTER ACCORDION
═══════════════════════════════════════ */
.filter-accordion { margin-bottom: 4px; }

.filter-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .8px;
  border: none;
  background: none;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  transition: color .15s;
}
.filter-accordion-header:hover { color: var(--text); }

.filter-accordion-toggle {
  font-size: 14px;
  transition: transform .2s;
  color: var(--text3);
}
.filter-accordion-header.open .filter-accordion-toggle { transform: rotate(180deg); }

.filter-accordion-body {
  display: none;
  padding-bottom: 14px;
}
.filter-accordion-body.open { display: block; }

/* ═══════════════════════════════════════
   CHECKBOX GROUP
═══════════════════════════════════════ */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text2);
  padding: 4px 0;
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   RANGE SLIDER
═══════════════════════════════════════ */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg3);
  border-radius: 4px;
  outline: none;
  margin: 8px 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid #020f06;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid #020f06;
}

/* ═══════════════════════════════════════
   ACTIVE FILTER CHIPS
═══════════════════════════════════════ */
.active-filters-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(0,232,122,.1);
  color: var(--accent);
  border: 1px solid rgba(0,232,122,.2);
  animation: fadeIn .2s ease;
}

.active-filter-chip .remove-chip {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: .7;
  transition: opacity .15s;
}
.active-filter-chip .remove-chip:hover { opacity: 1; }

/* ═══════════════════════════════════════
   VIEW TOGGLE (GRID/LIST)
═══════════════════════════════════════ */
.view-toggle {
  display: flex;
  border: 1px solid var(--border2);
  border-radius: 10px;
  overflow: hidden;
}

.view-toggle-btn {
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: var(--text3);
  font-size: 13px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  transition: all .15s;
}
.view-toggle-btn.active {
  background: var(--accent);
  color: #020f06;
}
.view-toggle-btn:not(.active):hover { background: var(--bg3); color: var(--text2); }

.listings-grid.list-view {
  grid-template-columns: 1fr;
}

.listings-grid.list-view > a {
  display: grid;
  grid-template-columns: 240px 1fr;
}
.listings-grid.list-view .listing-card-img { aspect-ratio: 4/3; }

/* ═══════════════════════════════════════
   LANGUAGE SWITCHER
═══════════════════════════════════════ */
.lang-switcher {
  position: relative;
}

.lang-switcher-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all .15s;
}
.lang-switcher-btn:hover { border-color: var(--border2); color: var(--text); }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 6px;
  min-width: 260px;
  max-height: min(70vh, 430px);
  z-index: 200;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lang-search {
  width: 100%;
  height: 38px;
  margin-bottom: 6px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
}

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

.lang-options-scroll {
  max-height: min(58vh, 360px);
  overflow-y: auto;
  padding-right: 2px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: none;
  border: none;
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  transition: all .15s;
  text-align: left;
}
.lang-option:hover { background: var(--bg3); color: var(--text); }
.lang-option.active { color: var(--accent); }
.lang-option-flag { width: 22px; flex: 0 0 22px; }
.lang-option-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lang-option-code {
  color: var(--text3);
  font-size: 11px;
  font-weight: 700;
}

#google_translate_element,
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-gadget,
body > .skiptranslate {
  display: none !important;
}

body {
  top: 0 !important;
}

/* ═══════════════════════════════════════
   REGION SELECTOR
═══════════════════════════════════════ */
.region-selector { position: relative; }

.region-selector-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all .15s;
}
.region-selector-btn:hover { border-color: var(--border2); color: var(--text); }

.region-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 6px;
  min-width: 200px;
  z-index: 200;
  box-shadow: var(--shadow);
  width: min(320px, 90vw);
}

.region-search {
  width: 100%;
  margin-bottom: 6px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  outline: none;
}

.region-options-scroll {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
}

.region-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: none;
  border: none;
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  transition: all .15s;
}
.region-option[hidden] { display: none; }
.region-option:hover { background: var(--bg3); color: var(--text); }
.region-option.active { color: var(--accent); }

/* ═══════════════════════════════════════
   NAV BADGE
═══════════════════════════════════════ */
.nav-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  animation: fadeIn .2s ease;
}

.nav-msg-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  transition: color .2s, background .2s;
}
.nav-msg-link:hover { color: var(--text); background: var(--bg3); }

/* ═══════════════════════════════════════
   QUICK MESSAGE MODAL
═══════════════════════════════════════ */
.quick-msg-modal .modal {
  max-width: 440px;
}

.quick-msg-listing-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg3);
  border-radius: 12px;
  margin-bottom: 16px;
}
.quick-msg-listing-bar img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}
.quick-msg-listing-title { font-size: 14px; font-weight: 600; }
.quick-msg-listing-price { font-size: 13px; color: var(--accent); }

/* ═══════════════════════════════════════
   RTL SUPPORT
═══════════════════════════════════════ */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .nav-inner { flex-direction: row-reverse; }
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .nav-actions { flex-direction: row-reverse; }
[dir="rtl"] .conv-item.active { border-left: none; border-right: 3px solid var(--accent); }
[dir="rtl"] .conv-list { border-right: none; border-left: 1px solid var(--border); }
[dir="rtl"] .msg-bubble.sent { border-bottom-right-radius: 16px; border-bottom-left-radius: 4px; }
[dir="rtl"] .msg-bubble.received { border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
[dir="rtl"] .lang-dropdown,
[dir="rtl"] .region-dropdown { right: auto; left: 0; }
[dir="rtl"] .nav-badge { margin-left: 0; margin-right: 4px; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 768px) {
  body { font-size: 14px; }
  .container { width: min(100% - 24px, 1200px); }
  .site-header { position: sticky; }
  .nav-inner {
    height: 58px;
    gap: 6px;
    position: relative;
  }
  .logo {
    font-size: 19px;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-links { display: none; }
  .nav-actions {
    gap: 6px;
    margin-left: auto;
    min-width: 0;
  }
  .nav-auth-area,
  .nav-actions > .btn {
    display: none;
  }
  .mobile-menu-btn { display: inline-flex; }
  .mobile-menu {
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
  }
  .region-selector-btn,
  .lang-switcher-btn,
  .nav-msg-link {
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
    padding: 8px;
  }
  .lang-dropdown,
  .region-dropdown {
    position: fixed;
    top: 64px;
    left: 14px;
    right: 14px;
    width: auto;
    min-width: 0;
    max-height: min(70vh, 420px);
    overflow-y: auto;
  }
  .region-options-scroll,
  .lang-options-scroll { max-height: calc(min(70vh, 420px) - 58px); }
  .listings-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .listings-grid > a { border-radius: 12px; }
  .listing-card-img { aspect-ratio: 4/3; }
  .listing-card-price { font-size: 16px; }
  .listing-card-body { padding: 10px; }
  .section-header {
    align-items: flex-start;
    gap: 10px;
  }
  .section-title { font-size: 20px; }
  .form-input,
  .form-select,
  .form-textarea {
    min-height: 44px;
    padding: 11px 12px;
    font-size: 14px;
  }
  .form-label { font-size: 11px; margin-bottom: 7px; }
  .card,
  .form-section,
  .section-card,
  .auth-card,
  .profile-card,
  .stat-card {
    border-radius: 14px;
  }
  .toast-container {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }
  .toast { max-width: none; width: 100%; }
  .modal-overlay {
    align-items: flex-end;
    padding: 12px;
  }
  .modal {
    max-width: none;
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
    padding: 22px;
  }

  .inbox-layout {
    grid-template-columns: 1fr;
    height: calc(100dvh - 124px); /* Account for top bar and bottom nav */
  }
  .inbox-layout .conv-list { display: flex; }
  .inbox-layout .msg-panel { display: none; }
  .inbox-layout.show-messages .conv-list { display: none; }
  .inbox-layout.show-messages .msg-panel { display: flex; }
  .msg-back-btn { display: inline-flex; }
  .conv-list-header { padding: 16px; }
  .conv-item { padding: 12px 14px; }
  .msg-header { padding: 12px 14px; gap: 10px; }
  .msg-body { padding: 16px 14px; }
  .msg-bubble { max-width: 86%; }
  .msg-input-area { padding: 12px 14px; }

  .listings-grid.list-view > a { grid-template-columns: 1fr; }
  .btn {
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .listings-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .container { width: min(100% - 12px, 1200px); }
  .form-input,
  .form-select { min-height: 42px; font-size: 13px; padding: 8px 12px; }
  .btn {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 12px;
  }
  .btn-lg { padding: 10px 14px; font-size: 13px; }
  .region-selector-btn span:nth-child(2),
  .lang-switcher-btn span:nth-child(2) { display: none; }
  .nav-actions { gap: 4px; }
  .mobile-menu { left: 8px; right: 8px; padding: 8px; border-radius: 12px; }
  .listing-card-img { aspect-ratio: 4/3; min-height: 0; }
  .listing-card-body { padding: 8px; }
  .listing-card-price { font-size: 14px; margin-bottom: 2px; }
  .listing-card-title {
    font-size: 11px;
    margin-bottom: 4px;
    -webkit-line-clamp: 2;
    line-height: 1.3;
  }
  .listing-card-meta { gap: 3px 6px; font-size: 10px; }
  .listing-card-meta span { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
  .listing-badge {
    top: 6px;
    left: 6px;
    padding: 2px 5px;
    font-size: 9px;
    border-radius: 4px;
  }
  .listing-card-converted { font-size: 10px; margin-top: 1px; }
  .empty-state { padding: 32px 14px; }
  .empty-state .icon { font-size: 36px; margin-bottom: 12px; }
  .empty-state h3 { font-size: 16px; margin-bottom: 6px; }
  .empty-state p { font-size: 12px; }
  .msg-header-img { display: none; }
  .msg-header-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  .msg-input-area { gap: 6px; padding: 10px; }
  .msg-send-btn { padding: 10px 12px; font-size: 13px; }
  .msg-bubble { font-size: 13px; padding: 8px 12px; }
}

@media (max-width: 360px) {
  .listings-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .nav-msg-link { display: none; }
  .listing-card-price { font-size: 12px; }
  .listing-card-title { font-size: 10px; }
  .listing-card-meta { font-size: 9px; }
}
.btn-primary {
  background: #111 !important;
  color: #fff !important;
}
.btn-primary:hover {
  background: #000 !important;
  color: #fff !important;
  opacity: 0.85;
}
.msg-send-btn {
  background: #111 !important;
  color: #fff !important;
}
.msg-send-btn:hover {
  background: #333 !important;
  color: #fff !important;
}
.msg-bubble.sent {
  background: #111 !important;
  color: #fff !important;
}
.msg-bubble.received {
  background: #f1f1f1 !important;
  color: #111 !important;
}
.msg-text {
  color: inherit !important;
}
.msg-bubble-meta {
  color: rgba(255,255,255,0.6) !important;
}
.msg-bubble.received .msg-bubble-meta {
  color: #777 !important;
}
.filter-tab {
  background: #f5f5f5 !important;
  color: #111 !important;
  border: 1px solid #ddd !important;
}
.filter-tab.active {
  background: #111 !important;
  color: #fff !important;
}
.filter-tab:hover {
  background: #eaeaea !important;
  color: #111 !important;
}
.view-toggle-btn {
  background: #f5f5f5 !important;
  color: #111 !important;
  border: 1px solid #ddd !important;
}
.view-toggle-btn.active {
  background: #111 !important;
  color: #fff !important;
}
.view-toggle-btn:hover {
  background: #eaeaea !important;
  color: #111 !important;
}
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
}
  white-space: nowrap !important;
  min-width: max-content !important;
}
  display: flex !important;
  gap: 18px !important;
  align-items: center !important;
  justify-content: space-between !important;
}
  min-width: 0 !important;
  flex: 1 !important;
}
  flex-shrink: 0 !important;
}

.mobile-menu .mobile-menu-primary {
  background: #111 !important;
  color: #ffffff !important;
}

.mobile-menu .mobile-menu-primary * {
  color: #ffffff !important;
}


.mobile-bottom-nav svg,
.bottom-nav-icon svg,
.bottom-nav-add-btn svg {
  width: 24px;
  height: 24px;
  display: block;
}

.bottom-nav-add-btn svg {
  width: 32px;
  height: 32px;
}

.bottom-nav-add-btn svg {
  color: #fff;
  filter: drop-shadow(0 0 8px rgba(255,255,255,.35));
}

/* PREMIUM BOTTOM NAV ICONS */
.bottom-nav-icon svg,
.bottom-nav-add-btn svg {
  color: #ffffff;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.18));
  transition: all .25s ease;
}

/* ACTIVE ICON */
.bottom-nav-item.active svg {
  color: #7c3aed;
  filter:
    drop-shadow(0 0 6px rgba(124,58,237,.65))
    drop-shadow(0 0 14px rgba(124,58,237,.45));
  transform: translateY(-1px) scale(1.06);
}

/* HOVER */
.bottom-nav-item:hover svg {
  color: #c084fc;
  filter:
    drop-shadow(0 0 6px rgba(192,132,252,.55))
    drop-shadow(0 0 12px rgba(192,132,252,.35));
}

/* CENTER BUTTON */
.bottom-nav-add-btn {
  box-shadow:
    0 0 18px rgba(124,58,237,.45),
    0 0 38px rgba(16,185,129,.18);
}

/* LABELS */
.bottom-nav-label {
  transition: color .25s ease;
}

.bottom-nav-item.active .bottom-nav-label {
  color: #c084fc !important;
}

/* BLACK & WHITE ACTIVE ICON */
.bottom-nav-item.active svg {
  color: #ffffff !important;
  filter:
    drop-shadow(0 0 6px rgba(255,255,255,.35))
    drop-shadow(0 0 12px rgba(255,255,255,.18));
  transform: translateY(-1px) scale(1.06);
}

.bottom-nav-item.active .bottom-nav-label {
  color: #ffffff !important;
}

/* REMOVE PURPLE HOVER */
.bottom-nav-item:hover svg {
  color: #ffffff;
  filter:
    drop-shadow(0 0 6px rgba(255,255,255,.25));
}
