/* ============================================
   KAROHA.NET - Dark GenZ Design System
   ============================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  --primary: #7c3aed;
  --primary-light: #9f5ef8;
  --primary-dark: #5b21b6;
  --secondary: #ec4899;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --bg: #08080f;
  --bg2: #0f0f1a;
  --bg3: #1a1a2e;
  --surface: #161625;
  --surface2: #1e1e32;
  --surface3: #252540;

  --text: #f0f0ff;
  --text-2: #a0a0c0;
  --text-3: #6060a0;
  --border: #2a2a45;
  --border-light: #3a3a5c;

  --grad-primary: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  --grad-accent: linear-gradient(135deg, #06b6d4 0%, #7c3aed 100%);
  --grad-warm: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);
  --grad-cool: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);

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

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);
  --glow: 0 0 32px rgba(124, 58, 237, 0.3);
  --glow-pink: 0 0 32px rgba(236, 72, 153, 0.3);

  --nav-h: 68px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(8, 8, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  display: flex; align-items: center;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  width: 100%; display: flex; align-items: center; gap: 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem; font-weight: 700;
}
.nav-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--grad-primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.nav-logo .logo-text { background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-logo .logo-dot { color: var(--secondary); -webkit-text-fill-color: var(--secondary); font-size: 0.9rem; }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500; color: var(--text-2);
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--glass); }

#nav-auth { display: flex; align-items: center; gap: 10px; margin-left: 16px; }
#nav-user { display: none; align-items: center; gap: 10px; margin-left: 16px; }
.nav-avatar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--primary); object-fit: cover; }
.nav-name { font-size: 0.9rem; font-weight: 500; }
.nav-post-btn {
  padding: 9px 18px; border-radius: var(--radius-sm);
  background: var(--grad-primary); color: white;
  font-size: 0.85rem; font-weight: 600;
  transition: var(--transition); white-space: nowrap;
}
.nav-post-btn:hover { transform: translateY(-1px); box-shadow: var(--glow); }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; margin-left: auto; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* Mobile Menu */
.mobile-menu {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: 16px 20px; z-index: 999;
  transform: translateY(-100%); opacity: 0;
  transition: var(--transition);
}
.mobile-menu.open { transform: translateY(0); opacity: 1; }
.mobile-menu a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text-2); font-weight: 500; }
.mobile-menu a:last-child { border: none; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600;
  transition: var(--transition); white-space: nowrap; cursor: pointer;
}
.btn-primary {
  background: var(--grad-primary); color: white;
  box-shadow: var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 40px rgba(124, 58, 237, 0.5); }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover { background: rgba(124, 58, 237, 0.1); }
.btn-ghost { background: var(--glass); color: var(--text-2); border: 1px solid var(--glass-border); }
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-danger { background: var(--danger); color: white; }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding-top: var(--nav-h);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
}
.hero-particles { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.particle {
  position: absolute; border-radius: 50%;
  background: var(--grad-primary); opacity: 0.15;
  animation: float linear infinite;
}
@keyframes float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}
.hero-content { position: relative; z-index: 1; text-align: center; padding: 0 20px; max-width: 900px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass); border: 1px solid var(--glass-border);
  padding: 8px 18px; border-radius: var(--radius-full);
  font-size: 0.85rem; color: var(--text-2); margin-bottom: 24px;
  backdrop-filter: blur(10px);
  animation: slideDown 0.8s ease;
}
.hero-tag-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.8); } }

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.02em;
  margin-bottom: 20px;
  animation: slideUp 0.8s ease 0.1s both;
}
.hero-title .grad { background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-2); max-width: 600px; margin: 0 auto 40px;
  animation: slideUp 0.8s ease 0.2s both;
}

