/* CouchSurfer — site.css
   Mobile-first stylesheet for the couch-sharing marketplace
   ---------------------------------------------------------- */

/* ── Custom Properties ─────────────────────────────────── */
:root {
  --primary:        #00897b;
  --primary-dark:   #00695c;
  --primary-light:  #e0f2f1;
  --accent:         #ff7043;
  --accent-dark:    #e64a19;
  --text:           #1f2937;
  --text-light:     #6b7280;
  --bg:             #ffffff;
  --bg-alt:         #f9fafb;
  --border:         #e5e7eb;
  --success:        #059669;
  --warning:        #d97706;
  --danger:         #dc2626;
  --radius:         8px;
  --radius-lg:      12px;
  --shadow:         0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:      0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg:      0 10px 25px rgba(0,0,0,0.10), 0 4px 10px rgba(0,0,0,0.05);
  --nav-height:     64px;
}

/* ── Reset / Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary-dark); }

ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

p { margin: 0 0 1em; }

/* ── Layout ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px)  { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── Typography ─────────────────────────────────────────── */
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

@media (min-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.875rem; }
}

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  height: var(--nav-height);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  gap: 12px;
}

.nav-brand {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.nav-brand span { color: var(--accent); }

.nav-links {
  display: none;
  gap: 2px;
  align-items: center;
  flex: 1;
  padding: 0 12px;
}

.nav-links a {
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}
.nav-links a:hover { background: var(--primary-light); color: var(--primary); }
.nav-links a.active { color: var(--primary); font-weight: 700; }

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

/* Hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  border-radius: var(--radius);
}
.nav-hamburger:hover { background: var(--bg-alt); }
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s, opacity 0.22s;
}

/* Mobile nav drawer */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 2px;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px 16px;
  box-shadow: var(--shadow-lg);
  z-index: 899;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 11px 14px;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-mobile a:hover { background: var(--primary-light); color: var(--primary); }
.nav-mobile hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-hamburger { display: none; }
  .nav-inner { padding: 0 24px; }
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.25;
  font-family: inherit;
}

.btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

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

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-ghost:hover { background: var(--primary-light); color: var(--primary-dark); }

.btn-soft {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: transparent;
}
.btn-soft:hover { background: #b2dfdb; }

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

.btn-sm  { padding: 6px 14px; font-size: 0.8125rem; border-width: 1.5px; }
.btn-lg  { padding: 14px 32px; font-size: 1.0625rem; border-radius: var(--radius-lg); }
.btn-icon { padding: 8px; border-radius: var(--radius); }
.btn-block { width: 100%; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-body   { padding: 20px; }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 1rem;
}
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

/* ── Forms ──────────────────────────────────────────────── */
.form-group  { margin-bottom: 18px; }
.form-label  {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}
.form-hint   { font-size: 0.8125rem; color: var(--text-light); margin-top: 4px; }
.form-error  { color: var(--danger); font-size: 0.8125rem; margin-top: 4px; font-weight: 500; }

.form-input,
.form-textarea,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,137,123,0.15);
}

.form-input.error,
.form-textarea.error,
input.error { border-color: var(--danger); }

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

.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; cursor: pointer; }

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

/* ── Price Pin (Leaflet map markers) ────────────────────── */
.price-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--bg);
  border: 2px solid var(--primary);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  height: 28px;
  min-width: 40px;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  transform-origin: bottom center;
}
.price-pin::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--primary);
}
.price-pin:hover, .price-pin.selected {
  background: var(--primary);
  color: #fff;
  transform: scale(1.08);
  z-index: 10;
}

