/* ---------------------------------------------------------------
   ClickUp Property - Phase 1 foundation stylesheet.
   This is a functional placeholder only; the luxury design system
   (typography, gradients, motion) arrives with the public-site phase.
   --------------------------------------------------------------- */

:root {
    --ink: #1a2233;
    --ink-soft: #46536b;
    --muted: #6b7890;
    --paper: #f6f4ef;
    --surface: #ffffff;
    --line: #e4dfd4;
    --navy: #10182b;
    --gold: #a8883f;
    --gold-dark: #8a6e2f;
    --ok: #1e7a46;
    --fail: #b3261e;
    --warn: #9a6700;
    --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
}

.container {
    width: min(1120px, 100% - 2.5rem);
    margin-inline: auto;
}

/* Header */
.site-header {
    background: var(--navy);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.85rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #c9a75b, var(--gold-dark));
    color: var(--navy);
    font-weight: 800;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* Main */
.site-main { min-height: 60vh; }

/* Hero */
.hero {
    padding-block: 5rem 4rem;
    text-align: center;
}

.hero-inner { max-width: 46rem; margin-inline: auto; }

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    color: var(--gold-dark);
    font-weight: 600;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.12; margin: 0.75rem 0 1rem; }

.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 40rem; margin-inline: auto; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #c9a75b, var(--gold-dark));
    color: #fff;
}

.btn-primary:hover { filter: brightness(1.05); }

.btn-ghost {
    border-color: var(--line);
    color: var(--ink);
    background: var(--surface);
}

.btn-ghost:hover { border-color: var(--gold); color: var(--gold-dark); }

/* Cards */
.cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    padding-bottom: 4rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.card h2 { margin-top: 0; font-size: 1.15rem; }
.card p { color: var(--ink-soft); margin-bottom: 0; }

/* System checks table */
.check-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-block: 1.5rem;
}

