/* ═══════════════════════════════════════════
   KypiTyt — Premium Dark Marketplace CSS
   ═══════════════════════════════════════════ */

:root {
  --bg-base: #0a0b0f;
  --bg-surface: #111218;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-glass: rgba(255,255,255,0.05);
  --bg-glass-border: rgba(255,255,255,0.1);

  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99,102,241,0.35);
  --purple: #a855f7;
  --purple-glow: rgba(168,85,247,0.3);
  --gradient: linear-gradient(135deg, #6366f1, #a855f7);
  --gradient-soft: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(168,85,247,0.1));

  --sell-color: #10b981;
  --sell-bg: rgba(16,185,129,0.12);
  --buy-color: #f59e0b;
  --buy-bg: rgba(245,158,11,0.12);
  --danger: #ef4444;
  --danger-glow: rgba(239,68,68,0.3);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --text-accent: #818cf8;

  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(99,102,241,0.5);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --shadow-accent: 0 4px 24px rgba(99,102,241,0.25);

  --header-h: 64px;
  --nav-h: 68px;
  --transition: 0.2s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ── Screens ── */
.screen { position: fixed; inset: 0; z-index: 10; display: none; }
.screen.active { display: flex; flex-direction: column; }
#app-screen { background: var(--bg-base); }

/* ═══════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════ */
#login-screen {
  background: var(--bg-base);
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.login-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: orbFloat 8s ease-in-out infinite alternate;
}
.orb-1 { width: 400px; height: 400px; background: radial-gradient(circle, #6366f1, transparent); top: -10%; left: -10%; animation-delay: 0s; }
.orb-2 { width: 350px; height: 350px; background: radial-gradient(circle, #a855f7, transparent); bottom: -10%; right: -10%; animation-delay: -3s; }
.orb-3 { width: 250px; height: 250px; background: radial-gradient(circle, #06b6d4, transparent); top: 50%; left: 60%; animation-delay: -6s; }

.grid-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}
@keyframes orbFloat {
  from { transform: translate(0,0) scale(1); }
  to { transform: translate(30px,-20px) scale(1.15); }
}

.login-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 24px;
  width: 100%;
  max-width: 440px;
}
.login-logo { text-align: center; }
.logo-icon {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 0 24px rgba(99,102,241,0.6));
  animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
  0%,100% { filter: drop-shadow(0 0 24px rgba(99,102,241,0.6)); }
  50% { filter: drop-shadow(0 0 40px rgba(168,85,247,0.8)); }
}
.logo-text {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-text span { -webkit-text-fill-color: transparent; }
.login-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-top: 4px; }

.login-card {
  width: 100%;
  padding: 32px;
  border-radius: var(--radius-xl);
  text-align: center;
}
.login-card h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.login-card p { color: var(--text-secondary); margin-bottom: 28px; font-size: 0.9rem; }

.login-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.feature-icon { font-size: 1rem; }

/* ── Glass ── */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--bg-glass-border);
}
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-accent); }
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(99,102,241,0.1); }
.btn-danger { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

.pulse-glow {
  animation: pulseGlow 2.5s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 20px 6px var(--accent-glow), 0 0 40px 12px rgba(168,85,247,0.15); }
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
#app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(10,11,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.logo-mini { width: 32px; height: 32px; }
.header-title {
  font-size: 1.2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}
.header-title span { -webkit-text-fill-color: transparent; }
.header-search {
  flex: 1;
  position: relative;
  max-width: 400px;
}
.header-search input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 16px 9px 40px;
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: all var(--transition);
}
.header-search input:focus {
  border-color: var(--accent);
  background: rgba(99,102,241,0.08);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.header-search input::placeholder { color: var(--text-muted); }
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-btn {
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  position: relative;
}
.header-btn:hover { border-color: var(--accent); color: var(--accent); }
.badge, .nav-badge {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
  line-height: 1.6;
}
.header-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: all var(--transition);
  background: var(--bg-card);
}
.header-avatar:hover { border-color: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ═══════════════════════════════════════════
   BOTTOM NAV
   ═══════════════════════════════════════════ */
#bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(10,11,15,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px 4px;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 500;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
}
.nav-item svg { transition: all var(--transition); }
.nav-item.active { color: var(--accent); }
.nav-item.active svg { filter: drop-shadow(0 0 6px var(--accent-glow)); }
.nav-item:not(.create-btn):hover { color: var(--accent-light); }
.create-btn {
  flex: 0.8;
  padding: 0;
}
.create-btn-icon {
  width: 52px; height: 52px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: all var(--transition);
  margin-bottom: 12px;
}
.create-btn:hover .create-btn-icon { transform: scale(1.08); box-shadow: 0 6px 28px var(--accent-glow); }
.nav-badge {
  top: 2px; right: calc(50% - 20px);
}

