:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-alt: #edf3ff;
  --primary: #1747d1;
  --primary-dark: #0a2a82;
  --secondary: #f4c95d;
  --text: #101828;
  --text-soft: #475467;
  --border: rgba(16, 24, 40, 0.08);
  --shadow: 0 18px 50px rgba(15, 22, 37, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  opacity: 1;
  transition: opacity 0.22s ease;
}

body.page-transitioning {
  opacity: 0.35;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
select {
  font: inherit;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(245, 247, 251, 0.8);
  border-bottom: 1px solid rgba(16, 24, 40, 0.05);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-logo {
  display: inline-block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(23, 71, 209, 0.18);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), #3f77ff);
  color: #fff;
  font-size: 0.92rem;
}

.main-nav,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-nav a {
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #2a69f2);
  color: #fff;
  box-shadow: 0 14px 30px rgba(23, 71, 209, 0.3);
}

.btn-ghost {
  background: rgba(23, 71, 209, 0.05);
  color: var(--primary);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px;
  cursor: pointer;
}

.nav-left-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-to-listings-btn {
  white-space: nowrap;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 99px;
  margin: 5px 0;
}

.edit-page-header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.discard-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 28, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 120;
}

.discard-card {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 26px 24px 20px;
}

.discard-card h3 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.discard-card p {
  margin: 0 0 20px;
  color: var(--text-soft);
}

.discard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 28, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 120;
}

.confirm-card {
  width: min(420px, 100%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 255, 0.98));
  border: 1px solid rgba(23, 71, 209, 0.08);
  border-radius: 26px;
  box-shadow: 0 22px 54px rgba(11, 18, 36, 0.14);
  padding: 28px 24px 20px;
  text-align: center;
}

.confirm-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.12);
  color: #b42318;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
}

.confirm-card h3 {
  margin: 0 0 12px;
  font-size: 1.8rem;
  letter-spacing: -0.05em;
}

