/* ============================================================
   RoommateAds.com — style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Figtree:wght@400;500;600;700&display=swap');

/* ================= VARIABLES ================= */
:root {
  --sand: #ECF1ED;
  --cream: #F6F8F5;
  --charcoal: #16211D;
  --warm-gray: #4A5A53;
  --terracotta: #18785F;
  --terracotta-light: #1F8A6E;
  --terracotta-bg: #E7F1EC;
  --sage: #7A8B6F;
  --sage-light: #E8EDE5;
  --sky-light: #E3EDE7;
  --border: rgba(22,33,29,0.10);
  --teal: #18785F;
  --teal-deep: #0F5544;
  --marigold: #F2A33C;
  --marigold-deep: #D98620;
  --coral: #E0533C;
  --ink: #16211D;
  --paper: #F6F8F5;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
}

/* ================= RESET ================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================= BASE ================= */
body {
  font-family: 'Figtree', sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
  padding-top: 72px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ================= NAV ================= */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 72px;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(250,247,242,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 20px;
  text-decoration: none;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 22px;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links > a {
  font-size: 14px;
  font-weight: 500;
  color: var(--warm-gray);
  padding: 8px 12px;
  border-radius: 10px;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}

.nav-links > a:hover {
  color: var(--charcoal);
  background: var(--sand);
}

/* Nav badge (unread messages) */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--terracotta);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Nav user dropdown */
.nav-user-menu {
  position: relative;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 14px 6px 6px;
  cursor: pointer;
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  transition: box-shadow 0.15s, background 0.15s;
}

.nav-user-btn:hover {
  background: var(--sand);
  box-shadow: var(--shadow-sm);
}

.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--terracotta);
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  padding: 6px;
  display: none;
  flex-direction: column;
}

.nav-user-menu.open .nav-dropdown {
  display: flex;
}

.nav-dropdown a {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  border-radius: 8px;
  color: var(--charcoal);
  transition: background 0.15s;
}

.nav-dropdown a:hover {
  background: var(--sand);
}

/* ================= MAIN ================= */
main {
  min-height: calc(100vh - 72px);
}

/* ================= CONTAINER ================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 12px;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--terracotta);
  color: white;
  box-shadow: 0 4px 14px rgba(15,85,68,0.30);
}

.btn-primary:hover {
  background: var(--terracotta-light);
  box-shadow: 0 6px 20px rgba(15,85,68,0.40);
}

.btn-outline {
  background: white;
  color: var(--charcoal);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background: #fff0ee;
  color: #c0392b;
  border: 1px solid rgba(192,57,43,0.2);
}

.btn-danger:hover {
  background: #ffe5e2;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 9px;
}

/* ================= HERO ================= */
.hero {
  text-align: center;
  padding: 80px 24px 40px;
  max-width: 760px;
  margin: 0 auto;
}

.hero h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.15;
  color: var(--charcoal);
  margin-bottom: 18px;
}

.hero p {
  font-size: 18px;
  color: var(--warm-gray);
  line-height: 1.7;
}

.accent {
  color: var(--terracotta);
}

/* ================= SEARCH BOX ================= */
.search-box {
  max-width: 900px;
  margin: -10px auto 60px;
  padding: 0 24px;
}

.search-form {
  display: flex;
  gap: 8px;
  background: white;
  border-radius: 20px;
  padding: 10px;
  box-shadow: var(--shadow-md);
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 160px;
  padding: 12px 16px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  background: var(--cream);
  color: var(--charcoal);
  transition: border-color 0.15s;
  outline: none;
}

.search-input:focus {
  border-color: var(--terracotta);
  background: white;
}

.search-submit {
  padding: 12px 28px;
  background: var(--terracotta);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}

.search-submit:hover {
  background: var(--terracotta-light);
  transform: translateY(-1px);
}

/* ================= SECTIONS ================= */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.section-header {
  margin-bottom: 32px;
}

.section-header h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 32px;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--warm-gray);
  font-size: 16px;
}

/* ================= LISTING GRID ================= */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ================= CARDS ================= */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--sand);
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.card:hover .card-img img {
  transform: scale(1.04);
}

.no-photo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: var(--sand);
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--terracotta);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
}

.card-badge.new {
  background: var(--sage);
}

.card-body {
  padding: 16px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.card-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--terracotta);
  white-space: nowrap;
}

.card-price span {
  font-size: 12px;
  font-weight: 400;
  color: var(--warm-gray);
}

.card-location {
  font-size: 13px;
  color: var(--warm-gray);
  margin-bottom: 10px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--warm-gray);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 4px;
}

