/* ===== ACCESSIBILITY ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #FF385C;
  color: white;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 10000;
  border-radius: 0 0 8px 0;
  text-decoration: none;
  transition: top 0.1s;
}
.skip-link:focus { top: 0; }

/* Visible focus ring for keyboard users */
:focus-visible {
  outline: 3px solid #FF385C;
  outline-offset: 2px;
}

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

:root {
  --primary: #FF385C;
  --primary-dark: #e0314f;
  --primary-light: #fff0f2;
  --dark: #1a1a2e;
  --gray-1: #f7f7f7;
  --gray-2: #ebebeb;
  --gray-3: #b0b0b0;
  --gray-4: #717171;
  --text: #222222;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(0,0,0,0.10);
  --shadow-hover: 0 6px 28px rgba(0,0,0,0.15);
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text);
  background: #f0f6ff;
  min-height: 100vh;
}

a { cursor: pointer; color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--gray-2);
  padding: 0 24px;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  padding: 9px 16px;
  border: none;
  background: none;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.15s;
}

.nav-btn:hover { background: var(--gray-1); }
.nav-btn.primary {
  background: var(--primary);
  color: white;
}
.nav-btn.primary:hover { background: var(--primary-dark); }

.user-menu { position: relative; }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--dark);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.user-dropdown {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  background: white;
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 180px;
  padding: 8px 0;
  z-index: 200;
}
.user-dropdown a {
  display: block;
  padding: 10px 18px;
  color: var(--text);
  font-size: 0.9rem;
  transition: background 0.1s;
}
.user-dropdown a:hover { background: var(--gray-1); text-decoration: none; }
.user-dropdown hr { border: none; border-top: 1px solid var(--gray-2); margin: 6px 0; }

/* ===== PAGES ===== */
.page { display: none; }
.page.active { display: block; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 80px 24px 100px;
  text-align: center;
}

.hero-content { max-width: 760px; margin: 0 auto; }
.hero-content .search-bar { max-width: 475px; margin: 0 auto; }

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: white;
  line-height: 1.15;
  margin-bottom: 16px;
}

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

.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 36px;
}

/* ===== SEARCH BAR ===== */
.search-bar {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 60px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.3);
  padding: 0 0 0 18px;
  gap: 0;
}

.search-field {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.search-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 2px;
}
.search-field input, .search-field select {
  width: 100%;
  border: none;
  outline: none;
  font-size: 0.875rem;
  color: var(--gray-4);
  background: transparent;
  text-align: center;
}

.search-divider {
  width: 1px;
  height: 40px;
  background: var(--gray-2);
}

/* ===== CITY AUTOCOMPLETE ===== */
.addr-suggestion {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--gray-5);
  border-bottom: 1px solid var(--gray-1);
}
.addr-suggestion:last-child { border-bottom: none; }
.addr-suggestion:hover { background: var(--gray-1); }

.city-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: -20px;
  right: -20px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  z-index: 200;
  border: 1px solid var(--gray-2);
}

.city-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.1s;
}
.city-option:hover, .city-option.active {
  background: var(--gray-1);
}
.city-option strong { color: var(--text); }
.city-region { color: var(--gray-4); }

.search-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 18px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 60px;
  align-self: stretch;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s;
  white-space: nowrap;
}
.search-btn:hover { background: var(--primary-dark); }

/* ===== STATS BAR ===== */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--primary-light);
  border-bottom: 1px solid #ffd6db;
}

.stat {
  flex: 1;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  border-right: 1px solid #ffd6db;
}
.stat:last-child { border-right: none; }
.stat strong {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
}
.stat span {
  font-size: 0.82rem;
  color: var(--gray-4);
  margin-top: 2px;
}

/* ===== SECTIONS ===== */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

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

.section-header h2 { font-size: 1.5rem; font-weight: 700; }

.link-btn {
  background: white;
  border: 1px solid var(--gray-2);
  border-radius: 24px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.link-btn:hover { border-color: var(--text); background: var(--gray-1); }

/* ===== CARD GRID ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ===== LISTING CARD ===== */
.listing-card {
  border-radius: var(--radius);
  background: white;
  border: 1px solid var(--gray-2);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
}
.listing-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--gray-2);
  display: block;
}

