/* ==========================================================================
   Place In — shared design system (public site + agent portal)
   ========================================================================== */

:root {
    --navy-950: #0f1030;
    --navy-900: #14153b;
    --navy-800: #1b1c4d;
    --navy-700: #262862;
    --navy-100: #e7e8f6;
    --amber-500: #edbc6d;
    --amber-600: #d9a24e;
    --amber-100: #fbf1e0;
    --white: #ffffff;
    --ink-900: #14152b;
    --ink-700: #4a4b66;
    --ink-500: #7a7b96;
    --ink-300: #c3c4da;
    --ink-100: #eef0fa;
    --success: #1fa971;
    --danger: #e0483e;
    --warning: #edbc6d;
    --info: #3b6ee6;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --shadow-card: 0 4px 24px rgba(20, 21, 43, 0.08);
    --shadow-pop: 0 12px 40px rgba(20, 21, 43, 0.16);

    --container: 1180px;
    --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font);
    color: var(--ink-900);
    background: var(--ink-100);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; color: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-pill);
    padding: 13px 26px;
    font-size: 15px;
    font-weight: 600;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
    white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--amber-500); color: var(--navy-950); }
.btn-primary:hover { background: var(--amber-600); }
.btn-dark { background: var(--navy-900); color: var(--white); }
.btn-dark:hover { background: var(--navy-800); }
.btn-outline { background: transparent; color: var(--navy-900); border: 1.5px solid var(--ink-300); }
.btn-outline:hover { border-color: var(--navy-900); }
.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; text-align: left; }
.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-700);
    margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--ink-300);
    font-size: 15px;
    font-family: inherit;
    background: var(--white);
    color: var(--ink-900);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--amber-500);
    box-shadow: 0 0 0 3px var(--amber-100);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-hint { font-size: 12.5px; color: var(--ink-500); margin-top: 6px; }
.field-error { font-size: 12.5px; color: var(--danger); margin-top: 6px; }

.form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 40px;
    max-width: 440px;
    margin: 0 auto;
}
.form-card h1 { margin: 0 0 6px; font-size: 26px; }
.form-card .subtitle { color: var(--ink-500); margin: 0 0 28px; font-size: 14.5px; }
.form-alt { text-align: center; margin-top: 20px; font-size: 14px; color: var(--ink-500); }
.form-alt a { color: var(--amber-600); font-weight: 600; }

.alert {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 18px;
}
.alert-error { background: #fdeceb; color: var(--danger); }
.alert-success { background: #e7f8f1; color: var(--success); }

/* ---------- Top navbar (public site) ---------- */
.navbar {
    background: var(--navy-950);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 50;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.navbar .logo { display: flex; align-items: center; }
.navbar .logo img { height: 26px; width: auto; display: block; }
.navbar nav { display: flex; align-items: center; gap: 28px; }
.navbar nav a { font-size: 14.5px; font-weight: 500; color: var(--ink-300); }
.navbar nav a.active, .navbar nav a:hover { color: var(--white); }
.navbar .actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(160deg, var(--navy-950), var(--navy-800));
    color: var(--white);
    padding: 72px 0 100px;
    text-align: center;
}
.hero h1 { font-size: 42px; margin: 0 0 14px; line-height: 1.15; }
.hero h1 span { color: var(--amber-500); }
.hero p { color: var(--ink-300); font-size: 17px; max-width: 560px; margin: 0 auto 34px; }

.search-bar {
    background: var(--white);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-pop);
    padding: 8px;
    display: flex;
    gap: 8px;
    max-width: 720px;
    margin: 0 auto;
}
.search-bar input {
    flex: 1;
    border: none;
    padding: 14px 20px;
    font-size: 15px;
    border-radius: var(--radius-pill);
}
.search-bar input:focus { outline: none; }

.country-chips { display: flex; gap: 10px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.country-chip {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    color: var(--white);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 13.5px;
    font-weight: 500;
}
.country-chip:hover { background: rgba(255,255,255,0.16); }

/* ---------- Filters bar ---------- */
.filters-bar {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 20px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin: -56px auto 40px;
    max-width: var(--container);
    position: relative;
    z-index: 5;
}
.filters-bar .field { margin-bottom: 0; min-width: 150px; flex: 1; }

/* ---------- Section headings ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 48px 0 22px; }
.section-head h2 { font-size: 24px; margin: 0; }
.section-head a { color: var(--amber-600); font-weight: 600; font-size: 14px; }

/* ---------- Property cards ---------- */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 22px;
}
.property-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform .15s ease, box-shadow .15s ease;
    position: relative;
}
.property-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.property-card .thumb {
    height: 190px;
    background: var(--navy-100) center/cover no-repeat;
    position: relative;
}
.property-card .badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--amber-500); color: var(--navy-950);
    font-size: 11.5px; font-weight: 700; text-transform: uppercase;
    padding: 5px 10px; border-radius: var(--radius-pill);
}
.save-btn {
    position: absolute; top: 10px; right: 10px;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.9); border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.save-btn.saved { color: var(--danger); }
