/* =====================================================================
   Mutual Home Exchange — Design System
   Palette: blues + purples + greys. Family-friendly, warm, approachable.
   Font: Kanit (Google Fonts) + Font Awesome icons.
   ===================================================================== */

:root {
  /* Brand */
  --blue: #3D8BFF;
  --blue-dark: #2D6FE0;
  --purple: #5B4FE9;
  --purple-dark: #4536C9;
  --violet: #8B5CF6;
  --gradient-brand: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(61,139,255,0.12), rgba(91,79,233,0.12));

  /* Greys / light theme surface */
  --grey-50: #F7F8FC;
  --grey-100: #EEF0F8;
  --grey-200: #E2E4F0;
  --grey-300: #C9CCDE;
  --grey-500: #8A8AAE;
  --grey-700: #5B5B78;
  --grey-900: #2C2C3A;

  --bg: var(--grey-50);
  --surface: #FFFFFF;
  --surface-alt: var(--grey-100);
  --border: var(--grey-200);
  --text: var(--grey-900);
  --text-muted: var(--grey-700);
  --text-faint: var(--grey-500);

  --success: #2FB380;
  --warning: #E8A23D;
  --error: #E5514F;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(45,40,110,0.06);
  --shadow-md: 0 8px 28px rgba(45,40,110,0.10);
  --shadow-lg: 0 18px 48px rgba(45,40,110,0.16);

  --font-display: 'Kanit', sans-serif;
  --font-body: 'Kanit', sans-serif;

  color-scheme: light;

  /* ---- Bootstrap 5.3 theming hooks: make Bootstrap components (modals,
     accordions, dropdowns, form controls, badges, tooltips...) inherit our
     brand instead of Bootstrap's default blue. Bootstrap reads these. ---- */
  --bs-font-sans-serif: 'Kanit', sans-serif;
  --bs-body-font-family: 'Kanit', sans-serif;
  --bs-body-color: var(--grey-900);
  --bs-body-bg: var(--grey-50);
  --bs-primary: #5B4FE9;
  --bs-primary-rgb: 91, 79, 233;
  --bs-secondary: #3D8BFF;
  --bs-secondary-rgb: 61, 139, 255;
  --bs-success: #2FB380;
  --bs-warning: #E8A23D;
  --bs-danger: #E5514F;
  --bs-light: #F7F8FC;
  --bs-dark: #2C2C3A;
  --bs-border-color: var(--grey-200);
  --bs-border-radius: 14px;
  --bs-border-radius-sm: 8px;
  --bs-border-radius-lg: 22px;
  --bs-link-color: #5B4FE9;
  --bs-link-hover-color: #3D8BFF;
}

[data-theme="dark"] {
  --bg: #16162A;
  --surface: #1E1E38;
  --surface-alt: #262647;
  --border: #34345C;
  --text: #F1F1FA;
  --text-muted: #C7C7DE;
  --text-faint: #9494B8;
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.25);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.5);
  color-scheme: dark;

  /* Bootstrap dark-mode hooks follow our custom dark surfaces */
  --bs-body-color: #F1F1FA;
  --bs-body-bg: #16162A;
  --bs-border-color: #34345C;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  transition: background .25s ease, color .25s ease;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--text);
}

a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--blue); }

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

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--purple); color: #fff;
  padding: 10px 16px; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

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

/* =========================== BUTTONS =========================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 12px 24px; border-radius: var(--radius-sm); border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: var(--shadow-md); color: #fff; }
.btn-ghost { background: transparent; color: var(--purple); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--purple); color: var(--purple); }
.btn-outline { background: transparent; border-color: var(--purple); color: var(--purple); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-danger { background: var(--error); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; position: relative; transition: all .2s;
}
.icon-btn:hover { color: var(--purple); border-color: var(--purple); transform: rotate(8deg); }
#themeToggle:hover { transform: rotate(90deg); }
.icon-btn .badge {
  position: absolute; top: -4px; right: -4px; background: var(--error); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 20px; min-width: 16px; text-align:center;
}

/* =========================== HEADER =========================== */
.site-header {
  position: sticky; top: 0; z-index: 100; background: var(--surface);
  border-bottom: 1px solid var(--border); backdrop-filter: blur(8px);
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 20px; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: auto; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--text); }
.brand-accent { color: var(--purple); }

.main-nav { display: flex; align-items: center; gap: 6px; flex: 1; justify-content: center; }
.main-nav a {
  color: var(--text-muted); font-weight: 500; padding: 9px 14px; border-radius: 20px; font-size: 14.5px;
  display: inline-flex; align-items: center; gap: 7px; transition: all .18s;
}
.main-nav a:hover { background: var(--gradient-brand-soft); color: var(--purple); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

.user-menu { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 8px; background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: 30px; padding: 6px 12px 6px 6px; cursor: pointer; font-family: var(--font-body); color: var(--text);
}
.avatar-circle {
  width: 28px; height: 28px; border-radius: 50%; background: var(--gradient-brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.small { font-size: 10px; }
.user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 10px); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  min-width: 190px; overflow: hidden; z-index: 50;
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--text-muted); font-size: 14px;
}
.user-dropdown a:hover { background: var(--surface-alt); color: var(--purple); }

