/* ============================================================
   Sandworth Living — Professional Real Estate Design v4
   Palette: Forest green · Soft gold · A restrained blue accent
   Inspired by Trulia / NigeriaPropertyCentre
   ============================================================ */

:root {
    --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    /* === Core Palette === */
    --primary:        #315C45;       /* forest green               */
    --primary-mid:    #507C68;       /* softened green             */
    --primary-dark:   #203C32;       /* deep evergreen              */
    --primary-light:  #EAF1EB;       /* pale sage                   */
    --accent:         #C1A05A;       /* warm architectural gold     */
    --accent-dark:    #9B7935;
    --accent-light:   #F7F1E2;
    --green:          #39745B;       /* available / verified       */
    --green-light:    #E7F1EA;
    --blue:           #557E95;       /* restrained blue accent      */
    --blue-light:     #EAF1F4;
    --red:            #D32F2F;
    --gold:           #C1A05A;

    /* === Semantic states (colour psychology) === */
    /* Green = resolved, paid up, approved, healthy */
    --good:           var(--green);
    --good-strong:    #006B46;       /* hover / emphasis           */
    --good-soft:      var(--green-light);
    /* Amber = due, partial, needs attention (caution, not alarm)  */
    --warn:           #B45309;
    --warn-strong:    #92400E;
    --warn-border:    #F59E0B;
    --warn-soft:      #FEF3C7;
    /* Red = overdue, owing, deletion, danger (urgency)            */
    --bad:            var(--red);
    --bad-strong:     #B42318;       /* hover / deletion emphasis  */
    --bad-soft:       #FDE8E8;
    /* Slate = neutral, ended, inactive, view                      */
    --neutral:        #475569;
    --neutral-strong: #334155;
    --neutral-soft:   #EEF2F7;
    --neutral-line:   #94A3B8;

    /* === Surface / Text === */
    --ink:            #24382F;
    --ink-mid:        #43574D;
    --muted:          #68776E;
    --muted-light:    #96A198;
    --surface:        #FFFEFC;
    --bg:             #F4F4EF;
    --bg-warm:        #FAF9F4;
    --line:           #E2E6DF;
    --line-light:     #F0F2ED;

    /* === Shadows === */
    --shadow-xs:  0 1px 3px rgba(10,30,70,.06), 0 1px 2px rgba(10,30,70,.04);
    --shadow-sm:  0 2px 8px rgba(10,30,70,.08), 0 1px 3px rgba(10,30,70,.06);
    --shadow-md:  0 4px 16px rgba(10,30,70,.12), 0 2px 6px rgba(10,30,70,.08);
    --shadow-lg:  0 8px 32px rgba(10,30,70,.14), 0 4px 12px rgba(10,30,70,.1);
    --shadow-xl:  0 20px 60px rgba(10,30,70,.18), 0 8px 24px rgba(10,30,70,.12);

    /* === Radii === */
    --r-xs:  4px;
    --r-sm:  8px;
    --r-md:  12px;
    --r-lg:  16px;
    --r-xl:  24px;
    --r-2xl: 32px;
}

/* ──────────────────────────────────────────────────────────
   RESET & BASE
   ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 14.5px; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img  { display: block; width: 100%; object-fit: cover; }
a    { color: inherit; text-decoration: none; }
form { margin: 0; }
h1, h2, h3, h4 { margin-top: 0; line-height: 1.2; font-weight: 700; }
ul   { padding-left: 20px; margin: 8px 0 0; }
li   { margin-bottom: 6px; }

code {
    padding: 2px 8px;
    border-radius: var(--r-xs);
    background: var(--line-light);
    font-size: .85em;
    font-family: monospace;
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ──────────────────────────────────────────────────────────
   SHELL
   ────────────────────────────────────────────────────────── */
.site-shell {
    width: 100%;
    margin: 0 auto;
    padding: 0 0 0;
}

/* ──────────────────────────────────────────────────────────
   TOPBAR / HEADER
   ────────────────────────────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 68px;
    padding: 0 28px;
    background:
        linear-gradient(90deg, rgba(7, 24, 53, .98) 0%, rgba(7, 24, 53, .96) 34%, rgba(10, 40, 87, .96) 68%, rgba(13, 54, 111, .96) 100%);
    border-bottom: none;
    box-shadow: 0 10px 32px rgba(6, 20, 44, .30);
}

.brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,.97), rgba(247,241,226,.95));
    border: 1px solid rgba(217, 194, 131, .42);
    box-shadow:
        0 10px 22px rgba(3, 15, 35, .20),
        inset 0 1px 0 rgba(255,255,255,.82);
}

.brand-logo {
    width: auto;
    height: 40px;
    max-width: 230px;
    object-fit: contain;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 0;
}

.topnav a {
    padding: 6px 14px;
    border-radius: var(--r-sm);
    font-size: .875rem;
    font-weight: 600;
    color: rgba(255,255,255,.78);
    letter-spacing: .01em;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.topnav a.is-active {
    color: #fff;
    background: rgba(255,255,255,.14);
}

.topnav a:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────
   BUTTONS
   ────────────────────────────────────────────────────────── */
.solid-button, .ghost-button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px solid transparent;
    border-radius: var(--r-sm);
    padding: 9px 20px;
    font-family: inherit;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background .16s, border-color .16s, color .16s, box-shadow .16s, transform .1s;
    white-space: nowrap;
    text-decoration: none;
}

.solid-button {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.solid-button:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: 0 4px 16px rgba(242,124,58,.4);
    transform: translateY(-1px);
    color: #fff;
}
.solid-button:active { transform: translateY(0); }

.solid-button-danger {
    background: var(--bad);
    border-color: var(--bad);
    color: #fff;
}
.solid-button-danger:hover {
    background: var(--bad-strong);
    border-color: var(--bad-strong);
    box-shadow: 0 4px 16px rgba(211, 47, 47, .35);
    transform: translateY(-1px);
    color: #fff;
}
.solid-button-danger:active { transform: translateY(0); }

/* Navy — secondary money action (service charge) */
.solid-button-navy {
    background: var(--primary-mid);
    border-color: var(--primary-mid);
    color: #fff;
}
.solid-button-navy:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(21, 87, 192, .35);
    transform: translateY(-1px);
    color: #fff;
}
.solid-button-navy:active { transform: translateY(0); }

/* Green — growth / renewal */
.solid-button-good {
    background: var(--good);
    border-color: var(--good);
    color: #fff;
}
.solid-button-good:hover {
    background: var(--good-strong);
    border-color: var(--good-strong);
    box-shadow: 0 4px 16px rgba(0, 135, 90, .35);
    transform: translateY(-1px);
    color: #fff;
}
.solid-button-good:active { transform: translateY(0); }

/* Soft green — subdued renewal action (light fill, green text) */
.solid-button-good-soft {
    background: var(--good-soft);
    border-color: var(--good);
    color: var(--good-strong);
}
.solid-button-good-soft:hover {
    background: var(--good);
    border-color: var(--good);
    box-shadow: 0 4px 16px rgba(0, 135, 90, .35);
    transform: translateY(-1px);
    color: #fff;
}
.solid-button-good-soft:active { transform: translateY(0); }

/* Slate — neutral administrative action (edit) */
.solid-button-slate {
    background: var(--neutral);
    border-color: var(--neutral);
    color: #fff;
}
.solid-button-slate:hover {
    background: var(--neutral-strong);
    border-color: var(--neutral-strong);
    box-shadow: 0 4px 16px rgba(71, 85, 105, .35);
    transform: translateY(-1px);
    color: #fff;
}
.solid-button-slate:active { transform: translateY(0); }

.ghost-button {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.28);
    color: rgba(255,255,255,.9);
}
.ghost-button:hover {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.5);
    color: #fff;
}

/* ghost on light backgrounds */
.auth-shell .ghost-button,
.detail-intro-actions .ghost-button,
.filter-panel .ghost-button,
.cta-stack .ghost-button,
.section-heading .ghost-button,
.admin-toolbar .ghost-button,
.admin-form-actions .ghost-button,
.tenant-detail-bar .ghost-button {
    background: transparent;
    border-color: var(--line);
    color: var(--ink-mid);
}
.auth-shell .ghost-button:hover,
.detail-intro-actions .ghost-button:hover,
.filter-panel .ghost-button:hover,
.cta-stack .ghost-button:hover,
.section-heading .ghost-button:hover,
.admin-toolbar .ghost-button:hover,
.admin-form-actions .ghost-button:hover,
.tenant-detail-bar .ghost-button:hover {
    border-color: var(--primary-mid);
    color: var(--primary);
    background: var(--primary-light);
}

.solid-button.wide,
.ghost-button.wide { width: 100%; }

/* text link */
.text-link {
    color: var(--primary-mid);
    font-weight: 600;
    transition: color .14s;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: transparent;
}
.text-link:hover {
    color: var(--accent);
    text-decoration-color: currentColor;
}

/* ──────────────────────────────────────────────────────────
   FLASH MESSAGES
   ────────────────────────────────────────────────────────── */
.flash-stack {
    display: grid;
    gap: 8px;
    padding: 12px 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.flash {
    padding: 12px 18px;
    border-radius: var(--r-sm);
    font-size: .875rem;
    font-weight: 600;
}
.flash-success { background: var(--green-light); color: var(--green); border-left: 4px solid var(--green); }
.flash-error   { background: #FEE2E2; color: var(--red); border-left: 4px solid var(--red); }
.flash-info    { background: var(--primary-light); color: var(--primary); border-left: 4px solid var(--primary-mid); }

/* ──────────────────────────────────────────────────────────
   PAGE CONTENT WRAPPER
   ────────────────────────────────────────────────────────── */
.page-content {
    padding-bottom: 0;
}

/* ──────────────────────────────────────────────────────────
   EYEBROW / LABEL CHIP
   ────────────────────────────────────────────────────────── */
.eyebrow {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.page-hero .eyebrow,
.hero-copy .eyebrow {
    color: rgba(255,255,255,.7);
    letter-spacing: .12em;
}

/* ──────────────────────────────────────────────────────────
   HOME HERO
   ────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    background:
        radial-gradient(circle at 72% 22%, rgba(219, 182, 86, .34) 0%, rgba(219, 182, 86, 0) 30%),
        linear-gradient(118deg, rgba(5, 25, 56, .96) 0%, rgba(8, 37, 80, .92) 32%, rgba(17, 69, 126, .74) 66%, rgba(183, 143, 58, .44) 100%),
        url('../img/Arepo-II4-1024x576.jpg') center/cover no-repeat;
    min-height: 580px;
    display: flex;
    align-items: center;
    padding: 60px max(28px, calc((100vw - 1320px)/2 + 20px));
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(4, 21, 48, .64) 0%, rgba(4, 21, 48, .36) 38%, rgba(4, 21, 48, .14) 100%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--bg), transparent);
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 720px;
    color: #fff;
}

.hero-copy h1 {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 14px;
    color: #fff;
}

.hero-copy > p {
    font-size: 1.05rem;
    color: rgba(255,255,255,.88);
    margin: 0 0 28px;
    max-width: 560px;
}

/* ──────────────────────────────────────────────────────────
   SEARCH TABS
   ────────────────────────────────────────────────────────── */
.hero-tabs {
    display: inline-flex;
    align-self: flex-start;
    flex-wrap: wrap;
    gap: 4px;
    padding: 5px;
    border-radius: var(--r-md);
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(15,23,42,.08);
    backdrop-filter: blur(12px);
    margin: 0 0 18px;
    box-shadow: 0 14px 34px rgba(15,23,42,.16);
}

.tab-search {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: auto;
    max-width: 100%;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    margin-bottom: 20px;
}

.tab-search-item {
    border: none;
    background: transparent;
    padding: 10px 16px;
    border-radius: var(--r-sm);
    color: var(--muted);
    font: 600 .875rem/1 var(--font-sans);
    cursor: pointer;
    transition: background .14s, color .14s;
    white-space: nowrap;
}

.tab-search-item.is-active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 10px rgba(242,124,58,.4);
}

.tab-search-item:hover:not(.is-active) {
    background: var(--accent-light);
    color: var(--accent-dark);
}

.hero-tabs .tab-search-item {
    color: rgb(33 29 29 / 82%);
    font-size: .85rem;
    padding: 10px 14px;
}
.hero-tabs .tab-search-item:hover:not(.is-active) {
    background: var(--accent-light);
    color: #000;
}

/* ──────────────────────────────────────────────────────────
   HERO SEARCH FORM
   ────────────────────────────────────────────────────────── */
.hero-search {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0;
    background: var(--surface);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 2px solid rgba(255,255,255,.2);
    margin-bottom: 22px;
}

.hero-search input,
.hero-search select {
    border: none;
    outline: none;
    padding: 16px 18px;
    font: 500 .975rem/1 var(--font-sans);
    color: var(--ink);
    background: var(--surface);
}

.hero-search input {
    border-right: 1px solid var(--line);
    min-width: 0;
}

.hero-search select {
    border-right: 1px solid var(--line);
    color: var(--muted);
    cursor: pointer;
    min-width: 130px;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 32px;
}

.hero-search button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0 28px;
    font: 700 .9rem/1 var(--font-sans);
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.hero-search button:hover { background: var(--accent-dark); }

/* ──────────────────────────────────────────────────────────
   HERO MARKET STRIP (location quick links)
   ────────────────────────────────────────────────────────── */
.hero-market-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    align-items: center;
}

.hero-market-strip::before {
    content: "Popular:";
    font-size: .78rem;
    font-weight: 600;
    color: rgba(255,255,255,.6);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-right: 4px;
}

.hero-market-strip a {
    padding: 5px 14px;
    border-radius: 20px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.25);
    color: rgba(255,255,255,.92);
    font-size: .8rem;
    font-weight: 600;
    transition: background .15s, border-color .15s;
    backdrop-filter: blur(8px);
}