.property-card .body { padding: 16px 18px 20px; }
.property-card .price { font-size: 19px; font-weight: 700; color: var(--navy-900); }
.property-card .title { font-size: 15px; font-weight: 600; margin: 4px 0 6px; }
.property-card .loc { font-size: 13px; color: var(--ink-500); margin-bottom: 10px; }
.property-card .meta { display: flex; gap: 14px; font-size: 13px; color: var(--ink-700); border-top: 1px solid var(--ink-100); padding-top: 12px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-500); }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--navy-950); color: var(--ink-300); margin-top: 80px; padding: 48px 0 28px; font-size: 13.5px; }
footer.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }

/* ---------- Auth pages ---------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--navy-950), var(--navy-800));
    padding: 40px 20px;
}
.auth-page .brand { text-align: center; margin-bottom: 26px; }
.auth-page .brand a { display: inline-flex; }
.auth-page .brand img { height: 32px; width: auto; display: block; }

/* ---------- Steps / onboarding ---------- */
.step-page { min-height: 100vh; background: var(--navy-950); color: var(--white); display: flex; flex-direction: column; }
.step-progress { height: 4px; background: var(--navy-700); }
.step-progress-fill { height: 100%; background: var(--amber-500); transition: width .3s ease; }
.step-body { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 480px; margin: 0 auto; padding: 40px 24px; width: 100%; }
.step-body h2 { font-size: 24px; margin-bottom: 8px; }
.step-body .step-count { color: var(--ink-300); font-size: 13px; margin-bottom: 18px; }
.option-list { display: flex; flex-direction: column; gap: 12px; margin: 24px 0; }
.option-item {
    background: var(--navy-800);
    border: 1.5px solid var(--navy-700);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    color: var(--white);
}
.option-item.selected { border-color: var(--amber-500); background: rgba(245,166,35,0.12); }
.step-actions { display: flex; justify-content: space-between; margin-top: 24px; }

/* ---------- Detail page ---------- */
.hero-wrap { position: relative; }
.hero-back-btn, .hero-save-btn {
    position: absolute; top: 16px; z-index: 5; width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; border: none;
}
.hero-back-btn { left: 16px; background: rgba(15,16,48,0.55); color: var(--white); }
.hero-save-btn { right: 16px; background: rgba(255,255,255,0.92); color: var(--navy-950); }
.hero-save-btn.saved { color: var(--danger); }
.hero-save-btn.saved .ic svg { fill: currentColor; }
.hero-back-btn .ic svg, .hero-save-btn .ic svg { width: 18px; height: 18px; }

