:root {
  --ink: #15251e;
  --ink-soft: #53625b;
  --paper: #f7f4ed;
  --surface: #ffffff;
  --forest: #174f3a;
  --forest-dark: #10392a;
  --sage: #dce8cf;
  --lime: #c8e56f;
  --line: #d9ddd7;
  --danger: #a63232;
  --warning: #7a5016;
  --warning-bg: #fff3d8;
  --shadow: 0 22px 60px rgb(23 79 58 / 12%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgb(200 229 111 / 16%), transparent 30rem),
    var(--paper);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header,
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 6vw;
  border-bottom: 1px solid var(--line);
  background: rgb(247 244 237 / 88%);
  backdrop-filter: blur(16px);
}

.public-header {
  color: #f7f3ea;
  border-bottom-color: #4d4f4a;
  background: #30312e;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--forest);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.brand-light {
  color: white;
}

.brand-light .brand-mark {
  color: var(--forest-dark);
  background: var(--lime);
}

.wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.wordmark span {
  color: #8f4ad0;
}

.menu-button {
  border: 0;
  color: #b8b8b3;
  background: transparent;
  font-size: 1.1rem;
}

.header-link,
.back-link {
  color: var(--forest);
  font-weight: 700;
  text-decoration: none;
}

.hero,
.search-shell,
.empty-state,
.admin-main {
  width: min(1120px, 88vw);
  margin-inline: auto;
}

.hero {
  padding: 96px 0 64px;
}

.hero h1,
.auth-intro h1,
.admin-main h1,
.empty-state h1 {
  max-width: 780px;
  margin: 8px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 7vw, 5.7rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero > p:last-child,
.auth-intro p,
.empty-state p {
  max-width: 650px;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.7;
}

.eyebrow {
  margin: 0;
  color: var(--forest);
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: var(--lime);
}

.search-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 80px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.public-main {
  min-height: calc(100vh - 76px);
  padding: 32px max(20px, 5vw) 110px;
  color: #f4f1e9;
  background: #30312e;
}

.public-hero {
  max-width: 620px;
  margin: 0 auto 28px;
  text-align: center;
}

.public-hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 7vw, 2.8rem);
  line-height: 1.18;
}

.public-hero p {
  margin: 12px 0 0;
  color: #c7c5bd;
}

.property-search,
.property-results {
  width: min(100%, 780px);
  margin-inline: auto;
}

.property-search {
  padding: 16px;
  border: 1px solid #5b5c57;
  border-radius: 16px;
}

.operation-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0;
  margin: 0 0 16px;
  border: 0;
}

.operation-switch label {
  display: block;
}

.operation-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.operation-switch span {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid #555750;
  border-radius: 10px;
  color: #d0cdc4;
  font-weight: 750;
  cursor: pointer;
}

.operation-switch input:checked + span {
  border-color: #7741ad;
  color: white;
  background: #7741ad;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 8px;
}

.filter-grid label {
  gap: 5px;
  color: #aaa9a2;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #555750;
  border-radius: 9px;
  color: #f5f2e9;
  background: #30312e;
  font: inherit;
  font-size: 1rem;
  text-align: left;
  outline: none;
}

.filter-grid input::placeholder {
  color: #85847f;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: #a06bd2;
  box-shadow: 0 0 0 3px rgb(143 74 208 / 16%);
}

.search-button {
  width: 100%;
  margin-top: 14px;
  border-color: #6a6b65;
  color: white;
  background: transparent;
}

.search-button:hover {
  background: #3a3b37;
}

.property-results {
  margin-top: 50px;
}

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

.results-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.results-heading span {
  color: #b3b1aa;
  font-size: 0.84rem;
}