.card-photo-placeholder {
  width: 100%; aspect-ratio: 4/3;
  background: linear-gradient(135deg, #ebebeb, #d4d4d4);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-3);
  font-size: 3rem;
}

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

.card-location {
  font-size: 0.78rem;
  color: var(--gray-4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--gray-4);
  margin-bottom: 10px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-price {
  font-size: 1rem;
  font-weight: 700;
}
.card-price span { font-weight: 400; font-size: 0.85rem; color: var(--gray-4); }

.card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}
.stars { color: #FF385C; }

.card-type-badge {
  display: inline-block;
  background: var(--gray-1);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  text-transform: capitalize;
}

/* ===== LANDLORD CARD ===== */
.landlord-card {
  border-radius: var(--radius);
  background: white;
  border: 1px solid var(--gray-2);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.landlord-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.landlord-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.landlord-name { font-size: 1rem; font-weight: 600; }
.landlord-sub { font-size: 0.82rem; color: var(--gray-4); }
.landlord-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.badge {
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge.green { background: #e6f9f0; color: #18a558; }
.badge.blue { background: #e8f0fe; color: #1a73e8; }

/* ===== HOW IT WORKS ===== */
.how-it-works { background: white; border-radius: 24px; }
.how-it-works h2 { text-align: center; margin-bottom: 40px; font-size: 1.75rem; }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.step { text-align: center; }
.step-icon {
  width: 64px; height: 64px;
  background: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: var(--shadow);
}
.step h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.step p { font-size: 0.9rem; color: var(--gray-4); line-height: 1.6; }

/* ===== LISTING LIST VIEW ===== */
.listing-list { display: flex; flex-direction: column; gap: 10px; }

.listing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
  gap: 16px;
}
.listing-row:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }

.listing-row-main { flex: 1; min-width: 0; }
.listing-row-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing-row-meta { font-size: 0.82rem; color: var(--gray-4); }

.listing-row-right { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.listing-row-price { font-weight: 700; font-size: 1rem; color: var(--text); }
.listing-row-price span { font-size: 0.78rem; font-weight: 400; color: var(--gray-4); }

/* ===== BROWSE ===== */
.browse-layout {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 32px;
  padding: 32px 24px;
  min-height: calc(100vh - 72px);
}

.filters-panel {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 88px;
  align-self: flex-start;
  background: white;
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  padding: 24px;
  height: fit-content;
}

.filters-panel h3 { font-size: 1rem; font-weight: 700; margin-bottom: 20px; }

.filter-group { margin-bottom: 20px; }
.filter-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--gray-4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.filter-group input[type="text"],
.filter-group input[type="number"],
.filter-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-2);
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
.filter-group input:focus, .filter-group select:focus {
  border-color: var(--primary);
}
.filter-group input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.range-label { font-size: 0.82rem; color: var(--gray-4); margin-top: 6px; }
.clear-btn {
  background: none; border: none;
  color: var(--primary); font-size: 0.8rem;
  text-decoration: underline; cursor: pointer;
  padding: 0; margin-left: 6px;
}

.star-filter { display: flex; gap: 4px; font-size: 1.4rem; }
.star-f {
  cursor: pointer;
  color: var(--gray-2);
  transition: color 0.1s;
  user-select: none;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  line-height: 1;
}
.star-f.active { color: #FF385C; }

.toggle-group { display: flex; border: 1px solid var(--gray-2); border-radius: 8px; overflow: hidden; }
.toggle-btn {
  flex: 1;
  padding: 8px;
  font-size: 0.85rem;
  border: none;
  background: white;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.toggle-btn.active {
  background: var(--dark);
  color: white;
}

.browse-results { flex: 1; min-width: 0; }

.browse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.browse-header span { font-size: 0.9rem; color: var(--gray-4); }
.browse-header select {
  padding: 7px 12px;
  border: 1px solid var(--gray-2);
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
}

.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--gray-3);
}
.empty-state p { margin-top: 16px; font-size: 0.95rem; }

/* ===== PROFILE PAGES ===== */
.profile-layout { max-width: 1100px; margin: 0 auto; padding: 40px 24px; }

.profile-hero {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--gray-2);
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.profile-info { flex: 1; min-width: 200px; }
.profile-info h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; }
.profile-meta { font-size: 0.9rem; color: var(--gray-4); margin-bottom: 14px; }
.profile-rating { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.profile-rating .big-stars { font-size: 1.4rem; color: var(--primary); }
.profile-rating .rating-num { font-size: 1.5rem; font-weight: 700; }
.profile-rating .review-count { font-size: 0.9rem; color: var(--gray-4); }

.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.profile-actions button {
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--primary);
  color: white;
  border: 2px solid var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline {
  background: white;
  color: var(--text);
  border: 2px solid var(--gray-2);
}
.btn-outline:hover { border-color: var(--text); }

.profile-columns {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

@media (max-width: 768px) {
  .profile-columns { grid-template-columns: 1fr; }
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-2);
}

/* ===== REVIEW CARDS ===== */
.review-card {
  padding: 18px;
  background: white;
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  margin-bottom: 14px;
  transition: box-shadow 0.15s;
}
.review-card:hover { box-shadow: var(--shadow); }

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.reviewer-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 600; color: white;
  flex-shrink: 0;
}
.reviewer-info h4 { font-size: 0.9rem; font-weight: 600; }
.reviewer-info span { font-size: 0.8rem; color: var(--gray-4); }
.review-stars { margin-left: auto; font-size: 0.9rem; color: var(--primary); }

.review-text { font-size: 0.88rem; line-height: 1.6; color: var(--gray-4); }

.review-cats {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px;
}
.cat-score {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.78rem; color: var(--gray-4);
}
.cat-score .mini-stars { color: var(--primary); }

/* ===== RATING BREAKDOWN ===== */
.rating-breakdown { }
.rb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.85rem;
}
.rb-label { width: 130px; flex-shrink: 0; color: var(--gray-4); }
.rb-bar {
  flex: 1;
  height: 6px;
  background: var(--gray-2);
  border-radius: 3px;
  overflow: hidden;
}
.rb-fill { height: 100%; background: var(--primary); border-radius: 3px; }
.rb-val { width: 28px; text-align: right; font-weight: 600; font-size: 0.82rem; }

/* ===== LISTING DETAIL ===== */
.listing-detail { max-width: 1100px; margin: 0 auto; padding: 40px 24px; }

.listing-photos {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 36px;
  background: var(--gray-2);
  aspect-ratio: 16/7;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-3); font-size: 4rem;
}

.listing-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
}

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