.detail-hero { height: 420px; background: var(--navy-100) center/cover no-repeat; position: relative; }
.detail-gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 6px; height: 420px; }
.detail-gallery img { width: 100%; height: 100%; object-fit: cover; }
.detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; padding: 36px 0 60px; align-items: start; }
.detail-main h1 { font-size: 28px; margin: 0 0 6px; }
.detail-main .loc { color: var(--ink-500); margin-bottom: 18px; }
.detail-stats { display: flex; gap: 26px; padding: 20px 0; border-top: 1px solid var(--ink-100); border-bottom: 1px solid var(--ink-100); margin-bottom: 24px; }
.detail-stats div strong { display: block; font-size: 18px; }
.detail-stats div span { font-size: 12.5px; color: var(--ink-500); }

.agent-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 26px;
}
.agent-card .price-tag { font-size: 26px; font-weight: 800; color: var(--navy-900); margin-bottom: 18px; }
.agent-card .agent-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.agent-card .avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--ink-300); overflow: hidden; }
.agent-card .agent-row strong { display: block; font-size: 14.5px; }
.agent-card .agent-row span { font-size: 12.5px; color: var(--ink-500); }

/* ---------- Calendar / booking ---------- */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 18px 0; }
.calendar-grid .day-label { text-align: center; font-size: 11px; color: var(--ink-500); font-weight: 700; }
.calendar-grid .day {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; font-size: 13.5px; background: var(--ink-100); color: var(--ink-700);
}
.calendar-grid .day.selected { background: var(--amber-500); color: var(--navy-950); font-weight: 700; }
.calendar-grid .day.disabled { opacity: .3; }
.time-slots { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.time-slot { padding: 10px 16px; border-radius: var(--radius-pill); border: 1.5px solid var(--ink-300); font-size: 13.5px; }
.time-slot.selected { background: var(--navy-900); color: var(--white); border-color: var(--navy-900); }

.success-panel { text-align: center; max-width: 420px; margin: 60px auto; }
.success-panel .icon { width: 74px; height: 74px; border-radius: 50%; background: var(--success); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 34px; margin: 0 auto 20px; }

/* ---------- Chat ---------- */
.chat-layout { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 68px); }
.chat-list { border-right: 1px solid var(--ink-100); overflow-y: auto; background: var(--white); }
.chat-list-item { display: flex; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--ink-100); }
.chat-list-item:hover, .chat-list-item.active { background: var(--ink-100); }
.chat-list-item .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--ink-300); flex-shrink: 0; }
.chat-list-item .info { flex: 1; min-width: 0; }
.chat-list-item .info strong { font-size: 14px; }
.chat-list-item .info p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber-500); }

.chat-thread { display: flex; flex-direction: column; background: var(--ink-100); }
.chat-thread-head { background: var(--white); padding: 16px 24px; border-bottom: 1px solid var(--ink-100); font-weight: 600; }
.chat-messages { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.msg-bubble { max-width: 60%; padding: 12px 16px; border-radius: var(--radius-md); font-size: 14.5px; }
.msg-bubble.mine { align-self: flex-end; background: var(--navy-900); color: var(--white); }
.msg-bubble.theirs { align-self: flex-start; background: var(--white); }
.chat-input-row { display: flex; gap: 10px; padding: 16px 24px; background: var(--white); border-top: 1px solid var(--ink-100); }
.chat-input-row input { flex: 1; border: 1.5px solid var(--ink-300); border-radius: var(--radius-pill); padding: 12px 18px; }

/* ---------- Dashboard shell (agent + admin) ---------- */
.dash-shell { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.dash-sidebar { background: var(--navy-950); color: var(--white); padding: 26px 18px; display: flex; flex-direction: column; }
.dash-sidebar .logo { padding: 0 10px 30px; display: flex; align-items: center; }
.dash-sidebar .logo img { height: 22px; width: auto; display: block; }
.dash-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.dash-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14.5px; color: var(--ink-300); font-weight: 500; }
.ic { width: 18px; height: 18px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; vertical-align: -4px; }
.ic svg { width: 18px; height: 18px; stroke: currentColor; }
.dash-search .ic { width: 16px; height: 16px; color: var(--ink-500); vertical-align: -3px; }
.dash-search .ic svg { width: 16px; height: 16px; }
.btn .ic { width: 16px; height: 16px; }
.btn .ic svg { width: 16px; height: 16px; }
.dash-nav a:hover { background: var(--navy-800); color: var(--white); }
.dash-nav a.active { background: var(--amber-500); color: var(--navy-950); font-weight: 700; }
.dash-sidebar .profile-card { display: flex; align-items: center; gap: 10px; padding: 14px 10px; border-top: 1px solid var(--navy-700); margin-top: 10px; }
.dash-sidebar .profile-card .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--navy-700); }
.dash-sidebar .profile-card strong { display: block; font-size: 13.5px; }
.dash-sidebar .profile-card span { font-size: 11.5px; color: var(--ink-300); }