/* Hero Search */
.hero-search {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 8px;
  display: flex; gap: 8px; flex-wrap: wrap;
  max-width: 780px; margin: 0 auto 32px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.8s ease 0.3s both;
  backdrop-filter: blur(20px);
}
.hero-search .search-group {
  flex: 1; min-width: 160px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: var(--radius);
  background: var(--bg3);
}
.hero-search .search-group svg { color: var(--text-3); flex-shrink: 0; }
.hero-search input, .hero-search select {
  background: none; border: none; outline: none;
  width: 100%; font-size: 0.95rem; color: var(--text);
}
.hero-search select option { background: var(--bg3); }
.hero-search .search-btn {
  padding: 12px 28px; border-radius: var(--radius);
  background: var(--grad-primary); color: white;
  font-weight: 700; font-size: 0.95rem;
  transition: var(--transition); white-space: nowrap;
}
.hero-search .search-btn:hover { transform: scale(1.03); box-shadow: var(--glow); }

.hero-stats {
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
  animation: slideUp 0.8s ease 0.4s both;
}
.hero-stat .num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem; font-weight: 700;
  background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stat .label { font-size: 0.8rem; color: var(--text-3); margin-top: 2px; }

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: 80px 20px; }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; gap: 16px; flex-wrap: wrap; }
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700; letter-spacing: -0.02em;
}
.section-title span { background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.section-sub { color: var(--text-2); font-size: 0.95rem; margin-top: 6px; }
.view-all { color: var(--primary); font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.view-all:hover { text-decoration: underline; }

/* ============================================
   CATEGORY CARDS
   ============================================ */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.category-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 20px;
  text-align: center; cursor: pointer;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.category-card::before {
  content: ''; position: absolute; inset: 0; opacity: 0;
  transition: var(--transition);
}
.category-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--glow); }
.category-card:hover::before { opacity: 1; }
.cat-icon { font-size: 2.5rem; margin-bottom: 12px; }
.cat-name { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.cat-count { font-size: 0.8rem; color: var(--text-3); }
.cat-room::before { background: radial-gradient(circle at top, rgba(124, 58, 237, 0.1), transparent); }
.cat-pg::before { background: radial-gradient(circle at top, rgba(236, 72, 153, 0.1), transparent); }
.cat-job::before { background: radial-gradient(circle at top, rgba(6, 182, 212, 0.1), transparent); }

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

.listing-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  cursor: pointer; transition: var(--transition);
  position: relative;
}
.listing-card:hover { transform: translateY(-4px); border-color: var(--border-light); box-shadow: var(--shadow-lg); }

.card-img-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg3); }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.listing-card:hover .card-img-wrap img { transform: scale(1.05); }
.card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg3), var(--surface2));
}
.placeholder-icon { font-size: 3rem; opacity: 0.4; }

.badge {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 10px; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 700;
  backdrop-filter: blur(10px);
}
.badge-room { background: rgba(124, 58, 237, 0.85); color: white; }
.badge-pg { background: rgba(236, 72, 153, 0.85); color: white; }
.badge-job { background: rgba(6, 182, 212, 0.85); color: white; }

.save-btn {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px;
  background: rgba(8, 8, 15, 0.7); border-radius: 50%;
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  color: var(--secondary); transition: var(--transition);
}
.save-btn svg { width: 16px; height: 16px; }
.save-btn:hover, .save-btn.saved { color: var(--secondary); transform: scale(1.1); }

.card-body { padding: 16px; }
.card-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem; font-weight: 700;
  background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.card-title {
  font-size: 0.95rem; font-weight: 600; color: var(--text);
  margin-bottom: 8px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-location {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.82rem; color: var(--text-2); margin-bottom: 10px;
}
.card-amenities { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.amenity-tag {
  padding: 3px 10px; border-radius: var(--radius-full);
  background: var(--bg3); border: 1px solid var(--border);
  font-size: 0.72rem; color: var(--text-2);
}
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-poster { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-2); }
.poster-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.card-time { font-size: 0.78rem; color: var(--text-3); }

/* ============================================
   FILTERS BAR
   ============================================ */
.filters-bar {
  position: sticky; top: var(--nav-h); z-index: 100;
  background: rgba(8, 8, 15, 0.9); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
}
.filters-inner { max-width: 1280px; margin: 0 auto; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filter-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--radius-full);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-2); cursor: pointer;
  transition: var(--transition);
}
.filter-chip:hover, .filter-chip.active {
  border-color: var(--primary); color: var(--primary);
  background: rgba(124, 58, 237, 0.1);
}
.filter-chip.active { font-weight: 600; }