.hero-market-strip a:hover {
    background: rgba(255,255,255,.25);
    border-color: rgba(255,255,255,.5);
    color: #fff;
}

/* ──────────────────────────────────────────────────────────
   STAT GRID (hero bottom stats)
   ────────────────────────────────────────────────────────── */
.stat-grid {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.stat-grid article {
    display: flex;
    flex-direction: column;
}

.stat-grid strong {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.stat-grid span {
    font-size: .78rem;
    color: rgba(255,255,255,.65);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 4px;
}

/* ──────────────────────────────────────────────────────────
   BROWSE BY LOCATION (home page)
   ────────────────────────────────────────────────────────── */
.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.location-card {
    position: relative;
    border-radius: var(--r-md);
    overflow: hidden;
    aspect-ratio: 3/2;
    cursor: pointer;
    display: block;
    transition: transform .2s, box-shadow .2s;
}

.location-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.location-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.location-card:hover img { transform: scale(1.05); }

.location-card-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 20px 14px 12px;
    background: linear-gradient(to top, rgba(6,31,74,.85) 0%, transparent 100%);
    color: #fff;
}

.location-card-label strong {
    display: block;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.2;
}

.location-card-label span {
    font-size: .75rem;
    color: rgba(255,255,255,.75);
}

/* ──────────────────────────────────────────────────────────
   PAGE HERO (inner pages dark banner)
   ────────────────────────────────────────────────────────── */
.page-hero,
.page-hero.compact {
    width: 100vw;
    margin-left: calc(-1 * (100vw - min(1320px, 100vw - 40px)) / 2);
    padding: 52px max(28px, calc((100vw - min(1320px, 100vw - 40px)) / 2 + 20px)) 48px;
    background:
        linear-gradient(135deg, rgba(6,31,74,.97) 0%, rgba(11,61,145,.92) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 80% 50%, rgba(242,124,58,.12) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(21,87,192,.2) 0%, transparent 50%);
    pointer-events: none;
}

.page-hero h1 {
    font-family: var(--font-sans);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
    position: relative;
    z-index: 1;
}

.page-hero p {
    color: rgba(255,255,255,.8);
    max-width: 600px;
    font-size: 1rem;
    margin: 0;
    position: relative;
    z-index: 1;
}

.page-hero > div { position: relative; z-index: 1; }

/* ──────────────────────────────────────────────────────────
   SECTION BLOCKS
   ────────────────────────────────────────────────────────── */
.section-block {
    padding: 40px 0;
}

.section-block.section-tight { padding: 20px 0; }

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.section-heading h2 {
    font-family: var(--font-sans);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    color: var(--ink);
    margin: 0;
}

/* ──────────────────────────────────────────────────────────
   LISTING CARDS (featured / grid)
   ────────────────────────────────────────────────────────── */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.listing-card {
    background: var(--surface);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}

.listing-card-link,
.listing-card-media,
.market-listing-media {
    display: block;
    color: inherit;
    text-decoration: none;
}

.listing-card-media {
    overflow: hidden;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.listing-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform .4s;
}

.listing-card:hover img { transform: scale(1.03); }

.listing-card .listing-card-link img { overflow: hidden; }

.listing-card-title-link {
    color: inherit;
    text-decoration: none;
    transition: color .14s ease;
}

.listing-card-title-link:hover {
    color: var(--primary);
}

.listing-body {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.listing-price {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 4px;
}

.listing-body h3 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 4px;
    line-height: 1.3;
}

.listing-meta {
    font-size: .82rem;
    color: var(--muted);
    margin: 4px 0 6px;
    border-top: 1px solid var(--line-light);
    padding-top: 8px;
}

.listing-body > p:last-of-type {
    font-size: .82rem;
    color: var(--muted);
    margin: 0 0 10px;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 12px;
}

.badge-row span,
.chip-row span {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary-mid);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    border: 1px solid transparent;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-row span {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: .8rem;
    cursor: default;
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink-mid);
    transition: background .14s, border-color .14s;
}

.chip-row span:hover {
    background: var(--primary-light);
    border-color: var(--primary-mid);
    color: var(--primary);
    cursor: pointer;
}

.type-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    background: var(--good-soft);
    color: var(--good);
    border: 1px solid var(--good);
}

.type-pill.for-sale {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-mid);
}

.type-pill.commercial {
    background: var(--warn-soft);
    color: var(--warn-strong);
    border-color: var(--warn-border);
}

.type-pill.pill-all {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-mid);
}

.type-pill.pill-active {
    background: var(--good-soft);
    color: var(--good);
    border-color: var(--good);
}

.type-pill.pill-inactive {
    background: var(--warn-soft);
    color: var(--warn-strong);
    border-color: var(--warn-border);
}

.type-pill.pill-ended {
    background: var(--neutral-soft);
    color: var(--neutral);
    border-color: var(--neutral-line);
}

.type-pill.pill-owing {
    background: var(--bad-soft);
    color: var(--bad-strong);
    border-color: var(--bad);
}

.type-pill.pill-ongoing {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-mid);
}

.type-pill.pill-renewed {
    background: #CCFBF1;
    color: #0F766E;
    border-color: #14B8A6;
}

.type-pill.is-active {
    color: #fff;
}

.type-pill.pill-all.is-active { background: var(--primary); border-color: var(--primary); }
.type-pill.pill-active.is-active { background: var(--good); border-color: var(--good); }
.type-pill.pill-inactive.is-active { background: var(--warn); border-color: var(--warn); }
.type-pill.pill-ended.is-active { background: var(--neutral); border-color: var(--neutral); }
.type-pill.pill-owing.is-active { background: var(--bad); border-color: var(--bad); }
.type-pill.pill-ongoing.is-active { background: var(--primary); border-color: var(--primary); }
.type-pill.pill-renewed.is-active { background: #0F766E; border-color: #0F766E; }

.type-pill .pill-count {
    display: inline-block;
    margin-left: 3px;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .08);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: 0;
}

.type-pill.is-active .pill-count {
    background: rgba(255, 255, 255, .28);
}

.market-listing-link {
    font-size: .82rem;
    font-weight: 700;
    color: var(--primary-mid);
    transition: color .14s;
    text-decoration: none;
}
.listing-card:hover .market-listing-link { color: var(--accent); }

.listing-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--line-light);
}

.share-action-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.share-button {
    position: relative;
    appearance: none;
    border: 1px solid var(--line);
    background: #fff;
    color: #3f4868;
    border-radius: 999px;
    width: 40px;
    height: 40px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
    transition: background .14s ease, color .14s ease, border-color .14s ease, transform .14s ease, box-shadow .14s ease;
}

.whatsapp-share-link {
    position: relative;
    border: 1px solid #b6e3c7;
    background: #f2fbf6;
    color: #0f8f4d;
    border-radius: 999px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
    transition: background .14s ease, color .14s ease, border-color .14s ease, transform .14s ease, box-shadow .14s ease;
}

.share-button:hover,
.share-button:focus-visible,
.whatsapp-share-link:hover,
.whatsapp-share-link:focus-visible {
    background: #f6f8ff;
    border-color: #adb7d9;
    color: #2f3c73;
    outline: none;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .12);
}

.whatsapp-share-link:hover,
.whatsapp-share-link:focus-visible {
    background: #e6f8ee;
    border-color: #7ad5a1;
    color: #0b8a46;
}

.share-button:active {
    transform: translateY(1px);
}

.whatsapp-share-link:active {
    transform: translateY(1px);
}

.share-button.is-success {
    background: #effaf4;
    border-color: #8ed2ab;
    color: #127448;
}

.share-button.is-error {
    background: #fff5f5;
    border-color: #f3b0b0;
    color: #c23f3f;
}

.share-button[data-feedback]::after {
    content: attr(data-feedback);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    background: #1f2a44;
    color: #fff;
    font: 700 .72rem/1 var(--font-sans);
    padding: 7px 10px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .2);
    pointer-events: none;
    z-index: 5;
}

.share-button-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.share-button-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.share-button-icon svg circle {
    fill: #fff;
    stroke: currentColor;
}

/* ──────────────────────────────────────────────────────────
   MARKET GRID / MARKET LISTING GRID
   ────────────────────────────────────────────────────────── */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.market-card {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--surface);
    border: 1px solid var(--line);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    display: block;
    color: inherit;
}

.market-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.market-card img { height: 220px; }

.market-card-body {
    padding: 14px 16px 16px;
}

.market-listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.fresh-listings-section .market-listing-grid {
    gap: 16px;
}

.market-listing-card {
    background: var(--surface);
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
    color: inherit;
}

.market-listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.market-listing-media img { height: 200px; }

.fresh-listings-section .market-listing-body {
    padding: 16px 16px 18px;
}

/* ──────────────────────────────────────────────────────────
   PILLAR / FEATURE CARDS
   ────────────────────────────────────────────────────────── */
.pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.pillar-card {
    padding: 24px 20px;
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
    transition: box-shadow .2s, border-color .2s;
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--primary-mid), var(--accent));
}

.pillar-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.pillar-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 8px;
}

.pillar-card p {
    font-size: .875rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

/* ──────────────────────────────────────────────────────────
   DETAIL CARDS / ASIDE CARDS
   ────────────────────────────────────────────────────────── */
.detail-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow-xs);
}

.detail-card.compact-card { padding: 16px 20px; }

.detail-card h2 {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    color: var(--ink);
    margin: 0 0 8px;
}

.detail-card p {
    font-size: .875rem;
    color: var(--ink-mid);
    margin: 4px 0;
}

.panel-kicker {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    display: block;
    margin-bottom: 4px;
}

.feature-list { padding-left: 16px; }
.feature-list li {
    font-size: .875rem;
    color: var(--ink-mid);
    margin-bottom: 8px;
    padding-left: 4px;
}