.dash-main { padding: 30px 36px 60px; }
.dash-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.dash-topbar h1 { font-size: 24px; margin: 0 0 4px; }
.dash-topbar p { margin: 0; color: var(--ink-500); font-size: 14px; }
.dash-search { background: var(--white); border-radius: var(--radius-pill); padding: 10px 18px; border: 1px solid var(--ink-300); display: flex; align-items: center; gap: 8px; min-width: 260px; }
.dash-search input { border: none; outline: none; flex: 1; background: transparent; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.kpi-card { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 20px; }
.kpi-card .label { font-size: 13px; color: var(--ink-500); margin-bottom: 8px; }
.kpi-card .value { font-size: 26px; font-weight: 800; }
.kpi-card .delta { font-size: 12.5px; color: var(--success); margin-top: 6px; }

.dash-grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 18px; }
.panel { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 22px; }
.panel h3 { margin: 0 0 16px; font-size: 15.5px; display: flex; justify-content: space-between; align-items: center; }
.panel h3 .tag { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--ink-100); color: var(--ink-700); }

.attention-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--ink-100); font-size: 14px; }
.attention-row:last-child { border-bottom: none; }
.status-pill { font-size: 11.5px; font-weight: 700; padding: 4px 12px; border-radius: var(--radius-pill); }
.status-pill.danger { background: #fdeceb; color: var(--danger); }
.status-pill.info { background: #e8effd; color: var(--info); }
.status-pill.success { background: #e7f8f1; color: var(--success); }
.status-pill.warning { background: var(--amber-100); color: var(--amber-600); }

.quick-action { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.quick-action.primary { background: var(--amber-100); color: var(--amber-600); }
.quick-action:not(.primary) { background: var(--ink-100); }

.activity-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ink-100); font-size: 13.5px; }
.activity-row:last-child { border-bottom: none; }
.activity-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber-500); margin-top: 6px; flex-shrink: 0; }
.activity-row .time { color: var(--ink-500); font-size: 12px; }

.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; margin-top: 10px; }
.bar-chart .bar { flex: 1; background: var(--amber-100); border-radius: 6px 6px 0 0; position: relative; }
.bar-chart .bar.highlight { background: var(--amber-500); }
.bar-chart .bar span { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: var(--ink-500); }

