/* ─── Listing workspace (2026-09-26) ───────────────────────────────────────────
   Scoped to #tab-property. Uses the shared theme tokens (light / dark follow the app).
   Compact header, five tabs + secondary "listing records" links, two-column Overview,
   Marketing groups. Existing section renderers keep their own styles. */

#tab-property .pwx { overflow-y: auto; -webkit-overflow-scrolling: touch; }
#tab-property .pwx > .pw-body { flex: none; overflow: visible; }
#tab-property .pwx :is(button, a, select, input, textarea, summary):focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#tab-property .pwx h1, #tab-property .pwx h3 { margin: 0; }

/* ── Header ──────────────────────────────────────────────────────────────── */
#tab-property .pwx-header { padding: 12px 24px 0; background: var(--card); }
#tab-property .pwx-back { margin: 0 0 10px; font-size: 13px; padding: 6px 12px; }
#tab-property .pwx-head-row { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
#tab-property .pwx-thumb { flex: none; width: 72px; height: 54px; border-radius: 8px; object-fit: cover; background: var(--surface); }
#tab-property .pwx-thumb-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0;
  border: 1.5px dashed var(--border); color: var(--text-2); font-size: 10.5px; font-weight: 600; cursor: pointer; }
#tab-property .pwx-thumb-empty:hover { border-color: var(--gold); color: var(--text); }
#tab-property .pwx-details { font-size: 13.5px; color: var(--text); }
#tab-property .pwx-title-block { flex: 1; min-width: 0; }
#tab-property .pwx-address { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 500; line-height: 1.1; margin: 0; white-space: normal; }
#tab-property .pwx-locality { font-size: 14px; color: var(--text-2); margin-top: 2px; }
#tab-property .pwx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; }
#tab-property .pwx-price { font-size: 16px; font-weight: 700; color: var(--text); }
#tab-property .pwx-agent { font-size: 13px; color: var(--text-2); }
#tab-property .pwx-pill { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #EEECEA; color: #45443F; }
#tab-property .pwx-pill-active      { background: #E4F4E9; color: #1D6B40; }
#tab-property .pwx-pill-coming-soon { background: #E3EEFB; color: #1F5596; }
#tab-property .pwx-pill-pending     { background: #FCEBD9; color: #8A4A12; }
#tab-property .pwx-pill-sold        { background: #EDE5F8; color: #5B3A8C; }
#tab-property .pwx-pill-expired     { background: #FBE3E0; color: #9A2F24; }
#tab-property .pwx-pill-archived    { background: #1C1B18; color: #F8F7F4; }
#tab-property .pwx-head-actions { flex: none; display: flex; gap: 8px; }
#tab-property .pwx-btn, #tab-property .po-btn-secondary {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1.5px solid var(--gold); background: var(--card); color: var(--text); font-size: 13.5px; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
#tab-property .pwx-btn:hover, #tab-property .po-btn-secondary:hover { background: var(--gold-dim); }

#tab-property .pwx-nav { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 -24px; padding: 0 24px; }
#tab-property .pwx-nav .pw-nav-btn { font-size: 14px; padding: 10px 14px; color: var(--text-2); }
#tab-property .pwx-nav .pw-nav-btn.active { color: var(--text); border-bottom-color: var(--gold); font-weight: 600; }
#tab-property .pwx-secondary { display: flex; gap: 4px; flex: none; padding-bottom: 6px; }
#tab-property .pwx-sec-btn {
  border: none; background: none; color: var(--text-2); font-size: 12.5px; padding: 4px 8px; border-radius: 6px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border);
}
#tab-property .pwx-sec-btn:hover, #tab-property .pwx-sec-btn.active { color: var(--text); background: var(--gold-dim); text-decoration-color: var(--gold); }

