/* Real estate module (plugins/bizeeos/realestate). Plain CSS on the DESIGN.md tokens, loaded after admin.css. */

/* Listing card: photo strip + key facts */
.re-card { display: grid; gap: 20px; container-type: inline-size; }
.re-photos { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 120px; gap: 8px; border-radius: 12px; overflow: hidden; }
.re-photos a { display: block; position: relative; background: var(--bz-canvas); }
.re-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.re-photos a:first-child { grid-row: span 2; }
.re-photos .re-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(14, 12, 36, .45); color: #fff; font-weight: 600; }
.re-photos-empty { display: grid; place-items: center; height: 160px; border-radius: 12px; background: var(--bz-canvas); color: var(--bz-muted); font-size: .8125rem; border: 1px dashed var(--bz-line-strong); }
@container (max-width: 520px) {
    .re-photos { grid-template-columns: 1fr 1fr; grid-auto-rows: 110px; }
    .re-photos a:first-child { grid-column: span 2; grid-row: span 2; }
}
.re-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: flex-end; }
.re-eyebrow { margin: 0; font-size: .8125rem; color: var(--bz-muted); }
.re-title { margin: 2px 0 0; font-size: 1.125rem; font-weight: 500; color: var(--bz-ink); }
.re-price { font-size: 1.75rem; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--bz-ink); line-height: 1.15; text-align: right; }
.re-price small { display: block; font-size: .75rem; font-weight: 400; letter-spacing: 0; color: var(--bz-muted); }
.re-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 14px 16px; margin: 0; }
.re-facts div { min-width: 0; }
.re-facts dt { font-size: .75rem; color: var(--bz-muted); }
.re-facts dd { margin: 2px 0 0; font-size: .875rem; font-weight: 500; color: var(--bz-ink); overflow-wrap: break-word; }
.re-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.re-tag { padding: 3px 10px; border-radius: 999px; background: var(--bz-canvas); color: var(--bz-text-2); font-size: .75rem; }
.re-text { font-size: .875rem; color: var(--bz-text-2); white-space: pre-line; margin: 0; }