/* ═══════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════ */
#main-content {
  margin-top: var(--header-h);
  margin-bottom: var(--nav-h);
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}
.page { display: none; animation: fadeIn 0.25s ease; }
.page.active { display: block; }
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ═══════════════════════════════════════════
   MARKET
   ═══════════════════════════════════════════ */
.market-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.market-tabs { display: flex; gap: 6px; }
.tab {
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.tab.active {
  background: var(--gradient);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-accent);
}
.tab:not(.active):hover { border-color: var(--accent); color: var(--accent); }

.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition);
}
.cat-chip:hover, .cat-chip.active {
  background: rgba(99,102,241,0.12);
  border-color: var(--accent);
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   LISTING CARDS
   ═══════════════════════════════════════════ */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.listing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}
.listing-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99,102,241,0.1);
}
.listing-img-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-surface);
  position: relative;
}
.listing-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.listing-card:hover .listing-img-wrap img { transform: scale(1.05); }
.listing-no-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  background: var(--gradient-soft);
}
.listing-type-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-sell { background: var(--sell-bg); color: var(--sell-color); border: 1px solid rgba(16,185,129,0.3); }
.badge-buy { background: var(--buy-bg); color: var(--buy-color); border: 1px solid rgba(245,158,11,0.3); }
.fav-btn {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
  color: white;
}
.fav-btn:hover { transform: scale(1.15); }
.fav-btn.active { color: #ef4444; }
.listing-body { padding: 10px; flex: 1; display: flex; flex-direction: column; }
.listing-category { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.listing-title { font-size: 0.85rem; font-weight: 600; line-height: 1.25; color: var(--text-primary); margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing-price { font-size: 1rem; font-weight: 700; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 8px; }
.listing-price.no-price { color: var(--text-muted); -webkit-text-fill-color: var(--text-muted); font-size: 0.8rem; font-weight: 400; }
.listing-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.listing-seller { display: flex; align-items: center; gap: 4px; }
.seller-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: var(--bg-surface); flex-shrink: 0; }
.seller-name { font-size: 0.72rem; color: var(--text-secondary); }
.seller-rating { font-size: 0.72rem; color: #f59e0b; }
.listing-date { font-size: 0.68rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════
   LISTING DETAIL
   ═══════════════════════════════════════════ */
.float-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  padding: 8px 0;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 500;
}
.float-back svg { width: 18px; height: 18px; }
.float-back:hover { color: var(--accent); }

.listing-detail-images { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; position: relative; }
.listing-detail-main-img { width: 100%; max-height: 280px; object-fit: contain; background: var(--bg-surface); }
.listing-detail-thumbs { display: flex; gap: 8px; padding: 8px; background: var(--bg-surface); }
.listing-detail-thumb {
  width: 70px; height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}
.listing-detail-thumb.active { border-color: var(--accent); }

.listing-detail-info { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
@media (max-width: 768px) { .listing-detail-info { grid-template-columns: 1fr; } }

.listing-detail-main h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 12px; }
.listing-detail-price { font-size: 2rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 16px; }
.listing-detail-desc { color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; white-space: pre-wrap; }
.listing-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.meta-item { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border); padding: 6px 12px; border-radius: 99px; }

.listing-detail-sidebar { display: flex; flex-direction: column; gap: 16px; }
.seller-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.seller-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; cursor: pointer; }
.seller-card-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.seller-card-name { font-weight: 600; }
.seller-card-rating { display: flex; align-items: center; gap: 4px; font-size: 0.82rem; color: #f59e0b; }
.seller-card-actions { display: flex; flex-direction: column; gap: 8px; }

/* ═══════════════════════════════════════════
   PROFILE
   ═══════════════════════════════════════════ */
.profile-header { text-align: center; padding: 24px 0 16px; }
.profile-avatar-wrap {
  width: 100px; height: 100px;
  border-radius: 50%;
  margin: 0 auto 16px;
  position: relative;
}
.profile-avatar-wrap img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  background: var(--bg-card);
  background-clip: padding-box;
  box-shadow: 0 0 0 3px var(--accent), 0 0 20px var(--accent-glow);
}
.avatar-edit-btn {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 30px; height: 30px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: white;
  border: 2px solid var(--bg-base);
  transition: all var(--transition);
}
.avatar-edit-btn:hover { transform: scale(1.1); }
.profile-name { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.profile-username { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 20px; }
.profile-stats { display: flex; gap: 24px; justify-content: center; margin-bottom: 20px; }
.stat-item { text-align: center; }
.stat-value { display: block; font-size: 1.4rem; font-weight: 700; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.profile-bio-section { margin-bottom: 20px; }
.profile-bio-section h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; color: var(--text-secondary); }
.profile-bio-section textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.88rem;
  resize: vertical;
  outline: none;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}
.profile-bio-section textarea:focus { border-color: var(--accent); }
.profile-section { margin-bottom: 24px; }
.profile-section h3 { font-size: 1rem; font-weight: 600; margin-bottom: 14px; color: var(--text-secondary); }
.profile-actions { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.profile-user-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════════
   MY LISTINGS LIST
   ═══════════════════════════════════════════ */
.listings-list { display: flex; flex-direction: column; gap: 12px; }
.listing-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all var(--transition);
}
.listing-row:hover { border-color: var(--accent); }
.listing-row-img { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-surface); flex-shrink: 0; }
.listing-row-body { flex: 1; min-width: 0; }
.listing-row-title { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing-row-price { font-size: 0.88rem; color: var(--text-accent); font-weight: 600; margin-top: 2px; }
.listing-row-status { margin-left: auto; flex-shrink: 0; }
.status-badge {
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-pending { background: rgba(245,158,11,0.12); color: #f59e0b; }
.status-approved { background: rgba(16,185,129,0.12); color: var(--sell-color); }
.status-rejected { background: rgba(239,68,68,0.12); color: var(--danger); }
.status-archived { background: var(--bg-card); color: var(--text-muted); }

/* ═══════════════════════════════════════════
   MESSAGES
   ═══════════════════════════════════════════ */
.chats-list { display: flex; flex-direction: column; gap: 4px; }
.chat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.chat-item:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.chat-item-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--bg-surface); flex-shrink: 0; }
.chat-item-body { flex: 1; min-width: 0; }
.chat-item-name { font-weight: 600; font-size: 0.92rem; margin-bottom: 3px; }
.chat-item-last { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chat-item-time { font-size: 0.72rem; color: var(--text-muted); }
.chat-item-unread { background: var(--accent); color: white; border-radius: 99px; font-size: 0.7rem; font-weight: 700; min-width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

/* ── Chat Room ── */
.chat-container { display: flex; flex-direction: column; height: calc(100dvh - var(--header-h) - var(--nav-h)); }
.chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(10,11,15,0.9);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.back-btn {
  width: 36px; height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  flex-shrink: 0;
}
.back-btn:hover { border-color: var(--accent); color: var(--accent); }
.chat-user-info { display: flex; align-items: center; gap: 10px; }
.chat-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.chat-username { font-weight: 600; font-size: 0.95rem; }
.chat-status { font-size: 0.75rem; color: var(--sell-color); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg-bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.5;
  position: relative;
}
.msg-bubble.sent {
  align-self: flex-end;
  background: var(--gradient);
  color: white;
  border-bottom-right-radius: 4px;
}
.msg-bubble.received {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.msg-time { font-size: 0.68rem; opacity: 0.6; margin-top: 4px; text-align: right; }

.chat-input-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(10,11,15,0.9);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-input-area input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}
.chat-input-area input:focus { border-color: var(--accent); }
.chat-input-area input::placeholder { color: var(--text-muted); }
.send-btn {
  width: 46px; height: 46px;
  background: var(--gradient);
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: white;
  flex-shrink: 0;
  transition: all var(--transition);
  box-shadow: 0 2px 12px var(--accent-glow);
}
.send-btn:hover { transform: scale(1.05); }

/* ═══════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
.modal-content {
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius-xl);
  padding: 28px;
  max-height: 90dvh;
  overflow-y: auto;
}
.modal-sm { max-width: 380px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-header h2 { font-size: 1.2rem; font-weight: 700; }
.close-btn {
  width: 36px; height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  line-height: 1;
}
.close-btn:hover { border-color: var(--danger); color: var(--danger); }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.05em; }
.form-input, .form-group input, .form-group textarea, .form-group select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 11px 14px;
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition);
}
.form-input:focus, .form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group select option { background: var(--bg-surface); }
.form-group textarea { resize: vertical; }
.form-note { text-align: center; font-size: 0.78rem; color: var(--text-muted); margin-top: 10px; }

/* Type Selector */
.type-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-option { cursor: pointer; position: relative; }
.type-option input { position: absolute; opacity: 0; }
.type-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.type-option.selected .type-card { border-color: var(--accent); background: rgba(99,102,241,0.1); color: var(--accent); }
.type-icon { font-size: 1.1rem; }

/* Image Upload */
.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition);
  cursor: pointer;
  position: relative;
}
.image-upload-area:hover { border-color: var(--accent); }
.image-upload-area input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.85rem; }
.image-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.image-preview { width: 80px; height: 80px; border-radius: var(--radius-sm); object-fit: cover; border: 2px solid var(--accent); }

