/*
 * layout.css — Portal Layout & Component System v2
 * All missing classes for: navbar, hero, listings, property cards,
 * filter sidebar, dashboard, stat cards, tables, mobile nav.
 *
 * Scoped under .portal-app or global (for top-level elements like header/body).
 * Zero collision with main souqalard.com stylesheet.
 *
 * Companion to portal.css — loaded after tokens.css and portal.css.
 */

/* ══════════════════════════════════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════════════════════════════════ */

.portal-app {
    font-family: var(--p-font);
    background: var(--p-bg);
    color: var(--p-text-body);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ══════════════════════════════════════════════════════════════════════════════
   NAVBAR — Phase 1
   ══════════════════════════════════════════════════════════════════════════════ */

.portal-nav {
    position: sticky;
    top: 0;
    z-index: 400;
    background: var(--p-surface);
    border-bottom: 1px solid var(--p-border);
    box-shadow: var(--p-shadow-sm);
    height: var(--p-nav-height);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Brand / Logo */
.nav-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--p-primary);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: -.3px;
}
.nav-brand img  { height: 38px; width: auto; object-fit: contain; }
.nav-brand span {
    color: var(--p-primary);
    padding-left: .65rem;
    border-left: 1.5px solid rgba(26,54,93,.25);
    margin-left: .15rem;
}
.nav-brand span em { color: var(--p-accent); font-style: normal; }

/* Center nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: .15rem;
    flex: 1;
    justify-content: center;
}
.nav-link, .portal-app a.nav-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .4rem .75rem;
    border-radius: var(--p-r-sm);
    font-size: .875rem;
    font-weight: 500;
    color: var(--p-text-muted) !important;
    text-decoration: none;
    transition: background var(--p-transition), color var(--p-transition);
    white-space: nowrap;
}
.nav-link:hover, .portal-app a.nav-link:hover { background: var(--p-surface-2); color: var(--p-text) !important; }
.nav-link.active, .portal-app a.nav-link.active { color: var(--p-primary) !important; font-weight: 600; background: var(--p-primary-bg); }
.nav-link.nav-logout  { color: var(--p-error); }
.nav-link.nav-logout:hover { background: var(--p-error-bg); color: var(--p-error); }

/* Right: auth / user area */
.nav-auth, .nav-user {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

/* Right group wrapper: Post Property btn + auth */
.nav-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}

.nav-post-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem 1rem;
    background: var(--p-gradient-primary);
    color: #fff !important;
    border-radius: var(--p-r-full);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--p-transition);
    letter-spacing: .1px;
    box-shadow: var(--p-shadow-glow);
    position: relative; overflow: hidden;
}
.nav-post-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
    transform: translateX(-100%);
}
.nav-post-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    box-shadow: var(--p-shadow-glow-hover);
    color: #fff !important;
}
.nav-post-btn:hover::before { animation: portal-shine .5s ease forwards; }
.nav-post-btn svg   { flex-shrink: 0; }

/* User name / role pill in nav */
.nav-user-name {
    font-size: .82rem;
    font-weight: 600;
    color: var(--p-text);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-user-role.badge {
    font-size: .68rem;
    padding: .15rem .55rem;
    border-radius: var(--p-r-full);
    background: var(--p-primary-bg);
    color: var(--p-primary);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Hamburger (mobile only) */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: .45rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--p-text-body);
    border-radius: var(--p-r-sm);
    flex-shrink: 0;
}
.nav-hamburger:hover { background: var(--p-surface-2); }
.nav-hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--p-text-body);
    border-radius: 2px;
    transition: transform var(--p-transition), opacity var(--p-transition);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile dropdown overlay */
.nav-mobile-menu {
    display: none;
    position: fixed;
    inset: var(--p-nav-height) 0 0 0;
    background: var(--p-surface);
    z-index: 399;
    padding: 1.25rem 1.5rem;
    flex-direction: column;
    gap: .25rem;
    border-top: 1px solid var(--p-border);
    overflow-y: auto;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu .nav-link {
    padding: .65rem .85rem;
    font-size: .95rem;
    width: 100%;
    border-radius: var(--p-r-md);
}

@media (max-width: 767px) {
    .nav-links      { display: none; }
    .nav-hamburger  { display: flex; }
    .nav-user-name,
    .nav-user-role  { display: none; }
    .nav-post-btn   { font-size: .78rem; padding: .4rem .8rem; }
    .nav-logout     { display: none; }
    .notif-bell-wrap { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   HERO SECTION — Listings page
   ══════════════════════════════════════════════════════════════════════════════ */

.portal-hero {
    background: linear-gradient(150deg, var(--p-primary) 0%, var(--p-primary-mid) 55%, #2563eb 100%);
    color: #fff;
    padding: 3.5rem 1.5rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.portal-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.portal-hero-inner {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.portal-hero-title {
    font-size: clamp(1.65rem, 4.5vw, 2.75rem);
    font-weight: 800;
    margin-bottom: .5rem;
    letter-spacing: -.5px;
    line-height: 1.2;
}
.portal-hero-sub {
    font-size: 1.05rem;
    opacity: .82;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

/* Search bar inside hero */
.search-bar {
    display: flex;
    background: #fff;
    border-radius: var(--p-r-full);
    padding: .35rem .35rem .35rem 1.25rem;
    box-shadow: 0 4px 24px rgba(0,0,0,.25);
    gap: .5rem;
    max-width: 580px;
    margin: 0 auto;
}
.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--p-font);
    font-size: .95rem;
    color: var(--p-text);
    background: transparent;
    min-width: 0;
}
.search-bar input::placeholder { color: var(--p-text-muted); }
.search-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--p-gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--p-r-full);
    padding: .6rem 1.35rem;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--p-font);
    transition: all var(--p-transition);
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: var(--p-shadow-glow);
    position: relative; overflow: hidden;
}
.search-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
    transform: translateX(-100%);
}
.search-btn:hover {
    filter: brightness(1.1);
    box-shadow: var(--p-shadow-glow-hover);
}
.search-btn:hover::before { animation: portal-shine .5s ease forwards; }

/* Hero quick-filter pills (optional) */
.hero-quick-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}
.hero-qf-pill {
    display: inline-flex; align-items: center; gap: .3rem;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    border-radius: var(--p-r-full);
    padding: .35rem .85rem;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--p-transition), border-color var(--p-transition);
    text-decoration: none;
}
.hero-qf-pill:hover,
.hero-qf-pill.active { background: rgba(255,255,255,.3); border-color: rgba(255,255,255,.5); color: #fff; }

@media (max-width: 640px) {
    .portal-hero { padding: 2.5rem 1rem 2rem; }
    .search-bar  { border-radius: var(--p-r-lg); padding: .5rem .5rem .5rem 1rem; }
    .search-btn  { padding: .55rem 1rem; font-size: .82rem; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   LISTINGS PAGE LAYOUT
   ══════════════════════════════════════════════════════════════════════════════ */

.listings-layout {
    display: grid;
    grid-template-columns: 268px 1fr;
    gap: 0;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
    align-items: start;
    min-height: calc(100vh - var(--p-nav-height) - 200px);
}

@media (max-width: 900px) {
    .listings-layout { grid-template-columns: 1fr; padding: 1rem; }
}

/* ── Filter Sidebar ─────────────────────────────────────────────────────── */

.filter-sidebar {
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: var(--p-r-lg);
    padding: 1.25rem;
    position: sticky;
    top: calc(var(--p-nav-height) + 1rem);
    max-height: calc(100vh - var(--p-nav-height) - 2rem);
    overflow-y: auto;
    box-shadow: var(--p-shadow-xs);
    scrollbar-width: thin;
    scrollbar-color: var(--p-border) transparent;
}
.filter-sidebar::-webkit-scrollbar { width: 4px; }
.filter-sidebar::-webkit-scrollbar-thumb { background: var(--p-border-hover); border-radius: 2px; }

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--p-border);
}
.filter-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--p-text);
}
.filter-reset-btn {
    font-size: .78rem;
    color: var(--p-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: .2rem .5rem;
    border-radius: var(--p-r-sm);
    font-family: var(--p-font);
    transition: color var(--p-transition), background var(--p-transition);
}
.filter-reset-btn:hover { color: var(--p-error); background: var(--p-error-bg); }

.filter-group {
    margin-bottom: .9rem;
}
.filter-label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--p-text-muted);
    margin-bottom: .35rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.filter-select,
.filter-input {
    width: 100%;
    padding: .55rem .75rem;
    border: 1.5px solid var(--p-border);
    border-radius: var(--p-r-md);
    font-size: .875rem;
    background: var(--p-surface);
    color: var(--p-text-body);
    font-family: var(--p-font);
    outline: none;
    transition: border-color var(--p-transition), box-shadow var(--p-transition);
    appearance: none;
    cursor: pointer;
}
.filter-select:focus,
.filter-input:focus {
    border-color: var(--p-accent);
    box-shadow: 0 0 0 3px var(--p-accent-ring);
}
.filter-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    padding-right: 2.25rem;
}

/* Mobile: filter sidebar becomes slide-in drawer */
@media (max-width: 900px) {
    .filter-sidebar {
        position: fixed;
        left: -100%;
        top: var(--p-nav-height);
        bottom: 0;
        width: 300px;
        max-height: none;
        border-radius: 0 var(--p-r-lg) var(--p-r-lg) 0;
        z-index: 300;
        transition: left var(--p-transition-slow);
        box-shadow: var(--p-shadow-lg);
    }
    .filter-sidebar.open { left: 0; }
    .filter-sidebar-backdrop {
        display: none;
        position: fixed; inset: 0;
        background: rgba(0,0,0,.4);
        z-index: 299;
    }
    .filter-sidebar-backdrop.open { display: block; }
}