/* ================= TAGS ================= */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  background: var(--sand);
  color: var(--warm-gray);
}

.tag-green {
  background: var(--sage-light);
  color: var(--sage);
}

.tag-blue {
  background: var(--sky-light);
  color: #4a7a9b;
}

.tag-orange {
  background: var(--terracotta-bg);
  color: var(--terracotta);
}

/* ================= MESSAGES ================= */
.msg-list {
  max-width: 800px;
  margin: 0 auto;
}

.msg-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  margin-bottom: 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: box-shadow 0.2s;
}

.msg-item:hover {
  box-shadow: var(--shadow-md);
}

.msg-item.unread {
  border-left: 4px solid var(--terracotta);
  background: var(--terracotta-bg);
}

.msg-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--sky-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #4a7a9b;
  flex-shrink: 0;
}

.msg-body {
  flex: 1;
  min-width: 0;
}

.msg-from {
  font-weight: 700;
  font-size: 14px;
}

.msg-subject {
  font-size: 13px;
  color: var(--warm-gray);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-time {
  font-size: 12px;
  color: var(--warm-gray);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ================= DASHBOARD ================= */
/* ================= DASHBOARD ================= */
.dash-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px;
}

.dash-page h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 34px;
  margin-bottom: 28px;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-header h1 { margin-bottom: 0; }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.dash-stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

.dash-stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1;
  margin-bottom: 6px;
}

.dash-stat-label {
  font-size: 13px;
  color: var(--warm-gray);
}

.dash-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--charcoal);
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

/* Tabs */
.dash-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.dash-tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--warm-gray);
  text-decoration: none;
  border-radius: 10px 10px 0 0;
  margin-bottom: -2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, background 0.15s;
}

.dash-tab:hover {
  color: var(--charcoal);
  background: var(--sand);
}

.dash-tab.active {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}

/* Listing rows */
.dash-listing {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.dash-listing:hover { box-shadow: var(--shadow-md); }

.dash-listing-img {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--sand);
}

.dash-listing-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-listing-img .no-photo {
  width: 100%;
  height: 100%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-listing-info {
  flex: 1;
  min-width: 0;
}

.dash-listing-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-listing-title a {
  color: var(--charcoal);
  text-decoration: none;
  transition: color 0.15s;
}

.dash-listing-title a:hover { color: var(--terracotta); }

.dash-listing-meta {
  font-size: 13px;
  color: var(--warm-gray);
}

.dash-listing-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Status dot */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
  background: var(--warm-gray);
}

.status-dot.active  { background: var(--sage); }
.status-dot.paused  { background: #e0a800; }
.status-dot.expired { background: #c0392b; }

/* Extra button variants */
.btn-ghost {
  background: transparent;
  color: var(--warm-gray);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  background: var(--sand);
  color: var(--charcoal);
  border-color: var(--charcoal);
}

.btn-success {
  background: var(--sage-light);
  color: var(--sage);
  border: 1px solid rgba(122,139,111,0.3);
}

.btn-success:hover {
  background: var(--sage);
  color: white;
}
/* ================= FORMS ================= */
.form-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px;
}

.form-page h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 32px;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--charcoal);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  color: var(--charcoal);
  background: white;
  transition: border-color 0.15s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--terracotta);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-hint {
  font-size: 12px;
  color: var(--warm-gray);
  margin-top: 5px;
}

.form-error {
  font-size: 13px;
  color: #c0392b;
  margin-top: 5px;
}

/* ================= ALERTS ================= */
.alert {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--sage-light);
  color: var(--sage);
  border-color: rgba(122,139,111,0.2);
}

.alert-error {
  background: #fff0ee;
  color: #c0392b;
  border-color: rgba(192,57,43,0.2);
}

.alert-info {
  background: var(--sky-light);
  color: #4a7a9b;
  border-color: rgba(74,122,155,0.2);
}

/* ================= EMPTY STATE ================= */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--warm-gray);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 22px;
  color: var(--charcoal);
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 15px;
  max-width: 360px;
  margin: 0 auto;
}

/* ================= LISTING DETAIL ================= */
.listing-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.listing-detail h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.2;
  margin-bottom: 12px;
}

.listing-gallery {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
  aspect-ratio: 16/9;
  background: var(--sand);
}

.listing-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  align-items: center;
}

.listing-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--terracotta);
}

.listing-price span {
  font-size: 15px;
  font-weight: 400;
  color: var(--warm-gray);
}

.listing-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

@media (max-width: 700px) {
  .listing-body {
    grid-template-columns: 1fr;
  }
}