/* ---------- Data table ---------- */
.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
.data-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-500); padding: 14px 18px; background: var(--ink-100); }
.data-table td { padding: 14px 18px; font-size: 14px; border-top: 1px solid var(--ink-100); }
.data-table tr:hover td { background: #fbfbfe; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.tab-group { display: flex; gap: 6px; background: var(--ink-100); padding: 4px; border-radius: var(--radius-pill); }
.tab-group a { padding: 8px 16px; border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 600; color: var(--ink-700); }
.tab-group a.active { background: var(--white); color: var(--navy-900); box-shadow: var(--shadow-card); }

/* ---------- Utilities ---------- */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.text-muted { color: var(--ink-500); }
.loading-text { text-align: center; padding: 40px; color: var(--ink-500); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .dash-shell { grid-template-columns: 1fr; }
    .dash-sidebar { display: none; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-grid-2 { grid-template-columns: 1fr; }
    .detail-layout { grid-template-columns: 1fr; }
    .chat-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .navbar nav { display: none; }
    .hero h1 { font-size: 30px; }
    .search-bar { flex-direction: column; border-radius: var(--radius-md); }
    .kpi-grid { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   App-style home screen (splash loader + hero + category tabs + carousel + map)
   ========================================================================== */

/* ---------- Splash loader ---------- */
.splash-screen {
    position: fixed; inset: 0; z-index: 999;
    background: linear-gradient(180deg, var(--navy-950), var(--navy-900) 60%, var(--navy-800));
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity .45s ease, visibility .45s ease;
}
.splash-screen.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-screen img { width: 220px; height: auto; margin-bottom: 18px; }
.splash-screen .tagline { color: var(--white); font-size: 13px; font-weight: 700; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 40px; }
.splash-dots { display: flex; gap: 8px; margin-bottom: 16px; }
.splash-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.3); }
.splash-dots span.on { background: var(--amber-500); }
.splash-bar { width: 200px; height: 4px; border-radius: var(--radius-pill); background: rgba(255,255,255,0.25); overflow: hidden; }
.splash-bar-fill { height: 100%; width: 0%; background: var(--amber-500); transition: width 1.4s ease; }

/* ---------- App hero (background photo + overlay chrome) ---------- */
.app-hero {
    position: relative;
    min-height: 480px;
    background: url('../img/hero-bg.png') center/cover no-repeat;
    color: var(--white);
    padding: 20px 0 90px;
}
.app-hero::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15,16,48,0.55) 0%, rgba(15,16,48,0.25) 40%, rgba(15,16,48,0.75) 100%);
}
.app-hero-inner { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; padding: 0 20px; }

.app-hero-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.location-select { position: relative; }
.location-btn {
    display: flex; align-items: center; gap: 6px; background: none; border: none; color: var(--white);
    font-size: 15px; font-weight: 700; padding: 0;
}
.location-btn .ic { width: 16px; height: 16px; }
.location-btn .ic:first-child { color: var(--amber-500); }
.location-btn .ic:first-child svg { width: 16px; height: 16px; fill: var(--amber-500); stroke: none; }
.location-btn .ic:last-child svg { width: 14px; height: 14px; fill: none; stroke: currentColor; }
.location-menu {
    display: none; position: absolute; top: 30px; left: 0; z-index: 20;
    background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow-pop);
    min-width: 180px; max-height: 320px; overflow-y: auto;
}
.location-menu.open { display: block; }
.location-menu button {
    display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left;
    background: none; border: none; padding: 12px 16px; font-size: 14px; color: var(--ink-900); font-weight: 500;
    border-bottom: 1px solid var(--ink-100);
}
.location-menu button:last-child { border-bottom: none; }
.location-menu button:hover { background: var(--ink-100); }
.location-menu button.selected { color: var(--navy-900); font-weight: 700; }
.location-menu button.selected::after { content: '✓'; color: var(--amber-600); }
.app-logo-badge {
    width: 42px; height: 42px; border-radius: 12px; background: var(--navy-900);
    display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-card);
    overflow: hidden; flex-shrink: 0;
}
.app-logo-badge img { height: 16px; width: auto; }

.app-hero h1 { font-size: 34px; line-height: 1.15; margin: 0 0 12px; font-weight: 800; font-family: Georgia, 'Times New Roman', serif; }
.app-hero h1 span { color: var(--amber-500); }
.app-hero .subtitle { color: rgba(255,255,255,0.85); font-size: 15px; max-width: 380px; margin: 0 0 24px; }