.cta-stack { display: grid; gap: 10px; margin-top: 16px; }

.agent-card h3 { margin: 8px 0 6px; font-size: .98rem; }

/* ──────────────────────────────────────────────────────────
   FILTER / SEARCH LAYOUT
   ────────────────────────────────────────────────────────── */
.search-layout-map {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
    gap: 20px;
    min-height: calc(100vh - 140px);
    align-items: start;
    padding: 20px 0;
}

.search-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    padding: 24px 0;
    align-items: start;
}

.results-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    position: sticky;
    top: 80px;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}

.results-panel::-webkit-scrollbar { width: 4px; }
.results-panel::-webkit-scrollbar-track { background: transparent; }
.results-panel::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 2px;
}

/* ──────────────────────────────────────────────────────────
   FILTER BAR (inline)
   ────────────────────────────────────────────────────────── */
.inline-filter-bar {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 12px 14px;
    box-shadow: var(--shadow-xs);
    align-items: center;
}

.inline-filter-bar input,
.inline-filter-bar select {
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 9px 12px;
    font: .875rem/1 var(--font-sans);
    color: var(--ink);
    outline: none;
    background: var(--bg);
    transition: border-color .14s, box-shadow .14s;
}

.inline-filter-bar input:focus,
.inline-filter-bar select:focus {
    border-color: var(--primary-mid);
    box-shadow: 0 0 0 3px rgba(21,87,192,.12);
    background: var(--surface);
}

.inline-filter-bar .check-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .875rem;
    color: var(--ink-mid);
    cursor: pointer;
    white-space: nowrap;
}

.inline-filter-bar .check-row input[type=checkbox] {
    width: 16px; height: 16px;
    padding: 0;
    accent-color: var(--primary-mid);
}

.inline-filter-bar .solid-button {
    padding: 9px 18px;
    border-radius: var(--r-sm);
    font-size: .875rem;
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    white-space: nowrap;
}
.inline-filter-bar .solid-button:hover {
    background: var(--primary-mid);
    border-color: var(--primary-mid);
    box-shadow: 0 4px 12px rgba(11,61,145,.3);
}

/* price range row inside filter bar */
.price-range-row {
    display: flex;
    align-items: center;
    gap: 6px;
    grid-column: 1 / -1;
    border-top: 1px solid var(--line-light);
    padding-top: 10px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.price-range-row label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
    margin-right: 4px;
}

.price-range-row input,
.price-range-row select {
    flex: 1;
    min-width: 100px;
    max-width: 160px;
}

.price-range-row .range-sep {
    color: var(--muted-light);
    font-size: .8rem;
    font-weight: 600;
}

/* sort row */
.sort-row {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 1 / -1;
    border-top: 1px solid var(--line-light);
    padding-top: 10px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.sort-row label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
    margin-right: 4px;
}

.sort-row select {
    flex: 0 0 auto;
    min-width: 140px;
}

/* ──────────────────────────────────────────────────────────
   RESULTS HEADER
   ────────────────────────────────────────────────────────── */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0 6px;
}

.results-header strong {
    font-family: var(--font-sans);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
}

.results-header span {
    font-size: .875rem;
    color: var(--muted);
}

.results-header .topbar-actions {
    gap: 6px;
}

.results-header .ghost-button {
    font-size: .8rem;
    padding: 7px 14px;
    background: transparent;
    border-color: var(--line);
    color: var(--muted);
}
.results-header .ghost-button:hover {
    border-color: var(--primary-mid);
    color: var(--primary);
    background: var(--primary-light);
}

/* ──────────────────────────────────────────────────────────
   RESULT CARDS (list view)
   ────────────────────────────────────────────────────────── */
.results-list {
    display: grid;
    gap: 14px;
}

.result-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: box-shadow .2s, border-color .2s, transform .2s;
    cursor: pointer;
}

.result-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    transform: translateX(2px);
}

.result-card img {
    width: 200px;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform .4s;
}
.result-card:hover img { transform: scale(1.04); }

.result-card-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.result-card-top .listing-price { font-size: 1.1rem; }
.result-card-top h2 {
    font-size: .95rem;
    font-weight: 700;
    margin: 2px 0 4px;
    color: var(--ink);
}

.muted-text {
    font-size: .82rem;
    color: var(--muted);
}

.result-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--line-light);
    gap: 12px;
}

.result-action-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ──────────────────────────────────────────────────────────
   MAP PANE
   ────────────────────────────────────────────────────────── */
.map-pane {
    position: sticky;
    top: 88px;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.map-canvas {
    height: calc(100vh - 120px);
    width: 100%;
    background: var(--bg);
    border-radius: var(--r-lg);
}

/* ──────────────────────────────────────────────────────────
   EMPTY STATE
   ────────────────────────────────────────────────────────── */
.empty-state {
    padding: 60px 32px;
    text-align: center;
    background: var(--surface);
    border: 2px dashed var(--line);
    border-radius: var(--r-xl);
    grid-column: 1 / -1;
}

.empty-state h2 {
    font-size: 1.1rem;
    color: var(--ink-mid);
    margin: 0 0 8px;
}

.empty-state p {
    font-size: .875rem;
    color: var(--muted);
    margin: 0;
}

/* ──────────────────────────────────────────────────────────
   BREADCRUMB
   ────────────────────────────────────────────────────────── */
.breadcrumb-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 0;
    font-size: .82rem;
    color: var(--muted);
    border-bottom: 1px solid var(--line-light);
    margin-bottom: 20px;
}

.breadcrumb-row a {
    color: var(--primary-mid);
    font-weight: 600;
    transition: color .14s;
}
.breadcrumb-row a:hover { color: var(--accent); }
.breadcrumb-row span:not(.muted-text) { color: var(--muted-light); }

/* ──────────────────────────────────────────────────────────
   PROPERTY DETAIL PAGE
   ────────────────────────────────────────────────────────── */
.detail-intro {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    align-items: start;
    padding-bottom: 24px;
}

.detail-intro-copy {}

.detail-intro-top {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
}

.detail-intro-copy .listing-price {
    font-size: 1.8rem;
    font-weight: 700;
}

.detail-intro-copy h1 {
    font-family: var(--font-sans);
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    color: var(--ink);
    margin: 0 0 6px;
}

.detail-intro-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 88px;
}

.action-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.action-card-price {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.action-card-buttons { display: grid; gap: 10px; }

.action-card .solid-button {
    background: var(--accent);
    border-color: var(--accent);
    justify-content: center;
    padding: 14px 20px;
    font-size: .95rem;
}

/* Gallery */
.gallery-main { border-radius: var(--r-lg); overflow: hidden; margin-bottom: 12px; }
.gallery-main img { height: 400px; border-radius: var(--r-lg); cursor: zoom-in; }
.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.gallery-thumb {
    border-radius: var(--r-sm);
    overflow: hidden;
    cursor: pointer;
    opacity: .7;
    transition: opacity .2s, transform .2s;
    border: 2px solid transparent;
}
.gallery-thumb:hover { opacity: 1; transform: scale(1.02); }
.gallery-thumb.is-active { opacity: 1; border-color: var(--accent); }
.gallery-thumb img { height: 76px; }

/* chip row in detail */
.detail-intro-chips {
    margin: 12px 0 16px;
}

.detail-intro-chips span {
    padding: 6px 14px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink-mid);
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 600;
}

/* Fact strip */
.fact-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    margin: 20px 0;
}

.fact-strip > div {
    padding: 16px 18px;
    border-right: 1px solid var(--line);
}
.fact-strip > div:last-child { border-right: none; }

.fact-strip span {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    margin-bottom: 4px;
}

.fact-strip strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
}

/* ──────────────────────────────────────────────────────────
   AUTH PAGES
   ────────────────────────────────────────────────────────── */
.auth-shell {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(11,61,145,.07) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 50%, rgba(242,124,58,.06) 0%, transparent 50%),
        var(--bg);
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 40px 44px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 460px;
}

.auth-card h1 {
    font-family: var(--font-sans);
    font-size: 1.6rem;
    color: var(--ink);
    margin: 6px 0 10px;
}

.auth-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-title-row h1 {
    margin: 6px 0 10px;
}

.auth-title-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex: 0 0 auto;
    margin-top: 2px;
}

.auth-card > p {
    font-size: .9rem;
    color: var(--muted);
    margin: 0 0 24px;
}

.auth-card .muted-text {
    margin-top: 20px;
    font-size: .85rem;
    text-align: center;
}

/* ──────────────────────────────────────────────────────────
   FORMS
   ────────────────────────────────────────────────────────── */
.filter-form,
.filter-panel form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.filter-form label,
.filter-panel label {
    font-size: .82rem;
    font-weight: 700;
    color: var(--ink-mid);
    display: block;
    margin-bottom: 4px;
}

.filter-form input,
.filter-form select,
.filter-form textarea,
.filter-panel input,
.filter-panel select,
.filter-panel textarea {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    padding: 11px 14px;
    font: .9rem/1.5 var(--font-sans);
    color: var(--ink);
    background: var(--surface);
    outline: none;
    transition: border-color .14s, box-shadow .14s;
}

.filter-form input:focus,
.filter-form select:focus,
.filter-form textarea:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.filter-panel textarea:focus {
    border-color: var(--primary-mid);
    box-shadow: 0 0 0 3px rgba(21,87,192,.12);
}

.filter-form .solid-button {
    padding: 13px 24px;
    font-size: .9rem;
    justify-content: center;
}

.filter-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.filter-panel h2,
.filter-panel h3 {
    font-family: var(--font-sans);
    margin: 0 0 18px;
    font-size: 1.1rem;
    color: var(--ink);
}

/* ──────────────────────────────────────────────────────────
   MANAGER STATS / PLAN STATS
   ────────────────────────────────────────────────────────── */
.manager-stats,
.plan-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.manager-stats article,
.plan-stats article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
    transition: box-shadow .2s;
}

.manager-stats article:hover,
.plan-stats article:hover {
    box-shadow: var(--shadow-sm);
}

.manager-stats article::before,
.plan-stats article::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--primary-mid), var(--accent));
}

.manager-stats article.stat-highlight-danger {
    background: var(--bad-soft);
    border-color: var(--bad);
}

.manager-stats article.stat-highlight-danger::before {
    background: var(--bad);
}

.manager-stats article.stat-highlight-danger span {
    color: var(--bad-strong);
}

.manager-stats article.stat-highlight-danger strong {
    color: var(--bad);
}

.manager-stats span,
.plan-stats span {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
}

.manager-stats strong,
.plan-stats strong {
    font-family: var(--font-sans);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}

/* ──────────────────────────────────────────────────────────
   MANAGER / PIPELINE
   ────────────────────────────────────────────────────────── */
.manager-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
    margin-top: 28px;
}

.pipeline-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 16px;
}

.pipeline-card {
    padding: 20px;
    background: var(--surface);
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
    transition: box-shadow .2s;
}

.pipeline-card:hover { box-shadow: var(--shadow-sm); }

.pipeline-card:nth-child(1)::before { background: var(--accent); }
.pipeline-card:nth-child(2)::before { background: var(--gold); }
.pipeline-card:nth-child(3)::before { background: var(--green); }
.pipeline-card:nth-child(n+4)::before { background: var(--primary-mid); }

.pipeline-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
}

.pipeline-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.pipeline-head span {
    padding: 4px 10px;
    border-radius: var(--r-xs);
    background: var(--primary-light);
    color: var(--primary-mid);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    white-space: nowrap;
}

.pipeline-card h3 { margin: 0; font-size: .95rem; }

/* ──────────────────────────────────────────────────────────
   TIMELINE (plan page)
   ────────────────────────────────────────────────────────── */
.timeline-list { display: grid; gap: 12px; }