.listing-description {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
}

.listing-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
}

.contact-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.contact-card h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 20px;
  margin-bottom: 16px;
}

/* ================= PAGINATION ================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.pg {
  padding: 9px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}

.pg:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

.pg-active {
  background: var(--terracotta);
  color: white !important;
  border-color: var(--terracotta);
}

/* ================= FOOTER ================= */
footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.75);
  margin-top: 80px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.1fr 0.8fr;
  gap: 32px;
  margin-bottom: 48px;
}

.footer-brand .logo {
  color: white;
  font-size: 20px;
  margin-bottom: 12px;
  display: inline-flex;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  max-width: 240px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: white;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
  transition: color 0.15s;
  text-decoration: none;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ================= BREADCRUMB ================= */
.breadcrumb {
  font-size: 13px;
  color: var(--warm-gray);
  margin-bottom: 24px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--warm-gray);
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: var(--terracotta);
}

.breadcrumb span {
  opacity: 0.4;
}

/* ================= PROFILE / ACCOUNT ================= */
.profile-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px;
}

.profile-page h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 32px;
  margin-bottom: 28px;
}

/* ================= ADMIN ================= */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 72px);
}

.admin-sidebar {
  background: white;
  border-right: 1px solid var(--border);
  padding: 24px 16px;
}

.admin-sidebar a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--warm-gray);
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: var(--terracotta-bg);
  color: var(--terracotta);
}

.admin-main {
  padding: 36px 40px;
}

.admin-main h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 28px;
  margin-bottom: 24px;
}

/* ================= TABLE ================= */
.table-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  background: var(--sand);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--warm-gray);
  border-bottom: 1px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--cream);
}

tbody td {
  padding: 13px 16px;
  vertical-align: middle;
}

/* ================= ANIMATIONS ================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUp 0.5s ease both;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
  #nav {
    padding: 0 20px;
  }

  .nav-links > a:not(.btn) {
    display: none;
  }

  .hero {
    padding: 48px 20px 24px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .search-box {
    padding: 0 16px;
    margin-bottom: 40px;
  }

  .search-form {
    flex-direction: column;
  }

  .section {
    padding: 24px 16px 40px;
  }

  .listing-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .dash-page {
    padding: 32px 16px;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-col {
    display: flex;
    flex-direction: column;
  }
}

/* ================= LISTING DETAIL PAGE ================= */
.detail-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 36px;
  align-items: start;
}

@media (max-width: 800px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Gallery */
.detail-gallery {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--sand);
}

.detail-hero-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}

/* Title / location / price */
.detail-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(24px, 3.5vw, 36px);
  line-height: 1.2;
  margin-bottom: 10px;
}

.detail-location {
  font-size: 15px;
  color: var(--warm-gray);
  margin-bottom: 10px;
}

.detail-price {
  font-size: 26px;
  font-weight: 700;
  color: var(--terracotta);
  margin-bottom: 28px;
}

/* Description section */
.detail-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.detail-section h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 20px;
  margin-bottom: 14px;
}

.detail-desc {
  font-size: 15px;
  line-height: 1.8;
  color: #444;
}

/* Sidebar */
.detail-sidebar {
  position: sticky;
  top: 88px;
}

.sidebar-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}

.sidebar-card h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px;
  margin-bottom: 16px;
}

.sidebar-card .btn {
  width: 100%;
  margin-top: 16px;
  justify-content: center;
}

/* Poster info */
.poster-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.poster-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--terracotta);
  color: white;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.poster-name {
  font-weight: 700;
  font-size: 15px;
}

.poster-joined {
  font-size: 12px;
  color: var(--warm-gray);
  margin-top: 2px;
}

/* Details list */
.details-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--warm-gray);
}

.details-list strong {
  color: var(--charcoal);
}

/* ================= FAVORITE HEART BUTTON ================= */
.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 17px;
  transition: transform 0.15s, background 0.15s;
  line-height: 1;
}

.fav-btn:hover {
  transform: scale(1.18);
  background: white;
}

.fav-btn.is-faved {
  background: var(--terracotta-bg);
}

.card-img {
  position: relative;
}

/* ================= SEARCH PAGE ================= */
.search-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.search-results-header {
  margin-bottom: 28px;
}

.search-results-header h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 32px;
  margin-bottom: 6px;
}

.search-results-header p {
  color: var(--warm-gray);
  font-size: 15px;
}

/* ================= AUTH PAGES (login, register) ================= */
.auth-page {
  max-width: 440px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  text-align: center;
}

.auth-page h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 36px;
  margin-bottom: 10px;
}