.app-search-row { display: flex; gap: 10px; }
.app-search-bar {
    flex: 1; background: var(--white); border-radius: var(--radius-sm); padding: 14px 18px;
    display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-pop);
}
.app-search-bar .ic { color: var(--ink-500); width: 18px; height: 18px; }
.app-search-bar input { border: none; outline: none; flex: 1; font-size: 14.5px; background: transparent; }
.filter-btn {
    width: 50px; flex-shrink: 0; background: var(--amber-500); border: none; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-pop);
}
.filter-btn .ic { width: 20px; height: 20px; color: var(--navy-950); }

/* ---------- Content sheet ---------- */
.app-sheet {
    background: var(--ink-100);
    border-radius: 28px 28px 0 0;
    margin-top: -60px;
    position: relative; z-index: 2;
    padding: 24px 0 40px;
}
.app-sheet-inner { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* ---------- Category tabs ---------- */
.category-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 28px; }
.category-tab {
    background: var(--white); border: 1px solid var(--ink-100); border-radius: var(--radius-sm);
    padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 600; color: var(--navy-900);
}
.category-tab .ic { width: 22px; height: 22px; color: var(--navy-900); }
.category-tab.active { background: var(--navy-950); color: var(--white); border-color: var(--navy-950); }
.category-tab.active .ic { color: var(--amber-500); }

/* ---------- Recommended carousel ---------- */
.carousel-track {
    display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 6px; margin: 0 -20px; padding-left: 20px; padding-right: 20px;
    -ms-overflow-style: none; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-card {
    flex: 0 0 260px; scroll-snap-align: start; background: var(--white);
    border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card);
}
.carousel-card .thumb { height: 160px; background: var(--navy-100) center/cover no-repeat; position: relative; }
.carousel-card .heart-btn {
    position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.92); border: none; display: flex; align-items: center; justify-content: center;
}
.carousel-card .heart-btn .ic { width: 17px; height: 17px; color: var(--navy-900); }
.carousel-card .heart-btn.saved .ic { color: var(--danger); }
.carousel-card .heart-btn.saved .ic svg { fill: currentColor; }
.carousel-card .body { padding: 14px 16px 16px; }
.carousel-card .title { font-size: 14.5px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carousel-card .price { font-size: 16px; font-weight: 800; color: var(--navy-900); margin-bottom: 6px; }
.carousel-card .loc { font-size: 12.5px; color: var(--ink-500); display: flex; align-items: center; gap: 4px; }
.carousel-card .loc .ic { width: 13px; height: 13px; }

.carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.carousel-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-300); }
.carousel-dots span.on { background: var(--navy-900); width: 16px; border-radius: var(--radius-pill); }

/* ---------- Explore on map ---------- */
.map-card {
    position: relative; height: 220px; border-radius: var(--radius-md); overflow: hidden;
    background: var(--navy-950); margin-top: 8px;
}
.map-card .leaflet-map { position: absolute; inset: 0; }
.map-card .map-cta {
    position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
    background: var(--amber-500); color: var(--navy-950); font-weight: 700; font-size: 13.5px;
    padding: 10px 22px; border-radius: var(--radius-pill); border: none; box-shadow: var(--shadow-pop);
    display: flex; align-items: center; gap: 8px; z-index: 401;
}

/* ---------- Bottom tab bar (mobile-style primary nav) ---------- */
.bottom-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--white); border-top: 1px solid var(--ink-100);
    display: flex; justify-content: center; padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.bottom-tabbar-inner { display: flex; justify-content: space-around; width: 100%; max-width: 460px; }
.bottom-tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600; color: var(--ink-500); padding: 4px 10px; border-radius: 10px;
}
.bottom-tabbar a .ic { width: 22px; height: 22px; }
.bottom-tabbar a.active { color: var(--navy-900); }
.bottom-tabbar a.active .ic svg { stroke-width: 2.2; }
body.has-bottom-nav { padding-bottom: 66px; }