.timeline-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-xs);
    transition: box-shadow .2s;
    position: relative;
    overflow: hidden;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--accent);
}

.timeline-card:hover { box-shadow: var(--shadow-sm); }

.timeline-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    background: var(--primary-light);
    color: var(--primary-mid);
    font-weight: 800;
    font-size: .88rem;
    flex-shrink: 0;
    border: 1.5px solid rgba(21,87,192,.2);
}

.timeline-card h3 { margin: 0 0 4px; font-size: .95rem; }
.timeline-card p  { margin: 0; color: var(--muted); font-size: .85rem; }

/* Team list */
.team-list { display: grid; gap: 12px; }

.team-card {
    padding: 16px 18px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    transition: box-shadow .2s;
}
.team-card:hover { box-shadow: var(--shadow-xs); }

.team-card h3 { margin: 4px 0 6px; font-size: .95rem; }
.team-card strong {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--primary-mid);
}
.team-card p {
    color: var(--muted);
    font-size: .85rem;
    margin: 0;
}

/* ──────────────────────────────────────────────────────────
   RECORD TABLE
   ────────────────────────────────────────────────────────── */
.record-table {
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.record-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line-light);
    font-size: .875rem;
    transition: background .12s;
}

.record-table-row:not(.record-table-head):hover { background: var(--bg); }
.record-table-row:last-child { border-bottom: none; }

.record-table-head {
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    background: var(--bg);
}

/* Editable breakdown rows: the last column holds the record, adjust and remove controls. */
.record-table-row--breakdown {
    grid-template-columns: 2fr .8fr .8fr .9fr 2.2fr;
    align-items: start;
}

.breakdown-editor { display: grid; gap: 10px; }
.breakdown-editor__payments { display: grid; gap: 6px; }

.breakdown-editor__payment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px;
    border: 1px solid var(--line-light);
    border-radius: 10px;
    background: var(--bg);
}

.breakdown-editor__actions { display: flex; gap: 6px; flex-shrink: 0; }

.breakdown-editor__actions .ghost-button,
.breakdown-editor__actions .danger-button {
    padding: 5px 10px;
    font-size: .72rem;
    cursor: pointer;
}

.danger-button { color: var(--red); border-color: var(--red); }
.danger-button:hover { background: var(--red); color: #fff; }

.breakdown-editor__form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    align-items: center;
}

.breakdown-editor__form label {
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.breakdown-editor__form input,
.breakdown-editor__form select { width: 100%; }

.breakdown-editor__form .solid-button { grid-column: 1 / -1; }

/* ──────────────────────────────────────────────────────────
   DASHBOARD PIPELINE CARDS (status colors)
   ────────────────────────────────────────────────────────── */
.pipeline-card .pipeline-head span[class*="pending"],
.pipeline-card .pipeline-head span {
    background: var(--primary-light);
    color: var(--primary-mid);
}

/* ──────────────────────────────────────────────────────────
   ADMIN PAGE
   ────────────────────────────────────────────────────────── */
.admin-header {
    background:
        linear-gradient(135deg, rgba(6,31,74,.97) 0%, rgba(11,61,145,.92) 100%);
    border-radius: var(--r-xl);
    padding: 36px 40px 24px;
    color: #fff;
    margin: 24px 0;
    position: relative;
    overflow: hidden;
}

.admin-header::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(242,124,58,.15);
    pointer-events: none;
}

.admin-header-content { position: relative; z-index: 1; margin-bottom: 20px; }

.admin-header h1 {
    font-family: var(--font-sans);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 700;
    color: #fff;
    margin: 6px 0 10px;
}

.admin-header p {
    color: rgba(255,255,255,.75);
    font-size: .9rem;
    max-width: 700px;
    margin: 0;
}

.admin-header-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.admin-header-tabs a {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: var(--r-sm);
    font-size: .875rem;
    font-weight: 700;
    color: rgba(255,255,255,.8);
    background: rgba(255,255,255,.1);
    border: 1.5px solid rgba(255,255,255,.2);
    transition: background .15s, color .15s, border-color .15s;
    text-decoration: none;
    min-height: 42px;
}

.admin-header-tabs a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.admin-header-tabs a.is-active {
    background: rgba(255,255,255,.94);
    border-color: rgba(255,255,255,.94);
    color: var(--primary-mid);
}

.admin-workspace {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}

.admin-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.admin-shortcut-card {
    text-decoration: none;
    color: inherit;
    transition: transform .16s, box-shadow .16s, border-color .16s;
}

.admin-shortcut-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.admin-shortcut-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
}

.admin-shortcut-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-soft, rgba(31, 74, 58, .10));
    color: var(--primary, #1f4a3a);
}

.admin-shortcut-icon .material-symbols-rounded {
    font-size: 23px;
    line-height: 1;
}

.admin-shortcut-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.admin-shortcut-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink, #14201c);
}

.admin-shortcut-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e2483d;
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
}

.admin-shortcut-text {
    font-size: .86rem;
    line-height: 1.45;
    color: var(--muted, #5c6b66);
}

.admin-page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

/* Tenant detail header: navigation bar + separate action groups */
.tenant-detail-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.tenant-detail-bar__group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-xs);
}

.admin-toolbar h2 {
    font-size: 1.05rem;
    margin: 4px 0 6px;
    color: var(--ink);
}

.admin-toolbar p {
    font-size: .875rem;
    color: var(--muted);
    margin: 0;
}

.admin-toolbar-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.admin-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 28px 32px;
    box-shadow: var(--shadow-xs);
}

.admin-content-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 20px;
    margin-top: 22px;
    align-items: start;
}

.admin-content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 92px;
}

.admin-content-sidebar h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
}

.admin-content-sidebar p {
    margin: 0;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.6;
}

.admin-content-create-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-content-pages {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-content-page {
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--bg);
    overflow: hidden;
}

.admin-content-page summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(21,87,192,.06), rgba(242,124,58,.08));
}

.admin-content-page summary::-webkit-details-marker {
    display: none;
}

.prior-tenure-block[open] .tenure-summary-amount {
    display: none;
}

.admin-content-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-content-page-heading strong {
    display: block;
    margin-top: 4px;
    font-size: 1rem;
    color: var(--ink);
}

.admin-content-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    padding: 18px;
}

.admin-content-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.admin-content-form-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.admin-content-form-head h3 {
    margin: 4px 0 0;
    color: var(--ink);
    font-size: 1rem;
}

.admin-code-field {
    min-height: 250px;
    font-family: Consolas, "Courier New", monospace;
    font-size: .85rem;
    line-height: 1.65;
    white-space: pre;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 16px;
    margin-top: 20px;
}

.admin-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-field label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--ink-mid);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    padding: 10px 14px;
    font: .9rem/1.5 var(--font-sans);
    color: var(--ink);
    background: var(--bg);
    outline: none;
    transition: border-color .14s, box-shadow .14s;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
    border-color: var(--primary-mid);
    box-shadow: 0 0 0 3px rgba(21,87,192,.1);
    background: var(--surface);
}

.admin-span-3 { grid-column: span 3; }
.admin-span-2 { grid-column: span 2; }

.admin-editor-state {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    font-size: .875rem;
}

.admin-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 12px;
    margin-top: 16px;
}

.admin-gallery-item {
    border-radius: var(--r-sm);
    overflow: hidden;
    border: 2px solid var(--line);
    aspect-ratio: 4/3;
    background: var(--bg);
    transition: border-color .14s;
}

.admin-gallery-item:hover { border-color: var(--primary-mid); }
.admin-gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.admin-preview-card,
.admin-preview-empty {
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1.5px solid var(--line);
    background: var(--bg);
    min-height: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: .875rem;
}

.admin-preview-card img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.admin-inventory-table {
    margin-top: 20px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--surface);
}

.admin-inventory-row {
    display: grid;
    grid-template-columns: minmax(320px, 2.35fr) minmax(90px, .8fr) minmax(120px, .9fr) minmax(100px, .8fr) minmax(100px, .8fr) minmax(132px, .92fr);
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line-light);
}

.admin-inventory-row:last-child {
    border-bottom: none;
}

.admin-inventory-head {
    background: var(--bg);
    color: var(--muted);
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.admin-property-cell {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.admin-property-cell img {
    width: 92px;
    height: 72px;
    border-radius: var(--r-sm);
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--bg);
}

.admin-property-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.admin-property-summary strong {
    color: var(--ink);
    font-size: .94rem;
    line-height: 1.35;
}

.admin-property-summary span {
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.45;
}

.admin-inventory-value {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--ink);
    font-size: .85rem;
    line-height: 1.45;
}

.admin-inventory-value strong {
    font-size: .9rem;
    color: var(--ink);
}

.admin-inventory-value span {
    color: var(--muted);
    font-size: .78rem;
}

.admin-price-cell strong {
    color: var(--accent-dark);
}

.admin-table-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    min-width: 0;
}

.admin-table-actions .text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--primary-mid);
    font-weight: 700;
    text-decoration: none;
    transition: border-color .14s, background .14s, color .14s;
}

.admin-table-actions .text-link:hover {
    border-color: var(--primary-mid);
    background: var(--primary-light);
    color: var(--primary);
}

.admin-inline-form {
    display: inline-flex;
    margin: 0;
}

/* ── Admin action pill buttons ─────────────────────────────────────────── */
.admin-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 13px;
    border: none;
    border-radius: 6px;
    background: #1557C0;
    color: #ffffff;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .01em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(10,30,70,.18), 0 1px 2px rgba(10,30,70,.1);
    transition: background .15s, box-shadow .15s, transform .12s;
    overflow: visible;
    flex: 0 0 auto;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
}

.admin-icon-button svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.admin-icon-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(10,30,70,.22), 0 1px 4px rgba(10,30,70,.12);
}

.admin-icon-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(10,30,70,.16);
}

.admin-icon-button:focus-visible {
    outline: 2px solid rgba(21, 87, 192, .45);
    outline-offset: 2px;
}

/* Edit — navy blue */
.admin-icon-button-edit {
    background: var(--primary-mid);
}

.admin-icon-button-edit:hover {
    background: var(--primary);
}

/* View — slate */
.admin-icon-button-view {
    background: var(--neutral);
}

.admin-icon-button-view:hover {
    background: var(--neutral-strong);
}

/* Delete — assertive red */
.admin-icon-button-danger {
    background: var(--bad);
}

.admin-icon-button-danger:hover {
    background: var(--bad-strong);
}

.admin-empty-inline {
    grid-column: 1 / -1;
    padding: 8px 0;
    color: var(--muted);
    font-size: .9rem;
}

.admin-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.admin-property-card {
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: box-shadow .2s, border-color .2s;
}

.admin-property-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-mid);
}

.admin-property-card img { height: 160px; }

.admin-property-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-property-body h3 { font-size: .92rem; margin: 0; }
.admin-property-body p { font-size: .82rem; color: var(--muted); margin: 0; }

.admin-property-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.admin-property-actions .ghost-button {
    font-size: .78rem;
    padding: 6px 12px;
    border-color: var(--line);
    color: var(--muted);
    background: transparent;
}
.admin-property-actions .ghost-button:hover {
    border-color: var(--primary-mid);
    color: var(--primary);
    background: var(--primary-light);
}

.admin-form-actions {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--line-light);
    align-items: center;
    flex-wrap: wrap;
}


.admin-status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
}

.admin-status-pill.pending { background: var(--warn-soft); color: var(--warn-strong); }
.admin-status-pill.requested { background: var(--warn-soft); color: var(--warn-strong); }
.admin-status-pill.approved { background: var(--good-soft); color: var(--good); }
.admin-status-pill.confirmed { background: var(--good-soft); color: var(--good); }
.admin-status-pill.active { background: var(--primary-light); color: var(--primary-mid); }
.admin-status-pill.completed { background: var(--primary-light); color: var(--primary-mid); }
.admin-status-pill.renewed { background: var(--good-soft); color: var(--good); }
.admin-status-pill.rejected { background: var(--bad-soft); color: var(--bad); }
.admin-status-pill.cancelled { background: var(--bad-soft); color: var(--bad); }
.admin-status-pill.inactive { background: var(--neutral-soft); color: var(--neutral); }
.admin-status-pill.ended { background: var(--neutral-soft); color: var(--neutral); }

