/* ============================================================
   BuyRent.com.cy — Visual Template (Phase 1, for approval)
   Serious, enterprise, data-dense real estate UI.
   Neutral ink + greys + white, ONE calm accent. No gradients,
   no glossy buttons, no rainbow badges.
   ============================================================ */

:root{
  /* Ink + grey scale */
  --ink:        #0f172a;   /* near-black text */
  --ink-2:      #334155;   /* secondary text */
  --muted:      #64748b;   /* tertiary text */
  --faint:      #94a3b8;   /* placeholder / icons */
  --line:       #e2e8f0;   /* borders */
  --line-2:     #eef2f6;   /* subtle dividers */
  --surface:    #ffffff;
  --surface-2:  #f8fafc;
  --surface-3:  #f1f5f9;

  /* ONE calm accent (cyan-teal) — used sparingly */
  --accent:     #06a5b5;
  --accent-700: #058393;
  --accent-50:  #e6f7f9;
  --accent-100: #c5edf2;

  /* Status colours = meaning only — exactly one hue per meaning */
  --sale:       #06a5b5;   /* FOR SALE = brand teal (primary transaction + interactive) */
  --sale-bg:    #e6f7f9;
  --rent:       #2f4d8a;   /* FOR RENT = indigo, deliberately distinct from sale         */
  --rent-bg:    #eaeefb;
  --verified:   #15803d;   /* VERIFIED / trust = green                                   */
  --alert:      #b45309;   /* ATTENTION = amber (price reduced, saved-search alerts)      */
  --alert-50:   #fef3e7;
  --alert-100:  #fbdcb8;
  --save:       #e11d48;   /* SAVED / favourite = rose (a positive act, NOT destructive)  */
  --danger:     #b91c1c;   /* DESTRUCTIVE only = red (delete / log out / errors)          */
  --orange:     #f5821f;   /* CURRENT SELECTION = orange (active map pin only)            */
  --orange-700: #dd6f10;

  --radius:     8px;
  --radius-sm:  6px;
  --shadow:     0 1px 2px rgba(15,23,42,.06), 0 4px 14px rgba(15,23,42,.06);
  --shadow-lg:  0 10px 40px rgba(15,23,42,.18);

  --header-h:   66px;
  --toolbar-h:  70px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; height:100%; }
body{
  font-family:var(--font);
  color:var(--ink);
  background:var(--surface-2);
  font-size:14px;
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow:hidden;            /* app shell scrolls internally */
}
button{ font-family:inherit; cursor:pointer; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
.tnum{ font-variant-numeric:tabular-nums; }
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; border-radius:4px; }

/* ---------- Icons ---------- */
.ic{ width:16px; height:16px; stroke:currentColor; stroke-width:1.8; fill:none; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.ic-sm{ width:14px; height:14px; }

/* ============================================================
   App shell
   ============================================================ */
.app{ display:flex; flex-direction:column; height:100dvh; }

/* ---------- Header ---------- */
header.topbar{
  height:var(--header-h);
  flex:none;
  display:flex; align-items:center; gap:18px;
  padding:0 18px;
  background:var(--surface);
  border-bottom:1px solid var(--line);
  position:relative; z-index:60;
}
.brand{ display:flex; align-items:baseline; gap:1px; font-weight:800; font-size:18px; letter-spacing:-.02em; white-space:nowrap; }
.brand .b1{ color:var(--ink); }
.brand .b2{ color:var(--accent); }
.brand .tld{ color:var(--faint); font-weight:600; font-size:12px; margin-left:2px; }

/* sale / rent segmented switch */
.seg{ display:inline-flex; background:var(--surface-3); border:1px solid var(--line); border-radius:5px; padding:3px; gap:2px; }
.seg button{
  border:0; background:transparent; color:var(--ink-2);
  font-weight:600; font-size:13px; padding:6px 14px; border-radius:3px; white-space:nowrap;
}
.seg button[aria-pressed="true"]{ background:var(--surface); color:var(--ink); box-shadow:0 1px 2px rgba(15,23,42,.10); }

/* header search */
.head-search{ flex:1; display:flex; align-items:center; gap:8px; max-width:720px; }
.field{
  display:flex; align-items:center; gap:8px;
  background:var(--surface); border:1px solid var(--line); border-radius:4px;
  padding:0 10px; height:40px; color:var(--muted);
}
.field:focus-within{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-50); }
.field input{ border:0; outline:0; background:transparent; font-size:13.5px; color:var(--ink); width:100%; }
.field input::placeholder{ color:var(--faint); }
.field.loc{ flex:none; width:210px; }
.field.ai{ flex:1; }
.field.ai .spark{ color:var(--accent); }
.ai-badge{ font-size:10px; font-weight:700; color:var(--accent); background:var(--accent-50); border:1px solid var(--accent-100); padding:2px 6px; border-radius:5px; letter-spacing:.02em; white-space:nowrap; }

