/* =========================================================
   viewproperties – site styles
   Palette: forest green + antique gold on a cool stone ground
   Type: Marcellus (headings, like lettering on a building plaque) + Figtree (UI and body)
   ========================================================= */

:root {
  --forest: #0C2219;
  --palm: #17402E;
  --leaf: #2C6B4D;
  --gold: #C9A24C;
  --gold-deep: #A9842F;
  --gold-pale: #E7D08F;
  --stone: #EFF1EB;
  --paper: #FFFFFF;
  --ink: #15201A;
  --muted: #5C6A62;
  --line: #D8DDD3;
  --sold: #9B3B2E;

  --font-display: "Marcellus", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-sm: 6px;
  --radius: 12px;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;  /* the screen's current height, which follows the phone's address bar */
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: var(--leaf); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
  color: var(--forest);
}

h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 720px) { .container { padding-inline: 32px; } }

.muted { color: var(--muted); margin: 0; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 .95rem/1 var(--font-body);
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-sm { padding: .55rem 1.1rem; font-size: .85rem; }
.btn-block { width: 100%; }

.btn-gold { background: var(--gold); color: var(--forest); }
.btn-gold:hover { background: var(--gold-pale); }

.btn-green { background: var(--palm); color: #fff; }
.btn-green:hover { background: var(--forest); }
.btn-green:disabled { opacity: .7; cursor: progress; }

.btn-outline { border-color: var(--palm); color: var(--palm); background: transparent; }
.btn-outline:hover { background: var(--palm); color: #fff; }

.btn-outline-light { border-color: rgba(231, 208, 143, .8); color: var(--gold-pale); background: rgba(12, 34, 25, .25); }
.btn-outline-light:hover { background: var(--gold-pale); color: var(--forest); }

.btn-quiet { color: var(--muted); background: transparent; }
.btn-quiet:hover { color: var(--ink); }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--forest);
  border-bottom: 1px solid rgba(201, 162, 76, .25);
  position: relative;
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--gold);
}
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-word {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: .04em;
  color: #F4F1E6;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a:not(.btn) {
  color: rgba(244, 241, 230, .85);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
}
.nav-links a:not(.btn):hover { color: var(--gold-pale); }
.nav-links a { white-space: nowrap; }
.nav-links .nav-quiet { color: rgba(244, 241, 230, .55) !important; }

.nav-toggle, .nav-burger { display: none; }

@media (max-width: 1080px) {
  .nav-burger {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
  }
  .nav-burger span,
  .nav-burger span::before,
  .nav-burger span::after {
    content: "";
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gold-pale);
    position: relative;
  }
  .nav-burger span::before { position: absolute; top: -7px; }
  .nav-burger span::after { position: absolute; top: 7px; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem 16px 1.25rem;
    background: var(--forest);
    border-bottom: 1px solid rgba(201, 162, 76, .25);
  }
  .nav-links li a:not(.btn) { display: block; padding: .8rem 0; }
  .nav-links li .btn { margin-top: .5rem; width: 100%; }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-toggle:focus-visible + .nav-burger { outline: 2px solid var(--gold); }
  .nav-toggle { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; }
}

/* ---------- Flash messages ---------- */
.flash { padding: .85rem 0; font-weight: 500; }
.flash-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.flash-success { background: #DCEBDD; color: var(--palm); }
.flash-error { background: #F5DFD9; color: var(--sold); }
.flash-close {
  background: none;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: inherit;
  cursor: pointer;
}

/* =========================================================
   Home hero: full-screen background video with the welcome text on top
   ========================================================= */
/* Dark background behind the homepage, so no light strip can show while a phone resizes */
body.page-home { background: var(--forest); }

.page-home .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, rgba(12, 34, 25, .7), transparent);
  border-bottom: 0;
}
.page-home .flash { position: absolute; top: 72px; left: 0; right: 0; z-index: 9; }

