/* Property list master/detail dashboard — scoped to this page. */
.pd-reference-page {
    --pd-teal: #008f8a;
    --pd-teal-dark: #007b77;
    --pd-navy: #101b4d;
    --pd-copy: #52617d;
    --pd-line: #d8e6ec;
    --pd-soft: #f3f9fb;
    max-width: 1720px;
    min-height: calc(100vh - 84px);
    margin: 0 auto;
    padding: 14px 22px 24px;
    background: linear-gradient(145deg, #fbfeff 0%, #f3fafc 55%, #edf7fa 100%);
    color: var(--pd-navy);
}

.pd-reference-page *, .pd-filter-drawer * { box-sizing: border-box; }
.pd-reference-page button, .pd-reference-page input, .pd-reference-page select { font: inherit; }

.pd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    margin: 0 4px 10px;
    font-size: 13px;
    color: #53627c;
}
.pd-breadcrumb a { color: inherit; text-decoration: none; }
.pd-breadcrumb a:first-child { color: var(--pd-teal); font-size: 17px; }
.pd-breadcrumb .bi-chevron-right { font-size: 10px; color: #8292aa; }
.pd-breadcrumb strong { color: var(--pd-navy); }

.pd-empty { text-align: center; padding: 60px 20px; color: var(--pd-copy); }
.pd-layout { display: grid; grid-template-columns: minmax(340px, 29%) minmax(0, 1fr); gap: 16px; align-items: stretch; }
#pdDetailSlot { min-width: 0; }
.pd-list-panel, .pd-detail-panel {
    height: calc(100vh - 155px);
    min-height: 670px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c6dbdf transparent;
    background: rgba(255,255,255,.96);
    border: 1px solid var(--pd-line);
    border-radius: 16px;
    box-shadow: 0 9px 28px rgba(31, 78, 96, .07);
}

/* Left property rail */
.pd-list-panel { padding: 18px 16px; }
.pd-list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pd-list-head h1 { margin: 0; font-size: 27px; line-height: 1.1; font-weight: 800; color: var(--pd-navy); }
.pd-list-head p { margin: 7px 0 0; font-size: 12.5px; color: #687793; }
.pd-filter-trigger {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 9px 15px; border: 0; border-radius: 9px;
    background: linear-gradient(135deg, #10aaa4, #008b87); color: #fff;
    box-shadow: 0 6px 14px rgba(0,143,138,.2); font-size: 13px; font-weight: 700; cursor: pointer;
}
.pd-filters-badge { color: #d6ffdd; font-size: 9px; }
.pd-search {
    display: flex; align-items: center; gap: 10px; height: 49px; padding: 0 14px; margin-bottom: 11px;
    border: 1px solid var(--pd-line); border-radius: 10px; background: #fbfdfe; color: var(--pd-teal);
}
.pd-search .bi { font-size: 19px; }
.pd-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--pd-navy); font-size: 12.5px; }
.pd-list-controls { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 10px; color: #53627c; font-size: 12.5px; }
.pd-toolbar-sort { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.pd-toolbar-sort select {
    max-width: 142px; padding: 8px 29px 8px 11px; border: 1px solid var(--pd-line); border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235a6a82' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none; color: var(--pd-navy); font-size: 12px; font-weight: 700; cursor: pointer;
}
.pd-list { display: flex; flex-direction: column; gap: 7px; }
.pd-list-card {
    display: grid; grid-template-columns: 88px minmax(0,1fr) 16px; align-items: center; gap: 10px;
    min-height: 111px; padding: 10px; border: 1px solid transparent; border-radius: 12px;
    color: inherit; text-decoration: none; transition: .18s ease;
}
.pd-list-card:hover { background: #f5fbfb; border-color: #b9dedc; }
.pd-list-card.active { background: linear-gradient(135deg,#f2fffd,#ebf8f6); border-color: #54c6c1; box-shadow: inset 0 0 0 1px rgba(84,198,193,.08); }
.pd-list-thumb { width: 88px; height: 88px; border-radius: 9px; overflow: hidden; background: #e8f3f4; display: grid; place-items: center; color: var(--pd-teal); font-weight: 800; }
.pd-list-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-list-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pd-list-copy strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--pd-navy); }
.pd-list-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: #61708b; }
.pd-list-copy small:first-of-type::before { content: "\F3E8"; margin-right: 5px; color: var(--pd-teal); font-family: "bootstrap-icons"; }
.pd-status-dot { width: fit-content; padding: 2px 7px; border-radius: 999px; background: #e7fae8; color: #159c32; font-size: 10.5px; font-weight: 700; }
.pd-yours-badge { display: inline-block; padding: 2px 7px; border-radius: 999px; background: #dff8f4; color: var(--pd-teal); font-size: 10px; vertical-align: middle; }
.pd-list-arrow { color: #26758a; font-size: 25px; line-height: 1; }

/* Detail side */
.pd-detail-panel { padding: 12px 16px 16px; }
.pd-detail-top { display: grid; grid-template-columns: minmax(420px, 54%) minmax(280px, 1fr); gap: 18px; margin-bottom: 12px; }
.pd-gallery-block { min-width: 0; }
.pd-detail-image { position: relative; height: 217px; overflow: hidden; border-radius: 12px; background: #e9f1f3; }
.pd-gallery-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .25s ease; }
.pd-gallery-slide.active { opacity: 1; }
.pd-no-photo { display: grid; height: 100%; place-items: center; color: var(--pd-teal); font-size: 30px; font-weight: 800; }
.pd-gallery-arrow {
    position: absolute; top: 50%; z-index: 2; width: 38px; height: 38px; margin-top: -19px;
    border: 0; border-radius: 50%; background: rgba(255,255,255,.96); color: var(--pd-navy);
    box-shadow: 0 4px 15px rgba(7,28,49,.2); cursor: pointer;
}
.pd-gallery-arrow.prev { left: 12px; }.pd-gallery-arrow.next { right: 12px; }
.pd-gallery-counter { position: absolute; z-index: 2; top: 10px; right: 10px; padding: 7px 11px; border-radius: 9px; background: rgba(15,23,42,.72); color: #fff; font-size: 12px; font-weight: 700; }
.pd-gallery-thumbs { display: flex; gap: 7px; height: 52px; margin-top: 7px; overflow: hidden; }
.pd-gallery-thumbs button { flex: 0 0 72px; padding: 2px; border: 1px solid transparent; border-radius: 8px; background: #eef5f6; cursor: pointer; overflow: hidden; }
.pd-gallery-thumbs button.active { border-color: var(--pd-teal); box-shadow: inset 0 0 0 1px var(--pd-teal); }
.pd-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; display: block; }
.pd-gallery-thumbs .pd-gallery-more { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--pd-navy); font-weight: 800; }
.pd-gallery-more small { color: var(--pd-teal); }
.pd-detail-summary { position: relative; min-width: 0; padding: 4px 2px; display: grid; grid-template-columns: minmax(0,1fr) 165px; gap: 14px; }
.pd-detail-head { min-width: 0; }
.pd-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: #e4fae8; color: #139a2f; font-size: 11px; font-weight: 700; }
.pd-badge .bi { font-size: 8px; }
.pd-detail-title-row h2 { margin: 10px 0 12px; color: var(--pd-navy); font-size: clamp(20px,2vw,28px); line-height: 1.13; font-weight: 800; }
.pd-detail-fact { display: flex; align-items: flex-start; gap: 9px; margin: 9px 0; color: #586886; font-size: 12.5px; line-height: 1.35; }
.pd-detail-fact .bi { flex: 0 0 16px; color: var(--pd-teal); font-size: 16px; }
.pd-detail-actions { display: flex; flex-direction: column; gap: 8px; }
.pd-detail-actions form { margin: 0; }
.pd-action {
    display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 43px;
    padding: 9px 12px; border: 1px solid #c8d9e1; border-radius: 9px; background: #fff;
    color: var(--pd-navy); text-decoration: none; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.pd-action:first-child, .pd-action-dark { border-color: var(--pd-teal); background: linear-gradient(135deg,#0aa5a0,#008681); color: #fff; }
.pd-action-danger { border-color: #f1cbcb; color: #d52a34; background: #fff; }
.pd-action:hover { filter: brightness(.97); transform: translateY(-1px); }

.pd-stat-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0 0 9px; }
.pd-stat-row article { display: flex; align-items: center; gap: 15px; min-height: 75px; padding: 11px 18px; border: 1px solid var(--pd-line); border-radius: 11px; background: linear-gradient(135deg,#fff,#f4f9fb); }
.pd-stat-row article > .bi { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%; background: #dcf7f3; color: var(--pd-teal); font-size: 21px; }
.pd-stat-row article:nth-child(2) > .bi { background: #e5efff; color: #315ee8; }
.pd-stat-row article:nth-child(3) > .bi { background: #fff0e8; color: #e85c1b; }
.pd-stat-row span { display: flex; flex-direction: column; gap: 1px; color: #647390; font-size: 12px; }
.pd-stat-row strong { color: var(--pd-teal); font-size: 25px; line-height: 1; }
.pd-stat-row article:nth-child(2) strong { color: #315ee8; }.pd-stat-row article:nth-child(3) strong { color: #e85c1b; }

.pd-tabs { display: flex; align-items: center; gap: 25px; margin-bottom: 10px; border-bottom: 1px solid var(--pd-line); overflow-x: auto; }
.pd-tabs button { flex: 0 0 auto; padding: 10px 5px 9px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #52617d; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.pd-tabs button.active { color: var(--pd-teal); border-bottom-color: var(--pd-teal); }
.pd-tab-panel[hidden] { display: none !important; }
.pd-overview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.pd-info-card { min-width: 0; padding: 11px 13px; border: 1px solid var(--pd-line); border-radius: 11px; background: #fff; }
.pd-info-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 7px; color: var(--pd-navy); font-size: 13.5px; font-weight: 800; }
.pd-info-card h3 .bi { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #ddf7f3; color: var(--pd-teal); font-size: 14px; }
.pd-info-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 27px; padding: 4px 0; border-bottom: 1px solid #edf2f4; font-size: 11.5px; }
.pd-info-row:last-child { border-bottom: 0; }.pd-info-row span { color: #647390; }.pd-info-row b { color: var(--pd-navy); text-align: right; overflow-wrap: anywhere; }
.pd-contact-locked { display: flex; align-items: center; gap: 11px; padding: 11px; border-radius: 9px; background: #f1f6f9; color: #596982; }
.pd-contact-locked > .bi { display: grid; flex: 0 0 35px; height: 35px; place-items: center; border-radius: 50%; background: #e2eaf5; color: var(--pd-navy); font-size: 17px; }
.pd-contact-locked p { margin: 0; font-size: 11.5px; line-height: 1.45; }.pd-contact-locked b { color: var(--pd-navy); }
.pd-contact-action { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; margin-top: 8px; border-radius: 8px; background: var(--pd-teal); color: #fff; text-decoration: none; font-size: 11.5px; font-weight: 800; }
.pd-interest-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 11px; padding: 10px 15px; border: 1px solid #cfe8e6; border-radius: 10px; background: linear-gradient(90deg,#eefbf9,#f8fdfd); }
.pd-interest-bar > span { display: grid; grid-template-columns: 38px auto; column-gap: 10px; align-items: center; }
.pd-interest-bar > span > .bi { grid-row: 1 / span 2; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: #d8f7f1; color: var(--pd-teal); font-size: 19px; }
.pd-interest-bar b { color: var(--pd-navy); font-size: 12.5px; }.pd-interest-bar small { color: #67758e; font-size: 11px; }
.pd-interest-bar > a { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 155px; min-height: 39px; padding: 8px 13px; border-radius: 8px; background: linear-gradient(135deg,#0aa5a0,#008681); color: #fff; text-decoration: none; font-size: 12px; font-weight: 700; }
.pd-empty-note { color: #77849a; font-size: 12px; line-height: 1.5; }
.pd-unit-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 10px; }
.pd-unit-card { padding: 12px; border: 1px solid var(--pd-line); border-radius: 10px; background: #fff; }
.pd-unit-card.active { border-color: var(--pd-teal); border-width: 2px; background: var(--pd-soft); }
.pd-unit-card header { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; color: #61708a; font-size: 11.5px; }.pd-unit-card p { margin: 5px 0; font-size: 12px; }.pd-unit-card a { display: block; margin-top: 6px; color: var(--pd-teal); text-decoration: none; font-size: 11.5px; font-weight: 700; }
.pd-unit-photo-row { display: flex; gap: 5px; flex-wrap: wrap; }.pd-unit-photo-row img { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; }
.pd-amenity-grid { display: flex; flex-wrap: wrap; gap: 8px; }.pd-amenity-chip { display: flex; gap: 7px; padding: 8px 11px; border: 1px solid var(--pd-line); border-radius: 999px; background: #f8fcfd; font-size: 11.5px; }.pd-amenity-chip span { color: #16a34a; }.pd-amenity-chip b { color: #6c7890; }
.pd-photo-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); gap: 8px; }.pd-photo-grid img { width: 100%; aspect-ratio: 4/3; border-radius: 9px; object-fit: cover; display: block; }

/* Slide-in filters retain all original form controls. */
.pd-filter-backdrop { position: fixed; inset: 0; z-index: 400; background: rgba(10,25,45,.48); }
.pd-filter-drawer { position: fixed; top: 0; left: -420px; z-index: 401; width: min(90vw,400px); height: 100dvh; padding: 0 20px 22px; overflow-y: auto; background: #fff; box-shadow: 10px 0 35px rgba(8,35,54,.22); transition: left .25s ease; }
.pd-filter-drawer.is-open { left: 0; }
.pd-filters-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; margin: 0 -20px 16px; padding: 17px 20px 13px; border-bottom: 1px solid #e8eef1; background: #fff; }
.pd-filters-head h2 { margin: 0; color: #13203f; font-size: 18px; }.pd-filters-head-actions { display: flex; align-items: center; gap: 12px; }
.pd-filter-reset { color: var(--pd-teal); text-decoration: none; font-size: 12px; font-weight: 700; }.pd-filter-close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #eef4f5; font-size: 20px; cursor: pointer; }
.pd-filters-form { display: flex; flex-direction: column; gap: 18px; }.pd-filter-label { display: block; margin-bottom: 8px; color: #17213d; font-size: 12.5px; font-weight: 800; }
.pd-filter-checks { display: flex; flex-direction: column; gap: 9px; }.pd-filter-checks label { display: flex; align-items: center; gap: 8px; color: #46536a; font-size: 12.5px; }.pd-filter-checks input { accent-color: var(--pd-teal); }
.pd-filter-group select, .pd-budget-inputs input { width: 100%; padding: 10px 12px; border: 1px solid #dbe5e9; border-radius: 8px; background: #fff; color: #17213d; font-size: 12px; }
.pd-budget-inputs { margin-bottom: 10px; }.pd-filter-group input[type="range"] { width: 100%; accent-color: var(--pd-teal); }.pd-budget-labels { display: flex; justify-content: space-between; margin-top: 7px; color: #607089; font-size: 11.5px; }
.pd-filter-apply { width: 100%; padding: 12px; border: 0; border-radius: 9px; background: var(--pd-teal); color: #fff; font-weight: 800; cursor: pointer; }

@media (max-width: 1250px) {
    .pd-reference-page { padding-inline: 14px; }
    .pd-layout { grid-template-columns: 310px minmax(0,1fr); }
    .pd-detail-top { grid-template-columns: minmax(330px,1.05fr) minmax(300px,1fr); gap: 13px; }
    .pd-detail-summary { grid-template-columns: minmax(0,1fr) 135px; }
    .pd-overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 980px) {
    .pd-reference-page { padding: 10px; }
    .pd-layout { grid-template-columns: 1fr; }
    .pd-list-panel, .pd-detail-panel { height: auto; min-height: 0; overflow: visible; }
    .pd-list-panel { position: static; }
    .pd-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .pd-detail-top { grid-template-columns: minmax(0,1fr) minmax(300px,.8fr); }
}

@media (max-width: 800px) {
    .pd-list { grid-template-columns: 1fr; }
    .pd-detail-top { grid-template-columns: 1fr; }
    .pd-detail-summary { grid-template-columns: minmax(0,1fr) 150px; }
}

@media (max-width: 720px) {
    .pd-breadcrumb { margin-left: 2px; }
    .pd-list-head h1 { font-size: 23px; }
    .pd-list { grid-template-columns: 1fr; }
    .pd-detail-panel { padding: 10px; }
    .pd-detail-top { grid-template-columns: 1fr; }
    .pd-detail-image { height: 230px; }
    .pd-detail-summary { grid-template-columns: 1fr; }
    .pd-detail-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .pd-stat-row { gap: 7px; }
    .pd-stat-row article { min-height: 65px; padding: 8px; gap: 8px; }
    .pd-stat-row article > .bi { width: 34px; height: 34px; font-size: 16px; }
    .pd-stat-row strong { font-size: 20px; }
    .pd-overview-grid { grid-template-columns: 1fr; }
    .pd-interest-bar { align-items: stretch; flex-direction: column; }
    .pd-interest-bar > a { width: 100%; }
}

@media (max-width: 480px) {
    .pd-reference-page { padding-inline: 7px; }
    .pd-list-panel { padding: 14px 11px; }
    .pd-list-head { align-items: center; }.pd-list-head p { display: none; }
    .pd-list-controls { align-items: flex-start; }.pd-toolbar-sort span { display: none; }
    .pd-list-card { grid-template-columns: 75px minmax(0,1fr) 13px; }.pd-list-thumb { width: 75px; height: 75px; }
    .pd-detail-image { height: 205px; }
    .pd-gallery-thumbs button { flex-basis: 60px; }
    .pd-stat-row { grid-template-columns: 1fr; }
    .pd-stat-row article { min-height: 56px; }
    .pd-tabs { gap: 16px; }
}