.filter-select {
  padding: 8px 16px; border-radius: var(--radius-full);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-size: 0.85rem; cursor: pointer;
  outline: none;
}
.filter-select:focus { border-color: var(--primary); }

.search-bar-wrap {
  flex: 1; min-width: 220px;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: var(--radius-full);
  background: var(--surface); border: 1px solid var(--border);
}
.search-bar-wrap svg { color: var(--text-3); flex-shrink: 0; }
.search-bar-wrap input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 0.9rem; color: var(--text);
}
.search-bar-wrap:focus-within { border-color: var(--primary); }

/* ============================================
   BROWSE PAGE
   ============================================ */
.browse-layout { display: grid; grid-template-columns: 1fr; gap: 24px; }
.results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.results-count { font-size: 0.9rem; color: var(--text-2); }
.results-count strong { color: var(--text); }
.sort-select {
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 0.85rem; outline: none;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.page-btn {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-size: 0.9rem; font-weight: 500;
  transition: var(--transition); display: flex; align-items: center; justify-content: center;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--grad-primary); border-color: transparent; color: white; }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.form-label span { color: var(--danger); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.95rem; transition: var(--transition); outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-select option { background: var(--bg3); }
.form-input::placeholder { color: var(--text-3); }
.form-hint { font-size: 0.78rem; color: var(--text-3); margin-top: 5px; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 5px; display: none; }
.form-error.show { display: block; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-full { grid-column: 1 / -1; }

/* Post Ad Form */
.post-form-wrap {
  max-width: 800px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 40px;
}
.form-section { margin-bottom: 36px; }
.form-section-title {
  font-size: 1rem; font-weight: 700;
  color: var(--text); padding-bottom: 12px;
  border-bottom: 1px solid var(--border); margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.form-section-title .step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad-primary); color: white;
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Type selector */
.type-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.type-option { display: none; }
.type-label {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 12px; border-radius: var(--radius);
  background: var(--bg3); border: 2px solid var(--border);
  cursor: pointer; transition: var(--transition);
  text-align: center;
}
.type-label .type-icon { font-size: 2rem; }
.type-label .type-name { font-size: 0.9rem; font-weight: 600; }
.type-option:checked + .type-label {
  border-color: var(--primary); background: rgba(124, 58, 237, 0.1);
  box-shadow: var(--glow);
}

/* Image Upload */
.img-upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; cursor: pointer;
  transition: var(--transition);
}
.img-upload-area:hover, .img-upload-area.drag-over { border-color: var(--primary); background: rgba(124, 58, 237, 0.05); }
.img-upload-area input { display: none; }
.upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.upload-text { color: var(--text-2); font-size: 0.9rem; }
.upload-text strong { color: var(--primary); }
.img-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 16px; }
.img-preview-item { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; }
.img-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.img-remove {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--danger); color: white; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

/* Amenities checkboxes */
.amenities-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.amenity-check { display: none; }
.amenity-pill {
  padding: 7px 16px; border-radius: var(--radius-full);
  background: var(--bg3); border: 1px solid var(--border);
  font-size: 0.85rem; cursor: pointer; transition: var(--transition);
}
.amenity-check:checked + .amenity-pill { background: rgba(124, 58, 237, 0.15); border-color: var(--primary); color: var(--primary); }

/* ============================================
   AUTH PAGE
   ============================================ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: calc(var(--nav-h) + 40px) 20px 40px;
  background: radial-gradient(ellipse at 30% 50%, rgba(124, 58, 237, 0.1) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(236, 72, 153, 0.08) 0%, transparent 60%);
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .logo-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--grad-primary); margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
}
.auth-logo h1 { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 700; }
.auth-logo p { color: var(--text-2); font-size: 0.9rem; margin-top: 4px; }

.auth-tabs { display: flex; background: var(--bg3); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 28px; }
.auth-tab {
  flex: 1; padding: 10px; text-align: center; border-radius: 6px;
  font-size: 0.9rem; font-weight: 600; color: var(--text-3);
  cursor: pointer; transition: var(--transition);
}
.auth-tab.active { background: var(--surface2); color: var(--text); box-shadow: var(--shadow); }

.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-submit { width: 100%; margin-top: 8px; }
.auth-divider { text-align: center; color: var(--text-3); font-size: 0.8rem; margin: 20px 0; position: relative; }
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%;
  width: calc(50% - 30px); height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* ============================================
   LISTING DETAIL PAGE
   ============================================ */
