:root {
    --pink: #e6007e;
    --pink-dark: #b0005f;
    --ink: #10233f;
    --ink-soft: #4b5c72;
    --border: #e4e9f0;
    --bg: #f7f9fc;
    --green: #1e9e5a;
    --radius: 10px;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- Navbar ---------- */
.navbar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.navbar-inner {
    max-width: 1280px; margin: 0 auto; padding: 14px 32px;
    display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { width: 34px; height: 34px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { display: flex; align-items: baseline; gap: 6px; }
.brand-name-top {
    font-size: 19px; font-weight: 800; color: var(--pink); letter-spacing: 0.3px;
}
.brand-name-bottom {
    font-size: 13px; font-weight: 700; color: var(--pink); letter-spacing: 2px; text-transform: uppercase;
}
.brand-tagline {
    font-size: 10px; color: var(--ink-soft); letter-spacing: 0.2px; margin-top: 2px;
}

.nav-links { display: flex; gap: 26px; flex: 1; justify-content: center; }
.nav-links a { font-size: 14.5px; color: var(--ink); }
.nav-links a:hover, .nav-links a.active { color: var(--pink); }

.nav-actions { display: flex; align-items: center; gap: 20px; font-size: 14.5px; }
.nav-action-btn { background: none; border: none; cursor: pointer; font: inherit; color: inherit; padding: 0; }

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 34px; height: 34px; background: none; border: none; cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative; min-height: 460px; display: flex; align-items: center;
    background: linear-gradient(120deg, rgba(16,35,63,.72), rgba(16,35,63,.35)),
                url('https://images.unsplash.com/photo-1502672260266-1c1ef2d93688?q=80&w=1600&auto=format&fit=crop') center/cover;
    padding: 60px 32px;
}
.hero-content { max-width: 1280px; margin: 0 auto; width: 100%; color: #fff; }
.hero-content h1 { font-size: 46px; line-height: 1.15; margin: 0 0 16px; }
.hero-content p { font-size: 16px; max-width: 560px; color: #e6ebf3; margin: 0 0 34px; }

.search-bar {
    background: #fff; border-radius: var(--radius); padding: 14px;
    display: flex; align-items: stretch; gap: 10px; box-shadow: 0 12px 30px rgba(16,35,63,.18);
    max-width: 980px; flex-wrap: wrap;
}
.search-bar-inline { max-width: none; margin-top: 18px; }
.search-field { display: flex; align-items: center; gap: 10px; padding: 4px 14px; flex: 1; min-width: 180px; border-right: 1px solid var(--border); }
.search-field:last-of-type { border-right: none; }
.search-field label { display: block; font-size: 11.5px; color: var(--ink-soft); margin-bottom: 2px; }
.search-field input, .search-field select {
    border: none; font-size: 14.5px; color: var(--ink); width: 100%; background: transparent; font-weight: 600;
}
.search-field input:focus, .search-field select:focus { outline: none; }
.field-icon { color: var(--pink); font-size: 17px; }
.search-btn {
    background: var(--pink); color: #fff; border: none; border-radius: 8px;
    padding: 0 26px; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.search-btn:hover { background: var(--pink-dark); }

/* ---------- Page header (browse) ---------- */
.page-header { max-width: 1280px; margin: 0 auto; padding: 40px 32px 0; }
.page-header h1 { font-size: 32px; margin: 0; }

/* ---------- Featured / grid ---------- */
.featured { max-width: 1280px; margin: 0 auto; padding: 60px 32px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.section-heading h2 { font-size: 28px; margin: 0 0 6px; }
.section-heading p { color: var(--ink-soft); margin: 0; font-size: 14.5px; }
.view-all { color: var(--pink); font-weight: 600; font-size: 14.5px; }

.property-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; align-items: stretch; }
.property-card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); display: flex; flex-direction: column; height: 100%; }
.property-image { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.property-image img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 12px; left: 12px; background: var(--green); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 5px; }
.heart { position: absolute; top: 10px; right: 10px; background: #fff; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px; color: var(--ink); transition: transform .15s ease; }
.heart:hover { transform: scale(1.08); }
.heart.active { color: var(--pink); }

.property-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.property-body h3 { font-size: 16.5px; margin: 0 0 6px; }
.price { color: var(--pink); font-weight: 700; font-size: 15.5px; margin: 0 0 6px; }
.location { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 12px; }
.property-stats { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 16px; }
.property-stats span { display: flex; align-items: center; gap: 4px; }
.property-body .btn-primary { margin-top: auto; }

.btn-primary {
    display: block; text-align: center; background: var(--pink); color: #fff; border: none;
    border-radius: 8px; padding: 11px; font-weight: 600; font-size: 14.5px; cursor: pointer; width: 100%;
}
.btn-primary:hover { background: var(--pink-dark); }
.btn-secondary {
    display: block; text-align: center; background: #fff; color: var(--pink); border: 1.5px solid var(--pink);
    border-radius: 8px; padding: 11px; font-weight: 600; font-size: 14.5px; cursor: pointer; width: 100%;
}
.btn-large { padding: 13px; font-size: 15.5px; }

.empty-state { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); padding: 40px 0; }
.empty-state a { color: var(--pink); font-weight: 600; }

/* ---------- Admin ---------- */
.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-row {
    display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 16px;
}
.admin-row-thumb { width: 70px; height: 54px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.admin-row-info { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-row-info span { font-size: 13px; color: var(--ink-soft); }
.admin-row-status { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); padding: 4px 10px; border-radius: 6px; background: var(--bg); white-space: nowrap; }
.admin-row-status.is-featured { color: var(--green); background: #e8f7ee; }
.admin-row-status.status-pending { color: #a9760a; background: #fdf3e0; }
.admin-row-status.status-approved { color: var(--green); background: #e8f7ee; }
.admin-row-status.status-rejected { color: #b42323; background: #fdeaea; }
.admin-toggle-btn { width: auto; padding: 8px 18px; white-space: nowrap; }
.admin-poster { font-size: 12px; color: var(--ink-soft); font-style: italic; }
.cover-picker { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cover-picker-thumb { width: 44px; height: 34px; object-fit: cover; border-radius: 5px; cursor: pointer; opacity: 0.55; border: 2px solid transparent; transition: opacity .15s ease, border-color .15s ease; }
.cover-picker-thumb:hover { opacity: 0.9; }
.cover-picker-thumb.active { opacity: 1; border-color: var(--pink); }

/* ---------- Inline edit panel (admin) ---------- */
.admin-row-wrapper { display: flex; flex-direction: column; }
.edit-panel {
    background: #fbfbfd; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; margin-top: 8px;
}
.edit-panel .form-row { margin-bottom: 12px; }
.edit-panel textarea { font-family: monospace; font-size: 12.5px; }
.edit-photo-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.edit-photo-thumb-wrap { position: relative; width: 72px; height: 56px; flex-shrink: 0; }
.edit-photo-thumb { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.edit-photo-remove {
    position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
    background: #b42323; color: #fff; border: 2px solid #fff; font-size: 13px; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.edit-photo-remove:hover { background: #8f1c1c; }
.edit-panel input[type="file"] { font-size: 13px; }

.admin-row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-action-btn { width: auto; padding: 8px 18px; white-space: nowrap; }
.admin-delete-btn { background: none; border: 1.5px solid #f0c4c4; color: #b42323; border-radius: 8px; padding: 8px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.admin-delete-btn:hover { background: #fdeaea; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-tab { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.admin-tab.active { background: var(--pink); border-color: var(--pink); color: #fff; }
.admin-row-status.status-booked { color: #6b4fbb; background: #eee7fb; }

/* ---------- Admin dashboard ---------- */
.dashboard-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 26px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; }
.stat-card .stat-number { font-size: 26px; font-weight: 800; color: var(--pink); }
.stat-card .stat-label { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.dashboard-toplists { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.top-list-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.top-list-card h4 { margin: 0 0 12px; font-size: 14.5px; }
.top-list-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid var(--border); }
.top-list-row:last-child { border-bottom: none; }
.top-list-row .tl-title { color: var(--ink); }
.top-list-row .tl-count { color: var(--pink); font-weight: 700; white-space: nowrap; margin-left: 10px; }
@media (max-width: 1024px) {
    .dashboard-stats { grid-template-columns: repeat(3, 1fr); }
    .dashboard-toplists { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Ads (admin management) ---------- */
.ads-section { margin-top: 48px; }
.ads-section h2 { font-size: 22px; margin-bottom: 4px; }
.ads-list { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.ad-row { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.ad-row-thumb { width: 90px; height: 60px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.ad-row-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ad-row-info span { font-size: 12.5px; color: var(--ink-soft); }
.ad-placement-pill { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eee7fb; color: #6b4fbb; display: inline-block; width: fit-content; }
.ad-active-pill { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.ad-active-pill.is-active { background: #e8f7ee; color: var(--green); }
.ad-active-pill.is-inactive { background: var(--bg); color: var(--ink-soft); }
.ad-form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 16px; }

/* ---------- Mid-page ad slider (continuous, seamless loop) ---------- */
.ad-banner-section { max-width: 1280px; margin: 0 auto 60px; padding: 0 32px; }
.ad-banner-section:empty { display: none; }

.ad-slider-label { margin-bottom: 10px; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--ink-soft); }

.ad-slider {
    overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 14px;
    padding: 14px 0; box-shadow: 0 6px 20px rgba(16,35,63,.06);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
            mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}
/* two identical sets side by side; sliding by 50% loops with no jump.
   -50% -> 0 moves left to right. Swap the two values to move right to left. */
.ad-track {
    display: flex; width: max-content;
    animation: adScroll var(--ad-duration, 40s) linear infinite;
    will-change: transform;
}
.ad-slider:hover .ad-track, .ad-slider.is-paused .ad-track { animation-play-state: paused; }
@keyframes adScroll { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.ad-banner {
    position: relative; flex: 0 0 auto; display: block; width: 280px; height: 160px; margin-right: 16px;
    border-radius: 10px; overflow: hidden; background: var(--ink); cursor: zoom-in;
    transition: transform .2s ease, box-shadow .2s ease;
}
.ad-banner:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(16,35,63,.22); }
/* blurred copy of the image fills spare space so any banner shape looks finished */
.ad-banner-bg { position: absolute; inset: -16px; background-size: cover; background-position: center; filter: blur(16px) brightness(.8); transform: scale(1.1); }
.ad-banner img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; }
.ad-banner-tag {
    position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(16,35,63,.7); color: #fff;
    font-size: 9.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
}

/* one ad only: no scrolling, just centred */
.ad-slider.ad-single .ad-track { animation: none; width: auto; justify-content: center; }
.ad-slider.ad-single .ad-banner { width: min(100% - 32px, 560px); height: 180px; margin: 0; }

/* ---------- Home page ad popup ---------- */
.ad-popup-overlay {
    position: fixed; inset: 0; z-index: 500; background: rgba(16,35,63,.65);
    backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center;
    padding: 16px; animation: adFade .3s ease;
}
.ad-popup-box {
    position: relative; width: 100%; max-width: 380px; background: #fff;
    border-radius: 14px; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.4);
    animation: adPop .35s cubic-bezier(.22,.61,.36,1);
}
/* capped well below screen height so the whole ad and the close button always fit */
.ad-popup-box img { display: block; width: 100%; max-height: calc(100vh - 110px); object-fit: contain; background: #fff; }
.ad-popup-box img.has-link { cursor: pointer; }
.ad-popup-close {
    position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px;
    border-radius: 50%; border: none; background: #fff; color: var(--ink); font-size: 20px; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 12px rgba(0,0,0,.35); transition: background .15s ease, color .15s ease;
}
.ad-popup-close:hover { background: var(--pink); color: #fff; }

@keyframes adFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes adPop { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
    .ad-banner-section { padding: 0 16px; margin-bottom: 40px; }
    .ad-banner { width: 220px; height: 130px; margin-right: 12px; }
    .ad-slider.ad-single .ad-banner { height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
    .ad-track { animation: none; }
    .ad-slider { overflow-x: auto; }
    .ad-popup-overlay, .ad-popup-box, .ad-lightbox, .ad-lb-box { animation: none; }
}

/* ---------- Ad lightbox (tap an ad to see it full size) ---------- */
.ad-lightbox {
    position: fixed; inset: 0; z-index: 600; background: rgba(8,16,30,.88); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 20px; animation: adFade .25s ease;
}
.ad-lb-box {
    display: flex; flex-direction: column; max-width: min(94vw, 900px); max-height: 94vh;
    background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.5);
    animation: adPop .3s cubic-bezier(.22,.61,.36,1);
}
.ad-lb-img { display: block; max-width: 100%; max-height: calc(94vh - 64px); width: auto; height: auto; object-fit: contain; margin: 0 auto; background: #fff; }
.ad-lb-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; min-height: 0; }
.ad-lb-foot:empty { display: none; }
.ad-lb-caption { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.ad-lb-caption small { font-weight: 500; color: var(--ink-soft); margin-left: 6px; }
.ad-lb-visit { background: var(--pink); color: #fff; font-weight: 600; font-size: 13.5px; padding: 9px 18px; border-radius: 999px; white-space: nowrap; }
.ad-lb-visit:hover { background: var(--pink-dark); }
.ad-lb-close, .ad-lb-arrow {
    position: absolute; z-index: 2; border: none; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--ink);
    cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1;
    box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: background .15s ease, color .15s ease;
}
.ad-lb-close { top: 16px; right: 16px; width: 40px; height: 40px; font-size: 24px; }
.ad-lb-arrow { top: 50%; transform: translateY(-50%); width: 44px; height: 44px; font-size: 26px; }
.ad-lb-arrow.prev { left: 16px; }
.ad-lb-arrow.next { right: 16px; }
.ad-lb-close:hover, .ad-lb-arrow:hover { background: var(--pink); color: #fff; }
@media (max-width: 640px) {
    .ad-lightbox { padding: 12px; }
    .ad-lb-arrow { width: 38px; height: 38px; font-size: 22px; top: auto; bottom: 16px; transform: none; }
    .ad-lb-arrow.prev { left: 16px; }
    .ad-lb-arrow.next { right: 16px; }
}

/* ---------- Perks strip ---------- */
.perks {
    background: #fbe6f2; padding: 44px 32px; display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 24px; text-align: center;
}
.perk-icon { display: inline-block; font-size: 22px; color: var(--pink); border: 2px solid var(--pink); border-radius: 50%; width: 46px; height: 46px; line-height: 42px; margin-bottom: 10px; }
.perks h4 { font-size: 14.5px; margin: 0 0 6px; }
.perks p { font-size: 12.5px; color: var(--ink-soft); margin: 0; }

/* ---------- Detail page ---------- */
.detail { max-width: 1100px; margin: 0 auto; padding: 40px 32px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.detail-gallery img { border-radius: var(--radius); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
#main-gallery-image { transition: opacity .25s ease; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery-thumbs img { height: 70px; width: 90px; object-fit: cover; border-radius: 6px; }
.gallery-thumbs img {
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: opacity .15s ease, border-color .15s ease;
}
.gallery-thumbs img:hover { opacity: 1; }
.gallery-thumbs img.active {
    opacity: 1;
    border-color: var(--pink);
}
.detail-info h1 { font-size: 26px; margin: 10px 0 6px; }
.detail-stats { margin: 18px 0; font-size: 14px; }
.contact-box { margin-top: 26px; background: #fbe6f2; border-radius: var(--radius); padding: 18px; }

/* ---------- Detail page: actions, meta, agent card ---------- */
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.detail-actions .action-btn {
    display: flex; align-items: center; gap: 7px; border: none; border-radius: 999px;
    padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.action-btn.btn-call { background: var(--pink); color: #fff; }
.action-btn.btn-call:hover { background: var(--pink-dark); }
.action-btn.btn-whatsapp { background: #25d366; color: #fff; }
.action-btn.btn-whatsapp:hover { background: #1ebd5a; }
.action-btn.btn-outline { background: #fff; color: var(--ink); border: 1.5px solid var(--border) !important; }
.action-btn.btn-outline:hover { border-color: var(--pink) !important; color: var(--pink); }
.action-btn.btn-outline.is-saved { color: var(--pink); border-color: var(--pink) !important; }

.detail-meta {
    display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--ink-soft);
    padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border);
}
.detail-meta span { display: flex; align-items: center; gap: 5px; }

.agent-card { margin-top: 26px; background: #fbe6f2; border-radius: var(--radius); padding: 20px; }
.agent-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.agent-avatar {
    width: 44px; height: 44px; border-radius: 50%; background: var(--pink); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.agent-name { font-weight: 700; font-size: 15px; }
.agent-role { font-size: 12.5px; color: var(--ink-soft); }
.agent-contact-line { font-size: 13.5px; margin: 6px 0; }
.report-link { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--ink-soft); text-decoration: underline; cursor: pointer; }

/* ---------- Forms (list property / auth) ---------- */
.form-page, .auth-page { max-width: 760px; margin: 0 auto; padding: 50px 32px 80px; }
.form-subtitle { color: var(--ink-soft); margin-top: 4px; }
.listing-form, .auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.listing-form label, .auth-form label, .full-width { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.listing-form input, .listing-form select, .listing-form textarea,
.auth-form input {
    border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14.5px; color: var(--ink); font-weight: 400;
}
.listing-form small { font-weight: 400; color: var(--ink-soft); }

.auth-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; }
.auth-divider { text-align: center; color: var(--ink-soft); font-size: 13px; margin: 22px 0; position: relative; }
.alert { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin: 14px 0 0; }
.alert-error { background: #fdeaea; color: #b42323; }
.alert-success { background: #e8f7ee; color: var(--green); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cbd6e6; margin-top: 60px; }
.footer-main { max-width: 1280px; margin: 0 auto; padding: 50px 32px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.4fr; gap: 24px; }
.footer-col h4 { color: #fff; font-size: 14px; margin: 0 0 14px; }
.footer-col a { display: block; color: #a9b7cc; font-size: 13.5px; margin-bottom: 10px; }
.footer-note { font-size: 13px; margin: 0 0 12px; }
.social-icons { display: flex; gap: 10px; }
.social-icons a { width: 30px; height: 30px; border-radius: 50%; background: #1c3557; display: flex; align-items: center; justify-content: center; font-size: 11px; margin: 0; }
.subscribe-form { display: flex; gap: 8px; }
.subscribe-form input { flex: 1; border: none; border-radius: 6px; padding: 9px 10px; font-size: 13px; }
.subscribe-form button { background: var(--pink); color: #fff; border: none; border-radius: 6px; padding: 0 14px; font-weight: 600; font-size: 13px; cursor: pointer; }
.footer-bottom { border-top: 1px solid #1c3557; padding: 18px 32px; max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; font-size: 12.5px; color: #8fa0b8; }
.footer-bottom a { text-decoration: underline; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Developer credit ---------- */
.dev-credit {
    max-width: 1280px; margin: 0 auto; padding: 22px 32px;
    border-top: 1px solid #1c3557;
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.dev-credit-logo { height: 42px; width: auto; border-radius: 8px; background: #fff; padding: 5px; flex-shrink: 0; }
.dev-credit-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 220px; }
.dev-credit-label { font-size: 11.5px; color: #8fa0b8; }
.dev-credit-name { font-size: 15.5px; font-weight: 700; color: #fff; }
.dev-credit-name:hover { color: var(--pink); }
.dev-credit-tagline { font-size: 11.5px; color: #8fa0b8; font-style: italic; }
.dev-credit-btn {
    background: var(--pink); color: #fff; font-size: 13px; font-weight: 600;
    padding: 10px 20px; border-radius: 999px; white-space: nowrap; flex-shrink: 0;
}
.dev-credit-btn:hover { background: var(--pink-dark); }
@media (max-width: 640px) {
    .dev-credit { justify-content: center; text-align: center; }
    .dev-credit-text { text-align: center; align-items: center; }
}
.footer-legal { display: flex; gap: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .property-grid { grid-template-columns: repeat(2, 1fr); }
    .perks { grid-template-columns: repeat(2, 1fr); }
    .detail { grid-template-columns: 1fr; }
    .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--border); flex-direction: column;
        gap: 0; padding: 8px 0; box-shadow: 0 12px 20px rgba(16,35,63,.08);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 32px; border-bottom: 1px solid var(--border); }
    .nav-links a:last-child { border-bottom: none; }
    .navbar-inner { position: relative; flex-wrap: wrap; }
    .property-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 32px; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .gallery-thumbs img { height: 56px; width: 70px; }
    .edit-panel .form-row { grid-template-columns: 1fr; }
}

/* ---------- Hero welcome video: fills the right half of the hero ---------- */
.hero { overflow: hidden; }
.hero-content { position: relative; z-index: 2; pointer-events: none; }   /* text + search bar sit above the video */
.hero-content h1, .hero-content p, .hero-content .search-bar { pointer-events: auto; }
.hero-content h1 { width: fit-content; }

.hero-video {
    --ratio: 1.7778;          /* updated from the real video size by welcome.js */
    --video-fit: cover;       /* cover = fills the whole area (may trim the edges); contain = shows every pixel */
    position: absolute; z-index: 1; top: 0; right: 0; bottom: 0; width: 50%;
    background: #0b1626; overflow: hidden;
}
.hero-video video { display: block; width: 100%; height: 100%; object-fit: var(--video-fit); background: #0b1626; }
/* soft fade on the left edge so the video blends into the hero photo */
.hero-video::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(to right, rgba(16,35,63,.9), rgba(16,35,63,0) 30%);
}

.hero-video-spinner { position: absolute; inset: 0; z-index: 2; display: none; align-items: center; justify-content: center; pointer-events: none; }
.hero-video.is-loading .hero-video-spinner { display: flex; }
.hero-video-spinner::after {
    content: ""; width: 38px; height: 38px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; animation: heroSpin .8s linear infinite;
}
@keyframes heroSpin { to { transform: rotate(360deg); } }

.hero-video-sound {
    position: absolute; top: 14px; right: 56px; z-index: 3; border: none; cursor: pointer;
    background: rgba(16,35,63,.85); color: #fff; font: inherit; font-size: 13px; font-weight: 600;
    padding: 8px 15px; border-radius: 999px; backdrop-filter: blur(4px); animation: heroNudge 2.4s ease-in-out infinite;
}
.hero-video-sound:hover { background: var(--pink); }
.hero-video.is-sound .hero-video-sound { display: none; }
@keyframes heroNudge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.hero-video-hide {
    position: absolute; top: 14px; right: 14px; z-index: 3; width: 32px; height: 32px; border: none; border-radius: 50%;
    background: rgba(16,35,63,.85); color: #fff; font-size: 19px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.hero-video-hide:hover { background: var(--pink); }

.hero-video-play {
    position: absolute; inset: 0; z-index: 2; display: none; align-items: center; justify-content: center;
    border: none; background: rgba(8,16,30,.35); color: #fff; font-size: 34px; cursor: pointer; padding-left: 6px;
}
.hero-video.is-paused:not(.has-controls) .hero-video-play { display: flex; }

/* tablets and phones: the video moves under the search bar, full width */
@media (max-width: 1100px) {
    .hero { flex-direction: column; align-items: stretch; }

    /* lets the heading, paragraph and search form be ordered individually */
    .hero-content { display: contents; }
    .hero-content h1 { order: 1; }
    .hero-content p { order: 2; margin-bottom: 20px; }
    .hero-video { order: 3; }
    .hero-content .search-bar { order: 4; }

    .hero-video {
        --video-fit: contain; position: relative; inset: auto; z-index: 1;
        width: 100%; max-width: 560px; aspect-ratio: var(--ratio); max-height: 75vh;
        margin: 0 auto 22px; border-radius: 14px;
    }
    .hero-video::after { display: none; }
}
@media (max-width: 640px) {
    .hero { padding: 40px 16px; min-height: 0; }
    .hero-video { margin-bottom: 18px; border-radius: 12px; }
    .hero-video-hide { width: 40px; height: 40px; font-size: 22px; }
    .hero-video-play { font-size: 40px; }
}
}
@media (prefers-reduced-motion: reduce) {
    .hero-video-sound, .hero-video-spinner::after { animation: none; }
}

/* ---------- Admin sidebar layout ---------- */
:root { --nav-h: 69px; }
.admin-layout { display: grid; grid-template-columns: 250px 1fr; max-width: none; margin: 0; min-height: calc(100vh - var(--nav-h)); }

.admin-sidebar {
    position: sticky; top: var(--nav-h); align-self: start; height: calc(100vh - var(--nav-h));
    background: var(--ink); color: #cbd6e6; display: flex; flex-direction: column; padding: 22px 14px; overflow-y: auto;
}
.admin-sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 18px; }
.admin-sidebar-title { color: #fff; font-weight: 800; font-size: 15px; letter-spacing: 1.2px; text-transform: uppercase; }
.admin-sidebar-close { display: none; background: none; border: none; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }

.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav-link {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: none; background: none; cursor: pointer;
    font: inherit; font-size: 14.5px; font-weight: 600; color: #cbd6e6; padding: 12px 14px; border-radius: 10px;
    border-left: 3px solid transparent; transition: background .15s ease, color .15s ease;
}
.admin-nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav-link.active { background: rgba(230,0,126,.16); color: #fff; border-left-color: var(--pink); }
.admin-nav-icon { width: 22px; text-align: center; font-size: 16px; }
.admin-nav-badge { margin-left: auto; background: var(--pink); color: #fff; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.admin-sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid #1c3557; display: flex; flex-direction: column; gap: 4px; }

.admin-main { min-width: 0; }
.admin-content { padding: 32px 36px 60px; max-width: 1240px; }
.admin-mobilebar { display: none; }
.admin-overlay { display: none; }

.admin-panel { display: none; }
.admin-panel.active { display: block; animation: adFade .25s ease; }
.admin-panel-head { margin-bottom: 24px; }
.admin-panel-head h1 { font-size: 28px; margin: 0 0 4px; }
.admin-panel .ads-section { margin-top: 0; }

@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: fixed; z-index: 400; top: 0; left: 0; bottom: 0; height: auto; width: 270px;
        transform: translateX(-100%); transition: transform .25s ease; box-shadow: 8px 0 30px rgba(0,0,0,.3);
    }
    .admin-sidebar.open { transform: none; }
    .admin-sidebar-close { display: block; }
    .admin-overlay.open { display: block; position: fixed; inset: 0; z-index: 399; background: rgba(8,16,30,.55); }
    .admin-mobilebar {
        display: flex; align-items: center; gap: 12px; position: sticky; top: var(--nav-h); z-index: 15;
        background: #fff; border-bottom: 1px solid var(--border); padding: 10px 16px;
    }
    .admin-menu-btn { background: var(--ink); color: #fff; border: none; border-radius: 8px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
    .admin-mobilebar-title { font-weight: 700; color: var(--ink); }
    .admin-content { padding: 22px 16px 50px; }
    .admin-panel-head h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
    .admin-sidebar { transition: none; }
    .admin-panel.active { animation: none; }
}

/* ---------- Admin overview: alert, KPI cards, charts ---------- */
.dash-alert { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; font-weight: 600; font-size: 14.5px; }
.dash-alert.warn { background: #fdf3e0; color: #7a5508; border: 1px solid #f3dca8; }
.dash-alert.ok { background: #e8f7ee; color: #157a45; border: 1px solid #bfe6d0; }
.dash-alert-btn { background: var(--pink); color: #fff; border: none; border-radius: 999px; padding: 8px 18px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.dash-alert-btn:hover { background: var(--pink-dark); }

.dashboard-stats { grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); }
.kpi-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: 0 4px 14px rgba(16,35,63,.04); transition: transform .2s ease, box-shadow .2s ease; }
.kpi-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(16,35,63,.1); }
.kpi-card.kpi-attention { border-color: #f3dca8; background: linear-gradient(135deg, #fff, #fff8e8); }
.kpi-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.kpi-blue { background: #e8f0fe; } .kpi-amber { background: #fdf3e0; } .kpi-green { background: #e8f7ee; } .kpi-pink { background: #fbe6f2; } .kpi-purple { background: #eee7fb; }
.kpi-body { min-width: 0; }
.kpi-num { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 3px; }
.kpi-sub { font-size: 11.5px; color: var(--ink-soft); margin-top: 1px; }

.dashboard-toplists { gap: 20px; }
.chart-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px; box-shadow: 0 4px 14px rgba(16,35,63,.04); min-width: 0; }
.chart-card h4 { margin: 0; font-size: 15.5px; }
.chart-sub { margin: 3px 0 16px; font-size: 12.5px; color: var(--ink-soft); }
.chart-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

.donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut { width: 160px; height: 160px; flex-shrink: 0; }
.donut-seg { animation: donutDraw 1s ease-out both; }
@keyframes donutDraw { from { stroke-dasharray: 0 400; } }
.donut-total { font-size: 30px; font-weight: 800; fill: var(--ink); }
.donut-sub { font-size: 11px; fill: var(--ink-soft); }
.legend { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 10px; }
.legend-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.legend-dot { width: 11px; height: 11px; border-radius: 4px; flex-shrink: 0; }
.legend-label { color: var(--ink-soft); }
.legend-val { margin-left: auto; font-weight: 700; color: var(--ink); }
.legend-val small { font-weight: 500; color: var(--ink-soft); margin-left: 4px; }

.bar-chart { width: 100%; height: auto; display: block; }
.bc-grid { stroke: #e9eef5; stroke-width: 1; }
.bc-val { font-size: 11px; font-weight: 700; fill: var(--ink); }
.bc-lab { font-size: 11px; fill: var(--ink-soft); }
.bc-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: barGrow .7s cubic-bezier(.22,.61,.36,1) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes barGrow { from { transform: scaleY(0); } }

.hbar-row { margin-bottom: 14px; }
.hbar-row:last-child { margin-bottom: 0; }
.hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }
.hbar-title { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-val { font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.hbar-track { height: 9px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ff5cae, var(--pink)); animation: hbarGrow .8s cubic-bezier(.22,.61,.36,1) both; }
.hbar-fill.alt { background: linear-gradient(90deg, #4f8cff, #6b4fbb); }
@keyframes hbarGrow { from { width: 0; } }

.recent-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.recent-row:last-child { border-bottom: none; }
.recent-thumb { width: 52px; height: 40px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: var(--bg); }
.recent-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.recent-info strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-info span { font-size: 12px; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
    .donut-seg, .bc-bar, .hbar-fill { animation: none; }
    .kpi-card:hover { transform: none; }
}