.listing-detail-main h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.listing-detail-meta { font-size: 0.9rem; color: var(--gray-4); margin-bottom: 20px; }

.listing-amenities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.amenity-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem; color: var(--gray-4);
}
.amenity-item svg { flex-shrink: 0; }

.contact-card {
  position: sticky;
  top: 88px;
  border: 1px solid var(--gray-2);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.contact-card .price { font-size: 1.5rem; font-weight: 800; margin-bottom: 16px; }
.contact-card .price span { font-size: 1rem; font-weight: 400; color: var(--gray-4); }

.contact-landlord {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--gray-2);
  margin-top: 14px;
  cursor: pointer;
}
.contact-landlord:hover .cl-name { text-decoration: underline; }
.cl-info .cl-name { font-size: 0.9rem; font-weight: 600; }
.cl-info .cl-rating { font-size: 0.82rem; color: var(--gray-4); }

/* ===== FORMS ===== */
.form-page { max-width: 720px; margin: 0 auto; padding: 48px 24px; }
.form-page h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.form-subtitle { color: var(--gray-4); margin-bottom: 36px; }

.listing-form { }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Google Places autocomplete dropdown */
.pac-container {
  z-index: 99999 !important;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  border: 1px solid #e0e0e0;
  font-family: inherit;
}
.pac-item { padding: 8px 12px; cursor: pointer; font-size: 0.875rem; }
.pac-item:hover { background: #f7f7f7; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.span-2 { grid-column: span 2; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--gray-4); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--gray-2);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); }

.amenity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.amenity-check {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.88rem; cursor: pointer;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 28px;
  transition: background 0.15s;
}
.submit-btn:hover { background: var(--primary-dark); }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
}

.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 400;
  background: white;
  border-radius: 16px;
  padding: 40px;
  width: min(480px, 92vw);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.modal-sub { color: var(--gray-4); font-size: 0.9rem; margin-bottom: 20px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  font-size: 1rem; color: var(--gray-4);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover { background: var(--gray-1); }

.modal input, .modal select, .modal textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--gray-2);
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.15s;
}
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--primary); }
.modal .submit-btn { margin-top: 8px; }
.modal-footer { text-align: center; font-size: 0.85rem; color: var(--gray-4); margin-top: 16px; }

.tab-group { display: flex; border: 1px solid var(--gray-2); border-radius: 8px; overflow: hidden; margin-bottom: 20px; }
.tab {
  flex: 1; padding: 10px; font-size: 0.9rem; font-weight: 500;
  border: none; background: white; transition: all 0.15s;
}
.tab.active { background: var(--dark); color: white; }

/* ===== OAUTH BUTTONS ===== */
.modal-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.oauth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1.5px solid var(--gray-2);
  background: white;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.oauth-btn:hover {
  background: var(--gray-1);
  border-color: var(--gray-3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.apple-btn {
  background: #000;
  color: #fff;
  border-color: #000;
}
.apple-btn:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--gray-3);
  font-size: 0.82rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-2);
}

