:root {
  --brand-blue:  #243647;
  --brand-green: #8FA99A;

  --gray-900: #1f2933;
  --gray-700: #4b5563;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f5f7fa;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
}

/* =========================================================
   Base CSS – structural foundation (no branding)
   ========================================================= */

/* 1️⃣ Reset / Normalize (lightweight) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}
html, body {
  overflow-x: hidden;
}
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: var(--gray-900);
  background-color: #fff;
}

/* 2️⃣ Typography defaults */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-weight: 600;
  line-height: 1.25;
}

p {
  margin: 0 0 1em;
}

strong {
  font-weight: 600;
}

/* 3️⃣ Links (neutral for now) */
a {
  color: inherit;
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

/* 4️⃣ Layout containers */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

/* 5️⃣ Utility spacing */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* 6️⃣ Buttons (unstyled baseline) */
button {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.hidden { display: none !important; }
/* 7️⃣ Forms (clean baseline) */
input,
select,
textarea {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
}

label {
  display: block;
  font-weight: 500;
}

/* 8️⃣ Horizontal rule */
hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 1rem 0;
}

/* 9️⃣ Badges (structure only) */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* 10️⃣ Search / results structural hooks */
.results-meta {
  margin-bottom: 1rem;
}

.results-summary {
  margin-bottom: 0.25rem;
}

.results-sort-note {
  font-size: 0.9rem;
}

.sort-hint {
  font-size: 0.85rem;
  opacity: 0.85;
}

.property-location,
.property-price,
.property-distance {
  display: block;
}


/* 12️⃣ Load more */
.load-more-wrap {
  margin: 1.5rem 0;
  text-align: center;
}
#toast-container {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  pointer-events: none;
}

.toast {
  background: #222;
  color: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* =========================
   Auth Pages (Login)
   ========================= */

.auth-page {
  max-width: 420px;
  margin: 4rem auto;
  padding: 1.75rem;
}

.auth-page h1 {
  margin-bottom: 1.25rem;
}

.auth-page form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-page label {
  font-size: 0.9rem;
}

.auth-page input[type="email"],
.auth-page input[type="password"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  margin-top: 0.25rem;
}

.auth-page button {
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
}

.auth-page .form-errors {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  font-size: 0.9rem;
}

.auth-page .login-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
}
.auth-page .auth-helper {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
}
.role-admin {
  background: #111827;
  color: #ffffff;
}
.form-helper {
  margin-top: 8px;
  font-size: 0.95rem;
  opacity: 0.85;
}
.form-helper a { text-decoration: underline; }

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  padding-right: 70px;
}

.password-wrapper .toggle-password {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  color: #555;
}

.password-wrapper .toggle-password:hover {
  text-decoration: underline;
}
.show-password-toggle {
  margin-top: 6px;
  font-size: 0.9rem;
}