/* ═══════════════════════════════════════════
   RATING STARS
   ═══════════════════════════════════════════ */
.rate-stars { display: flex; justify-content: center; gap: 8px; margin: 16px 0; }
.star { font-size: 2.2rem; color: var(--text-muted); cursor: pointer; transition: all var(--transition); }
.star:hover, .star.active { color: #f59e0b; transform: scale(1.15); filter: drop-shadow(0 0 6px rgba(245,158,11,0.5)); }
#rate-comment { width: 100%; margin-bottom: 16px; }
.rating-display { color: #f59e0b; font-size: 0.9rem; }

.ratings-list { display: flex; flex-direction: column; gap: 12px; }
.rating-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.rating-item-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rating-item-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.rating-item-name { font-weight: 600; font-size: 0.88rem; }
.rating-item-score { color: #f59e0b; font-size: 0.88rem; }
.rating-item-comment { font-size: 0.85rem; color: var(--text-secondary); }

/* ═══════════════════════════════════════════
   AD BANNERS
   ═══════════════════════════════════════════ */
.ad-banner {
  position: relative;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(0,240,255,0.08));
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  margin-bottom: 10px;
}
.ad-banner:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99,102,241,0.2); }
.ad-banner-img { width: 100%; max-height: 180px; object-fit: cover; display: block; }
.ad-banner-content { padding: 14px 16px; }
.ad-banner-title { font-weight: 700; font-size: 1rem; color: var(--text-primary); margin-bottom: 4px; }
.ad-banner-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4; }
.ad-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* ═══════════════════════════════════════════
   PREFIX BADGES
   ═══════════════════════════════════════════ */