.detail-page { padding-top: var(--nav-h); }
.detail-inner { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; }

.detail-gallery { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; position: relative; }
.gallery-main { aspect-ratio: 16/9; background: var(--bg3); position: relative; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-no-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 12px; color: var(--text-3);
  font-size: 4rem;
}
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.gallery-thumb { width: 80px; aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: var(--transition); }
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 700; margin-bottom: 12px; line-height: 1.3; }
.detail-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.detail-meta-item { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-2); }
.detail-price {
  font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 800;
  background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}
.detail-desc { color: var(--text-2); line-height: 1.8; font-size: 0.95rem; margin-bottom: 28px; white-space: pre-wrap; }
.detail-amenities { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.detail-amenity {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--radius-full);
  background: var(--bg3); border: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text);
}

.detail-sidebar-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  position: sticky; top: calc(var(--nav-h) + 16px);
}
.poster-profile { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.poster-avatar-lg { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.poster-name { font-weight: 700; font-size: 1rem; }
.poster-since { font-size: 0.8rem; color: var(--text-3); }
.contact-btns { display: flex; flex-direction: column; gap: 10px; }
.whatsapp-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px; border-radius: var(--radius-sm);
  background: #25d366; color: white; font-weight: 700; font-size: 0.95rem;
  transition: var(--transition);
}
.whatsapp-btn:hover { background: #1fab55; transform: translateY(-1px); }
.call-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px; border-radius: var(--radius-sm);
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); font-weight: 600; font-size: 0.95rem;
  transition: var(--transition);
}
.call-btn:hover { border-color: var(--primary); color: var(--primary); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.detail-tag {
  padding: 6px 14px; border-radius: var(--radius-full);
  background: var(--bg3); font-size: 0.8rem; color: var(--text-2);
}

/* ============================================
   CITY PILLS
   ============================================ */
.city-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.city-pill {
  padding: 10px 20px; border-radius: var(--radius-full);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: var(--transition); color: var(--text-2);
}
.city-pill:hover, .city-pill.active { border-color: var(--primary); color: var(--primary); background: rgba(124, 58, 237, 0.1); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 48px 20px 24px;
}
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { color: var(--text-2); font-size: 0.9rem; margin-top: 12px; line-height: 1.7; }
.footer-col h4 { font-weight: 700; margin-bottom: 16px; font-size: 0.9rem; }
.footer-col a { display: block; color: var(--text-2); font-size: 0.85rem; padding: 4px 0; transition: var(--transition); }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
.footer-bottom p { color: var(--text-3); font-size: 0.82rem; }
.footer-bottom .grad { background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700; }

/* ============================================
   TOAST
   ============================================ */
.karoha-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-radius: var(--radius);
  background: var(--surface2); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); font-size: 0.9rem; font-weight: 500;
  transform: translateY(100px); opacity: 0;
  transition: var(--transition);
}
.karoha-toast.show { transform: translateY(0); opacity: 1; }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-info .toast-icon { color: var(--accent); }

/* ============================================
   LOADER / EMPTY STATE
   ============================================ */
.loader-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 20px; gap: 16px; color: var(--text-2); }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 80px 20px; }
.empty-icon { font-size: 4rem; margin-bottom: 20px; }
.empty-state h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text-2); margin-bottom: 24px; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* Stagger children */
.stagger-grid > * { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.stagger-grid.loaded > *:nth-child(1) { animation: slideUp 0.5s ease 0.05s forwards; }
.stagger-grid.loaded > *:nth-child(2) { animation: slideUp 0.5s ease 0.1s forwards; }
.stagger-grid.loaded > *:nth-child(3) { animation: slideUp 0.5s ease 0.15s forwards; }
.stagger-grid.loaded > *:nth-child(4) { animation: slideUp 0.5s ease 0.2s forwards; }
.stagger-grid.loaded > *:nth-child(5) { animation: slideUp 0.5s ease 0.25s forwards; }
.stagger-grid.loaded > *:nth-child(6) { animation: slideUp 0.5s ease 0.3s forwards; }
.stagger-grid.loaded > *:nth-child(n+7) { animation: slideUp 0.5s ease 0.35s forwards; }

/* Glow text pulse */
.glow-text {
  animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.4)); }
  50% { filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.8)); }
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 24px; text-align: center;
  position: relative; overflow: hidden;
}
.step-card::before {
  content: attr(data-step);
  position: absolute; top: -10px; right: -10px;
  font-size: 5rem; font-weight: 900; color: var(--primary); opacity: 0.05;
  font-family: 'Space Grotesk', sans-serif;
}
.step-icon { font-size: 2.5rem; margin-bottom: 16px; }
.step-card h3 { font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: 0.85rem; color: var(--text-2); line-height: 1.7; }

