/* ═══════════════════════════════════════════════════════════════
   BahayKo — UI Enhancement v4
   Focus: Visibility · Navigation · Accessibility · Polish
   ═══════════════════════════════════════════════════════════════ */

/* ── Root Overrides: richer contrast & stronger accents ──────── */
:root {
  --cream:    #faf7f2;
  --warm-50:  #f2e9db;
  --warm-100: #e3d0b8;
  --accent:   #c0531f;
  --accent-d: #9a3e13;
  --accent-l: #e07040;
  --green:    #2d5c3f;
  --green-l:  #3d7a56;
  --text:     #1a150e;
  --text-2:   #4a4032;
  --text-3:   #8a7a68;
  --border:   #d8cbb8;
  --white:    #ffffff;
  --shadow-sm: 0 1px 4px rgba(26,21,14,.08);
  --shadow:    0 4px 20px rgba(26,21,14,.12);
  --shadow-lg: 0 16px 48px rgba(26,21,14,.18);
  --radius: 14px;
  --nav-h: 72px;
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR — More visible, larger, with clearer active states
   ═══════════════════════════════════════════════════════════════ */
#navbar {
  height: var(--nav-h);
  padding: 0 40px;
  background: #fff;
  border-bottom: 2px solid var(--warm-100);
  box-shadow: 0 2px 20px rgba(26,21,14,.10);
  display: flex;
  align-items: center;
  gap: 0;
  position: sticky;
  top: 0;
  z-index: 500;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 8px;
}
.brand:hover { text-decoration: none; }
.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-l) 100%);
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 3px 10px rgba(192,83,31,.35);
  flex-shrink: 0;
}
.brand-text { color: var(--text); }

/* Spacer pushes links to center */
.nav-spacer {
  flex: 1;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
}
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--accent);
  background: rgba(192,83,31,.07);
  text-decoration: none;
}
.nav-links a.nav-active {
  color: var(--accent);
  background: rgba(192,83,31,.10);
}
.nav-links a::after { display: none; }

/* Unread badge next to Messages */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  padding: 0 4px;
}

/* Auth area */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  flex-shrink: 0;
}
#userGreeting {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 20px;
  border: none; border-radius: 9px; cursor: pointer;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  transition: all .18s; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-l));
  color: #fff;
  box-shadow: 0 3px 10px rgba(192,83,31,.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-d), var(--accent));
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(192,83,31,.38);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(192,83,31,.06);
}
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ── Hamburger (mobile) ─────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  margin-left: 8px;
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
}
.nav-hamburger:hover {
  border-color: var(--accent);
  background: rgba(192,83,31,.06);
}
.nav-hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: all .25s;
}
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile nav drawer ──────────────────────────────────────── */
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: #fff;
  border-bottom: 2px solid var(--warm-100);
  box-shadow: 0 8px 32px rgba(26,21,14,.15);
  z-index: 499;
  padding: 16px 20px 20px;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-10px);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}
.nav-drawer.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}
.nav-drawer a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: all .18s;
}
.nav-drawer a:hover {
  background: var(--warm-50);
  color: var(--accent);
  text-decoration: none;
}
.nav-drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}
.nav-drawer-auth {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.nav-drawer-auth .btn { flex: 1; justify-content: center; }

/* ── Breadcrumb nav ──────────────────────────────────────────── */
#breadcrumb {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 12px 40px;
  background: var(--warm-50);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-3);
}
#breadcrumb.visible { display: flex; }
.bc-item { font-weight: 500; color: var(--text-3); }
.bc-item a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.bc-item a:hover { text-decoration: underline; }
.bc-sep { color: var(--border); font-size: 16px; margin: 0 2px; }
.bc-current { color: var(--text-2); font-weight: 600; }

/* ── Bottom tab bar (mobile) ─────────────────────────────────── */
#bottomNav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: #fff;
  border-top: 2px solid var(--warm-100);
  box-shadow: 0 -4px 20px rgba(26,21,14,.10);
  z-index: 498;
  padding: 0 8px;
  justify-content: space-around;
  align-items: stretch;
}
.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  padding: 8px 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  transition: background .18s;
  color: var(--text-3);
  font-family: var(--font-body);
  text-decoration: none;
  position: relative;
}
.bn-item:hover, .bn-item.active {
  color: var(--accent);
  background: rgba(192,83,31,.07);
}
.bn-icon {
  font-size: 20px;
  line-height: 1;
  display: block;
}
.bn-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.bn-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 14px);
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: none;
  align-items: center; justify-content: center;
  padding: 0 3px;
  border: 2px solid #fff;
}
.bn-badge.visible { display: flex; }