/* Marketing group nav */
#tab-property .pwx-subnav-host:empty { display: none; }
#tab-property .po-subnav { display: flex; gap: 8px; padding: 14px 24px 0; overflow-x: auto; scrollbar-width: none; }
#tab-property .po-subnav::-webkit-scrollbar { display: none; }
#tab-property .po-subnav-btn {
  flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: 13.5px; font-weight: 500; cursor: pointer;
}
#tab-property .po-subnav-btn.active { background: var(--gold-dim); border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); font-weight: 600; }
#tab-property .pwx-extra:empty { display: none; }
#tab-property .pwx-extra { padding: 0 0 24px; }

/* ── Overview ────────────────────────────────────────────────────────────── */
#tab-property .po-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; padding: 20px 24px 32px; align-items: start; }
#tab-property .po-main, #tab-property .po-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
#tab-property .po-page { padding: 20px 24px 32px; display: flex; flex-direction: column; gap: 16px; max-width: 900px; }
#tab-property .po-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow-sm); }
#tab-property .po-card-warn { border-color: #E9C46A; }
#tab-property .po-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
#tab-property .po-card-title { font-size: 15px; font-weight: 600; color: var(--text); }
#tab-property .po-card-count { font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface); padding: 1px 8px; border-radius: 999px; }
#tab-property .po-card-head .po-link { margin-left: auto; }
#tab-property .po-link { background: none; border: none; padding: 0; color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold); }
#tab-property .po-note { font-size: 13px; color: var(--text-2); margin: 0; line-height: 1.45; }
#tab-property .po-muted { color: var(--text-2); font-weight: 400; }
#tab-property .po-pre { white-space: pre-wrap; font-size: 14px; color: var(--text); margin: 0 0 8px; }
#tab-property .po-group-intro { padding: 0 2px; }

#tab-property .po-state { font-size: 13.5px; padding: 12px 14px; border-radius: 8px; background: var(--bg-subtle); color: var(--text-2); }
#tab-property .po-state-failed { background: #FBE3E0; color: #7D2A20; }
#tab-property .po-state-loading { font-style: italic; }

/* Tasks */
#tab-property .po-task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
#tab-property .po-task { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
#tab-property .po-task:first-child { border-top: none; padding-top: 2px; }
#tab-property .po-task-main { flex: 1; min-width: 0; }
#tab-property .po-task-title { font-size: 14.5px; font-weight: 500; color: var(--text); }
#tab-property .po-task-closed .po-task-title { text-decoration: line-through; color: var(--text-2); }
#tab-property .po-task-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; font-size: 12.5px; color: var(--text-2); }
#tab-property .po-due-overdue { color: #A3322A; font-weight: 600; }
#tab-property .po-due-today { color: #8A4A12; font-weight: 600; }
#tab-property .po-pri { font-weight: 600; color: var(--text); }
#tab-property .po-task-actions { flex: none; display: flex; align-items: center; gap: 10px; }
#tab-property .po-task-done, #tab-property .po-task-reopen {
  height: 32px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--gold); background: var(--card);
  color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer;
}
#tab-property .po-task-done:hover { background: var(--gold-dim); }
#tab-property .po-task-reopen { border-color: var(--border); font-weight: 500; }
#tab-property .po-task-open { font-size: 13px; color: var(--text-2); }
#tab-property .po-undo:empty { display: none; }
#tab-property .po-undo { margin-top: 10px; font-size: 13px; color: var(--text); display: flex; gap: 10px; align-items: center; }
#tab-property details.po-closed > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
#tab-property details.po-closed[open] > summary { margin-bottom: 12px; }