/* ── Listings Content Area ──────────────────────────────────────────────── */

.listings-content { min-width: 0; }

.listings-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: .75rem;
    flex-wrap: wrap;
}
.results-count {
    font-size: .875rem;
    color: var(--p-text-muted);
    font-weight: 500;
}
.results-count strong { color: var(--p-text); }

.filter-toggle-btn {
    display: none;
    align-items: center;
    gap: .4rem;
    padding: .4rem .85rem;
    background: var(--p-surface);
    border: 1.5px solid var(--p-border);
    border-radius: var(--p-r-full);
    font-size: .82rem;
    font-weight: 600;
    color: var(--p-text-body);
    cursor: pointer;
    font-family: var(--p-font);
    transition: border-color var(--p-transition), color var(--p-transition), background var(--p-transition);
}
.filter-toggle-btn:hover { border-color: var(--p-primary); color: var(--p-primary); }

@media (max-width: 900px) {
    .filter-toggle-btn { display: inline-flex; }
}

/* Section headings between card groups */
.listings-section-head {
    display: flex; align-items: center; gap: .75rem;
    margin: 1.75rem 0 1rem;
}
.listings-section-head h2 {
    font-size: 1.05rem; font-weight: 700; color: var(--p-text); white-space: nowrap;
}
.listings-section-head::after {
    content: ''; flex: 1; height: 1px; background: var(--p-border);
}

/* ── Listings Grid ─────────────────────────────────────────────────────── */

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

@media (max-width: 640px) {
    .listings-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
}
@media (max-width: 400px) {
    .listings-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   PROPERTY CARDS — Phase 2
   ══════════════════════════════════════════════════════════════════════════════ */

.property-card {
    background: var(--p-surface);
    border-radius: var(--p-card-radius);
    overflow: hidden;
    box-shadow: var(--p-shadow-card);
    border: 1px solid var(--p-border);
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--p-transition), transform var(--p-transition), border-color var(--p-transition);
    position: relative;
    will-change: transform;
    content-visibility: auto;
    contain-intrinsic-size: 0 380px;
}
.property-card:hover {
    box-shadow: var(--p-shadow-card-hover);
    transform: translateY(-3px);
    border-color: var(--p-border-hover);
}

/* Image wrapper */
.card-img-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    background: var(--p-surface-2);
    aspect-ratio: 16/11;
    flex-shrink: 0;
}
.card-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
    display: block;
}
.property-card:hover .card-img-wrap img { transform: scale(1.05); }

/* Placeholder when no image */
.card-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--p-text-light);
    background: linear-gradient(135deg, var(--p-surface-2) 0%, var(--p-surface-3) 100%);
}

/* Skeleton loading state */
.property-card.skeleton .card-img-wrap { background: var(--p-surface-2); }
.skel-box {
    width: 100%; height: 100%;
    background: linear-gradient(90deg, var(--p-surface-2) 25%, #e8edf2 50%, var(--p-surface-2) 75%);
    background-size: 200% 100%;
    animation: card-shimmer 1.4s infinite;
}
.skel-line {
    height: 12px; border-radius: 6px;
    background: linear-gradient(90deg, var(--p-surface-2) 25%, #e8edf2 50%, var(--p-surface-2) 75%);
    background-size: 200% 100%;
    animation: card-shimmer 1.4s infinite;
    margin-bottom: .5rem;
}
.skel-line.w-40 { width: 40%; }
.skel-line.w-60 { width: 60%; }
.skel-line.w-80 { width: 80%; }
@keyframes card-shimmer {
    0%   { background-position:  200% 0; }
    100% { background-position: -200% 0; }
}

/* Badge area inside image */
.card-badges {
    position: absolute;
    top: .6rem;
    left: .6rem;
    display: flex;
    gap: .3rem;
    flex-wrap: wrap;
    pointer-events: none;
    z-index: 1;
}

/* All badge variants */
.badge {
    display: inline-flex;
    align-items: center;
    font-size: .68rem;
    font-weight: 700;
    padding: .2rem .55rem;
    border-radius: var(--p-r-full);
    line-height: 1.4;
    white-space: nowrap;
    letter-spacing: .03em;
}
.badge-featured    { background: #fbbf24; color: #78350f; }
.badge-premium     { background: linear-gradient(135deg,#f59e0b,#d97706); color: #fff; }
.badge-buy         { background: var(--p-accent); color: #fff; }
.badge-rent        { background: #0ea5e9; color: #fff; }
.badge-plot        { background: #8b5cf6; color: #fff; }
.badge-ready       { background: var(--p-success-bg); color: var(--p-success); border: 1px solid var(--p-success-border); }
.badge-construction { background: var(--p-warning-bg); color: var(--p-warning); border: 1px solid var(--p-warning-border); }
.badge-ls-sold     { background: var(--p-error-bg); color: var(--p-error); }
.badge-ls-rented   { background: #e0f2fe; color: #075985; }
.badge-ls-expired  { background: var(--p-surface-2); color: var(--p-text-muted); }
.badge-hot         { background: #fee2e2; color: #dc2626; }
.badge-new         { background: #dcfce7; color: #16a34a; }
.badge-price-red   { background: #fef3c7; color: #d97706; }
.badge-verified    { background: #dbeafe; color: #1d4ed8; }

/* Card body */
.card-body {
    padding: .9rem 1rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.card-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--p-primary);
    line-height: 1.2;
    letter-spacing: -.3px;
}

.card-title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--p-text);
    line-height: 1.35;
    margin: 0;
}
.card-title a {
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-title a:hover { color: var(--p-accent); }

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem .5rem;
    font-size: .76rem;
    color: var(--p-text-muted);
    margin-top: .1rem;
}
.card-meta span {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}
.card-meta span + span::before {
    content: '·';
    margin-right: .2rem;
}

.card-install {
    font-size: .76rem;
    color: var(--p-primary);
    font-weight: 500;
    background: var(--p-primary-bg);
    border-radius: var(--p-r-sm);
    padding: .15rem .5rem;
    width: fit-content;
    margin-top: .15rem;
}

/* Card action buttons */
.card-actions {
    display: flex;
    gap: .5rem;
    margin-top: auto;
    padding-top: .75rem;
}

.btn-contact {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    padding: .5rem .6rem;
    border-radius: var(--p-r-md);
    font-size: .78rem;
    font-weight: 600;
    font-family: var(--p-font);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background var(--p-transition), color var(--p-transition), transform var(--p-transition-fast);
    line-height: 1;
    white-space: nowrap;
}
.btn-contact svg { flex-shrink: 0; width: 14px; height: 14px; }

.btn-call {
    background: var(--p-primary-bg);
    color: var(--p-primary);
    border: 1.5px solid transparent;
}
.btn-call:hover {
    background: var(--p-primary);
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(30,58,95,.3);
}

.btn-whatsapp {
    background: var(--p-wa-bg);
    color: var(--p-wa-dark);
    border: 1.5px solid transparent;
}
.btn-whatsapp:hover {
    background: var(--p-wa);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37,211,102,.3);
}

/* No-results state */
.no-results {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5rem 2rem;
    gap: 1rem;
    text-align: center;
    color: var(--p-text-muted);
}
.no-results svg { opacity: .35; }
.no-results p { font-size: .95rem; }
.no-results p.text-muted { font-size: .85rem; color: var(--p-text-light); margin-top: -.5rem; }

/* ── Pagination ─────────────────────────────────────────────────────────── */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: 2rem 0 .5rem;
    flex-wrap: wrap;
}
.page-btn {
    padding: .45rem .8rem;
    border: 1.5px solid var(--p-border);
    border-radius: var(--p-r-md);
    background: var(--p-surface);
    color: var(--p-text-body);
    cursor: pointer;
    font-size: .85rem;
    font-weight: 500;
    font-family: var(--p-font);
    min-width: 38px;
    text-align: center;
    transition: all var(--p-transition);
}
.page-btn:hover   { border-color: var(--p-accent); color: var(--p-accent); background: var(--p-accent-bg); }
.page-btn.active  { background: var(--p-accent); color: #fff; border-color: var(--p-accent); font-weight: 700; }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }
.page-ellipsis { color: var(--p-text-light); padding: 0 .25rem; }

/* ══════════════════════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT — Phase 4
   ══════════════════════════════════════════════════════════════════════════════ */

.dash-wrapper {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - var(--p-nav-height));
}
@media (max-width: 900px) { .dash-wrapper { grid-template-columns: 1fr; } }

/* ── Dashboard Sidebar ──────────────────────────────────────────────────── */

.dash-sidebar {
    background: var(--p-surface);
    border-right: 1px solid var(--p-border);
    padding: 1.25rem 0 2rem;
    position: sticky;
    top: var(--p-nav-height);
    height: calc(100vh - var(--p-nav-height));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--p-border) transparent;
    box-shadow: 1px 0 0 var(--p-border);
}
@media (max-width: 900px) { .dash-sidebar { display: none; } }

/* User info block at top of sidebar */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--p-border);
    margin-bottom: .75rem;
}
.sidebar-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--p-primary), var(--p-primary-light));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 700;
    flex-shrink: 0;
    letter-spacing: -.5px;
}
.sidebar-name {
    font-size: .875rem;
    font-weight: 700;
    color: var(--p-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}
.sidebar-role {
    font-size: .72rem;
    color: var(--p-text-muted);
    margin: .1rem 0 0;
    text-transform: capitalize;
}

/* Nav links */
.sidebar-nav {
    padding: 0 .75rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .85rem;
    border-radius: var(--p-r-md);
    font-size: .875rem;
    font-weight: 500;
    color: var(--p-text-muted);
    text-decoration: none;
    transition: all var(--p-transition);
    position: relative;
}
.sidebar-nav a svg { flex-shrink: 0; opacity: .7; }
.sidebar-nav a:hover {
    background: var(--p-surface-2);
    color: var(--p-text);
}
.sidebar-nav a:hover svg { opacity: 1; }
.sidebar-nav a.active,
.sidebar-nav a[aria-current="page"] {
    background: var(--p-accent-bg);
    color: var(--p-accent-dark);
    font-weight: 600;
}
.sidebar-nav a.active svg { opacity: 1; color: var(--p-accent); }

.sidebar-add-btn {
    background: var(--p-gradient-primary) !important;
    color: #fff !important;
    font-weight: 700 !important;
    margin: .35rem 0;
    justify-content: center;
    box-shadow: var(--p-shadow-glow);
    transition: all var(--p-transition) !important;
    position: relative; overflow: hidden;
}
.sidebar-add-btn:hover {
    filter: brightness(1.1) !important;
    box-shadow: var(--p-shadow-glow-hover) !important;
    transform: translateY(-1px);
}
.sidebar-add-btn svg   { opacity: 1 !important; }

/* ── Dashboard Main ──────────────────────────────────────────────────────── */

.dash-main {
    padding: 1.75rem 2rem;
    min-width: 0;
}
@media (max-width: 640px) { .dash-main { padding: 1.25rem 1rem; } }

.dash-greeting {
    font-size: clamp(1.05rem, 0.95rem + 0.521vw, 1.35rem);
    font-weight: 800;
    color: var(--p-text);
    margin-bottom: 1.25rem;
    letter-spacing: -.3px;
}

/* ── Stat Cards ──────────────────────────────────────────────────────────── */

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .85rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: var(--p-r-lg);
    padding: 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--p-transition), transform var(--p-transition);
}
.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--p-border);
    border-radius: var(--p-r-lg) var(--p-r-lg) 0 0;
}
.stat-card-green::before  { background: var(--p-accent); }
.stat-card-amber::before  { background: var(--p-warning); }
.stat-card-blue::before   { background: var(--p-indigo); }
.stat-card:hover { box-shadow: var(--p-shadow-md); transform: translateY(-1px); }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--p-text);
    line-height: 1;
    letter-spacing: -.5px;
}
.stat-card-green .stat-value { color: var(--p-accent); }
.stat-card-amber .stat-value { color: var(--p-warning); }
.stat-card-blue  .stat-value { color: var(--p-indigo); }
.stat-label {
    font-size: .75rem;
    color: var(--p-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ── Sections ────────────────────────────────────────────────────────────── */

.dash-section {
    display: none;
    animation: fade-in .2s ease;
}
.dash-section.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.section-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--p-text);
    letter-spacing: -.2px;
}
.section-subtitle {
    font-size: .82rem;
    color: var(--p-text-muted);
    font-weight: 400;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */

.table-wrap {
    overflow-x: auto;
    border-radius: var(--p-r-lg);
    border: 1px solid var(--p-border);
    background: var(--p-surface);
    box-shadow: var(--p-shadow-xs);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.data-table th {
    background: var(--p-surface-2);
    padding: .65rem 1rem;
    text-align: left;
    font-size: .75rem;
    font-weight: 700;
    color: var(--p-text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid var(--p-border);
    white-space: nowrap;
}
.data-table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--p-border);
    color: var(--p-text-body);
    vertical-align: middle;
    font-size: .875rem;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--p-bg); }