/* ── Vibe Tags ──────────────────────────────────────────── */
.vibe-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.vibe-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.vibe-tag:hover { background: var(--primary-light); color: var(--primary-dark); }
.vibe-tag.active, .vibe-tag[aria-pressed="true"] {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Per-category accent colors via data attribute */
.vibe-tag[data-vibe="musicians"]    { --tag-color: #7c3aed; border-color: #7c3aed; color: #7c3aed; }
.vibe-tag[data-vibe="musicians"]:hover { background: #f5f3ff; }
.vibe-tag[data-vibe="musicians"].active { background: #7c3aed; color: #fff; }

.vibe-tag[data-vibe="420"]          { --tag-color: #16a34a; border-color: #16a34a; color: #16a34a; }
.vibe-tag[data-vibe="420"]:hover { background: #f0fdf4; }
.vibe-tag[data-vibe="420"].active { background: #16a34a; color: #fff; }

.vibe-tag[data-vibe="lgbtq"]        { --tag-color: #db2777; border-color: #db2777; color: #db2777; }
.vibe-tag[data-vibe="lgbtq"]:hover { background: #fdf2f8; }
.vibe-tag[data-vibe="lgbtq"].active { background: #db2777; color: #fff; }

.vibe-tag[data-vibe="night-owls"]   { --tag-color: #1d4ed8; border-color: #1d4ed8; color: #1d4ed8; }
.vibe-tag[data-vibe="night-owls"]:hover { background: #eff6ff; }
.vibe-tag[data-vibe="night-owls"].active { background: #1d4ed8; color: #fff; }

.vibe-tag[data-vibe="pet-friendly"] { --tag-color: #c2410c; border-color: #c2410c; color: #c2410c; }
.vibe-tag[data-vibe="pet-friendly"]:hover { background: #fff7ed; }
.vibe-tag[data-vibe="pet-friendly"].active { background: #c2410c; color: #fff; }

.vibe-tag[data-vibe="quiet"]        { --tag-color: #0e7490; border-color: #0e7490; color: #0e7490; }
.vibe-tag[data-vibe="quiet"]:hover { background: #ecfeff; }
.vibe-tag[data-vibe="quiet"].active { background: #0e7490; color: #fff; }

/* ── Trust Badges ───────────────────────────────────────── */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.trust-badge-bronze {
  background: #fdf3e7;
  color: #92400e;
  border: 1px solid #fbbf24;
}
.trust-badge-silver {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #9ca3af;
}
.trust-badge-gold {
  background: #fffbeb;
  color: #78350f;
  border: 1px solid #f59e0b;
}

/* ── Vibe Score Ring ────────────────────────────────────── */
.vibe-score-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.vibe-score-ring svg {
  position: absolute;
  top: 0; left: 0;
  transform: rotate(-90deg);
}
.vibe-score-ring .ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 5;
}
.vibe-score-ring .ring-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}
.vibe-score-ring .ring-label {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  text-align: center;
  z-index: 1;
}

/* Vibe score bar (compact version) */
.vibe-score-bar {
  width: 100%;
  height: 7px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.vibe-score-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* ── Listing Cards ──────────────────────────────────────── */
/* Vertical (grid view) */
.listing-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.listing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.listing-card .listing-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e5e7eb;
  flex-shrink: 0;
}

.listing-card .listing-info { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }

.listing-card .listing-price {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.listing-card .listing-price span {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-light);
}

.listing-card .listing-title {
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.listing-card .listing-meta {
  font-size: 0.8125rem;
  color: var(--text-light);
}

.listing-card .listing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
}

/* Horizontal (sidebar / list view) */
.listing-card-h {
  display: flex;
  flex-direction: row;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.listing-card-h:hover { box-shadow: var(--shadow-lg); }

.listing-card-h .listing-thumb {
  width: 120px;
  min-height: 90px;
  object-fit: cover;
  background: #e5e7eb;
  flex-shrink: 0;
}

.listing-card-h .listing-info {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

@media (min-width: 1024px) {
  .listing-card-h .listing-thumb { width: 140px; }
}

/* ── Photo Carousel ─────────────────────────────────────── */
.photo-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #e5e7eb;
}

.photo-carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0;
}
.photo-carousel-track::-webkit-scrollbar { display: none; }

.photo-carousel-track img {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  scroll-snap-align: start;
}

.photo-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  font-size: 1.1rem;
  transition: background 0.15s;
  z-index: 10;
}
.photo-carousel-nav:hover { background: #fff; }
.photo-carousel-nav.prev { left: 10px; }
.photo-carousel-nav.next { right: 10px; }

.photo-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}
.photo-carousel-dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.photo-carousel-dots span.active {
  background: #fff;
  transform: scale(1.25);
}

/* Thumbnail strip */
.photo-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
.photo-thumb {
  flex: 0 0 72px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb.active { border-color: var(--primary); }

/* ── Filter Bar ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  position: sticky;
  top: var(--nav-height);
  z-index: 800;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-bar .filter-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .filter-bar {
    flex-wrap: wrap;
    overflow-x: visible;
    white-space: normal;
  }
}

/* ── Booking Status Chips ───────────────────────────────── */
.booking-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}
.booking-status::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
  flex-shrink: 0;
}

.booking-requested  { background: #dbeafe; color: #1d4ed8; }
.booking-accepted   { background: #dcfce7; color: #15803d; }
.booking-active     { background: var(--primary-light); color: var(--primary-dark); }
.booking-completed  { background: #f3f4f6; color: #374151; }
.booking-declined   { background: #fee2e2; color: #b91c1c; }
.booking-cancelled  { background: #fff7ed; color: #c2410c; }

/* ── Calendar Grid ──────────────────────────────────────── */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  font-size: 0.8125rem;
  text-align: center;
}
.calendar-day {
  padding: 7px 3px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.12s, color 0.12s;
  user-select: none;
  line-height: 1;
}
.calendar-day.header   { font-weight: 700; color: var(--text-light); cursor: default; font-size: 0.75rem; text-transform: uppercase; }
.calendar-day.available:hover { background: var(--primary-light); color: var(--primary); }
.calendar-day.unavailable { background: var(--bg-alt); color: #d1d5db; cursor: not-allowed; text-decoration: line-through; }
.calendar-day.selected { background: var(--primary); color: #fff; font-weight: 700; }
.calendar-day.in-range { background: var(--primary-light); color: var(--primary-dark); border-radius: 0; }
.calendar-day.range-start { background: var(--primary); color: #fff; border-radius: 6px 0 0 6px; }
.calendar-day.range-end   { background: var(--primary); color: #fff; border-radius: 0 6px 6px 0; }
.calendar-day.today { font-weight: 700; box-shadow: inset 0 0 0 2px var(--primary); }
.calendar-day.other-month { opacity: 0.3; }

/* ── Dashboard Stats ────────────────────────────────────── */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .dashboard-stats { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}
.stat-card .stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card .stat-delta {
  font-size: 0.8125rem;
  font-weight: 500;
}
.stat-card .stat-delta.up   { color: var(--success); }
.stat-card .stat-delta.down { color: var(--danger); }
.stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  opacity: 0.8;
}

/* ── Message Thread ─────────────────────────────────────── */
.message-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
}

.message-bubble {
  display: flex;
  gap: 8px;
  max-width: 80%;
}

.message-bubble.own {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-bubble .bubble-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
  flex-shrink: 0;
}

.message-bubble .bubble-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.message-bubble .bubble-text {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.9375rem;
  line-height: 1.45;
  word-break: break-word;
}

.message-bubble.other .bubble-text {
  background: #f3f4f6;
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.message-bubble.own .bubble-text {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.message-bubble .bubble-meta {
  font-size: 0.75rem;
  color: var(--text-light);
  padding: 0 4px;
}
.message-bubble.own .bubble-meta { text-align: right; }

.message-input-bar {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  align-items: flex-end;
}

.message-input-bar input {
  flex: 1;
  border-radius: 999px;
  padding: 10px 16px;
}

/* ── Hero Section ───────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #26a69a 100%);
  color: #fff;
  text-align: center;
  padding: 64px 16px 72px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero .container { position: relative; }

.hero h1 {
  color: #fff;
  font-size: 2.25rem;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.hero p {
  color: rgba(255,255,255,0.88);
  font-size: 1.125rem;
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-search {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
}

.hero-search input {
  background: var(--bg-alt);
  border-color: var(--border);
}

@media (min-width: 640px) {
  .hero-search { flex-direction: row; align-items: center; }
  .hero-search .btn { flex-shrink: 0; }
}

@media (min-width: 768px) {
  .hero { padding: 100px 24px 110px; }
  .hero h1 { font-size: 3rem; }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 3.5rem; }
}

/* ── Section ────────────────────────────────────────────── */
.section {
  padding: 56px 0;
}
.section-alt {
  background: var(--bg-alt);
  padding: 56px 0;
}
.section-header {
  margin-bottom: 32px;
}
.section-header h2 { margin-bottom: 8px; }
.section-header p  { color: var(--text-light); margin: 0; }

/* ── Vibe Category Tiles ────────────────────────────────── */
.vibe-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: center;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
  text-decoration: none;
  color: var(--text);
}
.vibe-tile:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--primary);
  color: var(--text);
}
.vibe-tile .vibe-tile-icon { font-size: 2.25rem; line-height: 1; }
.vibe-tile .vibe-tile-name { font-weight: 700; font-size: 0.9375rem; }
.vibe-tile .vibe-tile-count { font-size: 0.8125rem; color: var(--text-light); }

/* ── How It Works Steps ─────────────────────────────────── */
.step-card {
  text-align: center;
  padding: 24px 16px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 14px;
}
.step-icon { font-size: 2rem; margin-bottom: 12px; }

/* ── City Cards ─────────────────────────────────────────── */
.city-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3/2;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.city-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.city-card:hover img { transform: scale(1.05); }
.city-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.city-card-overlay h3 {
  color: #fff;
  margin: 0;
  font-size: 1.1rem;
}
.city-card-overlay span {
  color: rgba(255,255,255,0.8);
  font-size: 0.8125rem;
  display: block;
  margin-top: 2px;
}

/* ── Host CTA ───────────────────────────────────────────── */
.host-cta {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
}
.host-cta h2 { color: #fff; margin-bottom: 8px; }
.host-cta p  { color: rgba(255,255,255,0.9); max-width: 480px; margin: 0 auto 24px; }

/* ── Split View (map + sidebar) ─────────────────────────── */
.split-view {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-height) - 60px);
  overflow: hidden;
}

.split-map-pane {
  flex: 1 1 auto;
  min-height: 45vh;
  position: relative;
}

.split-list-pane {
  flex: 0 0 auto;
  overflow-y: auto;
  background: var(--bg);
  min-height: 0;
  flex: 1;
}

@media (min-width: 768px) {
  .split-view { flex-direction: row; height: calc(100vh - var(--nav-height) - 60px); }
  .split-map-pane  { flex: 1 1 60%; }
  .split-list-pane { flex: 0 0 40%; max-width: 440px; border-left: 1px solid var(--border); }
}

/* Map toggle button (mobile) */
.map-toggle-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 700;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
  .map-toggle-btn { display: none; }
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  background: #111827;
  color: rgba(255,255,255,0.65);
  padding: 48px 16px 28px;
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}

.footer-brand {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  display: block;
}
.footer-brand span { color: var(--accent); }
.footer-tagline { color: rgba(255,255,255,0.5); font-size: 0.8125rem; line-height: 1.5; margin-bottom: 16px; }

.footer h4 { color: #fff; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.75px; margin-bottom: 12px; }
.footer a  { color: rgba(255,255,255,0.55); display: block; margin-bottom: 8px; transition: color 0.15s; }
.footer a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255,255,255,0.4);
  font-size: 0.8125rem;
}

@media (min-width: 768px) {
  .footer { padding: 56px 24px 32px; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* ── Auth Pages ─────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - var(--nav-height));
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.auth-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
}

.auth-card h1 {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 4px;
}

.auth-logo {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 24px;
  display: block;
}
.auth-logo span { color: var(--accent); }

.auth-divider {
  text-align: center;
  margin: 20px 0;
  color: var(--text-light);
  font-size: 0.875rem;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 28px);
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ── Alert / Toast ──────────────────────────────────────── */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* ── Spinner ────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Misc ───────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.empty-state {
  text-align: center;
  padding: 56px 16px;
  color: var(--text-light);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state h3 { color: var(--text); }
.empty-state p  { margin: 6px 0 20px; }

.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
  flex-shrink: 0;
}
.avatar-sm  { width: 32px;  height: 32px;  }
.avatar-md  { width: 48px;  height: 48px;  }
.avatar-lg  { width: 72px;  height: 72px;  }
.avatar-xl  { width: 96px;  height: 96px;  }

.rating-stars { color: #f59e0b; letter-spacing: 2px; }

.amenity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 640px) {
  .amenity-grid { grid-template-columns: repeat(3, 1fr); }
}
.amenity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  padding: 8px 12px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}
.amenity-item.unavailable { opacity: 0.4; text-decoration: line-through; }

.house-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}
.house-rule:last-child { border-bottom: none; }
.house-rule-icon { font-size: 1.25rem; flex-shrink: 0; }

/* Booking widget */
.booking-widget {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: calc(var(--nav-height) + 16px);
}
.booking-fee-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 0.9375rem;
}
.booking-fee-row.total {
  font-weight: 700;
  font-size: 1.05rem;
  border-top: 2px solid var(--border);
  padding-top: 12px;
  margin-top: 6px;
}

/* ── Utilities ──────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-sm      { font-size: 0.875rem; }
.text-lg      { font-size: 1.125rem; }
.text-xl      { font-size: 1.25rem; }
.text-muted   { color: var(--text-light); }
.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }

.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }

.flex          { display: flex; }
.flex-col      { display: flex; flex-direction: column; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap     { flex-wrap: wrap; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }

.gap-1  { gap: 4px; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.gap-6  { gap: 24px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }

.p-2  { padding: 8px; }
.p-4  { padding: 16px; }
.p-6  { padding: 24px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }

.w-full   { width: 100%; }
.h-full   { height: 100%; }
.min-h-0  { min-height: 0; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hidden       { display: none !important; }
.show-mobile  { display: block; }
.hide-mobile  { display: none; }
.show-desktop { display: none; }
.hide-desktop { display: block; }

@media (min-width: 768px) {
  .show-mobile  { display: none; }
  .hide-mobile  { display: block; }
  .show-desktop { display: block; }
  .hide-desktop { display: none; }
}

/* Tablet only */
@media (min-width: 768px) and (max-width: 1023px) {
  .hide-tablet { display: none; }
}

.rounded    { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

.shadow    { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }

.bg-alt { background: var(--bg-alt); }
.bg-primary-light { background: var(--primary-light); }

/* ── Print ──────────────────────────────────────────────── */
@media print {
  .nav, .footer, .filter-bar, .btn { display: none !important; }
  body { font-size: 12pt; }
}
