
:root {
  /* Light colour palette for a brighter theme */
  --bg: #f9fafb;
  --bg-elevated: #ffffff;
  --card: #ffffff;
  --border: #e5e7eb;
  --accent: #007acc;
  --text: #1f2937;
  --text-muted: #6b7280;
  --radius: 0.9rem;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Remove dark radial gradient and use the base background colour. */
  background: var(--bg);
  color: var(--text);
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* HEADER */

.site-header {
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
  /* Light header gradient to blend with pale backgrounds */
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.logo a {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.1rem;
}

.logo span {
  color: var(--accent);
}

.main-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.9rem;
}

.main-nav a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--text-muted);
}

.main-nav a:hover {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text);
}

/* Header search bar */
.header-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.header-search input[type="text"] {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.7);
  background: var(--card);
  min-width: 180px;
  font-size: 0.85rem;
}

/* BUTTONS */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--accent);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  border-color: rgba(209, 213, 219, 0.7);
  color: var(--accent);
}

.btn:hover {
  filter: brightness(1.1);
}

.btn-full {
  width: 100%;
}

/* Back link styling */
.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--accent);
}
.back-link:hover {
  text-decoration: underline;
}

/* LAYOUT */

.page-main {
  padding-bottom: 3.5rem;
}

.hero-section {
  padding: 3rem 0 2.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr);
  gap: 2.5rem;
  align-items: center;
}

/* HERO */

.hero-copy h1 {
  font-size: 2.5rem;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hero-highlights span {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(240, 249, 255, 0.95);
}

.card {
  border-radius: 1.1rem;
  border: 1px solid rgba(229, 231, 235, 0.8);
  /* Lighten cards by applying subtle blue overlays on white */
  background:
    radial-gradient(circle at top left, rgba(0, 122, 204, 0.05), transparent 55%),
    radial-gradient(circle at bottom right, rgba(0, 122, 204, 0.03), transparent 55%),
    #ffffff;
  padding: 1.4rem 1.3rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.05);
}

.hero-panel h2 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.hero-search {
  display: flex;
  gap: 0.6rem;
  margin: 1rem 0 1.25rem;
}

.hero-search input {
  flex: 1;
  padding: 0.65rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.7);
  background: var(--card);
  color: var(--text);
  font-size: 0.9rem;
}

.hero-stats {
  display: grid;
  gap: 0.85rem;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.stat-label {
  color: var(--text-muted);
}

.stat-value {
  font-weight: 500;
}

/* FEATURES */

.features-section {
  padding: 2.5rem 0 1rem;
}

.section-header {
  margin-bottom: 1.6rem;
}

.section-header h2 {
  font-size: 1.4rem;
}

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

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* AUTH */

.auth-section {
  padding: 3rem 0;
}

.auth-container {
  max-width: 420px;
  margin: 0 auto;
}

.auth-card h1 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.auth-card .subtitle {
  margin-bottom: 1.4rem;
}

/* FORMS */

.form-group {
  margin-bottom: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(209, 213, 219, 0.7);
  background: var(--card);
  color: var(--text);
  font-size: 0.9rem;
}

textarea {
  resize: vertical;
}

.auth-switch {
  font-size: 0.85rem;
  margin-top: 0.7rem;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--accent);
}

/* ALERTS */

.alert {
  border-radius: 0.75rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.alert-success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.5);
}

/* LISTINGS */

.listings-section {
  padding: 2.5rem 0;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-form {
  display: flex;
  gap: 0.6rem;
}

.search-form input {
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.7);
  background: var(--card);
  color: var(--text);
  font-size: 0.9rem;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

/* Generic info grid used on the property detail page */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.info-item {
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.info-key {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.info-value {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.listing-card {
  border-radius: 1rem;
  border: 1px solid rgba(229, 231, 235, 0.8);
  background: var(--card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.listing-thumb {
  height: 140px;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.4), transparent 55%),
              radial-gradient(circle at bottom, rgba(59, 130, 246, 0.3), transparent 55%);
  position: relative;
}

.listing-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid rgba(209, 213, 219, 0.8);
}

.listing-body {
  padding: 0.9rem 0.95rem 0.85rem;
}

.listing-title {
  font-size: 0.98rem;
  margin: 0 0 0.2rem;
}

.listing-address {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.listing-meta {
  display: flex;
  gap: 0.7rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.listing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.listing-price {
  font-weight: 600;
}

/* DETAIL */

.listing-detail-section {
  padding: 2.5rem 0;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-address {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.detail-price-block {
  text-align: right;
}

.detail-price {
  font-size: 1.4rem;
  margin: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
  gap: 1.1rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.key-facts {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.86rem;
}

.key-facts li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.key-facts span {
  color: var(--text-muted);
}

/* DASHBOARD */

.dashboard-section {
  padding: 2.5rem 0;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.stat-card .label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-card .value {
  font-size: 1.2rem;
  margin-top: 0.25rem;
}

.simple-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.simple-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(30, 64, 175, 0.3);
}

.item-title {
  font-size: 0.92rem;
}

.item-meta {
  text-align: right;
  font-size: 0.82rem;
}

/* BADGES */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.status-active {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.6);
}

.status-pending {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.7);
}

.status-under_contract {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.7);
}

.status-sold {
  background: rgba(148, 163, 184, 0.18);
}

/* FORMS LAYOUT */

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
  gap: 1rem;
}

.form-section h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.help {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* FOOTER */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 1.3rem 0 1.5rem;
  margin-top: 2.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* UTILITIES */

.muted {
  color: var(--text-muted);
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    order: -1;
  }

  .feature-grid,
  .form-grid,
  .detail-grid,
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-inner,
  .hero-actions,
  .footer-inner,
  .page-header,
  .dashboard-header,
  .detail-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav {
    flex-wrap: wrap;
  }
}

/* Additional Info Grid for property detail */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.7rem;
    margin-top: 0.4rem;
}
.info-item {
    border-radius: 0.8rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid rgba(148,163,184,0.35);
    background:
        radial-gradient(circle at top left, rgba(56,189,248,0.10), transparent 55%),
        rgba(15,23,42,0.9);
    font-size: 0.82rem;
}
.info-key {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}
.info-value {
    font-size: 0.86rem;
    color: var(--text);
    word-break: break-word;
}
.info-value-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid rgba(148,163,184,0.5);
}
.info-value-badge.yes {
    background: rgba(34,197,94,0.18);
    border-color: rgba(34,197,94,0.6);
}
.info-value-badge.no {
    background: rgba(239,68,68,0.18);
    border-color: rgba(239,68,68,0.6);
}
.info-value-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.info-chip {
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.4);
}

/* Header search bar */
.header-search {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    align-items: center;
    margin-left: 1rem;
}
.header-search input[type="text"] {
    flex: 1;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(209,213,219,0.7);
    background: var(--card);
    color: var(--text);
    font-size: 0.85rem;
}
.header-search button {
    white-space: nowrap;
}

