/* SBR Air V3 — Properties (Property Managers & Buildings). Scoped to #view-buildings / the building drawer.
   Approved tokens only (shared/ui/sbr-air.tokens.css). v1.1 §14 grid, §19 drawer, §23 responsive. */
.sa-scope.sa-props { color: var(--sa-text); font-family: var(--sa-font); }
.sa-props__metrics { margin-bottom: var(--sa-space-3); }
.sa-props__metric--att .sa-metric__num { color: var(--sa-amber-text); }
.sa-props__views { margin-bottom: var(--sa-space-3); }
.sa-props__toolbar { display: flex; align-items: center; gap: var(--sa-space-2); flex-wrap: wrap; margin-bottom: var(--sa-space-3); }
.sa-props__search { position: relative; flex: 1 1 300px; max-width: 460px; display: flex; align-items: center; }
.sa-props__search > svg { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--sa-text-3); pointer-events: none; }
.sa-props__search .sa-input { width: 100%; padding-left: 32px; padding-right: 64px; }
.sa-props__search #bld-ai-btn { position: absolute; right: 4px; }
.sa-props__sort { flex: 0 1 230px; }
.sa-props__count { margin-left: auto; font-size: var(--sa-text-sm); color: var(--sa-text-2); font-variant-numeric: tabular-nums; }
.sa-props .sa-btn svg { width: 16px; height: 16px; flex: none; }
.sa-props__ai { margin-bottom: var(--sa-space-3); }
.sa-props__grid { max-height: calc(100vh - 330px); }
.sa-props__table thead th { position: sticky; top: 0; z-index: 2; }
.sa-props__table th, .sa-props__table td { padding: 0 10px; }
.sa-props__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sa-props__muted { color: var(--sa-text-3); }
.sa-props__empty { height: 40px; color: var(--sa-text-3); font-size: var(--sa-text-sm); padding-left: 44px !important; }
/* Property Manager group header */
.sa-props tr.sa-pm__row th { padding: 8px 10px; background: var(--sa-surface-subtle); border-bottom: 1px solid var(--sa-border); text-align: left; font-weight: var(--sa-weight-regular); }
.sa-props .sa-pm__head { display: flex; align-items: center; gap: var(--sa-space-2); flex-wrap: wrap; }
.sa-props .sa-pm__toggle svg { width: 18px; height: 18px; transition: transform var(--sa-dur-fast, .12s); }
.sa-props .sa-pm__toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.sa-props .sa-pm__who { flex: 1 1 260px; min-width: 0; }
.sa-props .sa-pm__name { font-size: var(--sa-text-md); font-weight: var(--sa-weight-semibold); color: var(--sa-text); }
.sa-props .sa-pm__meta { margin-top: 2px; font-size: var(--sa-text-xs); color: var(--sa-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-props .sa-pm__actions { display: flex; gap: 6px; flex-wrap: wrap; }
/* Portfolio sub-group */
.sa-props tr.sa-port th { padding: 6px 10px 6px 44px; background: var(--sa-surface); border-bottom: 1px solid var(--sa-border); text-align: left; font-weight: var(--sa-weight-regular); }
.sa-props .sa-port__head { display: flex; align-items: center; gap: var(--sa-space-2); flex-wrap: wrap; }
.sa-props .sa-port__name { font-size: var(--sa-text-sm); font-weight: var(--sa-weight-semibold); }
.sa-props .sa-port__meta { font-size: var(--sa-text-xs); color: var(--sa-text-2); }
.sa-props .sa-port__head .sa-spacer { flex: 1; }
.sa-props .sa-props__danger-text { color: var(--sa-red-text); }
/* Building rows */
.sa-props tr.sa-bld { cursor: pointer; }
.sa-props tr.sa-bld:focus-visible { outline: 2px solid var(--sa-focus); outline-offset: -2px; }
.sa-props tr.sa-bld.is-selected td { background: var(--sa-surface-selected); }
.sa-props tr.sa-bld.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--sa-blue); }
.sa-props .sa-bld__main { padding-left: 44px !important; min-width: 220px; }
.sa-props .sa-bld__main--in { padding-left: 60px !important; }
.sa-props .sa-props__loc { display: inline-flex; align-items: center; gap: 4px; color: var(--sa-text-2); font-size: var(--sa-text-sm); white-space: nowrap; }
.sa-props .sa-props__loc svg { width: 14px; height: 14px; }
.sa-props .sa-bld__actions { text-align: right; white-space: nowrap; }
.sa-props .sa-bld__actions .sa-icon-btn svg { width: 18px; height: 18px; }
.sa-props .sa-pc-num { width: 90px; }
/* Building drawer */
.sa-scope .sa-bld-drawer .sa-drawer__head .sa-icon-btn svg { width: 20px; height: 20px; }
.sa-scope .sa-bld-drawer .sa-drawer__title:focus { outline: none; }
.sa-scope .sa-dr-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.sa-scope .sa-dr-tags:empty { display: none; }
.sa-scope .sa-dr-sec { padding-bottom: var(--sa-space-4); margin-bottom: var(--sa-space-4); border-bottom: 1px solid var(--sa-border); }
.sa-scope .sa-dr-sec:last-child { border-bottom: 0; margin-bottom: 0; }
.sa-scope .sa-dr-sec__head { display: flex; align-items: center; gap: var(--sa-space-2); margin-bottom: 10px; }
.sa-scope .sa-dr-sec__head h3 { flex: 1; margin: 0; font-size: var(--sa-text-sm); font-weight: var(--sa-weight-semibold); color: var(--sa-text); display: flex; align-items: center; gap: 6px; }
.sa-scope .sa-dr-map { height: 200px; border: 1px solid var(--sa-border); border-radius: var(--sa-r-md); margin-bottom: 10px; z-index: 0; }
.sa-scope .sa-kv-list { margin: 0; display: grid; gap: 6px; }
.sa-scope .sa-kv { display: grid; grid-template-columns: 130px 1fr; gap: var(--sa-space-2); font-size: var(--sa-text-sm); }
.sa-scope .sa-kv dt { color: var(--sa-text-2); }
.sa-scope .sa-kv dd { margin: 0; color: var(--sa-text); overflow-wrap: anywhere; }
.sa-scope .sa-kv a, .sa-scope .sa-contact__ways a { color: var(--sa-blue-text); text-decoration: none; }
.sa-scope .sa-kv a:hover, .sa-scope .sa-contact__ways a:hover { text-decoration: underline; }
.sa-scope .sa-contacts, .sa-scope .sa-dr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sa-scope .sa-contacts--pm { margin-top: 10px; }
.sa-scope .sa-contact { display: flex; align-items: flex-start; gap: var(--sa-space-2); padding: 8px 0; border-top: 1px solid var(--sa-border); }
.sa-scope .sa-contact:first-child { border-top: 0; padding-top: 0; }
.sa-scope .sa-contact__who { flex: 1; min-width: 0; }
.sa-scope .sa-contact__ways { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: var(--sa-text-sm); }
.sa-scope .sa-contact__ways a { display: inline-flex; align-items: center; gap: 4px; }
.sa-scope .sa-contact__ways svg { width: 14px; height: 14px; }
.sa-scope .sa-contact__ways small { color: var(--sa-text-3); }
.sa-scope .sa-contact__actions { display: flex; align-items: center; gap: 2px; }
.sa-scope .sa-contact__actions .sa-icon-btn svg { width: 16px; height: 16px; }
.sa-scope .sa-dr-list li { display: flex; flex-direction: column; padding: 6px 0; border-top: 1px solid var(--sa-border); }
.sa-scope .sa-dr-list li:first-child { border-top: 0; }
.sa-scope .sa-dr-link { all: unset; cursor: pointer; display: flex; flex-direction: column; border-radius: var(--sa-r-sm); }
.sa-scope .sa-dr-link:hover .sa-cell-primary { color: var(--sa-blue-text); }
.sa-scope .sa-dr-link:focus-visible { outline: 2px solid var(--sa-focus); outline-offset: 2px; }
.sa-scope .sa-dr-sub { margin: 12px 0 4px; font-size: var(--sa-text-xs); font-weight: var(--sa-weight-semibold); text-transform: uppercase; letter-spacing: .4px; color: var(--sa-text-2); }
/* v1.1 §23 responsive: small desktop / iPad landscape drops Type + Contacts; tablet portrait keeps Building · Location · actions */
@media (max-width: 1279px) { .sa-props .sa-pc-type, .sa-props .sa-pc-num:not(.sa-pc-jobs) { display: none; } }
@media (max-width: 1023px) {
  .sa-props .sa-pc-jobs { display: none; }
  .sa-props__count { margin-left: 0; }
  .sa-props .sa-table td { height: 52px; }
  .sa-props .sa-bld__main { min-width: 0; white-space: normal; }
  .sa-props .sa-pm__meta { white-space: normal; }
  .sa-props__grid { max-height: none; }
}