/* =========================== ALERTS =========================== */
.alert {
  margin: 16px auto; padding: 14px 18px; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 10px;
  font-size: 14.5px; font-weight: 500;
}
.alert-success { background: rgba(47,179,128,0.12); color: #1D8A61; }
.alert-error { background: rgba(229,81,79,0.12); color: #C43A38; }
[data-theme="dark"] .alert-success { color: #5FE0B0; }
[data-theme="dark"] .alert-error { color: #FF9694; }

/* =========================== HERO =========================== */
.hero {
  position: relative; overflow: hidden; padding: 78px 24px 100px;
  background: var(--gradient-brand);
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; opacity: .18; background: #fff;
}
.hero::before { width: 340px; height: 340px; top: -140px; right: -80px; }
.hero::after { width: 220px; height: 220px; bottom: -100px; left: 10%; }
.hero-inner { max-width: 1180px; margin: 0 auto; position: relative; z-index: 2; text-align: center; color: #fff; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.18);
  padding: 7px 16px; border-radius: 30px; font-size: 13.5px; font-weight: 600; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(32px, 5vw, 54px); color: #fff; margin-bottom: 16px; }
.hero h1 .highlight { position: relative; }
.hero p.lead { font-size: 18px; color: rgba(255,255,255,0.92); max-width: 620px; margin: 0 auto 34px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .btn-primary { background: #fff; color: var(--purple); }
.hero .btn-ghost { border-color: rgba(255,255,255,0.5); color: #fff; }
.hero .btn-ghost:hover { border-color: #fff; }

.hero-search {
  max-width: 780px; margin: 40px auto 0; background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 18px; display: flex; gap: 10px; flex-wrap: wrap;
}
.hero-search input, .hero-search select {
  flex: 1; min-width: 160px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-family: var(--font-body); font-size: 14.5px; background: var(--surface); color: var(--text);
}

.trust-strip {
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; padding: 34px 24px;
  color: var(--text-muted); font-size: 14px; font-weight: 500;
}
.trust-strip span { display: flex; align-items: center; gap: 8px; }
.trust-strip i { color: var(--purple); }

/* =========================== SECTIONS =========================== */
.section { padding: 70px 24px; }
.section-alt { background: var(--surface-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section-head .eyebrow {
  color: var(--purple); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 12.5px;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin-top: 8px; }

.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px 26px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 54px; height: 54px; border-radius: 16px; background: var(--gradient-brand-soft); color: var(--purple);
  display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 18px;
}
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; margin: 0; }

.step-row { display: flex; gap: 26px; counter-reset: step; }
.step {
  flex: 1; background: var(--surface); border-radius: var(--radius-lg); padding: 28px 22px; position: relative;
  border: 1px solid var(--border);
}
.step-num {
  width: 40px; height: 40px; border-radius: 50%; background: var(--gradient-brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 16px;
}

/* =========================== CARDS: PROPERTY LISTING =========================== */
.listing-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; position: relative;
}
.listing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.listing-thumb { position: relative; aspect-ratio: 4/3; background: var(--surface-alt); overflow: hidden; }
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-thumb .no-photo { display:flex; align-items:center; justify-content:center; height:100%; color: var(--text-faint); font-size: 34px; }
.listing-badge {
  position: absolute; top: 12px; left: 12px; background: var(--surface); color: var(--purple); font-size: 12px;
  font-weight: 700; padding: 5px 12px; border-radius: 20px; box-shadow: var(--shadow-sm); display:flex; align-items:center; gap:6px;
}
.listing-badge.match { background: var(--gradient-brand); color: #fff; }
.listing-fav {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center; color: var(--purple);
}
.listing-body { padding: 18px; }
.listing-body h3 { font-size: 17px; margin-bottom: 4px; }
.listing-loc { color: var(--text-faint); font-size: 13.5px; display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.listing-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.meta-pill {
  display: flex; align-items: center; gap: 6px; background: var(--surface-alt); color: var(--text-muted);
  font-size: 12.5px; font-weight: 500; padding: 6px 10px; border-radius: 20px;
}
.meta-pill i { color: var(--purple); }
.listing-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 14px; }
.listing-rent { font-weight: 700; color: var(--text); font-size: 15px; }
.listing-rent span { font-weight: 400; font-size: 12.5px; color: var(--text-faint); }

/* Swap preference icon chip */
.swap-chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  padding: 6px 12px; border-radius: 20px; background: var(--gradient-brand-soft); color: var(--purple);
}

/* =========================== FORMS =========================== */
.form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px;
  box-shadow: var(--shadow-sm); max-width: 620px; margin: 50px auto;
}
.form-card.wide { max-width: 920px; }
.form-header { text-align: center; margin-bottom: 30px; }
.form-header .form-logo { width: 56px; margin: 0 auto 14px; }
.form-row { margin-bottom: 20px; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 7px; color: var(--text); }
label .hint { font-weight: 400; color: var(--text-faint); font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel],
input[type=search], input[type=date], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 14.5px; background: var(--surface); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(91,79,233,0.15);
}
textarea { resize: vertical; min-height: 110px; }
.form-foot { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }

.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: auto; }

.toggle-group { display: flex; gap: 10px; flex-wrap: wrap; }
.toggle-option {
  flex: 1; min-width: 120px; border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 14px;
  cursor: pointer; text-align: center; transition: all .18s; position: relative;
}
.toggle-option input { position: absolute; opacity: 0; }
.toggle-option i { font-size: 20px; color: var(--purple); display: block; margin-bottom: 8px; }
.toggle-option span { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.toggle-option:has(input:checked) { border-color: var(--purple); background: var(--gradient-brand-soft); }
.toggle-option:has(input:checked) span { color: var(--purple); }

.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-md); padding: 34px; text-align: center;
  color: var(--text-faint); cursor: pointer; transition: all .2s;
}
.upload-zone:hover { border-color: var(--purple); color: var(--purple); }
.upload-zone i { font-size: 30px; margin-bottom: 10px; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(90px,1fr)); gap: 10px; margin-top: 14px; }
.preview-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

/* =========================== DASHBOARD =========================== */
.dash-layout { display: grid; grid-template-columns: 260px 1fr; gap: 30px; max-width: 1280px; margin: 30px auto; padding: 0 24px; }
.dash-sidebar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px;
  height: fit-content; position: sticky; top: 90px;
}
.dash-sidebar a {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 500; font-size: 14.5px; margin-bottom: 4px;
}
.dash-sidebar a:hover, .dash-sidebar a.active { background: var(--gradient-brand-soft); color: var(--purple); }
.dash-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-bottom: 30px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; }
.stat-card .stat-num { font-size: 26px; font-weight: 700; font-family: var(--font-display); }
.stat-card .stat-label { color: var(--text-faint); font-size: 13px; }
.stat-card i { color: var(--purple); float: right; font-size: 20px; }

.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 18px; font-size: 14px; border-bottom: 1px solid var(--border); }
th { color: var(--text-faint); font-weight: 600; text-transform: uppercase; font-size: 11.5px; letter-spacing: .04em; background: var(--surface-alt); }
tr:last-child td { border-bottom: none; }
.status-pill { padding: 4px 11px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.status-active { background: rgba(47,179,128,0.14); color: #1D8A61; }
.status-draft { background: var(--grey-200); color: var(--text-muted); }
.status-matched { background: var(--gradient-brand-soft); color: var(--purple); }
.status-pending { background: rgba(232,162,61,0.15); color: #B67A1E; }

/* =========================== MAP / SEARCH =========================== */
.search-layout { display: grid; grid-template-columns: 420px 1fr; height: calc(100vh - 71px); }
.search-filters { overflow-y: auto; padding: 24px; border-right: 1px solid var(--border); background: var(--surface); }
#map { height: 100%; width: 100%; }
.search-results-list { overflow-y: auto; padding: 18px; display: none; }
.filter-group { margin-bottom: 22px; }
.filter-group h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin-bottom: 12px; }
.range-display { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }

/* =========================== MESSAGING =========================== */
.messages-layout { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 71px); }
.convo-list { border-right: 1px solid var(--border); overflow-y: auto; background: var(--surface); }
.convo-item { display: flex; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); cursor: pointer; }
.convo-item:hover, .convo-item.active { background: var(--surface-alt); }
.convo-item .name { font-weight: 600; font-size: 14.5px; }
.convo-item .preview { font-size: 13px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-panel { display: flex; flex-direction: column; background: var(--bg); }
.chat-header { padding: 16px 24px; border-bottom: 1px solid var(--border); background: var(--surface); display:flex; align-items:center; gap: 12px; }
.chat-thread { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 60%; padding: 12px 16px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; }
.bubble.mine { align-self: flex-end; background: var(--gradient-brand); color: #fff; border-bottom-right-radius: 4px; }
.bubble.theirs { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble .time { display:block; font-size: 10.5px; opacity: .7; margin-top: 4px; }
.chat-input { display: flex; gap: 10px; padding: 16px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-input textarea { flex: 1; min-height: 46px; max-height: 120px; }

/* =========================== NOTIFICATIONS =========================== */
.notif-item { display: flex; gap: 14px; padding: 18px; border-bottom: 1px solid var(--border); }
.notif-item.unread { background: var(--gradient-brand-soft); }
.notif-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-alt); color: var(--purple); display:flex; align-items:center; justify-content:center; flex-shrink:0; }

/* =========================== PROPERTY DETAIL =========================== */
.property-gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; border-radius: var(--radius-lg); overflow: hidden; height: 420px; }
.property-gallery img { width: 100%; height: 100%; object-fit: cover; }
.property-gallery .side { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; }
.property-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 34px; margin-top: 30px; }
.spec-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 24px 0; }
.spec-box { background: var(--surface-alt); border-radius: var(--radius-sm); padding: 16px; text-align: center; }
.spec-box i { color: var(--purple); font-size: 20px; margin-bottom: 8px; display:block; }
.spec-box .val { font-weight: 700; }
.spec-box .lbl { font-size: 12px; color: var(--text-faint); }
.sticky-card { position: sticky; top: 90px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.match-score-ring { display:flex; align-items:center; gap: 14px; margin-bottom: 20px; }
.ring { width: 62px; height: 62px; border-radius: 50%; background: conic-gradient(var(--purple) calc(var(--pct,0)*1%), var(--surface-alt) 0); display:flex; align-items:center; justify-content:center; position:relative; }
.ring::before { content:''; position:absolute; inset:6px; background: var(--surface); border-radius:50%; }
.ring span { position:relative; font-weight:700; font-size:13px; }

/* =========================== PRICING =========================== */
.pricing-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px 28px; text-align: center; position: relative; }
.pricing-card.featured { border-color: var(--purple); box-shadow: var(--shadow-md); transform: scale(1.03); }
.pricing-card .price { font-size: 40px; font-weight: 700; font-family: var(--font-display); margin: 14px 0; }
.pricing-card .price span { font-size: 15px; font-weight: 400; color: var(--text-faint); }
.pricing-card ul { list-style: none; padding: 0; margin: 22px 0; text-align: left; }
.pricing-card li { display: flex; gap: 10px; margin-bottom: 12px; color: var(--text-muted); font-size: 14.5px; }
.pricing-card li i { color: var(--success); margin-top: 3px; }
.ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--gradient-brand); color: #fff; padding: 5px 16px; border-radius: 20px; font-size: 12px; font-weight: 700; }