.hero {
  position: relative;
  min-height: 100vh;
  /* Exactly the screen's current height, so on phones the video fills the screen with nothing
     below it to scroll to, whether the address bar is showing or hidden */
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  /* A still of the video sits behind it, so the house stays visible while the video loads
     or when the browser stops drawing it (e.g. right after a link is clicked) */
  background: var(--forest) url("/static/img/hero-poster.jpg") center / cover no-repeat;
  isolation: isolate;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 55% at 50% 100%, rgba(23, 64, 46, .55), transparent 70%),
    linear-gradient(to bottom, rgba(12, 34, 25, .55) 0%, rgba(12, 34, 25, .35) 45%, rgba(12, 34, 25, .8) 100%);
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 760px;
  padding: 140px 20px 80px;
  color: #F4F1E6;
  animation: hero-fade 1.2s .5s ease both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6.4vw, 4.6rem);
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.12;
  color: #F7F3E3;
  text-shadow: 0 2px 30px rgba(12, 34, 25, .6);
}

.hero-text {
  margin: 1.6rem auto 0;
  max-width: 60ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.75;
  color: rgba(244, 241, 230, .9);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.4rem;
}
.hero-actions .btn { min-width: 200px; padding-block: 1rem; }

@keyframes hero-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (max-width: 600px) {
  .hero-title { letter-spacing: .08em; }
  .hero-actions .btn { width: 100%; }
}

/* =========================================================
   Inner pages
   ========================================================= */
.page-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 2.5rem 0 2rem;
}
.page-head-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.page-head .muted { margin-top: .4rem; }

.state-filter {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.state-filter label { font-weight: 600; color: var(--forest); }
.state-filter select { min-width: 220px; }

.listing-section { padding-block: 2.5rem 4rem; }

/* Catalogue grid: photo, address, description */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 2.5rem 1.75rem;
}

.listing {
  text-decoration: none;
  color: inherit;
  display: block;
}
.listing-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: #DDE2D9;
}
.listing-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.listing:hover .listing-photo img { transform: scale(1.04); }
.listing-photo .tag { position: absolute; top: 12px; left: 12px; }

.listing-address {
  margin-top: 1rem;
  font-size: 1.3rem;
}
.listing:hover .listing-address { color: var(--leaf); }

/* Address with a location pin in front (catalogue and property details) */
.listing-address, .detail-address {
  display: flex;
  align-items: flex-start;
  gap: .4em;
}
.pin {
  flex: none;
  width: .85em;
  height: .85em;
  margin-top: .14em;
  color: var(--gold);
}
.listing-desc {
  margin: .4rem 0 0;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-missing {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: .9rem;
}

.tag {
  display: inline-block;
  padding: .3rem .75rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.2;
}
.tag-sold { background: var(--sold); color: #fff; }
.tag-available { background: #DCEBDD; color: var(--palm); }

/* Empty states */
.empty {
  text-align: center;
  max-width: 460px;
  margin: 3rem auto;
  padding: 3rem 1.5rem;
}
.empty svg { width: 64px; height: 64px; color: var(--gold); margin: 0 auto 1.25rem; }
.empty h2 { font-size: 1.7rem; }
.empty p { color: var(--muted); margin: .6rem 0 1.6rem; }

/* ---------- Property details ---------- */
.detail { padding-block: 1.5rem 4rem; }
.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--muted);
}
.back-link:hover { color: var(--forest); }

.gallery {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--forest);
}
.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: start;
  aspect-ratio: 16 / 9;
  max-height: 70vh;
}
/* A placeholder photo (set inline on the first slide) shows underneath until the full one loads */
.gallery-slide { background-size: cover; background-position: center; background-repeat: no-repeat; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-slide video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.gallery-empty { aspect-ratio: 16 / 7; color: rgba(244, 241, 230, .7); }

.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(12, 34, 25, .65);
  color: var(--gold-pale);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.gallery-btn:hover { background: var(--forest); }
.gallery-prev { left: 16px; }
.gallery-next { right: 16px; }
.gallery-count {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: .3rem .8rem;
  border-radius: 999px;
  background: rgba(12, 34, 25, .7);
  color: #F4F1E6;
  font-size: .85rem;
}

.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 3rem;
  margin-top: 2.5rem;
  align-items: start;
}
@media (max-width: 900px) { .detail-body { grid-template-columns: 1fr; gap: 2rem; } }

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.detail-title-row .tag { margin-top: .5rem; flex: none; }

.detail-price {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold-deep);
  margin: .6rem 0 0;
}