.confirm-card p {
  margin: 0 0 22px;
  color: var(--text-soft);
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.delete-confirm-btn {
  background: linear-gradient(135deg, #d92d20, #b42318);
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(rgba(8, 16, 36, 0.46), rgba(8, 16, 36, 0.36)),
    url("https://images.unsplash.com/photo-1568605114967-8130f3a36994?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat;
  color: #fff;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 40px;
  min-height: 760px;
  padding: 80px 0 60px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow.blue {
  background: rgba(23, 71, 209, 0.08);
  color: var(--primary);
  border-color: rgba(23, 71, 209, 0.15);
}

.hero-copy h1 {
  font-size: clamp(2.8rem, 4vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
  max-width: 600px;
  margin: 0;
}

.lead {
  max-width: 560px;
  margin-top: 18px;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.78);
}

.search-bar {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 14px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  padding: 18px;
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(17, 28, 53, 0.22);
}

.field {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.field label {
  display: block;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  margin-bottom: 6px;
}

.field select,
.field input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.field select option {
  color: var(--text);
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.56);
}

.field input[type='number']::-webkit-outer-spin-button,
.field input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.search-btn {
  align-self: stretch;
  min-width: 137px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 38px;
  margin-top: 34px;
}

.hero-metrics div {
  display: flex;
  flex-direction: column;
}

.hero-metrics strong {
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.hero-metrics span {
  color: rgba(255, 255, 255, 0.72);
}

.hero-panel {
  display: flex;
  justify-content: center;
}

.listing-highlight {
  position: relative;
  overflow: hidden;
  width: min(100%, 430px);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.listing-highlight img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.listing-badge {
  position: absolute;
  left: 20px;
  top: 20px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.listing-details {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 20px 18px;
  background: linear-gradient(180deg, transparent, rgba(5, 10, 20, 0.84));
}

.tag {
  display: inline-block;
  margin-bottom: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.35rem 0.7rem;
  font-size: 0.7rem;
  color: #fff;
  text-transform: uppercase;
}

.listing-details h3 {
  margin: 0;
  font-size: 1.6rem;
}

.listing-details p {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
}

.partners {
  border-top: 1px solid rgba(16, 24, 40, 0.05);
  border-bottom: 1px solid rgba(16, 24, 40, 0.05);
  background: rgba(255, 255, 255, 0.5);
}

.partners-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 90px;
  color: var(--text-soft);
}

.partners-row > span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.partner-names {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(16, 24, 40, 0.55);
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(9, 17, 33, 0.68), rgba(16, 41, 95, 0.72)),
    url("https://images.unsplash.com/photo-1494526585095-c41746248156?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat;
  color: #fff;
}

.neighborhoods-hero {
  background: linear-gradient(135deg, rgba(9, 17, 33, 0.68), rgba(13, 56, 91, 0.7)),
    url("https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat;
}

.partners-hero {
  background: linear-gradient(135deg, rgba(9, 17, 33, 0.72), rgba(26, 51, 118, 0.72)),
    url("https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat;
}

.page-hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 36px;
  min-height: 520px;
  padding: 90px 0 70px;
}

.page-hero-copy h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(2.7rem, 4vw, 4.3rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.page-hero-card {
  display: grid;
  gap: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  padding: 20px;
  box-shadow: 0 20px 48px rgba(10, 18, 36, 0.18);
  backdrop-filter: blur(8px);
}

.mini-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mini-stat strong {
  font-size: clamp(1.5rem, 2vw, 2rem);
  letter-spacing: -0.04em;
}

.mini-stat span {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.neighborhood-chip,
.partner-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(23, 71, 209, 0.08);
  border: 1px solid rgba(23, 71, 209, 0.12);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-weight: 600;
}

.mini-list li::before {
  content: "•";
  color: var(--primary);
  margin-right: 8px;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.partner-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: 0 12px 28px rgba(11, 18, 36, 0.04);
}

.partner-card h3 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.partner-card p {
  margin: 0;
  color: var(--text-soft);
}

@media (max-width: 1024px) {
  .page-hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .partner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .page-hero-inner {
    padding-top: 72px;
  }

  .partner-grid {
    grid-template-columns: 1fr;
  }
}

.section {
  padding: 110px 0;
}

.alt-bg {
  background: linear-gradient(180deg, rgba(237, 243, 255, 0.55), rgba(255, 255, 255, 0));
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 32px;
}

.section-heading.simple {
  justify-content: flex-start;
}

.section-heading h2,
.values-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid var(--border);
  background: rgba(23, 71, 209, 0.04);
  border-radius: 999px;
  color: var(--text-soft);
  padding: 0.75rem 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

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

.home-results-preview {
  margin-top: 2rem;
  padding: 1.5rem 1.25rem 1rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 18px 35px rgba(11, 18, 36, 0.05);
}

.home-results-preview.hidden {
  display: none;
}

.home-preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.section-heading.compact {
  margin-bottom: 0;
}

.property-see-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 1.25rem auto 0;
  min-width: 180px;
}

.property-grid,
.neighborhood-grid,
.agents-grid,
.testimonial-grid {
  display: grid;
  gap: 28px;
}

.property-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.property-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(11, 18, 36, 0.05);
  /* start hidden; JS will add .visible to animate in */
  opacity: 0;
  transform: translateY(12px);
  will-change: opacity, transform;
  /* slower, smoother animation */
  transition: opacity 520ms cubic-bezier(0.16, 0.84, 0.24, 1), transform 520ms cubic-bezier(0.16, 0.84, 0.24, 1), box-shadow 240ms ease;
  cursor: pointer;
}

.property-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.property-card.hidden {
  display: none;
}

.property-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 38px rgba(11, 18, 36, 0.08);
}

.image-wrap {
  position: relative;
  height: 260px;
  overflow: hidden;
}

.image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.listing-tag.alt {
  background: rgba(14, 31, 85, 0.8);
  color: #fff;
}

.property-body {
  padding: 20px 18px 18px;
}

.property-meta,
.property-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.property-meta {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.property-card h3 {
  margin: 12px 0 10px;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  color: #000;
}

.property-card p {
  margin: 0;
  color: #000;
}

.hero-copy .home-results-preview .section-heading h3,
.hero-copy .home-results-preview .section-heading p,
.hero-copy .home-results-preview .property-card h3,
.hero-copy .home-results-preview .property-card p,
.hero-copy .home-results-preview .property-card .property-meta,
.hero-copy .home-results-preview .property-card .property-footer,
.hero-copy .home-results-preview .property-card .property-meta span,
.hero-copy .home-results-preview .property-card .property-footer span {
  color: #000 !important;
}

.property-footer {
  margin-top: 18px;
  color: var(--primary);
  font-weight: 700;
}

.property-card {
  position: relative;
}

.property-card .property-body {
  position: relative;
  padding-bottom: 78px;
}

.property-card-actions {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.property-card-action {
  border: none;
  border-radius: 999px;
  padding: 0.52rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.property-card-edit {
  background: rgba(23, 71, 209, 0.12);
  color: var(--primary);
}

.property-card-delete {
  background: rgba(220, 38, 38, 0.12);
  color: #b42318;
}

.text-btn {
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  cursor: pointer;
}

.values-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 38px;
  align-items: center;
}

.values-copy p {
  color: var(--text-soft);
  max-width: 560px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 18px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.check-list li::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(23, 71, 209, 0.08);
  color: var(--primary);
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-cards article {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px 18px;
  box-shadow: 0 12px 26px rgba(11, 18, 36, 0.03);
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(23, 71, 209, 0.12), rgba(23, 71, 209, 0.02));
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 800;
}

.feature-cards h3 {
  margin: 18px 0 8px;
  font-size: 1.2rem;
}

.feature-cards p {
  margin: 0;
  color: var(--text-soft);
}

.neighborhood-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.neighborhood-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
}

.neighborhood-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.neighborhood-info {
  padding: 20px 18px 24px;
}

.neighborhood-info h3 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.neighborhood-info p {
  margin: 0;
  color: var(--text-soft);
}

.agents-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(11, 18, 36, 0.04);
}

.agent-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.agent-card div {
  padding: 18px 18px 22px;
}

.agent-card h3 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.agent-card p {
  margin: 0;
  color: var(--text-soft);
}

.testimonial-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.testimonial-grid blockquote {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 12px 24px rgba(11, 18, 36, 0.04);
  padding: 24px 22px;
  color: var(--text-soft);
  line-height: 1.8;
}

.testimonial-grid footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 18px;
}

.testimonial-grid strong {
  color: var(--text);
}

.cta-section {
  padding: 0 0 110px;
}

.cta-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 42px 38px;
  border-radius: 28px;
  background: linear-gradient(135deg, #0d1f4c, #163d96);
  color: #fff;
  box-shadow: 0 24px 60px rgba(19, 35, 76, 0.2);
}

.cta-content h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.7rem);
  letter-spacing: -0.05em;
}

.auth-modal,
.details-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 17, 33, 0.58);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.auth-modal.show,
.details-modal.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.auth-modal.hidden,
.details-modal.hidden {
  display: none;
}

.auth-card,
.details-card {
  position: relative;
  width: min(460px, 100%);
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-modal.show .auth-card,
.details-modal.show .details-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.auth-card {
  padding: 28px 24px 22px;
}

.edit-house-card {
  width: min(620px, 100%);
}

.details-card {
  width: min(760px, 100%);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.details-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.details-content {
  padding: 28px 26px 24px;
}

.details-content h3 {
  margin: 18px 0 12px;
  font-size: clamp(2rem, 2vw, 2.4rem);
  letter-spacing: -0.05em;
}

.details-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  font-weight: 700;
}

.details-price {
  margin: 18px 0 12px;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.details-details,
.details-highlight {
  margin: 0 0 12px;
  color: var(--text-soft);
  line-height: 1.7;
}

.details-cta {
  width: 100%;
  margin-top: 18px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  border: none;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-soft);
}

.details-close {
  z-index: 2;
  color: var(--text);
  text-shadow: none;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--bg);
  border-radius: 14px;
  padding: 6px;
}

.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-weight: 800;
  color: var(--text-soft);
  cursor: pointer;
}