/* Match lists (enquiries for a listing, listings for an enquiry) */
.re-list { display: grid; margin: 0; padding: 0; list-style: none; }
.re-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--bz-line); }
.re-row:last-child { border-bottom: 0; }
.re-row img, .re-row .re-thumb { width: 56px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--bz-canvas); }
.re-row-main { flex: 1 1 12rem; min-width: 0; }
.re-row-title { display: block; font-size: .875rem; font-weight: 500; color: var(--bz-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.re-row-title:hover { color: var(--bz-accent-text); }
.re-row-meta { display: block; font-size: .75rem; color: var(--bz-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.re-row-side { text-align: right; flex: none; font-size: .8125rem; font-weight: 500; color: var(--bz-ink); font-variant-numeric: tabular-nums; }
.re-row-side small { display: block; font-weight: 400; color: var(--bz-muted); font-size: .7rem; }
.re-row-side small.is-warn { color: #B54708; }
.re-empty { margin: 0; padding: 8px 0; font-size: .8125rem; color: var(--bz-muted); }

/* Requirement summary */
.re-need { display: grid; gap: 14px; }
.re-need-line { margin: 0; font-size: 1rem; font-weight: 500; color: var(--bz-ink); }

/* Deal progress: steps + checklist */
.re-steps { display: flex; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.re-step { flex: 1 0 7.5rem; }
.re-step button { width: 100%; text-align: left; padding: 10px 12px 9px; border: 0; border-radius: 10px; background: var(--bz-canvas); color: var(--bz-muted); font: inherit; font-size: .75rem; cursor: pointer; box-shadow: inset 0 3px 0 var(--bz-line-strong); }
.re-step button:disabled { cursor: default; }
.re-step strong { display: block; margin-top: 2px; font-size: .8125rem; font-weight: 500; color: var(--bz-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.re-step.is-done button { box-shadow: inset 0 3px 0 var(--bz-positive); }
.re-step.is-current button { background: var(--bz-accent-soft); box-shadow: inset 0 3px 0 var(--bz-accent); color: var(--bz-accent-text); }
.re-step.is-current strong { color: var(--bz-ink); }
.re-checklist { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.re-check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; font-size: .875rem; color: var(--bz-ink); cursor: pointer; }
.re-check:hover { background: var(--bz-hover); }
.re-check input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--bz-accent); }
.re-check.is-done span { color: var(--bz-muted); text-decoration: line-through; }
.re-progress-note { margin: 12px 0 0; font-size: .75rem; color: var(--bz-muted); }
.re-banner { padding: 12px 14px; border-radius: 10px; font-size: .875rem; margin: 0 0 14px; }
.re-banner.is-ok { background: #ECFDF3; color: #05603A; }
.re-banner.is-muted { background: var(--bz-canvas); color: var(--bz-text-2); }

/* Commission panel */
.re-money { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 12px; margin: 0 0 16px; }
.re-money div { padding: 12px 14px; border: 1px solid var(--bz-line); border-radius: 12px; }
.re-money dt { font-size: .75rem; color: var(--bz-muted); }
.re-money dd { margin: 2px 0 0; font-size: 1.125rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--bz-ink); }
.re-table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.re-table th { text-align: left; font-weight: 500; font-size: .75rem; color: var(--bz-muted); padding: 6px 8px 8px 0; border-bottom: 1px solid var(--bz-line); }
.re-table td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--bz-line); color: var(--bz-ink); vertical-align: top; }
.re-table tr:last-child td { border-bottom: 0; }
.re-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.re-table a { color: var(--bz-accent-text); text-decoration: none; }
.re-sub { margin: 18px 0 6px; font-size: .8125rem; font-weight: 500; color: var(--bz-text-2); }
.re-state { font-size: .75rem; }
.re-state.is-paid { color: #079455; }
.re-state.is-invoiced { color: #B54708; }
.re-state.is-to_invoice { color: var(--bz-muted); }

/* Overview */
.re-dash { display: grid; gap: 16px; container-type: inline-size; }
.re-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@container (max-width: 900px) { .re-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.re-kpi { display: block; padding: 20px 22px; background: var(--bz-surface); border: 1px solid var(--bz-line); border-radius: var(--bz-radius-card); text-decoration: none; }
a.re-kpi:hover { background: var(--bz-surface-2); }
.re-kpi-label { font-size: .8125rem; color: var(--bz-text-2); }
.re-kpi-value { margin-top: 4px; font-size: 1.75rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; color: var(--bz-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.re-kpi-note { margin-top: 4px; font-size: .75rem; color: var(--bz-muted); }
.re-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@container (max-width: 900px) { .re-cols { grid-template-columns: 1fr; } }
.re-panel { padding: 22px 24px; background: var(--bz-surface); border: 1px solid var(--bz-line); border-radius: var(--bz-radius-card); min-width: 0; }
.re-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.re-panel-title { margin: 0; font-size: 1rem; font-weight: 500; color: var(--bz-ink); }
.re-panel-link { font-size: .8125rem; color: var(--bz-accent-text); text-decoration: none; white-space: nowrap; }
.re-bars { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.re-bar { display: grid; grid-template-columns: minmax(6rem, 9rem) 1fr auto; gap: 10px; align-items: center; font-size: .8125rem; color: var(--bz-text-2); }
.re-bar-track { height: 10px; border-radius: 999px; background: var(--bz-canvas); overflow: hidden; }
.re-bar-fill { display: block; height: 100%; border-radius: 999px; background: repeating-linear-gradient(135deg, var(--bz-accent) 0 6px, #8B76F8 6px 9px); }
.re-bar-fill.is-2 { background: repeating-linear-gradient(135deg, var(--bz-accent-2) 0 6px, #7DD3F5 6px 9px); }
.re-bar-count { font-weight: 500; color: var(--bz-ink); font-variant-numeric: tabular-nums; }
.re-time { flex: none; width: 3.25rem; font-size: .8125rem; font-weight: 600; color: var(--bz-ink); font-variant-numeric: tabular-nums; }
.re-dot { flex: none; width: 8px; height: 8px; border-radius: 999px; background: var(--bz-accent-3); margin-top: 6px; align-self: flex-start; }
.re-dot.is-renewal { background: var(--bz-accent-2); }
.re-dot.is-offer, .re-dot.is-commission { background: var(--bz-accent); }
.re-dot.is-no-permit { background: var(--bz-negative); }