.facts {
  display: grid;
  /* Each row shares its width evenly between however many facts it holds */
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts div { padding: 1rem 1rem 1rem 0; }
.facts div + div { padding-left: 1rem; border-left: 1px solid var(--line); }
.facts dt { font-size: .85rem; color: var(--muted); }
.facts dd { margin: .2rem 0 0; font-weight: 600; }
@media (max-width: 560px) {
  .facts { grid-auto-flow: row; grid-template-columns: 1fr; }
  .facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

.section-title { font-size: 1.35rem; margin-bottom: .75rem; }
.detail-desc { margin: 0; max-width: 68ch; white-space: pre-line; }

.seller {
  background: var(--forest);
  color: #F4F1E6;
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  position: sticky;
  top: 1.5rem;
}
.seller .section-title { color: var(--gold-pale); font-size: 1rem; font-family: var(--font-body); font-weight: 600; }
.seller-name { font-family: var(--font-display); font-size: 1.6rem; margin: 0; }
.seller .muted { color: rgba(244, 241, 230, .65); }

.seller-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 1.75rem 0;
  border-top: 1px solid rgba(201, 162, 76, .3);
  border-bottom: 1px solid rgba(201, 162, 76, .3);
}
.seller-stats div {
  display: flex;
  flex-direction: column-reverse;
  padding: 1rem 0;
  text-align: center;
}
.seller-stats div + div { border-left: 1px solid rgba(201, 162, 76, .3); }
.seller-stats dd { margin: 0; font-weight: 600; font-size: 1.7rem; font-variant-numeric: lining-nums; color: var(--gold); line-height: 1.1; }
.seller-stats dt { font-size: .85rem; color: rgba(244, 241, 230, .7); }

.seller-contact { display: grid; gap: .7rem; }
.seller .btn-outline { border-color: rgba(231, 208, 143, .55); color: var(--gold-pale); }
.seller .btn-outline:hover { background: var(--gold-pale); color: var(--forest); }

/* ---------- My properties ---------- */
.owner-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.owner-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}
.owner-photo { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: #DDE2D9; }
.owner-photo img { width: 100%; height: 100%; object-fit: cover; }
.owner-address { display: block; line-height: 1.25; font-family: var(--font-display); font-size: 1.3rem; color: var(--forest); text-decoration: none; }
.owner-address:hover { color: var(--leaf); }
.owner-info .muted { font-size: .9rem; margin-top: .2rem; }
.owner-price { margin: .4rem 0 0; font-weight: 600; color: var(--gold-deep); }

.owner-status { display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; }
.status-edit { position: relative; }
.status-edit summary { list-style: none; }
.status-edit summary::-webkit-details-marker { display: none; }
.status-edit[open] summary { background: var(--palm); color: #fff; }
.status-form {
  display: flex;
  align-items: center;
  gap: .9rem;
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  z-index: 5;
  white-space: nowrap;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -20px rgba(12, 34, 25, .45);
}
.radio { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; font-weight: 500; }
.radio input { accent-color: var(--palm); width: 18px; height: 18px; }

@media (max-width: 720px) {
  .owner-row { grid-template-columns: 110px minmax(0, 1fr); }
  .owner-status { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
  .status-edit { position: static; }
  .status-form { position: static; margin-top: .75rem; flex-wrap: wrap; box-shadow: none; }
}

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.span-2 { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.field { display: grid; gap: .4rem; align-content: start; }
.field > span { font-weight: 600; font-size: .9rem; color: var(--forest); }

input[type=text], input[type=password], input[type=email], input[type=tel], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .75rem .9rem;
  transition: border-color .15s, box-shadow .15s;
}
select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2317402E' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: 12px;
}
textarea { resize: vertical; min-height: 140px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 76, .25);
}

.input-prefix { position: relative; }
.input-prefix > span {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
}
.input-prefix input { padding-left: 2rem; }

/* Login / sign up */
.auth { padding-block: 3.5rem 5rem; display: grid; place-items: center; }
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--paper);
  border-radius: var(--radius);
  border-top: 3px solid var(--gold);
  padding: 2.5rem 2rem;
  box-shadow: 0 30px 60px -40px rgba(12, 34, 25, .45);
}
.auth-card-wide { max-width: 620px; }
.auth-card .muted { margin: .5rem 0 1.75rem; }
.auth-card .btn-block { margin-top: .5rem; }
.auth-switch { margin: 1.5rem 0 0; text-align: center; color: var(--muted); }
.auth-switch a { font-weight: 600; }