.modal-terms {
  text-align: center;
  font-size: 0.78rem;
  color: var(--gray-4);
  margin-top: 10px;
  line-height: 1.5;
}
.modal-terms a { color: var(--gray-4); text-decoration: underline; }

/* OAuth setup prompt */
.setup-steps { display: flex; flex-direction: column; gap: 10px; }
.setup-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}
.step-num {
  width: 22px; height: 22px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.setup-step code {
  background: var(--gray-1);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-family: monospace;
}

/* ===== STAR PICKER ===== */
.star-picker {
  display: flex; gap: 6px; font-size: 2rem;
  cursor: pointer; user-select: none; margin-bottom: 8px;
}
.star-picker span { color: var(--gray-2); transition: color 0.1s; }
.star-picker span.active { color: var(--primary); }

/* ===== REVIEW CATEGORIES ===== */
.review-categories { margin-bottom: 16px; }
.rev-cat-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; font-size: 0.9rem;
}
.rev-cat-row label { color: var(--text); font-weight: 500; }
.mini-star-picker {
  display: flex; gap: 3px; font-size: 1.2rem; cursor: pointer; user-select: none;
}
.mini-star-picker span { color: var(--gray-2); transition: color 0.1s; }
.mini-star-picker span.active { color: var(--primary); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ===== LISTING DETAIL PAGE BACK ===== */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; font-size: 0.9rem; font-weight: 500;
  color: var(--text); padding: 8px 0; margin-bottom: 20px;
  transition: gap 0.15s;
}
.back-btn:hover { gap: 10px; }

/* ===== EXTERNAL LISTINGS ===== */
.external-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px dashed var(--gray-2);
}

.ext-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ext-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.ext-city { color: var(--primary); }

.ext-sub {
  font-size: 0.85rem;
  color: var(--gray-4);
}
.ext-sub a { color: var(--primary); }

.ext-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 32px;
  color: var(--gray-4);
  font-size: 0.9rem;
}

.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--gray-2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Platform pills (compact) */
.platform-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px solid var(--pc, #999);
  color: var(--pc, #999);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.platform-pill:hover {
  background: var(--pc, #999);
  color: white;
  text-decoration: none;
}

/* Platform cards (when server is offline) */
.platform-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.platform-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--gray-2);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
}
.platform-card:hover {
  border-color: var(--pc, var(--primary));
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-1px);
  text-decoration: none;
}
.pc-icon { font-size: 1.6rem; flex-shrink: 0; }
.pc-body { flex: 1; min-width: 0; }
.pc-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 2px; }
.pc-desc { font-size: 0.78rem; color: var(--gray-4); margin-bottom: 3px; }
.pc-city { font-size: 0.75rem; color: var(--primary); font-weight: 500; }
.pc-arrow { color: var(--gray-3); flex-shrink: 0; }
.platform-card:hover .pc-arrow { color: var(--pc, var(--primary)); }

/* Source badge on external cards */
.source-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  white-space: nowrap;
}

.ext-card { position: relative; }
.ext-card::after {
  content: '↗ External';
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.55);
  color: white;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  pointer-events: none;
}

/* ===== FORUM ===== */
.forum-layout {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px;
}

.forum-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.forum-header-bar h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 4px; }
.forum-sub { color: var(--gray-4); font-size: 0.9rem; }

.forum-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.cat-pill {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1.5px solid var(--gray-2);
  background: white;
  color: var(--gray-4);
  cursor: pointer;
  transition: all 0.15s;
}
.cat-pill:hover { border-color: var(--primary); color: var(--primary); }
.cat-pill.active { background: var(--primary); border-color: var(--primary); color: white; }

.forum-post-card {
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  background: white;
}
.forum-post-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }

.forum-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.forum-author {
  display: flex;
  align-items: center;
  gap: 7px;
}
.forum-author-name { font-size: 0.88rem; font-weight: 600; }

.cat-tag {
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.forum-time { font-size: 0.8rem; color: var(--gray-4); margin-left: auto; }

.forum-post-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}

.forum-post-body {
  font-size: 0.88rem;
  color: var(--gray-4);
  line-height: 1.6;
  margin-bottom: 14px;
}

.forum-post-footer {
  display: flex;
  gap: 18px;
}