.prefix-admin {
  font-weight: 700;
  font-size: 0.72em;
  margin-left: 6px;
  vertical-align: middle;
  padding: 2px 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(245,158,11,0.2));
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.3);
  text-shadow: 0 0 8px rgba(245,158,11,0.4);
}
.prefix-mod {
  font-weight: 700;
  font-size: 0.72em;
  margin-left: 6px;
  vertical-align: middle;
  padding: 2px 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(6,182,212,0.15));
  color: #10b981;
  border: 1px solid rgba(16,185,129,0.3);
  text-shadow: 0 0 8px rgba(16,185,129,0.4);
}
.prefix-custom {
  font-weight: 700;
  font-size: 0.72em;
  margin-left: 6px;
  vertical-align: middle;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(99,102,241,0.15);
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   NOTIFICATIONS
   ═══════════════════════════════════════════ */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: all var(--transition);
}
.notif-unread {
  border-color: rgba(99,102,241,0.4);
  background: rgba(99,102,241,0.05);
}
.notif-icon { font-size: 1.5rem; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: 0.92rem; color: var(--text-primary); margin-bottom: 3px; }
.notif-message { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 5px; }
.notif-time { font-size: 0.72rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════
   DEPOSIT DISPLAY
   ═══════════════════════════════════════════ */
.profile-deposit-info {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.profile-deposit-info::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #f59e0b, #6366f1);
}
.deposit-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.deposit-value {
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(135deg, #10b981, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════════
   MODERATION
   ═══════════════════════════════════════════ */
.moderation-list { display: flex; flex-direction: column; gap: 16px; }
.mod-card {
  background: var(--bg-card);
  border: 1px solid var(--buy-color);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.mod-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--buy-color); }
.mod-card-body { padding: 16px 16px 16px 20px; }
.mod-card-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 8px; }
.mod-card-desc { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mod-card-meta { display: flex; gap: 12px; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 14px; flex-wrap: wrap; }
.mod-card-actions { display: flex; gap: 10px; }
.reject-reason { width: 100%; margin-top: 10px; height: 0; overflow: hidden; transition: height 0.2s; }
.reject-reason.visible { height: 70px; }
.reject-reason textarea { width: 100%; height: 60px; background: var(--bg-surface); border: 1px solid rgba(239,68,68,0.3); border-radius: var(--radius-sm); color: var(--text-primary); padding: 8px 12px; font-size: 0.85rem; resize: none; outline: none; }

.moderation-log { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.log-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg-card); border-radius: var(--radius-sm); font-size: 0.82rem; }
.log-item .log-action { padding: 2px 8px; border-radius: 99px; font-weight: 600; font-size: 0.72rem; }
.log-approve { background: rgba(16,185,129,0.12); color: var(--sell-color); }
.log-reject { background: rgba(239,68,68,0.12); color: var(--danger); }

/* ═══════════════════════════════════════════
   ADMIN PANEL
   ═══════════════════════════════════════════ */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.admin-stat-num { font-size: 2rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.admin-stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }

.admin-users-list { display: flex; flex-direction: column; gap: 10px; }
.admin-user-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.admin-user-banned { opacity: 0.5; }
.admin-user-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 160px; }
.admin-user-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.admin-user-name { font-weight: 600; font-size: 0.88rem; }
.admin-user-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Edit User Modal */
.edit-user-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease;
  padding: 20px;
}
.edit-user-overlay.active { opacity: 1; }
.edit-user-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: translateY(20px);
  transition: transform 0.2s ease;
}
.edit-user-overlay.active .edit-user-card { transform: translateY(0); }
.edit-user-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.edit-user-header h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.edit-user-close {
  background: none; border: none; color: var(--text-muted); font-size: 1.2rem;
  cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.edit-user-close:hover { color: var(--danger); background: rgba(239,68,68,0.1); }
.edit-user-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.edit-user-field { display: flex; flex-direction: column; gap: 6px; }
.edit-user-field label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.edit-user-row-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.edit-user-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 20px; border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════ */
#toast-container {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: var(--shadow);
  animation: slideUp 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
}
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error { border-color: rgba(239,68,68,0.4); }
.toast.info { border-color: var(--border); }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-8px); } }