/* Action buttons inside tables */
.btn-edit,
.btn-delete,
.btn-admin-action {
    display: inline-flex; align-items: center; gap: .25rem;
    font-size: .75rem; padding: .25rem .6rem;
    border-radius: var(--p-r-sm);
    border: none; cursor: pointer;
    font-family: var(--p-font); font-weight: 600;
    text-decoration: none; transition: all var(--p-transition);
    line-height: 1.4;
}
.btn-edit   { background: var(--p-primary-bg); color: var(--p-primary); }
.btn-edit:hover { background: var(--p-primary); color: #fff; }
.btn-delete { background: var(--p-error-bg); color: var(--p-error); }
.btn-delete:hover { background: var(--p-error); color: #fff; }
.btn-admin-action { background: var(--p-indigo-bg); color: var(--p-indigo); }
.btn-admin-action:hover { background: var(--p-indigo); color: #fff; }

/* ══════════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS — Phase 6
   ══════════════════════════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-width: 340px;
    pointer-events: none;
}
.toast {
    padding: .75rem 1.15rem;
    border-radius: var(--p-r-lg);
    font-size: .875rem;
    font-weight: 500;
    box-shadow: var(--p-shadow-lg);
    transform: translateY(12px) scale(.97);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease;
    pointer-events: all;
    line-height: 1.45;
}
.toast.show { transform: translateY(0) scale(1); opacity: 1; }
.toast-success { background: #fff; color: var(--p-success); border-left: 4px solid var(--p-success); }
.toast-error   { background: #fff; color: var(--p-error);   border-left: 4px solid var(--p-error); }
.toast-info    { background: #fff; color: var(--p-indigo);  border-left: 4px solid var(--p-indigo); }

@media (max-width: 480px) {
    .toast-container { right: 1rem; left: 1rem; max-width: none; bottom: 5rem; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   PORTAL FOOTER
   ══════════════════════════════════════════════════════════════════════════════ */

.portal-footer {
    background: var(--p-surface);
    border-top: 1px solid var(--p-border);
    padding: 1.5rem 1.5rem;
    text-align: center;
    font-size: .82rem;
    color: var(--p-text-muted);
    margin-top: 3rem;
}
.portal-footer a {
    color: var(--p-accent);
    text-decoration: none;
    font-weight: 500;
}
.portal-footer a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════════════════
   PROPERTY DETAIL PAGE — Phase 3
   ══════════════════════════════════════════════════════════════════════════════ */

/* Gallery */
.detail-gallery {
    background: var(--p-surface-2);
    border-radius: var(--p-r-xl);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.detail-main-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.gallery-thumbs {
    display: flex;
    gap: .4rem;
    padding: .5rem;
    overflow-x: auto;
    scrollbar-width: thin;
    background: var(--p-surface-3);
}
.gallery-thumb {
    width: 72px;
    height: 48px;
    flex-shrink: 0;
    border-radius: var(--p-r-sm);
    object-fit: cover;
    cursor: pointer;
    opacity: .6;
    transition: opacity var(--p-transition), outline var(--p-transition);
    outline: 2px solid transparent;
}
.gallery-thumb.active { opacity: 1; outline-color: var(--p-accent); }
.gallery-thumb:hover  { opacity: .9; }

/* Detail layout: content + sidebar */
.detail-layout {
    display: block;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
}
@media (max-width: 900px) {
    .detail-layout { padding: 1rem 1rem 2.5rem; }
}

/* Two-column layout: main content + sticky contact card */
.detail-grid {
    display: block; /* single column by default / mobile */
}
@media (min-width: 900px) {
    .detail-grid {
        display: grid;
        grid-template-columns: 1fr 360px;
        gap: 2.5rem;
        align-items: start;
    }
}

/* Content area */
.detail-body { min-width: 0; }

/* Contact card (sidebar on desktop) */
.detail-contact-card {
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: var(--p-r-xl);
    padding: 1.5rem;
    position: sticky;
    top: calc(var(--p-nav-height) + 1rem);
    box-shadow: var(--p-shadow-md);
    align-self: start;
}
.contact-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--p-text);
    margin-bottom: .25rem;
}
.contact-card-sub {
    font-size: .82rem;
    color: var(--p-text-muted);
    margin-bottom: 1.25rem;
}
.btn-contact-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .75rem;
    border-radius: var(--p-r-md);
    font-size: .92rem;
    font-weight: 700;
    font-family: var(--p-font);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--p-transition);
    margin-bottom: .65rem;
}
.btn-contact-call {
    background: var(--p-primary);
    color: #fff;
    box-shadow: 0 2px 12px rgba(30,58,95,.25);
}
.btn-contact-call:hover { background: var(--p-primary-mid); box-shadow: 0 4px 20px rgba(30,58,95,.35); }
.btn-contact-wa {
    background: var(--p-wa);
    color: #fff;
    box-shadow: 0 2px 12px rgba(37,211,102,.25);
}
.btn-contact-wa:hover { background: var(--p-wa-dark); }

/* Large contact button variant (used on property detail) */
.btn-contact-lg {
    padding: .75rem 1.25rem;
    font-size: .92rem;
    border-radius: var(--p-r-md);
    width: 100%;
    justify-content: center;
    flex: none;
}