/* ── Delete confirmation modal ────────────────────────────────────────── */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.admin-modal-dialog {
    background: var(--surface, #fff);
    border-radius: var(--r-md, 10px);
    border: 1px solid var(--line, #e5e7eb);
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    max-width: 440px;
    width: 100%;
    padding: 28px 32px;
}

.admin-modal-dialog--wide {
    max-width: 760px;
}

.admin-modal-overlay--scroll {
    align-items: flex-start;
    overflow-y: auto;
    padding: 36px 24px;
}

.admin-modal-dialog h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    color: var(--ink, #111);
}

.admin-modal-dialog p {
    margin: 0 0 24px;
    font-size: .875rem;
    color: var(--muted, #6b7280);
    line-height: 1.55;
}

.admin-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.admin-modal-actions .ghost-button,
.admin-modal-actions .solid-button {
    font-size: .82rem;
    padding: 9px 18px;
}

.admin-modal-actions .ghost-button {
    background: var(--bg, #f3f4f6);
    border-color: var(--line, #e5e7eb);
    color: var(--ink, #111);
}

.admin-modal-actions .ghost-button:hover {
    background: var(--line, #e5e7eb);
    color: var(--ink, #111);
}

.admin-tenant-summary {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.admin-tenant-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px 24px;
}

.admin-tenant-summary-grid div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.admin-tenant-summary-grid div > span:first-child {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.admin-tenant-summary-grid strong {
    font-size: .95rem;
    color: var(--ink);
}

.admin-tenant-charges {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line-light, #e5e7eb);
}

.admin-tenant-charges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px 20px;
}

.admin-tenant-charges-grid div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.admin-tenant-charges-grid div > span:first-child {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.admin-tenant-charges-grid strong {
    font-size: .95rem;
    color: var(--ink);
}

.admin-apps-table { margin-top: 16px; }
.admin-app-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line-light);
    align-items: center;
    font-size: .875rem;
    background: var(--surface);
    transition: background .12s;
}
.admin-app-row:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
.admin-app-row:last-child { border-bottom: none; border-radius: 0 0 var(--r-md) var(--r-md); }
.admin-app-row:hover { background: var(--bg); }

.admin-app-row.admin-app-head {
    background: var(--bg);
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    border-radius: var(--r-md) var(--r-md) 0 0;
}

.admin-app-actions { display: flex; gap: 6px; }
.admin-app-actions button {
    font-size: .8rem;
    padding: 6px 12px;
    border-radius: var(--r-xs);
    border: 1.5px solid transparent;
    cursor: pointer;
    font-weight: 700;
    transition: .14s;
}
.admin-btn-approve { background: var(--green-light); color: var(--green); border-color: var(--green); }
.admin-btn-approve:hover { background: var(--green); color: #fff; }
.admin-btn-reject { background: #FEE2E2; color: var(--red); border-color: var(--red); }
.admin-btn-reject:hover { background: var(--red); color: #fff; }
.admin-btn-edit { background: var(--primary-light); color: var(--primary-mid); border-color: var(--primary-mid); }
.admin-btn-edit:hover { background: var(--primary-mid); color: #fff; }
.admin-btn-delete { background: var(--line-light); color: var(--muted); border-color: var(--line); }
.admin-btn-delete:hover { background: #FEE2E2; color: var(--red); border-color: var(--red); }

/* ──────────────────────────────────────────────────────────
   MANAGER PAGE (landlord)
   ────────────────────────────────────────────────────────── */
.manager-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 88px;
}

.pipeline-board { display: flex; flex-direction: column; gap: 16px; }

.tour-availability-note {
    display: grid;
    gap: 4px;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--r-sm);
    background: var(--bg);
    border: 1px solid var(--line);
    font-size: .84rem;
}

.tour-availability-note strong {
    color: var(--ink);
}

.tour-availability-note span {
    color: var(--muted);
}

.tour-booking-grid,
.tour-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.tour-booking-form,
.tour-request-actions {
    display: grid;
    gap: 12px;
}

.tour-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tour-steps {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}

.tour-steps div {
    padding: 14px 16px;
    border-radius: var(--r-sm);
    background: var(--bg);
    border: 1px solid var(--line);
}

.tour-steps strong {
    display: block;
    margin-bottom: 6px;
}

.tour-steps p {
    margin: 0;
    color: var(--muted);
    font-size: .88rem;
}

.tour-slot-list {
    display: grid;
    gap: 12px;
}

.tour-slot-card {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: var(--bg);
}

.tour-slot-card h3 {
    margin: 0 0 6px;
    font-size: .96rem;
}

.tour-slot-card p {
    margin: 0 0 6px;
    font-size: .86rem;
}

/* ──────────────────────────────────────────────────────────
   RECENT LISTINGS
   ────────────────────────────────────────────────────────── */
.recent-list { display: grid; gap: 10px; }
.recent-card {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: .875rem;
    transition: box-shadow .2s;
}
.recent-card:hover { box-shadow: var(--shadow-xs); }
.recent-card img { height: 56px; border-radius: var(--r-xs); object-fit: cover; }
.recent-card h3 { margin: 0 0 4px; font-size: .875rem; }
.recent-card p { margin: 0; font-size: .8rem; color: var(--muted); }

/* ──────────────────────────────────────────────────────────
   FOOTER
   ────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,.8);
    margin-top: 64px;
    /* No padding tricks here — inner wrapper handles centering */
}

.footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 56px 40px 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: 48px 40px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    align-items: start; /* columns don't stretch past their own content */
}

/* Brand column */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.footer-brand img {
    display: block;
    width: auto;
    height: 36px;
    opacity: .88;
    margin-bottom: 10px;
}

/* Text logo shown when img fails to load */
.footer-brand-name {
    display: none; /* shown via JS / onerror */
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
    margin-bottom: 10px;
    line-height: 1;
}
.footer-brand-name em {
    font-style: normal;
    color: var(--accent);
}

.footer-brand p {
    font-size: .875rem;
    color: rgba(255,255,255,.58);
    line-height: 1.75;
    margin: 4px 0 18px;
    max-width: 280px;
}

.footer-social {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    color: rgba(255,255,255,.7);
    transition: background .15s, border-color .15s, color .15s;
    text-decoration: none;
    flex-shrink: 0;
}
.footer-social a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Nav columns */
.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-col h4 {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: rgba(255,255,255,.38);
    margin: 0 0 18px;
    line-height: 1;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul li a {
    font-size: .875rem;
    color: rgba(255,255,255,.65);
    transition: color .14s;
    text-decoration: none;
    line-height: 1.4;
}
.footer-col ul li a:hover { color: var(--accent); }

.footer-contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-contact-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.4);
}

.footer-contact-text,
.footer-contact-note {
    font-size: .875rem;
    line-height: 1.55;
    color: rgba(255,255,255,.65);
}

/* Bottom bar */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-bottom p {
    font-size: .8rem;
    color: rgba(255,255,255,.38);
    margin: 0;
    line-height: 1.5;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-bottom-links a {
    font-size: .8rem;
    color: rgba(255,255,255,.42);
    transition: color .14s;
    text-decoration: none;
    white-space: nowrap;
}
.footer-bottom-links a:hover { color: rgba(255,255,255,.82); }

/* ──────────────────────────────────────────────────────────
   PAGE TRANSITIONS
   ────────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.page-content > section:first-child,
.page-content > nav:first-child + section {
    animation: fadeIn .35s ease-out both;
}

body.is-transitioning * { pointer-events: none; }
body.is-transitioning { opacity: .7; transition: opacity .2s; }

/* ──────────────────────────────────────────────────────────
   UTILITIES
   ────────────────────────────────────────────────────────── */
.muted-text { color: var(--muted); }
.text-center { text-align: center; }
.text-danger { color: var(--red); }
.text-muted { color: var(--muted); }

/* ──────────────────────────────────────────────────────────
   ADMIN ALERT BANNER
   ────────────────────────────────────────────────────────── */
.admin-alert-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: var(--r-md);
    padding: 14px 18px;
    margin-bottom: 24px;
}
.admin-alert-banner p { margin: 0; color: #92400e; }
.admin-alert-banner a { color: #92400e; font-weight: 600; text-decoration: underline; }

/* ──────────────────────────────────────────────────────────
   ADMIN PAGINATION
   ────────────────────────────────────────────────────────── */
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 12px;
}
.admin-pagination a,
.admin-pagination strong {
    padding: 8px 14px;
    border-radius: var(--r-sm);
    font-size: .88rem;
}
.admin-pagination a {
    color: var(--blue);
    text-decoration: none;
    border: 1px solid var(--line);
    background: var(--surface);
}
.admin-pagination a:hover { background: #f1f5f9; }
.admin-pagination strong {
    background: var(--blue);
    color: #fff;
    font-weight: 600;
}
.admin-pagination-info { font-size: .88rem; color: var(--muted); }

.admin-table-meta { margin: 8px 0 0; }
.admin-table-meta .muted-text { margin: 0; font-size: .85rem; }

.admin-property-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 8px;
}
.admin-property-pill {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.admin-property-pill:hover {
    border-color: var(--primary-mid);
    transform: translateY(-1px);
}
.admin-property-pill.is-active {
    border-color: var(--primary-mid);
    background: var(--primary-light);
}
.admin-property-pill-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--ink);
}
.admin-property-pill-count {
    font-size: .78rem;
    color: var(--muted);
}
.admin-property-pill.is-active .admin-property-pill-title { color: var(--primary-mid); }
.admin-property-pill.is-active .admin-property-pill-count { color: var(--primary-mid); }

.admin-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-search-form input[type="search"] {
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    padding: 9px 14px;
    font: .875rem/1.5 var(--font-sans);
    color: var(--ink);
    background: var(--surface);
    outline: none;
    min-width: 260px;
    transition: border-color .14s, box-shadow .14s;
}
.admin-search-form input[type="search"]:focus {
    border-color: var(--primary-mid);
    box-shadow: 0 0 0 3px rgba(21,87,192,.1);
}

.admin-add-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--r-sm);
    background: var(--primary-mid);
    color: #fff;
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s ease, transform .15s ease;
}
.admin-add-button:hover {
    background: var(--primary-mid);
    transform: translateY(-1px);
}
.admin-add-button-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.admin-tenant-table .record-table-row {
    grid-template-columns: 1.9fr 1.2fr 1fr 1fr 1fr 1fr .7fr 1fr;
}
.admin-tenure-table .record-table-row {
    grid-template-columns: 1.4fr 1.6fr 1fr 1fr 1fr 1fr;
}
.admin-amount-ok { color: var(--good); font-weight: 700; }
.admin-amount-due { color: var(--warn); font-weight: 700; }
.admin-amount-danger { color: var(--bad); font-weight: 800; }
.admin-amount-note { display: block; font-size: .72rem; font-weight: 600; color: var(--warn); }
.admin-amount-note--muted { color: var(--muted); }
.admin-tenant-row {
    cursor: pointer;
    transition: background .14s ease;
}
.admin-tenant-row:hover {
    background: rgba(21, 87, 192, .06);
}
.admin-tenant-row:hover strong {
    color: var(--primary-mid);
}

/* ──────────────────────────────────────────────────────────
   ADMIN UNIT DETAIL
   ────────────────────────────────────────────────────────── */
.admin-unit-detail-card {
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    padding: 24px 28px;
    margin-bottom: 20px;
}
.admin-unit-detail-card h3 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 700;
}
.admin-unit-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px 24px;
}
.admin-unit-detail-grid dt {
    font-size: .8rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 2px;
}
.admin-unit-detail-grid dd {
    margin: 0 0 10px 0;
    font-weight: 600;
    font-size: .95rem;
}

/* ──────────────────────────────────────────────────────────
   ADMIN UNIT LINK + ACTIONS
   ────────────────────────────────────────────────────────── */
.admin-unit-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}
.admin-unit-link:hover { text-decoration: underline; }

.admin-inline-form {
    display: inline-block;
    margin: 0;
}

.ghost-button[disabled],
.ghost-button-disabled {
    opacity: .45;
    pointer-events: none;
    cursor: not-allowed;
}

/* ──────────────────────────────────────────────────────────
   ADMIN RECORD TABLE ROW HIGHLIGHT
   ────────────────────────────────────────────────────────── */
.record-table-row--highlight {
    background: var(--warn-soft);
    border-left: 3px solid var(--warn-border);
}

/* ──────────────────────────────────────────────────────────
   SERVICE CHARGE MONTHLY TABLE (6 columns + yearly dividers)
   ────────────────────────────────────────────────────────── */
.record-table-row.sc-table-col-6 {
    grid-template-columns: 1fr 1fr 1.3fr 1.2fr 1fr 1fr;
}

.sc-table-col-6 .record-table-head {
    background: var(--bg);
}

.sc-year-divider {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 8px 20px;
    margin-top: 8px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line-light);
    background: var(--bg);
    font-size: .78rem;
}

.sc-year-divider:first-of-type {
    margin-top: 0;
    border-top: none;
}

/* ──────────────────────────────────────────────────────────
   RESPONSIVE
   ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .search-layout-map { grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); }
    .detail-intro { grid-template-columns: 1fr 300px; }
    /* Brand col + 3 nav cols → brand takes full first row, then 3 cols share second row */
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px 28px;
    }
    .footer-brand {
        grid-column: 1 / -1; /* spans all three columns */
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 20px;
        padding-bottom: 28px;
        border-bottom: 1px solid rgba(255,255,255,.08);
        margin-bottom: 4px;
    }
    .footer-brand p { margin-bottom: 0; max-width: 340px; }
    .footer-social { align-self: flex-start; margin-top: 0; }
    .manager-layout { grid-template-columns: 1fr; }
    .manager-sidebar { position: static; }
}