/* Stage */
#tab-property .po-steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
#tab-property .po-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); text-align: center; }
#tab-property .po-step::before { content: ''; position: absolute; top: 7px; left: -50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
#tab-property .po-step:first-child::before { display: none; }
#tab-property .po-step-dot { position: relative; z-index: 1; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); background: var(--card); }
/* Current status is filled; a status the records show earlier gets a gold ring; nothing else is implied. */
#tab-property .po-step-seen .po-step-dot { border-color: var(--gold); }
#tab-property .po-step-seen { color: var(--text); }
#tab-property .po-step-current .po-step-dot { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-dim); background: var(--gold); }
#tab-property .po-step-current { color: var(--text); font-weight: 600; }
#tab-property .po-legend { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 12px; color: var(--text-2); }
#tab-property .po-lg { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--gold); display: inline-block; }
#tab-property .po-lg-current { background: var(--gold); }
#tab-property .po-lg-seen { margin-left: 10px; }
#tab-property .po-history { margin-bottom: 10px; }
#tab-property .po-facts { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; }
#tab-property .po-fact { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
#tab-property .po-k { color: var(--text-2); }
#tab-property .po-v { color: var(--text); font-weight: 500; text-align: right; }

/* Activity */
#tab-property .po-act-list { list-style: none; margin: 0; padding: 0; }
#tab-property .po-act { border-top: 1px solid var(--border); }
#tab-property .po-act:first-child { border-top: none; }
#tab-property .po-act-row { display: flex; gap: 10px; padding: 10px 0; }
#tab-property .po-act summary { cursor: pointer; list-style: none; }
#tab-property .po-act summary::-webkit-details-marker { display: none; }
#tab-property .po-act-icon { flex: none; width: 22px; text-align: center; }
#tab-property .po-act-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#tab-property .po-act-label { font-size: 13.5px; font-weight: 600; color: var(--text); }
#tab-property .po-act-times { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: var(--gold-dim); font-size: 12px; }
#tab-property .po-act-text { font-size: 13px; color: var(--text); word-break: break-word; }
#tab-property .po-act-when { font-size: 12px; color: var(--text-2); }
#tab-property .po-act-group summary .po-act-label::after { content: ' ▾'; color: var(--text-2); font-weight: 400; }
#tab-property .po-act-entries { margin: 0 0 10px 32px; padding: 0; list-style: disc; font-size: 12.5px; color: var(--text-2); }

/* Aside */
#tab-property .po-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--surface); }
#tab-property .po-photo-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-2);
  border: 1.5px dashed var(--border); font-size: 13.5px; }
#tab-property .po-dl { margin: 0; display: flex; flex-direction: column; gap: 8px; }
#tab-property .po-dl > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
#tab-property .po-dl dt { color: var(--text-2); }
#tab-property .po-dl dd { margin: 0; color: var(--text); text-align: right; font-weight: 500; word-break: break-word; }
#tab-property .po-dl a { color: var(--text); }
#tab-property .po-src { font-size: 11px; font-weight: 600; color: #1D6B40; background: #E4F4E9; padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
#tab-property .po-seller-name { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
#tab-property .po-card .po-btn-secondary { margin-top: 12px; }
#tab-property .po-miss { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text); display: flex; flex-direction: column; gap: 3px; }
#tab-property .po-rel { list-style: none; margin: 0; padding: 0; }
#tab-property .po-rel li { border-top: 1px solid var(--border); }
#tab-property .po-rel li:first-child { border-top: none; }
#tab-property .po-rel-link, #tab-property .po-rel-none { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 0;
  background: none; border: none; font-size: 13.5px; color: var(--text); text-decoration: none; text-align: left; cursor: pointer; }
#tab-property .po-rel-none { cursor: default; }
#tab-property .po-rel-link:hover span:first-child { text-decoration: underline; text-decoration-color: var(--gold); }
#tab-property .po-inline-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }

/* Existing marketing sections inside the groups */
#tab-property .pmkt-wrap { padding: 16px 24px 24px; margin: 0; max-width: 980px; gap: 20px; }
#tab-property .pmkt-spw-card > :not(.pmkt-section-head):not(.pmkt-domain-card) { margin-left: 18px; margin-right: 18px; }
#tab-property .pmkt-spw-card > .pmkt-spw-row:first-of-type { margin-top: 14px; }
#tab-property .pmkt-spw-card { padding-bottom: 14px; }
#tab-property .pmkt-section > .po-note, #tab-property .pmkt-section > .po-pre, #tab-property .pmkt-section > .pmkt-spw-cf-oh-wrap,
#tab-property .pmkt-section > .po-btn-secondary, #tab-property .pmkt-section > #po-inquiries, #tab-property .pmkt-section > .lmc-empty { margin: 12px 18px; }
#tab-property .pmkt-section > .pmkt-spw-cf-oh-wrap { display: flex; flex-wrap: wrap; gap: 10px 16px; }
#tab-property #po-inquiries [style] { color: var(--text) !important; }
#tab-property #po-inquiries [style*="rgba(255,255,255,.04)"] { background: var(--bg-subtle) !important; border-color: var(--border) !important; }
#tab-property .msh-email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* ── Phone ───────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  #tab-property .po-grid { grid-template-columns: 1fr; }
  #tab-property .po-aside .po-photo { max-height: 220px; }
}
@media (max-width: 600px) {
  #tab-property .pwx-header { padding: 10px 14px 0; }
  #tab-property .pwx-head-row { align-items: flex-start; flex-wrap: wrap; }
  #tab-property .pwx-thumb { width: 56px; height: 44px; }
  #tab-property .pwx-address { font-size: 23px; }
  #tab-property .pwx-head-actions { width: 100%; }
  #tab-property .pwx-head-actions .pwx-btn { flex: 1; justify-content: center; }
  #tab-property .pwx-nav { flex-direction: column; align-items: stretch; margin: 0 -14px; padding: 0 14px; }
  #tab-property .pwx-nav .pw-nav-inner { overflow-x: auto; scrollbar-width: none; width: auto; }
  #tab-property .pwx-nav .pw-nav-btn { padding: 10px 8px; font-size: 13.5px; }
  #tab-property .pwx-secondary { padding: 0 0 8px; }
  #tab-property .po-subnav { padding: 12px 14px 0; }
  #tab-property .po-grid, #tab-property .po-page { padding: 14px; }
  #tab-property .pmkt-wrap { padding: 12px 14px 20px; }
  #tab-property .po-task { flex-wrap: wrap; }
  #tab-property .po-task-actions { width: 100%; }
  #tab-property .po-steps { font-size: 11.5px; }
}

/* ── Marketing landing (2026-09-26 refinement) ───────────────────────────── */
#tab-property .po-mkt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px 24px 32px; max-width: 1200px; align-items: start; }
#tab-property .po-mkt-group .po-card-title { display: block; margin-bottom: 6px; }
#tab-property .po-rows { list-style: none; margin: 0; padding: 0; }
#tab-property .po-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); }
#tab-property .po-row:first-child { border-top: none; }
#tab-property .po-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#tab-property .po-row-title { font-size: 14px; font-weight: 600; color: var(--text); }
#tab-property .po-row-sub { font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
#tab-property .po-row-btn { flex: none; height: 34px; padding: 0 13px; border-radius: 8px; border: 1.5px solid var(--gold); background: var(--card);
  color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
#tab-property .po-row-btn:hover { background: var(--gold-dim); }
#tab-property .po-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 14px 24px 0; font-size: 13.5px; color: var(--text-2); }
#tab-property .po-crumb-back { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; cursor: pointer; }
#tab-property .po-crumb-path strong { color: var(--text); font-weight: 600; }
#tab-property details.po-details > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
#tab-property details.po-details > summary::after { content: '▾'; margin-left: auto; color: var(--text-2); }
#tab-property details.po-details[open] > summary { margin-bottom: 12px; }
/* Website status: neutral when not published (publishing is a choice, not an error) */
#tab-property .pmkt-spw-none { background: var(--surface); color: var(--text-2); }

@media (max-width: 900px) {
  #tab-property .po-mkt { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  #tab-property .po-mkt { padding: 14px; gap: 12px; }
  #tab-property .po-crumb { padding: 12px 14px 0; }
  #tab-property .po-row { gap: 10px; }
  #tab-property .po-row-btn { height: 32px; padding: 0 10px; font-size: 12.5px; }
}
#tab-property .ls-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