.auth-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 6px 18px rgba(23, 71, 209, 0.08);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-form h3 {
  margin: 0 0 18px;
  font-size: 1.8rem;
  letter-spacing: -0.05em;
}

.auth-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-field label {
  font-weight: 700;
  color: var(--text-soft);
}

.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  outline: none;
}

.auth-field select,
.auth-field textarea {
  background: #fff;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
  border-color: rgba(23, 71, 209, 0.45);
  box-shadow: 0 0 0 4px rgba(23, 71, 209, 0.08);
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
}

.upload-page-shell {
  padding-top: 80px;
}

.upload-page-wrap {
  max-width: 980px;
}

.upload-card-page {
  margin-bottom: 22px;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
}

.upload-form {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 48px rgba(11, 18, 36, 0.04);
}

.upload-form.hidden,
.upload-card-page.hidden {
  display: none;
}

.upload-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.upload-full {
  grid-column: 1 / -1;
}

.upload-image-field {
  align-items: start;
}

.upload-preview {
  margin-top: 10px;
  width: 100%;
  min-height: 180px;
  border: 1px dashed rgba(16, 24, 40, 0.18);
  border-radius: 20px;
  background: rgba(23, 71, 209, 0.03);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-preview img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.upload-actions {
  margin-top: 24px;
}

.auth-message {
  min-height: 24px;
  margin: 18px 0 0;
  font-weight: 700;
  color: var(--primary-dark);
}

.auth-message.error {
  color: #b42318;
}

.auth-message.success {
  color: #067647;
}

.site-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 18px);
  background: rgba(16, 24, 40, 0.9);
  color: #fff;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  box-shadow: 0 20px 38px rgba(16, 24, 40, 0.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  z-index: 200;
}