@media (max-width: 900px) {
    .topbar { padding: 0 18px; }
    .topnav { display: none; }
    .search-layout-map { grid-template-columns: 1fr; }
    .map-pane { display: none; }
    .detail-intro { grid-template-columns: 1fr; }
    .detail-intro-actions { position: static; }
    .tour-booking-grid,
    .tour-admin-grid { grid-template-columns: 1fr; }
    .inline-filter-bar { grid-template-columns: 1fr 1fr; }
    .admin-content-layout { grid-template-columns: 1fr; }
    .admin-content-sidebar { position: static; }
    .admin-page-actions { width: 100%; }
    .admin-form-grid { grid-template-columns: 1fr 1fr; }
    .admin-span-3, .admin-span-2 { grid-column: span 2; }
    .admin-inventory-row { grid-template-columns: minmax(280px, 2fr) repeat(5, minmax(90px, 1fr)); gap: 12px; }
    .admin-property-cell { grid-template-columns: 80px minmax(0, 1fr); gap: 12px; }
    .admin-property-cell img { width: 80px; height: 64px; }
    .admin-app-row { grid-template-columns: 1fr 1fr; }
    .admin-app-row.admin-app-head { display: none; }
    .record-table-row { grid-template-columns: 1fr 1fr; }
    .admin-tenant-table .record-table-row { grid-template-columns: 1fr 1fr; }
    .admin-tenure-table .record-table-row { grid-template-columns: 1fr 1fr; }
    .search-layout { grid-template-columns: 1fr; }
    .pipeline-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-thumbs { grid-template-columns: repeat(3, 1fr); }
    .fact-strip { grid-template-columns: repeat(2, 1fr); }
    .hero { padding: 40px 24px; min-height: 480px; }
}

@media (max-width: 640px) {
    .site-shell { width: 100%; }
    .listing-grid { grid-template-columns: 1fr; }
    .pillar-grid { grid-template-columns: 1fr; }
    .manager-stats, .plan-stats { grid-template-columns: 1fr 1fr; }
    .stat-grid { gap: 20px; }
    .topbar-actions .ghost-button { display: none; }
    .hero-search { grid-template-columns: 1fr; border-radius: var(--r-sm); }
    .hero-search input, .hero-search select { border-right: none; border-bottom: 1px solid var(--line); }
    .hero-search button { padding: 14px; }
    .admin-gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-content-blocks { grid-template-columns: 1fr; padding: 14px; }
    .admin-content-page summary { padding: 16px; }
    .admin-content-form { padding: 16px; }
    .admin-page-actions { flex-direction: column; }
    .admin-form-grid { grid-template-columns: 1fr; }
    .admin-span-3, .admin-span-2 { grid-column: span 1; }
    .admin-inventory-table {
        border: none;
        background: transparent;
        overflow: visible;
    }
    .admin-inventory-head {
        display: none;
    }
    .admin-inventory-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
        margin-bottom: 12px;
        border: 1px solid var(--line);
        border-radius: var(--r-lg);
        background: var(--surface);
    }
    .admin-property-cell {
        grid-template-columns: 72px minmax(0, 1fr);
    }
    .admin-property-cell img {
        width: 72px;
        height: 72px;
    }
    .auth-card { padding: 28px 24px; }
    .result-card { grid-template-columns: 1fr; }
    .result-card img { width: 100%; height: 200px; }
    /* Footer: single column, tighter padding */
    .footer-inner { padding: 40px 24px 28px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-brand { flex-direction: column; border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
    .footer-bottom-links { gap: 16px; }
    .location-grid { grid-template-columns: repeat(2, 1fr); }
    .pipeline-grid { grid-template-columns: 1fr; }
    .hero { min-height: 400px; }
    .hero-copy h1 { font-size: 1.8rem; }
    .page-hero, .page-hero.compact { padding: 36px 20px; }
    .tour-slot-card { flex-direction: column; }
    .tour-inline-actions { flex-direction: column; align-items: stretch; }
    .section-heading { flex-direction: column; align-items: stretch; gap: 12px; }
    .tenant-detail-bar { flex-direction: column; align-items: stretch; }
    .tenant-detail-bar .solid-button,
    .tenant-detail-bar .ghost-button { width: 100%; }
    .tenant-detail-bar__group { flex-direction: column; align-items: stretch; width: 100%; }
}

/* ──────────────────────────────────────────────────────────
   SANDWORTH ADMIN WORKSPACE
   ────────────────────────────────────────────────────────── */
body.admin-mode {
    min-height: 100vh;
    overflow-x: hidden;
    background: #f4f4ef;
}

body.admin-navigation-open {
    overflow: hidden;
}

body.admin-mode .topbar,
body.admin-mode .site-footer {
    display: none;
}

.admin-shell {
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    width: 258px;
    height: 100vh;
    height: 100dvh;
    color: #e9eee8;
    background: #203c32;
    border-right: 1px solid rgba(236, 242, 233, .1);
    transition: width .2s ease, transform .2s ease;
}

.admin-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    padding: 14px 14px 14px 18px;
    border-bottom: 1px solid rgba(236, 242, 233, .12);
}

.admin-brand-link {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    color: #f7f5eb;
}

.admin-brand-link img {
    width: 42px;
    height: 46px;
    flex: 0 0 42px;
    object-fit: contain;
}

.admin-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    white-space: nowrap;
}

.admin-brand-copy strong {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.admin-brand-copy small {
    margin-top: 4px;
    color: #cfbb83;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.admin-collapse-toggle,
.admin-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    padding: 0;
    color: #e0e8df;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.admin-collapse-toggle:hover,
.admin-mobile-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, .14);
}

.material-symbols-rounded {
    font-family: "Material Symbols Rounded";
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    font-feature-settings: "liga";
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    font-variation-settings: "FILL" 0, "wght" 420, "GRAD" 0, "opsz" 22;
}

.admin-nav {
    flex: 1;
    min-height: 0;
    padding: 13px 11px 10px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: rgba(255,255,255,.2) transparent;
    scrollbar-width: thin;
}

.admin-nav-group {
    margin: 0 0 15px;
}

.admin-nav-group-label {
    margin: 0;
    padding: 6px 11px 7px;
    color: #aebbb0;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .13em;
    line-height: 1.4;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-nav-link {
    position: relative;
    display: flex;
    min-height: 39px;
    align-items: center;
    gap: 12px;
    margin: 2px 0;
    padding: 0 11px;
    color: #d7dfd7;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: .83rem;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.admin-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.admin-nav-link.is-active {
    color: #f7f3e5;
    background: rgba(193, 160, 90, .19);
    border-color: rgba(193, 160, 90, .28);
}

.admin-nav-link.is-active::before {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: -12px;
    width: 3px;
    background: #d2b46e;
    border-radius: 0 3px 3px 0;
    content: "";
}

.admin-nav-icon {
    width: 20px;
    flex: 0 0 20px;
    color: #c5d0c5;
    text-align: center;
}

.admin-nav-link.is-active .admin-nav-icon {
    color: #e0c47a;
}

.admin-sidebar-foot {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 9px;
    margin: 0 14px;
    padding: 0 8px;
    color: #c2cfc3;
    border-top: 1px solid rgba(236, 242, 233, .12);
    font-size: .75rem;
    white-space: nowrap;
}

.admin-sidebar-status {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    background: #8eb89a;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(142, 184, 154, .12);
}

.admin-main {
    min-width: 0;
    min-height: 100vh;
    margin-left: 258px;
    transition: margin-left .2s ease;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 32px;
    background: rgba(255, 254, 252, .96);
    border-bottom: 1px solid #e3e7e0;
    backdrop-filter: blur(14px);
}

.admin-topbar-location,
.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 11px;
}

.admin-location-icon {
    color: var(--blue);
    font-size: 18px;
}

.admin-topbar-label {
    color: #35493e;
    font-size: .84rem;
    font-weight: 700;
}

.admin-topbar-divider {
    color: #bbc3ba;
    font-size: .9rem;
}

.admin-topbar-place {
    color: var(--muted);
    font-size: .81rem;
}