/* Upload form */
.upload { padding-block: 2rem 4rem; max-width: 900px; }
.upload-form { gap: 1.5rem; }
.upload-block {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1.5rem;
}
.upload-block legend {
  float: left;
  width: 100%;
  grid-column: 1 / -1;
  padding: 0;
  margin: 0 0 .75rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--forest);
}
.upload-block legend + * { clear: both; }
.upload-block > .muted { margin: -.25rem 0 1rem; font-size: .9rem; }

.photo-slots {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: .75rem;
}
.photo-slot {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1.5px dashed #BFC8BA;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  background: var(--stone);
  color: var(--muted);
  font-size: .85rem;
  font-weight: 500;
  transition: border-color .15s;
}
.photo-slot:hover, .photo-slot:focus-within { border-color: var(--gold); color: var(--forest); }
.photo-slot-cover { grid-row: span 2; aspect-ratio: auto; }
.photo-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-slot img, .photo-slot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.photo-slot-hint { text-align: center; padding: 0 .5rem; }
.photo-slot-hint small { display: block; margin-top: .2rem; font-size: .75rem; color: var(--gold-deep); font-weight: 600; }
.slot-kind {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: rgba(12, 34, 25, .75);
  color: var(--gold-pale);
  font-size: .75rem;
  font-weight: 600;
}
.photo-slot.has-photo { border-style: solid; border-color: var(--gold); }
.photo-slot.has-photo .photo-slot-hint { display: none; }
@media (max-width: 600px) {
  .photo-slots { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .photo-slot-cover { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
}

.upload-actions { display: flex; justify-content: flex-end; gap: .75rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest);
  color: rgba(244, 241, 230, .65);
  padding: 2rem 0;
  font-size: .9rem;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Pagination (25 properties per page) ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 3.5rem;
}
.pager-status { color: var(--muted); font-weight: 500; }
.btn.is-disabled { opacity: .35; pointer-events: none; }
@media (max-width: 480px) {
  .pager { gap: .75rem; }
  .pager .btn { padding-inline: 1rem; }
}

/* ---------- Footer credit and social links ---------- */
.footer-credit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(201, 162, 76, .2);
}
.footer-credit p { margin: 0; }
.footer-contact { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-left: auto; }
.footer-contact > span { color: rgba(244, 241, 230, .8); }
.footer-social { display: flex; gap: .75rem; }
.footer-social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 76, .45);
  color: var(--gold);
  transition: background-color .2s, color .2s;
}
.footer-social a:hover { background: var(--gold); color: var(--forest); }
.footer-social svg { width: 18px; height: 18px; }

/* "Forgot password?" link beside the password label on the login page */
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.field-link { font-weight: 500; font-size: .85rem; color: var(--leaf); }


/* ---------- My properties: View property + Edit status buttons ---------- */
.owner-actions { display: flex; align-items: flex-start; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Owner and admin property pages ---------- */
.facts-tight { margin-top: -2rem; border-top: 0; }
.break { overflow-wrap: anywhere; }
.detail-links { margin: 1.5rem 0 0; }
.detail-links a { font-weight: 600; }

.edit-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
}
.edit-panel textarea { min-height: 160px; }

.owner-facts { margin: 0 0 1.5rem; display: grid; gap: .75rem; }
.owner-facts dt { font-size: .85rem; color: var(--muted); }
.owner-facts dd { margin: .1rem 0 0; font-weight: 600; }