.site-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.site-footer {
  background: #0e1220;
  color: rgba(255, 255, 255, 0.7);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

@media (max-width: 1024px) {
  .property-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-cards,
  .testimonial-grid,
  .agents-grid,
  .neighborhood-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-inner,
  .values-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .main-nav,
  .nav-actions {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .site-header.nav-open .nav {
    flex-wrap: wrap;
  }

  .site-header.nav-open .main-nav,
  .site-header.nav-open .nav-actions {
    display: flex;
    position: static;
    width: 100%;
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    animation: mobileMenuRise 0.28s ease forwards;
  }

  .site-header.nav-open .main-nav a,
  .site-header.nav-open .nav-actions .btn {
    opacity: 0;
    transform: translateY(8px);
    animation: mobileMenuItemRise 0.24s ease forwards;
  }

  .site-header.nav-open .nav-actions .btn:nth-child(2) {
    animation-delay: 0.04s;
  }

  .site-header.nav-open .nav-actions .btn:nth-child(3) {
    animation-delay: 0.08s;
  }

  .site-header.nav-open .main-nav {
    order: 3;
    margin-top: 8px;
  }

  .site-header.nav-open .nav-actions {
    order: 4;
    margin-top: 0;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    padding-top: 18px;
    animation-delay: 0.06s;
  }

  @keyframes mobileMenuRise {
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes mobileMenuItemRise {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .search-bar {
    grid-template-columns: 1fr;
  }

  .property-grid,
  .feature-cards,
  .testimonial-grid,
  .agents-grid,
  .neighborhood-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 80px 0;
  }

  .partners-row,
  .cta-content,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    flex-wrap: wrap;
  }

  .listing-highlight img {
    height: 440px;
  }
}

.admin-dashboard-section {
  padding-top: 64px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.admin-toolbar-secondary {
  margin-top: 12px;
}

.admin-dashboard-wrap {
  display: grid;
  gap: 28px;
}

.admin-dashboard-root {
  display: grid;
  gap: 24px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.admin-stat-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 255, 0.96));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px 20px;
  box-shadow: 0 14px 36px rgba(11, 18, 36, 0.04);
}

.admin-stat-card.accent {
  background: linear-gradient(135deg, rgba(23, 71, 209, 0.12), rgba(23, 71, 209, 0.03));
}

.admin-stat-label {
  display: block;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.admin-stat-card strong {
  display: block;
  font-size: clamp(1.8rem, 2vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.admin-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.admin-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 16px 36px rgba(11, 18, 36, 0.04);
  padding: 20px;
}

.admin-panel-header {
  margin-bottom: 14px;
}

.admin-panel-header h3 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

.admin-data-table th,
.admin-data-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(16, 24, 40, 0.08);
}

.admin-data-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.admin-data-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-empty-state {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px 20px;
  box-shadow: 0 16px 36px rgba(11, 18, 36, 0.04);
}

.admin-empty-state h3 {
  margin: 0 0 8px;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

.admin-empty-state p {
  margin: 0;
  color: var(--text-soft);
}

@media (max-width: 840px) {
  .admin-stats-grid,
  .admin-panels {
    grid-template-columns: 1fr;
  }

  .admin-toolbar,
  .admin-toolbar-secondary {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .admin-toolbar .btn,
  .admin-toolbar-secondary .btn,
  .admin-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .admin-dashboard-section {
    padding-top: 36px;
  }

  .admin-panel,
  .admin-stat-card,
  .admin-empty-state {
    padding: 18px 16px;
  }

  .admin-toolbar,
  .admin-toolbar-secondary {
    gap: 10px;
  }
}