/* Detail section heading */
.detail-section-title {
    font-size: .88rem;
    font-weight: 700;
    color: var(--p-text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 1.5rem 0 .6rem;
    padding-left: .75rem;
    border-left: 3px solid var(--p-accent);
}
.detail-title {
    font-size: clamp(1.2rem, 3vw, 1.65rem);
    font-weight: 800;
    color: var(--p-text);
    line-height: 1.3;
    letter-spacing: -.3px;
    margin-bottom: .35rem;
}
.detail-price {
    font-size: clamp(1.25rem, 1.067rem + 0.938vw, 1.65rem);
    font-weight: 800;
    color: var(--p-accent);
    letter-spacing: -.5px;
    margin-bottom: .75rem;
}
.detail-meta {
    font-size: .85rem;
    color: var(--p-text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .9rem;
    margin-bottom: .75rem;
    align-items: center;
}
.detail-desc {
    font-size: .92rem;
    line-height: 1.75;
    color: var(--p-text-body);
}
.detail-badges {
    display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem;
}

/* Skeleton for detail page */
.detail-skeleton { padding: 2rem 1.5rem; }
.detail-error, .detail-not-found { padding: 4rem 1.5rem; text-align: center; }

/* ══════════════════════════════════════════════════════════════════════════════
   MOBILE BOTTOM NAV — Phase 8
   ══════════════════════════════════════════════════════════════════════════════ */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--p-surface);
    border-top: 1px solid var(--p-border);
    z-index: 350;
    padding: .35rem 0 calc(.35rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(15,23,42,.08);
}
.mobile-bottom-nav .mnav-items {
    display: flex; justify-content: space-around; align-items: center;
}
.mnav-item {
    display: flex; flex-direction: column; align-items: center; gap: .2rem;
    text-decoration: none; color: var(--p-text-muted);
    padding: .35rem .5rem;
    border-radius: var(--p-r-md);
    font-size: .65rem; font-weight: 600;
    flex: 1;
    transition: color var(--p-transition);
    letter-spacing: .02em;
    text-transform: uppercase;
}
.mnav-item svg { width: 22px; height: 22px; }
.mnav-item:hover,
.mnav-item.active { color: var(--p-accent); }
.mnav-item.mnav-post {
    color: #fff;
    background: var(--p-accent);
    border-radius: var(--p-r-lg);
    padding: .4rem .75rem;
    box-shadow: 0 2px 8px rgba(5,150,105,.35);
}
.mnav-item.mnav-post:hover { background: var(--p-accent-dark); color: #fff; }

@media (max-width: 767px) {
    .mobile-bottom-nav { display: block; }
    /* Push footer/content up to avoid nav overlap */
    .portal-footer,
    .listings-layout,
    .dash-wrapper,
    .detail-layout { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
}

/* ══════════════════════════════════════════════════════════════════════════════
   QUICK FILTER CHIPS (listings toolbar)
   ══════════════════════════════════════════════════════════════════════════════ */

.quick-filter-bar {
    display: flex; flex-wrap: nowrap; gap: .4rem;
    overflow-x: auto; padding: .6rem 1.5rem;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    background: var(--p-surface);
    border-bottom: 1px solid var(--p-border);
    position: sticky;
    top: var(--p-nav-height);
    z-index: 100;
    justify-content: center;
}
@media (max-width: 640px) {
    .quick-filter-bar { justify-content: flex-start; }
}
.quick-filter-bar::-webkit-scrollbar { display: none; }
.qf-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .38rem .85rem;
    background: var(--p-surface);
    border: 1.5px solid var(--p-border);
    border-radius: var(--p-r-full);
    font-size: .78rem; font-weight: 600;
    color: var(--p-text-muted);
    cursor: pointer; white-space: nowrap;
    font-family: var(--p-font);
    transition: all var(--p-transition);
}
.qf-chip:hover,
.qf-chip.active {
    border-color: var(--p-accent);
    color: var(--p-accent);
    background: var(--p-accent-bg);
}

/* ══════════════════════════════════════════════════════════════════════════════
   FORM MULTI-STEP — Phase 5
   ══════════════════════════════════════════════════════════════════════════════ */

.form-steps-bar {
    display: flex; gap: 0;
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: var(--p-r-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--p-shadow-xs);
}
.form-step-tab {
    flex: 1;
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    gap: .2rem;
    padding: .75rem .5rem;
    font-size: .72rem; font-weight: 600;
    color: var(--p-text-muted);
    border-right: 1px solid var(--p-border);
    cursor: pointer; text-align: center;
    transition: background var(--p-transition), color var(--p-transition);
    position: relative;
    text-transform: uppercase; letter-spacing: .04em;
}
.form-step-tab:last-child { border-right: none; }
.form-step-tab .step-num {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--p-surface-2); color: var(--p-text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 700; margin-bottom: .15rem;
    transition: background var(--p-transition), color var(--p-transition);
}
.form-step-tab.active { color: var(--p-accent); background: var(--p-accent-bg); }
.form-step-tab.active .step-num { background: var(--p-accent); color: #fff; }
.form-step-tab.done .step-num { background: var(--p-success); color: #fff; }
.form-step-tab.done { color: var(--p-success); }

/* ══════════════════════════════════════════════════════════════════════════════
   PROPERTY FORM (add/edit)
   ══════════════════════════════════════════════════════════════════════════════ */

.portal-app .property-form-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 3rem;
}
.portal-app .property-form-step { display: none; }
.portal-app .property-form-step.active { display: block; }

.portal-app .form-section-head {
    font-size: 1rem; font-weight: 700; color: var(--p-text);
    border-bottom: 1.5px solid var(--p-border);
    padding-bottom: .65rem; margin-bottom: 1.25rem;
}

.portal-app .image-upload-area {
    border: 2px dashed var(--p-border);
    border-radius: var(--p-r-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--p-transition), background var(--p-transition);
    color: var(--p-text-muted);
    font-size: .9rem;
}
.portal-app .image-upload-area:hover,
.portal-app .image-upload-area.drag-over {
    border-color: var(--p-accent);
    background: var(--p-accent-bg);
    color: var(--p-accent-dark);
}
.portal-app .image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: .5rem; margin-top: 1rem;
}
.portal-app .img-preview-thumb {
    aspect-ratio: 1; border-radius: var(--p-r-md);
    object-fit: cover; width: 100%;
    border: 2px solid var(--p-border);
}
.portal-app .img-preview-thumb:hover { border-color: var(--p-error); }

/* ══════════════════════════════════════════════════════════════════════════════
   EMPTY STATES & LOADING — Phase 6
   ══════════════════════════════════════════════════════════════════════════════ */

.portal-app .empty-row,
.portal-app .loading-row {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--p-text-muted);
    font-size: .9rem;
}

/* ══════════════════════════════════════════════════════════════════════════════
   TABLE PAGINATION (inside data panels)
   ══════════════════════════════════════════════════════════════════════════════ */

.table-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: .3rem; padding: .75rem 0; flex-wrap: wrap;
}
.page-btn { /* already defined above */ }

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — tablets
   ══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .detail-layout  { padding: 1.25rem 1rem 2rem; }
    .dash-main      { padding: 1.5rem 1.25rem; }
}

@media (max-width: 768px) {
    .detail-contact-card { position: static; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .data-table thead { display: none; }
    .data-table tr     { display: block; border-bottom: 1px solid var(--p-border); padding: .6rem 0; }
    .data-table td     { display: flex; justify-content: space-between; padding: .3rem .75rem; font-size: .82rem; border-bottom: none; }
    .data-table td::before {
        content: attr(data-label);
        font-weight: 600; color: var(--p-text-muted);
        min-width: 90px; flex-shrink: 0;
    }
}

@media (max-width: 640px) {
    .listings-layout { padding: .75rem; }
    .search-bar input { font-size: .875rem; }
    .card-price { font-size: 1rem; }
    .card-body  { padding: .75rem .85rem .85rem; }
    .card-actions { gap: .4rem; }
    .btn-contact { font-size: .72rem; }
}


/* ══════════════════════════════════════════════════════════════════════════════
   CONVERSION-FIRST UI — PHASES 1-10
   Added 2026-04-11
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── PHASE 1: HERO ─────────────────────────────────────────────────────────── */

.portal-hero {
    background:
        linear-gradient(160deg, rgba(15,23,42,.82) 0%, rgba(30,58,95,.75) 60%, rgba(5,150,105,.25) 100%),
        url('/portal/assets/img/hero-bg.jpg') center/cover no-repeat;
    padding: 4rem 1.5rem 3rem;
}
.portal-hero-inner { max-width: 720px; margin: 0 auto; text-align: center; }

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(5,150,105,.18);
    border: 1px solid rgba(5,150,105,.35);
    color: #6ee7b7;
    font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    padding: .3rem .85rem;
    border-radius: var(--p-r-full);
    margin-bottom: 1rem;
}
.portal-hero-title {
    font-size: clamp(1.9rem, 5vw, 3.2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: .75rem;
    letter-spacing: -.02em;
}
.hero-highlight { color: #6ee7b7; }
.portal-hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,.78);
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Search bar inside hero */
.search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: var(--p-r-full);
    padding: .3rem .3rem .3rem 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.22);
    max-width: 600px;
    margin: 0 auto 1.5rem;
    gap: .5rem;
}
.search-bar-icon { color: var(--p-text-muted); flex-shrink: 0; }
.search-bar input {
    flex: 1;
    border: none; outline: none; background: none;
    font-size: .95rem; color: var(--p-text);
    font-family: var(--p-font);
    min-width: 0;
}
.search-bar input::placeholder { color: var(--p-text-light); }
.search-btn {
    background: var(--p-accent);
    color: #fff;
    border: none; border-radius: var(--p-r-full);
    padding: .6rem 1.4rem;
    font-size: .87rem; font-weight: 700;
    cursor: pointer; white-space: nowrap;
    font-family: var(--p-font);
    transition: background var(--p-transition), transform var(--p-transition-fast);
}
.search-btn:hover  { background: var(--p-accent-dark); }
.search-btn:active { transform: scale(.97); }