@media (max-width: 640px) {
    .app-hero h1 { font-size: 28px; }
    .category-tabs { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .carousel-card { flex-basis: 220px; }
}

/* ==========================================================================
   Filters bottom sheet
   ========================================================================== */
.filters-backdrop {
    position: fixed; inset: 0; z-index: 200; background: rgba(15,16,48,0.5);
    display: none; align-items: flex-end; justify-content: center;
}
.filters-backdrop.open { display: flex; }
.filters-sheet {
    background: var(--white); width: 100%; max-width: 480px; max-height: 88vh;
    border-radius: 22px 22px 0 0; display: flex; flex-direction: column; overflow: hidden;
    animation: sheet-up .25s ease;
}
@keyframes sheet-up { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.filters-head {
    background: var(--amber-500); color: var(--navy-950); padding: 18px 22px;
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.filters-head h3 { margin: 0; font-size: 17px; }
.filters-head button { background: none; border: none; font-size: 13.5px; font-weight: 700; color: var(--navy-950); }
.filters-body { padding: 20px 22px 8px; overflow-y: auto; }
.filter-group { margin-bottom: 24px; }
.filter-group > label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-900); margin-bottom: 10px; }
.filter-group select {
    width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--ink-300);
    font-size: 14.5px; background: var(--white); color: var(--ink-900);
}
.pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-btn {
    padding: 10px 16px; border-radius: var(--radius-pill); border: 1.5px solid var(--ink-300);
    background: var(--white); color: var(--ink-900); font-size: 13.5px; font-weight: 600;
}
.pill-btn.active { background: var(--navy-950); border-color: var(--navy-950); color: var(--white); }
.pill-btn.active.status-active { background: var(--amber-500); border-color: var(--amber-500); color: var(--navy-950); }

.price-range-values { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 700; color: var(--navy-900); margin-bottom: 10px; }
.price-slider { position: relative; height: 34px; }
.price-slider .track { position: absolute; top: 15px; left: 0; right: 0; height: 4px; background: var(--ink-300); border-radius: var(--radius-pill); }
.price-slider .track-fill { position: absolute; top: 15px; height: 4px; background: var(--navy-900); border-radius: var(--radius-pill); }
.price-slider input[type="range"] {
    position: absolute; top: 0; left: 0; width: 100%; margin: 0; height: 34px;
    -webkit-appearance: none; appearance: none; background: none; pointer-events: none;
}
.price-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; border-radius: 50%;
    background: var(--amber-500); border: 3px solid var(--navy-950); cursor: pointer; margin-top: 0;
}
.price-slider input[type="range"]::-moz-range-thumb {
    pointer-events: auto; width: 20px; height: 20px; border-radius: 50%;
    background: var(--amber-500); border: 3px solid var(--navy-950); cursor: pointer;
}
.price-slider input[type="range"]::-webkit-slider-runnable-track { background: none; }
.price-range-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-500); margin-top: 4px; }

.filters-footer { padding: 16px 22px; border-top: 1px solid var(--ink-100); flex-shrink: 0; }
.filters-footer .btn { background: var(--navy-950); color: var(--amber-500); }

/* ==========================================================================
   Shared app-style chrome for interior pages (header + content wrapper)
   ========================================================================== */
.app-topbar {
    background: var(--navy-950); color: var(--white);
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px; position: sticky; top: 0; z-index: 40;
}
.app-topbar .back-btn {
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--white);
}
.app-topbar .back-btn .ic svg { width: 18px; height: 18px; }
.app-topbar h1 { font-size: 17px; margin: 0; flex: 1; font-weight: 700; }
.app-topbar .topbar-action {
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--white);
}
.app-topbar .topbar-action.saved { color: var(--danger); background: var(--white); }
.app-topbar .topbar-action .ic svg { width: 17px; height: 17px; }

.app-page-body { max-width: 800px; margin: 0 auto; padding: 24px 20px 40px; }
.app-page-wide { max-width: 1200px; margin: 0 auto; padding: 24px 28px 100px; }
.app-page-wide .dash-topbar { margin-bottom: 22px; }
.app-topbar .topbar-title-group { flex: 1; }
.app-topbar .topbar-title-group p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-300); font-weight: 400; }