/* ═══════════════════════════════════════════
   LOADER & EMPTY
   ═══════════════════════════════════════════ */
.loader, .empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
  color: var(--text-muted);
  text-align: center;
}
.empty-state-icon { font-size: 3.5rem; opacity: 0.6; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.mt-20 { margin-top: 20px; }

/* ═══════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════ */
.online-dot {
  width: 8px; height: 8px;
  background: var(--sell-color);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px rgba(16,185,129,0.6);
  animation: onlinePulse 2s ease-in-out infinite;
}
@keyframes onlinePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
   ═══════════════════════════════════════════ */

/* Tiny phones (≤ 380px) */
@media (max-width: 380px) {
  .listings-grid { grid-template-columns: 1fr; gap: 12px; }
  .profile-stats { gap: 12px; }
  .stat-value { font-size: 1.2rem; }
  .market-tabs { gap: 4px; }
  .tab { padding: 7px 12px; font-size: 0.82rem; }
  .modal-content { padding: 16px; }
}

/* Mobile (≤ 600px) */
@media (max-width: 600px) {
  .listings-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .listing-body { padding: 10px; }
  .listing-title { font-size: 0.85rem; }
  .listing-price { font-size: 1rem; }
  .header-search { display: none; }
  .modal-content { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .admin-user-row { flex-direction: column; align-items: flex-start; }
  .admin-user-actions { width: 100%; flex-wrap: wrap; }
  .listing-detail-info { grid-template-columns: 1fr !important; }
  /* prevent iOS bounce on chat */
  .chat-container { position: fixed; top: var(--header-h); bottom: var(--nav-h); left: 0; right: 0; }
  .chat-messages { -webkit-overflow-scrolling: touch; }
  /* full-screen modal */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-content { border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 92dvh; }
  /* safe area for notch/home-indicator */
  #bottom-nav { padding-bottom: max(4px, env(safe-area-inset-bottom)); height: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  #main-content { margin-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  .chat-container { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  /* bigger touch targets */
  .btn { min-height: 44px; }
  .send-btn { width: 50px; height: 50px; }
  .chat-input-area input { font-size: 16px; /* prevent iOS zoom */ }
  .form-group input, .form-group textarea, .form-group select { font-size: 16px; }
}

/* Tablet & Desktop (≥ 768px) */
@media (min-width: 768px) {
  #bottom-nav { display: none; }
  #main-content { margin-bottom: 0; }
  #app-header { height: 68px; }
  #main-content { margin-top: 68px; }
  .page-content { padding: 28px 24px; max-width: 1200px; }
  /* show search on tablet+ */
  .header-search { display: block; }
  /* desktop chat is inline, not fixed */
  .chat-container { position: relative; top: unset; bottom: unset; height: calc(100dvh - 68px - 32px); max-width: 800px; margin: 20px auto 0 auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
  .listings-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .modal-overlay { align-items: center; padding: 20px; }
  .modal-content { border-radius: var(--radius-xl); }
}