/* ═══════════════════════════════════════════════════════════════
   HERO — Higher contrast, bolder text
   ═══════════════════════════════════════════════════════════════ */
.hero-title {
  font-size: 3.8rem;
  line-height: 1.08;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-2);
  margin-bottom: 32px;
}
.hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   LISTING CARDS — better visibility
   ═══════════════════════════════════════════════════════════════ */
.listing-card, .lc {
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 10px rgba(26,21,14,.07);
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
}
.listing-card:hover, .lc:hover {
  border-color: rgba(192,83,31,.3);
  box-shadow: 0 12px 40px rgba(26,21,14,.16);
  transform: translateY(-5px);
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.35;
}
.card-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
}
.card-location {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 10px;
}

/* ═══════════════════════════════════════════════════════════════
   FILTER PANEL — cleaner look
   ═══════════════════════════════════════════════════════════════ */
.filter-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.filter-actions .btn {
  width: 100%;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD SIDEBAR — more readable, better contrast
   ═══════════════════════════════════════════════════════════════ */
.dash-sidebar {
  background: linear-gradient(180deg, #0f1e2e 0%, #132840 60%, #0f1e2e 100%);
}
.dash-link {
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: all .18s;
}
.dash-link:hover {
  color: #fff;
  background: rgba(255,255,255,.09);
  text-decoration: none;
}
.dash-link.active {
  color: #fff;
  background: rgba(192,83,31,.28);
  box-shadow: inset 0 0 0 1px rgba(192,83,31,.4);
}
.dash-link .dl-icon { font-size: 17px; opacity: .9; flex-shrink: 0; }
.dash-nav-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.28);
  padding: 0 18px;
  margin: 10px 0 6px;
}
.dash-user-info strong {
  font-size: 15px;
  color: #fff;
  display: block;
  font-weight: 700;
}
.dash-user-info p {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  margin-top: 4px;
}
.dash-content {
  background: #f0f4f8;
  padding: 44px 48px;
}
.dash-tab h2, .dash-tab-header h2 {
  color: #0f1e2e;
  font-size: 1.75rem;
}

/* Stat cards */
.stat-card .stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: #0f1e2e;
  letter-spacing: -.03em;
}
.stat-card .stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   FORMS & MODALS — clearer labels, bigger inputs
   ═══════════════════════════════════════════════════════════════ */
.form-group label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-2);
  margin-bottom: 7px;
  display: block;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--warm-50);
  outline: none;
  transition: all .2s;
  font-size: 14px;
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(192,83,31,.1);
}
.form-group input::placeholder { color: var(--text-3); }

.modal {
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 24px 80px rgba(26,21,14,.22);
}
.modal h2 {
  font-size: 1.7rem;
  letter-spacing: -.02em;
  margin-bottom: 6px;
  color: var(--text);
}
.modal-sub {
  color: var(--text-3);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.55;
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  background: var(--warm-50);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  transition: all .18s;
}
.modal-close:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #c0392b;
}

/* ═══════════════════════════════════════════════════════════════
   SEARCH BANNER — higher contrast
   ═══════════════════════════════════════════════════════════════ */
.search-banner {
  padding: 64px 48px 68px;
  text-align: center;
}
.search-banner h2 {
  font-size: 2.8rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.02em;
  margin-bottom: 12px;
  text-shadow: 0 2px 16px rgba(0,0,0,.2);
}
.search-banner p {
  color: rgba(255,255,255,.7);
  font-size: 15px;
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   RESULTS HEADER
   ═══════════════════════════════════════════════════════════════ */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(26,21,14,.06);
  margin-bottom: 24px;
}
#resultsCount {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
}

/* ═══════════════════════════════════════════════════════════════
   MESSAGES PAGE
   ═══════════════════════════════════════════════════════════════ */