/* Hero trust line */
.hero-trust-line {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: .5rem .75rem;
    color: rgba(255,255,255,.65);
    font-size: .78rem; font-weight: 500;
    margin-top: 1.5rem;
}
.hero-trust-item { display: inline-flex; align-items: center; gap: .3rem; }
.hero-trust-sep  { color: rgba(255,255,255,.3); }

/* ── PHASE 2: PROPERTY CARDS — CONVERSION LAYER ─────────────────────────────── */

/* Gradient overlay on card image */
.card-img-wrap { position: relative; display: block; overflow: hidden; }
.card-img-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.52) 0%, transparent 55%);
    pointer-events: none;
}

/* Verified badge — bottom-left of image */
.card-verified-badge {
    position: absolute; bottom: .5rem; left: .5rem;
    display: inline-flex; align-items: center; gap: .25rem;
    background: rgba(5,150,105,.97);
    color: #fff;
    font-size: .62rem; font-weight: 700; letter-spacing: .04em;
    padding: .2rem .55rem;
    border-radius: var(--p-r-full);
}

/* Social proof mini chip — bottom-right of image */
.card-social-mini {
    position: absolute; bottom: .5rem; right: .5rem;
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: .62rem; font-weight: 600;
    padding: .2rem .55rem;
    border-radius: var(--p-r-full);
    white-space: nowrap;
}