/* =========================== FOOTER =========================== */
.site-footer { background: var(--surface-alt); border-top: 1px solid var(--border); margin-top: 60px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 54px 24px 30px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer-brand .brand-logo { width: 42px; margin-bottom: 12px; }
.footer-tagline { font-size: 14px; max-width: 260px; }
.footer-social { display: flex; gap: 12px; margin-top: 14px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-muted); font-size: 14px; margin-bottom: 10px; }
.footer-bottom { text-align: center; padding: 20px; font-size: 12.5px; color: var(--text-faint); border-top: 1px solid var(--border); }

/* =========================== ADMIN =========================== */
.admin-topbar { background: var(--gradient-brand); color: #fff; padding: 10px 24px; font-size: 13px; text-align: center; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: var(--grey-300); border-radius: 30px; transition: .3s; }
.slider::before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .3s; }
.switch input:checked + .slider { background: var(--gradient-brand); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* =========================== UTILITIES =========================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 8px; } .gap-3 { gap: 14px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-faint); }
.empty-state i { font-size: 44px; margin-bottom: 16px; color: var(--grey-300); }

/* =========================== ADS =========================== */
.ad-slot {
  margin: 24px auto;
  max-width: 100%;
  text-align: center;
  overflow: hidden;
}
.ad-slot::before {
  content: 'Advertisement';
  display: block;
  font-size: 10.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.ad-slot-top_banner { margin-top: 0; padding: 12px 24px 0; }
.ad-slot-footer_banner { padding: 0 24px; }
.ad-slot-sidebar_banner { margin: 20px 0 0; }
.ad-slot-in_article_banner { margin: 32px auto; }

.ad-slot-locked::before { content: none; } /* the wall message below already explains itself */
.ad-consent-wall {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-faint);
  padding: 14px 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}
.ad-consent-wall i { color: var(--purple); }
.ad-consent-wall a { font-weight: 600; }

/* =========================== COOKIE CONSENT =========================== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 300;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 16px 24px;
}
.cookie-banner-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-banner p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  flex: 1;
  min-width: 240px;
}
.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* =========================== RESPONSIVE =========================== */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .dash-layout, .search-layout, .messages-layout, .property-layout { grid-template-columns: 1fr; }
  .search-layout { height: auto; }
  #map { height: 60vh; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .step-row { flex-direction: column; }
}
@media (max-width: 600px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .property-gallery { grid-template-columns: 1fr; height: auto; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .btn { flex: 1; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Visible focus ring for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 2px;
}