.danger-zone { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.danger-zone .muted { font-size: .9rem; margin-bottom: 1rem; }
.btn-danger { background: var(--sold); color: #fff; }
.btn-danger:hover { background: #7A2C21; }

/* ---------- Admin page ---------- */
.owner-id-input { width: 120px; }
.state-filter label, .state-filter .btn { white-space: nowrap; }
@media (max-width: 480px) { .state-filter { flex-wrap: wrap; } .owner-id-input { flex: 1; } }
.admin-layout {
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr);
  gap: 2.5rem;
  padding-block: 2.5rem 4rem;
  align-items: start;
}
@media (max-width: 900px) { .admin-layout { grid-template-columns: 1fr; } }

.owners-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .95rem;
}
.owners-table th, .owners-table td { padding: .7rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
.owners-table th { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--stone); }
.owners-table td:first-child, .owners-table th:first-child { width: 3.5rem; }
.owners-table td:last-child, .owners-table th:last-child { text-align: right; }
.owners-table tbody tr:last-child td { border-bottom: 0; }
.owners-table a { font-weight: 600; text-decoration: none; }
.owners-table a:hover { text-decoration: underline; }
.owners-table tr.is-selected td { background: #F6EFD9; }

.listing-grid-compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2rem 1.25rem; }
.listing-grid-compact .listing-address { font-size: 1.15rem; }
.admin-results .section-title .muted { font-family: var(--font-body); font-size: .95rem; }
.empty-tight { margin: 0; padding: 2.5rem 1.5rem; max-width: none; background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-tight h2 { font-size: 1.4rem; }
.empty-tight p { margin-bottom: 0; }

/* Sign-up field with a problem (e.g. username taken) */
.field-error input { border-color: var(--sold); box-shadow: 0 0 0 3px rgba(155, 59, 46, .15); }
.field-error > span { color: var(--sold); }
.field-hint { color: var(--sold); font-size: .85rem; }

/* Admin pagers sit closer to their lists than the catalogue pager */
.admin-layout .pager { margin-top: 1.5rem; gap: .75rem; }
.admin-owners .pager { justify-content: space-between; }

/* State + Sort by dropdowns on the catalogue page */
.listing-filters { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.listing-filters .state-filter select { min-width: 200px; }
@media (max-width: 600px) {
  .listing-filters { width: 100%; gap: .75rem; }
  .listing-filters .state-filter { width: 100%; }
  .listing-filters .state-filter label { min-width: 4.5rem; }
  .listing-filters .state-filter select { flex: 1; min-width: 0; }
}

/* ---------- Stat strip (admin statistics, profile figures) ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-strip div {
  display: flex;
  flex-direction: column-reverse;
  gap: .25rem;
  padding: 1.25rem 1.5rem;
  border-left: 1px solid var(--line);
  margin-left: -1px;
}
.stat-strip dt { font-size: .9rem; color: var(--muted); }
.stat-strip dd {
  margin: 0;
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--forest);
  font-variant-numeric: lining-nums tabular-nums;
}

.admin-stats { padding-top: 2rem; }
.admin-stats + .admin-layout { padding-top: 2rem; }

/* ---------- Profile page ---------- */
.profile {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  padding-block: 2.5rem 4rem;
  align-items: start;
}
@media (max-width: 860px) { .profile { grid-template-columns: 1fr; } }
.profile-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.profile-card .stat-strip { border: 0; border-radius: 0; background: transparent; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-card .stat-strip { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 420px) { .profile-card .stat-strip { grid-template-columns: repeat(2, 1fr); } }
.profile-card .stat-strip div { padding: 1rem .5rem; text-align: center; align-items: center; }
.profile-card .stat-strip div:first-child { border-left: 0; }
.profile-details { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem; }
@media (max-width: 480px) { .profile-details { grid-template-columns: 1fr; } }
.profile-details dt { font-size: .85rem; color: var(--muted); }
.profile-details dd { margin: .2rem 0 0; font-weight: 600; }
.profile-note { margin-top: 1.25rem; }

/* ---------- Sale / rent ---------- */
.listing-tags { position: absolute; top: 12px; left: 12px; display: flex; gap: .4rem; flex-wrap: wrap; }
.listing-photo .listing-tags .tag { position: static; }
.tag-type { background: rgba(12, 34, 25, .78); color: var(--gold-pale); backdrop-filter: blur(4px); }
.empty-actions { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }

/* For sale / For rent choice on the upload and edit forms */
.choice-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.choice {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: pointer;
  font-weight: 600;
}
.choice input { accent-color: var(--palm); width: 18px; height: 18px; margin: 0; }
.choice:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 76, .2); }
.choice:focus-within { border-color: var(--gold); }
.field-note { font-size: .85rem; color: var(--muted); }