.conv-header {
  background: var(--warm-50);
  padding: 20px 20px 16px;
  border-bottom: 1.5px solid var(--border);
}
.conv-header-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.conv-item {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(216,203,184,.5);
  transition: all .18s;
}
.conv-item:hover { background: var(--warm-50); }
.conv-item.active {
  background: rgba(192,83,31,.07);
  border-left: 3px solid var(--accent);
}
.conv-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════
   FEATURES STRIP — bolder
   ═══════════════════════════════════════════════════════════════ */
.feature-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.feature-text span {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}
.feature-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--white);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(26,21,14,.07);
}

/* ═══════════════════════════════════════════════════════════════
   PAGE SECTION TITLES
   ═══════════════════════════════════════════════════════════════ */
.section-header h2 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--text);
}
.section-header h2::before {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 36px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.section-header {
  position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   BOOKING CARD (listing detail)
   ═══════════════════════════════════════════════════════════════ */
.booking-card {
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  box-shadow: var(--shadow);
}
.booking-card-price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
  letter-spacing: -.02em;
}
.booking-card-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-3);
}

/* ═══════════════════════════════════════════════════════════════
   TOAST — more prominent
   ═══════════════════════════════════════════════════════════════ */
#toast {
  border-radius: 12px;
  padding: 14px 22px 14px 18px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(26,21,14,.22);
  bottom: 80px; /* above mobile bottom nav */
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  max-width: 340px;
}
#toast::before {
  content: '✓';
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
#toast.toast-error::before { content: '✕'; }

/* ═══════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════ */
.pagination { gap: 6px; }
.page-btn {
  min-width: 40px; height: 40px;
  padding: 0 14px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 14px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-2);
  cursor: pointer;
  transition: all .18s;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(192,83,31,.06); }
.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 3px 10px rgba(192,83,31,.3);
}

/* ═══════════════════════════════════════════════════════════════
   BACK BUTTON (listing detail)
   ═══════════════════════════════════════════════════════════════ */
.listing-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  padding: 8px 16px;
  border: 1.5px solid rgba(192,83,31,.25);
  border-radius: 8px;
  margin-bottom: 24px;
  background: rgba(192,83,31,.05);
  transition: all .18s;
}
.listing-back:hover {
  background: rgba(192,83,31,.1);
  border-color: var(--accent);
}
.listing-back::before { content: '←'; font-size: 16px; }

/* ═══════════════════════════════════════════════════════════════
   SETTINGS TABS
   ═══════════════════════════════════════════════════════════════ */