.check-table th,
.check-table td {
    text-align: left;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.check-table thead th { background: var(--navy); color: #fff; font-size: 0.85rem; letter-spacing: 0.05em; }
.check-table tbody tr:last-child th,
.check-table tbody tr:last-child td { border-bottom: 0; }
.check-table tbody th { font-weight: 600; width: 38%; }

.badge {
    display: inline-block;
    padding: 0.15rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.badge-ok { background: #e3f2e9; color: var(--ok); }
.badge-fail { background: #fbe4e2; color: var(--fail); }
.badge-warn { background: #fdf0d8; color: var(--warn); }

.error-page { text-align: center; padding-block: 5rem; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
code { background: rgba(0, 0, 0, 0.06); padding: 0.1em 0.35em; border-radius: 4px; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding-block: 2rem;
    margin-top: 3rem;
    color: var(--ink-soft);
}

.site-footer p { margin: 0.25rem 0; }

/* Header auth navigation */
.site-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

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

.nav-button {
    background: none;
    border: 0;
    color: rgba(255, 255, 255, 0.85);
    font: inherit;
    font-size: 0.95rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
}

.nav-button:hover,
.nav-button:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.nav-cta {
    border: 1px solid rgba(201, 167, 91, 0.7);
    color: #e6cd96 !important;
}

/* Authentication forms */
.auth-wrap {
    display: grid;
    place-items: center;
    padding-block: 3.5rem 4rem;
}

.auth-card {
    width: min(440px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 2.25rem;
    box-shadow: 0 18px 40px rgba(16, 24, 43, 0.08);
}

.auth-card-left {
    width: min(520px, 100%);
    margin-inline: 0;
}

.auth-card h1 { font-size: 1.7rem; margin: 0.25rem 0 1.25rem; }
.auth-card .eyebrow { margin-bottom: 0.25rem; }

.auth-lead { color: var(--ink-soft); margin: 0 0 1.25rem; }
.auth-alt { text-align: center; color: var(--muted); margin: 1.4rem 0 0; font-size: 0.95rem; }
.auth-alt a { color: var(--gold-dark); }

.stack-form { display: grid; gap: 1.1rem; }

.field { display: grid; gap: 0.35rem; }

.field label { font-weight: 600; font-size: 0.92rem; }
.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.field input[type='text'],
.field input[type='email'],
.field input[type='password'],
.field select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    color: var(--ink);
    background: #fff;
}

.field input:focus-visible,
.field select:focus-visible {
    outline: 3px solid rgba(168, 136, 63, 0.5);
    outline-offset: 1px;
    border-color: var(--gold);
}

.field input[aria-invalid='true'] {
    border-color: var(--fail);
}

.field input[readonly] {
    background: #f2efe8;
    color: var(--muted);
}

.hint { font-size: 0.82rem; color: var(--muted); margin: 0; }

.field-error {
    margin: 0;
    font-size: 0.86rem;
    color: var(--fail);
    font-weight: 500;
}

.btn-block { width: 100%; text-align: center; }

/* Status / error banners */
.banner {
    border-radius: 8px;
    padding: 0.7rem 1rem;
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    border: 1px solid;
}

.banner-ok { background: #e3f2e9; border-color: #b9dcc8; color: var(--ok); }
.banner-error { background: #fbe4e2; border-color: #efc0bc; color: var(--fail); }

/* Account area */
.account-wrap { padding-block: 3rem 4rem; }
.account-wrap h1 { font-size: 1.9rem; margin: 0.25rem 0 1.5rem; }

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.account-grid h2 { margin-top: 0; font-size: 1.1rem; }

.details { margin: 0; }
.details-row {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
}

.details-row:last-child { border-bottom: 0; }
.details-row dt { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.details-row dd { margin: 0; }

.badge-role { background: #ece7da; color: #5c4a1e; }

.account-actions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.account-actions form { margin: 0; }

/* Focus visibility */
a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(168, 136, 63, 0.6);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------
   Phase 4 — Admin panel
   --------------------------------------------------------------- */

.admin-body,
.member-body { background: #eef0f4; }

.admin-shell,
.member-shell {
    display: grid;
    grid-template-columns: 15rem 1fr;
    min-height: 90vh;
}

.admin-sidebar,
.member-sidebar {
    background: var(--navy);
    color: #fff;
    padding: 1.4rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
}

.admin-sidebar .brand,
.member-sidebar .brand { padding-inline: 0.35rem; }

.admin-sidebar-label,
.member-sidebar-label {
    margin: 0.4rem 0 0;
    padding-inline: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
}

.admin-nav,
.member-nav {
    display: grid;
    gap: 0.2rem;
}

.admin-nav a,
.member-nav a {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.admin-nav a:hover,
.admin-nav a:focus-visible,
.member-nav a:hover,
.member-nav a:focus-visible { background: rgba(255, 255, 255, 0.1); color: #fff; }
.admin-nav a.is-active,
.member-nav a.is-active { background: linear-gradient(135deg, #c9a75b, var(--gold-dark)); color: #fff; }

.admin-sidebar-footer,
.member-sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 0.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1rem;
}

.admin-sidebar-footer a,
.member-sidebar-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.4rem 0.85rem;
    font-size: 0.9rem;
}

.admin-sidebar-footer a:hover,
.member-sidebar-footer a:hover { color: #fff; }
.admin-sidebar-footer .nav-form,
.member-sidebar-footer .nav-form { padding-inline: 0.85rem; }
.admin-sidebar-footer .nav-button,
.member-sidebar-footer .nav-button { padding-inline: 0; }

.admin-main,
.member-main { padding: 2rem 0 3rem; }
.admin-section h1,
.member-section h1 { font-size: 1.9rem; margin: 0.25rem 0 0.35rem; }
.admin-section .lead,
.member-section .lead { margin-inline: 0; margin-bottom: 1.5rem; }

.admin-head,
.member-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.admin-head h1,
.member-head h1 { margin-bottom: 0.15rem; }

/* Stat cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card { display: grid; gap: 0.15rem; align-content: start; }
.stat-card h3 { margin: 0; }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.stat-link { font-size: 0.85rem; color: var(--gold-dark); text-decoration: none; margin-top: 0.5rem; }
.stat-link:hover { text-decoration: underline; }

.admin-columns,
.member-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 1.25rem;
}

.admin-columns h2, .admin-columns h3,
.member-columns h2, .member-columns h3 { margin-top: 0; }

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
}

.filter-bar input[type='search'],
.filter-bar select {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    color: var(--ink);
    background: #fff;
}

.filter-bar input[type='search'] { min-width: 14rem; flex: 1; }
.filter-bar input:focus-visible,
.filter-bar select:focus-visible {
    outline: 3px solid rgba(168, 136, 63, 0.5);
    outline-offset: 1px;
    border-color: var(--gold);
}

/* Tables */
.table-wrap { padding: 0; overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.data-table thead th {
    background: var(--navy);
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #faf8f2; }
.data-table a { color: var(--gold-dark); text-decoration: none; }
.data-table a:hover { text-decoration: underline; }

/* Moderation badges */
.badge-active { background: #e3f2e9; color: var(--ok); }
.badge-suspended { background: #fdf0d8; color: var(--warn); }
.badge-deleted { background: #ececf0; color: #565e6e; }
.badge-pending { background: #fdf0d8; color: var(--warn); }
.badge-approved { background: #e3f2e9; color: var(--ok); }
.badge-rejected { background: #fbe4e2; color: var(--fail); }

/* Buttons (admin) */
.btn-sm { padding: 0.45rem 1rem; font-size: 0.88rem; }
.btn-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.9rem; }
.btn-row form { margin: 0; }

.btn-warn {
    background: #fdf0d8;
    border-color: #e6c98a;
    color: var(--warn);
}

.btn-danger {
    background: #fbe4e2;
    border-color: #efc0bc;
    color: var(--fail);
}

/* Forms inside admin */
.field-label { font-weight: 600; font-size: 0.92rem; display: block; margin-bottom: 0.35rem; }

.admin-section textarea,
.member-section textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    color: var(--ink);
    background: #fff;
    margin-bottom: 0.8rem;
}

.admin-section textarea:focus-visible,
.member-section textarea:focus-visible {
    outline: 3px solid rgba(168, 136, 63, 0.5);
    outline-offset: 1px;
    border-color: var(--gold);
}

.error-list { color: var(--fail); font-size: 0.88rem; margin: 0 0 0.8rem; }

/* Activity list / misc */
.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.activity-list li { display: grid; gap: 0.1rem; }
.activity-list a { color: var(--gold-dark); text-decoration: none; font-weight: 600; }
.activity-list a:hover { text-decoration: underline; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.9rem;
    margin-top: 1.1rem;
}

.pagination a {
    color: var(--gold-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.pagination a:hover { text-decoration: underline; }

.prewrap { white-space: pre-wrap; }
.block { display: block; }

.admin-footer,
.member-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding-block: 1.2rem;
    text-align: center;
}

.admin-footer p,
.member-footer p { margin: 0; }

@media (max-width: 820px) {
    .admin-shell,
    .member-shell { grid-template-columns: 1fr; }
    .admin-sidebar,
    .member-sidebar { position: static; min-height: 0; }
    .admin-sidebar-footer,
    .member-sidebar-footer { margin-top: 0; }
}

/* Phase 5 — member profile form fields: url inputs + textareas follow the
   same field styling as the auth forms (which only cover text/email/password
   inputs and selects). */
.field input[type='url'],
.field textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    color: var(--ink);
    background: #fff;
}

.field textarea { resize: vertical; }

.field input[type='url']:focus-visible,
.field textarea:focus-visible {
    outline: 3px solid rgba(168, 136, 63, 0.5);
    outline-offset: 1px;
    border-color: var(--gold);
}

/* Phase 6 — property engine: form grid, listing tables, media manager. */
.title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.title-row h1 { margin: 0.25rem 0 0; }

.required-star { color: var(--fail); }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.9rem 1rem;
    margin-top: 0.9rem;
}

.form-grid .span-2 { grid-column: 1 / -1; }

.field input[type='checkbox'] {
    width: auto;
    accent-color: var(--gold);
}

.check-line {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.92rem;
}

.check-line input { margin-top: 0.2rem; }

.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.5rem 0.9rem;
    margin-top: 0.9rem;
}

.banner-pending { background: #fdf0d8; border-color: #e6c98a; color: var(--warn); }

.listing-cell { display: flex; gap: 0.75rem; align-items: center; }

.listing-thumb {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--line);
    flex: none;
    background: #fff;
}

.listing-title { color: var(--gold-dark); text-decoration: none; }
.listing-title:hover { text-decoration: underline; }

.right { text-align: right; }

.listing-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold-dark);
    margin: 0 0 0.75rem;
}

.upload-row {
    display: grid;
    grid-template-columns: minmax(150px, 230px) 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.25rem;
}

.upload-submit { justify-self: start; }

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
    margin: 1rem 0 1.4rem;
}

.media-tile {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.media-tile img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.media-tile figcaption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem;
}

.media-tile figcaption form { margin: 0; }
.media-tile figcaption .btn { padding: 0.35rem 0.6rem; font-size: 0.8rem; }

.file-list {
    list-style: none;
    margin: 0.4rem 0 1.4rem;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.file-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    background: #fff;
}

.file-list form { margin: 0 0 0 auto; }
.file-list .file-name { font-weight: 600; overflow-wrap: anywhere; }

.check-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0.6rem 0 0;
}

.check-tags li {
    background: #f5f1e6;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.85rem;
}

option[hidden] { display: none; }

.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;
}

@media (max-width: 640px) {
    .upload-row { grid-template-columns: 1fr; align-items: stretch; }
    .upload-submit { justify-self: stretch; }
}

/* ---------------------------------------------------------------
   Phase 7 — public marketplace: hero search, listing cards, search
   page, listing detail (gallery, agent card, enquiry form).
   --------------------------------------------------------------- */

/* Field styling for number/date/file inputs (Phase 6 form inputs render
   through the same field system as text inputs). */
.field input[type='number'],
.field input[type='date'],
.field input[type='file'] {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    color: var(--ink);
    background: #fff;
}

.field input[type='number']:focus-visible,
.field input[type='date']:focus-visible,
.field input[type='file']:focus-visible {
    outline: 3px solid rgba(168, 136, 63, 0.5);
    outline-offset: 1px;
    border-color: var(--gold);
}

/* Hero search box */
.hero-search {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 0.6rem;
    align-items: end;
    margin-top: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.9rem;
    text-align: left;
    box-shadow: 0 18px 40px rgba(16, 24, 43, 0.08);
}

.hero-search .btn { white-space: nowrap; }

/* Section headers */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin: 2.5rem 0 1rem;
}

.section-head h2 { margin: 0; font-size: 1.4rem; }
.section-head a { color: var(--gold-dark); text-decoration: none; font-weight: 600; }
.section-head a:hover { text-decoration: underline; }

/* Listing cards */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.property-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.property-card:hover { box-shadow: 0 14px 30px rgba(16, 24, 43, 0.1); transform: translateY(-2px); }

.property-card-media {
    display: block;
    aspect-ratio: 4 / 3;
    background: #efece4;
    overflow: hidden;
}

.property-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-card-placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--muted);
    font-size: 0.88rem;
}

.property-card-body { padding: 0.9rem 1rem 1rem; display: grid; gap: 0.25rem; }

.property-card-price {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gold-dark);
}

.property-card-title { margin: 0; font-size: 1.02rem; line-height: 1.35; }
.property-card-title a { color: var(--ink); text-decoration: none; }
.property-card-title a:hover { color: var(--gold-dark); text-decoration: underline; }

.property-card-location { margin: 0; }
.property-card-meta { margin: 0.15rem 0 0; }

/* Search page */
.search-page { padding-block: 2.5rem 3rem; }
.search-page h1 { font-size: 2rem; margin: 0.25rem 0 0.4rem; }
.search-page .lead { margin-inline: 0; margin-bottom: 1.5rem; }

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.9rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem;
    margin-bottom: 1.75rem;
}

.search-form .search-submit { align-self: end; display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Listing detail */
.listing-page { padding-block: 2.5rem 3rem; }
.listing-page h1 { font-size: 2rem; margin: 0.25rem 0 0.4rem; }
.listing-page .lead { margin-inline: 0; margin-bottom: 1.25rem; }

.listing-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 1.5rem;
    align-items: start;
}

.listing-main { display: grid; gap: 1.25rem; min-width: 0; }
.listing-side { display: grid; gap: 1.25rem; position: sticky; top: 5rem; }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.8rem;
}

.gallery-item { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }

.gallery-item img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.gallery-cover { grid-column: 1 / -1; }
.gallery-cover img { height: 340px; }

.contact-list {
    list-style: none;
    margin: 0.6rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
    font-size: 0.95rem;
}

.contact-list a { color: var(--gold-dark); }

.enquiry-form { display: grid; gap: 0.9rem; margin-top: 0.9rem; }

/* CTA strip */
.cta-strip { padding-block: 2rem 3rem; }
.cta-card { text-align: center; }
.cta-card h2 { margin-top: 0; }
.cta-card .btn-row { justify-content: center; }

/* ---------------------------------------------------------------
   Phase 8 — subscriptions & payments: plan catalogue, purchase flow,
   payment evidence (bank transfer / QR), admin verification.
   --------------------------------------------------------------- */

/* Plan catalogue */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.plan-card { display: flex; flex-direction: column; }
.plan-card h2 { margin-top: 0; }
.plan-card .btn { align-self: flex-start; margin-top: auto; }
.plan-card .check-tags { margin-top: 0.4rem; }

.plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-dark);
    margin: 0.2rem 0 0.1rem;
}

/* Purchase “after you pay” walkthrough */
.purchase-steps {
    margin: 0.4rem 0 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.45rem;
    font-size: 0.95rem;
    color: var(--ink-soft);
}

/* Receipt / media upload forms */
.upload-form { margin-top: 0.6rem; }

/* Compact inline actions (verify / reject / cancel) */
.inline-form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; margin-top: 0.9rem; }
.inline-form .field { flex: 1 1 260px; margin-bottom: 0; }
.inline-form .field label { font-weight: 600; font-size: 0.85rem; display: block; margin-bottom: 0.25rem; }
.inline-form .field input { width: 100%; }
.inline-form .btn { margin-top: 0; }

/* Disabled-looking ghost button (feature slot exhausted) */
.btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    filter: none;
}

@media (max-width: 820px) {
    .hero-search { grid-template-columns: 1fr; }
    .listing-columns { grid-template-columns: 1fr; }
    .listing-side { position: static; }
    .plan-grid { grid-template-columns: 1fr; }
}

/* Phase 9 — nav unread badge + notification centre + enquiry lifecycle */
.nav-badge {
    display: inline-block;
    min-width: 1.15rem;
    margin-left: 0.35rem;
    padding: 0 0.32rem;
    border-radius: 999px;
    background: var(--fail, #c0392b);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.15rem;
    text-align: center;
    vertical-align: middle;
}

.badge-new,
.badge-working {
    background: #ece7da;
    color: #5c4a1e;
}
.badge-new::before,
.badge-working::before {
    content: "";
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.35rem;
    border-radius: 50%;
    background: currentColor;
    vertical-align: baseline;
}
.badge-new::before { background: var(--warn, #b7791f); }
.badge-working::before { background: #2f4a8c; }

.notification-list { display: grid; gap: 0.7rem; }
.notification-item {
    border: 1px solid var(--line, #e4dfd4);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    background: #fff;
}
.notification-item.is-unread {
    border-color: #c9a75b;
    box-shadow: 0 0 0 1px #c9a75b;
}
.notification-item .notification-time {
    display: block;
    font-size: 0.78rem;
    color: #6b7890;
    margin-top: 0.35rem;
}
.notification-item .btn { margin-top: 0.55rem; }
.notification-title { margin: 0 0 0.2rem; font-size: 1rem; }
.notification-body { margin: 0.25rem 0 0; color: var(--ink-soft, #3d4454); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .property-card { transition: none; transform: none; }
}

/* ---------------------------------------------------------------
   Phase 10 — CMS & blog: static pages, blog listing/show, prose
   content, admin content editor chrome, footer quick links.
   --------------------------------------------------------------- */

/* Admin sidebar sub-heading above the CMS links */
.admin-nav-label {
    margin: 0.7rem 0.35rem 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Inline (row-level) action forms — e.g. delete buttons next to a link */
.form-inline { display: inline-block; margin: 0; }
.form-inline .btn { margin-left: 0.4rem; }

/* Public blog index grid */
.blog-page,
.prose-page { padding-block: 2.5rem 3rem; }
.blog-page h1,
.prose-page h1 { font-size: 2rem; margin: 0.25rem 0 0.4rem; }
.prose-page .lead { margin-inline: 0; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.blog-card h2 { margin: 0.2rem 0 0.4rem; font-size: 1.15rem; line-height: 1.35; }
.blog-card h2 a { color: var(--ink); text-decoration: none; }
.blog-card h2 a:hover { color: var(--gold-dark); text-decoration: underline; }
.blog-card p { margin-bottom: 0.5rem; }
.blog-card .small { display: block; }

.blog-categories { margin-bottom: 2rem; }
.blog-categories h2 { margin-bottom: 0.5rem; }
.tag-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0.25rem 0 0;
}
.tag-list .is-current {
    border-color: var(--gold-dark);
    color: #fff;
    background: linear-gradient(135deg, #c9a75b, var(--gold-dark));
}

/* Tag row under a single post */
.tag-line { margin-top: 1.75rem; }
.tag-line .badge { background: #f5f1e6; color: #5c4a1e; margin-inline: 0.15rem; }

/* Typographic content area (rendered safe HTML) */
.prose {
    color: var(--ink-soft);
    font-size: 1.05rem;
    margin-top: 1.5rem;
    max-width: 46rem;
}

.prose h2,
.prose h3,
.prose h4 {
    color: var(--ink);
    margin: 1.6rem 0 0.6rem;
    line-height: 1.3;
}

.prose p { margin: 0.9rem 0; }
.prose ul,
.prose ol { padding-left: 1.4rem; }
.prose li { margin: 0.3rem 0; }

.prose a { color: var(--gold-dark); }

.prose blockquote {
    margin: 1.2rem 0;
    padding: 0.75rem 1.25rem;
    border-left: 4px solid var(--gold);
    background: #faf7ef;
    color: var(--ink-soft);
}

.prose pre {
    background: var(--navy);
    color: #e7ecf5;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
}

.prose code {
    background: rgba(0, 0, 0, 0.06);
    padding: 0.1em 0.35em;
    border-radius: 4px;
    font-size: 0.92em;
}

.prose pre code { background: transparent; padding: 0; }

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0.6rem 0;
}

.prose hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 1.8rem 0;
}

/* Footer quick links to CMS pages */
.footer-pages {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    margin-bottom: 0.9rem;
}

.footer-pages a {
    color: var(--gold-dark);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
}

.footer-pages a:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .blog-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   Phase 13 — Responsive & UX polish
   - Public header: CSS-only (checkbox-driven) hamburger menu, so
     mobile navigation works with no JavaScript at all.
   - Admin/member shells: the sidebar becomes a compact top strip
     with a horizontally scrollable section-link bar on small screens.
   - Component-level breakpoints for hero, auth cards, filter bars,
     pagination, detail rows, galleries, upload/media and buttons.
   --------------------------------------------------------------- */

/* The hidden checkbox always exists (focusable); only its label is
   suppressed on desktop, where the nav is a plain inline row. */
.nav-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    margin: 0;
}

.nav-toggle-label { display: none; }

@media (max-width: 760px) {
    .header-inner { flex-wrap: wrap; }

    .nav-toggle-label {
        display: grid;
        gap: 0.28rem;
        width: 2.5rem;
        height: 2.5rem;
        padding: 0.6rem 0.62rem;
        margin-left: auto;
        border-radius: 8px;
        cursor: pointer;
    }

    .nav-toggle-label span {
        display: block;
        height: 2px;
        border-radius: 2px;
        background: #fff;
        transition: transform 0.18s ease, opacity 0.18s ease;
    }

    .nav-toggle-label:hover { background: rgba(255, 255, 255, 0.12); }

    #nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) { transform: translateY(0.32rem) rotate(45deg); }
    #nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) { opacity: 0; }
    #nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) { transform: translateY(-0.32rem) rotate(-45deg); }

    #nav-toggle:focus-visible ~ .nav-toggle-label {
        outline: 3px solid rgba(201, 167, 91, 0.7);
        outline-offset: 2px;
    }

    /* Nav becomes a full-width dropdown panel under the brand row. */
    .site-nav {
        display: none;
        order: 3;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.15rem;
        padding-top: 0.7rem;
        margin-top: 0.6rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    #nav-toggle:checked ~ .site-nav { display: flex; }

    .site-nav a,
    .site-nav .nav-form,
    .site-nav .nav-button {
        width: 100%;
        text-align: left;
    }

    .site-nav a,
    .site-nav .nav-button {
        display: block;
        padding: 0.8rem 0.9rem; /* ~44px touch targets */
        font-size: 1rem;
        border-radius: 8px;
    }

    .site-nav .nav-cta { text-align: center; }
}

/* Admin / member shell on small screens: compact sidebar strip whose
   section links form a single-line, horizontally scrollable chip bar. */
@media (max-width: 820px) {
    .admin-sidebar,
    .member-sidebar {
        padding: 0.85rem 1rem 0.7rem;
        gap: 0.55rem;
    }

    .admin-nav,
    .member-nav {
        display: flex;
        flex-flow: row nowrap;
        gap: 0.4rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.1rem 0.05rem 0.4rem;
        scrollbar-width: thin;
    }

    .admin-nav a,
    .member-nav a {
        flex: 0 0 auto;
        padding: 0.55rem 0.95rem;
        font-size: 0.93rem;
        white-space: nowrap;
    }

    .admin-nav-label { display: none; }

    .admin-sidebar-label,
    .member-sidebar-label { margin: 0.1rem 0.3rem 0; }

    .admin-sidebar-footer,
    .member-sidebar-footer {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.1rem 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        padding-top: 0.55rem;
        margin-top: 0;
    }

    .admin-sidebar-footer a,
    .member-sidebar-footer a,
    .admin-sidebar-footer .nav-button,
    .member-sidebar-footer .nav-button { padding: 0.35rem 0.5rem; }

    .admin-sidebar-footer .nav-form,
    .member-sidebar-footer .nav-form { padding-inline: 0; margin: 0; }

    .admin-main,
    .member-main { padding-top: 1.5rem; }
}

@media (max-width: 760px) {
    .hero { padding-block: 3rem 2.5rem; }
    .auth-wrap { padding-block: 2.5rem 3rem; }
    .auth-card { padding: 1.6rem 1.4rem; }
    .section-head { flex-wrap: wrap; row-gap: 0.4rem; }
}

@media (max-width: 640px) {
    /* A little more usable width on phones. */
    .container { width: min(1120px, 100% - 2rem); }

    .site-footer { text-align: center; margin-top: 2.5rem; }
    .site-footer .footer-pages { justify-content: center; }

    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar input[type='search'],
    .filter-bar select { width: 100%; min-width: 0; }
    .filter-bar .btn { align-self: flex-start; }

    .pagination { flex-wrap: wrap; justify-content: center; gap: 0.5rem 1rem; }

    /* Definition lists stack label above value on phones. */
    .details-row { grid-template-columns: 1fr; gap: 0.1rem; }
    .details-row dt { margin-top: 0.4rem; }
    .details-row:first-child dt { margin-top: 0; }

    .gallery-cover img { height: 220px; }
    .media-tile img { height: 120px; }
    .listing-thumb { width: 56px; height: 40px; }
    .stat-value { font-size: 1.7rem; }

    .hero-search .btn { width: 100%; }
    .plan-card .btn { align-self: stretch; text-align: center; }
}

@media (max-width: 480px) {
    .auth-card h1 { font-size: 1.5rem; }
    .property-grid { grid-template-columns: 1fr; }
    .title-row h1 { font-size: 1.6rem; }
    .admin-head h1,
    .member-head h1 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
    .nav-toggle-label span { transition: none; }
}