.property-grid {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.property-card {
  overflow: hidden;
  border: 1px solid #555750;
  border-radius: 14px;
  background: #30312e;
}

.property-card-link {
  color: inherit;
  text-decoration: none;
}

.property-media {
  position: relative;
  display: grid;
  min-height: 210px;
  place-items: center;
  background: #242522;
}

.property-operation,
.honest-badge {
  position: absolute;
  top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
}

.property-operation {
  left: 10px;
  color: #4d246f;
  background: #f0e7fb;
}

.honest-badge {
  right: 10px;
  color: #71440e;
  background: #fff0d8;
}

.property-placeholder {
  display: grid;
  gap: 6px;
  place-items: center;
  color: #9a9992;
}

.property-placeholder span {
  font-size: 2.5rem;
}

.property-card-body {
  padding: 16px;
}

.property-price {
  margin: 0;
  font-size: 1.35rem;
}

.property-price-alt,
.property-location,
.property-facts {
  margin: 5px 0 0;
  color: #c5c3bc;
  font-size: 0.82rem;
}

.property-honest-notes {
  margin: 12px 0 0;
  padding: 10px;
  border-radius: 9px;
  color: #75450c;
  background: #fff0d8;
  font-size: 0.8rem;
  line-height: 1.45;
}

.public-empty-state {
  margin-top: 12px;
  padding: 46px 24px;
  border: 1px dashed #595a55;
  border-radius: 14px;
  color: #b9b7af;
  text-align: center;
}

.public-empty-state > span {
  font-size: 2.2rem;
}

.public-empty-state h3 {
  margin: 12px 0 6px;
  color: #f2efe6;
}

.public-empty-state p {
  max-width: 430px;
  margin: 0 auto;
  font-size: 0.88rem;
  line-height: 1.55;
}

.mobile-nav {
  position: fixed;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 72px;
  border-top: 1px solid #52534f;
  background: rgb(48 49 46 / 96%);
  backdrop-filter: blur(16px);
}

.mobile-nav a {
  display: grid;
  align-content: center;
  gap: 3px;
  color: #aaa9a2;
  font-size: 0.7rem;
  text-align: center;
  text-decoration: none;
}

.mobile-nav a span {
  font-size: 1.35rem;
}

.mobile-nav a.active {
  color: #9d55db;
}

.search-shell h2,
.auth-card h2 {
  margin: 8px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

.muted {
  color: var(--ink-soft);
  line-height: 1.65;
}

.auth-page {
  background: var(--forest-dark);
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
}

.auth-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 48px 7vw 64px;
  color: white;
  background:
    linear-gradient(150deg, rgb(16 57 42 / 86%), rgb(23 79 58 / 98%)),
    radial-gradient(circle at 0% 0%, var(--lime), transparent 24rem);
}

.auth-intro h1 {
  font-size: clamp(3rem, 6vw, 5.4rem);
}

.auth-intro p {
  color: rgb(255 255 255 / 72%);
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 36px;
  background: var(--paper);
}

.auth-card {
  width: min(100%, 460px);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-stack {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #bdc7c0;
  border-radius: 12px;
  color: var(--ink);
  background: white;
  outline: none;
}

input:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgb(23 79 58 / 12%);
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button-primary {
  color: white;
  background: var(--forest);
}

.button-primary:hover:not(:disabled) {
  background: var(--forest-dark);
}

.button-secondary {
  border-color: var(--line);
  color: var(--ink);
  background: white;
}

.notice {
  margin: 18px 0;
  padding: 13px 15px;
  border-radius: 12px;
  color: var(--ink-soft);
  background: #edf1ee;
}

.notice-warning {
  color: var(--warning);
  background: var(--warning-bg);
}

.form-message {
  min-height: 24px;
  margin: 16px 0;
  font-size: 0.9rem;
}

.form-message[data-type="error"] {
  color: var(--danger);
}

.back-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.9rem;
}

.admin-main {
  padding: 72px 0;
}

.admin-main h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 42px;
}

.dashboard-card {
  min-height: 220px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow);
}

.dashboard-card h2 {
  margin: 16px 0 8px;
}

.dashboard-card p {
  color: var(--ink-soft);
  line-height: 1.55;
}

.dashboard-number {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  color: var(--forest);
  background: var(--sage);
  font-size: 1.3rem;
  font-weight: 900;
}

.empty-state {
  padding: 110px 0;
}

.empty-state .button {
  margin-top: 20px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-intro {
    min-height: auto;
    padding: 30px 24px 40px;
  }

  .auth-intro > div {
    margin-top: 70px;
  }

  .auth-panel {
    min-height: auto;
    padding: 24px 18px 50px;
  }

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

  .search-shell,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .site-header,
  .admin-header {
    padding-inline: 18px;
  }
}

@media (min-width: 821px) {
  .public-main {
    padding-top: 60px;
  }

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

  .mobile-nav {
    position: static;
    width: min(100%, 780px);
    margin: 0 auto;
    border: 1px solid #52534f;
    border-radius: 16px 16px 0 0;
  }
}