/* ── Property Manager / building / contact / portfolio forms (drawers) and import (modal) ── */
.sa-scope .sa-wf-section--bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sa-space-2); }
.sa-scope .sa-wf-section--bar .sa-btn { text-transform: none; letter-spacing: 0; }
.sa-scope .sa-wf-geo { display: inline-flex; align-items: center; gap: var(--sa-space-2); text-transform: none; letter-spacing: 0; font-weight: var(--sa-weight-regular); }
.sa-scope .sa-wf-geo .sa-btn svg { width: 14px; height: 14px; }
.sa-scope #bldf-geo-status[data-state="ok"] { color: var(--sa-green-text); }
.sa-scope #bldf-geo-status[data-state="warn"] { color: var(--sa-amber-text); }
.sa-scope #bldf-geo-status[data-state="error"] { color: var(--sa-red-text); }
.sa-scope .sa-wf-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.sa-scope .sa-wf-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: var(--sa-space-4); cursor: pointer; }
.sa-scope .sa-wf-check > span { display: flex; flex-direction: column; gap: 2px; }
.sa-scope .sa-wf-check input { margin-top: 2px; }
.sa-scope .sa-wf-contact { padding: 12px; margin-bottom: var(--sa-space-2); border: 1px solid var(--sa-border); border-radius: var(--sa-r-md); background: var(--sa-surface-subtle); }
.sa-scope .sa-wf-contact__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sa-scope .sa-wf-contact .sa-field { margin-bottom: 10px; }
.sa-scope .sa-wf-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px; border: 1px dashed var(--sa-border-strong, var(--sa-border)); border-radius: var(--sa-r-lg); cursor: pointer; text-align: center; color: var(--sa-text-2); }
.sa-scope .sa-wf-drop:hover { background: var(--sa-surface-hover); }
.sa-scope .sa-wf-drop svg { width: 24px; height: 24px; }
.sa-scope .sa-wf-preview { max-height: 220px; overflow: auto; margin-bottom: 12px; font-size: var(--sa-text-sm); }
.sa-scope#import-overlay { align-items: center; justify-content: center; }
@media (max-width: 767px) { .sa-scope .sa-wf-grid--3 { grid-template-columns: 1fr; } }