/* Save button — top-right of card (absolutely positioned over image) */
.card-save-btn, .fav-btn {
    position: absolute; top: .6rem; right: .6rem;
    z-index: 2;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--p-text-muted);
    transition: background var(--p-transition), color var(--p-transition), transform var(--p-transition-fast);
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.card-save-btn:hover, .fav-btn:hover {
    background: #fff;
    color: #e11d48;
    transform: scale(1.1);
}
.card-save-btn.saved, .fav-btn.saved { color: #e11d48; }

/* Tags row */
.card-tags {
    display: flex; flex-wrap: wrap; gap: .35rem;
    margin-top: .5rem; margin-bottom: .1rem;
}
.card-tag {
    display: inline-block;
    padding: .18rem .6rem;
    background: var(--p-surface-2);
    border: 1px solid var(--p-border);
    border-radius: var(--p-r-sm);
    font-size: .7rem; font-weight: 600; color: var(--p-text-muted);
}
.card-tag-inst {
    background: var(--p-accent-bg);
    border-color: var(--p-accent);
    color: var(--p-accent);
}

/* Card border accents */
.card-featured { border-top: 3px solid var(--p-indigo) !important; }
.card-premium  { border-top: 3px solid var(--p-gold) !important; }

/* Urgency + trust badges */
.badge-hot         { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-price-red   { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.badge-new         { background: #ecfdf5; color: #059669; border: 1px solid #6ee7b7; }
.badge-verified    { background: #ecfdf5; color: #059669; border: 1px solid #6ee7b7; }
.badge-trending    { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.badge-premium     { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

/* ── PHASE 4: STICKY CTA BAR (PROPERTY DETAIL) ─────────────────────────────── */

.sticky-cta {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 400;
    background: var(--p-surface);
    border-top: 1px solid var(--p-border);
    box-shadow: 0 -4px 20px rgba(15,23,42,.12);
    padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform var(--p-transition-slow);
}
.sticky-cta.visible { display: block; transform: translateY(0); }
.sticky-cta-inner {
    max-width: 640px; margin: 0 auto;
    display: flex; align-items: center; gap: .75rem;
}
.sticky-cta-price {
    font-size: 1rem; font-weight: 800; color: var(--p-primary);
    white-space: nowrap; min-width: 0; flex-shrink: 1;
    overflow: hidden; text-overflow: ellipsis;
}
.sticky-cta-btns {
    display: flex; gap: .5rem; flex: 1; justify-content: flex-end;
    align-items: center;
}
.sticky-cta-btns .btn-contact {
    flex: 1; justify-content: center;
    padding: .6rem .85rem;
    font-size: .82rem;
    max-width: 160px;
}
/* wa-btn-wrap inside sticky: stretch like a plain button */
.sticky-cta-btns .wa-btn-wrap {
    flex: 2; display: flex; max-width: 200px;
}
.sticky-cta-btns .wa-btn-wrap .btn-contact {
    flex: 1; max-width: none;
}
/* Hide microcopy inside sticky CTA — not enough space */
.sticky-cta .call-microcopy,
.sticky-cta .wa-microcopy {
    display: none;
}
.sticky-save-btn {
    display: flex; align-items: center; justify-content: center; gap: .3rem;
    padding: .6rem .85rem;
    border: 1.5px solid var(--p-border);
    border-radius: var(--p-r-md);
    background: var(--p-surface);
    color: var(--p-text-muted);
    font-size: .82rem; font-weight: 600;
    cursor: pointer;
    font-family: var(--p-font);
    transition: all var(--p-transition);
    white-space: nowrap;
}
.sticky-save-btn:hover { border-color: #e11d48; color: #e11d48; }

@media (max-width: 767px) {
    .sticky-cta { display: block; }
    .detail-layout { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ── PHASE 5: DASHBOARD — INSIGHTS PANEL ───────────────────────────────────── */

.dash-greeting-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: .25rem;
}
.dash-post-cta { white-space: nowrap; flex-shrink: 0; }

.insights-panel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.insight-card {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .85rem 1rem;
    border-radius: var(--p-r-md);
    border: 1px solid var(--p-border);
    background: var(--p-surface);
    box-shadow: var(--p-shadow-xs);
    animation: fade-in .35s ease both;
}
.insight-card.insight-positive { border-left: 3px solid var(--p-accent); background: var(--p-accent-bg); }
.insight-card.insight-warning  { border-left: 3px solid var(--p-warning); background: var(--p-warning-bg); }
.insight-card.insight-info     { border-left: 3px solid var(--p-indigo); background: var(--p-indigo-bg); }
.insight-card.insight-cta      { border-left: 3px solid var(--p-accent); background: var(--p-accent-bg); }
.insight-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; margin-top: .1rem; }
.insight-body strong { font-size: .85rem; font-weight: 700; color: var(--p-text); display: block; margin-bottom: .2rem; }
.insight-body p { font-size: .78rem; color: var(--p-text-muted); line-height: 1.45; margin: 0; }
.insight-action {
    display: inline-block; margin-top: .45rem;
    font-size: .75rem; font-weight: 700;
    color: var(--p-accent); text-decoration: none;
}
.insight-action:hover { color: var(--p-accent-dark); text-decoration: underline; }

/* ── PHASE 6: LEAD CAPTURE POPUP — REDESIGNED ──────────────────────────────── */

.lead-popup-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 900;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    opacity: 0; pointer-events: none;
    transition: opacity var(--p-transition-slow);
}
.lead-popup-overlay.open { opacity: 1; pointer-events: all; }

.lead-popup {
    background: var(--p-surface);
    border-radius: var(--p-r-xl);
    padding: 2rem 1.75rem 1.75rem;
    max-width: 420px; width: 100%;
    position: relative;
    box-shadow: var(--p-shadow-xl);
    transform: translateY(20px) scale(.97);
    transition: transform var(--p-transition-slow);
}
.lead-popup-overlay.open .lead-popup { transform: translateY(0) scale(1); }

.lead-popup-close {
    position: absolute; top: .85rem; right: .85rem;
    background: var(--p-surface-2); border: none;
    width: 28px; height: 28px; border-radius: 50%;
    font-size: 1rem; cursor: pointer; color: var(--p-text-muted);
    display: flex; align-items: center; justify-content: center;
    transition: background var(--p-transition);
}
.lead-popup-close:hover { background: var(--p-surface-3); }

.lead-popup-header { text-align: center; margin-bottom: 1rem; }
.lead-popup-icon { font-size: 2.2rem; margin-bottom: .5rem; }
.lead-popup-title { font-size: 1.25rem; font-weight: 800; color: var(--p-text); margin-bottom: .4rem; }
.lead-popup-sub   { font-size: .85rem; color: var(--p-text-muted); line-height: 1.5; }

.lead-popup-trust {
    display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem .75rem;
    font-size: .7rem; font-weight: 600; color: var(--p-accent);
    background: var(--p-accent-bg);
    border-radius: var(--p-r-md);
    padding: .5rem .75rem;
    margin-bottom: 1rem;
}

.lead-popup-form { display: flex; flex-direction: column; gap: .55rem; }
.lead-popup-row { display: flex; flex-direction: column; }
.lead-popup-row-2 { flex-direction: row; gap: .5rem; }
.lead-popup-row-2 .lead-input { flex: 1; }

.lead-input {
    padding: .65rem .85rem;
    border: 1.5px solid var(--p-border);
    border-radius: var(--p-r-md);
    font-size: .87rem;
    font-family: var(--p-font);
    color: var(--p-text);
    background: var(--p-surface);
    outline: none;
    transition: border-color var(--p-transition);
    width: 100%;
}
.lead-input:focus { border-color: var(--p-accent); }

.lead-popup-btn {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .75rem 1.25rem;
    background: var(--p-accent);
    color: #fff;
    border: none; border-radius: var(--p-r-md);
    font-size: .92rem; font-weight: 700;
    cursor: pointer; font-family: var(--p-font);
    transition: background var(--p-transition), transform var(--p-transition-fast);
    margin-top: .25rem;
}
.lead-popup-btn:hover  { background: var(--p-accent-dark); }
.lead-popup-btn:active { transform: scale(.98); }
.lead-popup-btn:disabled { opacity: .7; cursor: not-allowed; transform: none; }

.lead-popup-privacy { text-align: center; font-size: .7rem; color: var(--p-text-light); margin-top: .65rem; }

.lead-popup-success {
    text-align: center; padding: 1.5rem 0;
}
.lead-success-icon { font-size: 3rem; margin-bottom: .75rem; }
.lead-popup-success h2 { font-size: 1.35rem; font-weight: 800; color: var(--p-text); margin-bottom: .5rem; }
.lead-popup-success p  { font-size: .88rem; color: var(--p-text-muted); line-height: 1.6; margin-bottom: 1.25rem; }

/* ── PHASE 7: TRUST LAYER ──────────────────────────────────────────────────── */

/* Contact card trust footer */
.contact-card-trust {
    display: flex; flex-wrap: wrap; gap: .35rem .75rem;
    font-size: .72rem; color: var(--p-text-muted); font-weight: 600;
    border-top: 1px solid var(--p-border);
    margin-top: 1rem; padding-top: .75rem;
}
.contact-card-trust span { display: inline-flex; align-items: center; gap: .3rem; }
.contact-card-header { margin-bottom: 1rem; }

/* Trust chips on property detail */
.trust-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .25rem .7rem;
    background: var(--p-accent-bg);
    border: 1px solid var(--p-success-border);
    color: var(--p-accent);
    border-radius: var(--p-r-full);
    font-size: .72rem; font-weight: 600;
}

/* ── PHASE 8: URGENCY SYSTEM ───────────────────────────────────────────────── */

/* Urgency banner on detail page */
.urgency-banner {
    margin-bottom: .75rem;
    display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
}
.badge-hot, .badge-trending {
    animation: pulse-badge 2s ease-in-out infinite;
}
@keyframes pulse-badge {
    0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,.3); }
    50%      { box-shadow: 0 0 0 5px rgba(220,38,38,.0); }
}

/* Listing status badges */
.badge-ls-active  { background: #ecfdf5; color: #059669; border: 1px solid #6ee7b7; }
.badge-ls-sold    { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-ls-rented  { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.badge-ls-expired { background: var(--p-surface-2); color: var(--p-text-muted); border: 1px solid var(--p-border); }

/* ── PHASE 9: MICRO INTERACTIONS ───────────────────────────────────────────── */

/* Button press feedback */
.portal-app .btn,
.portal-app .btn-contact,
.portal-app .btn-primary,
.portal-app .btn-outline {
    transition: background var(--p-transition), color var(--p-transition),
                border-color var(--p-transition), transform var(--p-transition-fast),
                box-shadow var(--p-transition);
}
.portal-app .btn:active,
.portal-app .btn-contact:active { transform: scale(.97); }

/* Hover lift on property cards */
.property-card {
    transition: transform var(--p-transition), box-shadow var(--p-transition);
}
.property-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--p-shadow-card-hover);
}
.property-card:hover .card-img-wrap img { transform: scale(1.06); }
.card-img-wrap img { transition: transform .4s ease; }

/* Smooth section fade-in */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.dash-section.active { animation: fade-in .25s ease both; }

/* Link hover underline slide */
.nav-link, .sidebar-nav a { position: relative; }

/* Spinner small */
.spinner-sm {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

/* ── PHASE 10: EMPTY STATES ────────────────────────────────────────────────── */

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: var(--p-surface);
    border-radius: var(--p-r-xl);
    border: 2px dashed var(--p-border);
}
.no-results-icon  { font-size: 3rem; margin-bottom: .75rem; }
.no-results-title { font-size: 1.2rem; font-weight: 700; color: var(--p-text); margin-bottom: .4rem; }
.no-results-sub   { font-size: .87rem; color: var(--p-text-muted); margin-bottom: 1rem; }
.no-results-tips {
    list-style: none; padding: 0; margin: 0 auto 1.5rem;
    max-width: 320px;
    text-align: left; display: grid; gap: .4rem;
    font-size: .83rem; color: var(--p-text-body);
}
.no-results-tips li { padding: .2rem 0; }
.no-results-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* Dashboard empty state */
.empty-state {
    display: flex; flex-direction: column; align-items: center;
    gap: .6rem; padding: 2rem; text-align: center;
    color: var(--p-text-muted);
}
.empty-state p { margin: 0; font-size: .88rem; }

/* ── HERO HERO HERO — QUICK FILTER BAR HEIGHT FIX ───────────────────────────── */

/* Ensure quick filter bar doesn't overlap hero */
@media (max-width: 640px) {
    .portal-hero { padding: 2.5rem 1rem 2rem; }
    .portal-hero-title { font-size: 1.75rem; }
    .portal-hero-sub   { font-size: .9rem; }
    .search-bar { margin-bottom: 1rem; }
    .hero-trust-line { font-size: .7rem; gap: .35rem .5rem; }
    .sticky-cta-price { display: none; }
    .sticky-cta-btns .btn-contact { max-width: none; }
}

/* ── CARD SAVE BUTTON — POSITION RELATIVE TO CARD ─────────────────────────── */

/* The .property-card must be position: relative for absolute children */
.property-card { position: relative; }


/* ══════════════════════════════════════════════════════════════════════════════
   CONVERSION BOOST — TARGETED ADDITIONS 2026-04-11
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── HERO — PAIN EYEBROW ────────────────────────────────────────────────────── */
.hero-eyebrow-pain {
    background: rgba(220,38,38,.15);
    border-color: rgba(220,38,38,.35);
    color: #fca5a5;
}

/* ── CARD — CURIOSITY LINE ──────────────────────────────────────────────────── */
.card-curiosity {
    font-size: .72rem;
    font-weight: 700;
    color: var(--p-accent);
    margin: .15rem 0 .4rem;
    letter-spacing: .01em;
    line-height: 1.3;
}

/* ── CARD — WHATSAPP PRIMARY (bigger, first) ─────────────────────────────────── */
.btn-wa-primary {
    background: #25D366 !important;
    color: #fff !important;
    font-size: .85rem !important;
    font-weight: 700 !important;
    padding: .55rem 1rem !important;
    flex: 2;                       /* takes more horizontal space */
    box-shadow: 0 2px 10px rgba(37,211,102,.3) !important;
}
.btn-wa-primary:hover {
    background: #128c7e !important;
    box-shadow: 0 4px 16px rgba(37,211,102,.45) !important;
}
.btn-call-secondary {
    flex: 1;
    font-size: .8rem !important;
    opacity: .9;
}

/* ── PROPERTY DETAIL — URGENCY HOOK PILLS ──────────────────────────────────── */
.urgency-hook-wrap {
    display: flex; flex-direction: column; gap: .45rem;
    margin: .6rem 0 1rem;
}
.hook-pill {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .5rem .9rem;
    border-radius: var(--p-r-md);
    font-size: .82rem; line-height: 1.35;
    border-left: 3px solid transparent;
}
.hook-price    { background: #fffbeb; color: #92400e; border-color: #f59e0b; }
.hook-demand   { background: #fef2f2; color: #991b1b; border-color: #ef4444; }
.hook-urgent   { background: #fff7ed; color: #9a3412; border-color: #f97316; }
.hook-featured { background: var(--p-indigo-bg); color: #3730a3; border-color: var(--p-indigo); }
.hook-new      { background: var(--p-accent-bg); color: var(--p-accent-dark); border-color: var(--p-accent); }

/* ── PROPERTY DETAIL — RETARGET ROW ─────────────────────────────────────────── */
.retarget-row {
    display: flex; gap: .6rem; align-items: center;
    margin: .85rem 0 .5rem;
    flex-wrap: wrap;
}
.retarget-btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .5rem .95rem;
    border-radius: var(--p-r-md);
    font-size: .8rem; font-weight: 600;
    cursor: pointer; font-family: var(--p-font);
    transition: all var(--p-transition);
    border: 1.5px solid var(--p-border);
    background: var(--p-surface);
    color: var(--p-text-muted);
    text-decoration: none;
}
.retarget-btn:hover { border-color: var(--p-accent); color: var(--p-accent); }
.retarget-save  { color: #e11d48 !important; border-color: #fecaca !important; }
.retarget-save:hover { background: #fef2f2 !important; }
.retarget-alerts { color: var(--p-accent-dark); border-color: var(--p-success-border); }
.retarget-alerts:hover { background: var(--p-accent-bg); }
.retarget-alerts-set { background: var(--p-accent-bg) !important; color: var(--p-accent) !important; border-color: var(--p-accent) !important; cursor: default !important; }

/* ── TRUST — VERIFIED BADGE (heavier visual weight) ─────────────────────────── */
.card-verified-badge {
    background: var(--p-accent) !important;           /* solid, not semi-transparent */
    font-size: .68rem !important;
    font-weight: 800 !important;
    padding: .25rem .65rem !important;
    box-shadow: 0 2px 8px rgba(5,150,105,.4);
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* Verified trust chip on detail page — larger */
.trust-chip {
    font-size: .78rem !important;
    font-weight: 700 !important;
    padding: .35rem .9rem !important;
}
.trust-chip:first-child {
    background: var(--p-accent-bg) !important;
    border-color: var(--p-accent) !important;
    color: var(--p-accent-dark) !important;
    font-size: .82rem !important;
    box-shadow: 0 1px 4px rgba(5,150,105,.15);
}

/* ── CONTACT CARD — WHATSAPP PRIMARY ─────────────────────────────────────────── */
/* WA button is styled via .btn-whatsapp-primary in portal.css */
.contact-card-actions .btn-call.btn-contact-lg {
    background: var(--p-surface-2);
    color: var(--p-text-body);
    border: 1.5px solid var(--p-border);
    box-shadow: none;
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: 0;
}
.contact-card-actions .btn-call.btn-contact-lg:hover {
    background: var(--p-primary);
    color: #fff;
    border-color: var(--p-primary);
}

/* ── STICKY CTA — WHATSAPP PRIMARY ────────────────────────────────────────────── */
.sticky-cta-btns .btn-whatsapp {
    flex: 2;
    background: #25D366;
    color: #fff;
    box-shadow: 0 2px 12px rgba(37,211,102,.3);
    font-weight: 700;
}
.sticky-cta-btns .btn-call {
    flex: 1;
    background: var(--p-primary-bg);
    color: var(--p-primary);
    border: 1.5px solid var(--p-primary);
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .urgency-hook-wrap { margin: .4rem 0 .75rem; }
    .hook-pill { font-size: .77rem; padding: .45rem .75rem; }
    .retarget-row { gap: .5rem; }
    .retarget-btn { font-size: .75rem; padding: .45rem .8rem; }
}

/* ════════════════════════════════════════════════════════════════════════════
   BEHAVIOR LAYER — MICRO-ELEMENT STYLES
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Card: View details → subtle CTA ────────────────────────────────────────── */
.card-view-details {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--p-primary);
    text-decoration: none;
    letter-spacing: .01em;
    margin: .25rem 0 .5rem;
    opacity: .8;
    transition: opacity .15s, transform .15s;
}
.card-view-details:hover {
    opacity: 1;
    transform: translateX(2px);
}

/* ── Card: WhatsApp wrap + microcopy ─────────────────────────────────────────── */
.card-wa-wrap {
    display: flex;
    flex-direction: column;
    gap: .18rem;
    flex: 2;
    min-width: 0;
}
.wa-microcopy {
    font-size: .68rem;
    color: var(--p-text-muted);
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Detail page: WA button wrap + microcopy ─────────────────────────────────── */
.wa-btn-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .22rem;
}
.wa-btn-wrap .wa-microcopy {
    font-size: .72rem;
    color: var(--p-text-muted);
    text-align: center;
}

/* ── Lead popup: social proof line ──────────────────────────────────────────── */
.lead-popup-social-proof {
    font-size: .82rem;
    color: var(--p-text-muted);
    text-align: center;
    background: var(--p-surface-2);
    border-radius: 8px;
    padding: .45rem .85rem;
    margin: .1rem 0 .6rem;
    line-height: 1.4;
}
.lead-popup-social-proof strong {
    color: var(--p-primary);
}

/* ── Favorites nudge: body layout + show animation ──────────────────────────── */
.fav-nudge {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--p-surface, #fff);
    border: 1.5px solid var(--p-border, #e5e7eb);
    border-radius: 12px;
    padding: .75rem 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    min-width: 280px;
    max-width: 90vw;
    transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.fav-nudge.fav-nudge-show {
    transform: translateX(-50%) translateY(0);
}
.fav-nudge-body {
    display: flex;
    flex-direction: column;
    gap: .18rem;
    flex: 1;
    min-width: 0;
}
.fav-nudge-body strong {
    font-size: .88rem;
    font-weight: 700;
    color: var(--p-text-head, #111827);
}
.fav-nudge-body span {
    font-size: .78rem;
    color: var(--p-text-muted, #6b7280);
    line-height: 1.35;
}
.fav-nudge-cta {
    font-size: .8rem;
    font-weight: 700;
    color: #fff;
    background: var(--p-primary, #2563eb);
    border-radius: 8px;
    padding: .45rem .85rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}
.fav-nudge-cta:hover { background: var(--p-primary-dark, #1d4ed8); }
.fav-nudge-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .85rem;
    color: var(--p-text-muted, #9ca3af);
    padding: .2rem;
    line-height: 1;
    flex-shrink: 0;
}
.fav-nudge-close:hover { color: var(--p-text-body, #374151); }
/* On mobile, push nudges above mobile bottom nav (~56px) */
@media (max-width: 767px) {
    .fav-nudge       { bottom: calc(68px + env(safe-area-inset-bottom)); }
    .retention-nudge { bottom: calc(68px + env(safe-area-inset-bottom)); }
}

/* ── Trust chip: verified variant ───────────────────────────────────────────── */
.trust-chip-verified {
    border-color: #16a34a !important;
    color: #15803d !important;
    background: #f0fdf4 !important;
    font-weight: 700;
}
.trust-chip-verified .trust-tooltip {
    background: #15803d;
}

/* ════════════════════════════════════════════════════════════════════════════
   GROWTH + CONVERSION LAYER — FINAL
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Similar / recommended sections ─────────────────────────────────────────── */
.detail-related {
    max-width: 1280px;
    margin: 0 auto 2.5rem;
    padding: 0 2rem;
}
@media (max-width: 900px) {
    .detail-related { padding: 0 1rem; }
}

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

/* ── Similar properties section label ───────────────────────────────────────── */
.related-section-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--p-text-head, #111827);
    margin-bottom: 1.1rem;
}

/* ── Activity feed — "Someone contacted this property today" ─────────────────── */
.activity-feed {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .8rem;
    color: var(--p-text-muted, #6b7280);
    background: var(--p-surface-2, #f9fafb);
    border-radius: 8px;
    padding: .45rem .75rem;
    margin: .4rem 0 .65rem;
    border-left: 3px solid #22c55e;
    line-height: 1.35;
}
.activity-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    animation: actDotPulse 2s infinite;
}
@keyframes actDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(.75); }
}

/* ── Why act now section ─────────────────────────────────────────────────────── */
.why-act-now {
    margin-top: 1.75rem;
}
.why-act-now .detail-section-title {
    margin-bottom: .85rem;
}
.why-act-grid {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}
.why-act-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .75rem .9rem;
    background: var(--p-surface-2, #f9fafb);
    border-radius: 10px;
    border: 1px solid var(--p-border, #e5e7eb);
}
.why-act-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: .1rem;
}
.why-act-text strong {
    display: block;
    font-size: .88rem;
    font-weight: 700;
    color: var(--p-text-head, #111827);
    margin-bottom: .18rem;
}
.why-act-text p {
    font-size: .8rem;
    color: var(--p-text-muted, #6b7280);
    margin: 0;
    line-height: 1.45;
}

/* ── Exit bar — 2-stage floating bar ─────────────────────────────────────────── */
.exit-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: #fff;
    border-top: 1.5px solid var(--p-border, #e5e7eb);
    box-shadow: 0 -4px 24px rgba(0,0,0,.1);
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    padding: .9rem 1.25rem;
}
.exit-bar.exit-bar-open { transform: translateY(0); }
.exit-bar-inner {
    display: flex;
    align-items: center;
    gap: .85rem;
    max-width: 860px;
    margin: 0 auto;
    flex-wrap: wrap;
}
.exit-bar-copy {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: .12rem;
}
.exit-bar-copy strong {
    font-size: .92rem;
    font-weight: 700;
    color: var(--p-text-head, #111827);
}
.exit-bar-copy span {
    font-size: .78rem;
    color: var(--p-text-muted, #6b7280);
    line-height: 1.35;
}
.exit-bar-form {
    display: flex;
    gap: .5rem;
    flex: 1.5;
    min-width: 240px;
}
.exit-bar-input {
    flex: 1;
    height: 38px;
    border: 1.5px solid var(--p-border, #e5e7eb);
    border-radius: 8px;
    padding: 0 .75rem;
    font-size: .84rem;
    background: var(--p-surface, #fff);
    color: var(--p-text-body, #374151);
    outline: none;
    transition: border-color .15s;
}
.exit-bar-input:focus { border-color: var(--p-primary, #2563eb); }
.exit-bar-btn {
    height: 38px;
    padding: 0 1.1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: .84rem;
    font-weight: 700;
    background: var(--p-primary, #2563eb);
    color: #fff;
    white-space: nowrap;
    transition: background .15s, opacity .15s;
}
.exit-bar-btn:hover   { background: var(--p-primary-dark, #1d4ed8); }
.exit-bar-btn:disabled { opacity: .55; cursor: wait; }
.exit-bar-btn-wa {
    background: #25D366;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.exit-bar-btn-wa:hover { background: #1aab52; }
.exit-bar-close {
    background: none;
    border: none;
    font-size: .9rem;
    color: var(--p-text-muted, #9ca3af);
    cursor: pointer;
    padding: .3rem;
    flex-shrink: 0;
    line-height: 1;
}
.exit-bar-close:hover { color: var(--p-text-body, #374151); }
@media (max-width: 600px) {
    .exit-bar-form { flex-direction: column; }
    .exit-bar-btn  { width: 100%; justify-content: center; display: flex; align-items: center; }
}

/* ── Retention nudge — "Get alerts for similar properties" ───────────────────── */
.retention-nudge {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%) translateY(140%);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--p-surface, #fff);
    border: 1.5px solid var(--p-border, #e5e7eb);
    border-radius: 12px;
    padding: .75rem 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.13);
    min-width: 280px;
    max-width: 92vw;
    transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.retention-nudge.retention-show {
    transform: translateX(-50%) translateY(0);
}
.retention-nudge-body {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    flex: 1;
    min-width: 0;
}
.retention-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: .05rem;
}
.retention-text strong {
    display: block;
    font-size: .86rem;
    font-weight: 700;
    color: var(--p-text-head, #111827);
    margin-bottom: .1rem;
}
.retention-text span {
    font-size: .76rem;
    color: var(--p-text-muted, #6b7280);
    line-height: 1.35;
}
.retention-cta {
    font-size: .8rem;
    font-weight: 700;
    color: #fff;
    background: var(--p-primary, #2563eb);
    border-radius: 8px;
    padding: .42rem .8rem;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s;
}
.retention-cta:hover { background: var(--p-primary-dark, #1d4ed8); }
.retention-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .82rem;
    color: var(--p-text-muted, #9ca3af);
    padding: .2rem;
    flex-shrink: 0;
    line-height: 1;
}
.retention-close:hover { color: var(--p-text-body, #374151); }

/* ── Dashboard: trending badge + highlighted views cell ──────────────────────── */
.dash-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    font-size: .68rem;
    font-weight: 700;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    border-radius: 5px;
    padding: .1rem .38rem;
    vertical-align: middle;
    margin-left: .3rem;
    line-height: 1.5;
}
td.views-trending {
    color: #c2410c;
    font-weight: 700;
}

/* ── Dashboard: performance progress bar ─────────────────────────────────────── */
.insight-perf-bar-wrap {
    margin-top: .55rem;
}
.insight-perf-bar {
    position: relative;
    height: 7px;
    background: var(--p-border, #e5e7eb);
    border-radius: 99px;
    overflow: visible;
    margin-bottom: .3rem;
}
.insight-perf-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #6366f1, #22c55e);
    transition: width .6s cubic-bezier(.4,0,.2,1);
}
.insight-perf-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid #6366f1;
    box-shadow: 0 1px 4px rgba(99,102,241,.4);
}
.insight-perf-labels {
    display: flex;
    justify-content: space-between;
    font-size: .7rem;
    color: var(--p-text-muted, #9ca3af);
}
.insight-perf-you {
    font-weight: 700;
    color: var(--p-primary, #6366f1);
}

/* ════════════════════════════════════════════════════════════════════════════
   REAL-TIME + PSYCHOLOGY LAYER
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Micro animations ────────────────────────────────────────────────────────── */

/* WhatsApp button pulse */
@keyframes waPulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(37,211,102,.35); }
    50%       { box-shadow: 0 4px 22px rgba(37,211,102,.65), 0 0 0 6px rgba(37,211,102,.12); }
}
.btn-whatsapp { animation: waPulse 2.6s ease-in-out infinite; }
.btn-whatsapp:hover { animation: none; }

/* Featured card shimmer strip */
@keyframes cardShimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}
.property-card.card-featured { position: relative; overflow: hidden; }
.property-card.card-featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg,
        transparent 0%, rgba(255,215,0,.85) 40%, rgba(255,255,255,1) 50%, rgba(255,215,0,.85) 60%, transparent 100%);
    background-size: 200% 100%;
    animation: cardShimmer 2.2s linear infinite;
    z-index: 5;
}

/* Activity feed fade transition */
@keyframes feedFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.activity-feed.feed-fade-in { animation: feedFadeIn .4s ease forwards; }

/* ── WA connect overlay ──────────────────────────────────────────────────────── */
.wa-connecting {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.88);
    z-index: 99999;
    background: #fff;
    border-radius: 16px;
    padding: 1.2rem 1.8rem;
    box-shadow: 0 12px 48px rgba(0,0,0,.18);
    opacity: 0;
    transition: opacity .22s, transform .22s cubic-bezier(.34,1.56,.64,1);
    pointer-events: none;
}
.wa-connecting.wa-connecting-show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.wa-connecting-inner {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #25D366;
    font-weight: 700;
    font-size: .95rem;
    white-space: nowrap;
}
.wa-connecting-icon { flex-shrink: 0; }

/* Animated dots */
.wa-dots span {
    display: inline-block;
    animation: waDot 1.2s infinite;
    font-size: 1.1em;
}
.wa-dots span:nth-child(2) { animation-delay: .2s; }
.wa-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes waDot {
    0%, 80%, 100% { opacity: 0; transform: translateY(0); }
    40%            { opacity: 1; transform: translateY(-4px); }
}

/* ── Demand banner ───────────────────────────────────────────────────────────── */
.demand-banner {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    color: #c2410c;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: .35rem .75rem;
    margin: .45rem 0 .6rem;
    line-height: 1.3;
}

/* ── Scroll alert nudge (50%) ────────────────────────────────────────────────── */
.scroll-alert-nudge {
    position: fixed;
    bottom: 1.5rem;
    right: 1.25rem;
    z-index: 9992;
    display: flex;
    align-items: center;
    gap: .65rem;
    background: #fff;
    border: 1.5px solid var(--p-border, #e5e7eb);
    border-radius: 12px;
    padding: .7rem 1rem;
    box-shadow: 0 6px 28px rgba(0,0,0,.12);
    max-width: min(340px, 92vw);
    transform: translateY(120%);
    opacity: 0;
    transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .25s;
}
.scroll-alert-nudge.san-show { transform: translateY(0); opacity: 1; }
.san-text { font-size: .8rem; color: var(--p-text-body, #374151); flex: 1; line-height: 1.35; }
.san-btn {
    font-size: .78rem;
    font-weight: 700;
    color: #fff;
    background: var(--p-primary, #2563eb);
    border-radius: 7px;
    padding: .38rem .72rem;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s;
}
.san-btn:hover { background: var(--p-primary-dark, #1d4ed8); }
.san-close {
    background: none;
    border: none;
    font-size: .8rem;
    color: var(--p-text-muted, #9ca3af);
    cursor: pointer;
    padding: .15rem;
    line-height: 1;
    flex-shrink: 0;
}
.san-close:hover { color: var(--p-text-body, #374151); }

/* ── Contact urgency strip (80% scroll) ──────────────────────────────────────── */
.contact-urgency-strip {
    font-size: .8rem;
    font-weight: 700;
    color: #c2410c;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: .42rem .85rem;
    margin-bottom: .5rem;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .3s, transform .3s;
}
.contact-urgency-strip.cus-show { opacity: 1; transform: translateY(0); }

@keyframes contactPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,.0); }
    50%       { box-shadow: 0 0 0 6px rgba(249,115,22,.15); }
}
.contact-urgency-pulse { animation: contactPulse .6s ease 2; }

/* ── Trust toast variant ─────────────────────────────────────────────────────── */
.trust-toast { line-height: 1.45; }
.trust-toast small { font-size: .78rem; opacity: .85; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .scroll-alert-nudge { right: .75rem; left: .75rem; max-width: none; }
    .wa-connecting { width: calc(100vw - 2.5rem); }
}

/* ════════════════════════════════════════════════════════════════════════════
   ULTIMATE CONVERSION POLISH
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Help nudge: 80% scroll + 5s inactivity ─────────────────────────────────── */
.help-nudge {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(130%);
    z-index: 9993;
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #fff;
    border: 1.5px solid #25D366;
    border-radius: 12px;
    padding: .75rem 1.1rem;
    box-shadow: 0 6px 28px rgba(37,211,102,.2);
    min-width: 260px;
    max-width: min(400px, 92vw);
    transition: transform .38s cubic-bezier(.34,1.56,.64,1);
}
.help-nudge.help-nudge-show {
    transform: translateX(-50%) translateY(0);
}
.help-nudge-text {
    flex: 1;
    font-size: .84rem;
    font-weight: 600;
    color: var(--p-text-head, #111827);
    line-height: 1.3;
}
.help-nudge-btn {
    font-size: .8rem;
    font-weight: 700;
    color: #fff;
    background: #25D366;
    border-radius: 8px;
    padding: .42rem .85rem;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s;
}
.help-nudge-btn:hover { background: #1aab52; }
.help-nudge-close {
    background: none;
    border: none;
    font-size: .82rem;
    color: var(--p-text-muted, #9ca3af);
    cursor: pointer;
    padding: .2rem;
    line-height: 1;
    flex-shrink: 0;
}
.help-nudge-close:hover { color: var(--p-text-body, #374151); }

/* ── Emotional trigger ───────────────────────────────────────────────────────── */
.emotional-trigger {
    font-size: .8rem;
    font-style: italic;
    color: var(--p-text-muted, #9ca3af);
    margin: .75rem 0 1rem;
    line-height: 1.4;
    opacity: .85;
}

/* ── MOBILE DASHBOARD SECTION NAV ───────────────────────────────────────────── */

.dash-mobile-nav {
    display: none; /* hidden by default — shown only on mobile via media query below */
}

@media (max-width: 900px) {
    .dash-mobile-nav {
        display: flex;
        align-items: center;
        gap: .35rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: .5rem 0 .65rem;
        margin: -.25rem 0 .75rem;
        border-bottom: 1px solid var(--p-border);
    }
    .dash-mobile-nav::-webkit-scrollbar { display: none; }

    .dmn-tab {
        display: inline-flex;
        align-items: center;
        gap: .3rem;
        padding: .4rem .75rem;
        border-radius: var(--p-r-full);
        font-size: .78rem;
        font-weight: 600;
        color: var(--p-text-muted);
        background: var(--p-surface-2);
        border: 1.5px solid transparent;
        white-space: nowrap;
        flex-shrink: 0;
        text-decoration: none;
        transition: background var(--p-transition), color var(--p-transition), border-color var(--p-transition);
        cursor: pointer;
    }
    .dmn-tab:hover {
        background: var(--p-accent-bg);
        color: var(--p-accent);
        border-color: var(--p-success-border);
    }
    .dmn-tab.active {
        background: #1a365d;
        color: #fff;
        border-color: #1a365d;
    }
    .dmn-tab-add {
        background: var(--p-accent-bg);
        color: var(--p-accent);
        border-color: var(--p-success-border);
        font-weight: 700;
    }
    .dmn-tab-add:hover {
        background: var(--p-accent);
        color: #fff;
        border-color: var(--p-accent);
    }
}