.auth-page .subtitle {
  color: var(--warm-gray);
  font-size: 15px;
  margin-bottom: 28px;
  line-height: 1.6;
}

.auth-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  text-align: left;
}

.auth-card .form-group {
  margin-bottom: 18px;
}

.auth-card .form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--charcoal);
}

.auth-card .form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  color: var(--charcoal);
  background: var(--cream);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.auth-card .form-group input:focus {
  border-color: var(--terracotta);
  background: white;
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 16px;
  border-radius: 12px;
  margin-top: 6px;
}

.auth-divider {
  text-align: center;
  color: var(--warm-gray);
  font-size: 13px;
  margin: 20px 0;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}

.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ================= INBOX (messages.php) ================= */
.inbox-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.inbox-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.inbox-header h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 32px;
}

.thread-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.thread-item {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.thread-item:hover {
  box-shadow: var(--shadow-md);
}

.thread-item.unread {
  border-left: 4px solid var(--terracotta);
  background: var(--terracotta-bg);
}

.thread-link {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.thread-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--terracotta);
  color: white;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.thread-body {
  flex: 1;
  min-width: 0;
}

.thread-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}

.thread-name {
  font-weight: 700;
  font-size: 15px;
}

.thread-time {
  font-size: 11px;
  color: var(--warm-gray);
  white-space: nowrap;
  margin-left: 8px;
}

.thread-subject {
  font-size: 13px;
  color: var(--terracotta);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-preview {
  font-size: 13px;
  color: var(--warm-gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-unread-dot {
  background: var(--terracotta);
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
  margin-right: 4px;
}

.thread-delete {
  padding: 16px 14px;
  color: #ccc;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s;
  flex-shrink: 0;
}

.thread-delete:hover {
  color: #c0392b;
}

/* ================= CHAT (thread.php) ================= */
.chat-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 72px);
  max-width: 720px;
  margin: 0 auto;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: white;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.chat-back {
  font-size: 20px;
  color: var(--warm-gray);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s;
}

.chat-back:hover {
  background: var(--sand);
}

.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--terracotta);
  color: white;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-header-info {
  flex: 1;
  min-width: 0;
}

.chat-header-name {
  font-weight: 700;
  font-size: 15px;
}

.chat-header-listing {
  font-size: 12px;
  color: var(--warm-gray);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.chat-header-listing:hover {
  color: var(--terracotta);
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  background: #f0ebe3;
  display: flex;
  flex-direction: column;
}

.chat-date-divider {
  text-align: center;
  font-size: 11px;
  color: var(--warm-gray);
  background: rgba(255,255,255,0.7);
  display: inline-block;
  margin: 12px auto;
  padding: 4px 12px;
  border-radius: 99px;
  align-self: center;
}

.bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 18px;
  margin: 3px 0;
  word-wrap: break-word;
  position: relative;
}

.bubble.me {
  background: var(--terracotta);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.bubble.them {
  background: white;
  color: var(--charcoal);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.bubble-text {
  font-size: 14px;
  line-height: 1.5;
}

.bubble-time {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
  text-align: right;
}

.chat-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px;
  background: white;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-input-bar textarea {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 10px 16px;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  resize: none;
  outline: none;
  max-height: 120px;
  line-height: 1.5;
  background: var(--cream);
  transition: border-color 0.15s;
}

.chat-input-bar textarea:focus {
  border-color: var(--terracotta);
  background: white;
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--terracotta);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}

.chat-send-btn:hover {
  background: var(--terracotta-light);
  transform: scale(1.08);
}

@media (max-width: 768px) {
  .chat-page {
    height: calc(100vh - 72px);
  }
  .bubble {
    max-width: 85%;
  }
}
/* ===== RA brand chrome (foundation) ===== */
.logo .ra-logo-mark{vertical-align:middle}
.logo-ads{color:var(--marigold)}
.ra-icon{display:inline-block;vertical-align:middle}
.nav-links > a.btn-primary{color:#fff}
.nav-links > a.btn-primary:hover{color:#fff;background:var(--terracotta-light)}


/* ===== Static content pages (FAQ, About, Terms, Privacy, etc.) =====
   .static-page had no rule, leaving these 9 pages flush to the viewport.
   Mirror .form-page centering/padding, a touch wider for long-form reading. */
.static-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px;
}
.static-page h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 32px;
  line-height: 1.15;
  margin-bottom: 6px;
}
.static-page .subtitle {
  color: var(--warm-gray);
  font-size: 16px;
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .static-page { padding: 32px 16px; }
}