.admin-view-site,
.admin-signout {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 11px;
    color: #456252;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.admin-view-site:hover,
.admin-signout:hover {
    background: #eef2ec;
    border-color: #dce4dc;
}

.admin-view-site .material-symbols-rounded,
.admin-signout .material-symbols-rounded {
    font-size: 17px;
}

.admin-signout {
    color: #785d32;
    border-color: #e9e1cf;
}

.admin-site-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.admin-page-content {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 30px 34px 54px;
}

.admin-flash-stack {
    max-width: 1612px;
    margin: 16px auto 0;
    padding: 0 34px;
}

.admin-mode .admin-header {
    margin: 0 0 24px;
    padding: 0;
    overflow: visible;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.admin-mode .admin-header::before,
.admin-mode .admin-header-tabs {
    display: none;
}

.admin-mode .admin-header-content {
    margin: 0;
}

.admin-mode .admin-header .eyebrow {
    color: var(--accent-dark);
}

.admin-mode .admin-header h1 {
    margin: 6px 0 8px;
    color: #263a30;
    font-size: clamp(1.55rem, 2.1vw, 1.9rem);
    line-height: 1.25;
}

.admin-mode .admin-header p {
    max-width: 760px;
    color: #68776e;
    font-size: .91rem;
    line-height: 1.6;
}

.admin-mode .manager-stats {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 13px;
    margin: 0 0 24px;
}

.admin-mode .manager-stats article {
    min-height: 104px;
    padding: 18px 19px;
    background: var(--surface);
    border-color: #e4e7df;
    border-radius: 11px;
    box-shadow: 0 2px 7px rgba(33, 57, 44, .035);
}

.admin-mode .manager-stats article::before {
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
}

.admin-mode .manager-stats span {
    font-size: .78rem;
}

.admin-mode .manager-stats strong {
    margin-top: 9px;
    color: #2d493a;
    font-size: 1.3rem;
}

.admin-mobile-toggle,
.admin-scrim {
    display: none;
}

.admin-mode :focus-visible {
    outline: 3px solid rgba(85, 126, 149, .65);
    outline-offset: 2px;
}

.admin-shell.is-collapsed .admin-sidebar {
    width: 76px;
}

.admin-shell.is-collapsed .admin-main {
    margin-left: 76px;
}

.admin-shell.is-collapsed .admin-brand {
    min-height: 100px;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 9px 8px;
}

.admin-shell.is-collapsed .admin-brand-link {
    display: flex;
    justify-content: center;
}

.admin-shell.is-collapsed .admin-brand-copy {
    display: none;
}

.admin-shell.is-collapsed .admin-brand-link img {
    width: 36px;
    height: 39px;
    flex-basis: 36px;
}

.admin-shell.is-collapsed .admin-collapse-toggle {
    transform: none;
}

.admin-shell.is-collapsed .admin-nav-group-label,
.admin-shell.is-collapsed .admin-nav-copy,
.admin-shell.is-collapsed .admin-sidebar-copy {
    display: none;
}

.admin-shell.is-collapsed .admin-nav-link {
    justify-content: center;
    padding: 0;
}

.admin-shell.is-collapsed .admin-sidebar-foot {
    justify-content: center;
    margin-right: 0;
    margin-left: 0;
    padding: 0;
}

@media (max-width: 820px) {
    .admin-sidebar {
        z-index: 71;
        width: min(286px, 86vw);
        transform: translateX(-102%);
    }

    .admin-shell.is-mobile-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-shell.is-collapsed .admin-sidebar {
        width: min(286px, 86vw);
    }

    .admin-shell.is-collapsed .admin-brand {
        min-height: 82px;
        flex-direction: row;
        justify-content: space-between;
        gap: 0;
        padding-right: 14px;
        padding-left: 18px;
    }

    .admin-shell.is-collapsed .admin-brand-link,
    .admin-shell.is-collapsed .admin-brand-copy,
    .admin-shell.is-collapsed .admin-nav-group-label,
    .admin-shell.is-collapsed .admin-nav-copy,
    .admin-shell.is-collapsed .admin-sidebar-copy {
        display: flex;
    }

    .admin-shell.is-collapsed .admin-brand-copy {
        flex-direction: column;
    }

    .admin-shell.is-collapsed .admin-nav-link {
        justify-content: flex-start;
        padding: 0 11px;
    }

    .admin-shell.is-collapsed .admin-sidebar-foot {
        justify-content: flex-start;
        margin: 0 14px;
        padding: 0 8px;
    }

    .admin-shell.is-collapsed .admin-main,
    .admin-main {
        margin-left: 0;
    }

    .admin-shell.is-mobile-open .admin-scrim {
        position: fixed;
        z-index: 70;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        padding: 0;
        background: rgba(19, 34, 27, .48);
        border: 0;
        cursor: pointer;
    }

    .admin-collapse-toggle,
    .admin-mobile-toggle {
        display: inline-flex;
    }

    .admin-collapse-toggle {
        display: none;
    }

    .admin-topbar {
        min-height: 62px;
        padding: 0 18px;
    }

    .admin-page-content {
        padding: 25px 20px 42px;
    }

    .admin-flash-stack {
        padding: 0 20px;
    }
}

@media (max-width: 520px) {
    .admin-topbar {
        gap: 10px;
        padding: 0 13px;
    }

    .admin-topbar-location {
        gap: 8px;
    }

    .admin-topbar-label {
        font-size: .77rem;
    }

    .admin-topbar-place,
    .admin-topbar-divider,
    .admin-view-site span:last-child,
    .admin-signout span:last-child {
        display: none;
    }

    .admin-view-site,
    .admin-signout {
        width: 36px;
        padding: 0;
    }

    .admin-topbar-actions {
        gap: 5px;
    }

    .admin-page-content {
        padding: 22px 14px 36px;
    }

    .admin-flash-stack {
        padding: 0 14px;
    }

    .admin-mode .manager-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .admin-mode .manager-stats article {
        min-height: 92px;
        padding: 15px;
    }
}

/* ============================================================
   SANDWORTH PUBLIC EDITION — Lagos / international editorial
   Forest canvas, limestone surfaces, brushed-gold wayfinding.
   Kept deliberately scoped so the admin workspace is untouched.
   ============================================================ */
body.public-mode {
    --primary: #254b3b;
    --primary-mid: #426b58;
    --primary-dark: #18392d;
    --primary-light: #e7eee8;
    --accent: #b99652;
    --accent-dark: #96763b;
    --accent-light: #f5efdf;
    --ink: #25372f;
    --ink-mid: #52645a;
    --muted: #738078;
    --surface: #fffdf8;
    --bg: #f4f2eb;
    --bg-warm: #faf8f1;
    --line: #e2e3d9;
    --line-light: #eeeee7;
    --shadow-xs: 0 2px 8px rgba(24, 51, 39, .05);
    --shadow-sm: 0 8px 24px rgba(24, 51, 39, .08);
    --shadow-md: 0 14px 38px rgba(24, 51, 39, .12);
}

body.public-mode {
    background: #f4f2eb;
    color: var(--ink);
}
body.public-mode :focus-visible {
    outline: 3px solid #7395a3;
    outline-offset: 3px;
}
body.public-mode {
    --primary: #28553A;
    --primary-mid: #4D7650;
    --primary-dark: #1C3D2B;
    --primary-light: #EEF4D8;
    --accent: #D5E84F;
    --accent-dark: #BBD33A;
    --accent-light: #F3F7D9;
    --green: #658A42;
    --green-light: #EEF4E1;
    --gold: #C5A25E;
    --ink: #24342A;
    --ink-mid: #485A4C;
    --muted: #69786B;
    --surface: #FFFEF9;
    --bg: #F6F7EF;
    --bg-warm: #FBFAF1;
    --line: #E3E7DA;
    --line-light: #EFF1E9;
}
body.public-mode .site-shell { width: 100%; }
body.public-mode .topbar {
    height: 76px;
    padding: 0 clamp(20px, 4vw, 64px);
    background: rgba(28, 64, 49, .98);
    border-bottom: 1px solid rgba(197,162,94,.48);
    box-shadow: 0 8px 28px rgba(19, 43, 33, .17);
    backdrop-filter: blur(14px);
}
body.public-mode .brand {
    padding: 3px 10px;
    border: 1px solid rgba(197,162,94,.64);
    border-radius: 4px;
    background: #FFFEF9;
    box-shadow: 0 3px 10px rgba(12,27,19,.16);
}
body.public-mode .brand-logo { height: 50px; max-width: 220px; }
body.public-mode .topnav { gap: 4px; }
body.public-mode .topnav a {
    border-radius: 3px;
    padding: 10px 13px;
    color: rgba(251,250,244,.76);
    font-size: .84rem;
    letter-spacing: .015em;
}
body.public-mode .topnav a.is-active,
body.public-mode .topnav a:hover {
    background: rgba(213,232,79,.15);
    color: #fffdf5;
}
body.public-mode .topnav a.is-active { box-shadow: inset 0 -2px var(--accent); }
body.public-mode .topbar-actions .ghost-button {
    background: transparent;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 3px;
    color: #fff;
}
body.public-mode .topbar-actions .solid-button {
    border-radius: 3px;
    background: var(--accent);
    border-color: var(--accent);
    color: #18392d;
}
body.public-mode .solid-button,
body.public-mode .ghost-button { border-radius: 3px; }
body.public-mode .solid-button { color: #193a2d; }
body.public-mode .solid-button:hover { color: #fff; box-shadow: none; }
body.public-mode .ghost-button {
    background: transparent;
    border-color: #cbd3ca;
    color: var(--primary);
}
body.public-mode .ghost-button:hover {
    background: var(--primary-light);
    border-color: var(--primary-mid);
    color: var(--primary-dark);
}
body.public-mode .hero {
    min-height: 660px;
    align-items: center;
    padding: 78px max(32px, calc((100vw - 1400px)/2 + 24px));
    background:
        linear-gradient(90deg, rgba(19,47,36,.94) 0%, rgba(24,57,43,.79) 43%, rgba(24,57,43,.14) 100%),
        linear-gradient(0deg, rgba(20,47,36,.25), transparent 55%),
        url('../img/Arepo-II4-1024x576.jpg') center 53%/cover no-repeat;
}
body.public-mode .hero::before {
    background: linear-gradient(90deg, rgba(22,49,38,.32), transparent 75%);
}
body.public-mode .hero::after { height: 44px; background: linear-gradient(to top, var(--bg), transparent); }
body.public-mode .hero-copy { max-width: 760px; }
body.public-mode .hero-copy .eyebrow,
body.public-mode .page-hero .eyebrow {
    color: #d9c38d;
    letter-spacing: .19em;
}
body.public-mode .hero-copy h1 {
    max-width: 760px;
    margin-bottom: 20px;
    font-size: clamp(2.55rem, 4.7vw, 4.4rem);
    font-weight: 600;
    line-height: .99;
    letter-spacing: -.045em;
}
body.public-mode .hero-copy > p {
    max-width: 540px;
    margin-bottom: 32px;
    font-size: clamp(1rem, 1.5vw, 1.16rem);
    line-height: 1.65;
    color: rgba(255,253,245,.86);
}
body.public-mode .hero-tabs {
    margin-bottom: 0;
    padding: 4px 5px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 4px 4px 0 0;
    background: rgba(248,247,239,.96);
    box-shadow: none;
}
body.public-mode .hero-tabs .tab-search-item {
    padding: 12px 19px;
    color: #53645a;
    font-size: .83rem;
    letter-spacing: .035em;
    text-transform: uppercase;
}
body.public-mode .hero-tabs .tab-search-item.is-active {
    color: var(--primary-dark);
    background: var(--accent);
    box-shadow: inset 0 -2px var(--gold);
}
body.public-mode .hero-search {
    grid-template-columns: minmax(220px, 1fr) minmax(130px, 170px) auto;
    max-width: 760px;
    min-height: 68px;
    margin-bottom: 18px;
    border: 0;
    border-radius: 0 4px 4px 4px;
    box-shadow: 0 18px 48px rgba(12,31,22,.24);
}
body.public-mode .hero-search input,
body.public-mode .hero-search select { padding: 18px 20px; }
body.public-mode .hero-search button {
    padding: 0 28px;
    background: var(--accent);
    color: var(--primary-dark);
    font-weight: 700;
}
body.public-mode .hero-market-strip { margin-top: 16px; gap: 9px; }
body.public-mode .hero-market-strip a {
    border-radius: 2px;
    padding: 6px 12px;
    background: rgba(255,255,255,.11);
    border-color: rgba(255,255,255,.28);
}
body.public-mode .page-hero,
body.public-mode .page-hero.compact {
    width: 100vw;
    margin-left: calc(-1 * (100vw - min(1400px, 100vw - 64px)) / 2);
    padding: 76px max(32px, calc((100vw - min(1400px, 100vw - 64px)) / 2 + 24px)) 66px;
    background:
        linear-gradient(100deg, rgba(25,61,46,.97), rgba(39,77,59,.9)),
        url('../img/Arepo-II4-1024x576.jpg') center/cover;
}
body.public-mode .page-hero::before {
    background: radial-gradient(ellipse at 84% 15%, rgba(185,150,82,.18), transparent 44%);
}
body.public-mode .page-hero h1 {
    max-width: 820px;
    font-size: clamp(2.2rem, 3.6vw, 3.5rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -.035em;
}
body.public-mode .page-hero p { max-width: 640px; line-height: 1.7; }
body.public-mode .section-block { padding: 60px 0; }
body.public-mode .section-heading { margin-bottom: 28px; }
body.public-mode .section-heading h2 {
    max-width: 780px;
    font-size: clamp(1.55rem, 2.5vw, 2.15rem);
    font-weight: 600;
    letter-spacing: -.03em;
}
body.public-mode .section-heading .eyebrow,
body.public-mode .eyebrow { color: #95763d; }
body.public-mode .text-link { color: #315a46; }
body.public-mode .market-grid,
body.public-mode .listing-grid,
body.public-mode .market-listing-grid { gap: 22px; }
body.public-mode .market-card,
body.public-mode .listing-card,
body.public-mode .market-listing-card {
    overflow: hidden;
    border: 1px solid #e4e3d9;
    border-radius: 5px;
    background: #fffdf8;
    box-shadow: 0 7px 22px rgba(27,53,40,.055);
    transition: transform .22s ease, box-shadow .22s ease;
}
body.public-mode .market-card:hover,
body.public-mode .listing-card:hover,
body.public-mode .market-listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(27,53,40,.13);
}
body.public-mode .listing-card img { height: 238px; }
body.public-mode .listing-body,
body.public-mode .market-listing-body { padding: 20px 21px 21px; }
body.public-mode .listing-price {
    color: #315a46;
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -.025em;
}
body.public-mode .listing-meta {
    display: flex;
    gap: 10px;
    color: #58695f;
    font-weight: 600;
}
body.public-mode .type-pill {
    border-radius: 2px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: #DCE8B6;
}
body.public-mode .market-listing-card { display: flex; flex-direction: column; }
body.public-mode .market-listing-media { position: relative; }
body.public-mode .market-listing-media img { height: 240px; }
body.public-mode .market-listing-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 6px;
}
body.public-mode .market-listing-badges .type-pill {
    color: #203a2d;
    background: rgba(255,253,247,.94);
}
body.public-mode .listing-card-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: auto;
    padding-top: 15px;
}
body.public-mode .market-listing-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    flex: 1;
    border-radius: 3px;
    padding: 10px 12px;
    background: var(--primary);
    color: #fffdf8;
    font-size: .83rem;
    font-weight: 700;
    text-align: center;
    transition: background .16s ease;
}
body.public-mode .market-listing-link:hover { background: var(--primary-dark); }
body.public-mode .market-listing-link.apply-action {
    background: var(--accent);
    color: var(--primary-dark);
}
body.public-mode .market-listing-link.apply-action:hover { background: var(--accent-dark); }
body.public-mode .market-listing-card .listing-card-actions > form { margin: 0; }
body.public-mode .market-listing-card .listing-card-actions .share-button,
body.public-mode .listing-card-actions .share-button { border-radius: 3px; }
body.public-mode .search-layout-map {
    align-items: start;
    gap: 24px;
}
body.public-mode .results-panel { min-width: 0; }
body.public-mode .inline-filter-bar {
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}
body.public-mode .inline-filter-bar input,
body.public-mode .inline-filter-bar select,
body.public-mode .filter-form input,
body.public-mode .filter-form select,
body.public-mode .filter-form textarea {
    min-height: 45px;
    border: 1px solid #dfe2d8;
    border-radius: 3px;
    background: #fffefa;
    color: var(--ink);
}
body.public-mode .inline-filter-bar .solid-button { min-height: 45px; }
body.public-mode .price-range-row {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    padding-top: 12px;
    border-top: 1px solid var(--line-light);
}
body.public-mode .price-range-row label {
    margin: 0 !important;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 600;
}
body.public-mode .results-header {
    margin: 22px 0 15px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
body.public-mode .results-list {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    align-items: stretch;
    gap: 18px;
}
body.public-mode .result-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 0;
    border: 1px solid #e2e3d9;
    border-radius: 5px;
    background: var(--surface);
    box-shadow: 0 5px 18px rgba(24,51,39,.06);
}
body.public-mode .result-card > img {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
body.public-mode .result-card-body {
    flex: 1;
    padding: 21px;
}
body.public-mode .result-card-top h2 { font-size: 1.2rem; letter-spacing: -.02em; }
body.public-mode .result-actions { padding-top: 15px; border-top: 1px solid var(--line-light); }
body.public-mode .availability-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #465e4e;
    font-size: .84rem;
    font-weight: 600;
}
body.public-mode .availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #568563;
    box-shadow: 0 0 0 3px #e6efe5;
}
body.public-mode .result-action-links { display: flex; align-items: center; gap: 16px; }
body.public-mode .map-pane { position: sticky; top: 100px; }
body.public-mode .map-canvas { min-height: 640px; border-radius: 4px; }
body.public-mode .detail-intro {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: clamp(24px, 4vw, 58px);
    padding-top: 25px;
}
body.public-mode .detail-intro-copy h1 {
    font-family: var(--font-sans);
    font-size: clamp(1.8rem, 3.3vw, 2.8rem);
    line-height: 1.04;
    letter-spacing: -.035em;
}
body.public-mode .gallery-main { overflow: hidden; border-radius: 5px; }
body.public-mode .gallery-main img { width: 100%; max-height: 650px; object-fit: cover; }
body.public-mode .gallery-thumb { overflow: hidden; border-radius: 3px; }
body.public-mode .action-card,
body.public-mode .detail-card {
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fffdf8;
    box-shadow: var(--shadow-xs);
}
body.public-mode .action-card { border-top: 3px solid var(--accent); }
body.public-mode .action-card-price { color: var(--primary); }
body.public-mode .fact-strip > div { background: #f7f6ef; border-radius: 3px; }
body.public-mode .breadcrumb-row { padding-top: 19px; }
body.public-mode .auth-shell { padding: 64px 20px; }
body.public-mode .auth-card {
    border: 1px solid var(--line);
    border-top: 4px solid var(--accent);
    border-radius: 4px;
    background: #fffdf8;
    box-shadow: 0 16px 48px rgba(24,51,39,.1);
}
body.public-mode .site-footer {
    margin-top: 45px;
    background: #203f31;
    color: rgba(250,249,241,.82);
    border-top: 4px solid #b99652;
}
body.public-mode .site-footer h4,
body.public-mode .footer-brand-name { color: #fffdf6; }
body.public-mode .site-footer a:hover { color: #dec78f; }
body.public-mode .footer-col li { color: rgba(250,249,241,.72); }

@media (max-width: 900px) {
    body.public-mode .site-shell { width: 100%; }
    body.public-mode .topbar { min-height: 72px; height: auto; padding: 10px 18px; flex-wrap: wrap; }
    body.public-mode .topnav { order: 3; width: 100%; overflow-x: auto; }
    body.public-mode .topnav a { padding: 8px 11px; }
    body.public-mode .topbar-actions { margin-left: auto; }
    body.public-mode .hero { min-height: 620px; padding: 62px 28px; }
    body.public-mode .search-layout-map { grid-template-columns: 1fr; }
    body.public-mode .map-pane { position: relative; top: auto; }
    body.public-mode .map-canvas { min-height: 360px; }
    body.public-mode .detail-intro { grid-template-columns: 1fr; }
    body.public-mode .detail-intro-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
}
@media (max-width: 600px) {
    body.public-mode .site-shell { width: 100%; }
    body.public-mode .topbar { padding: 9px 14px; }
    body.public-mode .brand-logo { height: 43px; max-width: 180px; }
    body.public-mode .topbar-actions { gap: 5px; }
    body.public-mode .topbar-actions .ghost-button,
    body.public-mode .topbar-actions .solid-button { padding: 9px 11px; font-size: .77rem; }
    body.public-mode .hero {
        min-height: 660px;
        padding: 56px 20px 74px;
        background-position: 58% center;
    }
    body.public-mode .hero-copy h1 { font-size: clamp(2.3rem, 10.2vw, 3.1rem); }
    body.public-mode .hero-search { grid-template-columns: 1fr; border-radius: 0 0 4px 4px; }
    body.public-mode .hero-search input,
    body.public-mode .hero-search select { min-height: 54px; border-right: 0; border-bottom: 1px solid var(--line); }
    body.public-mode .hero-search button { min-height: 54px; }
    body.public-mode .hero-tabs { border-radius: 4px 4px 0 0; }
    body.public-mode .hero-tabs .tab-search-item { padding: 10px 11px; font-size: .72rem; }
    body.public-mode .page-hero,
    body.public-mode .page-hero.compact {
        width: 100vw;
        margin-left: calc(-1 * (100vw - (100vw - 28px)) / 2);
        padding: 52px 24px 45px;
    }
    body.public-mode .section-block { padding: 42px 0; }
    body.public-mode .section-heading { align-items: flex-start; flex-direction: column; }
    body.public-mode .listing-grid,
    body.public-mode .market-grid,
    body.public-mode .market-listing-grid { grid-template-columns: 1fr; }
    body.public-mode .listing-card img,
    body.public-mode .market-listing-media img { height: 230px; }
    body.public-mode .inline-filter-bar { grid-template-columns: 1fr; padding: 13px; }
    body.public-mode .inline-filter-bar input,
    body.public-mode .inline-filter-bar select { width: 100%; }
    body.public-mode .price-range-row input { width: min(100%, 145px); }
    body.public-mode .result-card { display: block; }
    body.public-mode .result-card > img { width: 100%; height: auto; aspect-ratio: 4 / 3; min-height: 0; }
    body.public-mode .result-card-body { padding: 18px; }
    body.public-mode .result-actions,
    body.public-mode .result-action-links { align-items: flex-start; flex-direction: column; }
    body.public-mode .result-action-links { gap: 10px; }
    body.public-mode .result-action-links > * { align-self: stretch; }
    body.public-mode .detail-intro-actions { grid-template-columns: 1fr; }
    body.public-mode .gallery-main img { min-height: 270px; }
    body.public-mode .market-listing-card .listing-card-actions { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    body.public-mode *, body.public-mode *::before, body.public-mode *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* ============================================================
   ADMIN STAT TILES — compact single-line rows (icon + label + value)
   Appended last so these win over the .admin-mode span rules.
   ============================================================ */
.admin-mode .manager-stats,
.manager-stats {
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    gap: 10px;
}

.admin-mode .manager-stats article,
.manager-stats article {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 9px;
    padding: 11px 13px;
    border-radius: 10px;
}

.manager-stats span.manager-stat-icon,
.plan-stats span.manager-stat-icon,
.admin-mode .manager-stats span.manager-stat-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-bottom: 0;
    flex: 0 0 auto;
    border-radius: 8px;
    background: var(--primary-light, #e7eee8);
    color: var(--primary-mid, #426b58);
    font-size: initial;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

.manager-stats span.manager-stat-icon .material-symbols-rounded,
.plan-stats span.manager-stat-icon .material-symbols-rounded,
.admin-mode .manager-stats span.manager-stat-icon .material-symbols-rounded {
    font-size: 17px;
    line-height: 1;
    font-weight: 400;
    color: inherit;
    text-transform: none;
    letter-spacing: normal;
}

/* the label that sits beside the icon */
.admin-mode .manager-stats article > span:not(.manager-stat-icon),
.manager-stats article > span:not(.manager-stat-icon) {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .66rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: .04em;
    color: var(--muted);
}

.admin-mode .manager-stats article > strong,
.manager-stats article > strong {
    flex: 0 0 auto;
    margin-top: 0;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1;
    color: #2d493a;
}

.manager-stats article.stat-highlight-danger span.manager-stat-icon {
    background: #fbd5d1;
    color: var(--bad-strong, #9b2c22);
}