/* header right */
.head-right{ display:flex; align-items:center; gap:6px; margin-left:auto; }
.iconbtn{
  display:inline-flex; align-items:center; gap:7px;
  height:38px; padding:0 11px; border-radius:4px;
  border:1px solid transparent; background:transparent; color:var(--ink-2);
  font-weight:600; font-size:13px; white-space:nowrap;
}
.iconbtn:hover{ background:var(--surface-3); }
.iconbtn .count{ font-size:11px; font-weight:700; background:var(--ink); color:#fff; border-radius:10px; padding:1px 6px; min-width:18px; text-align:center; }
.btn-primary{
  height:38px; padding:0 15px; border-radius:4px; border:1px solid var(--accent-700);
  background:var(--accent); color:#fff; font-weight:600; font-size:13px; white-space:nowrap;
}
.btn-primary:hover{ background:var(--accent-700); }
.btn-ghost{
  height:38px; padding:0 13px; border-radius:4px; border:1px solid var(--line);
  background:var(--surface); color:var(--ink); font-weight:600; font-size:13px; white-space:nowrap;
}
.btn-ghost:hover{ background:var(--surface-3); }

.lang{ display:inline-flex; border:1px solid var(--line); border-radius:4px; overflow:hidden; }
.lang button{ border:0; background:var(--surface); color:var(--muted); font-weight:700; font-size:12px; padding:8px 9px; }
.lang button[aria-pressed="true"]{ background:var(--ink); color:#fff; }

.hamb{ display:none; }
.search-toggle{ display:none; }

/* account icon (logged-out) */
.acct-btn{ width:40px; height:40px; border-radius:50%; border:1px solid var(--line); background:var(--surface); color:var(--ink-2); display:inline-flex; align-items:center; justify-content:center; flex:none; }
.acct-btn:hover{ background:var(--surface-3); color:var(--ink); border-color:#cbd5e1; }

/* profile (logged-in) */
.profile{ position:relative; }
.avatar-btn{ display:inline-flex; align-items:center; gap:5px; height:40px; padding:3px 6px 3px 3px; border:1px solid var(--line); border-radius:22px; background:var(--surface); }
.avatar-btn:hover{ background:var(--surface-3); }
.avatar{ width:32px; height:32px; border-radius:50%; background:var(--ink); color:#fff; font-weight:700; font-size:13px; display:inline-flex; align-items:center; justify-content:center; flex:none; }
.avatar.lg{ width:42px; height:42px; font-size:16px; }
.avatar-btn .chev{ color:var(--muted); }
.profile-menu{ position:absolute; top:48px; right:0; width:260px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow-lg); padding:6px; display:none; z-index:1500; }
.profile-menu.show{ display:block; }
.pm-head{ display:flex; align-items:center; gap:10px; padding:8px 8px 12px; border-bottom:1px solid var(--line-2); margin-bottom:6px; }
.pm-id{ min-width:0; }
.pm-name{ font-weight:700; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pm-sub{ font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pm-item{ width:100%; display:flex; align-items:center; gap:10px; padding:9px 10px; border:0; background:transparent; border-radius:8px; font-size:13.5px; font-weight:600; color:var(--ink-2); text-align:left; }
.pm-item:hover{ background:var(--surface-3); color:var(--ink); }
.pm-item .ic{ color:var(--muted); width:18px; height:18px; }
.pm-item .count{ margin-left:auto; font-size:11px; font-weight:700; background:var(--ink); color:#fff; border-radius:10px; padding:1px 6px; }
.pm-item.danger{ color:var(--danger); } .pm-item.danger .ic{ color:var(--danger); }
.pm-item.danger:hover{ background:#fef2f2; }
.pm-div{ height:1px; background:var(--line-2); margin:6px 4px; }
.pm-lang{ display:flex; align-items:center; justify-content:space-between; padding:6px 10px; font-size:13px; font-weight:600; color:var(--ink-2); }

/* quick-filter popover */
.pop-backdrop{ position:fixed; inset:0; z-index:1490; display:none; }
.pop-backdrop.show{ display:block; }
.popover{ position:fixed; z-index:1500; width:320px; max-width:calc(100vw - 24px); background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow-lg); display:none; flex-direction:column; max-height:70vh; }
.popover.show{ display:flex; }
.pop-body{ padding:14px; overflow-y:auto; }
.pop-body .flabel{ font-size:12px; font-weight:700; color:var(--muted); margin-bottom:8px; display:block; }
.pop-foot{ display:flex; align-items:center; gap:10px; padding:10px 12px; border-top:1px solid var(--line); }
.pop-foot .clear{ background:transparent; border:0; color:var(--muted); font-weight:600; font-size:13px; }
.pop-foot .clear:hover{ color:var(--ink); text-decoration:underline; }
.pop-foot .btn-primary{ margin-left:auto; height:38px; padding:0 16px; }
.preset-row{ display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.preset-row button{ border:1px solid var(--line); background:var(--surface); border-radius:7px; padding:6px 10px; font-size:12.5px; font-weight:600; color:var(--ink-2); }
.preset-row button:hover{ border-color:var(--accent); color:var(--accent-700); }
.chip-label{ pointer-events:none; }
.chip .chev{ color:var(--muted); }

/* ---------- Toolbar ---------- */
.toolbar{
  height:var(--toolbar-h); flex:none;
  display:flex; align-items:center; gap:8px;
  padding:0 18px; background:var(--surface);
  border-bottom:1px solid var(--line); position:relative; z-index:50;
  overflow-x:auto; scrollbar-width:none;
}
.toolbar::-webkit-scrollbar{ display:none; }
.chip{
  display:inline-flex; align-items:center; gap:8px; height:40px; padding:0 14px;
  border:1px solid var(--line); border-radius:4px; background:var(--surface);
  color:var(--ink); font-weight:600; font-size:13.5px; white-space:nowrap;
}
.chip:hover{ border-color:#cbd5e1; background:var(--surface-2); }
.chip.active{ border-color:var(--accent); color:var(--accent-700); background:var(--accent-50); }
.chip .chev{ color:var(--muted); width:15px; height:15px; }
.chip.active .chev{ color:var(--accent); }
.chip.more .sliders{ color:var(--accent); width:18px; height:18px; }
.chip.more .more-count{ display:none; align-items:center; justify-content:center; height:18px; min-width:18px; padding:0 5px; border-radius:9px; background:var(--accent); color:#fff; font-size:11px; font-weight:700; }
.chip.more.has .more-count{ display:inline-flex; }
.chip.more.has{ border-color:var(--accent); color:var(--accent-700); background:var(--accent-50); }
.tool-div{ width:1px; height:26px; background:var(--line); flex:none; margin:0 4px; }

.tool-spacer{ flex:1; }
.count-pill{ display:flex; align-items:baseline; gap:5px; font-size:13px; color:var(--muted); white-space:nowrap; }
.count-pill b{ color:var(--ink); font-weight:700; font-size:14px; }

.sortwrap{ position:relative; }
.sortwrap select{
  -webkit-appearance:none; appearance:none;
  height:40px; padding:0 32px 0 14px; border:1px solid var(--line); border-radius:4px;
  background:var(--surface); color:var(--ink); font-weight:600; font-size:13.5px; cursor:pointer;
}
.sortwrap svg{ position:absolute; right:10px; top:50%; transform:translateY(-50%); pointer-events:none; color:var(--muted); }

/* view switch (icon + label, aligned with filters) */
.viewseg{ display:inline-flex; border:1px solid var(--line); border-radius:4px; overflow:hidden; flex:none; height:40px; }
.viewseg button{ border:0; background:var(--surface); color:var(--ink-2); height:100%; padding:0 14px; display:inline-flex; align-items:center; gap:7px; font-weight:600; font-size:13.5px; border-right:1px solid var(--line); white-space:nowrap; }
.viewseg button:last-child{ border-right:0; }
.viewseg button .ic{ color:var(--muted); }
.viewseg button:hover{ background:var(--surface-2); }
.viewseg button[aria-pressed="true"]{ background:var(--ink); color:#fff; }
.viewseg button[aria-pressed="true"] .ic{ color:#fff; }

/* outlined CTA + aligned header controls */
.btn-outline{ height:40px; padding:0 18px; border-radius:4px; border:1.5px solid var(--accent); background:var(--surface); color:var(--accent-700); font-weight:700; font-size:14px; white-space:nowrap; display:inline-flex; align-items:center; justify-content:center; }
.btn-outline:hover{ background:var(--accent-50); }
.cta-ic{ display:none; }
.head-right .iconbtn{ height:40px; }
.head-right .lang{ height:40px; }
.head-right .lang button{ display:inline-flex; align-items:center; }
.acct-btn,.avatar-btn{ height:40px; }

/* breadcrumb (inside the scrollable results content) */
.breadcrumb{ display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:0 0 12px; font-size:12.5px; color:var(--muted); }
.breadcrumb a{ color:var(--muted); }
.breadcrumb a:hover{ color:var(--accent-700); text-decoration:underline; }
.breadcrumb .sep{ color:var(--faint); }
.breadcrumb .cur{ color:var(--ink); font-weight:600; }

/* map auto-refresh toggle */
.map-auto{ position:absolute; top:14px; right:14px; z-index:500; display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 12px; background:var(--surface); border:1px solid var(--line); border-radius:8px; box-shadow:var(--shadow); font-size:12.5px; font-weight:600; color:var(--ink-2); cursor:pointer; }
.map-auto input{ accent-color:var(--accent); width:15px; height:15px; }

/* ---------- Workspace (results + map) ---------- */
.workspace{ flex:1; min-height:0; display:flex; position:relative; }

.results{
  flex:1; min-width:0; overflow-y:auto; background:var(--surface-2);
  padding:16px 18px 40px;
}
.results-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 14px; flex-wrap:wrap; }
.results-head h1{ font-size:17px; font-weight:700; margin:0; letter-spacing:-.01em; }
.rh-right{ display:flex; align-items:center; gap:10px; flex:none; }
.rh-right .sortwrap select{ height:36px; padding:0 30px 0 12px; font-size:13px; }

/* save search + alerts */
.save-search{ display:inline-flex; align-items:center; gap:7px; height:36px; padding:0 12px; border:1px solid var(--line); border-radius:4px; background:var(--surface); color:var(--ink-2); font-weight:600; font-size:13px; white-space:nowrap; }
.save-search:hover{ border-color:#cbd5e1; background:var(--surface-2); color:var(--ink); }
.save-search .ic{ color:var(--muted); }
.save-search.on{ border-color:var(--accent); background:var(--accent-50); color:var(--accent-700); }
.save-search.on .ic{ color:var(--accent-700); fill:var(--accent-50); }

/* toast */
.toast{ position:fixed; left:50%; bottom:26px; transform:translateX(-50%) translateY(12px); background:var(--ink); color:#fff; padding:11px 16px; border-radius:10px; box-shadow:var(--shadow-lg); font-size:13px; font-weight:600; display:inline-flex; align-items:center; gap:9px; opacity:0; visibility:hidden; transition:opacity .2s ease, transform .2s ease; z-index:3000; max-width:calc(100vw - 32px); }
.toast.show{ opacity:1; visibility:visible; transform:translateX(-50%) translateY(0); }
.toast .ic{ color:var(--accent); flex:none; }

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

.mappane{
  flex:none; width:46%; max-width:760px; min-width:380px;
  position:relative; border-left:1px solid var(--line); background:#e8edf1;
  z-index:0;   /* contain Leaflet's internal z-indexes so the map stays BEHIND overlays */
}
#map{ position:absolute; inset:0; z-index:0; }

/* view modes */
.workspace[data-view="list"] .mappane{ display:none; }
.workspace[data-view="list"] .grid{ grid-template-columns:repeat(auto-fill, minmax(270px,1fr)); }
.workspace[data-view="map"] .results{ display:none; }
.workspace[data-view="map"] .mappane{ width:100%; max-width:none; border-left:0; }
.workspace[data-view="split"] .grid{ grid-template-columns:repeat(auto-fill, minmax(260px,1fr)); }

/* map controls */
.map-search-area{
  position:absolute; top:14px; left:50%; transform:translateX(-50%); z-index:500;
  display:none; align-items:center; gap:8px; height:38px; padding:0 14px;
  background:var(--surface); border:1px solid var(--line); border-radius:20px; box-shadow:var(--shadow);
  font-weight:600; font-size:13px; color:var(--ink);
}
.map-search-area.show{ display:inline-flex; }
.map-search-area .ic{ color:var(--accent); }
.map-redo{ position:absolute; bottom:18px; left:50%; transform:translateX(-50%); z-index:500; display:none; }

/* ============================================================
   Listing card  (restrained / premium)
   ============================================================ */
.card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  overflow:hidden; display:flex; flex-direction:column; cursor:pointer;
  transition:border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.card:hover{ border-color:#cbd5e1; box-shadow:var(--shadow); }
.card.is-active{ border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }

.card-media{ position:relative; aspect-ratio:4/3; background:var(--surface-3); overflow:hidden; }
.card-media img{ width:100%; height:100%; object-fit:cover; display:block; }
.card:hover .card-media img{ transform:scale(1.03); transition:transform .5s ease; }

.status{
  position:absolute; top:10px; left:10px; z-index:3;
  font-size:11px; font-weight:700; letter-spacing:.02em; padding:3px 8px; border-radius:5px;
  background:rgba(255,255,255,.94); color:var(--ink); border:1px solid rgba(15,23,42,.06);
}
.status.sale{ color:var(--sale); }
.status.rent{ color:var(--rent); }
.fav{
  position:absolute; top:8px; right:8px; z-index:3;
  width:34px; height:34px; border-radius:50%; border:0;
  background:rgba(255,255,255,.92); color:var(--ink-2);
  display:inline-flex; align-items:center; justify-content:center; box-shadow:0 1px 3px rgba(15,23,42,.18);
}
.fav:hover{ background:#fff; }
.fav.on{ color:var(--save); }
.fav.on .ic{ fill:var(--save); }

.media-meta{ position:absolute; bottom:8px; right:8px; z-index:3; display:flex; gap:6px; }
.pill-dark{ display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:600; color:#fff; background:rgba(15,23,42,.72); padding:2px 7px; border-radius:5px; }

/* carousel arrows + dots */
.car-btn{ position:absolute; top:50%; transform:translateY(-50%); z-index:3; width:30px; height:30px; border-radius:50%; border:0; background:rgba(255,255,255,.92); color:var(--ink); display:none; align-items:center; justify-content:center; box-shadow:0 1px 3px rgba(15,23,42,.2); }
.card-media:hover .car-btn{ display:inline-flex; }
.car-btn.prev{ left:8px; } .car-btn.next{ right:8px; }
.dots{ position:absolute; bottom:8px; left:50%; transform:translateX(-50%); z-index:3; display:flex; gap:4px; }
.dots i{ width:5px; height:5px; border-radius:50%; background:rgba(255,255,255,.55); }
.dots i.on{ background:#fff; }

.card-body{ padding:11px 12px 12px; display:flex; flex-direction:column; gap:7px; }
.price-row{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.price{ font-size:17px; font-weight:800; letter-spacing:-.01em; }
.price .per{ font-size:12px; font-weight:600; color:var(--muted); }
.ptype{ font-size:11.5px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.title{ font-size:13.5px; font-weight:600; color:var(--ink); line-height:1.35; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
a.title{ text-decoration:none; }
a.title:hover{ color:var(--accent-700); text-decoration:underline; }
.d-fullpage{ display:inline-block; margin-top:8px; font-size:12.5px; font-weight:600; color:var(--accent-700); }
.d-fullpage:hover{ text-decoration:underline; }
.facts{ display:flex; flex-wrap:wrap; gap:12px; color:var(--ink-2); font-size:12.5px; }
.facts span{ display:inline-flex; align-items:center; gap:4px; }
.facts .ic{ color:var(--faint); }
.loc{ display:flex; align-items:center; gap:5px; color:var(--muted); font-size:12.5px; }
.loc .ic{ color:var(--faint); }
.card-foot{ display:flex; align-items:center; justify-content:space-between; gap:8px; border-top:1px solid var(--line-2); padding-top:9px; margin-top:1px; }
.agency{ display:flex; align-items:center; gap:6px; min-width:0; }
.agency .logo{ width:20px; height:20px; border-radius:4px; background:var(--surface-3); color:var(--muted); display:inline-flex; align-items:center; justify-content:center; font-size:10px; font-weight:800; flex:none; }
.agency .name{ font-size:12px; color:var(--ink-2); font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.verified{ display:inline-flex; align-items:center; gap:3px; color:var(--verified); font-size:11px; font-weight:700; flex:none; }
.verified .ic{ color:var(--verified); }
.card-contact{ display:inline-flex; align-items:center; gap:5px; height:30px; padding:0 10px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--ink); font-weight:600; font-size:12px; }
.card-contact:hover{ border-color:var(--accent); color:var(--accent-700); }
/* quiet "Featured" label shares the single status slot — one label per card */
.status.featured{ color:var(--accent-700); display:inline-flex; align-items:center; gap:4px; }
.status .ic{ width:12px; height:12px; }

/* €/m² beside the price */
.ppm{ font-size:12px; font-weight:600; color:var(--muted); white-space:nowrap; }

/* Tier-2 quiet meta tags (freshness / reduced / energy) — colour = meaning only */
.meta-row{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.tag{ display:inline-flex; align-items:center; gap:3px; font-size:11px; font-weight:700; padding:2px 7px; border-radius:5px; background:var(--surface-3); color:var(--ink-2); border:1px solid var(--line); white-space:nowrap; }
.tag.new{ color:var(--accent-700); background:var(--accent-50); border-color:var(--accent-100); }
.tag.reduced{ color:var(--alert); background:var(--alert-50); border-color:var(--alert-100); }
.tag .ic{ width:12px; height:12px; }

/* hover link between a card and its map pin */
.card.is-hover{ border-color:var(--accent); box-shadow:var(--shadow); }

/* ============================================================
   States: skeleton, empty, no-results
   ============================================================ */
.skel-card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.skel-media{ aspect-ratio:4/3; }
.shimmer{ background:linear-gradient(100deg,#eef2f6 30%,#f6f8fb 50%,#eef2f6 70%); background-size:200% 100%; animation:sh 1.2s infinite; }
@keyframes sh{ from{ background-position:200% 0 } to{ background-position:-200% 0 } }
.skel-line{ height:11px; border-radius:5px; margin:10px 12px; }

.state{ grid-column:1/-1; text-align:center; padding:56px 20px; color:var(--muted); }
.state .ic-wrap{ width:56px; height:56px; border-radius:50%; background:var(--surface-3); color:var(--faint); display:inline-flex; align-items:center; justify-content:center; margin-bottom:14px; }
.state .ic-wrap .ic{ width:24px; height:24px; }
.state h3{ color:var(--ink); font-size:16px; margin:0 0 6px; }
.state p{ margin:0 auto 16px; max-width:340px; font-size:13px; }
.state .sugg{ display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
.state .sugg button{ border:1px solid var(--line); background:var(--surface); border-radius:18px; padding:7px 13px; font-weight:600; font-size:12.5px; color:var(--ink-2); }
.state .sugg button:hover{ border-color:var(--accent); color:var(--accent-700); }

/* ============================================================
   Map pins
   ============================================================ */
.pin{
  display:inline-flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700; color:var(--ink);
  background:#fff; border:1px solid rgba(15,23,42,.18); border-radius:14px;
  padding:3px 9px; box-shadow:0 2px 6px rgba(15,23,42,.22); white-space:nowrap;
  transform:translate(-50%,-50%); transition:transform .1s ease;
}
.pin:hover{ transform:translate(-50%,-50%) scale(1.06); z-index:1000; }
.pin.rent{ color:var(--rent); }
.pin.sale{ color:var(--sale); }
.pin.seen{ background:var(--surface-3); color:var(--muted); }
.pin.active{ background:var(--orange); color:#fff; border-color:var(--orange-700); box-shadow:0 3px 10px rgba(245,130,31,.45); }
.pin.promo::after{ content:""; width:5px; height:5px; border-radius:50%; background:var(--accent); margin-left:5px; }
.pin.active.promo::after{ background:#fff; }

/* monochrome cluster (override markercluster defaults) */
.cl{ background:var(--ink); color:#fff; border:2px solid #fff; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:12px; box-shadow:0 2px 8px rgba(15,23,42,.3); }

/* leaflet popup -> mini preview card */
.leaflet-popup-content-wrapper{ border-radius:10px; padding:0; box-shadow:var(--shadow-lg); }
.leaflet-popup-content{ margin:0; width:230px !important; }
.leaflet-popup-tip{ box-shadow:var(--shadow-lg); }
.mini{ cursor:pointer; }
.mini img{ width:100%; height:120px; object-fit:cover; display:block; border-radius:10px 10px 0 0; }
.mini .mb{ padding:8px 10px 10px; }
.mini .mp{ font-size:15px; font-weight:800; }
.mini .mt{ font-size:12px; color:var(--ink-2); margin-top:2px; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.mini .mf{ font-size:11.5px; color:var(--muted); margin-top:4px; }

/* ============================================================
   Detail drawer
   ============================================================ */
.scrim{ position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:2000; opacity:0; visibility:hidden; transition:opacity .18s ease; }
.scrim.show{ opacity:1; visibility:visible; }

.drawer{
  position:fixed; top:0; right:0; height:100dvh; width:min(560px, 100%);
  background:var(--surface); z-index:2010; box-shadow:var(--shadow-lg);
  transform:translateX(100%); transition:transform .24s cubic-bezier(.4,0,.2,1);
  display:flex; flex-direction:column;
}
.drawer.show{ transform:none; }
.drawer-head{ flex:none; display:flex; align-items:center; gap:10px; padding:12px 14px; border-bottom:1px solid var(--line); }
.drawer-head .ref{ font-size:12px; color:var(--muted); font-weight:600; }
.drawer-head .sp{ flex:1; }
.round{ width:36px; height:36px; border-radius:50%; border:1px solid var(--line); background:var(--surface); color:var(--ink-2); display:inline-flex; align-items:center; justify-content:center; }
.round:hover{ background:var(--surface-3); }
.round.on{ color:var(--save); }
.round.on .ic{ fill:var(--save); }
.drawer-body{ overflow-y:auto; flex:1; }

.gallery{ position:relative; background:#0b1220; }
.gallery img{ width:100%; aspect-ratio:16/10; object-fit:cover; display:block; }
.gallery .car-btn{ display:inline-flex; }
.gallery .gcount{ position:absolute; bottom:10px; right:10px; }
.dpad{ padding:16px 18px; }
.d-price{ display:flex; align-items:baseline; gap:10px; }
.d-price .p{ font-size:26px; font-weight:800; letter-spacing:-.02em; }
.d-status{ font-size:12px; font-weight:700; padding:3px 9px; border-radius:6px; }
.d-status.sale{ color:var(--sale); background:var(--sale-bg); }
.d-status.rent{ color:var(--rent); background:var(--rent-bg); }
.d-title{ font-size:16px; font-weight:700; margin:8px 0 3px; }
.d-loc{ color:var(--muted); display:flex; align-items:center; gap:6px; font-size:13px; }

.keyfacts{ display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:10px; overflow:hidden; margin:16px 0; }
.keyfacts div{ background:var(--surface); padding:12px 10px; text-align:center; }
.keyfacts .v{ font-size:16px; font-weight:700; }
.keyfacts .k{ font-size:11px; color:var(--muted); margin-top:2px; }

.ai-card{ border:1px solid var(--accent-100); background:var(--accent-50); border-radius:10px; padding:13px 14px; margin:16px 0; }
.ai-card .h{ display:flex; align-items:center; gap:7px; font-weight:700; color:var(--accent-700); font-size:13px; margin-bottom:6px; }
.ai-card p{ margin:0; color:var(--ink-2); font-size:13px; }
.ai-card ul{ margin:8px 0 0; display:flex; flex-direction:column; gap:5px; }
.ai-card li{ display:flex; gap:7px; align-items:flex-start; font-size:13px; color:var(--ink-2); }
.ai-card li .ic{ color:var(--accent); margin-top:2px; }

.sect-h{ font-size:14px; font-weight:700; margin:20px 0 9px; }
.desc{ color:var(--ink-2); font-size:13.5px; line-height:1.6; }
.feat-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px 16px; }
.feat-grid div{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ink-2); }
.feat-grid .ic{ color:var(--accent); }

/* agent / agency trust panel */
.agent-panel{ border:1px solid var(--line); border-radius:10px; padding:14px; display:flex; gap:12px; align-items:center; margin:16px 0; background:var(--surface-2); }
.agent-panel .av{ width:48px; height:48px; border-radius:10px; background:var(--ink); color:#fff; font-weight:800; display:inline-flex; align-items:center; justify-content:center; font-size:16px; flex:none; }
.agent-panel .info{ flex:1; min-width:0; }
.agent-panel .nm{ font-weight:700; display:flex; align-items:center; gap:6px; }
.agent-panel .role{ font-size:12px; color:var(--muted); }
.agent-panel .trust{ display:flex; gap:12px; margin-top:5px; font-size:11.5px; color:var(--ink-2); }
.agent-panel .trust span{ display:inline-flex; align-items:center; gap:4px; }

.drawer-foot{ flex:none; border-top:1px solid var(--line); padding:12px 16px; display:flex; gap:10px; background:var(--surface); }
.drawer-foot .btn-primary,.drawer-foot .btn-ghost{ flex:1; height:44px; display:inline-flex; align-items:center; justify-content:center; gap:8px; }

/* ============================================================
   Modals (centered)
   ============================================================ */
.modal-wrap{ position:fixed; inset:0; z-index:2100; display:none; align-items:center; justify-content:center; padding:20px; }
.modal-wrap.show{ display:flex; }
.modal-wrap .scrim2{ position:absolute; inset:0; background:rgba(15,23,42,.5); }
.modal{ position:relative; background:var(--surface); border-radius:14px; box-shadow:var(--shadow-lg); width:100%; display:flex; flex-direction:column; max-height:88dvh; }
.modal.lg{ max-width:720px; }
.modal.sm{ max-width:420px; }
.modal-head{ flex:none; display:flex; align-items:center; padding:16px 18px; border-bottom:1px solid var(--line); }
.modal-head h2{ font-size:16px; margin:0; font-weight:700; }
.modal-head .sp{ flex:1; }
.modal-body{ overflow-y:auto; padding:18px; }
.modal-foot{ flex:none; display:flex; align-items:center; gap:12px; padding:14px 18px; border-top:1px solid var(--line); }

/* filters modal */
.fgrid{ display:grid; grid-template-columns:1fr 1fr; gap:18px 22px; }
.frow{ display:flex; flex-direction:column; gap:7px; }
.frow.full{ grid-column:1/-1; }
.flabel{ font-size:12.5px; font-weight:700; color:var(--ink); }
.range{ display:flex; align-items:center; gap:8px; }
.inp{ height:38px; border:1px solid var(--line); border-radius:7px; padding:0 10px; font-size:13px; color:var(--ink); background:var(--surface); width:100%; }
.inp:focus{ outline:0; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-50); }
select.inp{ -webkit-appearance:none; appearance:none; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat:no-repeat; background-position:right 10px center; padding-right:30px; }
.range .dash{ color:var(--faint); }
.pillset{ display:flex; flex-wrap:wrap; gap:7px; }
.pillset button{ border:1px solid var(--line); background:var(--surface); border-radius:7px; padding:7px 12px; font-size:12.5px; font-weight:600; color:var(--ink-2); }
.pillset button[aria-pressed="true"]{ border-color:var(--accent); background:var(--accent-50); color:var(--accent-700); }
.energy button{ width:38px; padding:7px 0; text-align:center; }
.fsect-title{ grid-column:1/-1; font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--faint); border-top:1px solid var(--line-2); padding-top:16px; margin-top:2px; }
.fsect-title:first-child{ border-top:0; padding-top:0; margin-top:0; }

.modal-foot .clear{ background:transparent; border:0; color:var(--muted); font-weight:600; font-size:13px; }
.modal-foot .clear:hover{ color:var(--ink); text-decoration:underline; }

/* auth modal */
.tabs{ display:flex; gap:4px; background:var(--surface-3); border-radius:5px; padding:3px; margin-bottom:18px; }
.tabs button{ flex:1; border:0; background:transparent; height:36px; border-radius:7px; font-weight:600; font-size:13px; color:var(--muted); }
.tabs button[aria-pressed="true"]{ background:var(--surface); color:var(--ink); box-shadow:0 1px 2px rgba(15,23,42,.1); }
.phone{ display:flex; gap:8px; }
.cc{ position:relative; flex:none; }
.cc select{ height:44px; border:1px solid var(--line); border-radius:8px; padding:0 28px 0 10px; font-size:14px; font-weight:600; background:var(--surface); -webkit-appearance:none; appearance:none; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat:no-repeat; background-position:right 8px center; }
.big-inp{ width:100%; height:44px; border:1px solid var(--line); border-radius:8px; padding:0 12px; font-size:15px; }
.big-inp:focus{ outline:0; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-50); }
.auth-hint{ font-size:12px; color:var(--muted); margin:10px 0 0; line-height:1.5; }
.otp{ display:flex; gap:10px; justify-content:center; margin:8px 0 4px; }
.otp input{ width:46px; height:54px; text-align:center; font-size:22px; font-weight:700; border:1px solid var(--line); border-radius:10px; }
.otp input:focus{ outline:0; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-50); }
.divider{ display:flex; align-items:center; gap:12px; color:var(--faint); font-size:12px; margin:16px 0; }
.divider::before,.divider::after{ content:""; flex:1; height:1px; background:var(--line); }
.social{ width:100%; height:44px; border:1px solid var(--line); border-radius:4px; background:var(--surface); font-weight:600; font-size:13.5px; display:inline-flex; align-items:center; justify-content:center; gap:9px; }
.social:hover{ background:var(--surface-3); }
.legal{ font-size:11px; color:var(--muted); text-align:center; margin-top:14px; line-height:1.5; }

/* lead modal field */
.lead-prop{ display:flex; gap:10px; padding:10px; border:1px solid var(--line); border-radius:10px; margin-bottom:16px; background:var(--surface-2); }
.lead-prop img{ width:64px; height:54px; border-radius:7px; object-fit:cover; flex:none; }
.lead-prop .lp{ font-weight:800; }
.lead-prop .lt{ font-size:12px; color:var(--muted); }
.form-row{ margin-bottom:13px; }
.form-row label{ display:block; font-size:12.5px; font-weight:700; margin-bottom:6px; }
textarea.big-inp{ height:auto; padding:10px 12px; resize:vertical; min-height:74px; font-family:inherit; }
.contact-opts{ display:flex; gap:8px; margin-bottom:16px; }
.contact-opts button{ flex:1; height:42px; border:1px solid var(--line); border-radius:4px; background:var(--surface); font-weight:600; font-size:13px; display:inline-flex; align-items:center; justify-content:center; gap:7px; color:var(--ink); }
.contact-opts button:hover{ border-color:var(--accent); color:var(--accent-700); }
.contact-opts .ic{ color:var(--accent); }

/* AI understood chips */
.ai-understood{ display:none; gap:7px; flex-wrap:wrap; padding:10px 18px 0; }
.ai-understood.show{ display:flex; }
.ai-understood .lbl{ font-size:12px; color:var(--muted); font-weight:600; align-self:center; display:inline-flex; align-items:center; gap:5px; }
.ai-understood .lbl .ic{ color:var(--accent); }
.ai-chip{ font-size:12px; font-weight:600; color:var(--accent-700); background:var(--accent-50); border:1px solid var(--accent-100); padding:4px 9px; border-radius:14px; }

/* slim footer */
.foot{ flex:none; background:var(--surface); border-top:1px solid var(--line); padding:10px 18px; display:flex; align-items:center; gap:16px; font-size:12px; color:var(--muted); }
.foot a:hover{ color:var(--ink); }
.foot .sp{ flex:1; }

/* mobile bottom sheet + view fab */
.sheet-handle{ display:none; }
.mobile-viewbar{ display:none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width:1100px){
  .field.loc{ width:170px; }
  .mappane{ width:42%; min-width:340px; }
}
@media (max-width:920px){
  .head-search{ display:none; }
  .search-toggle{ display:inline-flex; }
  .head-right .label-hide{ display:none; }
  body.show-search .head-search{ display:flex; position:fixed; top:var(--header-h); left:0; right:0; z-index:1480; background:var(--surface); border-bottom:1px solid var(--line); box-shadow:var(--shadow); padding:10px 12px; gap:8px; max-width:none; }
  body.show-search .head-search .field.loc{ width:150px; }
}

@media (max-width:760px){
  :root{ --header-h:56px; }
  header.topbar{ gap:10px; padding:0 12px; }
  .head-right{ gap:2px; }
  .brand .tld{ display:none; }
  .seg.head-seg button{ padding:6px 10px; }
  .cta-list .full{ display:none; }
  .cta-list .cta-ic{ display:inline-flex; }
  .cta-list{ padding:0 12px; }
  .toolbar{ padding:0 12px; gap:8px; }

  /* mobile: list is full width, map is full-screen behind a sheet */
  .workspace{ display:block; }
  .results{ padding:12px 12px 90px; }
  .grid{ grid-template-columns:1fr; gap:12px; }

  .mappane{ display:none; position:fixed; inset:var(--header-h) 0 0; width:100%; min-width:0; max-width:none; z-index:40; }
  .workspace[data-view="map"]{ }
  .workspace[data-view="map"] .results{ display:none; }
  .workspace[data-view="map"] .mappane{ display:block; }

  /* bottom sheet over the map on mobile map view */
  .workspace[data-view="map"] .results{
    display:block; position:fixed; left:0; right:0; bottom:0; top:auto; height:46dvh;
    z-index:45; background:var(--surface); border-top-left-radius:16px; border-top-right-radius:16px;
    box-shadow:0 -8px 30px rgba(15,23,42,.18); padding:0 12px 20px; overflow-y:auto;
  }
  .workspace[data-view="map"] .sheet-handle{
    display:flex; flex-direction:column; align-items:center; gap:6px;
    position:sticky; top:0; background:var(--surface); padding:8px 0 8px; z-index:2;
  }
  .workspace[data-view="map"] .sheet-handle::before{ content:""; width:38px; height:4px; border-radius:3px; background:var(--line); }
  .workspace[data-view="map"] .sheet-handle .sh-count{ font-size:12.5px; font-weight:700; }
  .workspace[data-view="map"] .results-head,
  .workspace[data-view="map"] .breadcrumb{ display:none; }

  .viewseg{ display:none; }

  /* floating mobile view switch */
  .mobile-viewbar{
    display:inline-flex; position:fixed; bottom:18px; left:50%; transform:translateX(-50%); z-index:55;
    background:var(--ink); border-radius:22px; padding:4px; box-shadow:var(--shadow-lg);
  }
  .mobile-viewbar button{ border:0; background:transparent; color:rgba(255,255,255,.7); height:36px; padding:0 16px; border-radius:18px; font-weight:600; font-size:13px; display:inline-flex; align-items:center; gap:6px; }
  .mobile-viewbar button[aria-pressed="true"]{ background:#fff; color:var(--ink); }

  .drawer{ width:100%; }
  .keyfacts{ grid-template-columns:repeat(2,1fr); }
  .fgrid{ grid-template-columns:1fr; }
  .modal{ max-height:92dvh; }
  .modal-wrap{ padding:0; align-items:flex-end; }
  .modal{ border-bottom-left-radius:0; border-bottom-right-radius:0; max-width:none; }
  .rh-right .label-hide{ display:none; }
  .foot{ display:none; }
}

/* ============================================================
   Property Detail Page (server-rendered, SEO)
   ============================================================ */
body.pdp-page{ height:auto; min-height:100%; background:var(--surface-2); }
.pdp-topbar{ position:sticky; top:0; }
.pdp-back{ display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--ink-2); }
.pdp-back:hover{ color:var(--accent-700); }
.pdp-lang a{ border:0; background:var(--surface); color:var(--muted); font-weight:700; font-size:12px; padding:8px 9px; display:inline-flex; align-items:center; }
.pdp-lang a[aria-current="true"]{ background:var(--ink); color:#fff; }

.pdp{ max-width:1180px; margin:0 auto; padding:16px 18px 64px; }
.pdp .breadcrumb{ margin:6px 0 14px; }

.pdp-grid{ display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:30px; align-items:start; }
.pdp-col-main{ min-width:0; }

.pdp-gallery{ border-radius:var(--radius); overflow:hidden; }
.pdp-gallery img{ width:100%; aspect-ratio:16/10; object-fit:cover; display:block; background:#0b1220; }
.pdp-gallery .car-btn{ display:inline-flex; width:38px; height:38px; }
.pdp-videotag{ position:absolute; top:10px; left:10px; }
.pdp-gallery .gcount{ position:absolute; bottom:10px; right:10px; }

.pdp-thumbs{ display:flex; gap:8px; margin-top:8px; overflow-x:auto; padding-bottom:2px; }
.pdp-thumb{ flex:0 0 auto; width:84px; height:60px; border-radius:7px; overflow:hidden; border:2px solid transparent; background:var(--surface-3); padding:0; }
.pdp-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.pdp-thumb.on{ border-color:var(--accent); }

.pdp-headline{ margin:18px 0 4px; }
.pdp-headline .d-price{ flex-wrap:wrap; }
.pdp-per{ font-size:14px; color:var(--muted); font-weight:600; }
.pdp-title{ font-size:23px; font-weight:800; letter-spacing:-.02em; margin:8px 0 6px; line-height:1.25; }
.pdp-ppm{ color:var(--muted); font-size:13px; margin-top:6px; }
.pdp-reduced{ color:var(--alert); font-weight:700; }
.pdp-aidisc{ margin-top:8px; font-size:11px; color:var(--muted); }

.pdp-tags{ display:flex; flex-wrap:wrap; gap:8px; }
.pdp-tag{ font-size:12.5px; font-weight:600; color:var(--ink-2); background:var(--surface-3); border:1px solid var(--line); border-radius:7px; padding:5px 10px; }

.pdp-map{ height:330px; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; z-index:1; }
.pdp-note{ display:flex; align-items:flex-start; gap:8px; margin-top:10px; font-size:12.5px; color:var(--muted); }
.pdp-note .ic{ flex:none; color:var(--faint); margin-top:1px; }

.pdp-info{ display:grid; grid-template-columns:1fr 1fr; gap:1px; background:var(--line); border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.pdp-info > div{ background:var(--surface); padding:11px 13px; display:flex; justify-content:space-between; gap:12px; font-size:13px; }
.pdp-info .k{ color:var(--muted); }
.pdp-info .v{ color:var(--ink); font-weight:600; text-align:right; }
.pdp-legal{ margin-top:20px; font-size:11.5px; color:var(--muted); line-height:1.6; }

.pdp-col-aside{ min-width:0; }
.pdp-contact{ position:sticky; top:calc(var(--header-h) + 16px); border:1px solid var(--line); border-radius:12px; background:var(--surface); padding:16px; box-shadow:var(--shadow); }
.pdp-contact-price{ display:flex; align-items:baseline; gap:8px; }
.pdp-contact-price .p{ font-size:24px; font-weight:800; letter-spacing:-.02em; }
.pdp-agent{ margin:14px 0; }
.pdp-lead .form-row{ margin-bottom:10px; }
.pdp-lead label{ display:block; font-size:12px; font-weight:600; color:var(--ink-2); margin-bottom:5px; }
.pdp-send{ width:100%; height:46px; justify-content:center; margin-top:2px; }
.pdp-opts{ margin-top:12px; }
.pdp-privacy{ margin-top:10px; }

.pdp-similar-sect{ margin-top:34px; }
.pdp-card{ display:block; color:inherit; }
.pdp-card:hover{ color:inherit; }

.pdp-mobilebar{ display:none; }

@media (max-width:980px){
  .pdp-grid{ grid-template-columns:1fr; gap:22px; }
  .pdp-contact{ position:static; }
  .pdp-mobilebar{
    display:flex; align-items:center; gap:12px; position:fixed; left:0; right:0; bottom:0; z-index:80;
    background:var(--surface); border-top:1px solid var(--line); padding:10px 16px;
    box-shadow:0 -2px 10px rgba(15,23,42,.06);
  }
  .pdp-mb-price{ font-weight:800; font-size:17px; flex:1; }
  .pdp-mb-price .pdp-per{ font-size:12px; }
  .pdp-mobilebar .btn-primary{ height:44px; padding:0 20px; }
  .pdp{ padding-bottom:90px; }
  .pdp-info{ grid-template-columns:1fr; }
}

/* Account page */
.pdp-account{ max-width:680px; }
.acct-card{ border:1px solid var(--line); border-radius:12px; background:var(--surface); padding:18px; box-shadow:var(--shadow); }
.acct-head{ display:flex; align-items:center; gap:14px; margin-bottom:16px; }
.acct-avatar{ width:54px; height:54px; border-radius:12px; background:var(--ink); color:#fff; font-weight:800; font-size:20px; display:inline-flex; align-items:center; justify-content:center; flex:none; }
.acct-name{ font-size:18px; font-weight:800; }
.acct-role{ font-size:12.5px; color:var(--muted); }
.acct-info{ margin-top:4px; }
.acct-info .verified{ margin-left:8px; }
.acct-logout{ margin-top:16px; }

/* ============================================================
   Admin platform
   ============================================================ */
body.adm-body{ height:auto; min-height:100%; background:var(--surface-2); }
.adm{ display:grid; grid-template-columns:220px 1fr; min-height:100dvh; }
.adm-side{ background:var(--ink); color:#fff; display:flex; flex-direction:column; padding:16px 12px; position:sticky; top:0; height:100dvh; }
.adm-brand{ color:#fff; padding:4px 8px 14px; }
.adm-brand .b2{ color:var(--accent); }
.adm-tag{ font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:#94a3b8; margin-left:6px; }
.adm-nav{ display:flex; flex-direction:column; gap:2px; }
.adm-nav a{ color:#cbd5e1; padding:9px 10px; border-radius:6px; font-weight:600; font-size:13.5px; }
.adm-nav a:hover{ background:rgba(255,255,255,.08); color:#fff; }
.adm-nav a.on{ background:var(--accent); color:#fff; }
.adm-side-foot{ margin-top:auto; padding:8px; }
.adm-link{ color:#94a3b8; font-size:12.5px; font-weight:600; }
.adm-link:hover{ color:#fff; }

.adm-main{ min-width:0; display:flex; flex-direction:column; }
.adm-top{ display:flex; align-items:center; gap:12px; padding:14px 22px; background:var(--surface); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:10; }
.adm-h1{ font-size:18px; font-weight:800; margin:0; }
.adm-who{ font-size:12.5px; color:var(--muted); font-weight:600; }
.adm-logout{ height:34px; }
.adm-flash{ margin:14px 22px 0; padding:10px 14px; border-radius:8px; background:var(--accent-50); border:1px solid var(--accent-100); color:var(--accent-700); font-weight:600; font-size:13px; }
.adm-content{ padding:20px 22px 48px; }

.adm-cards{ display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:12px; }
.adm-card{ background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:14px 16px; color:inherit; display:block; }
a.adm-card:hover{ border-color:var(--accent); }
.adm-card .n{ font-size:24px; font-weight:800; letter-spacing:-.02em; }
.adm-card .l{ font-size:12px; color:var(--muted); margin-top:2px; }
.adm-card.warn{ border-color:var(--alert-100); background:var(--alert-50); }
.adm-card.warn .n{ color:var(--alert); }

.adm-sect{ font-size:14px; font-weight:700; margin:26px 0 10px; }
.adm-filters{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.adm-input{ height:36px; border:1px solid var(--line); border-radius:7px; padding:0 10px; font-size:13px; background:var(--surface); color:var(--ink); }
.adm-input.sm{ height:30px; font-size:12px; padding:0 7px; }

.adm-tablewrap{ background:var(--surface); border:1px solid var(--line); border-radius:10px; overflow:auto; }
.adm-table{ width:100%; border-collapse:collapse; font-size:13px; }
.adm-table th{ text-align:left; padding:10px 12px; font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); border-bottom:1px solid var(--line); background:var(--surface-2); white-space:nowrap; }
.adm-table td{ padding:10px 12px; border-bottom:1px solid var(--line-2); vertical-align:middle; }
.adm-table tr:last-child td{ border-bottom:0; }
.adm-table .muted{ color:var(--muted); }
.adm-table .ta-r{ text-align:right; }
.adm-strong{ font-weight:700; color:var(--ink); }
a.adm-strong:hover{ color:var(--accent-700); text-decoration:underline; }

.adm-badge{ display:inline-block; font-size:11px; font-weight:700; padding:2px 7px; border-radius:5px; background:var(--surface-3); color:var(--ink-2); }
.adm-pill{ font-size:11px; font-weight:700; padding:2px 8px; border-radius:5px; text-transform:capitalize; }
.adm-pill.sale{ color:var(--sale); background:var(--sale-bg); }
.adm-pill.rent{ color:var(--rent); background:var(--rent-bg); }
.adm-state{ font-size:11px; font-weight:700; padding:2px 8px; border-radius:5px; text-transform:capitalize; background:var(--surface-3); color:var(--ink-2); }
.adm-state.s-active{ color:#047857; background:#d1fae5; }
.adm-state.s-pending{ color:var(--alert); background:var(--alert-50); }
.adm-state.s-rejected, .adm-state.s-hidden{ color:#b91c1c; background:#fee2e2; }
.adm-state.s-sold, .adm-state.s-rented, .adm-state.s-expired, .adm-state.s-archived, .adm-state.s-draft{ color:var(--muted); background:var(--surface-3); }

.adm-actions{ display:inline-flex; gap:6px; align-items:center; justify-content:flex-end; flex-wrap:wrap; }
.adm-inline{ display:inline-flex; gap:4px; align-items:center; }
.btn-ghost.sm{ height:30px; padding:0 9px; font-size:12px; }
.btn-ghost.sm.on{ color:var(--accent-700); border-color:var(--accent); }
.btn-ghost.sm.danger{ color:#b91c1c; }
.btn-ghost.sm.danger:hover{ border-color:#b91c1c; background:#fee2e2; }

.adm-pager{ display:flex; gap:8px; margin-top:14px; }

@media (max-width:760px){
  .adm{ grid-template-columns:1fr; }
  .adm-side{ position:static; height:auto; flex-direction:row; align-items:center; gap:6px; flex-wrap:wrap; }
  .adm-nav{ flex-direction:row; flex-wrap:wrap; }
  .adm-side-foot{ margin:0; }
}

/* Owner/agent dashboard + listing form */
.dash-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-top:6px; }
.dash-head .muted{ color:var(--muted); font-size:13px; max-width:560px; }
.dash-sect{ font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); margin:22px 0 10px; padding-bottom:6px; border-bottom:1px solid var(--line); }
.dash-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px 16px; }
.dash-f{ display:flex; flex-direction:column; gap:5px; }
.dash-f.full{ grid-column:1/-1; }
.dash-f > span{ font-size:12.5px; font-weight:600; color:var(--ink-2); }
.dash-f em{ color:var(--muted); font-weight:400; font-style:normal; font-size:11px; }
.dash-f .big-inp{ width:100%; }
.dash-checks{ display:flex; flex-wrap:wrap; gap:8px 10px; }
.dash-chk{ display:inline-flex; align-items:center; gap:7px; font-size:13px; color:var(--ink-2); border:1px solid var(--line); border-radius:8px; padding:7px 11px; background:var(--surface); cursor:pointer; }
.dash-chk input{ accent-color:var(--accent); }
.dash-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:24px; }
.dash-thumbs{ display:flex; flex-wrap:wrap; gap:8px; }
.dash-thumbs img{ width:96px; height:70px; object-fit:cover; border-radius:8px; border:1px solid var(--line); background:var(--surface-3); }
@media (max-width:640px){ .dash-grid{ grid-template-columns:1fr; } }