.forum-stat {
  font-size: 0.82rem;
  color: var(--gray-4);
}
.like-btn {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
.like-btn:hover { color: var(--primary); }


/* ===== STATIC PAGES (About, Privacy, Terms, Contact) ===== */
.static-page-hero {
  background: linear-gradient(135deg, #FF385C 0%, #c0234a 100%);
  padding: 56px 24px 64px;
  text-align: center;
}

.static-page-hero-inner { max-width: 680px; margin: 0 auto; }

.static-page-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.static-page-hero p {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
}

.static-page-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 52px 24px 80px;
}

.static-section {
  margin-bottom: 40px;
}

.static-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gray-2);
}

.static-section p {
  font-size: 0.93rem;
  color: #444;
  line-height: 1.75;
  margin-bottom: 10px;
}

.static-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 0;
}

.static-list li {
  font-size: 0.93rem;
  color: #444;
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}

.static-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.static-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.static-card {
  background: white;
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.static-card-icon { font-size: 2rem; margin-bottom: 10px; }

.static-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.static-card p {
  font-size: 0.83rem;
  color: var(--gray-4);
  line-height: 1.5;
  margin: 0;
}

.static-contact-cta {
  background: var(--primary-light);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  border-bottom: none;
}

.static-contact-cta h2 { border-bottom: none; }

.static-cta-btn {
  display: inline-block;
  margin-top: 6px;
  background: var(--primary);
  color: white !important;
  padding: 12px 28px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: background 0.15s;
}

.static-cta-btn:hover { background: var(--primary-dark); }

/* Contact page */
.contact-info-card {
  background: white;
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.contact-info-value {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text);
}

a.contact-info-value { color: var(--primary); }

.contact-topics { display: flex; flex-wrap: wrap; gap: 8px; }

.contact-topic-label {
  width: 100%;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.contact-topic-pill {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  background: white;
  border: 1.5px solid var(--gray-2);
  border-radius: 20px;
  color: var(--gray-4);
}

.contact-form-card {
  background: white;
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
}
.hamburger:hover { background: var(--gray-1); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .browse-layout { flex-direction: column; padding: 20px 16px; }
  .filters-panel { width: 100%; position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span-2 { grid-column: span 1; }
  .amenity-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Mobile nav */
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: white;
    border-bottom: 1px solid var(--gray-2);
    flex-direction: column;
    padding: 12px 16px 20px;
    gap: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-btn { text-align: center; border-radius: 8px; width: 100%; padding: 12px 14px; }
  .nav-links #authButtons {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .nav-links .user-menu {
    display: flex;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--gray-2);
    margin-top: 4px;
  }

  /* Static pages */
  .static-cards { grid-template-columns: 1fr 1fr; }

  /* Listing detail */
  .listing-detail { padding: 24px 16px; }
}

@media (max-width: 600px) {
  .nav-inner { padding: 0 16px; }
  .stats-bar { flex-wrap: wrap; }
  .stat { width: 50%; flex: none; }
  .profile-hero { flex-direction: column; }
  .listing-detail-grid { grid-template-columns: 1fr; }

  /* Hero */
  .hero { padding: 48px 16px 64px; }
  .hero p { font-size: 1rem; }

  /* Sections */
  .section { padding: 36px 16px; }
  .forum-layout { padding: 28px 16px; }
  .form-page { padding: 32px 16px; }

  /* Static cards */
  .static-cards { grid-template-columns: 1fr; }

  /* Amenity grid */
  .amenity-grid { grid-template-columns: repeat(2, 1fr); }

  /* Listing row — stack on very small screens */
  .listing-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .listing-row-right { width: 100%; justify-content: space-between; }

  /* How it works */
  .how-it-works { border-radius: 16px; }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--dark);
  color: #aaa;
  margin-top: 80px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 32px 40px;
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.footer-brand {
  flex: 1.2;
  min-width: 200px;
}

.footer-brand .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  margin-bottom: 12px;
}

.footer-brand .logo:hover { text-decoration: none; }

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #888;
}

.footer-links {
  display: flex;
  gap: 48px;
  flex: 2;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.footer-col a {
  color: #888;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid #2a2a3e;
  text-align: center;
  padding: 20px 32px;
  font-size: 0.82rem;
  color: #555;
}

@media (max-width: 768px) {
  .footer-inner { flex-direction: column; gap: 36px; padding: 40px 20px 32px; }
  .footer-links { flex-wrap: wrap; gap: 32px; }
}

/* ===== DOC UPLOAD ===== */
.doc-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: white;
  border: 1.5px dashed var(--gray-3);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--gray-4);
  transition: border-color 0.15s, color 0.15s;
}
.doc-upload-label:hover {
  border-color: var(--primary);
  color: var(--primary);
}