.settings-tabs {
  display: flex;
  gap: 4px;
  background: var(--warm-50);
  border-radius: 11px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.settings-tab {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: all .18s;
}
.settings-tab.active {
  background: var(--white);
  color: var(--accent);
  box-shadow: 0 1px 6px rgba(26,21,14,.1);
}
.settings-tab-danger.active { color: #c0392b; }
.settings-tab-danger:hover { color: #c0392b; }

/* ═══════════════════════════════════════════════════════════════
   STATUS BADGES — more visible
   ═══════════════════════════════════════════════════════════════ */
.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: .05em;
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════ */
.empty-state {
  padding: 72px 32px;
  border-radius: 16px;
  background: var(--white);
  border: 1.5px dashed var(--border);
  text-align: center;
}
.empty-state .es-icon { font-size: 56px; opacity: .65; margin-bottom: 18px; }
.empty-state h3 { font-size: 1.3rem; color: var(--text-2); margin-bottom: 8px; font-family: var(--font-head); }
.empty-state p { font-size: 14px; color: var(--text-3); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile-first overrides
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  #navbar { padding: 0 24px; }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 8px 12px; font-size: 13px; }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  /* Show hamburger, hide desktop links */
  .nav-hamburger { display: flex; }
  .nav-links { display: none !important; }
  #authButtons { display: none !important; }
  #userMenu { display: none !important; }

  /* Show mobile bottom nav */
  #bottomNav { display: flex; }

  /* Push main content above bottom nav */
  #app { padding-bottom: 68px; }

  /* Breadcrumb */
  #breadcrumb { padding: 10px 20px; font-size: 12px; }

  /* Adjust toast position for mobile nav */
  #toast { bottom: 76px; right: 16px; left: 16px; max-width: 100%; min-width: auto; }

  /* Search layout */
  .search-layout { grid-template-columns: 1fr; padding: 24px 20px 80px; gap: 20px; }
  .filter-panel { position: static; }
  .search-banner { padding: 44px 24px 48px; }
  .search-banner h2 { font-size: 2rem; }

  /* Hero */
  .hero { grid-template-columns: 1fr; }
  .hero-graphic { display: none; }
  .hero-content { padding: 48px 24px 40px; }
  .hero-title { font-size: 2.6rem; }

  /* Features */
  .features-strip { padding: 24px 24px; }
  .features-strip-inner { grid-template-columns: 1fr; gap: 16px; }
  .feature-item { padding: 0; border-right: none; }

  /* Section */
  .section-container { padding: 36px 20px 48px; }

  /* Dashboard */
  .dashboard-layout { grid-template-columns: 1fr; }
  .dash-sidebar {
    position: static; height: auto;
    padding: 16px 0 12px;
  }
  .dash-content { padding: 24px 20px 80px; }
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 12px; }

  /* Messages */
  .messages-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 600px;
    margin: 20px 16px 84px;
  }
  .conversations-list { height: 260px; border-right: none; border-bottom: 1.5px solid var(--border); }

  /* Listing detail */
  .listing-detail-container { padding: 24px 20px 80px; }
  .listing-body { grid-template-columns: 1fr; }
  .listing-title { font-size: 1.75rem; }

  /* Modal */
  .modal { padding: 28px 24px; width: 96vw; border-radius: 16px; }
  .modal.modal-wide { width: 96vw; }

  /* Dash nav as horizontal scroll */
  .dash-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0 16px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .dash-nav::-webkit-scrollbar { display: none; }
  .dash-nav-label { display: none; }
  .dash-link { padding: 9px 14px; white-space: nowrap; flex-shrink: 0; }
  .dash-user-info { padding: 0 20px 16px; }
  .dash-user-info .avatar { width: 56px; height: 56px; font-size: 22px; }
}

@media (max-width: 480px) {
  :root { --nav-h: 60px; }
  #navbar { padding: 0 16px; gap: 0; }
  .brand { font-size: 1.2rem; }
  .brand-icon { width: 34px; height: 34px; }
  .hero-title { font-size: 2.1rem; }
  .hero-sub { font-size: 15px; }
  .section-header h2 { font-size: 1.6rem; }
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 18px 16px; }
  .stat-card .stat-num { font-size: 2rem; }
  #toast { font-size: 13px; padding: 12px 16px 12px 14px; }
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
.lc, .listing-card, .stat-card, .booking-row, .listing-mgmt-card {
  animation: fadeUpIn .4s ease both;
}
@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.listings-grid .lc:nth-child(1), .listings-grid .listing-card:nth-child(1) { animation-delay: .04s; }
.listings-grid .lc:nth-child(2), .listings-grid .listing-card:nth-child(2) { animation-delay: .08s; }
.listings-grid .lc:nth-child(3), .listings-grid .listing-card:nth-child(3) { animation-delay: .12s; }
.listings-grid .lc:nth-child(4), .listings-grid .listing-card:nth-child(4) { animation-delay: .16s; }
.listings-grid .lc:nth-child(5), .listings-grid .listing-card:nth-child(5) { animation-delay: .20s; }
.listings-grid .lc:nth-child(6), .listings-grid .listing-card:nth-child(6) { animation-delay: .24s; }

.stat-cards .stat-card:nth-child(1) { animation-delay: .06s; }
.stat-cards .stat-card:nth-child(2) { animation-delay: .12s; }
.stat-cards .stat-card:nth-child(3) { animation-delay: .18s; }

/* Skeleton wave */
.skeleton-card {
  background: linear-gradient(90deg, var(--warm-50) 25%, var(--warm-100) 50%, var(--warm-50) 75%);
  background-size: 200% 100%;
  animation: skeletonWave 1.6s ease infinite;
  border-radius: 16px;
  height: 300px;
}
@keyframes skeletonWave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Focus ring for accessibility */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