/* ============================================
   CTA BANNER
   ============================================ */
.cta-banner {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 60px 40px;
  text-align: center; position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.cta-banner h2 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 16px; }
.cta-banner p { color: var(--text-2); margin-bottom: 32px; font-size: 1rem; }
.cta-banner .btn-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links, #nav-auth, #nav-user { display: none !important; }
  .hamburger { display: flex; }
  .mobile-menu { display: block; }

  .hero-search { flex-direction: column; border-radius: var(--radius-lg); }
  .hero-search .search-group { min-width: auto; }
  .hero-stats { gap: 20px; }

  .post-form-wrap { padding: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .type-selector { grid-template-columns: 1fr; }

  .section { padding: 56px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .cta-banner { padding: 40px 24px; }
}

@media (max-width: 480px) {
  .listings-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
}

/* ============================================
   CONTACT MODAL
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg); animation: slideUp 0.25s ease; position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg3); color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; cursor: pointer; transition: var(--transition); border: none;
}
.modal-close:hover { background: var(--surface2); color: var(--text); }
.modal-poster { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.modal-poster img { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--primary); object-fit: cover; }
.modal-poster-name { font-weight: 700; font-size: 1rem; }
.modal-poster-listing { font-size: 0.8rem; color: var(--text-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.modal-phone-row {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.modal-phone-num { font-family: 'Space Grotesk'; font-size: 1.1rem; font-weight: 700; letter-spacing: 1px; }
.reveal-btn {
  font-size: 0.78rem; font-weight: 600; color: var(--primary); cursor: pointer;
  background: none; border: 1px solid var(--primary); padding: 4px 10px;
  border-radius: var(--radius-full); transition: var(--transition);
}
.reveal-btn:hover { background: rgba(124,58,237,0.12); }
.modal-warn {
  background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 0.82rem; color: var(--warning); margin-bottom: 20px;
  display: flex; gap: 8px; align-items: flex-start; line-height: 1.5;
}
.modal-actions { display: flex; flex-direction: column; gap: 10px; }
.modal-wa-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px; border-radius: var(--radius-sm);
  background: #25d366; color: white; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; transition: var(--transition); border: none; width: 100%;
}
.modal-wa-btn:hover { background: #1fab55; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(37,211,102,0.3); }
.modal-chat-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px; border-radius: var(--radius-sm);
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); font-weight: 600; font-size: 0.9rem;
  cursor: pointer; transition: var(--transition); width: 100%;
}
.modal-chat-btn:hover { border-color: var(--primary); color: var(--primary); }
.chat-input-wrap { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); display: none; }
.chat-input-wrap.visible { display: block; }
.chat-input-wrap label { font-size: 0.85rem; font-weight: 600; color: var(--text-2); margin-bottom: 8px; display: block; }
.chat-textarea {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); font: inherit; resize: none; min-height: 90px;
  outline: none; transition: var(--transition);
}
.chat-textarea:focus { border-color: var(--primary); }
.chat-send-btn {
  width: 100%; margin-top: 10px; padding: 12px;
  background: var(--grad-primary); color: white; border: none;
  border-radius: var(--radius-sm); font-weight: 700; font-size: 0.9rem;
  cursor: pointer; transition: var(--transition);
}
.chat-send-btn:hover { transform: translateY(-1px); box-shadow: var(--glow); }
.chat-send-btn:disabled { opacity: 0.6; transform: none; cursor: not-allowed; }
.modal-login-prompt { text-align: center; padding: 8px 0; }
.modal-login-prompt .lock-icon { font-size: 3rem; margin-bottom: 16px; }
.modal-login-prompt h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.modal-login-prompt p { color: var(--text-2); font-size: 0.9rem; margin-bottom: 24px; }
.modal-login-prompt .btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- MESSAGES INBOX ---- */
.msg-list { display: flex; flex-direction: column; gap: 10px; }
.msg-thread-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; cursor: pointer;
  display: flex; gap: 14px; align-items: center; transition: var(--transition);
}
.msg-thread-card:hover { border-color: var(--border-light); background: var(--surface2); transform: translateY(-1px); }
.msg-thread-card.unread { border-color: rgba(124,58,237,0.4); }
.msg-thread-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg3); }
.msg-thread-info { flex: 1; min-width: 0; }
.msg-thread-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.msg-thread-name { font-weight: 700; font-size: 0.95rem; }
.msg-thread-time { font-size: 0.75rem; color: var(--text-3); white-space: nowrap; }
.msg-thread-listing { font-size: 0.78rem; color: var(--primary); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-thread-preview { font-size: 0.83rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-badge { background: var(--primary); color: white; font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: var(--radius-full); }
.convo-header { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.convo-back { color: var(--text-2); cursor: pointer; font-size: 1.4rem; transition: var(--transition); }
.convo-back:hover { color: var(--text); }
.convo-messages { display: flex; flex-direction: column; gap: 10px; max-height: 380px; overflow-y: auto; margin-bottom: 16px; padding: 4px; }
.msg-bubble { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 0.88rem; line-height: 1.5; }
.msg-bubble.mine { background: var(--grad-primary); color: white; border-radius: 16px 16px 4px 16px; align-self: flex-end; }
.msg-bubble.theirs { background: var(--bg3); color: var(--text); border-radius: 16px 16px 16px 4px; align-self: flex-start; }
.msg-bubble-time { font-size: 0.68rem; opacity: 0.6; margin-top: 3px; }
.convo-reply { display: flex; gap: 10px; align-items: flex-end; }
.convo-reply textarea { flex: 1; padding: 10px 14px; border-radius: var(--radius); background: var(--bg3); border: 1px solid var(--border); color: var(--text); font: inherit; resize: none; height: 56px; outline: none; transition: var(--transition); }
.convo-reply textarea:focus { border-color: var(--primary); }
.convo-send-btn { padding: 10px 18px; border-radius: var(--radius); background: var(--grad-primary); color: white; font-weight: 700; border: none; cursor: pointer; }

/* ============================================
   PROFILE / SAVED PAGE
   ============================================ */
.profile-header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 40px 20px; margin-top: var(--nav-h);
}
.profile-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.profile-avatar-lg { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--primary); object-fit: cover; }
.profile-info h1 { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 700; }
.profile-info p { color: var(--text-2); margin-top: 4px; }
.profile-tabs { display: flex; gap: 4px; margin: 24px 0; border-bottom: 1px solid var(--border); padding-bottom: -1px; }
.profile-tab {
  padding: 10px 20px; font-size: 0.9rem; font-weight: 600; color: var(--text-3);
  border-bottom: 2px solid transparent; cursor: pointer; transition: var(--transition);
}
.profile-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px;
  min-width: 180px; z-index: 200;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-10px); pointer-events: none;
  transition: var(--transition);
}
.dropdown.open .dropdown-menu { opacity: 1; transform: translateY(0); pointer-events: all; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.88rem; color: var(--text-2); cursor: pointer;
  transition: var(--transition);
}
.dropdown-item:hover { background: var(--bg3); color: var(--text); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }

/* Pill tabs on browse */
.tab-row { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 20px; border-radius: var(--radius-full);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.88rem; font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: var(--transition);
}
.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active { background: var(--grad-primary); border-color: transparent; color: white; }

/* Stats strip */
.stats-strip { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-item { text-align: center; }
.stat-num { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 800; background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-lbl { font-size: 0.8rem; color: var(--text-3); margin-top: 4px; }
